File tree Expand file tree Collapse file tree 5 files changed +12
-3
lines changed
Expand file tree Collapse file tree 5 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 1919
2020 - name : Download and install Isabelle
2121 run : |
22- wget --quiet https://isabelle.in.tum.de/dist/Isabelle2022_linux.tar.gz
22+ wget --quiet https://isabelle.in.tum.de/website-Isabelle2022/ dist/Isabelle2022_linux.tar.gz
2323 tar -xf Isabelle2022_linux.tar.gz
2424 rm Isabelle2022_linux.tar.gz
2525 mv Isabelle2022 isabelle_dir
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ type_synonym pname = string (* procedure name *)
1111datatype lit = LBool bool | LInt int | LReal real
1212
1313datatype binop = Eq | Neq | Add | Sub | Mul | Div | RealDiv | Mod | Lt | Le | Gt | Ge | And | Or | Imp | Iff
14- datatype unop = Not | UMinus
14+ datatype unop = Not | UMinus | IntToReal
1515
1616datatype prim_ty
1717 = TBool | TInt | TReal
Original file line number Diff line number Diff line change 11theory PassificationML
2- imports Boogie_Lang. Semantics HelperML Passification
2+ imports Semantics HelperML Passification
33begin
44
55ML \<open>
Original file line number Diff line number Diff line change @@ -367,10 +367,16 @@ fun unop_minus :: "lit \<rightharpoonup> lit"
367367 | "unop_minus (LReal r) = Some (LReal (-r))"
368368 | "unop_minus _ = None"
369369
370+ fun unop_int_to_real :: "lit \<rightharpoonup> lit"
371+ where
372+ "unop_int_to_real (LInt i) = Some (LReal (real_of_int i))"
373+ | "unop_int_to_real _ = None"
374+
370375fun unop_eval :: "unop \<Rightarrow> lit \<rightharpoonup> lit"
371376 where
372377 "unop_eval Not v = unop_not v"
373378 | "unop_eval UMinus v = unop_minus v"
379+ | "unop_eval IntToReal v = unop_int_to_real v"
374380
375381fun unop_eval_val :: "unop \<Rightarrow> 'a val \<rightharpoonup> 'a val"
376382 where
Original file line number Diff line number Diff line change @@ -16,6 +16,9 @@ fun unop_type :: "unop \<Rightarrow> prim_ty \<Rightarrow> prim_ty option"
1616 | "unop_type Not TInt = None"
1717 | "unop_type Not TReal = None"
1818 | "unop_type Not TBool = Some TBool"
19+ | "unop_type IntToReal TInt = Some TReal"
20+ | "unop_type IntToReal TReal = None"
21+ | "unop_type IntToReal TBool = None"
1922
2023primrec binop_type :: "binop \<Rightarrow> ((prim_ty \<times> prim_ty) set \<times> prim_ty) option"
2124 where
You can’t perform that action at this time.
0 commit comments