From 7703c4ca86a390303d0a120f8811c8fd704c5168 Mon Sep 17 00:00:00 2001 From: Sidney Congard Date: Tue, 21 Jun 2022 11:41:09 +0200 Subject: concrete & symbolic evaluation work with new LLBC format --- tests/misc/Constants.fst | 119 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 119 insertions(+) create mode 100644 tests/misc/Constants.fst (limited to 'tests/misc') diff --git a/tests/misc/Constants.fst b/tests/misc/Constants.fst new file mode 100644 index 00000000..9611c778 --- /dev/null +++ b/tests/misc/Constants.fst @@ -0,0 +1,119 @@ +(** THIS FILE WAS AUTOMATICALLY GENERATED BY AENEAS *) +(** [constants] *) +module Constants +open Primitives + +#set-options "--z3rlimit 50 --fuel 1 --ifuel 1" + +(** [constants::X0] *) +let x0_fwd : result u32 = Return 0 + +(** [core::num::u32::{8}::MAX] *) +assume val core_num_u32_max_fwd : result u32 + +(** [constants::X1] *) +let x1_fwd : result u32 = Return 4294967295 + +(** [constants::X2] *) +let x2_fwd : result u32 = Return 3 + +(** [constants::incr] *) +let incr_fwd (n : u32) : result u32 = + begin match u32_add n 1 with | Fail -> Fail | Return i -> Return i end + +(** [constants::X3] *) +let x3_fwd : result u32 = + begin match incr_fwd 32 with | Fail -> Fail | Return i -> Return i end + +(** [constants::mk_pair0] *) +let mk_pair0_fwd (x : u32) (y : u32) : result (u32 & u32) = Return (x, y) + +(** [constants::Pair] *) +type pair_t (t1 t2 : Type0) = { pair_x : t1; pair_y : t2; } + +(** [constants::mk_pair1] *) +let mk_pair1_fwd (x : u32) (y : u32) : result (pair_t u32 u32) = + Return (Mkpair_t x y) + +(** [constants::P0] *) +let p0_fwd : result (u32 & u32) = + begin match mk_pair0_fwd 0 1 with | Fail -> Fail | Return p -> Return p end + +(** [constants::P1] *) +let p1_fwd : result (pair_t u32 u32) = + begin match mk_pair1_fwd 0 1 with | Fail -> Fail | Return p -> Return p end + +(** [constants::P2] *) +let p2_fwd : result (u32 & u32) = Return (0, 1) + +(** [constants::P3] *) +let p3_fwd : result (pair_t u32 u32) = Return (Mkpair_t 0 1) + +(** [constants::Wrap] *) +type wrap_t (t : Type0) = { wrap_val : t; } + +(** [constants::Wrap::{0}::new] *) +let wrap_new_fwd (t : Type0) (val0 : t) : result (wrap_t t) = + Return (Mkwrap_t val0) + +(** [constants::Y] *) +let y_fwd : result (wrap_t i32) = + begin match wrap_new_fwd i32 2 with | Fail -> Fail | Return w -> Return w end + +(** [constants::unwrap_y] *) +let unwrap_y_fwd : result i32 = + begin match y_fwd with | Fail -> Fail | Return w -> Return w.wrap_val end + +(** [constants::YVAL] *) +let yval_fwd : result i32 = + begin match unwrap_y_fwd with | Fail -> Fail | Return i -> Return i end + +(** [constants::get_z1::Z1] *) +let get_z1_z1_fwd : result i32 = Return 3 + +(** [constants::get_z1] *) +let get_z1_fwd : result i32 = + begin match get_z1_z1_fwd with | Fail -> Fail | Return i -> Return i end + +(** [constants::add] *) +let add_fwd (a : i32) (b : i32) : result i32 = + begin match i32_add a b with | Fail -> Fail | Return i -> Return i end + +(** [constants::Q1] *) +let q1_fwd : result i32 = Return 5 + +(** [constants::Q2] *) +let q2_fwd : result i32 = + begin match q1_fwd with | Fail -> Fail | Return i -> Return i end + +(** [constants::Q3] *) +let q3_fwd : result i32 = + begin match q2_fwd with + | Fail -> Fail + | Return i -> + begin match add_fwd i 3 with | Fail -> Fail | Return i0 -> Return i0 end + end + +(** [constants::get_z2] *) +let get_z2_fwd : result i32 = + begin match get_z1_fwd with + | Fail -> Fail + | Return i -> + begin match q3_fwd with + | Fail -> Fail + | Return i0 -> + begin match add_fwd i i0 with + | Fail -> Fail + | Return i1 -> + begin match q1_fwd with + | Fail -> Fail + | Return i2 -> + begin match add_fwd i2 i1 with + | Fail -> Fail + | Return i3 -> Return i3 + end + end + end + end + end + -- cgit v1.2.3 From da118da3e590fbea4e880121837da2ee938837f6 Mon Sep 17 00:00:00 2001 From: Sidney Congard Date: Thu, 23 Jun 2022 15:43:49 +0200 Subject: adapt to new LLBC (without OperandConstantValue) --- tests/misc/Constants.fst | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'tests/misc') diff --git a/tests/misc/Constants.fst b/tests/misc/Constants.fst index 9611c778..28a9ace7 100644 --- a/tests/misc/Constants.fst +++ b/tests/misc/Constants.fst @@ -117,3 +117,22 @@ let get_z2_fwd : result i32 = end end +(** [constants::S1] *) +let s1_fwd : result u32 = Return 6 + +(** [constants::S2] *) +let s2_fwd : result u32 = + begin match s1_fwd with + | Fail -> Fail + | Return i -> + begin match incr_fwd i with | Fail -> Fail | Return i0 -> Return i0 end + end + +(** [constants::S3] *) +let s3_fwd : result (pair_t u32 u32) = + begin match p3_fwd with | Fail -> Fail | Return p -> Return p end + +(** [constants::S4] *) +let s4_fwd : result (pair_t u32 u32) = + begin match mk_pair1_fwd 7 8 with | Fail -> Fail | Return p -> Return p end + -- cgit v1.2.3 From 47691de8fe3dc32a29663d4d8343eb415ce1d81e Mon Sep 17 00:00:00 2001 From: Sidney Congard Date: Thu, 30 Jun 2022 12:22:14 +0200 Subject: Traduct globals body separately (WIP) --- tests/misc/Constants.fst | 129 +--------------------------------------------- tests/misc/Primitives.fst | 3 ++ 2 files changed, 4 insertions(+), 128 deletions(-) (limited to 'tests/misc') diff --git a/tests/misc/Constants.fst b/tests/misc/Constants.fst index 28a9ace7..8419ba43 100644 --- a/tests/misc/Constants.fst +++ b/tests/misc/Constants.fst @@ -5,134 +5,7 @@ open Primitives #set-options "--z3rlimit 50 --fuel 1 --ifuel 1" -(** [constants::X0] *) -let x0_fwd : result u32 = Return 0 - -(** [core::num::u32::{8}::MAX] *) -assume val core_num_u32_max_fwd : result u32 - -(** [constants::X1] *) -let x1_fwd : result u32 = Return 4294967295 - -(** [constants::X2] *) -let x2_fwd : result u32 = Return 3 - (** [constants::incr] *) -let incr_fwd (n : u32) : result u32 = +let incr_fwd (n : u32) : u32 = begin match u32_add n 1 with | Fail -> Fail | Return i -> Return i end -(** [constants::X3] *) -let x3_fwd : result u32 = - begin match incr_fwd 32 with | Fail -> Fail | Return i -> Return i end - -(** [constants::mk_pair0] *) -let mk_pair0_fwd (x : u32) (y : u32) : result (u32 & u32) = Return (x, y) - -(** [constants::Pair] *) -type pair_t (t1 t2 : Type0) = { pair_x : t1; pair_y : t2; } - -(** [constants::mk_pair1] *) -let mk_pair1_fwd (x : u32) (y : u32) : result (pair_t u32 u32) = - Return (Mkpair_t x y) - -(** [constants::P0] *) -let p0_fwd : result (u32 & u32) = - begin match mk_pair0_fwd 0 1 with | Fail -> Fail | Return p -> Return p end - -(** [constants::P1] *) -let p1_fwd : result (pair_t u32 u32) = - begin match mk_pair1_fwd 0 1 with | Fail -> Fail | Return p -> Return p end - -(** [constants::P2] *) -let p2_fwd : result (u32 & u32) = Return (0, 1) - -(** [constants::P3] *) -let p3_fwd : result (pair_t u32 u32) = Return (Mkpair_t 0 1) - -(** [constants::Wrap] *) -type wrap_t (t : Type0) = { wrap_val : t; } - -(** [constants::Wrap::{0}::new] *) -let wrap_new_fwd (t : Type0) (val0 : t) : result (wrap_t t) = - Return (Mkwrap_t val0) - -(** [constants::Y] *) -let y_fwd : result (wrap_t i32) = - begin match wrap_new_fwd i32 2 with | Fail -> Fail | Return w -> Return w end - -(** [constants::unwrap_y] *) -let unwrap_y_fwd : result i32 = - begin match y_fwd with | Fail -> Fail | Return w -> Return w.wrap_val end - -(** [constants::YVAL] *) -let yval_fwd : result i32 = - begin match unwrap_y_fwd with | Fail -> Fail | Return i -> Return i end - -(** [constants::get_z1::Z1] *) -let get_z1_z1_fwd : result i32 = Return 3 - -(** [constants::get_z1] *) -let get_z1_fwd : result i32 = - begin match get_z1_z1_fwd with | Fail -> Fail | Return i -> Return i end - -(** [constants::add] *) -let add_fwd (a : i32) (b : i32) : result i32 = - begin match i32_add a b with | Fail -> Fail | Return i -> Return i end - -(** [constants::Q1] *) -let q1_fwd : result i32 = Return 5 - -(** [constants::Q2] *) -let q2_fwd : result i32 = - begin match q1_fwd with | Fail -> Fail | Return i -> Return i end - -(** [constants::Q3] *) -let q3_fwd : result i32 = - begin match q2_fwd with - | Fail -> Fail - | Return i -> - begin match add_fwd i 3 with | Fail -> Fail | Return i0 -> Return i0 end - end - -(** [constants::get_z2] *) -let get_z2_fwd : result i32 = - begin match get_z1_fwd with - | Fail -> Fail - | Return i -> - begin match q3_fwd with - | Fail -> Fail - | Return i0 -> - begin match add_fwd i i0 with - | Fail -> Fail - | Return i1 -> - begin match q1_fwd with - | Fail -> Fail - | Return i2 -> - begin match add_fwd i2 i1 with - | Fail -> Fail - | Return i3 -> Return i3 - end - end - end - end - end - -(** [constants::S1] *) -let s1_fwd : result u32 = Return 6 - -(** [constants::S2] *) -let s2_fwd : result u32 = - begin match s1_fwd with - | Fail -> Fail - | Return i -> - begin match incr_fwd i with | Fail -> Fail | Return i0 -> Return i0 end - end - -(** [constants::S3] *) -let s3_fwd : result (pair_t u32 u32) = - begin match p3_fwd with | Fail -> Fail | Return p -> Return p end - -(** [constants::S4] *) -let s4_fwd : result (pair_t u32 u32) = - begin match mk_pair1_fwd 7 8 with | Fail -> Fail | Return p -> Return p end - diff --git a/tests/misc/Primitives.fst b/tests/misc/Primitives.fst index fe351f3a..b3da25c2 100644 --- a/tests/misc/Primitives.fst +++ b/tests/misc/Primitives.fst @@ -34,6 +34,9 @@ let bind (#a #b : Type0) (m : result a) (f : a -> result b) : result b = // Monadic assert(...) let massert (b:bool) : result unit = if b then Return () else Fail +// Unwrap a successful result by normalisation (used for globals). +let eval_global (#a : Type0) (x : result a{Return? (normalize_term x)}) : a = Return?.v x + (*** Misc *) type char = FStar.Char.char type string = string -- cgit v1.2.3 From f9015d1e956ace6c875eb6a631caeac49cfb8148 Mon Sep 17 00:00:00 2001 From: Sidney Congard Date: Fri, 29 Jul 2022 16:04:49 +0200 Subject: Create global declaration group, address PR changes but introduce bugs --- tests/misc/Constants.fst | 135 ----------------------------------------------- 1 file changed, 135 deletions(-) (limited to 'tests/misc') diff --git a/tests/misc/Constants.fst b/tests/misc/Constants.fst index 06425e64..e1a942a0 100644 --- a/tests/misc/Constants.fst +++ b/tests/misc/Constants.fst @@ -4,138 +4,3 @@ module Constants open Primitives #set-options "--z3rlimit 50 --fuel 1 --ifuel 1" - -(** [constants::X0] *) -let x0_body : result u32 = Return 0 -let x0_c : u32 = eval_global x0_body - -(** [core::num::u32::{8}::MAX] *) -let core_num_u32_max_body : result u32 = Return 4294967295 -let core_num_u32_max_c : u32 = eval_global core_num_u32_max_body - -(** [constants::X1] *) -let x1_body : result u32 = let i = core_num_u32_max_c in Return i -let x1_c : u32 = eval_global x1_body - -(** [constants::X2] *) -let x2_body : result u32 = Return 3 -let x2_c : u32 = eval_global x2_body - -(** [constants::incr] *) -let incr_fwd (n : u32) : result u32 = - begin match u32_add n 1 with | Fail -> Fail | Return i -> Return i end - -(** [constants::X3] *) -let x3_body : result u32 = - begin match incr_fwd 32 with | Fail -> Fail | Return i -> Return i end -let x3_c : u32 = eval_global x3_body - -(** [constants::mk_pair0] *) -let mk_pair0_fwd (x : u32) (y : u32) : result (u32 & u32) = Return (x, y) - -(** [constants::Pair] *) -type pair_t (t1 t2 : Type0) = { pair_x : t1; pair_y : t2; } - -(** [constants::mk_pair1] *) -let mk_pair1_fwd (x : u32) (y : u32) : result (pair_t u32 u32) = - Return (Mkpair_t x y) - -(** [constants::P0] *) -let p0_body : result (u32 & u32) = - begin match mk_pair0_fwd 0 1 with | Fail -> Fail | Return p -> Return p end -let p0_c : (u32 & u32) = eval_global p0_body - -(** [constants::P1] *) -let p1_body : result (pair_t u32 u32) = - begin match mk_pair1_fwd 0 1 with | Fail -> Fail | Return p -> Return p end -let p1_c : pair_t u32 u32 = eval_global p1_body - -(** [constants::P2] *) -let p2_body : result (u32 & u32) = Return (0, 1) -let p2_c : (u32 & u32) = eval_global p2_body - -(** [constants::P3] *) -let p3_body : result (pair_t u32 u32) = Return (Mkpair_t 0 1) -let p3_c : pair_t u32 u32 = eval_global p3_body - -(** [constants::Wrap] *) -type wrap_t (t : Type0) = { wrap_val : t; } - -(** [constants::Wrap::{0}::new] *) -let wrap_new_fwd (t : Type0) (val0 : t) : result (wrap_t t) = - Return (Mkwrap_t val0) - -(** [constants::Y] *) -let y_body : result (wrap_t i32) = - begin match wrap_new_fwd i32 2 with | Fail -> Fail | Return w -> Return w end -let y_c : wrap_t i32 = eval_global y_body - -(** [constants::unwrap_y] *) -let unwrap_y_fwd : result i32 = let w = y_c in Return w.wrap_val - -(** [constants::YVAL] *) -let yval_body : result i32 = - begin match unwrap_y_fwd with | Fail -> Fail | Return i -> Return i end -let yval_c : i32 = eval_global yval_body - -(** [constants::get_z1::Z1] *) -let get_z1_z1_body : result i32 = Return 3 -let get_z1_z1_c : i32 = eval_global get_z1_z1_body - -(** [constants::get_z1] *) -let get_z1_fwd : result i32 = let i = get_z1_z1_c in Return i - -(** [constants::add] *) -let add_fwd (a : i32) (b : i32) : result i32 = - begin match i32_add a b with | Fail -> Fail | Return i -> Return i end - -(** [constants::Q1] *) -let q1_body : result i32 = Return 5 -let q1_c : i32 = eval_global q1_body - -(** [constants::Q2] *) -let q2_body : result i32 = let i = q1_c in Return i -let q2_c : i32 = eval_global q2_body - -(** [constants::Q3] *) -let q3_body : result i32 = - let i = q2_c in - begin match add_fwd i 3 with | Fail -> Fail | Return i0 -> Return i0 end -let q3_c : i32 = eval_global q3_body - -(** [constants::get_z2] *) -let get_z2_fwd : result i32 = - begin match get_z1_fwd with - | Fail -> Fail - | Return i -> - let i0 = q3_c in - begin match add_fwd i i0 with - | Fail -> Fail - | Return i1 -> - let i2 = q1_c in - begin match add_fwd i2 i1 with - | Fail -> Fail - | Return i3 -> Return i3 - end - end - end - -(** [constants::S1] *) -let s1_body : result u32 = Return 6 -let s1_c : u32 = eval_global s1_body - -(** [constants::S2] *) -let s2_body : result u32 = - let i = s1_c in - begin match incr_fwd i with | Fail -> Fail | Return i0 -> Return i0 end -let s2_c : u32 = eval_global s2_body - -(** [constants::S3] *) -let s3_body : result (pair_t u32 u32) = let p = p3_c in Return p -let s3_c : pair_t u32 u32 = eval_global s3_body - -(** [constants::S4] *) -let s4_body : result (pair_t u32 u32) = - begin match mk_pair1_fwd 7 8 with | Fail -> Fail | Return p -> Return p end -let s4_c : pair_t u32 u32 = eval_global s4_body - -- cgit v1.2.3 From 3c5fb260012ee8bb8b9fd90bc4624d893ac7678a Mon Sep 17 00:00:00 2001 From: Sidney Congard Date: Mon, 8 Aug 2022 15:16:14 +0200 Subject: Register global names, one error remaining --- tests/misc/Constants.fst | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tests/misc') diff --git a/tests/misc/Constants.fst b/tests/misc/Constants.fst index e1a942a0..f5bd41cb 100644 --- a/tests/misc/Constants.fst +++ b/tests/misc/Constants.fst @@ -4,3 +4,13 @@ module Constants open Primitives #set-options "--z3rlimit 50 --fuel 1 --ifuel 1" + +(** [constants::X0] *) +let x0_body : result u32 = Return 0 +let x0_c : u32 = eval_global x0_body + +(** [core::num::u32::{8}::MAX] *) +let core_num_u32_max_body : result u32 = Return 4294967295 +let core_num_u32_max_c : u32 = eval_global core_num_u32_max_body + +(** [constants::X1] *) \ No newline at end of file -- cgit v1.2.3 From cd754eabe3af025ca3465c5fc6d8cb48da66a1ae Mon Sep 17 00:00:00 2001 From: Sidney Congard Date: Wed, 10 Aug 2022 18:56:25 +0200 Subject: Corrected translation without using functions, remaining bug in hashmap translation --- tests/misc/Constants.fst | 123 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 122 insertions(+), 1 deletion(-) (limited to 'tests/misc') diff --git a/tests/misc/Constants.fst b/tests/misc/Constants.fst index f5bd41cb..5cfb82d6 100644 --- a/tests/misc/Constants.fst +++ b/tests/misc/Constants.fst @@ -13,4 +13,125 @@ let x0_c : u32 = eval_global x0_body let core_num_u32_max_body : result u32 = Return 4294967295 let core_num_u32_max_c : u32 = eval_global core_num_u32_max_body -(** [constants::X1] *) \ No newline at end of file +(** [constants::X1] *) +let x1_body : result u32 = Return core_num_u32_max_c +let x1_c : u32 = eval_global x1_body + +(** [constants::X2] *) +let x2_body : result u32 = Return 3 +let x2_c : u32 = eval_global x2_body + +(** [constants::incr] *) +let incr_fwd (n : u32) : result u32 = + begin match u32_add n 1 with | Fail -> Fail | Return i -> Return i end + +(** [constants::X3] *) +let x3_body : result u32 = + begin match incr_fwd 32 with | Fail -> Fail | Return i -> Return i end +let x3_c : u32 = eval_global x3_body + +(** [constants::mk_pair0] *) +let mk_pair0_fwd (x : u32) (y0 : u32) : result (u32 & u32) = Return (x, y0) + +(** [constants::Pair] *) +type pair_t (t1 t2 : Type0) = { pair_x : t1; pair_y : t2; } + +(** [constants::mk_pair1] *) +let mk_pair1_fwd (x : u32) (y0 : u32) : result (pair_t u32 u32) = + Return (Mkpair_t x y0) + +(** [constants::P0] *) +let p0_body : result (u32 & u32) = + begin match mk_pair0_fwd 0 1 with | Fail -> Fail | Return p -> Return p end +let p0_c : (u32 & u32) = eval_global p0_body + +(** [constants::P1] *) +let p1_body : result (pair_t u32 u32) = + begin match mk_pair1_fwd 0 1 with | Fail -> Fail | Return p -> Return p end +let p1_c : pair_t u32 u32 = eval_global p1_body + +(** [constants::P2] *) +let p2_body : result (u32 & u32) = Return (0, 1) +let p2_c : (u32 & u32) = eval_global p2_body + +(** [constants::P3] *) +let p3_body : result (pair_t u32 u32) = Return (Mkpair_t 0 1) +let p3_c : pair_t u32 u32 = eval_global p3_body + +(** [constants::Wrap] *) +type wrap_t (t : Type0) = { wrap_val : t; } + +(** [constants::Wrap::{0}::new] *) +let wrap_new_fwd (t : Type0) (val0 : t) : result (wrap_t t) = + Return (Mkwrap_t val0) + +(** [constants::Y] *) +let y_body : result (wrap_t i32) = + begin match wrap_new_fwd i32 2 with | Fail -> Fail | Return w -> Return w end +let y_c : wrap_t i32 = eval_global y_body + +(** [constants::unwrap_y] *) +let unwrap_y_fwd : result i32 = Return y_c.wrap_val + +(** [constants::YVAL] *) +let yval_body : result i32 = + begin match unwrap_y_fwd with | Fail -> Fail | Return i -> Return i end +let yval_c : i32 = eval_global yval_body + +(** [constants::get_z1::Z1] *) +let get_z1_z1_body : result i32 = Return 3 +let get_z1_z1_c : i32 = eval_global get_z1_z1_body + +(** [constants::get_z1] *) +let get_z1_fwd : result i32 = Return get_z1_z1_c + +(** [constants::add] *) +let add_fwd (a : i32) (b : i32) : result i32 = + begin match i32_add a b with | Fail -> Fail | Return i -> Return i end + +(** [constants::Q1] *) +let q1_body : result i32 = Return 5 +let q1_c : i32 = eval_global q1_body + +(** [constants::Q2] *) +let q2_body : result i32 = Return q1_c +let q2_c : i32 = eval_global q2_body + +(** [constants::Q3] *) +let q3_body : result i32 = + begin match add_fwd q2_c 3 with | Fail -> Fail | Return i -> Return i end +let q3_c : i32 = eval_global q3_body + +(** [constants::get_z2] *) +let get_z2_fwd : result i32 = + begin match get_z1_fwd with + | Fail -> Fail + | Return i -> + begin match add_fwd i q3_c with + | Fail -> Fail + | Return i0 -> + begin match add_fwd q1_c i0 with + | Fail -> Fail + | Return i1 -> Return i1 + end + end + end + +(** [constants::S1] *) +let s1_body : result u32 = Return 6 +let s1_c : u32 = eval_global s1_body + +(** [constants::S2] *) +let s2_body : result u32 = + begin match incr_fwd s1_c with | Fail -> Fail | Return i -> Return i end +let s2_c : u32 = eval_global s2_body + +(** [constants::S3] *) +let s3_body : result (pair_t u32 u32) = Return p3_c +let s3_c : pair_t u32 u32 = eval_global s3_body + +(** [constants::S4] *) +let s4_body : result (pair_t u32 u32) = + begin match mk_pair1_fwd 7 8 with | Fail -> Fail | Return p -> Return p end +let s4_c : pair_t u32 u32 = eval_global s4_body + -- cgit v1.2.3 From e7f76a4e46f24f54e5b49efee40e33e11128f49c Mon Sep 17 00:00:00 2001 From: Sidney Congard Date: Thu, 11 Aug 2022 18:04:10 +0200 Subject: Correct last PR remarks --- tests/misc/Constants.fst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/misc') diff --git a/tests/misc/Constants.fst b/tests/misc/Constants.fst index 5cfb82d6..4a9a0e48 100644 --- a/tests/misc/Constants.fst +++ b/tests/misc/Constants.fst @@ -31,14 +31,14 @@ let x3_body : result u32 = let x3_c : u32 = eval_global x3_body (** [constants::mk_pair0] *) -let mk_pair0_fwd (x : u32) (y0 : u32) : result (u32 & u32) = Return (x, y0) +let mk_pair0_fwd (x : u32) (y : u32) : result (u32 & u32) = Return (x, y) (** [constants::Pair] *) type pair_t (t1 t2 : Type0) = { pair_x : t1; pair_y : t2; } (** [constants::mk_pair1] *) -let mk_pair1_fwd (x : u32) (y0 : u32) : result (pair_t u32 u32) = - Return (Mkpair_t x y0) +let mk_pair1_fwd (x : u32) (y : u32) : result (pair_t u32 u32) = + Return (Mkpair_t x y) (** [constants::P0] *) let p0_body : result (u32 & u32) = -- cgit v1.2.3 From e18bf82b0931a7fd8a357a8516ef8618d77d42cf Mon Sep 17 00:00:00 2001 From: Son Ho Date: Thu, 22 Sep 2022 17:27:24 +0200 Subject: Regenerate the translated files --- tests/misc/Primitives.fst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/misc') diff --git a/tests/misc/Primitives.fst b/tests/misc/Primitives.fst index b3da25c2..b44fe9d1 100644 --- a/tests/misc/Primitives.fst +++ b/tests/misc/Primitives.fst @@ -34,7 +34,7 @@ let bind (#a #b : Type0) (m : result a) (f : a -> result b) : result b = // Monadic assert(...) let massert (b:bool) : result unit = if b then Return () else Fail -// Unwrap a successful result by normalisation (used for globals). +// Normalize and unwrap a successful result (used for globals). let eval_global (#a : Type0) (x : result a{Return? (normalize_term x)}) : a = Return?.v x (*** Misc *) -- cgit v1.2.3