summaryrefslogtreecommitdiff
path: root/tests/fstar/misc
diff options
context:
space:
mode:
authorSon HO2024-03-11 11:10:01 +0100
committerGitHub2024-03-11 11:10:01 +0100
commitc33a9807cf6aa21b2364449ee756ebf93de19eca (patch)
tree3a58f5a619502521d0a6ff7fe2edd139e275f8f1 /tests/fstar/misc
parent14171474f9a4a45874d181cdb6567c7af7dc32cd (diff)
parent157a2364c02293d14b765ebdaec0d2eeae75a1aa (diff)
Merge pull request #88 from AeneasVerif/son/clashes
Improve the name generation for code extraction
Diffstat (limited to '')
-rw-r--r--tests/fstar/misc/Constants.fst58
-rw-r--r--tests/fstar/misc/NoNestedBorrows.fst4
2 files changed, 31 insertions, 31 deletions
diff --git a/tests/fstar/misc/Constants.fst b/tests/fstar/misc/Constants.fst
index 7bf42b46..66429c80 100644
--- a/tests/fstar/misc/Constants.fst
+++ b/tests/fstar/misc/Constants.fst
@@ -8,17 +8,17 @@ open Primitives
(** [constants::X0]
Source: 'src/constants.rs', lines 5:0-5:17 *)
let x0_body : result u32 = Return 0
-let x0_c : u32 = eval_global x0_body
+let x0 : u32 = eval_global x0_body
(** [constants::X1]
Source: 'src/constants.rs', lines 7:0-7:17 *)
let x1_body : result u32 = Return core_u32_max
-let x1_c : u32 = eval_global x1_body
+let x1 : u32 = eval_global x1_body
(** [constants::X2]
Source: 'src/constants.rs', lines 10:0-10:17 *)
let x2_body : result u32 = Return 3
-let x2_c : u32 = eval_global x2_body
+let x2 : u32 = eval_global x2_body
(** [constants::incr]:
Source: 'src/constants.rs', lines 17:0-17:32 *)
@@ -28,12 +28,12 @@ let incr (n : u32) : result u32 =
(** [constants::X3]
Source: 'src/constants.rs', lines 15:0-15:17 *)
let x3_body : result u32 = incr 32
-let x3_c : u32 = eval_global x3_body
+let x3 : u32 = eval_global x3_body
(** [constants::mk_pair0]:
Source: 'src/constants.rs', lines 23:0-23:51 *)
-let mk_pair0 (x : u32) (y : u32) : result (u32 & u32) =
- Return (x, y)
+let mk_pair0 (x : u32) (y1 : u32) : result (u32 & u32) =
+ Return (x, y1)
(** [constants::Pair]
Source: 'src/constants.rs', lines 36:0-36:23 *)
@@ -41,28 +41,28 @@ type pair_t (t1 t2 : Type0) = { x : t1; y : t2; }
(** [constants::mk_pair1]:
Source: 'src/constants.rs', lines 27:0-27:55 *)
-let mk_pair1 (x : u32) (y : u32) : result (pair_t u32 u32) =
- Return { x = x; y = y }
+let mk_pair1 (x : u32) (y1 : u32) : result (pair_t u32 u32) =
+ Return { x = x; y = y1 }
(** [constants::P0]
Source: 'src/constants.rs', lines 31:0-31:24 *)
let p0_body : result (u32 & u32) = mk_pair0 0 1
-let p0_c : (u32 & u32) = eval_global p0_body
+let p0 : (u32 & u32) = eval_global p0_body
(** [constants::P1]
Source: 'src/constants.rs', lines 32:0-32:28 *)
let p1_body : result (pair_t u32 u32) = mk_pair1 0 1
-let p1_c : pair_t u32 u32 = eval_global p1_body
+let p1 : pair_t u32 u32 = eval_global p1_body
(** [constants::P2]
Source: 'src/constants.rs', lines 33:0-33:24 *)
let p2_body : result (u32 & u32) = Return (0, 1)
-let p2_c : (u32 & u32) = eval_global p2_body
+let p2 : (u32 & u32) = eval_global p2_body
(** [constants::P3]
Source: 'src/constants.rs', lines 34:0-34:28 *)
let p3_body : result (pair_t u32 u32) = Return { x = 0; y = 1 }
-let p3_c : pair_t u32 u32 = eval_global p3_body
+let p3 : pair_t u32 u32 = eval_global p3_body
(** [constants::Wrap]
Source: 'src/constants.rs', lines 49:0-49:18 *)
@@ -76,27 +76,27 @@ let wrap_new (t : Type0) (value : t) : result (wrap_t t) =
(** [constants::Y]
Source: 'src/constants.rs', lines 41:0-41:22 *)
let y_body : result (wrap_t i32) = wrap_new i32 2
-let y_c : wrap_t i32 = eval_global y_body
+let y : wrap_t i32 = eval_global y_body
(** [constants::unwrap_y]:
Source: 'src/constants.rs', lines 43:0-43:30 *)
let unwrap_y : result i32 =
- Return y_c.value
+ Return y.value
(** [constants::YVAL]
Source: 'src/constants.rs', lines 47:0-47:19 *)
let yval_body : result i32 = unwrap_y
-let yval_c : i32 = eval_global yval_body
+let yval : i32 = eval_global yval_body
(** [constants::get_z1::Z1]
Source: 'src/constants.rs', lines 62:4-62:17 *)
let get_z1_z1_body : result i32 = Return 3
-let get_z1_z1_c : i32 = eval_global get_z1_z1_body
+let get_z1_z1 : i32 = eval_global get_z1_z1_body
(** [constants::get_z1]:
Source: 'src/constants.rs', lines 61:0-61:28 *)
let get_z1 : result i32 =
- Return get_z1_z1_c
+ Return get_z1_z1
(** [constants::add]:
Source: 'src/constants.rs', lines 66:0-66:39 *)
@@ -106,40 +106,40 @@ let add (a : i32) (b : i32) : result i32 =
(** [constants::Q1]
Source: 'src/constants.rs', lines 74:0-74:17 *)
let q1_body : result i32 = Return 5
-let q1_c : i32 = eval_global q1_body
+let q1 : i32 = eval_global q1_body
(** [constants::Q2]
Source: 'src/constants.rs', lines 75:0-75:17 *)
-let q2_body : result i32 = Return q1_c
-let q2_c : i32 = eval_global q2_body
+let q2_body : result i32 = Return q1
+let q2 : i32 = eval_global q2_body
(** [constants::Q3]
Source: 'src/constants.rs', lines 76:0-76:17 *)
-let q3_body : result i32 = add q2_c 3
-let q3_c : i32 = eval_global q3_body
+let q3_body : result i32 = add q2 3
+let q3 : i32 = eval_global q3_body
(** [constants::get_z2]:
Source: 'src/constants.rs', lines 70:0-70:28 *)
let get_z2 : result i32 =
- let* i = get_z1 in let* i1 = add i q3_c in add q1_c i1
+ let* i = get_z1 in let* i1 = add i q3 in add q1 i1
(** [constants::S1]
Source: 'src/constants.rs', lines 80:0-80:18 *)
let s1_body : result u32 = Return 6
-let s1_c : u32 = eval_global s1_body
+let s1 : u32 = eval_global s1_body
(** [constants::S2]
Source: 'src/constants.rs', lines 81:0-81:18 *)
-let s2_body : result u32 = incr s1_c
-let s2_c : u32 = eval_global s2_body
+let s2_body : result u32 = incr s1
+let s2 : u32 = eval_global s2_body
(** [constants::S3]
Source: 'src/constants.rs', lines 82:0-82:29 *)
-let s3_body : result (pair_t u32 u32) = Return p3_c
-let s3_c : pair_t u32 u32 = eval_global s3_body
+let s3_body : result (pair_t u32 u32) = Return p3
+let s3 : pair_t u32 u32 = eval_global s3_body
(** [constants::S4]
Source: 'src/constants.rs', lines 83:0-83:29 *)
let s4_body : result (pair_t u32 u32) = mk_pair1 7 8
-let s4_c : pair_t u32 u32 = eval_global s4_body
+let s4 : pair_t u32 u32 = eval_global s4_body
diff --git a/tests/fstar/misc/NoNestedBorrows.fst b/tests/fstar/misc/NoNestedBorrows.fst
index ffcc32f3..c71f8dbb 100644
--- a/tests/fstar/misc/NoNestedBorrows.fst
+++ b/tests/fstar/misc/NoNestedBorrows.fst
@@ -131,12 +131,12 @@ let mix_arith_i32 (x : i32) (y : i32) (z : i32) : result i32 =
(** [no_nested_borrows::CONST0]
Source: 'src/no_nested_borrows.rs', lines 125:0-125:23 *)
let const0_body : result usize = usize_add 1 1
-let const0_c : usize = eval_global const0_body
+let const0 : usize = eval_global const0_body
(** [no_nested_borrows::CONST1]
Source: 'src/no_nested_borrows.rs', lines 126:0-126:23 *)
let const1_body : result usize = usize_mul 2 2
-let const1_c : usize = eval_global const1_body
+let const1 : usize = eval_global const1_body
(** [no_nested_borrows::cast_u32_to_i32]:
Source: 'src/no_nested_borrows.rs', lines 128:0-128:37 *)