3 ms·
Dude wrote his own language which compiles to an intermediate language, then Turing machines. He then managed to test it on a simple statement about square num
by lordnacho 9y ago
Dude wrote his own language which compiles to an intermediate language, then Turing machines.
He then managed to test it on a simple statement about square numbers.
Sounds unimaginably complex.
How many people could help you write unit tests for such a thing?
- sorokod 9y agoBB(1) ?
- xyzzyz 9y agoSounds like an interesting assignment at a good undergrad compilers course.
- zeth___ 9y agoUnit tests are mostly worthless for machines like this, you need formal proofs.
- lmm 9y agoSounds pretty straightforward. This is a normal way of working in functional languages: you write your business logic in a high-level representation (aka an "embedded DSL") and a succession of interpreters that interpret slightly higher-level representations into slightly lower-level representations, until you get down to one that you can implement directly. It's a nice structure for testing because you can test each interpreter separately on each of its instructions and then the composition behaviour is guaranteed.