"[ me ⊨ (b1,c1) → (bv1,c2); me ⊨ (b2,c2) → (bv2,c3) ]==> me ⊨ (And b1 b2,c1) → (bv1∧bv2,c3)" |
"[ me ⊨ (e1,c1) ==> (r1,c2); me ⊨ (e2,c2) ==> (r2,c3) ]==> me ⊨ (Eq e1 e2,c1) → (r1=r2,c3)"
code_pred (modes: i => i => o => bool) big_step .
text‹Example: natural numbers encoded as objects with a predecessor
. Null is zero. Method succ adds an object in front, method add
as many objects in front as the parameter specifies.
, the method bodies:›
definition "m_succ = (''s'' ::= New)∙''pred'' ::= V ''this''; V ''s''"
definition"m_add = IF Eq (V ''param'') Null THEN V ''this'' ELSE V ''this''∙''succ''<Null>∙''add''<V ''param''∙''pred''>"
text‹The main code, adding 1 and 2:› definition"main = ''1'' ::= Null∙''succ''<Null>; ''2'' ::= V ''1''∙''succ''<Null>; V ''2'' ∙ ''add'' <V ''1''>"
text‹Execution of semantics. The final variable environment and store are
into lists of references based on given lists of variable and field
to extract.›
values "{(r, map ve' [''1'',''2''], map (λn. map (s' n)[''pred'']) [0..<n])| r ve' s' n. menv ⊨ (main, λx. null, nth[], 0) ==> (r,ve',s',n)}"
end
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.9 Sekunden
(vorverarbeitet am 2026-06-09)
¤
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 und die Messung sind noch experimentell.