Updated semantics rules for correct memoization. Extended proposal.