Mercurial > hg > Papers > 2020 > soto-midterm
diff src/agda-hoare-rule.agda.replaced @ 1:73127e0ab57c
(none)
author | soto@cr.ie.u-ryukyu.ac.jp |
---|---|
date | Tue, 08 Sep 2020 18:38:08 +0900 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/agda-hoare-rule.agda.replaced Tue Sep 08 18:38:08 2020 +0900 @@ -0,0 +1,27 @@ +data HTProof : Cond @$\rightarrow$@ Comm @$\rightarrow$@ Cond @$\rightarrow$@ Set where + PrimRule : {bPre : Cond} @$\rightarrow$@ {pcm : PrimComm} @$\rightarrow$@ {bPost : Cond} @$\rightarrow$@ + (pr : Axiom bPre pcm bPost) @$\rightarrow$@ + HTProof bPre (PComm pcm) bPost + SkipRule : (b : Cond) @$\rightarrow$@ HTProof b Skip b + AbortRule : (bPre : Cond) @$\rightarrow$@ (bPost : Cond) @$\rightarrow$@ + HTProof bPre Abort bPost + WeakeningRule : {bPre : Cond} @$\rightarrow$@ {bPre' : Cond} @$\rightarrow$@ {cm : Comm} @$\rightarrow$@ + {bPost' : Cond} @$\rightarrow$@ {bPost : Cond} @$\rightarrow$@ + Tautology bPre bPre' @$\rightarrow$@ + HTProof bPre' cm bPost' @$\rightarrow$@ + Tautology bPost' bPost @$\rightarrow$@ + HTProof bPre cm bPost + SeqRule : {bPre : Cond} @$\rightarrow$@ {cm1 : Comm} @$\rightarrow$@ {bMid : Cond} @$\rightarrow$@ + {cm2 : Comm} @$\rightarrow$@ {bPost : Cond} @$\rightarrow$@ + HTProof bPre cm1 bMid @$\rightarrow$@ + HTProof bMid cm2 bPost @$\rightarrow$@ + HTProof bPre (Seq cm1 cm2) bPost + IfRule : {cmThen : Comm} @$\rightarrow$@ {cmElse : Comm} @$\rightarrow$@ + {bPre : Cond} @$\rightarrow$@ {bPost : Cond} @$\rightarrow$@ + {b : Cond} @$\rightarrow$@ + HTProof (bPre @$\wedge$@ b) cmThen bPost @$\rightarrow$@ + HTProof (bPre @$\wedge$@ neg b) cmElse bPost @$\rightarrow$@ + HTProof bPre (If b cmThen cmElse) bPost + WhileRule : {cm : Comm} @$\rightarrow$@ {bInv : Cond} @$\rightarrow$@ {b : Cond} @$\rightarrow$@ + HTProof (bInv @$\wedge$@ b) cm bInv @$\rightarrow$@ + HTProof bInv (While b cm) (bInv @$\wedge$@ neg b)