Mercurial > hg > Papers > 2023 > soto-master
annotate Paper/src/agda-hoare-interpret.agda @ 1:a72446879486
Init paper
author | soto <soto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 12 Jan 2023 20:28:50 +0900 |
parents | |
children |
rev | line source |
---|---|
1 | 1 {-# TERMINATING #-} |
2 interpret : Env → Comm → Env | |
3 interpret env Skip = env | |
4 interpret env Abort = env | |
5 interpret env (PComm x) = x env | |
6 interpret env (Seq comm comm1) = interpret (interpret env comm) comm1 | |
7 interpret env (If x then else) with x env | |
8 ... | true = interpret env then | |
9 ... | false = interpret env else | |
10 interpret env (While x comm) with x env | |
11 ... | true = interpret (interpret env comm) (While x comm) | |
12 ... | false = env | |
13 |