Commit 1aefe837 by MARCHE Claude

trans compute: a few details

parent a78087aa
 ... ... @@ -98,9 +98,11 @@ let eval_equ _ls l _ty = (* let eval_true _ls _l _ty = Term t_true let eval_false _ls _l _ty = Term t_false *) let t_app_value ls l ty = Term (t_app ls (List.map term_of_value l) ty) ... ... @@ -144,10 +146,13 @@ let eval_int_uop op ls l ty = let built_in_theories = [ ["bool"],"Bool", [], [ (* ["bool"],"Bool", [], [ "True", None, eval_true ; "False", None, eval_false ; ] ; *) ["int"],"Int", [], [ "infix +", None, eval_int_op BigInt.add; "infix -", None, eval_int_op BigInt.sub; ... ... @@ -216,7 +221,7 @@ type engine = } (* (* OBSOLETE COMMENT A configuration is a pair (t,s) where t is a stack of terms and s is a stack of function symbols. ... ... @@ -481,8 +486,14 @@ and reduce_eval st t sigma rem = cont_stack = rem; } with Not_found -> Format.eprintf "Tvar not found: %a@." Pretty.print_vs v; assert false (* this may happen, e.g when computing below a quantified formula *) (* Format.eprintf "Tvar not found: %a@." Pretty.print_vs v; assert false *) { value_stack = Term t :: st ; cont_stack = rem; } end | Tif(t1,t2,t3) -> { value_stack = st; ... ...
 theory T theory Test goal g1: true ... ... @@ -11,19 +11,17 @@ theory T goal g11: let x=1 in x=1 end theory TestArith use import int.Int goal h1: 2+2=4 goal h2: 2+(-2)=0 type t = { f : int } goal i1: let x = { f = 4 } in x.f < 5 goal i2: let x = { f = 4 } in match x with { f = y } -> y + 1 > 3 end goal h3: 10 = 0xA function g int : int ... ... @@ -33,8 +31,30 @@ theory T goal j1: g (2+2) = 7 use import int.Power meta "rewrite" prop Power_0 (* not a rule: conditional meta "rewrite" prop Power_s *) goal k1: power 4 3 = 64 end theory TestRecord use import int.Int type t = { f : int } goal i1: let x = { f = 4 } in x.f < 5 goal i2: let x = { f = 4 } in match x with { f = y } -> y + 1 > 3 end end theory TestList ... ... @@ -185,6 +205,10 @@ theory Rinteger meta "rewrite" prop l1 goal g1 : forall y. 2+2 = y goal g2 : forall y. 0 + y + 0 + y - y = y end theory TestInteger ... ...
 ... ... @@ -3,7 +3,7 @@ "http://why3.lri.fr/why3session.dtd"> ... ... @@ -26,6 +26,8 @@ ... ... @@ -34,15 +36,23 @@ ... ... @@ -73,47 +83,47 @@ ... ... @@ -126,8 +136,8 @@ ... ... @@ -136,18 +146,26 @@ ... ... @@ -164,32 +182,32 @@ ... ...
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment