view paper/src/agda-hoare-term.agda.replaced @ 19:046b2b20d6c7 default tip

fix
author ryokka
date Mon, 09 Mar 2020 11:25:49 +0900
parents
children
line wrap: on
line source

loopP' : {l : Level} {t : Set l} @$\rightarrow$@ Envc @$\rightarrow$@ (exit : Envc @$\rightarrow$@ t) @$\rightarrow$@ t
loopP' record { c10 = c10 ; varn = zero ; vari = vari } exit =
  exit (record { c10 = c10 ; varn = zero ; vari = vari })
loopP' record { c10 = c10 ; varn = (suc varn@$\_{1}$@) ; vari = vari } exit =
  whileLoopP' (record { c10 = c10 ; varn = (suc varn@$\_{1}$@) ; vari = vari })
  (@$\lambda$@ env @$\rightarrow$@ loopP' (record { c10 = c10 ; varn = varn@$\_{1}$@ ; vari = vari }) exit ) exit

whileTestPCall' : (c10 :  @$\mathbb{N}$@ ) @$\rightarrow$@ Envc
whileTestPCall' c10 = whileTestP' {_} {_} c10 (@$\lambda$@ env @$\rightarrow$@ loopP' env (@$\lambda$@ env @$\rightarrow$@  env))

-- whileTestP' 10
-- record { c10 = 10 ; varn = 0 ; vari = 10 }