annotate paper/src/agda-hoare-interpret.agda.replaced @ 14:a63df15c9afc default tip

DONE
author soto <soto@cr.ie.u-ryukyu.ac.jp>
date Mon, 15 Feb 2021 23:36:39 +0900
parents 959f4b34d6f4
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
1 {-@$\#$@ TERMINATING @$\#$@-}
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
2 interpret : Env @$\rightarrow$@ Comm @$\rightarrow$@ Env
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
3 interpret env Skip = env
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
4 interpret env Abort = env
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
5 interpret env (PComm x) = x env
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
6 interpret env (Seq comm comm1) = interpret (interpret env comm) comm1
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
7 interpret env (If x then else) with x env
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
8 ... | true = interpret env then
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
9 ... | false = interpret env else
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
10 interpret env (While x comm) with x env
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
11 ... | true = interpret (interpret env comm) (While x comm)
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
12 ... | false = env
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
13