Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/PVS/while/     Datei vom 28.9.2014 mit Größe 1 kB image not shown  

Quelle  direct.pvs   Sprache: PVS

 

%------------------------------------------------------------------------------
% A Direct 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
%------------------------------------------------------------------------------

direct[V:TYPE+]: THEORY

BEGIN

  IMPORTING AExp[V], BExp[V], State[V], Stm[V], Cont[V],
            scott@partial_function_props[State,State],
            scott@fixpoints[Cont,(sq_le)]

  s: VAR State
  S: VAR Stm
  c: VAR Cont

  SS(S) : RECURSIVE Cont =
    cases S of
      Assign(x,a)          : (LAMBDA s: up(assign(x,A(a))(s))),
      Skip                 : (LAMBDA s: up(s)),
      Sequence(S1,S2)      : SS(S2) o SS(S1),
      Conditional(b,S1,S2) : conditional(B(b),SS(S1),SS(S2)),
      While(b,S1)          : fix(LAMBDA c: conditional(B(b), c o SS(S1),
                                           LAMBDA s: up(s)))
    endcases MEASURE S by <<

END direct

Messung
CHZG
8210010094

¤ Dauer der Verarbeitung: 0.0 Sekunden  (vorverarbeitet am  2026-11-24) ¤

*© Formatika GbR, Deutschland