Ola is a subset of Olaf suitable for presentation in lectures. Really, Ola is a stripped down version of Olaf comparable to the IMP language from software foundations but smaller.
When compared to Olaf it is safe to say that every Ola program is a valid Olaf program, but not every Olaf program is a valid Ola program.
Specifically, Ola is ‘just’:
- integers and boolean primitives types and constants;
- addition and conjunction of primitives;
- let bindings and variable bindings;
- mutation and dereferencing of allocated memory;
- while-loops and conditionals
- methods and method calls;
We will not give Ola’s formal specification here, and refer you to Olaf’s formal specification here. We will repeat the, formal, specification for Ola as required in the lecture notes.