equal
deleted
inserted
replaced
|
1 (* Title: HOL/IMP/Den2.ML |
|
2 ID: $Id$ |
|
3 Author: Tobias Nipkow & Robert Sandner, TUM |
|
4 Copyright 1996 TUM |
|
5 |
|
6 Denotational semantics of commands in HOLCF |
|
7 *) |
|
8 |
|
9 Denotational = HOLCF + Natural + |
|
10 |
|
11 consts D :: "com => state lift -> state lift" |
|
12 |
|
13 primrec D com |
|
14 "D(SKIP) = (LAM s. s)" |
|
15 "D(X := a) = flift1(%s. Def(s[a(s)/X]))" |
|
16 "D(c0 ; c1) = ((D c1) oo (D c0))" |
|
17 "D(IF b THEN c1 ELSE c2) = |
|
18 flift1(%s . if b s then (D c1)`(Def s) else (D c2)`(Def s))" |
|
19 "D(WHILE b DO c) = |
|
20 fix`(LAM w. flift1(%s. if b s then w`((D c)`(Def s)) else Def s))" |
|
21 |
|
22 end |