Examining iconx, the Unicon bytecode interpreter
The Unicon language and its predecessor, Icon, share a common architecture and implementation in the form of a bytecode interpreter and runtime system program named iconx
. Compared to the Jzero bytecode interpreter in the previous section, iconx
is large and complex and has the benefit of real-world use over a sustained period. Compared to the Java virtual machine, iconx
is small and simple, and it’s relatively accessible for studying. A thorough description of iconx
can be found in The Implementation of Icon and Unicon: a Compendium. This section can be viewed as a brief introduction to that work.
Understanding goal-directed bytecode
Unicon has an unusual bytecode. A brief example was provided earlier in this chapter in the Understanding what bytecode is section. The language is goal-directed. All expressions succeed or fail. Many expressions, called generators, can produce additional results on demand when a surrounding...