About

The CMa Virtual Machine Implementation

I created this 100% client side JavaScript implementation of the CMa Virtual Machine as described in the text Compiler Design: Virtual Machines by Reinhard Wilhelm and Helmut Seidl in preparation for a course I was about to take at Aspen University DCS904. The text arrived early and the class wasn't to start for a couple of weeks so I decided to have some fun and implement the C virtual machine described in chapter 2 of the text as both a means of killing time and providing some insights into the material in the text.

Well, I certainly nailed the first one. On the second goal, however I think I have found a number of discrepancies in the text and there were a lot omissions of detail that I had to guess at. I tried to fill in those gaps with this resource I found on the net; cma.pdf but it too seemed to be little out of sync with the text.

The full source is available on GitHub: CMa where you create any issues when you find them. No guarantees that I will fix them, but if I need to kill some time I just might.

So all I can say is that this implementation (still incomplete) may not match exactly the machine as described in the text or the PDF. But at least it works and so far seems reasonably consistent.