%------------------------------------------------------------------------------ % A Continuation Semantics for the While Language % % All references are to HR and F Nielson "Semantics with Applications: % A Formal Introduction", John Wiley & Sons, 1992. (revised edition % available: http://www.daimi.au.dk/~hrn ) % % Author: David Lester, Manchester University, NIA, Université Perpignan % % Version 1.0 25/12/07 Initial Version %------------------------------------------------------------------------------
s: VAR State
a: VAR AExp
b: VAR BExp
c,c1,c2: VAR Cont
f,g: VAR scott_continuous[Cont,Cont,(sq_le),(sq_le)]
x: VAR V
S: VAR Stm
identity_continuous: LEMMA scott_continuous?(I[Cont])
composition_continuous: LEMMA scott_continuous?(f o g) MEASURE <
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
conditional_continuous: LEMMA
scott_continuous?(LAMBDA c: conditional(B(b),f(c),g(c)))
composition_conditional: LEMMA
conditional(B(b),c o c1, c o c2) = c o conditional(B(b),c1,c2)
SS(S) : RECURSIVE (scott_continuous?[Cont,Cont,(sq_le),(sq_le)]) = cases S of
Assign(x,a) : (LAMBDA c: LAMBDA s: c(assign(x,A(a))(s))),
Skip : I[Cont],
Sequence(S1,S2) : SS(S1) o SS(S2),
Conditional(b,S1,S2) : LAMBDA c: conditional(B(b),SS(S1)(c),SS(S2)(c)),
While(b,S1) :
fix(LAMBDA g: LAMBDA c: conditional(B(b),SS(S1)(g(c)), c)) endcasesMEASURE S by <<
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.