Exercise 1
1.
At each transition, the size of the heap is incremented by one, thus so is . And the only way to decrease , is to execute a transition: is decremented by one iff one transition is performed.
That is, once has been increased, remains constant until another transition is executed.
More concisely: is the only transition incrementing , and is the only one decrementing it, so holds.
2.
Every entry in the environment and/or the heap is an explicit substitution. But explicit substitutions can only be created by transitions (one transition ⟹ creation of one explicit substitution).
3.
4.
The code is increased in size only by . All subterms of the code, stack, heap and the environment are subterms of the initial term .
So if we have , then
Any sequence is of the form:
So
Other possibility: the only way to increase the code size is the perform , and between two , there can be at most .
Exercise 2
1.
can be followed only by and .
Same thing for .
2.
3.
The effect of is to turn a white substitution inside into a black one in (that will remain black), and white substitutions are created by ’s. So
4.
Note that we have
So:
Difference between the two machines: the second one avoids detours of putting used substitutions back into the heap.
Leave a comment