Consequences of Correspondence
- Presence of both binding forms:
- Numeral abstractions but not parameters.
- Numeral parameters are static parameters.
- Compiler may generate specialized abstractions.
- static-fun F(X: int) = X+1
var A: newint in A:=F(1)+F(3)
- var A: newint in A:=2+4
- Combination of static/dynamic parameters:
- proc SORT(L: int, V: list-of int)
=
...L ...V ...
in ...call SORT(3, [4,2,6])
...call
SORT(4,[0,1,3,2) ... - proc SORT3(V: list-of int) = ...3 ...V ...
proc SORT4(V: list-of int) = ...4 ...V ...
in ...call SORT3([4,2,6])
...call
SORT4([0,1,3,2])
Theory of partial evaluation!
Author: Wolfgang Schreiner
Last Modification: May 7, 1998