This is the intermediate representation. It is described in [App98b, Section 7.1]. It is some sort of abstract machine language. The module does not contains code, it is basically a datatype declaration, corresponding to the abstract syntax at the user level, now at an intermediate level.
What’s the use of the function notRel and commute? They showed up in the interface provided in the SML code fragments, but I found no description. There’s also a Canon.commute-function. The ones here are currently stub.
[Jump] Why is there a list of labels for Jump?
[Sequence] The tree language has a binary sequence operator Seq. Now, what is the “associativity” of the operator, i.e., given a list of tree expressions e0,…, en−1, are they to be represented as Seq(e0,Seq(… Seq(en−2, en−1)…)) or the other way round. Is there a preference intended or doesn’t it matter at all?
The pictures in [App98b], though, seem to indicate that at least Seq is intended to associated to the right, and so this is what I will do. The last element that provides the value will be treated separately.
e1 ; e2 ; e3 ; e4 => Eseq(Seq(e1,Seq(e2,e3)), e4)