effect
stringclasses
48 values
original_source_type
stringlengths
0
23k
opens_and_abbrevs
listlengths
2
92
isa_cross_project_example
bool
1 class
source_definition
stringlengths
9
57.9k
partial_definition
stringlengths
7
23.3k
is_div
bool
2 classes
is_type
null
is_proof
bool
2 classes
completed_definiton
stringlengths
1
250k
dependencies
dict
effect_flags
sequencelengths
0
2
ideal_premises
sequencelengths
0
236
mutual_with
sequencelengths
0
11
file_context
stringlengths
0
407k
interleaved
bool
1 class
is_simply_typed
bool
2 classes
file_name
stringlengths
5
48
vconfig
dict
is_simple_lemma
null
source_type
stringlengths
10
23k
proof_features
sequencelengths
0
1
name
stringlengths
8
95
source
dict
verbose_type
stringlengths
1
7.42k
source_range
dict
Prims.Tot
[ { "abbrev": true, "full_module": "Hacl.Spec.Bignum.Definitions", "short_module": "BD" }, { "abbrev": true, "full_module": "Lib.ByteSequence", "short_module": "BSeq" }, { "abbrev": true, "full_module": "Lib.Sequence", "short_module": "LSeq" }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.All", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.P256", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.P256", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let widefelem = lbuffer uint64 (size 8)
let widefelem =
false
null
false
lbuffer uint64 (size 8)
{ "checked_file": "Hacl.Impl.P256.Bignum.fsti.checked", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.ByteSequence.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Spec.Bignum.Definitions.fst.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.All.fst.checked", "FStar.HyperStack.fst.checked" ], "interface_file": false, "source_file": "Hacl.Impl.P256.Bignum.fsti" }
[ "total" ]
[ "Lib.Buffer.lbuffer", "Lib.IntTypes.uint64", "Lib.IntTypes.size" ]
[]
module Hacl.Impl.P256.Bignum open FStar.Mul open FStar.HyperStack.All open FStar.HyperStack module ST = FStar.HyperStack.ST open Lib.IntTypes open Lib.Buffer module LSeq = Lib.Sequence module BSeq = Lib.ByteSequence module BD = Hacl.Spec.Bignum.Definitions #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" inline_for_extraction let felem = lbuffer uint64 (size 4)
false
true
Hacl.Impl.P256.Bignum.fsti
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val widefelem : Type0
[]
Hacl.Impl.P256.Bignum.widefelem
{ "file_name": "code/ecdsap256/Hacl.Impl.P256.Bignum.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Type0
{ "end_col": 39, "end_line": 20, "start_col": 16, "start_line": 20 }
Prims.GTot
val as_nat (h: mem) (e: felem) : GTot nat
[ { "abbrev": true, "full_module": "Hacl.Spec.Bignum.Definitions", "short_module": "BD" }, { "abbrev": true, "full_module": "Lib.ByteSequence", "short_module": "BSeq" }, { "abbrev": true, "full_module": "Lib.Sequence", "short_module": "LSeq" }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.All", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.P256", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.P256", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let as_nat (h:mem) (e:felem) : GTot nat = BD.bn_v (as_seq h e)
val as_nat (h: mem) (e: felem) : GTot nat let as_nat (h: mem) (e: felem) : GTot nat =
false
null
false
BD.bn_v (as_seq h e)
{ "checked_file": "Hacl.Impl.P256.Bignum.fsti.checked", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.ByteSequence.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Spec.Bignum.Definitions.fst.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.All.fst.checked", "FStar.HyperStack.fst.checked" ], "interface_file": false, "source_file": "Hacl.Impl.P256.Bignum.fsti" }
[ "sometrivial" ]
[ "FStar.Monotonic.HyperStack.mem", "Hacl.Impl.P256.Bignum.felem", "Hacl.Spec.Bignum.Definitions.bn_v", "Lib.IntTypes.U64", "Lib.IntTypes.v", "Lib.IntTypes.U32", "Lib.IntTypes.PUB", "Lib.IntTypes.size", "Lib.Buffer.as_seq", "Lib.Buffer.MUT", "Lib.IntTypes.uint64", "Prims.nat" ]
[]
module Hacl.Impl.P256.Bignum open FStar.Mul open FStar.HyperStack.All open FStar.HyperStack module ST = FStar.HyperStack.ST open Lib.IntTypes open Lib.Buffer module LSeq = Lib.Sequence module BSeq = Lib.ByteSequence module BD = Hacl.Spec.Bignum.Definitions #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" inline_for_extraction let felem = lbuffer uint64 (size 4) inline_for_extraction let widefelem = lbuffer uint64 (size 8) unfold
false
false
Hacl.Impl.P256.Bignum.fsti
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val as_nat (h: mem) (e: felem) : GTot nat
[]
Hacl.Impl.P256.Bignum.as_nat
{ "file_name": "code/ecdsap256/Hacl.Impl.P256.Bignum.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
h: FStar.Monotonic.HyperStack.mem -> e: Hacl.Impl.P256.Bignum.felem -> Prims.GTot Prims.nat
{ "end_col": 22, "end_line": 24, "start_col": 2, "start_line": 24 }
Prims.GTot
val wide_as_nat (h: mem) (e: widefelem) : GTot nat
[ { "abbrev": true, "full_module": "Hacl.Spec.Bignum.Definitions", "short_module": "BD" }, { "abbrev": true, "full_module": "Lib.ByteSequence", "short_module": "BSeq" }, { "abbrev": true, "full_module": "Lib.Sequence", "short_module": "LSeq" }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.All", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.P256", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.P256", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let wide_as_nat (h:mem) (e:widefelem) : GTot nat = BD.bn_v (as_seq h e)
val wide_as_nat (h: mem) (e: widefelem) : GTot nat let wide_as_nat (h: mem) (e: widefelem) : GTot nat =
false
null
false
BD.bn_v (as_seq h e)
{ "checked_file": "Hacl.Impl.P256.Bignum.fsti.checked", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.ByteSequence.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Spec.Bignum.Definitions.fst.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.All.fst.checked", "FStar.HyperStack.fst.checked" ], "interface_file": false, "source_file": "Hacl.Impl.P256.Bignum.fsti" }
[ "sometrivial" ]
[ "FStar.Monotonic.HyperStack.mem", "Hacl.Impl.P256.Bignum.widefelem", "Hacl.Spec.Bignum.Definitions.bn_v", "Lib.IntTypes.U64", "Lib.IntTypes.v", "Lib.IntTypes.U32", "Lib.IntTypes.PUB", "Lib.IntTypes.size", "Lib.Buffer.as_seq", "Lib.Buffer.MUT", "Lib.IntTypes.uint64", "Prims.nat" ]
[]
module Hacl.Impl.P256.Bignum open FStar.Mul open FStar.HyperStack.All open FStar.HyperStack module ST = FStar.HyperStack.ST open Lib.IntTypes open Lib.Buffer module LSeq = Lib.Sequence module BSeq = Lib.ByteSequence module BD = Hacl.Spec.Bignum.Definitions #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" inline_for_extraction let felem = lbuffer uint64 (size 4) inline_for_extraction let widefelem = lbuffer uint64 (size 8) unfold let as_nat (h:mem) (e:felem) : GTot nat = BD.bn_v (as_seq h e) unfold
false
false
Hacl.Impl.P256.Bignum.fsti
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val wide_as_nat (h: mem) (e: widefelem) : GTot nat
[]
Hacl.Impl.P256.Bignum.wide_as_nat
{ "file_name": "code/ecdsap256/Hacl.Impl.P256.Bignum.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
h: FStar.Monotonic.HyperStack.mem -> e: Hacl.Impl.P256.Bignum.widefelem -> Prims.GTot Prims.nat
{ "end_col": 22, "end_line": 28, "start_col": 2, "start_line": 28 }
Prims.Tot
val equal (#a:Type) (m1 m2:map16 a) : Type0
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let equal #a m1 m2 = m1 == m2
val equal (#a:Type) (m1 m2:map16 a) : Type0 let equal #a m1 m2 =
false
null
false
m1 == m2
{ "checked_file": "Vale.Lib.Map16.fst.checked", "dependencies": [ "prims.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": true, "source_file": "Vale.Lib.Map16.fst" }
[ "total" ]
[ "Vale.Lib.Map16.map16", "Prims.eq2" ]
[]
module Vale.Lib.Map16 open FStar.Mul let lemma_self16 (#a:Type) (m:map16 a) (n:int) (v:a) = () let lemma_other16 (#a:Type) (m:map16 a) (n1 n2:int) (v:a) = () #reset-options "--initial_ifuel 5 --max_ifuel 5" let lemma_equal16 (#a:Type) (m1 m2:map16 a) = assert (sel16 m1 0 == sel16 m2 0); assert (sel16 m1 1 == sel16 m2 1); assert (sel16 m1 2 == sel16 m2 2); assert (sel16 m1 3 == sel16 m2 3); assert (sel16 m1 4 == sel16 m2 4); assert (sel16 m1 5 == sel16 m2 5); assert (sel16 m1 6 == sel16 m2 6); assert (sel16 m1 7 == sel16 m2 7); assert (sel16 m1 8 == sel16 m2 8); assert (sel16 m1 9 == sel16 m2 9); assert (sel16 m1 10 == sel16 m2 10); assert (sel16 m1 11 == sel16 m2 11); assert (sel16 m1 12 == sel16 m2 12); assert (sel16 m1 13 == sel16 m2 13); assert (sel16 m1 14 == sel16 m2 14); assert (sel16 m1 15 == sel16 m2 15); () #reset-options let lemma_self (#a:Type) (m:map16 a) (n:int) (v:a) = assert_norm (sel (upd m n v) n == sel16 (upd16 m n v) n); lemma_self16 m n v let lemma_other (#a:Type) (m:map16 a) (n1 n2:int) (v:a) = assert_norm (sel (upd m n1 v) n2 == sel16 (upd16 m n1 v) n2); assert_norm (sel m n2 == sel16 m n2); lemma_other16 m n1 n2 v let lemma_equal (#a:Type) (m1 m2:map16 a) = assert_norm (forall (i:int). sel m1 i == sel16 m1 i); assert_norm (forall (i:int). sel m2 i == sel16 m2 i); lemma_equal16 m1 m2 let lemma_eta16 (#a:Type) (m:map16 a) = let m1 = m in let m2 = eta16 m in assert_norm (get m1 0 == get m2 0); assert_norm (get m1 1 == get m2 1); assert_norm (get m1 2 == get m2 2); assert_norm (get m1 3 == get m2 3); assert_norm (get m1 4 == get m2 4); assert_norm (get m1 5 == get m2 5); assert_norm (get m1 6 == get m2 6); assert_norm (get m1 7 == get m2 7); assert_norm (get m1 8 == get m2 8); assert_norm (get m1 9 == get m2 9); assert_norm (get m1 10 == get m2 10); assert_norm (get m1 11 == get m2 11); assert_norm (get m1 12 == get m2 12); assert_norm (get m1 13 == get m2 13); assert_norm (get m1 14 == get m2 14); assert_norm (get m1 15 == get m2 15); lemma_equal m (eta16 m) let lemma_eta (#a:Type) (m:map16 a) = assert_norm (eta m == eta16 m); lemma_eta16 m
false
false
Vale.Lib.Map16.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val equal (#a:Type) (m1 m2:map16 a) : Type0
[]
Vale.Lib.Map16.equal
{ "file_name": "vale/code/lib/collections/Vale.Lib.Map16.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
m1: Vale.Lib.Map16.map16 a -> m2: Vale.Lib.Map16.map16 a -> Type0
{ "end_col": 29, "end_line": 67, "start_col": 21, "start_line": 67 }
FStar.Pervasives.Lemma
val lemma_eta (#a:Type) (m:map16 a) : Lemma (ensures eta m == m) [SMTPat (eta m)]
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let lemma_eta (#a:Type) (m:map16 a) = assert_norm (eta m == eta16 m); lemma_eta16 m
val lemma_eta (#a:Type) (m:map16 a) : Lemma (ensures eta m == m) [SMTPat (eta m)] let lemma_eta (#a: Type) (m: map16 a) =
false
null
true
assert_norm (eta m == eta16 m); lemma_eta16 m
{ "checked_file": "Vale.Lib.Map16.fst.checked", "dependencies": [ "prims.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": true, "source_file": "Vale.Lib.Map16.fst" }
[ "lemma" ]
[ "Vale.Lib.Map16.map16", "Vale.Lib.Map16.lemma_eta16", "Prims.unit", "FStar.Pervasives.assert_norm", "Prims.eq2", "Vale.Lib.Map16.eta", "Vale.Lib.Map16.eta16" ]
[]
module Vale.Lib.Map16 open FStar.Mul let lemma_self16 (#a:Type) (m:map16 a) (n:int) (v:a) = () let lemma_other16 (#a:Type) (m:map16 a) (n1 n2:int) (v:a) = () #reset-options "--initial_ifuel 5 --max_ifuel 5" let lemma_equal16 (#a:Type) (m1 m2:map16 a) = assert (sel16 m1 0 == sel16 m2 0); assert (sel16 m1 1 == sel16 m2 1); assert (sel16 m1 2 == sel16 m2 2); assert (sel16 m1 3 == sel16 m2 3); assert (sel16 m1 4 == sel16 m2 4); assert (sel16 m1 5 == sel16 m2 5); assert (sel16 m1 6 == sel16 m2 6); assert (sel16 m1 7 == sel16 m2 7); assert (sel16 m1 8 == sel16 m2 8); assert (sel16 m1 9 == sel16 m2 9); assert (sel16 m1 10 == sel16 m2 10); assert (sel16 m1 11 == sel16 m2 11); assert (sel16 m1 12 == sel16 m2 12); assert (sel16 m1 13 == sel16 m2 13); assert (sel16 m1 14 == sel16 m2 14); assert (sel16 m1 15 == sel16 m2 15); () #reset-options let lemma_self (#a:Type) (m:map16 a) (n:int) (v:a) = assert_norm (sel (upd m n v) n == sel16 (upd16 m n v) n); lemma_self16 m n v let lemma_other (#a:Type) (m:map16 a) (n1 n2:int) (v:a) = assert_norm (sel (upd m n1 v) n2 == sel16 (upd16 m n1 v) n2); assert_norm (sel m n2 == sel16 m n2); lemma_other16 m n1 n2 v let lemma_equal (#a:Type) (m1 m2:map16 a) = assert_norm (forall (i:int). sel m1 i == sel16 m1 i); assert_norm (forall (i:int). sel m2 i == sel16 m2 i); lemma_equal16 m1 m2 let lemma_eta16 (#a:Type) (m:map16 a) = let m1 = m in let m2 = eta16 m in assert_norm (get m1 0 == get m2 0); assert_norm (get m1 1 == get m2 1); assert_norm (get m1 2 == get m2 2); assert_norm (get m1 3 == get m2 3); assert_norm (get m1 4 == get m2 4); assert_norm (get m1 5 == get m2 5); assert_norm (get m1 6 == get m2 6); assert_norm (get m1 7 == get m2 7); assert_norm (get m1 8 == get m2 8); assert_norm (get m1 9 == get m2 9); assert_norm (get m1 10 == get m2 10); assert_norm (get m1 11 == get m2 11); assert_norm (get m1 12 == get m2 12); assert_norm (get m1 13 == get m2 13); assert_norm (get m1 14 == get m2 14); assert_norm (get m1 15 == get m2 15); lemma_equal m (eta16 m)
false
false
Vale.Lib.Map16.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val lemma_eta (#a:Type) (m:map16 a) : Lemma (ensures eta m == m) [SMTPat (eta m)]
[]
Vale.Lib.Map16.lemma_eta
{ "file_name": "vale/code/lib/collections/Vale.Lib.Map16.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
m: Vale.Lib.Map16.map16 a -> FStar.Pervasives.Lemma (ensures Vale.Lib.Map16.eta m == m) [SMTPat (Vale.Lib.Map16.eta m)]
{ "end_col": 15, "end_line": 65, "start_col": 2, "start_line": 64 }
FStar.Pervasives.Lemma
val lemma_equal (#a:Type) (m1 m2:map16 a) : Lemma (requires (forall (i:int).{:pattern (sel m1 i) \/ (sel m2 i)} 0 <= i /\ i < 16 ==> sel m1 i == sel m2 i)) (ensures m1 == m2)
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let lemma_equal (#a:Type) (m1 m2:map16 a) = assert_norm (forall (i:int). sel m1 i == sel16 m1 i); assert_norm (forall (i:int). sel m2 i == sel16 m2 i); lemma_equal16 m1 m2
val lemma_equal (#a:Type) (m1 m2:map16 a) : Lemma (requires (forall (i:int).{:pattern (sel m1 i) \/ (sel m2 i)} 0 <= i /\ i < 16 ==> sel m1 i == sel m2 i)) (ensures m1 == m2) let lemma_equal (#a: Type) (m1 m2: map16 a) =
false
null
true
assert_norm (forall (i: int). sel m1 i == sel16 m1 i); assert_norm (forall (i: int). sel m2 i == sel16 m2 i); lemma_equal16 m1 m2
{ "checked_file": "Vale.Lib.Map16.fst.checked", "dependencies": [ "prims.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": true, "source_file": "Vale.Lib.Map16.fst" }
[ "lemma" ]
[ "Vale.Lib.Map16.map16", "Vale.Lib.Map16.lemma_equal16", "Prims.unit", "FStar.Pervasives.assert_norm", "Prims.l_Forall", "Prims.int", "Prims.eq2", "Vale.Lib.Map16.sel", "Vale.Lib.Map16.sel16" ]
[]
module Vale.Lib.Map16 open FStar.Mul let lemma_self16 (#a:Type) (m:map16 a) (n:int) (v:a) = () let lemma_other16 (#a:Type) (m:map16 a) (n1 n2:int) (v:a) = () #reset-options "--initial_ifuel 5 --max_ifuel 5" let lemma_equal16 (#a:Type) (m1 m2:map16 a) = assert (sel16 m1 0 == sel16 m2 0); assert (sel16 m1 1 == sel16 m2 1); assert (sel16 m1 2 == sel16 m2 2); assert (sel16 m1 3 == sel16 m2 3); assert (sel16 m1 4 == sel16 m2 4); assert (sel16 m1 5 == sel16 m2 5); assert (sel16 m1 6 == sel16 m2 6); assert (sel16 m1 7 == sel16 m2 7); assert (sel16 m1 8 == sel16 m2 8); assert (sel16 m1 9 == sel16 m2 9); assert (sel16 m1 10 == sel16 m2 10); assert (sel16 m1 11 == sel16 m2 11); assert (sel16 m1 12 == sel16 m2 12); assert (sel16 m1 13 == sel16 m2 13); assert (sel16 m1 14 == sel16 m2 14); assert (sel16 m1 15 == sel16 m2 15); () #reset-options let lemma_self (#a:Type) (m:map16 a) (n:int) (v:a) = assert_norm (sel (upd m n v) n == sel16 (upd16 m n v) n); lemma_self16 m n v let lemma_other (#a:Type) (m:map16 a) (n1 n2:int) (v:a) = assert_norm (sel (upd m n1 v) n2 == sel16 (upd16 m n1 v) n2); assert_norm (sel m n2 == sel16 m n2); lemma_other16 m n1 n2 v
false
false
Vale.Lib.Map16.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val lemma_equal (#a:Type) (m1 m2:map16 a) : Lemma (requires (forall (i:int).{:pattern (sel m1 i) \/ (sel m2 i)} 0 <= i /\ i < 16 ==> sel m1 i == sel m2 i)) (ensures m1 == m2)
[]
Vale.Lib.Map16.lemma_equal
{ "file_name": "vale/code/lib/collections/Vale.Lib.Map16.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
m1: Vale.Lib.Map16.map16 a -> m2: Vale.Lib.Map16.map16 a -> FStar.Pervasives.Lemma (requires forall (i: Prims.int). {:pattern Vale.Lib.Map16.sel m1 i\/Vale.Lib.Map16.sel m2 i} 0 <= i /\ i < 16 ==> Vale.Lib.Map16.sel m1 i == Vale.Lib.Map16.sel m2 i) (ensures m1 == m2)
{ "end_col": 21, "end_line": 40, "start_col": 2, "start_line": 38 }
FStar.Pervasives.Lemma
val lemma_equal_intro (#a:Type) (m1 m2:map16 a) : Lemma (requires (forall (i:int).{:pattern (sel m1 i) \/ (sel m2 i)} 0 <= i /\ i < 16 ==> sel m1 i == sel m2 i)) (ensures equal m1 m2) [SMTPat (equal m1 m2)]
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let lemma_equal_intro #a m1 m2 = lemma_equal m1 m2; ()
val lemma_equal_intro (#a:Type) (m1 m2:map16 a) : Lemma (requires (forall (i:int).{:pattern (sel m1 i) \/ (sel m2 i)} 0 <= i /\ i < 16 ==> sel m1 i == sel m2 i)) (ensures equal m1 m2) [SMTPat (equal m1 m2)] let lemma_equal_intro #a m1 m2 =
false
null
true
lemma_equal m1 m2; ()
{ "checked_file": "Vale.Lib.Map16.fst.checked", "dependencies": [ "prims.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": true, "source_file": "Vale.Lib.Map16.fst" }
[ "lemma" ]
[ "Vale.Lib.Map16.map16", "Prims.unit", "Vale.Lib.Map16.lemma_equal" ]
[]
module Vale.Lib.Map16 open FStar.Mul let lemma_self16 (#a:Type) (m:map16 a) (n:int) (v:a) = () let lemma_other16 (#a:Type) (m:map16 a) (n1 n2:int) (v:a) = () #reset-options "--initial_ifuel 5 --max_ifuel 5" let lemma_equal16 (#a:Type) (m1 m2:map16 a) = assert (sel16 m1 0 == sel16 m2 0); assert (sel16 m1 1 == sel16 m2 1); assert (sel16 m1 2 == sel16 m2 2); assert (sel16 m1 3 == sel16 m2 3); assert (sel16 m1 4 == sel16 m2 4); assert (sel16 m1 5 == sel16 m2 5); assert (sel16 m1 6 == sel16 m2 6); assert (sel16 m1 7 == sel16 m2 7); assert (sel16 m1 8 == sel16 m2 8); assert (sel16 m1 9 == sel16 m2 9); assert (sel16 m1 10 == sel16 m2 10); assert (sel16 m1 11 == sel16 m2 11); assert (sel16 m1 12 == sel16 m2 12); assert (sel16 m1 13 == sel16 m2 13); assert (sel16 m1 14 == sel16 m2 14); assert (sel16 m1 15 == sel16 m2 15); () #reset-options let lemma_self (#a:Type) (m:map16 a) (n:int) (v:a) = assert_norm (sel (upd m n v) n == sel16 (upd16 m n v) n); lemma_self16 m n v let lemma_other (#a:Type) (m:map16 a) (n1 n2:int) (v:a) = assert_norm (sel (upd m n1 v) n2 == sel16 (upd16 m n1 v) n2); assert_norm (sel m n2 == sel16 m n2); lemma_other16 m n1 n2 v let lemma_equal (#a:Type) (m1 m2:map16 a) = assert_norm (forall (i:int). sel m1 i == sel16 m1 i); assert_norm (forall (i:int). sel m2 i == sel16 m2 i); lemma_equal16 m1 m2 let lemma_eta16 (#a:Type) (m:map16 a) = let m1 = m in let m2 = eta16 m in assert_norm (get m1 0 == get m2 0); assert_norm (get m1 1 == get m2 1); assert_norm (get m1 2 == get m2 2); assert_norm (get m1 3 == get m2 3); assert_norm (get m1 4 == get m2 4); assert_norm (get m1 5 == get m2 5); assert_norm (get m1 6 == get m2 6); assert_norm (get m1 7 == get m2 7); assert_norm (get m1 8 == get m2 8); assert_norm (get m1 9 == get m2 9); assert_norm (get m1 10 == get m2 10); assert_norm (get m1 11 == get m2 11); assert_norm (get m1 12 == get m2 12); assert_norm (get m1 13 == get m2 13); assert_norm (get m1 14 == get m2 14); assert_norm (get m1 15 == get m2 15); lemma_equal m (eta16 m) let lemma_eta (#a:Type) (m:map16 a) = assert_norm (eta m == eta16 m); lemma_eta16 m let equal #a m1 m2 = m1 == m2
false
false
Vale.Lib.Map16.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val lemma_equal_intro (#a:Type) (m1 m2:map16 a) : Lemma (requires (forall (i:int).{:pattern (sel m1 i) \/ (sel m2 i)} 0 <= i /\ i < 16 ==> sel m1 i == sel m2 i)) (ensures equal m1 m2) [SMTPat (equal m1 m2)]
[]
Vale.Lib.Map16.lemma_equal_intro
{ "file_name": "vale/code/lib/collections/Vale.Lib.Map16.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
m1: Vale.Lib.Map16.map16 a -> m2: Vale.Lib.Map16.map16 a -> FStar.Pervasives.Lemma (requires forall (i: Prims.int). {:pattern Vale.Lib.Map16.sel m1 i\/Vale.Lib.Map16.sel m2 i} 0 <= i /\ i < 16 ==> Vale.Lib.Map16.sel m1 i == Vale.Lib.Map16.sel m2 i) (ensures Vale.Lib.Map16.equal m1 m2) [SMTPat (Vale.Lib.Map16.equal m1 m2)]
{ "end_col": 4, "end_line": 71, "start_col": 2, "start_line": 70 }
Prims.Pure
val init (a:Type) (f:(i:nat{i < 16}) -> a) : Pure (map16 a) (requires True) (ensures fun m -> forall (i:int).{:pattern (sel m i)} 0 <= i /\ i < 16 ==> sel m i == f i)
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let init a f = init_rec a f 16
val init (a:Type) (f:(i:nat{i < 16}) -> a) : Pure (map16 a) (requires True) (ensures fun m -> forall (i:int).{:pattern (sel m i)} 0 <= i /\ i < 16 ==> sel m i == f i) let init a f =
false
null
false
init_rec a f 16
{ "checked_file": "Vale.Lib.Map16.fst.checked", "dependencies": [ "prims.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": true, "source_file": "Vale.Lib.Map16.fst" }
[]
[ "Prims.nat", "Prims.b2t", "Prims.op_LessThan", "Vale.Lib.Map16.init_rec", "Vale.Lib.Map16.map16" ]
[]
module Vale.Lib.Map16 open FStar.Mul let lemma_self16 (#a:Type) (m:map16 a) (n:int) (v:a) = () let lemma_other16 (#a:Type) (m:map16 a) (n1 n2:int) (v:a) = () #reset-options "--initial_ifuel 5 --max_ifuel 5" let lemma_equal16 (#a:Type) (m1 m2:map16 a) = assert (sel16 m1 0 == sel16 m2 0); assert (sel16 m1 1 == sel16 m2 1); assert (sel16 m1 2 == sel16 m2 2); assert (sel16 m1 3 == sel16 m2 3); assert (sel16 m1 4 == sel16 m2 4); assert (sel16 m1 5 == sel16 m2 5); assert (sel16 m1 6 == sel16 m2 6); assert (sel16 m1 7 == sel16 m2 7); assert (sel16 m1 8 == sel16 m2 8); assert (sel16 m1 9 == sel16 m2 9); assert (sel16 m1 10 == sel16 m2 10); assert (sel16 m1 11 == sel16 m2 11); assert (sel16 m1 12 == sel16 m2 12); assert (sel16 m1 13 == sel16 m2 13); assert (sel16 m1 14 == sel16 m2 14); assert (sel16 m1 15 == sel16 m2 15); () #reset-options let lemma_self (#a:Type) (m:map16 a) (n:int) (v:a) = assert_norm (sel (upd m n v) n == sel16 (upd16 m n v) n); lemma_self16 m n v let lemma_other (#a:Type) (m:map16 a) (n1 n2:int) (v:a) = assert_norm (sel (upd m n1 v) n2 == sel16 (upd16 m n1 v) n2); assert_norm (sel m n2 == sel16 m n2); lemma_other16 m n1 n2 v let lemma_equal (#a:Type) (m1 m2:map16 a) = assert_norm (forall (i:int). sel m1 i == sel16 m1 i); assert_norm (forall (i:int). sel m2 i == sel16 m2 i); lemma_equal16 m1 m2 let lemma_eta16 (#a:Type) (m:map16 a) = let m1 = m in let m2 = eta16 m in assert_norm (get m1 0 == get m2 0); assert_norm (get m1 1 == get m2 1); assert_norm (get m1 2 == get m2 2); assert_norm (get m1 3 == get m2 3); assert_norm (get m1 4 == get m2 4); assert_norm (get m1 5 == get m2 5); assert_norm (get m1 6 == get m2 6); assert_norm (get m1 7 == get m2 7); assert_norm (get m1 8 == get m2 8); assert_norm (get m1 9 == get m2 9); assert_norm (get m1 10 == get m2 10); assert_norm (get m1 11 == get m2 11); assert_norm (get m1 12 == get m2 12); assert_norm (get m1 13 == get m2 13); assert_norm (get m1 14 == get m2 14); assert_norm (get m1 15 == get m2 15); lemma_equal m (eta16 m) let lemma_eta (#a:Type) (m:map16 a) = assert_norm (eta m == eta16 m); lemma_eta16 m let equal #a m1 m2 = m1 == m2 let lemma_equal_intro #a m1 m2 = lemma_equal m1 m2; () let lemma_equal_elim #a m1 m2 = () let rec init_rec (a:Type) (f:(i:nat{i < 16}) -> a) (n:nat) : Pure (map16 a) (requires n <= 16) (ensures fun m -> forall (i:nat).{:pattern sel m i} i < n ==> sel m i == f i) = if n = 0 then let m1 = f 0 in let m4 = ((m1, m1), (m1, m1)) in ((m4, m4), (m4, m4)) else upd (init_rec a f (n - 1)) (n - 1) (f (n - 1))
false
false
Vale.Lib.Map16.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val init (a:Type) (f:(i:nat{i < 16}) -> a) : Pure (map16 a) (requires True) (ensures fun m -> forall (i:int).{:pattern (sel m i)} 0 <= i /\ i < 16 ==> sel m i == f i)
[]
Vale.Lib.Map16.init
{ "file_name": "vale/code/lib/collections/Vale.Lib.Map16.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
a: Type -> f: (i: Prims.nat{i < 16} -> a) -> Prims.Pure (Vale.Lib.Map16.map16 a)
{ "end_col": 17, "end_line": 88, "start_col": 2, "start_line": 88 }
FStar.Pervasives.Lemma
val lemma_self (#a:Type) (m:map16 a) (n:int) (v:a) : Lemma (requires 0 <= n /\ n < 16) (ensures sel (upd m n v) n == v) [SMTPat (sel (upd m n v) n)]
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let lemma_self (#a:Type) (m:map16 a) (n:int) (v:a) = assert_norm (sel (upd m n v) n == sel16 (upd16 m n v) n); lemma_self16 m n v
val lemma_self (#a:Type) (m:map16 a) (n:int) (v:a) : Lemma (requires 0 <= n /\ n < 16) (ensures sel (upd m n v) n == v) [SMTPat (sel (upd m n v) n)] let lemma_self (#a: Type) (m: map16 a) (n: int) (v: a) =
false
null
true
assert_norm (sel (upd m n v) n == sel16 (upd16 m n v) n); lemma_self16 m n v
{ "checked_file": "Vale.Lib.Map16.fst.checked", "dependencies": [ "prims.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": true, "source_file": "Vale.Lib.Map16.fst" }
[ "lemma" ]
[ "Vale.Lib.Map16.map16", "Prims.int", "Vale.Lib.Map16.lemma_self16", "Prims.unit", "FStar.Pervasives.assert_norm", "Prims.eq2", "Vale.Lib.Map16.sel", "Vale.Lib.Map16.upd", "Vale.Lib.Map16.sel16", "Vale.Lib.Map16.upd16" ]
[]
module Vale.Lib.Map16 open FStar.Mul let lemma_self16 (#a:Type) (m:map16 a) (n:int) (v:a) = () let lemma_other16 (#a:Type) (m:map16 a) (n1 n2:int) (v:a) = () #reset-options "--initial_ifuel 5 --max_ifuel 5" let lemma_equal16 (#a:Type) (m1 m2:map16 a) = assert (sel16 m1 0 == sel16 m2 0); assert (sel16 m1 1 == sel16 m2 1); assert (sel16 m1 2 == sel16 m2 2); assert (sel16 m1 3 == sel16 m2 3); assert (sel16 m1 4 == sel16 m2 4); assert (sel16 m1 5 == sel16 m2 5); assert (sel16 m1 6 == sel16 m2 6); assert (sel16 m1 7 == sel16 m2 7); assert (sel16 m1 8 == sel16 m2 8); assert (sel16 m1 9 == sel16 m2 9); assert (sel16 m1 10 == sel16 m2 10); assert (sel16 m1 11 == sel16 m2 11); assert (sel16 m1 12 == sel16 m2 12); assert (sel16 m1 13 == sel16 m2 13); assert (sel16 m1 14 == sel16 m2 14); assert (sel16 m1 15 == sel16 m2 15); () #reset-options
false
false
Vale.Lib.Map16.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val lemma_self (#a:Type) (m:map16 a) (n:int) (v:a) : Lemma (requires 0 <= n /\ n < 16) (ensures sel (upd m n v) n == v) [SMTPat (sel (upd m n v) n)]
[]
Vale.Lib.Map16.lemma_self
{ "file_name": "vale/code/lib/collections/Vale.Lib.Map16.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
m: Vale.Lib.Map16.map16 a -> n: Prims.int -> v: a -> FStar.Pervasives.Lemma (requires 0 <= n /\ n < 16) (ensures Vale.Lib.Map16.sel (Vale.Lib.Map16.upd m n v) n == v) [SMTPat (Vale.Lib.Map16.sel (Vale.Lib.Map16.upd m n v) n)]
{ "end_col": 20, "end_line": 30, "start_col": 2, "start_line": 29 }
FStar.Pervasives.Lemma
val lemma_other (#a:Type) (m:map16 a) (n1 n2:int) (v:a) : Lemma (requires 0 <= n1 /\ n1 < 16 /\ 0 <= n2 /\ n2 < 16 /\ n1 =!= n2) (ensures sel (upd m n1 v) n2 == sel m n2) [SMTPat (sel (upd m n1 v) n2)]
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let lemma_other (#a:Type) (m:map16 a) (n1 n2:int) (v:a) = assert_norm (sel (upd m n1 v) n2 == sel16 (upd16 m n1 v) n2); assert_norm (sel m n2 == sel16 m n2); lemma_other16 m n1 n2 v
val lemma_other (#a:Type) (m:map16 a) (n1 n2:int) (v:a) : Lemma (requires 0 <= n1 /\ n1 < 16 /\ 0 <= n2 /\ n2 < 16 /\ n1 =!= n2) (ensures sel (upd m n1 v) n2 == sel m n2) [SMTPat (sel (upd m n1 v) n2)] let lemma_other (#a: Type) (m: map16 a) (n1 n2: int) (v: a) =
false
null
true
assert_norm (sel (upd m n1 v) n2 == sel16 (upd16 m n1 v) n2); assert_norm (sel m n2 == sel16 m n2); lemma_other16 m n1 n2 v
{ "checked_file": "Vale.Lib.Map16.fst.checked", "dependencies": [ "prims.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": true, "source_file": "Vale.Lib.Map16.fst" }
[ "lemma" ]
[ "Vale.Lib.Map16.map16", "Prims.int", "Vale.Lib.Map16.lemma_other16", "Prims.unit", "FStar.Pervasives.assert_norm", "Prims.eq2", "Vale.Lib.Map16.sel", "Vale.Lib.Map16.sel16", "Vale.Lib.Map16.upd", "Vale.Lib.Map16.upd16" ]
[]
module Vale.Lib.Map16 open FStar.Mul let lemma_self16 (#a:Type) (m:map16 a) (n:int) (v:a) = () let lemma_other16 (#a:Type) (m:map16 a) (n1 n2:int) (v:a) = () #reset-options "--initial_ifuel 5 --max_ifuel 5" let lemma_equal16 (#a:Type) (m1 m2:map16 a) = assert (sel16 m1 0 == sel16 m2 0); assert (sel16 m1 1 == sel16 m2 1); assert (sel16 m1 2 == sel16 m2 2); assert (sel16 m1 3 == sel16 m2 3); assert (sel16 m1 4 == sel16 m2 4); assert (sel16 m1 5 == sel16 m2 5); assert (sel16 m1 6 == sel16 m2 6); assert (sel16 m1 7 == sel16 m2 7); assert (sel16 m1 8 == sel16 m2 8); assert (sel16 m1 9 == sel16 m2 9); assert (sel16 m1 10 == sel16 m2 10); assert (sel16 m1 11 == sel16 m2 11); assert (sel16 m1 12 == sel16 m2 12); assert (sel16 m1 13 == sel16 m2 13); assert (sel16 m1 14 == sel16 m2 14); assert (sel16 m1 15 == sel16 m2 15); () #reset-options let lemma_self (#a:Type) (m:map16 a) (n:int) (v:a) = assert_norm (sel (upd m n v) n == sel16 (upd16 m n v) n); lemma_self16 m n v
false
false
Vale.Lib.Map16.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val lemma_other (#a:Type) (m:map16 a) (n1 n2:int) (v:a) : Lemma (requires 0 <= n1 /\ n1 < 16 /\ 0 <= n2 /\ n2 < 16 /\ n1 =!= n2) (ensures sel (upd m n1 v) n2 == sel m n2) [SMTPat (sel (upd m n1 v) n2)]
[]
Vale.Lib.Map16.lemma_other
{ "file_name": "vale/code/lib/collections/Vale.Lib.Map16.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
m: Vale.Lib.Map16.map16 a -> n1: Prims.int -> n2: Prims.int -> v: a -> FStar.Pervasives.Lemma (requires 0 <= n1 /\ n1 < 16 /\ 0 <= n2 /\ n2 < 16 /\ ~(n1 == n2)) (ensures Vale.Lib.Map16.sel (Vale.Lib.Map16.upd m n1 v) n2 == Vale.Lib.Map16.sel m n2) [SMTPat (Vale.Lib.Map16.sel (Vale.Lib.Map16.upd m n1 v) n2)]
{ "end_col": 25, "end_line": 35, "start_col": 2, "start_line": 33 }
Prims.Ghost
val init_ghost (a:Type) (f:(i:nat{i < 16}) -> GTot a) : Ghost (map16 a) (requires True) (ensures fun m -> forall (i:int).{:pattern (sel m i)} 0 <= i /\ i < 16 ==> sel m i == f i)
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let init_ghost a f = init_ghost_rec a f 16
val init_ghost (a:Type) (f:(i:nat{i < 16}) -> GTot a) : Ghost (map16 a) (requires True) (ensures fun m -> forall (i:int).{:pattern (sel m i)} 0 <= i /\ i < 16 ==> sel m i == f i) let init_ghost a f =
false
null
false
init_ghost_rec a f 16
{ "checked_file": "Vale.Lib.Map16.fst.checked", "dependencies": [ "prims.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": true, "source_file": "Vale.Lib.Map16.fst" }
[]
[ "Prims.nat", "Prims.b2t", "Prims.op_LessThan", "Vale.Lib.Map16.init_ghost_rec", "Vale.Lib.Map16.map16" ]
[]
module Vale.Lib.Map16 open FStar.Mul let lemma_self16 (#a:Type) (m:map16 a) (n:int) (v:a) = () let lemma_other16 (#a:Type) (m:map16 a) (n1 n2:int) (v:a) = () #reset-options "--initial_ifuel 5 --max_ifuel 5" let lemma_equal16 (#a:Type) (m1 m2:map16 a) = assert (sel16 m1 0 == sel16 m2 0); assert (sel16 m1 1 == sel16 m2 1); assert (sel16 m1 2 == sel16 m2 2); assert (sel16 m1 3 == sel16 m2 3); assert (sel16 m1 4 == sel16 m2 4); assert (sel16 m1 5 == sel16 m2 5); assert (sel16 m1 6 == sel16 m2 6); assert (sel16 m1 7 == sel16 m2 7); assert (sel16 m1 8 == sel16 m2 8); assert (sel16 m1 9 == sel16 m2 9); assert (sel16 m1 10 == sel16 m2 10); assert (sel16 m1 11 == sel16 m2 11); assert (sel16 m1 12 == sel16 m2 12); assert (sel16 m1 13 == sel16 m2 13); assert (sel16 m1 14 == sel16 m2 14); assert (sel16 m1 15 == sel16 m2 15); () #reset-options let lemma_self (#a:Type) (m:map16 a) (n:int) (v:a) = assert_norm (sel (upd m n v) n == sel16 (upd16 m n v) n); lemma_self16 m n v let lemma_other (#a:Type) (m:map16 a) (n1 n2:int) (v:a) = assert_norm (sel (upd m n1 v) n2 == sel16 (upd16 m n1 v) n2); assert_norm (sel m n2 == sel16 m n2); lemma_other16 m n1 n2 v let lemma_equal (#a:Type) (m1 m2:map16 a) = assert_norm (forall (i:int). sel m1 i == sel16 m1 i); assert_norm (forall (i:int). sel m2 i == sel16 m2 i); lemma_equal16 m1 m2 let lemma_eta16 (#a:Type) (m:map16 a) = let m1 = m in let m2 = eta16 m in assert_norm (get m1 0 == get m2 0); assert_norm (get m1 1 == get m2 1); assert_norm (get m1 2 == get m2 2); assert_norm (get m1 3 == get m2 3); assert_norm (get m1 4 == get m2 4); assert_norm (get m1 5 == get m2 5); assert_norm (get m1 6 == get m2 6); assert_norm (get m1 7 == get m2 7); assert_norm (get m1 8 == get m2 8); assert_norm (get m1 9 == get m2 9); assert_norm (get m1 10 == get m2 10); assert_norm (get m1 11 == get m2 11); assert_norm (get m1 12 == get m2 12); assert_norm (get m1 13 == get m2 13); assert_norm (get m1 14 == get m2 14); assert_norm (get m1 15 == get m2 15); lemma_equal m (eta16 m) let lemma_eta (#a:Type) (m:map16 a) = assert_norm (eta m == eta16 m); lemma_eta16 m let equal #a m1 m2 = m1 == m2 let lemma_equal_intro #a m1 m2 = lemma_equal m1 m2; () let lemma_equal_elim #a m1 m2 = () let rec init_rec (a:Type) (f:(i:nat{i < 16}) -> a) (n:nat) : Pure (map16 a) (requires n <= 16) (ensures fun m -> forall (i:nat).{:pattern sel m i} i < n ==> sel m i == f i) = if n = 0 then let m1 = f 0 in let m4 = ((m1, m1), (m1, m1)) in ((m4, m4), (m4, m4)) else upd (init_rec a f (n - 1)) (n - 1) (f (n - 1)) let init a f = init_rec a f 16 let rec init_ghost_rec (a:Type) (f:(i:nat{i < 16}) -> GTot a) (n:nat) : Ghost (map16 a) (requires n <= 16) (ensures fun m -> forall (i:nat).{:pattern sel m i} i < n ==> sel m i == f i) = if n = 0 then let m1 = f 0 in let m4 = ((m1, m1), (m1, m1)) in ((m4, m4), (m4, m4)) else upd (init_ghost_rec a f (n - 1)) (n - 1) (f (n - 1))
false
false
Vale.Lib.Map16.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val init_ghost (a:Type) (f:(i:nat{i < 16}) -> GTot a) : Ghost (map16 a) (requires True) (ensures fun m -> forall (i:int).{:pattern (sel m i)} 0 <= i /\ i < 16 ==> sel m i == f i)
[]
Vale.Lib.Map16.init_ghost
{ "file_name": "vale/code/lib/collections/Vale.Lib.Map16.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
a: Type -> f: (i: Prims.nat{i < 16} -> Prims.GTot a) -> Prims.Ghost (Vale.Lib.Map16.map16 a)
{ "end_col": 23, "end_line": 102, "start_col": 2, "start_line": 102 }
FStar.Pervasives.Lemma
val lemma_eta16 (#a:Type) (m:map16 a) : Lemma (ensures eta16 m == m)
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let lemma_eta16 (#a:Type) (m:map16 a) = let m1 = m in let m2 = eta16 m in assert_norm (get m1 0 == get m2 0); assert_norm (get m1 1 == get m2 1); assert_norm (get m1 2 == get m2 2); assert_norm (get m1 3 == get m2 3); assert_norm (get m1 4 == get m2 4); assert_norm (get m1 5 == get m2 5); assert_norm (get m1 6 == get m2 6); assert_norm (get m1 7 == get m2 7); assert_norm (get m1 8 == get m2 8); assert_norm (get m1 9 == get m2 9); assert_norm (get m1 10 == get m2 10); assert_norm (get m1 11 == get m2 11); assert_norm (get m1 12 == get m2 12); assert_norm (get m1 13 == get m2 13); assert_norm (get m1 14 == get m2 14); assert_norm (get m1 15 == get m2 15); lemma_equal m (eta16 m)
val lemma_eta16 (#a:Type) (m:map16 a) : Lemma (ensures eta16 m == m) let lemma_eta16 (#a: Type) (m: map16 a) =
false
null
true
let m1 = m in let m2 = eta16 m in assert_norm (get m1 0 == get m2 0); assert_norm (get m1 1 == get m2 1); assert_norm (get m1 2 == get m2 2); assert_norm (get m1 3 == get m2 3); assert_norm (get m1 4 == get m2 4); assert_norm (get m1 5 == get m2 5); assert_norm (get m1 6 == get m2 6); assert_norm (get m1 7 == get m2 7); assert_norm (get m1 8 == get m2 8); assert_norm (get m1 9 == get m2 9); assert_norm (get m1 10 == get m2 10); assert_norm (get m1 11 == get m2 11); assert_norm (get m1 12 == get m2 12); assert_norm (get m1 13 == get m2 13); assert_norm (get m1 14 == get m2 14); assert_norm (get m1 15 == get m2 15); lemma_equal m (eta16 m)
{ "checked_file": "Vale.Lib.Map16.fst.checked", "dependencies": [ "prims.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": true, "source_file": "Vale.Lib.Map16.fst" }
[ "lemma" ]
[ "Vale.Lib.Map16.map16", "Vale.Lib.Map16.lemma_equal", "Vale.Lib.Map16.eta16", "Prims.unit", "FStar.Pervasives.assert_norm", "Prims.eq2", "Vale.Lib.Map16.get" ]
[]
module Vale.Lib.Map16 open FStar.Mul let lemma_self16 (#a:Type) (m:map16 a) (n:int) (v:a) = () let lemma_other16 (#a:Type) (m:map16 a) (n1 n2:int) (v:a) = () #reset-options "--initial_ifuel 5 --max_ifuel 5" let lemma_equal16 (#a:Type) (m1 m2:map16 a) = assert (sel16 m1 0 == sel16 m2 0); assert (sel16 m1 1 == sel16 m2 1); assert (sel16 m1 2 == sel16 m2 2); assert (sel16 m1 3 == sel16 m2 3); assert (sel16 m1 4 == sel16 m2 4); assert (sel16 m1 5 == sel16 m2 5); assert (sel16 m1 6 == sel16 m2 6); assert (sel16 m1 7 == sel16 m2 7); assert (sel16 m1 8 == sel16 m2 8); assert (sel16 m1 9 == sel16 m2 9); assert (sel16 m1 10 == sel16 m2 10); assert (sel16 m1 11 == sel16 m2 11); assert (sel16 m1 12 == sel16 m2 12); assert (sel16 m1 13 == sel16 m2 13); assert (sel16 m1 14 == sel16 m2 14); assert (sel16 m1 15 == sel16 m2 15); () #reset-options let lemma_self (#a:Type) (m:map16 a) (n:int) (v:a) = assert_norm (sel (upd m n v) n == sel16 (upd16 m n v) n); lemma_self16 m n v let lemma_other (#a:Type) (m:map16 a) (n1 n2:int) (v:a) = assert_norm (sel (upd m n1 v) n2 == sel16 (upd16 m n1 v) n2); assert_norm (sel m n2 == sel16 m n2); lemma_other16 m n1 n2 v let lemma_equal (#a:Type) (m1 m2:map16 a) = assert_norm (forall (i:int). sel m1 i == sel16 m1 i); assert_norm (forall (i:int). sel m2 i == sel16 m2 i); lemma_equal16 m1 m2
false
false
Vale.Lib.Map16.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val lemma_eta16 (#a:Type) (m:map16 a) : Lemma (ensures eta16 m == m)
[]
Vale.Lib.Map16.lemma_eta16
{ "file_name": "vale/code/lib/collections/Vale.Lib.Map16.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
m: Vale.Lib.Map16.map16 a -> FStar.Pervasives.Lemma (ensures Vale.Lib.Map16.eta16 m == m)
{ "end_col": 25, "end_line": 61, "start_col": 39, "start_line": 42 }
FStar.Pervasives.Lemma
val lemma_equal16 (#a:Type) (m1 m2:map16 a) : Lemma (requires (forall (i:int).{:pattern (sel16 m1 i) \/ (sel16 m2 i)} 0 <= i /\ i < 16 ==> sel16 m1 i == sel16 m2 i)) (ensures m1 == m2)
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let lemma_equal16 (#a:Type) (m1 m2:map16 a) = assert (sel16 m1 0 == sel16 m2 0); assert (sel16 m1 1 == sel16 m2 1); assert (sel16 m1 2 == sel16 m2 2); assert (sel16 m1 3 == sel16 m2 3); assert (sel16 m1 4 == sel16 m2 4); assert (sel16 m1 5 == sel16 m2 5); assert (sel16 m1 6 == sel16 m2 6); assert (sel16 m1 7 == sel16 m2 7); assert (sel16 m1 8 == sel16 m2 8); assert (sel16 m1 9 == sel16 m2 9); assert (sel16 m1 10 == sel16 m2 10); assert (sel16 m1 11 == sel16 m2 11); assert (sel16 m1 12 == sel16 m2 12); assert (sel16 m1 13 == sel16 m2 13); assert (sel16 m1 14 == sel16 m2 14); assert (sel16 m1 15 == sel16 m2 15); ()
val lemma_equal16 (#a:Type) (m1 m2:map16 a) : Lemma (requires (forall (i:int).{:pattern (sel16 m1 i) \/ (sel16 m2 i)} 0 <= i /\ i < 16 ==> sel16 m1 i == sel16 m2 i)) (ensures m1 == m2) let lemma_equal16 (#a: Type) (m1 m2: map16 a) =
false
null
true
assert (sel16 m1 0 == sel16 m2 0); assert (sel16 m1 1 == sel16 m2 1); assert (sel16 m1 2 == sel16 m2 2); assert (sel16 m1 3 == sel16 m2 3); assert (sel16 m1 4 == sel16 m2 4); assert (sel16 m1 5 == sel16 m2 5); assert (sel16 m1 6 == sel16 m2 6); assert (sel16 m1 7 == sel16 m2 7); assert (sel16 m1 8 == sel16 m2 8); assert (sel16 m1 9 == sel16 m2 9); assert (sel16 m1 10 == sel16 m2 10); assert (sel16 m1 11 == sel16 m2 11); assert (sel16 m1 12 == sel16 m2 12); assert (sel16 m1 13 == sel16 m2 13); assert (sel16 m1 14 == sel16 m2 14); assert (sel16 m1 15 == sel16 m2 15); ()
{ "checked_file": "Vale.Lib.Map16.fst.checked", "dependencies": [ "prims.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": true, "source_file": "Vale.Lib.Map16.fst" }
[ "lemma" ]
[ "Vale.Lib.Map16.map16", "Prims.unit", "Prims._assert", "Prims.eq2", "Vale.Lib.Map16.sel16" ]
[]
module Vale.Lib.Map16 open FStar.Mul let lemma_self16 (#a:Type) (m:map16 a) (n:int) (v:a) = () let lemma_other16 (#a:Type) (m:map16 a) (n1 n2:int) (v:a) = () #reset-options "--initial_ifuel 5 --max_ifuel 5"
false
false
Vale.Lib.Map16.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 5, "max_fuel": 1, "max_ifuel": 5, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val lemma_equal16 (#a:Type) (m1 m2:map16 a) : Lemma (requires (forall (i:int).{:pattern (sel16 m1 i) \/ (sel16 m2 i)} 0 <= i /\ i < 16 ==> sel16 m1 i == sel16 m2 i)) (ensures m1 == m2)
[]
Vale.Lib.Map16.lemma_equal16
{ "file_name": "vale/code/lib/collections/Vale.Lib.Map16.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
m1: Vale.Lib.Map16.map16 a -> m2: Vale.Lib.Map16.map16 a -> FStar.Pervasives.Lemma (requires forall (i: Prims.int). {:pattern Vale.Lib.Map16.sel16 m1 i\/Vale.Lib.Map16.sel16 m2 i} 0 <= i /\ i < 16 ==> Vale.Lib.Map16.sel16 m1 i == Vale.Lib.Map16.sel16 m2 i) (ensures m1 == m2)
{ "end_col": 4, "end_line": 25, "start_col": 2, "start_line": 9 }
Prims.Pure
val init_rec (a: Type) (f: (i: nat{i < 16} -> a)) (n: nat) : Pure (map16 a) (requires n <= 16) (ensures fun m -> forall (i: nat). {:pattern sel m i} i < n ==> sel m i == f i)
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let rec init_rec (a:Type) (f:(i:nat{i < 16}) -> a) (n:nat) : Pure (map16 a) (requires n <= 16) (ensures fun m -> forall (i:nat).{:pattern sel m i} i < n ==> sel m i == f i) = if n = 0 then let m1 = f 0 in let m4 = ((m1, m1), (m1, m1)) in ((m4, m4), (m4, m4)) else upd (init_rec a f (n - 1)) (n - 1) (f (n - 1))
val init_rec (a: Type) (f: (i: nat{i < 16} -> a)) (n: nat) : Pure (map16 a) (requires n <= 16) (ensures fun m -> forall (i: nat). {:pattern sel m i} i < n ==> sel m i == f i) let rec init_rec (a: Type) (f: (i: nat{i < 16} -> a)) (n: nat) : Pure (map16 a) (requires n <= 16) (ensures fun m -> forall (i: nat). {:pattern sel m i} i < n ==> sel m i == f i) =
false
null
false
if n = 0 then let m1 = f 0 in let m4 = ((m1, m1), (m1, m1)) in ((m4, m4), (m4, m4)) else upd (init_rec a f (n - 1)) (n - 1) (f (n - 1))
{ "checked_file": "Vale.Lib.Map16.fst.checked", "dependencies": [ "prims.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": true, "source_file": "Vale.Lib.Map16.fst" }
[]
[ "Prims.nat", "Prims.b2t", "Prims.op_LessThan", "Prims.op_Equality", "Prims.int", "FStar.Pervasives.Native.Mktuple2", "Vale.Lib.Map16.map8", "Vale.Lib.Map16.map4", "FStar.Pervasives.Native.tuple2", "Vale.Lib.Map16.map2", "Prims.bool", "Vale.Lib.Map16.upd", "Vale.Lib.Map16.init_rec", "Prims.op_Subtraction", "Vale.Lib.Map16.map16", "Prims.op_LessThanOrEqual", "Prims.l_Forall", "Prims.l_imp", "Prims.eq2", "Vale.Lib.Map16.sel" ]
[]
module Vale.Lib.Map16 open FStar.Mul let lemma_self16 (#a:Type) (m:map16 a) (n:int) (v:a) = () let lemma_other16 (#a:Type) (m:map16 a) (n1 n2:int) (v:a) = () #reset-options "--initial_ifuel 5 --max_ifuel 5" let lemma_equal16 (#a:Type) (m1 m2:map16 a) = assert (sel16 m1 0 == sel16 m2 0); assert (sel16 m1 1 == sel16 m2 1); assert (sel16 m1 2 == sel16 m2 2); assert (sel16 m1 3 == sel16 m2 3); assert (sel16 m1 4 == sel16 m2 4); assert (sel16 m1 5 == sel16 m2 5); assert (sel16 m1 6 == sel16 m2 6); assert (sel16 m1 7 == sel16 m2 7); assert (sel16 m1 8 == sel16 m2 8); assert (sel16 m1 9 == sel16 m2 9); assert (sel16 m1 10 == sel16 m2 10); assert (sel16 m1 11 == sel16 m2 11); assert (sel16 m1 12 == sel16 m2 12); assert (sel16 m1 13 == sel16 m2 13); assert (sel16 m1 14 == sel16 m2 14); assert (sel16 m1 15 == sel16 m2 15); () #reset-options let lemma_self (#a:Type) (m:map16 a) (n:int) (v:a) = assert_norm (sel (upd m n v) n == sel16 (upd16 m n v) n); lemma_self16 m n v let lemma_other (#a:Type) (m:map16 a) (n1 n2:int) (v:a) = assert_norm (sel (upd m n1 v) n2 == sel16 (upd16 m n1 v) n2); assert_norm (sel m n2 == sel16 m n2); lemma_other16 m n1 n2 v let lemma_equal (#a:Type) (m1 m2:map16 a) = assert_norm (forall (i:int). sel m1 i == sel16 m1 i); assert_norm (forall (i:int). sel m2 i == sel16 m2 i); lemma_equal16 m1 m2 let lemma_eta16 (#a:Type) (m:map16 a) = let m1 = m in let m2 = eta16 m in assert_norm (get m1 0 == get m2 0); assert_norm (get m1 1 == get m2 1); assert_norm (get m1 2 == get m2 2); assert_norm (get m1 3 == get m2 3); assert_norm (get m1 4 == get m2 4); assert_norm (get m1 5 == get m2 5); assert_norm (get m1 6 == get m2 6); assert_norm (get m1 7 == get m2 7); assert_norm (get m1 8 == get m2 8); assert_norm (get m1 9 == get m2 9); assert_norm (get m1 10 == get m2 10); assert_norm (get m1 11 == get m2 11); assert_norm (get m1 12 == get m2 12); assert_norm (get m1 13 == get m2 13); assert_norm (get m1 14 == get m2 14); assert_norm (get m1 15 == get m2 15); lemma_equal m (eta16 m) let lemma_eta (#a:Type) (m:map16 a) = assert_norm (eta m == eta16 m); lemma_eta16 m let equal #a m1 m2 = m1 == m2 let lemma_equal_intro #a m1 m2 = lemma_equal m1 m2; () let lemma_equal_elim #a m1 m2 = () let rec init_rec (a:Type) (f:(i:nat{i < 16}) -> a) (n:nat) : Pure (map16 a) (requires n <= 16) (ensures fun m -> forall (i:nat).{:pattern sel m i} i < n ==> sel m i == f i)
false
false
Vale.Lib.Map16.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val init_rec (a: Type) (f: (i: nat{i < 16} -> a)) (n: nat) : Pure (map16 a) (requires n <= 16) (ensures fun m -> forall (i: nat). {:pattern sel m i} i < n ==> sel m i == f i)
[ "recursion" ]
Vale.Lib.Map16.init_rec
{ "file_name": "vale/code/lib/collections/Vale.Lib.Map16.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
a: Type -> f: (i: Prims.nat{i < 16} -> a) -> n: Prims.nat -> Prims.Pure (Vale.Lib.Map16.map16 a)
{ "end_col": 50, "end_line": 85, "start_col": 2, "start_line": 80 }
Prims.Ghost
val init_ghost_rec (a: Type) (f: (i: nat{i < 16} -> GTot a)) (n: nat) : Ghost (map16 a) (requires n <= 16) (ensures fun m -> forall (i: nat). {:pattern sel m i} i < n ==> sel m i == f i)
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let rec init_ghost_rec (a:Type) (f:(i:nat{i < 16}) -> GTot a) (n:nat) : Ghost (map16 a) (requires n <= 16) (ensures fun m -> forall (i:nat).{:pattern sel m i} i < n ==> sel m i == f i) = if n = 0 then let m1 = f 0 in let m4 = ((m1, m1), (m1, m1)) in ((m4, m4), (m4, m4)) else upd (init_ghost_rec a f (n - 1)) (n - 1) (f (n - 1))
val init_ghost_rec (a: Type) (f: (i: nat{i < 16} -> GTot a)) (n: nat) : Ghost (map16 a) (requires n <= 16) (ensures fun m -> forall (i: nat). {:pattern sel m i} i < n ==> sel m i == f i) let rec init_ghost_rec (a: Type) (f: (i: nat{i < 16} -> GTot a)) (n: nat) : Ghost (map16 a) (requires n <= 16) (ensures fun m -> forall (i: nat). {:pattern sel m i} i < n ==> sel m i == f i) =
false
null
false
if n = 0 then let m1 = f 0 in let m4 = ((m1, m1), (m1, m1)) in ((m4, m4), (m4, m4)) else upd (init_ghost_rec a f (n - 1)) (n - 1) (f (n - 1))
{ "checked_file": "Vale.Lib.Map16.fst.checked", "dependencies": [ "prims.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": true, "source_file": "Vale.Lib.Map16.fst" }
[]
[ "Prims.nat", "Prims.b2t", "Prims.op_LessThan", "Prims.op_Equality", "Prims.int", "FStar.Pervasives.Native.Mktuple2", "Vale.Lib.Map16.map8", "Vale.Lib.Map16.map4", "FStar.Pervasives.Native.tuple2", "Vale.Lib.Map16.map2", "Prims.bool", "Vale.Lib.Map16.upd", "Vale.Lib.Map16.init_ghost_rec", "Prims.op_Subtraction", "Vale.Lib.Map16.map16", "Prims.op_LessThanOrEqual", "Prims.l_Forall", "Prims.l_imp", "Prims.eq2", "Vale.Lib.Map16.sel" ]
[]
module Vale.Lib.Map16 open FStar.Mul let lemma_self16 (#a:Type) (m:map16 a) (n:int) (v:a) = () let lemma_other16 (#a:Type) (m:map16 a) (n1 n2:int) (v:a) = () #reset-options "--initial_ifuel 5 --max_ifuel 5" let lemma_equal16 (#a:Type) (m1 m2:map16 a) = assert (sel16 m1 0 == sel16 m2 0); assert (sel16 m1 1 == sel16 m2 1); assert (sel16 m1 2 == sel16 m2 2); assert (sel16 m1 3 == sel16 m2 3); assert (sel16 m1 4 == sel16 m2 4); assert (sel16 m1 5 == sel16 m2 5); assert (sel16 m1 6 == sel16 m2 6); assert (sel16 m1 7 == sel16 m2 7); assert (sel16 m1 8 == sel16 m2 8); assert (sel16 m1 9 == sel16 m2 9); assert (sel16 m1 10 == sel16 m2 10); assert (sel16 m1 11 == sel16 m2 11); assert (sel16 m1 12 == sel16 m2 12); assert (sel16 m1 13 == sel16 m2 13); assert (sel16 m1 14 == sel16 m2 14); assert (sel16 m1 15 == sel16 m2 15); () #reset-options let lemma_self (#a:Type) (m:map16 a) (n:int) (v:a) = assert_norm (sel (upd m n v) n == sel16 (upd16 m n v) n); lemma_self16 m n v let lemma_other (#a:Type) (m:map16 a) (n1 n2:int) (v:a) = assert_norm (sel (upd m n1 v) n2 == sel16 (upd16 m n1 v) n2); assert_norm (sel m n2 == sel16 m n2); lemma_other16 m n1 n2 v let lemma_equal (#a:Type) (m1 m2:map16 a) = assert_norm (forall (i:int). sel m1 i == sel16 m1 i); assert_norm (forall (i:int). sel m2 i == sel16 m2 i); lemma_equal16 m1 m2 let lemma_eta16 (#a:Type) (m:map16 a) = let m1 = m in let m2 = eta16 m in assert_norm (get m1 0 == get m2 0); assert_norm (get m1 1 == get m2 1); assert_norm (get m1 2 == get m2 2); assert_norm (get m1 3 == get m2 3); assert_norm (get m1 4 == get m2 4); assert_norm (get m1 5 == get m2 5); assert_norm (get m1 6 == get m2 6); assert_norm (get m1 7 == get m2 7); assert_norm (get m1 8 == get m2 8); assert_norm (get m1 9 == get m2 9); assert_norm (get m1 10 == get m2 10); assert_norm (get m1 11 == get m2 11); assert_norm (get m1 12 == get m2 12); assert_norm (get m1 13 == get m2 13); assert_norm (get m1 14 == get m2 14); assert_norm (get m1 15 == get m2 15); lemma_equal m (eta16 m) let lemma_eta (#a:Type) (m:map16 a) = assert_norm (eta m == eta16 m); lemma_eta16 m let equal #a m1 m2 = m1 == m2 let lemma_equal_intro #a m1 m2 = lemma_equal m1 m2; () let lemma_equal_elim #a m1 m2 = () let rec init_rec (a:Type) (f:(i:nat{i < 16}) -> a) (n:nat) : Pure (map16 a) (requires n <= 16) (ensures fun m -> forall (i:nat).{:pattern sel m i} i < n ==> sel m i == f i) = if n = 0 then let m1 = f 0 in let m4 = ((m1, m1), (m1, m1)) in ((m4, m4), (m4, m4)) else upd (init_rec a f (n - 1)) (n - 1) (f (n - 1)) let init a f = init_rec a f 16 let rec init_ghost_rec (a:Type) (f:(i:nat{i < 16}) -> GTot a) (n:nat) : Ghost (map16 a) (requires n <= 16) (ensures fun m -> forall (i:nat).{:pattern sel m i} i < n ==> sel m i == f i)
false
false
Vale.Lib.Map16.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val init_ghost_rec (a: Type) (f: (i: nat{i < 16} -> GTot a)) (n: nat) : Ghost (map16 a) (requires n <= 16) (ensures fun m -> forall (i: nat). {:pattern sel m i} i < n ==> sel m i == f i)
[ "recursion" ]
Vale.Lib.Map16.init_ghost_rec
{ "file_name": "vale/code/lib/collections/Vale.Lib.Map16.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
a: Type -> f: (i: Prims.nat{i < 16} -> Prims.GTot a) -> n: Prims.nat -> Prims.Ghost (Vale.Lib.Map16.map16 a)
{ "end_col": 56, "end_line": 99, "start_col": 2, "start_line": 94 }
Prims.Tot
val primops : norm_step
[ { "abbrev": false, "full_module": "FStar.Pervasives.Native", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let primops = Primops
val primops : norm_step let primops =
false
null
false
Primops
{ "checked_file": "FStar.Pervasives.fst.checked", "dependencies": [ "prims.fst.checked" ], "interface_file": true, "source_file": "FStar.Pervasives.fst" }
[ "total" ]
[ "FStar.Pervasives.Primops" ]
[]
(* Copyright 2008-2018 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module FStar.Pervasives (* This is a file from the core library, dependencies must be explicit *) open Prims /// Implementation of FStar.Pervasives.fsti let remove_unused_type_parameters _ = () let smt_pat #_ _ = () let smt_pat_or _ = () let spinoff p = p #push-options "--no_tactics" let spinoff_equiv _ = () #pop-options let assert_spinoff _ = () let ambient #_ _ = True let intro_ambient #_ _ = () let normalize_term #_ x = x let normalize a = a noeq type norm_step = | Simpl // Logical simplification, e.g., [P /\ True ~> P] | Weak // Weak reduction: Do not reduce under binders | HNF // Head normal form | Primops // Reduce primitive operators, e.g., [1 + 1 ~> 2] | Delta // Unfold all non-recursive definitions | Zeta // Unroll recursive calls | ZetaFull // Unroll recursive calls fully | Iota // Reduce case analysis (i.e., match) | NBE // Use normalization-by-evaluation, instead of interpretation (experimental) | Reify // Reify effectful definitions into their representations | NormDebug // Turn on debugging for this call | UnfoldOnly : list string -> norm_step // Unlike Delta, unfold definitions for only the given // names, each string is a fully qualified name // like `A.M.f` // idem | UnfoldFully : list string -> norm_step | UnfoldAttr : list string -> norm_step // Unfold definitions marked with the given attributes | UnfoldQual : list string -> norm_step | UnfoldNamespace : list string -> norm_step | Unmeta : norm_step | Unascribe // Remove type ascriptions [t <: ty ~> t] irreducible let simplify = Simpl irreducible let weak = Weak irreducible let hnf = HNF
false
true
FStar.Pervasives.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val primops : norm_step
[]
FStar.Pervasives.primops
{ "file_name": "ulib/FStar.Pervasives.fst", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
FStar.Pervasives.norm_step
{ "end_col": 21, "end_line": 79, "start_col": 14, "start_line": 79 }
Prims.Tot
val ambient (#a: Type) (x: a) : Type0
[ { "abbrev": false, "full_module": "FStar.Pervasives.Native", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let ambient #_ _ = True
val ambient (#a: Type) (x: a) : Type0 let ambient #_ _ =
false
null
false
True
{ "checked_file": "FStar.Pervasives.fst.checked", "dependencies": [ "prims.fst.checked" ], "interface_file": true, "source_file": "FStar.Pervasives.fst" }
[ "total" ]
[ "Prims.l_True" ]
[]
(* Copyright 2008-2018 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module FStar.Pervasives (* This is a file from the core library, dependencies must be explicit *) open Prims /// Implementation of FStar.Pervasives.fsti let remove_unused_type_parameters _ = () let smt_pat #_ _ = () let smt_pat_or _ = () let spinoff p = p #push-options "--no_tactics" let spinoff_equiv _ = () #pop-options let assert_spinoff _ = ()
false
false
FStar.Pervasives.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val ambient (#a: Type) (x: a) : Type0
[]
FStar.Pervasives.ambient
{ "file_name": "ulib/FStar.Pervasives.fst", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
x: a -> Type0
{ "end_col": 23, "end_line": 37, "start_col": 19, "start_line": 37 }
Prims.Tot
val iota : norm_step
[ { "abbrev": false, "full_module": "FStar.Pervasives.Native", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let iota = Iota
val iota : norm_step let iota =
false
null
false
Iota
{ "checked_file": "FStar.Pervasives.fst.checked", "dependencies": [ "prims.fst.checked" ], "interface_file": true, "source_file": "FStar.Pervasives.fst" }
[ "total" ]
[ "FStar.Pervasives.Iota" ]
[]
(* Copyright 2008-2018 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module FStar.Pervasives (* This is a file from the core library, dependencies must be explicit *) open Prims /// Implementation of FStar.Pervasives.fsti let remove_unused_type_parameters _ = () let smt_pat #_ _ = () let smt_pat_or _ = () let spinoff p = p #push-options "--no_tactics" let spinoff_equiv _ = () #pop-options let assert_spinoff _ = () let ambient #_ _ = True let intro_ambient #_ _ = () let normalize_term #_ x = x let normalize a = a noeq type norm_step = | Simpl // Logical simplification, e.g., [P /\ True ~> P] | Weak // Weak reduction: Do not reduce under binders | HNF // Head normal form | Primops // Reduce primitive operators, e.g., [1 + 1 ~> 2] | Delta // Unfold all non-recursive definitions | Zeta // Unroll recursive calls | ZetaFull // Unroll recursive calls fully | Iota // Reduce case analysis (i.e., match) | NBE // Use normalization-by-evaluation, instead of interpretation (experimental) | Reify // Reify effectful definitions into their representations | NormDebug // Turn on debugging for this call | UnfoldOnly : list string -> norm_step // Unlike Delta, unfold definitions for only the given // names, each string is a fully qualified name // like `A.M.f` // idem | UnfoldFully : list string -> norm_step | UnfoldAttr : list string -> norm_step // Unfold definitions marked with the given attributes | UnfoldQual : list string -> norm_step | UnfoldNamespace : list string -> norm_step | Unmeta : norm_step | Unascribe // Remove type ascriptions [t <: ty ~> t] irreducible let simplify = Simpl irreducible let weak = Weak irreducible let hnf = HNF irreducible let primops = Primops irreducible let delta = Delta irreducible let norm_debug = NormDebug irreducible let zeta = Zeta irreducible let zeta_full = ZetaFull
false
true
FStar.Pervasives.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val iota : norm_step
[]
FStar.Pervasives.iota
{ "file_name": "ulib/FStar.Pervasives.fst", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
FStar.Pervasives.norm_step
{ "end_col": 15, "end_line": 94, "start_col": 11, "start_line": 94 }
Prims.Tot
val norm (s: list norm_step) (#a: Type) (x: a) : Tot a
[ { "abbrev": false, "full_module": "FStar.Pervasives.Native", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let norm _ #_ x = x
val norm (s: list norm_step) (#a: Type) (x: a) : Tot a let norm _ #_ x =
false
null
false
x
{ "checked_file": "FStar.Pervasives.fst.checked", "dependencies": [ "prims.fst.checked" ], "interface_file": true, "source_file": "FStar.Pervasives.fst" }
[ "total" ]
[ "Prims.list", "FStar.Pervasives.norm_step" ]
[]
(* Copyright 2008-2018 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module FStar.Pervasives (* This is a file from the core library, dependencies must be explicit *) open Prims /// Implementation of FStar.Pervasives.fsti let remove_unused_type_parameters _ = () let smt_pat #_ _ = () let smt_pat_or _ = () let spinoff p = p #push-options "--no_tactics" let spinoff_equiv _ = () #pop-options let assert_spinoff _ = () let ambient #_ _ = True let intro_ambient #_ _ = () let normalize_term #_ x = x let normalize a = a noeq type norm_step = | Simpl // Logical simplification, e.g., [P /\ True ~> P] | Weak // Weak reduction: Do not reduce under binders | HNF // Head normal form | Primops // Reduce primitive operators, e.g., [1 + 1 ~> 2] | Delta // Unfold all non-recursive definitions | Zeta // Unroll recursive calls | ZetaFull // Unroll recursive calls fully | Iota // Reduce case analysis (i.e., match) | NBE // Use normalization-by-evaluation, instead of interpretation (experimental) | Reify // Reify effectful definitions into their representations | NormDebug // Turn on debugging for this call | UnfoldOnly : list string -> norm_step // Unlike Delta, unfold definitions for only the given // names, each string is a fully qualified name // like `A.M.f` // idem | UnfoldFully : list string -> norm_step | UnfoldAttr : list string -> norm_step // Unfold definitions marked with the given attributes | UnfoldQual : list string -> norm_step | UnfoldNamespace : list string -> norm_step | Unmeta : norm_step | Unascribe // Remove type ascriptions [t <: ty ~> t] irreducible let simplify = Simpl irreducible let weak = Weak irreducible let hnf = HNF irreducible let primops = Primops irreducible let delta = Delta irreducible let norm_debug = NormDebug irreducible let zeta = Zeta irreducible let zeta_full = ZetaFull irreducible let iota = Iota irreducible let nbe = NBE irreducible let reify_ = Reify irreducible let delta_only s = UnfoldOnly s irreducible let delta_fully s = UnfoldFully s irreducible let delta_attr s = UnfoldAttr s irreducible let delta_qualifier s = UnfoldAttr s irreducible let delta_namespace s = UnfoldNamespace s irreducible let unmeta = Unmeta irreducible let unascribe = Unascribe
false
false
FStar.Pervasives.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val norm (s: list norm_step) (#a: Type) (x: a) : Tot a
[]
FStar.Pervasives.norm
{ "file_name": "ulib/FStar.Pervasives.fst", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
s: Prims.list FStar.Pervasives.norm_step -> x: a -> a
{ "end_col": 19, "end_line": 123, "start_col": 18, "start_line": 123 }
Prims.Tot
val zeta_full : norm_step
[ { "abbrev": false, "full_module": "FStar.Pervasives.Native", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let zeta_full = ZetaFull
val zeta_full : norm_step let zeta_full =
false
null
false
ZetaFull
{ "checked_file": "FStar.Pervasives.fst.checked", "dependencies": [ "prims.fst.checked" ], "interface_file": true, "source_file": "FStar.Pervasives.fst" }
[ "total" ]
[ "FStar.Pervasives.ZetaFull" ]
[]
(* Copyright 2008-2018 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module FStar.Pervasives (* This is a file from the core library, dependencies must be explicit *) open Prims /// Implementation of FStar.Pervasives.fsti let remove_unused_type_parameters _ = () let smt_pat #_ _ = () let smt_pat_or _ = () let spinoff p = p #push-options "--no_tactics" let spinoff_equiv _ = () #pop-options let assert_spinoff _ = () let ambient #_ _ = True let intro_ambient #_ _ = () let normalize_term #_ x = x let normalize a = a noeq type norm_step = | Simpl // Logical simplification, e.g., [P /\ True ~> P] | Weak // Weak reduction: Do not reduce under binders | HNF // Head normal form | Primops // Reduce primitive operators, e.g., [1 + 1 ~> 2] | Delta // Unfold all non-recursive definitions | Zeta // Unroll recursive calls | ZetaFull // Unroll recursive calls fully | Iota // Reduce case analysis (i.e., match) | NBE // Use normalization-by-evaluation, instead of interpretation (experimental) | Reify // Reify effectful definitions into their representations | NormDebug // Turn on debugging for this call | UnfoldOnly : list string -> norm_step // Unlike Delta, unfold definitions for only the given // names, each string is a fully qualified name // like `A.M.f` // idem | UnfoldFully : list string -> norm_step | UnfoldAttr : list string -> norm_step // Unfold definitions marked with the given attributes | UnfoldQual : list string -> norm_step | UnfoldNamespace : list string -> norm_step | Unmeta : norm_step | Unascribe // Remove type ascriptions [t <: ty ~> t] irreducible let simplify = Simpl irreducible let weak = Weak irreducible let hnf = HNF irreducible let primops = Primops irreducible let delta = Delta irreducible let norm_debug = NormDebug irreducible let zeta = Zeta
false
true
FStar.Pervasives.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val zeta_full : norm_step
[]
FStar.Pervasives.zeta_full
{ "file_name": "ulib/FStar.Pervasives.fst", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
FStar.Pervasives.norm_step
{ "end_col": 24, "end_line": 91, "start_col": 16, "start_line": 91 }
Prims.Tot
val delta_fully (s: list string) : Tot norm_step
[ { "abbrev": false, "full_module": "FStar.Pervasives.Native", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let delta_fully s = UnfoldFully s
val delta_fully (s: list string) : Tot norm_step let delta_fully s =
false
null
false
UnfoldFully s
{ "checked_file": "FStar.Pervasives.fst.checked", "dependencies": [ "prims.fst.checked" ], "interface_file": true, "source_file": "FStar.Pervasives.fst" }
[ "total" ]
[ "Prims.list", "Prims.string", "FStar.Pervasives.UnfoldFully", "FStar.Pervasives.norm_step" ]
[]
(* Copyright 2008-2018 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module FStar.Pervasives (* This is a file from the core library, dependencies must be explicit *) open Prims /// Implementation of FStar.Pervasives.fsti let remove_unused_type_parameters _ = () let smt_pat #_ _ = () let smt_pat_or _ = () let spinoff p = p #push-options "--no_tactics" let spinoff_equiv _ = () #pop-options let assert_spinoff _ = () let ambient #_ _ = True let intro_ambient #_ _ = () let normalize_term #_ x = x let normalize a = a noeq type norm_step = | Simpl // Logical simplification, e.g., [P /\ True ~> P] | Weak // Weak reduction: Do not reduce under binders | HNF // Head normal form | Primops // Reduce primitive operators, e.g., [1 + 1 ~> 2] | Delta // Unfold all non-recursive definitions | Zeta // Unroll recursive calls | ZetaFull // Unroll recursive calls fully | Iota // Reduce case analysis (i.e., match) | NBE // Use normalization-by-evaluation, instead of interpretation (experimental) | Reify // Reify effectful definitions into their representations | NormDebug // Turn on debugging for this call | UnfoldOnly : list string -> norm_step // Unlike Delta, unfold definitions for only the given // names, each string is a fully qualified name // like `A.M.f` // idem | UnfoldFully : list string -> norm_step | UnfoldAttr : list string -> norm_step // Unfold definitions marked with the given attributes | UnfoldQual : list string -> norm_step | UnfoldNamespace : list string -> norm_step | Unmeta : norm_step | Unascribe // Remove type ascriptions [t <: ty ~> t] irreducible let simplify = Simpl irreducible let weak = Weak irreducible let hnf = HNF irreducible let primops = Primops irreducible let delta = Delta irreducible let norm_debug = NormDebug irreducible let zeta = Zeta irreducible let zeta_full = ZetaFull irreducible let iota = Iota irreducible let nbe = NBE irreducible let reify_ = Reify irreducible let delta_only s = UnfoldOnly s
false
true
FStar.Pervasives.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val delta_fully (s: list string) : Tot norm_step
[]
FStar.Pervasives.delta_fully
{ "file_name": "ulib/FStar.Pervasives.fst", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
s: Prims.list Prims.string -> FStar.Pervasives.norm_step
{ "end_col": 33, "end_line": 106, "start_col": 20, "start_line": 106 }
Prims.Tot
val norm_debug : norm_step
[ { "abbrev": false, "full_module": "FStar.Pervasives.Native", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let norm_debug = NormDebug
val norm_debug : norm_step let norm_debug =
false
null
false
NormDebug
{ "checked_file": "FStar.Pervasives.fst.checked", "dependencies": [ "prims.fst.checked" ], "interface_file": true, "source_file": "FStar.Pervasives.fst" }
[ "total" ]
[ "FStar.Pervasives.NormDebug" ]
[]
(* Copyright 2008-2018 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module FStar.Pervasives (* This is a file from the core library, dependencies must be explicit *) open Prims /// Implementation of FStar.Pervasives.fsti let remove_unused_type_parameters _ = () let smt_pat #_ _ = () let smt_pat_or _ = () let spinoff p = p #push-options "--no_tactics" let spinoff_equiv _ = () #pop-options let assert_spinoff _ = () let ambient #_ _ = True let intro_ambient #_ _ = () let normalize_term #_ x = x let normalize a = a noeq type norm_step = | Simpl // Logical simplification, e.g., [P /\ True ~> P] | Weak // Weak reduction: Do not reduce under binders | HNF // Head normal form | Primops // Reduce primitive operators, e.g., [1 + 1 ~> 2] | Delta // Unfold all non-recursive definitions | Zeta // Unroll recursive calls | ZetaFull // Unroll recursive calls fully | Iota // Reduce case analysis (i.e., match) | NBE // Use normalization-by-evaluation, instead of interpretation (experimental) | Reify // Reify effectful definitions into their representations | NormDebug // Turn on debugging for this call | UnfoldOnly : list string -> norm_step // Unlike Delta, unfold definitions for only the given // names, each string is a fully qualified name // like `A.M.f` // idem | UnfoldFully : list string -> norm_step | UnfoldAttr : list string -> norm_step // Unfold definitions marked with the given attributes | UnfoldQual : list string -> norm_step | UnfoldNamespace : list string -> norm_step | Unmeta : norm_step | Unascribe // Remove type ascriptions [t <: ty ~> t] irreducible let simplify = Simpl irreducible let weak = Weak irreducible let hnf = HNF irreducible let primops = Primops irreducible let delta = Delta
false
true
FStar.Pervasives.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val norm_debug : norm_step
[]
FStar.Pervasives.norm_debug
{ "file_name": "ulib/FStar.Pervasives.fst", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
FStar.Pervasives.norm_step
{ "end_col": 26, "end_line": 85, "start_col": 17, "start_line": 85 }
Prims.Tot
val delta_namespace (s: list string) : Tot norm_step
[ { "abbrev": false, "full_module": "FStar.Pervasives.Native", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let delta_namespace s = UnfoldNamespace s
val delta_namespace (s: list string) : Tot norm_step let delta_namespace s =
false
null
false
UnfoldNamespace s
{ "checked_file": "FStar.Pervasives.fst.checked", "dependencies": [ "prims.fst.checked" ], "interface_file": true, "source_file": "FStar.Pervasives.fst" }
[ "total" ]
[ "Prims.list", "Prims.string", "FStar.Pervasives.UnfoldNamespace", "FStar.Pervasives.norm_step" ]
[]
(* Copyright 2008-2018 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module FStar.Pervasives (* This is a file from the core library, dependencies must be explicit *) open Prims /// Implementation of FStar.Pervasives.fsti let remove_unused_type_parameters _ = () let smt_pat #_ _ = () let smt_pat_or _ = () let spinoff p = p #push-options "--no_tactics" let spinoff_equiv _ = () #pop-options let assert_spinoff _ = () let ambient #_ _ = True let intro_ambient #_ _ = () let normalize_term #_ x = x let normalize a = a noeq type norm_step = | Simpl // Logical simplification, e.g., [P /\ True ~> P] | Weak // Weak reduction: Do not reduce under binders | HNF // Head normal form | Primops // Reduce primitive operators, e.g., [1 + 1 ~> 2] | Delta // Unfold all non-recursive definitions | Zeta // Unroll recursive calls | ZetaFull // Unroll recursive calls fully | Iota // Reduce case analysis (i.e., match) | NBE // Use normalization-by-evaluation, instead of interpretation (experimental) | Reify // Reify effectful definitions into their representations | NormDebug // Turn on debugging for this call | UnfoldOnly : list string -> norm_step // Unlike Delta, unfold definitions for only the given // names, each string is a fully qualified name // like `A.M.f` // idem | UnfoldFully : list string -> norm_step | UnfoldAttr : list string -> norm_step // Unfold definitions marked with the given attributes | UnfoldQual : list string -> norm_step | UnfoldNamespace : list string -> norm_step | Unmeta : norm_step | Unascribe // Remove type ascriptions [t <: ty ~> t] irreducible let simplify = Simpl irreducible let weak = Weak irreducible let hnf = HNF irreducible let primops = Primops irreducible let delta = Delta irreducible let norm_debug = NormDebug irreducible let zeta = Zeta irreducible let zeta_full = ZetaFull irreducible let iota = Iota irreducible let nbe = NBE irreducible let reify_ = Reify irreducible let delta_only s = UnfoldOnly s irreducible let delta_fully s = UnfoldFully s irreducible let delta_attr s = UnfoldAttr s irreducible let delta_qualifier s = UnfoldAttr s
false
true
FStar.Pervasives.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val delta_namespace (s: list string) : Tot norm_step
[]
FStar.Pervasives.delta_namespace
{ "file_name": "ulib/FStar.Pervasives.fst", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
s: Prims.list Prims.string -> FStar.Pervasives.norm_step
{ "end_col": 41, "end_line": 115, "start_col": 24, "start_line": 115 }
Prims.Tot
val nbe : norm_step
[ { "abbrev": false, "full_module": "FStar.Pervasives.Native", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let nbe = NBE
val nbe : norm_step let nbe =
false
null
false
NBE
{ "checked_file": "FStar.Pervasives.fst.checked", "dependencies": [ "prims.fst.checked" ], "interface_file": true, "source_file": "FStar.Pervasives.fst" }
[ "total" ]
[ "FStar.Pervasives.NBE" ]
[]
(* Copyright 2008-2018 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module FStar.Pervasives (* This is a file from the core library, dependencies must be explicit *) open Prims /// Implementation of FStar.Pervasives.fsti let remove_unused_type_parameters _ = () let smt_pat #_ _ = () let smt_pat_or _ = () let spinoff p = p #push-options "--no_tactics" let spinoff_equiv _ = () #pop-options let assert_spinoff _ = () let ambient #_ _ = True let intro_ambient #_ _ = () let normalize_term #_ x = x let normalize a = a noeq type norm_step = | Simpl // Logical simplification, e.g., [P /\ True ~> P] | Weak // Weak reduction: Do not reduce under binders | HNF // Head normal form | Primops // Reduce primitive operators, e.g., [1 + 1 ~> 2] | Delta // Unfold all non-recursive definitions | Zeta // Unroll recursive calls | ZetaFull // Unroll recursive calls fully | Iota // Reduce case analysis (i.e., match) | NBE // Use normalization-by-evaluation, instead of interpretation (experimental) | Reify // Reify effectful definitions into their representations | NormDebug // Turn on debugging for this call | UnfoldOnly : list string -> norm_step // Unlike Delta, unfold definitions for only the given // names, each string is a fully qualified name // like `A.M.f` // idem | UnfoldFully : list string -> norm_step | UnfoldAttr : list string -> norm_step // Unfold definitions marked with the given attributes | UnfoldQual : list string -> norm_step | UnfoldNamespace : list string -> norm_step | Unmeta : norm_step | Unascribe // Remove type ascriptions [t <: ty ~> t] irreducible let simplify = Simpl irreducible let weak = Weak irreducible let hnf = HNF irreducible let primops = Primops irreducible let delta = Delta irreducible let norm_debug = NormDebug irreducible let zeta = Zeta irreducible let zeta_full = ZetaFull irreducible let iota = Iota
false
true
FStar.Pervasives.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val nbe : norm_step
[]
FStar.Pervasives.nbe
{ "file_name": "ulib/FStar.Pervasives.fst", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
FStar.Pervasives.norm_step
{ "end_col": 13, "end_line": 97, "start_col": 10, "start_line": 97 }
Prims.Tot
val unmeta : norm_step
[ { "abbrev": false, "full_module": "FStar.Pervasives.Native", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let unmeta = Unmeta
val unmeta : norm_step let unmeta =
false
null
false
Unmeta
{ "checked_file": "FStar.Pervasives.fst.checked", "dependencies": [ "prims.fst.checked" ], "interface_file": true, "source_file": "FStar.Pervasives.fst" }
[ "total" ]
[ "FStar.Pervasives.Unmeta" ]
[]
(* Copyright 2008-2018 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module FStar.Pervasives (* This is a file from the core library, dependencies must be explicit *) open Prims /// Implementation of FStar.Pervasives.fsti let remove_unused_type_parameters _ = () let smt_pat #_ _ = () let smt_pat_or _ = () let spinoff p = p #push-options "--no_tactics" let spinoff_equiv _ = () #pop-options let assert_spinoff _ = () let ambient #_ _ = True let intro_ambient #_ _ = () let normalize_term #_ x = x let normalize a = a noeq type norm_step = | Simpl // Logical simplification, e.g., [P /\ True ~> P] | Weak // Weak reduction: Do not reduce under binders | HNF // Head normal form | Primops // Reduce primitive operators, e.g., [1 + 1 ~> 2] | Delta // Unfold all non-recursive definitions | Zeta // Unroll recursive calls | ZetaFull // Unroll recursive calls fully | Iota // Reduce case analysis (i.e., match) | NBE // Use normalization-by-evaluation, instead of interpretation (experimental) | Reify // Reify effectful definitions into their representations | NormDebug // Turn on debugging for this call | UnfoldOnly : list string -> norm_step // Unlike Delta, unfold definitions for only the given // names, each string is a fully qualified name // like `A.M.f` // idem | UnfoldFully : list string -> norm_step | UnfoldAttr : list string -> norm_step // Unfold definitions marked with the given attributes | UnfoldQual : list string -> norm_step | UnfoldNamespace : list string -> norm_step | Unmeta : norm_step | Unascribe // Remove type ascriptions [t <: ty ~> t] irreducible let simplify = Simpl irreducible let weak = Weak irreducible let hnf = HNF irreducible let primops = Primops irreducible let delta = Delta irreducible let norm_debug = NormDebug irreducible let zeta = Zeta irreducible let zeta_full = ZetaFull irreducible let iota = Iota irreducible let nbe = NBE irreducible let reify_ = Reify irreducible let delta_only s = UnfoldOnly s irreducible let delta_fully s = UnfoldFully s irreducible let delta_attr s = UnfoldAttr s irreducible let delta_qualifier s = UnfoldAttr s irreducible let delta_namespace s = UnfoldNamespace s
false
true
FStar.Pervasives.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val unmeta : norm_step
[]
FStar.Pervasives.unmeta
{ "file_name": "ulib/FStar.Pervasives.fst", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
FStar.Pervasives.norm_step
{ "end_col": 19, "end_line": 118, "start_col": 13, "start_line": 118 }
Prims.Tot
val delta : norm_step
[ { "abbrev": false, "full_module": "FStar.Pervasives.Native", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let delta = Delta
val delta : norm_step let delta =
false
null
false
Delta
{ "checked_file": "FStar.Pervasives.fst.checked", "dependencies": [ "prims.fst.checked" ], "interface_file": true, "source_file": "FStar.Pervasives.fst" }
[ "total" ]
[ "FStar.Pervasives.Delta" ]
[]
(* Copyright 2008-2018 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module FStar.Pervasives (* This is a file from the core library, dependencies must be explicit *) open Prims /// Implementation of FStar.Pervasives.fsti let remove_unused_type_parameters _ = () let smt_pat #_ _ = () let smt_pat_or _ = () let spinoff p = p #push-options "--no_tactics" let spinoff_equiv _ = () #pop-options let assert_spinoff _ = () let ambient #_ _ = True let intro_ambient #_ _ = () let normalize_term #_ x = x let normalize a = a noeq type norm_step = | Simpl // Logical simplification, e.g., [P /\ True ~> P] | Weak // Weak reduction: Do not reduce under binders | HNF // Head normal form | Primops // Reduce primitive operators, e.g., [1 + 1 ~> 2] | Delta // Unfold all non-recursive definitions | Zeta // Unroll recursive calls | ZetaFull // Unroll recursive calls fully | Iota // Reduce case analysis (i.e., match) | NBE // Use normalization-by-evaluation, instead of interpretation (experimental) | Reify // Reify effectful definitions into their representations | NormDebug // Turn on debugging for this call | UnfoldOnly : list string -> norm_step // Unlike Delta, unfold definitions for only the given // names, each string is a fully qualified name // like `A.M.f` // idem | UnfoldFully : list string -> norm_step | UnfoldAttr : list string -> norm_step // Unfold definitions marked with the given attributes | UnfoldQual : list string -> norm_step | UnfoldNamespace : list string -> norm_step | Unmeta : norm_step | Unascribe // Remove type ascriptions [t <: ty ~> t] irreducible let simplify = Simpl irreducible let weak = Weak irreducible let hnf = HNF irreducible let primops = Primops
false
true
FStar.Pervasives.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val delta : norm_step
[]
FStar.Pervasives.delta
{ "file_name": "ulib/FStar.Pervasives.fst", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
FStar.Pervasives.norm_step
{ "end_col": 17, "end_line": 82, "start_col": 12, "start_line": 82 }
Prims.Tot
val unascribe : norm_step
[ { "abbrev": false, "full_module": "FStar.Pervasives.Native", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let unascribe = Unascribe
val unascribe : norm_step let unascribe =
false
null
false
Unascribe
{ "checked_file": "FStar.Pervasives.fst.checked", "dependencies": [ "prims.fst.checked" ], "interface_file": true, "source_file": "FStar.Pervasives.fst" }
[ "total" ]
[ "FStar.Pervasives.Unascribe" ]
[]
(* Copyright 2008-2018 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module FStar.Pervasives (* This is a file from the core library, dependencies must be explicit *) open Prims /// Implementation of FStar.Pervasives.fsti let remove_unused_type_parameters _ = () let smt_pat #_ _ = () let smt_pat_or _ = () let spinoff p = p #push-options "--no_tactics" let spinoff_equiv _ = () #pop-options let assert_spinoff _ = () let ambient #_ _ = True let intro_ambient #_ _ = () let normalize_term #_ x = x let normalize a = a noeq type norm_step = | Simpl // Logical simplification, e.g., [P /\ True ~> P] | Weak // Weak reduction: Do not reduce under binders | HNF // Head normal form | Primops // Reduce primitive operators, e.g., [1 + 1 ~> 2] | Delta // Unfold all non-recursive definitions | Zeta // Unroll recursive calls | ZetaFull // Unroll recursive calls fully | Iota // Reduce case analysis (i.e., match) | NBE // Use normalization-by-evaluation, instead of interpretation (experimental) | Reify // Reify effectful definitions into their representations | NormDebug // Turn on debugging for this call | UnfoldOnly : list string -> norm_step // Unlike Delta, unfold definitions for only the given // names, each string is a fully qualified name // like `A.M.f` // idem | UnfoldFully : list string -> norm_step | UnfoldAttr : list string -> norm_step // Unfold definitions marked with the given attributes | UnfoldQual : list string -> norm_step | UnfoldNamespace : list string -> norm_step | Unmeta : norm_step | Unascribe // Remove type ascriptions [t <: ty ~> t] irreducible let simplify = Simpl irreducible let weak = Weak irreducible let hnf = HNF irreducible let primops = Primops irreducible let delta = Delta irreducible let norm_debug = NormDebug irreducible let zeta = Zeta irreducible let zeta_full = ZetaFull irreducible let iota = Iota irreducible let nbe = NBE irreducible let reify_ = Reify irreducible let delta_only s = UnfoldOnly s irreducible let delta_fully s = UnfoldFully s irreducible let delta_attr s = UnfoldAttr s irreducible let delta_qualifier s = UnfoldAttr s irreducible let delta_namespace s = UnfoldNamespace s irreducible let unmeta = Unmeta
false
true
FStar.Pervasives.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val unascribe : norm_step
[]
FStar.Pervasives.unascribe
{ "file_name": "ulib/FStar.Pervasives.fst", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
FStar.Pervasives.norm_step
{ "end_col": 25, "end_line": 121, "start_col": 16, "start_line": 121 }
Prims.Tot
val spinoff (p: Type0) : Type0
[ { "abbrev": false, "full_module": "FStar.Pervasives.Native", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let spinoff p = p
val spinoff (p: Type0) : Type0 let spinoff p =
false
null
false
p
{ "checked_file": "FStar.Pervasives.fst.checked", "dependencies": [ "prims.fst.checked" ], "interface_file": true, "source_file": "FStar.Pervasives.fst" }
[ "total" ]
[]
[]
(* Copyright 2008-2018 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module FStar.Pervasives (* This is a file from the core library, dependencies must be explicit *) open Prims /// Implementation of FStar.Pervasives.fsti let remove_unused_type_parameters _ = () let smt_pat #_ _ = () let smt_pat_or _ = ()
false
true
FStar.Pervasives.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val spinoff (p: Type0) : Type0
[]
FStar.Pervasives.spinoff
{ "file_name": "ulib/FStar.Pervasives.fst", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
p: Type0 -> Type0
{ "end_col": 17, "end_line": 29, "start_col": 16, "start_line": 29 }
Prims.Tot
val zeta : norm_step
[ { "abbrev": false, "full_module": "FStar.Pervasives.Native", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let zeta = Zeta
val zeta : norm_step let zeta =
false
null
false
Zeta
{ "checked_file": "FStar.Pervasives.fst.checked", "dependencies": [ "prims.fst.checked" ], "interface_file": true, "source_file": "FStar.Pervasives.fst" }
[ "total" ]
[ "FStar.Pervasives.Zeta" ]
[]
(* Copyright 2008-2018 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module FStar.Pervasives (* This is a file from the core library, dependencies must be explicit *) open Prims /// Implementation of FStar.Pervasives.fsti let remove_unused_type_parameters _ = () let smt_pat #_ _ = () let smt_pat_or _ = () let spinoff p = p #push-options "--no_tactics" let spinoff_equiv _ = () #pop-options let assert_spinoff _ = () let ambient #_ _ = True let intro_ambient #_ _ = () let normalize_term #_ x = x let normalize a = a noeq type norm_step = | Simpl // Logical simplification, e.g., [P /\ True ~> P] | Weak // Weak reduction: Do not reduce under binders | HNF // Head normal form | Primops // Reduce primitive operators, e.g., [1 + 1 ~> 2] | Delta // Unfold all non-recursive definitions | Zeta // Unroll recursive calls | ZetaFull // Unroll recursive calls fully | Iota // Reduce case analysis (i.e., match) | NBE // Use normalization-by-evaluation, instead of interpretation (experimental) | Reify // Reify effectful definitions into their representations | NormDebug // Turn on debugging for this call | UnfoldOnly : list string -> norm_step // Unlike Delta, unfold definitions for only the given // names, each string is a fully qualified name // like `A.M.f` // idem | UnfoldFully : list string -> norm_step | UnfoldAttr : list string -> norm_step // Unfold definitions marked with the given attributes | UnfoldQual : list string -> norm_step | UnfoldNamespace : list string -> norm_step | Unmeta : norm_step | Unascribe // Remove type ascriptions [t <: ty ~> t] irreducible let simplify = Simpl irreducible let weak = Weak irreducible let hnf = HNF irreducible let primops = Primops irreducible let delta = Delta irreducible let norm_debug = NormDebug
false
true
FStar.Pervasives.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val zeta : norm_step
[]
FStar.Pervasives.zeta
{ "file_name": "ulib/FStar.Pervasives.fst", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
FStar.Pervasives.norm_step
{ "end_col": 15, "end_line": 88, "start_col": 11, "start_line": 88 }
Prims.Tot
val delta_attr (s: list string) : Tot norm_step
[ { "abbrev": false, "full_module": "FStar.Pervasives.Native", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let delta_attr s = UnfoldAttr s
val delta_attr (s: list string) : Tot norm_step let delta_attr s =
false
null
false
UnfoldAttr s
{ "checked_file": "FStar.Pervasives.fst.checked", "dependencies": [ "prims.fst.checked" ], "interface_file": true, "source_file": "FStar.Pervasives.fst" }
[ "total" ]
[ "Prims.list", "Prims.string", "FStar.Pervasives.UnfoldAttr", "FStar.Pervasives.norm_step" ]
[]
(* Copyright 2008-2018 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module FStar.Pervasives (* This is a file from the core library, dependencies must be explicit *) open Prims /// Implementation of FStar.Pervasives.fsti let remove_unused_type_parameters _ = () let smt_pat #_ _ = () let smt_pat_or _ = () let spinoff p = p #push-options "--no_tactics" let spinoff_equiv _ = () #pop-options let assert_spinoff _ = () let ambient #_ _ = True let intro_ambient #_ _ = () let normalize_term #_ x = x let normalize a = a noeq type norm_step = | Simpl // Logical simplification, e.g., [P /\ True ~> P] | Weak // Weak reduction: Do not reduce under binders | HNF // Head normal form | Primops // Reduce primitive operators, e.g., [1 + 1 ~> 2] | Delta // Unfold all non-recursive definitions | Zeta // Unroll recursive calls | ZetaFull // Unroll recursive calls fully | Iota // Reduce case analysis (i.e., match) | NBE // Use normalization-by-evaluation, instead of interpretation (experimental) | Reify // Reify effectful definitions into their representations | NormDebug // Turn on debugging for this call | UnfoldOnly : list string -> norm_step // Unlike Delta, unfold definitions for only the given // names, each string is a fully qualified name // like `A.M.f` // idem | UnfoldFully : list string -> norm_step | UnfoldAttr : list string -> norm_step // Unfold definitions marked with the given attributes | UnfoldQual : list string -> norm_step | UnfoldNamespace : list string -> norm_step | Unmeta : norm_step | Unascribe // Remove type ascriptions [t <: ty ~> t] irreducible let simplify = Simpl irreducible let weak = Weak irreducible let hnf = HNF irreducible let primops = Primops irreducible let delta = Delta irreducible let norm_debug = NormDebug irreducible let zeta = Zeta irreducible let zeta_full = ZetaFull irreducible let iota = Iota irreducible let nbe = NBE irreducible let reify_ = Reify irreducible let delta_only s = UnfoldOnly s irreducible let delta_fully s = UnfoldFully s
false
true
FStar.Pervasives.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val delta_attr (s: list string) : Tot norm_step
[]
FStar.Pervasives.delta_attr
{ "file_name": "ulib/FStar.Pervasives.fst", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
s: Prims.list Prims.string -> FStar.Pervasives.norm_step
{ "end_col": 31, "end_line": 109, "start_col": 19, "start_line": 109 }
Prims.Tot
val singleton (#a: Type) (x: a) : Tot (y: a{y == x})
[ { "abbrev": false, "full_module": "FStar.Pervasives.Native", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let singleton #_ x = x
val singleton (#a: Type) (x: a) : Tot (y: a{y == x}) let singleton #_ x =
false
null
false
x
{ "checked_file": "FStar.Pervasives.fst.checked", "dependencies": [ "prims.fst.checked" ], "interface_file": true, "source_file": "FStar.Pervasives.fst" }
[ "total" ]
[ "Prims.eq2" ]
[]
(* Copyright 2008-2018 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module FStar.Pervasives (* This is a file from the core library, dependencies must be explicit *) open Prims /// Implementation of FStar.Pervasives.fsti let remove_unused_type_parameters _ = () let smt_pat #_ _ = () let smt_pat_or _ = () let spinoff p = p #push-options "--no_tactics" let spinoff_equiv _ = () #pop-options let assert_spinoff _ = () let ambient #_ _ = True let intro_ambient #_ _ = () let normalize_term #_ x = x let normalize a = a noeq type norm_step = | Simpl // Logical simplification, e.g., [P /\ True ~> P] | Weak // Weak reduction: Do not reduce under binders | HNF // Head normal form | Primops // Reduce primitive operators, e.g., [1 + 1 ~> 2] | Delta // Unfold all non-recursive definitions | Zeta // Unroll recursive calls | ZetaFull // Unroll recursive calls fully | Iota // Reduce case analysis (i.e., match) | NBE // Use normalization-by-evaluation, instead of interpretation (experimental) | Reify // Reify effectful definitions into their representations | NormDebug // Turn on debugging for this call | UnfoldOnly : list string -> norm_step // Unlike Delta, unfold definitions for only the given // names, each string is a fully qualified name // like `A.M.f` // idem | UnfoldFully : list string -> norm_step | UnfoldAttr : list string -> norm_step // Unfold definitions marked with the given attributes | UnfoldQual : list string -> norm_step | UnfoldNamespace : list string -> norm_step | Unmeta : norm_step | Unascribe // Remove type ascriptions [t <: ty ~> t] irreducible let simplify = Simpl irreducible let weak = Weak irreducible let hnf = HNF irreducible let primops = Primops irreducible let delta = Delta irreducible let norm_debug = NormDebug irreducible let zeta = Zeta irreducible let zeta_full = ZetaFull irreducible let iota = Iota irreducible let nbe = NBE irreducible let reify_ = Reify irreducible let delta_only s = UnfoldOnly s irreducible let delta_fully s = UnfoldFully s irreducible let delta_attr s = UnfoldAttr s irreducible let delta_qualifier s = UnfoldAttr s irreducible let delta_namespace s = UnfoldNamespace s irreducible let unmeta = Unmeta irreducible let unascribe = Unascribe let norm _ #_ x = x let assert_norm _ = () let normalize_term_spec #_ _ = () let normalize_spec _ = () let norm_spec _ #_ _ = () let inversion _ = True let allow_inversion _ = () let invertOption _ = () let rec false_elim #_ _ = false_elim () let inline_let = () let rename_let _ = () let plugin _ = () let tcnorm = () let must_erase_for_extraction = () let dm4f_bind_range = () let expect_failure _ = () let expect_lax_failure _ = () let tcdecltime = () let unifier_hint_injective = () let strict_on_arguments _ = () let resolve_implicits = () let override_resolve_implicits_handler #a x l = () let handle_smt_goals = () let erasable = () let commute_nested_matches = () let noextract_to _ = () let normalize_for_extraction _ = () let ite_soundness_by _ = () let default_effect _ = () let top_level_effect _ = () let effect_param = () let bind_has_range_args = () let primitive_extraction = () let extract_as_impure_effect = () let strictly_positive = () let unused = () let no_auto_projectors = () let no_subtyping = () let admit_termination = ()
false
false
FStar.Pervasives.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val singleton (#a: Type) (x: a) : Tot (y: a{y == x})
[]
FStar.Pervasives.singleton
{ "file_name": "ulib/FStar.Pervasives.fst", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
x: a -> y: a{y == x}
{ "end_col": 22, "end_line": 197, "start_col": 21, "start_line": 197 }
Prims.Tot
val normalize_term (#a: Type) (x: a) : Tot a
[ { "abbrev": false, "full_module": "FStar.Pervasives.Native", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let normalize_term #_ x = x
val normalize_term (#a: Type) (x: a) : Tot a let normalize_term #_ x =
false
null
false
x
{ "checked_file": "FStar.Pervasives.fst.checked", "dependencies": [ "prims.fst.checked" ], "interface_file": true, "source_file": "FStar.Pervasives.fst" }
[ "total" ]
[]
[]
(* Copyright 2008-2018 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module FStar.Pervasives (* This is a file from the core library, dependencies must be explicit *) open Prims /// Implementation of FStar.Pervasives.fsti let remove_unused_type_parameters _ = () let smt_pat #_ _ = () let smt_pat_or _ = () let spinoff p = p #push-options "--no_tactics" let spinoff_equiv _ = () #pop-options let assert_spinoff _ = () let ambient #_ _ = True let intro_ambient #_ _ = ()
false
false
FStar.Pervasives.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val normalize_term (#a: Type) (x: a) : Tot a
[]
FStar.Pervasives.normalize_term
{ "file_name": "ulib/FStar.Pervasives.fst", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
x: a -> a
{ "end_col": 27, "end_line": 41, "start_col": 26, "start_line": 41 }
Prims.Tot
val normalize (a: Type0) : Type0
[ { "abbrev": false, "full_module": "FStar.Pervasives.Native", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let normalize a = a
val normalize (a: Type0) : Type0 let normalize a =
false
null
false
a
{ "checked_file": "FStar.Pervasives.fst.checked", "dependencies": [ "prims.fst.checked" ], "interface_file": true, "source_file": "FStar.Pervasives.fst" }
[ "total" ]
[]
[]
(* Copyright 2008-2018 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module FStar.Pervasives (* This is a file from the core library, dependencies must be explicit *) open Prims /// Implementation of FStar.Pervasives.fsti let remove_unused_type_parameters _ = () let smt_pat #_ _ = () let smt_pat_or _ = () let spinoff p = p #push-options "--no_tactics" let spinoff_equiv _ = () #pop-options let assert_spinoff _ = () let ambient #_ _ = True let intro_ambient #_ _ = () let normalize_term #_ x = x
false
true
FStar.Pervasives.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val normalize (a: Type0) : Type0
[]
FStar.Pervasives.normalize
{ "file_name": "ulib/FStar.Pervasives.fst", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
a: Type0 -> Type0
{ "end_col": 19, "end_line": 43, "start_col": 18, "start_line": 43 }
Prims.Tot
val simplify : norm_step
[ { "abbrev": false, "full_module": "FStar.Pervasives.Native", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let simplify = Simpl
val simplify : norm_step let simplify =
false
null
false
Simpl
{ "checked_file": "FStar.Pervasives.fst.checked", "dependencies": [ "prims.fst.checked" ], "interface_file": true, "source_file": "FStar.Pervasives.fst" }
[ "total" ]
[ "FStar.Pervasives.Simpl" ]
[]
(* Copyright 2008-2018 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module FStar.Pervasives (* This is a file from the core library, dependencies must be explicit *) open Prims /// Implementation of FStar.Pervasives.fsti let remove_unused_type_parameters _ = () let smt_pat #_ _ = () let smt_pat_or _ = () let spinoff p = p #push-options "--no_tactics" let spinoff_equiv _ = () #pop-options let assert_spinoff _ = () let ambient #_ _ = True let intro_ambient #_ _ = () let normalize_term #_ x = x let normalize a = a noeq type norm_step = | Simpl // Logical simplification, e.g., [P /\ True ~> P] | Weak // Weak reduction: Do not reduce under binders | HNF // Head normal form | Primops // Reduce primitive operators, e.g., [1 + 1 ~> 2] | Delta // Unfold all non-recursive definitions | Zeta // Unroll recursive calls | ZetaFull // Unroll recursive calls fully | Iota // Reduce case analysis (i.e., match) | NBE // Use normalization-by-evaluation, instead of interpretation (experimental) | Reify // Reify effectful definitions into their representations | NormDebug // Turn on debugging for this call | UnfoldOnly : list string -> norm_step // Unlike Delta, unfold definitions for only the given // names, each string is a fully qualified name // like `A.M.f` // idem | UnfoldFully : list string -> norm_step | UnfoldAttr : list string -> norm_step // Unfold definitions marked with the given attributes | UnfoldQual : list string -> norm_step | UnfoldNamespace : list string -> norm_step | Unmeta : norm_step | Unascribe // Remove type ascriptions [t <: ty ~> t]
false
true
FStar.Pervasives.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val simplify : norm_step
[]
FStar.Pervasives.simplify
{ "file_name": "ulib/FStar.Pervasives.fst", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
FStar.Pervasives.norm_step
{ "end_col": 20, "end_line": 70, "start_col": 15, "start_line": 70 }
Prims.Tot
val delta_only (s: list string) : Tot norm_step
[ { "abbrev": false, "full_module": "FStar.Pervasives.Native", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let delta_only s = UnfoldOnly s
val delta_only (s: list string) : Tot norm_step let delta_only s =
false
null
false
UnfoldOnly s
{ "checked_file": "FStar.Pervasives.fst.checked", "dependencies": [ "prims.fst.checked" ], "interface_file": true, "source_file": "FStar.Pervasives.fst" }
[ "total" ]
[ "Prims.list", "Prims.string", "FStar.Pervasives.UnfoldOnly", "FStar.Pervasives.norm_step" ]
[]
(* Copyright 2008-2018 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module FStar.Pervasives (* This is a file from the core library, dependencies must be explicit *) open Prims /// Implementation of FStar.Pervasives.fsti let remove_unused_type_parameters _ = () let smt_pat #_ _ = () let smt_pat_or _ = () let spinoff p = p #push-options "--no_tactics" let spinoff_equiv _ = () #pop-options let assert_spinoff _ = () let ambient #_ _ = True let intro_ambient #_ _ = () let normalize_term #_ x = x let normalize a = a noeq type norm_step = | Simpl // Logical simplification, e.g., [P /\ True ~> P] | Weak // Weak reduction: Do not reduce under binders | HNF // Head normal form | Primops // Reduce primitive operators, e.g., [1 + 1 ~> 2] | Delta // Unfold all non-recursive definitions | Zeta // Unroll recursive calls | ZetaFull // Unroll recursive calls fully | Iota // Reduce case analysis (i.e., match) | NBE // Use normalization-by-evaluation, instead of interpretation (experimental) | Reify // Reify effectful definitions into their representations | NormDebug // Turn on debugging for this call | UnfoldOnly : list string -> norm_step // Unlike Delta, unfold definitions for only the given // names, each string is a fully qualified name // like `A.M.f` // idem | UnfoldFully : list string -> norm_step | UnfoldAttr : list string -> norm_step // Unfold definitions marked with the given attributes | UnfoldQual : list string -> norm_step | UnfoldNamespace : list string -> norm_step | Unmeta : norm_step | Unascribe // Remove type ascriptions [t <: ty ~> t] irreducible let simplify = Simpl irreducible let weak = Weak irreducible let hnf = HNF irreducible let primops = Primops irreducible let delta = Delta irreducible let norm_debug = NormDebug irreducible let zeta = Zeta irreducible let zeta_full = ZetaFull irreducible let iota = Iota irreducible let nbe = NBE irreducible let reify_ = Reify
false
true
FStar.Pervasives.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val delta_only (s: list string) : Tot norm_step
[]
FStar.Pervasives.delta_only
{ "file_name": "ulib/FStar.Pervasives.fst", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
s: Prims.list Prims.string -> FStar.Pervasives.norm_step
{ "end_col": 31, "end_line": 103, "start_col": 19, "start_line": 103 }
Prims.Tot
val hnf : norm_step
[ { "abbrev": false, "full_module": "FStar.Pervasives.Native", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let hnf = HNF
val hnf : norm_step let hnf =
false
null
false
HNF
{ "checked_file": "FStar.Pervasives.fst.checked", "dependencies": [ "prims.fst.checked" ], "interface_file": true, "source_file": "FStar.Pervasives.fst" }
[ "total" ]
[ "FStar.Pervasives.HNF" ]
[]
(* Copyright 2008-2018 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module FStar.Pervasives (* This is a file from the core library, dependencies must be explicit *) open Prims /// Implementation of FStar.Pervasives.fsti let remove_unused_type_parameters _ = () let smt_pat #_ _ = () let smt_pat_or _ = () let spinoff p = p #push-options "--no_tactics" let spinoff_equiv _ = () #pop-options let assert_spinoff _ = () let ambient #_ _ = True let intro_ambient #_ _ = () let normalize_term #_ x = x let normalize a = a noeq type norm_step = | Simpl // Logical simplification, e.g., [P /\ True ~> P] | Weak // Weak reduction: Do not reduce under binders | HNF // Head normal form | Primops // Reduce primitive operators, e.g., [1 + 1 ~> 2] | Delta // Unfold all non-recursive definitions | Zeta // Unroll recursive calls | ZetaFull // Unroll recursive calls fully | Iota // Reduce case analysis (i.e., match) | NBE // Use normalization-by-evaluation, instead of interpretation (experimental) | Reify // Reify effectful definitions into their representations | NormDebug // Turn on debugging for this call | UnfoldOnly : list string -> norm_step // Unlike Delta, unfold definitions for only the given // names, each string is a fully qualified name // like `A.M.f` // idem | UnfoldFully : list string -> norm_step | UnfoldAttr : list string -> norm_step // Unfold definitions marked with the given attributes | UnfoldQual : list string -> norm_step | UnfoldNamespace : list string -> norm_step | Unmeta : norm_step | Unascribe // Remove type ascriptions [t <: ty ~> t] irreducible let simplify = Simpl irreducible let weak = Weak
false
true
FStar.Pervasives.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val hnf : norm_step
[]
FStar.Pervasives.hnf
{ "file_name": "ulib/FStar.Pervasives.fst", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
FStar.Pervasives.norm_step
{ "end_col": 13, "end_line": 76, "start_col": 10, "start_line": 76 }
Prims.Tot
val delta_qualifier (s: list string) : Tot norm_step
[ { "abbrev": false, "full_module": "FStar.Pervasives.Native", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let delta_qualifier s = UnfoldAttr s
val delta_qualifier (s: list string) : Tot norm_step let delta_qualifier s =
false
null
false
UnfoldAttr s
{ "checked_file": "FStar.Pervasives.fst.checked", "dependencies": [ "prims.fst.checked" ], "interface_file": true, "source_file": "FStar.Pervasives.fst" }
[ "total" ]
[ "Prims.list", "Prims.string", "FStar.Pervasives.UnfoldAttr", "FStar.Pervasives.norm_step" ]
[]
(* Copyright 2008-2018 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module FStar.Pervasives (* This is a file from the core library, dependencies must be explicit *) open Prims /// Implementation of FStar.Pervasives.fsti let remove_unused_type_parameters _ = () let smt_pat #_ _ = () let smt_pat_or _ = () let spinoff p = p #push-options "--no_tactics" let spinoff_equiv _ = () #pop-options let assert_spinoff _ = () let ambient #_ _ = True let intro_ambient #_ _ = () let normalize_term #_ x = x let normalize a = a noeq type norm_step = | Simpl // Logical simplification, e.g., [P /\ True ~> P] | Weak // Weak reduction: Do not reduce under binders | HNF // Head normal form | Primops // Reduce primitive operators, e.g., [1 + 1 ~> 2] | Delta // Unfold all non-recursive definitions | Zeta // Unroll recursive calls | ZetaFull // Unroll recursive calls fully | Iota // Reduce case analysis (i.e., match) | NBE // Use normalization-by-evaluation, instead of interpretation (experimental) | Reify // Reify effectful definitions into their representations | NormDebug // Turn on debugging for this call | UnfoldOnly : list string -> norm_step // Unlike Delta, unfold definitions for only the given // names, each string is a fully qualified name // like `A.M.f` // idem | UnfoldFully : list string -> norm_step | UnfoldAttr : list string -> norm_step // Unfold definitions marked with the given attributes | UnfoldQual : list string -> norm_step | UnfoldNamespace : list string -> norm_step | Unmeta : norm_step | Unascribe // Remove type ascriptions [t <: ty ~> t] irreducible let simplify = Simpl irreducible let weak = Weak irreducible let hnf = HNF irreducible let primops = Primops irreducible let delta = Delta irreducible let norm_debug = NormDebug irreducible let zeta = Zeta irreducible let zeta_full = ZetaFull irreducible let iota = Iota irreducible let nbe = NBE irreducible let reify_ = Reify irreducible let delta_only s = UnfoldOnly s irreducible let delta_fully s = UnfoldFully s irreducible let delta_attr s = UnfoldAttr s
false
true
FStar.Pervasives.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val delta_qualifier (s: list string) : Tot norm_step
[]
FStar.Pervasives.delta_qualifier
{ "file_name": "ulib/FStar.Pervasives.fst", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
s: Prims.list Prims.string -> FStar.Pervasives.norm_step
{ "end_col": 36, "end_line": 112, "start_col": 24, "start_line": 112 }
Prims.Tot
val reify_ : norm_step
[ { "abbrev": false, "full_module": "FStar.Pervasives.Native", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let reify_ = Reify
val reify_ : norm_step let reify_ =
false
null
false
Reify
{ "checked_file": "FStar.Pervasives.fst.checked", "dependencies": [ "prims.fst.checked" ], "interface_file": true, "source_file": "FStar.Pervasives.fst" }
[ "total" ]
[ "FStar.Pervasives.Reify" ]
[]
(* Copyright 2008-2018 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module FStar.Pervasives (* This is a file from the core library, dependencies must be explicit *) open Prims /// Implementation of FStar.Pervasives.fsti let remove_unused_type_parameters _ = () let smt_pat #_ _ = () let smt_pat_or _ = () let spinoff p = p #push-options "--no_tactics" let spinoff_equiv _ = () #pop-options let assert_spinoff _ = () let ambient #_ _ = True let intro_ambient #_ _ = () let normalize_term #_ x = x let normalize a = a noeq type norm_step = | Simpl // Logical simplification, e.g., [P /\ True ~> P] | Weak // Weak reduction: Do not reduce under binders | HNF // Head normal form | Primops // Reduce primitive operators, e.g., [1 + 1 ~> 2] | Delta // Unfold all non-recursive definitions | Zeta // Unroll recursive calls | ZetaFull // Unroll recursive calls fully | Iota // Reduce case analysis (i.e., match) | NBE // Use normalization-by-evaluation, instead of interpretation (experimental) | Reify // Reify effectful definitions into their representations | NormDebug // Turn on debugging for this call | UnfoldOnly : list string -> norm_step // Unlike Delta, unfold definitions for only the given // names, each string is a fully qualified name // like `A.M.f` // idem | UnfoldFully : list string -> norm_step | UnfoldAttr : list string -> norm_step // Unfold definitions marked with the given attributes | UnfoldQual : list string -> norm_step | UnfoldNamespace : list string -> norm_step | Unmeta : norm_step | Unascribe // Remove type ascriptions [t <: ty ~> t] irreducible let simplify = Simpl irreducible let weak = Weak irreducible let hnf = HNF irreducible let primops = Primops irreducible let delta = Delta irreducible let norm_debug = NormDebug irreducible let zeta = Zeta irreducible let zeta_full = ZetaFull irreducible let iota = Iota irreducible let nbe = NBE
false
true
FStar.Pervasives.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val reify_ : norm_step
[]
FStar.Pervasives.reify_
{ "file_name": "ulib/FStar.Pervasives.fst", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
FStar.Pervasives.norm_step
{ "end_col": 18, "end_line": 100, "start_col": 13, "start_line": 100 }
Prims.Tot
val weak : norm_step
[ { "abbrev": false, "full_module": "FStar.Pervasives.Native", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let weak = Weak
val weak : norm_step let weak =
false
null
false
Weak
{ "checked_file": "FStar.Pervasives.fst.checked", "dependencies": [ "prims.fst.checked" ], "interface_file": true, "source_file": "FStar.Pervasives.fst" }
[ "total" ]
[ "FStar.Pervasives.Weak" ]
[]
(* Copyright 2008-2018 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module FStar.Pervasives (* This is a file from the core library, dependencies must be explicit *) open Prims /// Implementation of FStar.Pervasives.fsti let remove_unused_type_parameters _ = () let smt_pat #_ _ = () let smt_pat_or _ = () let spinoff p = p #push-options "--no_tactics" let spinoff_equiv _ = () #pop-options let assert_spinoff _ = () let ambient #_ _ = True let intro_ambient #_ _ = () let normalize_term #_ x = x let normalize a = a noeq type norm_step = | Simpl // Logical simplification, e.g., [P /\ True ~> P] | Weak // Weak reduction: Do not reduce under binders | HNF // Head normal form | Primops // Reduce primitive operators, e.g., [1 + 1 ~> 2] | Delta // Unfold all non-recursive definitions | Zeta // Unroll recursive calls | ZetaFull // Unroll recursive calls fully | Iota // Reduce case analysis (i.e., match) | NBE // Use normalization-by-evaluation, instead of interpretation (experimental) | Reify // Reify effectful definitions into their representations | NormDebug // Turn on debugging for this call | UnfoldOnly : list string -> norm_step // Unlike Delta, unfold definitions for only the given // names, each string is a fully qualified name // like `A.M.f` // idem | UnfoldFully : list string -> norm_step | UnfoldAttr : list string -> norm_step // Unfold definitions marked with the given attributes | UnfoldQual : list string -> norm_step | UnfoldNamespace : list string -> norm_step | Unmeta : norm_step | Unascribe // Remove type ascriptions [t <: ty ~> t] irreducible let simplify = Simpl
false
true
FStar.Pervasives.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val weak : norm_step
[]
FStar.Pervasives.weak
{ "file_name": "ulib/FStar.Pervasives.fst", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
FStar.Pervasives.norm_step
{ "end_col": 15, "end_line": 73, "start_col": 11, "start_line": 73 }
Prims.Tot
val inversion (a: Type) : Type0
[ { "abbrev": false, "full_module": "FStar.Pervasives.Native", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let inversion _ = True
val inversion (a: Type) : Type0 let inversion _ =
false
null
false
True
{ "checked_file": "FStar.Pervasives.fst.checked", "dependencies": [ "prims.fst.checked" ], "interface_file": true, "source_file": "FStar.Pervasives.fst" }
[ "total" ]
[ "Prims.l_True" ]
[]
(* Copyright 2008-2018 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module FStar.Pervasives (* This is a file from the core library, dependencies must be explicit *) open Prims /// Implementation of FStar.Pervasives.fsti let remove_unused_type_parameters _ = () let smt_pat #_ _ = () let smt_pat_or _ = () let spinoff p = p #push-options "--no_tactics" let spinoff_equiv _ = () #pop-options let assert_spinoff _ = () let ambient #_ _ = True let intro_ambient #_ _ = () let normalize_term #_ x = x let normalize a = a noeq type norm_step = | Simpl // Logical simplification, e.g., [P /\ True ~> P] | Weak // Weak reduction: Do not reduce under binders | HNF // Head normal form | Primops // Reduce primitive operators, e.g., [1 + 1 ~> 2] | Delta // Unfold all non-recursive definitions | Zeta // Unroll recursive calls | ZetaFull // Unroll recursive calls fully | Iota // Reduce case analysis (i.e., match) | NBE // Use normalization-by-evaluation, instead of interpretation (experimental) | Reify // Reify effectful definitions into their representations | NormDebug // Turn on debugging for this call | UnfoldOnly : list string -> norm_step // Unlike Delta, unfold definitions for only the given // names, each string is a fully qualified name // like `A.M.f` // idem | UnfoldFully : list string -> norm_step | UnfoldAttr : list string -> norm_step // Unfold definitions marked with the given attributes | UnfoldQual : list string -> norm_step | UnfoldNamespace : list string -> norm_step | Unmeta : norm_step | Unascribe // Remove type ascriptions [t <: ty ~> t] irreducible let simplify = Simpl irreducible let weak = Weak irreducible let hnf = HNF irreducible let primops = Primops irreducible let delta = Delta irreducible let norm_debug = NormDebug irreducible let zeta = Zeta irreducible let zeta_full = ZetaFull irreducible let iota = Iota irreducible let nbe = NBE irreducible let reify_ = Reify irreducible let delta_only s = UnfoldOnly s irreducible let delta_fully s = UnfoldFully s irreducible let delta_attr s = UnfoldAttr s irreducible let delta_qualifier s = UnfoldAttr s irreducible let delta_namespace s = UnfoldNamespace s irreducible let unmeta = Unmeta irreducible let unascribe = Unascribe let norm _ #_ x = x let assert_norm _ = () let normalize_term_spec #_ _ = () let normalize_spec _ = () let norm_spec _ #_ _ = ()
false
true
FStar.Pervasives.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val inversion (a: Type) : Type0
[]
FStar.Pervasives.inversion
{ "file_name": "ulib/FStar.Pervasives.fst", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
a: Type -> Type0
{ "end_col": 22, "end_line": 133, "start_col": 18, "start_line": 133 }
Prims.Tot
val false_elim (#a: Type) (u: unit{False}) : Tot a
[ { "abbrev": false, "full_module": "FStar.Pervasives.Native", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let rec false_elim #_ _ = false_elim ()
val false_elim (#a: Type) (u: unit{False}) : Tot a let rec false_elim #_ _ =
false
null
false
false_elim ()
{ "checked_file": "FStar.Pervasives.fst.checked", "dependencies": [ "prims.fst.checked" ], "interface_file": true, "source_file": "FStar.Pervasives.fst" }
[ "total" ]
[ "Prims.unit", "Prims.l_False", "FStar.Pervasives.false_elim" ]
[]
(* Copyright 2008-2018 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module FStar.Pervasives (* This is a file from the core library, dependencies must be explicit *) open Prims /// Implementation of FStar.Pervasives.fsti let remove_unused_type_parameters _ = () let smt_pat #_ _ = () let smt_pat_or _ = () let spinoff p = p #push-options "--no_tactics" let spinoff_equiv _ = () #pop-options let assert_spinoff _ = () let ambient #_ _ = True let intro_ambient #_ _ = () let normalize_term #_ x = x let normalize a = a noeq type norm_step = | Simpl // Logical simplification, e.g., [P /\ True ~> P] | Weak // Weak reduction: Do not reduce under binders | HNF // Head normal form | Primops // Reduce primitive operators, e.g., [1 + 1 ~> 2] | Delta // Unfold all non-recursive definitions | Zeta // Unroll recursive calls | ZetaFull // Unroll recursive calls fully | Iota // Reduce case analysis (i.e., match) | NBE // Use normalization-by-evaluation, instead of interpretation (experimental) | Reify // Reify effectful definitions into their representations | NormDebug // Turn on debugging for this call | UnfoldOnly : list string -> norm_step // Unlike Delta, unfold definitions for only the given // names, each string is a fully qualified name // like `A.M.f` // idem | UnfoldFully : list string -> norm_step | UnfoldAttr : list string -> norm_step // Unfold definitions marked with the given attributes | UnfoldQual : list string -> norm_step | UnfoldNamespace : list string -> norm_step | Unmeta : norm_step | Unascribe // Remove type ascriptions [t <: ty ~> t] irreducible let simplify = Simpl irreducible let weak = Weak irreducible let hnf = HNF irreducible let primops = Primops irreducible let delta = Delta irreducible let norm_debug = NormDebug irreducible let zeta = Zeta irreducible let zeta_full = ZetaFull irreducible let iota = Iota irreducible let nbe = NBE irreducible let reify_ = Reify irreducible let delta_only s = UnfoldOnly s irreducible let delta_fully s = UnfoldFully s irreducible let delta_attr s = UnfoldAttr s irreducible let delta_qualifier s = UnfoldAttr s irreducible let delta_namespace s = UnfoldNamespace s irreducible let unmeta = Unmeta irreducible let unascribe = Unascribe let norm _ #_ x = x let assert_norm _ = () let normalize_term_spec #_ _ = () let normalize_spec _ = () let norm_spec _ #_ _ = () let inversion _ = True let allow_inversion _ = () let invertOption _ = ()
false
false
FStar.Pervasives.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val false_elim (#a: Type) (u: unit{False}) : Tot a
[ "recursion" ]
FStar.Pervasives.false_elim
{ "file_name": "ulib/FStar.Pervasives.fst", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
u361: u362: Prims.unit{Prims.l_False} -> a
{ "end_col": 39, "end_line": 139, "start_col": 26, "start_line": 139 }
Prims.Tot
val increasing:preorder nat
[ { "abbrev": false, "full_module": "FStar.Preorder", "short_module": null }, { "abbrev": false, "full_module": "Steel.Preorder", "short_module": null }, { "abbrev": false, "full_module": "FStar.PCM", "short_module": null }, { "abbrev": false, "full_module": "Steel", "short_module": null }, { "abbrev": false, "full_module": "Steel", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let increasing : preorder nat = fun (x y:nat) -> b2t (x <= y)
val increasing:preorder nat let increasing:preorder nat =
false
null
false
fun (x: nat) (y: nat) -> b2t (x <= y)
{ "checked_file": "Steel.MonotonicCounter.fst.checked", "dependencies": [ "Steel.Preorder.fst.checked", "prims.fst.checked", "FStar.Preorder.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.PCM.fst.checked", "FStar.Math.Lib.fst.checked" ], "interface_file": false, "source_file": "Steel.MonotonicCounter.fst" }
[ "total" ]
[ "Prims.nat", "Prims.b2t", "Prims.op_LessThanOrEqual", "Prims.logical" ]
[]
(* Copyright 2020 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module Steel.MonotonicCounter open FStar.PCM open Steel.Preorder open FStar.Preorder /// This small module is an experiment that demonstrate how to use [Steel.Preorder] to define /// a monotonically increasing counter. (* The PCM corresponding to the monotonically increasing counter is just the maximum element *) let pre_pcm : pcm' nat = { composable=(fun x y -> True); op=(fun (x y:nat) -> Math.Lib.max x y); one=0 } let mctr_pcm : pcm nat = { p=pre_pcm; comm=(fun _ _ -> ()); assoc=(fun _ _ _ -> ()); assoc_r=(fun _ _ _ -> ()); is_unit=(fun _ -> ()); refine=(fun _ -> True); }
false
true
Steel.MonotonicCounter.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val increasing:preorder nat
[]
Steel.MonotonicCounter.increasing
{ "file_name": "lib/steel/Steel.MonotonicCounter.fst", "git_rev": "7fbb54e94dd4f48ff7cb867d3bae6889a635541e", "git_url": "https://github.com/FStarLang/steel.git", "project_name": "steel" }
FStar.Preorder.preorder Prims.nat
{ "end_col": 61, "end_line": 42, "start_col": 32, "start_line": 42 }
Prims.Tot
val pre_pcm:pcm' nat
[ { "abbrev": false, "full_module": "FStar.Preorder", "short_module": null }, { "abbrev": false, "full_module": "Steel.Preorder", "short_module": null }, { "abbrev": false, "full_module": "FStar.PCM", "short_module": null }, { "abbrev": false, "full_module": "Steel", "short_module": null }, { "abbrev": false, "full_module": "Steel", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let pre_pcm : pcm' nat = { composable=(fun x y -> True); op=(fun (x y:nat) -> Math.Lib.max x y); one=0 }
val pre_pcm:pcm' nat let pre_pcm:pcm' nat =
false
null
false
{ composable = (fun x y -> True); op = (fun (x: nat) (y: nat) -> Math.Lib.max x y); one = 0 }
{ "checked_file": "Steel.MonotonicCounter.fst.checked", "dependencies": [ "Steel.Preorder.fst.checked", "prims.fst.checked", "FStar.Preorder.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.PCM.fst.checked", "FStar.Math.Lib.fst.checked" ], "interface_file": false, "source_file": "Steel.MonotonicCounter.fst" }
[ "total" ]
[ "FStar.PCM.Mkpcm'", "Prims.nat", "Prims.l_True", "Prims.prop", "FStar.Math.Lib.max" ]
[]
(* Copyright 2020 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module Steel.MonotonicCounter open FStar.PCM open Steel.Preorder open FStar.Preorder /// This small module is an experiment that demonstrate how to use [Steel.Preorder] to define /// a monotonically increasing counter. (* The PCM corresponding to the monotonically increasing counter is just the maximum element *)
false
true
Steel.MonotonicCounter.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val pre_pcm:pcm' nat
[]
Steel.MonotonicCounter.pre_pcm
{ "file_name": "lib/steel/Steel.MonotonicCounter.fst", "git_rev": "7fbb54e94dd4f48ff7cb867d3bae6889a635541e", "git_url": "https://github.com/FStarLang/steel.git", "project_name": "steel" }
FStar.PCM.pcm' Prims.nat
{ "end_col": 7, "end_line": 30, "start_col": 2, "start_line": 28 }
FStar.Pervasives.Lemma
val test (x z: nat) (f: (nat -> prop){stable f increasing}) : Lemma (requires (compatible mctr_pcm x z /\ f x)) (ensures f z)
[ { "abbrev": false, "full_module": "FStar.Preorder", "short_module": null }, { "abbrev": false, "full_module": "Steel.Preorder", "short_module": null }, { "abbrev": false, "full_module": "FStar.PCM", "short_module": null }, { "abbrev": false, "full_module": "Steel", "short_module": null }, { "abbrev": false, "full_module": "Steel", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let test (x z:nat) (f:(nat -> prop){stable f increasing}) : Lemma (requires (compatible mctr_pcm x z /\ f x)) (ensures f z) = assert (increasing x z)
val test (x z: nat) (f: (nat -> prop){stable f increasing}) : Lemma (requires (compatible mctr_pcm x z /\ f x)) (ensures f z) let test (x z: nat) (f: (nat -> prop){stable f increasing}) : Lemma (requires (compatible mctr_pcm x z /\ f x)) (ensures f z) =
false
null
true
assert (increasing x z)
{ "checked_file": "Steel.MonotonicCounter.fst.checked", "dependencies": [ "Steel.Preorder.fst.checked", "prims.fst.checked", "FStar.Preorder.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.PCM.fst.checked", "FStar.Math.Lib.fst.checked" ], "interface_file": false, "source_file": "Steel.MonotonicCounter.fst" }
[ "lemma" ]
[ "Prims.nat", "Prims.prop", "FStar.Preorder.stable", "Steel.MonotonicCounter.increasing", "Prims._assert", "Prims.unit", "Prims.l_and", "FStar.PCM.compatible", "Steel.MonotonicCounter.mctr_pcm", "Prims.squash", "Prims.Nil", "FStar.Pervasives.pattern" ]
[]
(* Copyright 2020 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module Steel.MonotonicCounter open FStar.PCM open Steel.Preorder open FStar.Preorder /// This small module is an experiment that demonstrate how to use [Steel.Preorder] to define /// a monotonically increasing counter. (* The PCM corresponding to the monotonically increasing counter is just the maximum element *) let pre_pcm : pcm' nat = { composable=(fun x y -> True); op=(fun (x y:nat) -> Math.Lib.max x y); one=0 } let mctr_pcm : pcm nat = { p=pre_pcm; comm=(fun _ _ -> ()); assoc=(fun _ _ _ -> ()); assoc_r=(fun _ _ _ -> ()); is_unit=(fun _ -> ()); refine=(fun _ -> True); } (** This is a classical preorder for monotonic increase *) let increasing : preorder nat = fun (x y:nat) -> b2t (x <= y) (** Indeed, the [increasing] preorder is induced by the PCM *) #push-options "--warn_error -271" let mctr_induces_increases : squash (induces_preorder mctr_pcm increasing) = let aux (x y:nat) (f:frame_preserving_upd mctr_pcm x y) (v:nat) : Lemma (requires compatible mctr_pcm x v) (ensures increasing v (f v)) [SMTPat ()] = assert (composable mctr_pcm x v) in () #pop-options (** Small test: two values compatible for the PCM preserve a stable fact for the preorder *) let test (x z:nat) (f:(nat -> prop){stable f increasing}) : Lemma (requires (compatible mctr_pcm x z /\ f x))
false
false
Steel.MonotonicCounter.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val test (x z: nat) (f: (nat -> prop){stable f increasing}) : Lemma (requires (compatible mctr_pcm x z /\ f x)) (ensures f z)
[]
Steel.MonotonicCounter.test
{ "file_name": "lib/steel/Steel.MonotonicCounter.fst", "git_rev": "7fbb54e94dd4f48ff7cb867d3bae6889a635541e", "git_url": "https://github.com/FStarLang/steel.git", "project_name": "steel" }
x: Prims.nat -> z: Prims.nat -> f: (_: Prims.nat -> Prims.prop){FStar.Preorder.stable f Steel.MonotonicCounter.increasing} -> FStar.Pervasives.Lemma (requires FStar.PCM.compatible Steel.MonotonicCounter.mctr_pcm x z /\ f x) (ensures f z)
{ "end_col": 27, "end_line": 62, "start_col": 4, "start_line": 62 }
Prims.Tot
val mctr_induces_increases:squash (induces_preorder mctr_pcm increasing)
[ { "abbrev": false, "full_module": "FStar.Preorder", "short_module": null }, { "abbrev": false, "full_module": "Steel.Preorder", "short_module": null }, { "abbrev": false, "full_module": "FStar.PCM", "short_module": null }, { "abbrev": false, "full_module": "Steel", "short_module": null }, { "abbrev": false, "full_module": "Steel", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let mctr_induces_increases : squash (induces_preorder mctr_pcm increasing) = let aux (x y:nat) (f:frame_preserving_upd mctr_pcm x y) (v:nat) : Lemma (requires compatible mctr_pcm x v) (ensures increasing v (f v)) [SMTPat ()] = assert (composable mctr_pcm x v) in ()
val mctr_induces_increases:squash (induces_preorder mctr_pcm increasing) let mctr_induces_increases:squash (induces_preorder mctr_pcm increasing) =
false
null
true
let aux (x y: nat) (f: frame_preserving_upd mctr_pcm x y) (v: nat) : Lemma (requires compatible mctr_pcm x v) (ensures increasing v (f v)) [SMTPat ()] = assert (composable mctr_pcm x v) in ()
{ "checked_file": "Steel.MonotonicCounter.fst.checked", "dependencies": [ "Steel.Preorder.fst.checked", "prims.fst.checked", "FStar.Preorder.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.PCM.fst.checked", "FStar.Math.Lib.fst.checked" ], "interface_file": false, "source_file": "Steel.MonotonicCounter.fst" }
[ "total" ]
[ "Prims.nat", "FStar.PCM.frame_preserving_upd", "Steel.MonotonicCounter.mctr_pcm", "Prims.unit", "FStar.PCM.compatible", "Prims.squash", "Steel.MonotonicCounter.increasing", "Prims.Cons", "FStar.Pervasives.pattern", "FStar.Pervasives.smt_pat", "Prims.Nil", "Prims._assert", "FStar.PCM.composable" ]
[]
(* Copyright 2020 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module Steel.MonotonicCounter open FStar.PCM open Steel.Preorder open FStar.Preorder /// This small module is an experiment that demonstrate how to use [Steel.Preorder] to define /// a monotonically increasing counter. (* The PCM corresponding to the monotonically increasing counter is just the maximum element *) let pre_pcm : pcm' nat = { composable=(fun x y -> True); op=(fun (x y:nat) -> Math.Lib.max x y); one=0 } let mctr_pcm : pcm nat = { p=pre_pcm; comm=(fun _ _ -> ()); assoc=(fun _ _ _ -> ()); assoc_r=(fun _ _ _ -> ()); is_unit=(fun _ -> ()); refine=(fun _ -> True); } (** This is a classical preorder for monotonic increase *) let increasing : preorder nat = fun (x y:nat) -> b2t (x <= y) (** Indeed, the [increasing] preorder is induced by the PCM *) #push-options "--warn_error -271" let mctr_induces_increases
false
true
Steel.MonotonicCounter.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val mctr_induces_increases:squash (induces_preorder mctr_pcm increasing)
[]
Steel.MonotonicCounter.mctr_induces_increases
{ "file_name": "lib/steel/Steel.MonotonicCounter.fst", "git_rev": "7fbb54e94dd4f48ff7cb867d3bae6889a635541e", "git_url": "https://github.com/FStarLang/steel.git", "project_name": "steel" }
Prims.squash (Steel.Preorder.induces_preorder Steel.MonotonicCounter.mctr_pcm Steel.MonotonicCounter.increasing)
{ "end_col": 6, "end_line": 54, "start_col": 3, "start_line": 48 }
Prims.Tot
val mctr_pcm:pcm nat
[ { "abbrev": false, "full_module": "FStar.Preorder", "short_module": null }, { "abbrev": false, "full_module": "Steel.Preorder", "short_module": null }, { "abbrev": false, "full_module": "FStar.PCM", "short_module": null }, { "abbrev": false, "full_module": "Steel", "short_module": null }, { "abbrev": false, "full_module": "Steel", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let mctr_pcm : pcm nat = { p=pre_pcm; comm=(fun _ _ -> ()); assoc=(fun _ _ _ -> ()); assoc_r=(fun _ _ _ -> ()); is_unit=(fun _ -> ()); refine=(fun _ -> True); }
val mctr_pcm:pcm nat let mctr_pcm:pcm nat =
false
null
false
{ p = pre_pcm; comm = (fun _ _ -> ()); assoc = (fun _ _ _ -> ()); assoc_r = (fun _ _ _ -> ()); is_unit = (fun _ -> ()); refine = (fun _ -> True) }
{ "checked_file": "Steel.MonotonicCounter.fst.checked", "dependencies": [ "Steel.Preorder.fst.checked", "prims.fst.checked", "FStar.Preorder.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.PCM.fst.checked", "FStar.Math.Lib.fst.checked" ], "interface_file": false, "source_file": "Steel.MonotonicCounter.fst" }
[ "total" ]
[ "FStar.PCM.Mkpcm", "Prims.nat", "Steel.MonotonicCounter.pre_pcm", "FStar.PCM.__proj__Mkpcm'__item__composable", "Prims.unit", "Prims.l_and", "FStar.PCM.__proj__Mkpcm'__item__op", "Prims.l_True", "Prims.prop" ]
[]
(* Copyright 2020 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module Steel.MonotonicCounter open FStar.PCM open Steel.Preorder open FStar.Preorder /// This small module is an experiment that demonstrate how to use [Steel.Preorder] to define /// a monotonically increasing counter. (* The PCM corresponding to the monotonically increasing counter is just the maximum element *) let pre_pcm : pcm' nat = { composable=(fun x y -> True); op=(fun (x y:nat) -> Math.Lib.max x y); one=0 }
false
true
Steel.MonotonicCounter.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val mctr_pcm:pcm nat
[]
Steel.MonotonicCounter.mctr_pcm
{ "file_name": "lib/steel/Steel.MonotonicCounter.fst", "git_rev": "7fbb54e94dd4f48ff7cb867d3bae6889a635541e", "git_url": "https://github.com/FStarLang/steel.git", "project_name": "steel" }
FStar.PCM.pcm Prims.nat
{ "end_col": 25, "end_line": 38, "start_col": 2, "start_line": 33 }
Prims.GTot
val list_rev_inv (#t: Type) (l: list t) (b: bool) (x: (list t * list t)) : GTot Type0
[ { "abbrev": true, "full_module": "FStar.List.Tot", "short_module": "L" }, { "abbrev": true, "full_module": "C.Loops", "short_module": "CL" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": true, "full_module": "FStar.Bytes", "short_module": "B32" }, { "abbrev": false, "full_module": "LowParse.SLow.Combinators", "short_module": null }, { "abbrev": false, "full_module": "LowParse.Spec.List", "short_module": null }, { "abbrev": false, "full_module": "LowParse.SLow", "short_module": null }, { "abbrev": false, "full_module": "LowParse.SLow", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let list_rev_inv (#t: Type) (l: list t) (b: bool) (x: list t * list t) : GTot Type0 = let (rem, acc) = x in L.rev l == L.rev_acc rem acc /\ (b == false ==> rem == [])
val list_rev_inv (#t: Type) (l: list t) (b: bool) (x: (list t * list t)) : GTot Type0 let list_rev_inv (#t: Type) (l: list t) (b: bool) (x: list t * list t) : GTot Type0 =
false
null
false
let rem, acc = x in L.rev l == L.rev_acc rem acc /\ (b == false ==> rem == [])
{ "checked_file": "LowParse.SLow.List.fst.checked", "dependencies": [ "prims.fst.checked", "LowParse.Spec.List.fsti.checked", "LowParse.SLow.Combinators.fst.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.Bytes.fsti.checked", "C.Loops.fst.checked" ], "interface_file": false, "source_file": "LowParse.SLow.List.fst" }
[ "sometrivial" ]
[ "Prims.list", "Prims.bool", "FStar.Pervasives.Native.tuple2", "Prims.l_and", "Prims.eq2", "FStar.List.Tot.Base.rev", "FStar.List.Tot.Base.rev_acc", "Prims.l_imp", "Prims.Nil" ]
[]
module LowParse.SLow.List include LowParse.Spec.List include LowParse.SLow.Combinators module B32 = FStar.Bytes module U32 = FStar.UInt32 module CL = C.Loops #set-options "--z3rlimit 16 --max_fuel 8 --max_ifuel 8" module L = FStar.List.Tot let rec parse_list_tailrec' (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) (aux: list t) : GTot (option (list t)) (decreases (B32.length b)) = parse_list_eq p (B32.reveal b); if B32.len b = 0ul then Some (L.rev aux) else match p32 b with | None -> None | Some (v, n) -> if n = 0ul then None (* elements cannot be empty *) else parse_list_tailrec' p32 (B32.slice b n (B32.len b)) (v :: aux) let list_append_rev_cons (#t: Type) (v: t) (aux l: list t) : Lemma (L.append (L.rev (v ::aux)) l == L.append (L.rev aux) (v :: l)) = L.rev_rev' (v :: aux); L.rev_rev' aux; L.append_assoc (L.rev aux) [v] l let rec parse_list_tailrec'_correct' (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) (aux: list t) : Lemma (requires True) (ensures ( parse_list_tailrec' p32 b aux == ( match parse (parse_list p) (B32.reveal b) with | Some (l, n) -> Some (L.append (L.rev aux) l) | None -> None ))) (decreases (B32.length b)) = parse_list_eq p (B32.reveal b); if B32.len b = 0ul then L.append_l_nil (L.rev aux) else match p32 b with | None -> () | Some (v, n) -> if n = 0ul then () else begin let s = B32.slice b n (B32.len b) in parse_list_tailrec'_correct' p32 s (v :: aux); match parse (parse_list p) (B32.reveal s) with | Some (l, n') -> list_append_rev_cons v aux l | None -> () end let parse_list_tailrec'_correct (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) : Lemma begin match parse (parse_list p) (B32.reveal b) with | Some (l, n) -> parse_list_tailrec' p32 b [] == Some l | None -> parse_list_tailrec' p32 b [] == None end = parse_list_tailrec'_correct' p32 b [] let list_rev_inv (#t: Type) (l: list t) (b: bool) (x: list t * list t)
false
false
LowParse.SLow.List.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 8, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 16, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val list_rev_inv (#t: Type) (l: list t) (b: bool) (x: (list t * list t)) : GTot Type0
[]
LowParse.SLow.List.list_rev_inv
{ "file_name": "src/lowparse/LowParse.SLow.List.fst", "git_rev": "446a08ce38df905547cf20f28c43776b22b8087a", "git_url": "https://github.com/project-everest/everparse.git", "project_name": "everparse" }
l: Prims.list t -> b: Prims.bool -> x: (Prims.list t * Prims.list t) -> Prims.GTot Type0
{ "end_col": 28, "end_line": 100, "start_col": 1, "start_line": 98 }
Prims.GTot
val partial_serialize32_list'_measure (#t: Type) (x: (bytes32 * list t)) : GTot nat
[ { "abbrev": true, "full_module": "FStar.List.Tot", "short_module": "L" }, { "abbrev": true, "full_module": "C.Loops", "short_module": "CL" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": true, "full_module": "FStar.Bytes", "short_module": "B32" }, { "abbrev": false, "full_module": "LowParse.SLow.Combinators", "short_module": null }, { "abbrev": false, "full_module": "LowParse.Spec.List", "short_module": null }, { "abbrev": false, "full_module": "LowParse.SLow", "short_module": null }, { "abbrev": false, "full_module": "LowParse.SLow", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let partial_serialize32_list'_measure (#t: Type) (x: bytes32 * list t) : GTot nat = L.length (snd x)
val partial_serialize32_list'_measure (#t: Type) (x: (bytes32 * list t)) : GTot nat let partial_serialize32_list'_measure (#t: Type) (x: bytes32 * list t) : GTot nat =
false
null
false
L.length (snd x)
{ "checked_file": "LowParse.SLow.List.fst.checked", "dependencies": [ "prims.fst.checked", "LowParse.Spec.List.fsti.checked", "LowParse.SLow.Combinators.fst.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.Bytes.fsti.checked", "C.Loops.fst.checked" ], "interface_file": false, "source_file": "LowParse.SLow.List.fst" }
[ "sometrivial" ]
[ "FStar.Pervasives.Native.tuple2", "LowParse.SLow.Base.bytes32", "Prims.list", "FStar.List.Tot.Base.length", "FStar.Pervasives.Native.snd", "Prims.nat" ]
[]
module LowParse.SLow.List include LowParse.Spec.List include LowParse.SLow.Combinators module B32 = FStar.Bytes module U32 = FStar.UInt32 module CL = C.Loops #set-options "--z3rlimit 16 --max_fuel 8 --max_ifuel 8" module L = FStar.List.Tot let rec parse_list_tailrec' (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) (aux: list t) : GTot (option (list t)) (decreases (B32.length b)) = parse_list_eq p (B32.reveal b); if B32.len b = 0ul then Some (L.rev aux) else match p32 b with | None -> None | Some (v, n) -> if n = 0ul then None (* elements cannot be empty *) else parse_list_tailrec' p32 (B32.slice b n (B32.len b)) (v :: aux) let list_append_rev_cons (#t: Type) (v: t) (aux l: list t) : Lemma (L.append (L.rev (v ::aux)) l == L.append (L.rev aux) (v :: l)) = L.rev_rev' (v :: aux); L.rev_rev' aux; L.append_assoc (L.rev aux) [v] l let rec parse_list_tailrec'_correct' (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) (aux: list t) : Lemma (requires True) (ensures ( parse_list_tailrec' p32 b aux == ( match parse (parse_list p) (B32.reveal b) with | Some (l, n) -> Some (L.append (L.rev aux) l) | None -> None ))) (decreases (B32.length b)) = parse_list_eq p (B32.reveal b); if B32.len b = 0ul then L.append_l_nil (L.rev aux) else match p32 b with | None -> () | Some (v, n) -> if n = 0ul then () else begin let s = B32.slice b n (B32.len b) in parse_list_tailrec'_correct' p32 s (v :: aux); match parse (parse_list p) (B32.reveal s) with | Some (l, n') -> list_append_rev_cons v aux l | None -> () end let parse_list_tailrec'_correct (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) : Lemma begin match parse (parse_list p) (B32.reveal b) with | Some (l, n) -> parse_list_tailrec' p32 b [] == Some l | None -> parse_list_tailrec' p32 b [] == None end = parse_list_tailrec'_correct' p32 b [] let list_rev_inv (#t: Type) (l: list t) (b: bool) (x: list t * list t) : GTot Type0 = let (rem, acc) = x in L.rev l == L.rev_acc rem acc /\ (b == false ==> rem == []) let list_rev (#t: Type) (l: list t) : Tot (l' : list t { l' == L.rev l } ) = match l with | [] -> [] | _ -> let (_, l') = CL.total_while (fun (rem, _) -> L.length rem) (list_rev_inv l) (fun (rem, acc) -> match rem with | [] -> (false, (rem, acc)) | a :: q -> (true, (q, a :: acc)) ) (l, []) in l' let parse_list_tailrec_inv (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (input: bytes32) (b: bool) (x: option (bytes32 * list t)) : GTot Type0 = match x with | Some (input', accu') -> parse_list_tailrec' p32 input [] == parse_list_tailrec' p32 input' accu' /\ (b == false ==> B32.length input' == 0) | None -> b == false /\ None? (parse_list_tailrec' p32 input []) let parse_list_tailrec_measure (#t: Type) (x: option (bytes32 * list t)) : GTot nat = match x with | None -> 0 | Some (input', _) -> B32.length input' inline_for_extraction let parse_list_tailrec_body (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (input: bytes32) : (x: option (bytes32 * list t)) -> Pure (bool * option (bytes32 * list t)) (requires (parse_list_tailrec_inv p32 input true x)) (ensures (fun (continue, y) -> parse_list_tailrec_inv p32 input continue y /\ (if continue then parse_list_tailrec_measure y < parse_list_tailrec_measure x else True) )) = fun (x: option (bytes32 * list t)) -> let (Some (input', accu')) = x in let len = B32.len input' in if len = 0ul then (false, x) else match p32 input' with | Some (v, consumed) -> if consumed = 0ul then (false, None) else let input'' = B32.slice input' consumed len in (true, Some (input'', v :: accu')) | None -> (false, None) inline_for_extraction let parse_list_tailrec (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (input: bytes32) : Tot (res: option (list t) { res == parse_list_tailrec' p32 input [] } ) = let accu = CL.total_while (parse_list_tailrec_measure #t) (parse_list_tailrec_inv p32 input) (fun x -> parse_list_tailrec_body p32 input x) (Some (input, [])) in match accu with | None -> None | Some (_, accu') -> Some (list_rev accu') inline_for_extraction let parse32_list (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) : Tot (parser32 (parse_list p)) = fun (input: bytes32) -> (( parse_list_tailrec'_correct p32 input; parser_kind_prop_equiv parse_list_kind (parse_list p); match parse_list_tailrec p32 input with | None -> None | Some res -> Some (res, B32.len input) ) <: (res: option (list t * U32.t) { parser32_correct (parse_list p) input res } )) let rec partial_serialize32_list' (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (input: list t) : Ghost bytes32 (requires ( serialize_list_precond k /\ ( Seq.length (serialize (serialize_list p s) input) < 4294967296 ))) (ensures (fun (res: bytes32) -> serialize_list_precond k /\ serializer32_correct (serialize_list p s) input res )) (decreases input) = match input with | [] -> serialize_list_nil p s; let res = B32.empty_bytes in assert (Seq.equal (B32.reveal res) (Seq.empty)); res | a :: q -> serialize_list_cons p s a q; let sa = s32 a in let sq = partial_serialize32_list' p s s32 q in let res = B32.append sa sq in res let rec partial_serialize32_list_tailrec' (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (accu: bytes32) (input: list t) : Ghost bytes32 (requires ( serialize_list_precond k /\ ( B32.length accu + Seq.length (serialize (serialize_list p s) input) < 4294967296 ))) (ensures (fun (res: bytes32) -> serialize_list_precond k /\ Seq.length (serialize (serialize_list p s) input) < 4294967296 /\ B32.reveal res == Seq.append (B32.reveal accu) (B32.reveal (partial_serialize32_list' p s s32 input)) )) (decreases input) = match input with | [] -> serialize_list_nil p s; Seq.append_empty_r (B32.reveal accu); accu | a :: q -> serialize_list_cons p s a q; let sa = s32 a in let accu' = B32.append accu sa in Seq.append_assoc (B32.reveal accu) (B32.reveal sa) (B32.reveal (partial_serialize32_list' p s s32 q)); partial_serialize32_list_tailrec' p s s32 accu' q let partial_serialize32_list'_inv (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (input: list t) (continue: bool) (x: bytes32 * list t) : GTot Type0 = serialize_list_precond k /\ Seq.length (serialize (serialize_list p s) input) < 4294967296 /\ ( let (accu, input') = x in B32.length accu + Seq.length (serialize (serialize_list p s) input') < 4294967296 /\ serializer32_correct (serialize_list p s) input (partial_serialize32_list_tailrec' p s s32 accu input') /\ (continue == false ==> L.length input' == 0) ) let partial_serialize32_list'_measure (#t: Type) (x: bytes32 * list t)
false
false
LowParse.SLow.List.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 8, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 16, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val partial_serialize32_list'_measure (#t: Type) (x: (bytes32 * list t)) : GTot nat
[]
LowParse.SLow.List.partial_serialize32_list'_measure
{ "file_name": "src/lowparse/LowParse.SLow.List.fst", "git_rev": "446a08ce38df905547cf20f28c43776b22b8087a", "git_url": "https://github.com/project-everest/everparse.git", "project_name": "everparse" }
x: (LowParse.SLow.Base.bytes32 * Prims.list t) -> Prims.GTot Prims.nat
{ "end_col": 18, "end_line": 296, "start_col": 2, "start_line": 296 }
Prims.GTot
val size32_list_measure (#t: Type) (accu: (U32.t * list t)) : GTot nat
[ { "abbrev": true, "full_module": "FStar.List.Tot", "short_module": "L" }, { "abbrev": true, "full_module": "C.Loops", "short_module": "CL" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": true, "full_module": "FStar.Bytes", "short_module": "B32" }, { "abbrev": false, "full_module": "LowParse.SLow.Combinators", "short_module": null }, { "abbrev": false, "full_module": "LowParse.Spec.List", "short_module": null }, { "abbrev": false, "full_module": "LowParse.SLow", "short_module": null }, { "abbrev": false, "full_module": "LowParse.SLow", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let size32_list_measure (#t: Type) (accu: (U32.t * list t)) : GTot nat = let (_, rem) = accu in L.length rem
val size32_list_measure (#t: Type) (accu: (U32.t * list t)) : GTot nat let size32_list_measure (#t: Type) (accu: (U32.t * list t)) : GTot nat =
false
null
false
let _, rem = accu in L.length rem
{ "checked_file": "LowParse.SLow.List.fst.checked", "dependencies": [ "prims.fst.checked", "LowParse.Spec.List.fsti.checked", "LowParse.SLow.Combinators.fst.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.Bytes.fsti.checked", "C.Loops.fst.checked" ], "interface_file": false, "source_file": "LowParse.SLow.List.fst" }
[ "sometrivial" ]
[ "FStar.Pervasives.Native.tuple2", "FStar.UInt32.t", "Prims.list", "FStar.List.Tot.Base.length", "Prims.nat" ]
[]
module LowParse.SLow.List include LowParse.Spec.List include LowParse.SLow.Combinators module B32 = FStar.Bytes module U32 = FStar.UInt32 module CL = C.Loops #set-options "--z3rlimit 16 --max_fuel 8 --max_ifuel 8" module L = FStar.List.Tot let rec parse_list_tailrec' (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) (aux: list t) : GTot (option (list t)) (decreases (B32.length b)) = parse_list_eq p (B32.reveal b); if B32.len b = 0ul then Some (L.rev aux) else match p32 b with | None -> None | Some (v, n) -> if n = 0ul then None (* elements cannot be empty *) else parse_list_tailrec' p32 (B32.slice b n (B32.len b)) (v :: aux) let list_append_rev_cons (#t: Type) (v: t) (aux l: list t) : Lemma (L.append (L.rev (v ::aux)) l == L.append (L.rev aux) (v :: l)) = L.rev_rev' (v :: aux); L.rev_rev' aux; L.append_assoc (L.rev aux) [v] l let rec parse_list_tailrec'_correct' (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) (aux: list t) : Lemma (requires True) (ensures ( parse_list_tailrec' p32 b aux == ( match parse (parse_list p) (B32.reveal b) with | Some (l, n) -> Some (L.append (L.rev aux) l) | None -> None ))) (decreases (B32.length b)) = parse_list_eq p (B32.reveal b); if B32.len b = 0ul then L.append_l_nil (L.rev aux) else match p32 b with | None -> () | Some (v, n) -> if n = 0ul then () else begin let s = B32.slice b n (B32.len b) in parse_list_tailrec'_correct' p32 s (v :: aux); match parse (parse_list p) (B32.reveal s) with | Some (l, n') -> list_append_rev_cons v aux l | None -> () end let parse_list_tailrec'_correct (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) : Lemma begin match parse (parse_list p) (B32.reveal b) with | Some (l, n) -> parse_list_tailrec' p32 b [] == Some l | None -> parse_list_tailrec' p32 b [] == None end = parse_list_tailrec'_correct' p32 b [] let list_rev_inv (#t: Type) (l: list t) (b: bool) (x: list t * list t) : GTot Type0 = let (rem, acc) = x in L.rev l == L.rev_acc rem acc /\ (b == false ==> rem == []) let list_rev (#t: Type) (l: list t) : Tot (l' : list t { l' == L.rev l } ) = match l with | [] -> [] | _ -> let (_, l') = CL.total_while (fun (rem, _) -> L.length rem) (list_rev_inv l) (fun (rem, acc) -> match rem with | [] -> (false, (rem, acc)) | a :: q -> (true, (q, a :: acc)) ) (l, []) in l' let parse_list_tailrec_inv (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (input: bytes32) (b: bool) (x: option (bytes32 * list t)) : GTot Type0 = match x with | Some (input', accu') -> parse_list_tailrec' p32 input [] == parse_list_tailrec' p32 input' accu' /\ (b == false ==> B32.length input' == 0) | None -> b == false /\ None? (parse_list_tailrec' p32 input []) let parse_list_tailrec_measure (#t: Type) (x: option (bytes32 * list t)) : GTot nat = match x with | None -> 0 | Some (input', _) -> B32.length input' inline_for_extraction let parse_list_tailrec_body (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (input: bytes32) : (x: option (bytes32 * list t)) -> Pure (bool * option (bytes32 * list t)) (requires (parse_list_tailrec_inv p32 input true x)) (ensures (fun (continue, y) -> parse_list_tailrec_inv p32 input continue y /\ (if continue then parse_list_tailrec_measure y < parse_list_tailrec_measure x else True) )) = fun (x: option (bytes32 * list t)) -> let (Some (input', accu')) = x in let len = B32.len input' in if len = 0ul then (false, x) else match p32 input' with | Some (v, consumed) -> if consumed = 0ul then (false, None) else let input'' = B32.slice input' consumed len in (true, Some (input'', v :: accu')) | None -> (false, None) inline_for_extraction let parse_list_tailrec (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (input: bytes32) : Tot (res: option (list t) { res == parse_list_tailrec' p32 input [] } ) = let accu = CL.total_while (parse_list_tailrec_measure #t) (parse_list_tailrec_inv p32 input) (fun x -> parse_list_tailrec_body p32 input x) (Some (input, [])) in match accu with | None -> None | Some (_, accu') -> Some (list_rev accu') inline_for_extraction let parse32_list (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) : Tot (parser32 (parse_list p)) = fun (input: bytes32) -> (( parse_list_tailrec'_correct p32 input; parser_kind_prop_equiv parse_list_kind (parse_list p); match parse_list_tailrec p32 input with | None -> None | Some res -> Some (res, B32.len input) ) <: (res: option (list t * U32.t) { parser32_correct (parse_list p) input res } )) let rec partial_serialize32_list' (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (input: list t) : Ghost bytes32 (requires ( serialize_list_precond k /\ ( Seq.length (serialize (serialize_list p s) input) < 4294967296 ))) (ensures (fun (res: bytes32) -> serialize_list_precond k /\ serializer32_correct (serialize_list p s) input res )) (decreases input) = match input with | [] -> serialize_list_nil p s; let res = B32.empty_bytes in assert (Seq.equal (B32.reveal res) (Seq.empty)); res | a :: q -> serialize_list_cons p s a q; let sa = s32 a in let sq = partial_serialize32_list' p s s32 q in let res = B32.append sa sq in res let rec partial_serialize32_list_tailrec' (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (accu: bytes32) (input: list t) : Ghost bytes32 (requires ( serialize_list_precond k /\ ( B32.length accu + Seq.length (serialize (serialize_list p s) input) < 4294967296 ))) (ensures (fun (res: bytes32) -> serialize_list_precond k /\ Seq.length (serialize (serialize_list p s) input) < 4294967296 /\ B32.reveal res == Seq.append (B32.reveal accu) (B32.reveal (partial_serialize32_list' p s s32 input)) )) (decreases input) = match input with | [] -> serialize_list_nil p s; Seq.append_empty_r (B32.reveal accu); accu | a :: q -> serialize_list_cons p s a q; let sa = s32 a in let accu' = B32.append accu sa in Seq.append_assoc (B32.reveal accu) (B32.reveal sa) (B32.reveal (partial_serialize32_list' p s s32 q)); partial_serialize32_list_tailrec' p s s32 accu' q let partial_serialize32_list'_inv (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (input: list t) (continue: bool) (x: bytes32 * list t) : GTot Type0 = serialize_list_precond k /\ Seq.length (serialize (serialize_list p s) input) < 4294967296 /\ ( let (accu, input') = x in B32.length accu + Seq.length (serialize (serialize_list p s) input') < 4294967296 /\ serializer32_correct (serialize_list p s) input (partial_serialize32_list_tailrec' p s s32 accu input') /\ (continue == false ==> L.length input' == 0) ) let partial_serialize32_list'_measure (#t: Type) (x: bytes32 * list t) : GTot nat = L.length (snd x) inline_for_extraction let partial_serialize32_list'_body (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (input: list t) : (x: (bytes32 * list t)) -> Pure (bool * (bytes32 * list t)) (requires (partial_serialize32_list'_inv p s s32 input true x)) (ensures (fun (continue, y) -> partial_serialize32_list'_inv p s s32 input continue y /\ (continue == true ==> partial_serialize32_list'_measure y < partial_serialize32_list'_measure x) )) = fun (x: bytes32 * list t) -> let (accu, input') = x in match input' with | [] -> (false, x) | a :: q -> [@inline_let] let _ = serialize_list_cons p s a q in let sa = s32 a in let accu' = B32.append accu sa in (true, (accu', q)) let partial_serialize32_list'_init (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (input: list t) : Lemma (requires ( serialize_list_precond k /\ Seq.length (serialize (serialize_list p s) input) < 4294967296 )) (ensures ( partial_serialize32_list'_inv p s s32 input true (B32.empty_bytes, input) )) = assert (Seq.equal (B32.reveal B32.empty_bytes) Seq.empty); Seq.append_empty_l (B32.reveal (partial_serialize32_list' p s s32 input)); assert (B32.reveal (partial_serialize32_list' p s s32 input) == B32.reveal (partial_serialize32_list_tailrec' p s s32 B32.empty_bytes input)); assert (serializer32_correct (serialize_list p s) input (partial_serialize32_list_tailrec' p s s32 B32.empty_bytes input)) inline_for_extraction let partial_serialize32_list (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (u: unit { serialize_list_precond k }) : Tot (partial_serializer32 (serialize_list p s)) = fun (input: list t { Seq.length (serialize (serialize_list p s) input) < 4294967296 } ) -> (( let (res, _) = partial_serialize32_list'_init p s s32 input; CL.total_while partial_serialize32_list'_measure (partial_serialize32_list'_inv p s s32 input) (fun x -> partial_serialize32_list'_body p s s32 input x) (B32.empty_bytes, input) in res ) <: (res: bytes32 { serializer32_correct (serialize_list p s) input res })) let size32_list_inv (#t: Type) (#k: parser_kind) (#p: parser k t) (#s: serializer p) (s32: size32 s) (u: unit { serialize_list_precond k }) (input: list t) (continue: bool) (accu: (U32.t * list t)) : GTot Type0 = let (len, rem) = accu in let sz = Seq.length (serialize (serialize_list p s) input) in if continue then U32.v len < U32.v u32_max /\ sz == U32.v len + Seq.length (serialize (serialize_list p s) rem) else size32_postcond (serialize_list p s) input len let size32_list_measure (#t: Type) (accu: (U32.t * list t))
false
false
LowParse.SLow.List.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 8, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 16, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val size32_list_measure (#t: Type) (accu: (U32.t * list t)) : GTot nat
[]
LowParse.SLow.List.size32_list_measure
{ "file_name": "src/lowparse/LowParse.SLow.List.fst", "git_rev": "446a08ce38df905547cf20f28c43776b22b8087a", "git_url": "https://github.com/project-everest/everparse.git", "project_name": "everparse" }
accu: (FStar.UInt32.t * Prims.list t) -> Prims.GTot Prims.nat
{ "end_col": 14, "end_line": 394, "start_col": 1, "start_line": 393 }
Prims.GTot
val parse_list_tailrec_measure (#t: Type) (x: option (bytes32 * list t)) : GTot nat
[ { "abbrev": true, "full_module": "FStar.List.Tot", "short_module": "L" }, { "abbrev": true, "full_module": "C.Loops", "short_module": "CL" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": true, "full_module": "FStar.Bytes", "short_module": "B32" }, { "abbrev": false, "full_module": "LowParse.SLow.Combinators", "short_module": null }, { "abbrev": false, "full_module": "LowParse.Spec.List", "short_module": null }, { "abbrev": false, "full_module": "LowParse.SLow", "short_module": null }, { "abbrev": false, "full_module": "LowParse.SLow", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let parse_list_tailrec_measure (#t: Type) (x: option (bytes32 * list t)) : GTot nat = match x with | None -> 0 | Some (input', _) -> B32.length input'
val parse_list_tailrec_measure (#t: Type) (x: option (bytes32 * list t)) : GTot nat let parse_list_tailrec_measure (#t: Type) (x: option (bytes32 * list t)) : GTot nat =
false
null
false
match x with | None -> 0 | Some (input', _) -> B32.length input'
{ "checked_file": "LowParse.SLow.List.fst.checked", "dependencies": [ "prims.fst.checked", "LowParse.Spec.List.fsti.checked", "LowParse.SLow.Combinators.fst.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.Bytes.fsti.checked", "C.Loops.fst.checked" ], "interface_file": false, "source_file": "LowParse.SLow.List.fst" }
[ "sometrivial" ]
[ "FStar.Pervasives.Native.option", "FStar.Pervasives.Native.tuple2", "LowParse.SLow.Base.bytes32", "Prims.list", "FStar.Bytes.length", "Prims.nat" ]
[]
module LowParse.SLow.List include LowParse.Spec.List include LowParse.SLow.Combinators module B32 = FStar.Bytes module U32 = FStar.UInt32 module CL = C.Loops #set-options "--z3rlimit 16 --max_fuel 8 --max_ifuel 8" module L = FStar.List.Tot let rec parse_list_tailrec' (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) (aux: list t) : GTot (option (list t)) (decreases (B32.length b)) = parse_list_eq p (B32.reveal b); if B32.len b = 0ul then Some (L.rev aux) else match p32 b with | None -> None | Some (v, n) -> if n = 0ul then None (* elements cannot be empty *) else parse_list_tailrec' p32 (B32.slice b n (B32.len b)) (v :: aux) let list_append_rev_cons (#t: Type) (v: t) (aux l: list t) : Lemma (L.append (L.rev (v ::aux)) l == L.append (L.rev aux) (v :: l)) = L.rev_rev' (v :: aux); L.rev_rev' aux; L.append_assoc (L.rev aux) [v] l let rec parse_list_tailrec'_correct' (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) (aux: list t) : Lemma (requires True) (ensures ( parse_list_tailrec' p32 b aux == ( match parse (parse_list p) (B32.reveal b) with | Some (l, n) -> Some (L.append (L.rev aux) l) | None -> None ))) (decreases (B32.length b)) = parse_list_eq p (B32.reveal b); if B32.len b = 0ul then L.append_l_nil (L.rev aux) else match p32 b with | None -> () | Some (v, n) -> if n = 0ul then () else begin let s = B32.slice b n (B32.len b) in parse_list_tailrec'_correct' p32 s (v :: aux); match parse (parse_list p) (B32.reveal s) with | Some (l, n') -> list_append_rev_cons v aux l | None -> () end let parse_list_tailrec'_correct (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) : Lemma begin match parse (parse_list p) (B32.reveal b) with | Some (l, n) -> parse_list_tailrec' p32 b [] == Some l | None -> parse_list_tailrec' p32 b [] == None end = parse_list_tailrec'_correct' p32 b [] let list_rev_inv (#t: Type) (l: list t) (b: bool) (x: list t * list t) : GTot Type0 = let (rem, acc) = x in L.rev l == L.rev_acc rem acc /\ (b == false ==> rem == []) let list_rev (#t: Type) (l: list t) : Tot (l' : list t { l' == L.rev l } ) = match l with | [] -> [] | _ -> let (_, l') = CL.total_while (fun (rem, _) -> L.length rem) (list_rev_inv l) (fun (rem, acc) -> match rem with | [] -> (false, (rem, acc)) | a :: q -> (true, (q, a :: acc)) ) (l, []) in l' let parse_list_tailrec_inv (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (input: bytes32) (b: bool) (x: option (bytes32 * list t)) : GTot Type0 = match x with | Some (input', accu') -> parse_list_tailrec' p32 input [] == parse_list_tailrec' p32 input' accu' /\ (b == false ==> B32.length input' == 0) | None -> b == false /\ None? (parse_list_tailrec' p32 input []) let parse_list_tailrec_measure (#t: Type) (x: option (bytes32 * list t))
false
false
LowParse.SLow.List.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 8, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 16, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val parse_list_tailrec_measure (#t: Type) (x: option (bytes32 * list t)) : GTot nat
[]
LowParse.SLow.List.parse_list_tailrec_measure
{ "file_name": "src/lowparse/LowParse.SLow.List.fst", "git_rev": "446a08ce38df905547cf20f28c43776b22b8087a", "git_url": "https://github.com/project-everest/everparse.git", "project_name": "everparse" }
x: FStar.Pervasives.Native.option (LowParse.SLow.Base.bytes32 * Prims.list t) -> Prims.GTot Prims.nat
{ "end_col": 41, "end_line": 144, "start_col": 2, "start_line": 142 }
Prims.GTot
val parse_list_tailrec_inv (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (input: bytes32) (b: bool) (x: option (bytes32 * list t)) : GTot Type0
[ { "abbrev": true, "full_module": "FStar.List.Tot", "short_module": "L" }, { "abbrev": true, "full_module": "C.Loops", "short_module": "CL" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": true, "full_module": "FStar.Bytes", "short_module": "B32" }, { "abbrev": false, "full_module": "LowParse.SLow.Combinators", "short_module": null }, { "abbrev": false, "full_module": "LowParse.Spec.List", "short_module": null }, { "abbrev": false, "full_module": "LowParse.SLow", "short_module": null }, { "abbrev": false, "full_module": "LowParse.SLow", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let parse_list_tailrec_inv (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (input: bytes32) (b: bool) (x: option (bytes32 * list t)) : GTot Type0 = match x with | Some (input', accu') -> parse_list_tailrec' p32 input [] == parse_list_tailrec' p32 input' accu' /\ (b == false ==> B32.length input' == 0) | None -> b == false /\ None? (parse_list_tailrec' p32 input [])
val parse_list_tailrec_inv (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (input: bytes32) (b: bool) (x: option (bytes32 * list t)) : GTot Type0 let parse_list_tailrec_inv (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (input: bytes32) (b: bool) (x: option (bytes32 * list t)) : GTot Type0 =
false
null
false
match x with | Some (input', accu') -> parse_list_tailrec' p32 input [] == parse_list_tailrec' p32 input' accu' /\ (b == false ==> B32.length input' == 0) | None -> b == false /\ None? (parse_list_tailrec' p32 input [])
{ "checked_file": "LowParse.SLow.List.fst.checked", "dependencies": [ "prims.fst.checked", "LowParse.Spec.List.fsti.checked", "LowParse.SLow.Combinators.fst.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.Bytes.fsti.checked", "C.Loops.fst.checked" ], "interface_file": false, "source_file": "LowParse.SLow.List.fst" }
[ "sometrivial" ]
[ "LowParse.Spec.Base.parser_kind", "LowParse.Spec.Base.parser", "LowParse.SLow.Base.parser32", "LowParse.SLow.Base.bytes32", "Prims.bool", "FStar.Pervasives.Native.option", "FStar.Pervasives.Native.tuple2", "Prims.list", "Prims.l_and", "Prims.eq2", "LowParse.SLow.List.parse_list_tailrec'", "Prims.Nil", "Prims.l_imp", "Prims.int", "FStar.Bytes.length", "Prims.b2t", "FStar.Pervasives.Native.uu___is_None" ]
[]
module LowParse.SLow.List include LowParse.Spec.List include LowParse.SLow.Combinators module B32 = FStar.Bytes module U32 = FStar.UInt32 module CL = C.Loops #set-options "--z3rlimit 16 --max_fuel 8 --max_ifuel 8" module L = FStar.List.Tot let rec parse_list_tailrec' (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) (aux: list t) : GTot (option (list t)) (decreases (B32.length b)) = parse_list_eq p (B32.reveal b); if B32.len b = 0ul then Some (L.rev aux) else match p32 b with | None -> None | Some (v, n) -> if n = 0ul then None (* elements cannot be empty *) else parse_list_tailrec' p32 (B32.slice b n (B32.len b)) (v :: aux) let list_append_rev_cons (#t: Type) (v: t) (aux l: list t) : Lemma (L.append (L.rev (v ::aux)) l == L.append (L.rev aux) (v :: l)) = L.rev_rev' (v :: aux); L.rev_rev' aux; L.append_assoc (L.rev aux) [v] l let rec parse_list_tailrec'_correct' (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) (aux: list t) : Lemma (requires True) (ensures ( parse_list_tailrec' p32 b aux == ( match parse (parse_list p) (B32.reveal b) with | Some (l, n) -> Some (L.append (L.rev aux) l) | None -> None ))) (decreases (B32.length b)) = parse_list_eq p (B32.reveal b); if B32.len b = 0ul then L.append_l_nil (L.rev aux) else match p32 b with | None -> () | Some (v, n) -> if n = 0ul then () else begin let s = B32.slice b n (B32.len b) in parse_list_tailrec'_correct' p32 s (v :: aux); match parse (parse_list p) (B32.reveal s) with | Some (l, n') -> list_append_rev_cons v aux l | None -> () end let parse_list_tailrec'_correct (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) : Lemma begin match parse (parse_list p) (B32.reveal b) with | Some (l, n) -> parse_list_tailrec' p32 b [] == Some l | None -> parse_list_tailrec' p32 b [] == None end = parse_list_tailrec'_correct' p32 b [] let list_rev_inv (#t: Type) (l: list t) (b: bool) (x: list t * list t) : GTot Type0 = let (rem, acc) = x in L.rev l == L.rev_acc rem acc /\ (b == false ==> rem == []) let list_rev (#t: Type) (l: list t) : Tot (l' : list t { l' == L.rev l } ) = match l with | [] -> [] | _ -> let (_, l') = CL.total_while (fun (rem, _) -> L.length rem) (list_rev_inv l) (fun (rem, acc) -> match rem with | [] -> (false, (rem, acc)) | a :: q -> (true, (q, a :: acc)) ) (l, []) in l' let parse_list_tailrec_inv (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (input: bytes32) (b: bool) (x: option (bytes32 * list t))
false
false
LowParse.SLow.List.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 8, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 16, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val parse_list_tailrec_inv (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (input: bytes32) (b: bool) (x: option (bytes32 * list t)) : GTot Type0
[]
LowParse.SLow.List.parse_list_tailrec_inv
{ "file_name": "src/lowparse/LowParse.SLow.List.fst", "git_rev": "446a08ce38df905547cf20f28c43776b22b8087a", "git_url": "https://github.com/project-everest/everparse.git", "project_name": "everparse" }
p32: LowParse.SLow.Base.parser32 p -> input: LowParse.SLow.Base.bytes32 -> b: Prims.bool -> x: FStar.Pervasives.Native.option (LowParse.SLow.Base.bytes32 * Prims.list t) -> Prims.GTot Type0
{ "end_col": 58, "end_line": 136, "start_col": 2, "start_line": 131 }
FStar.Pervasives.Lemma
val list_append_rev_cons (#t: Type) (v: t) (aux l: list t) : Lemma (L.append (L.rev (v :: aux)) l == L.append (L.rev aux) (v :: l))
[ { "abbrev": true, "full_module": "FStar.List.Tot", "short_module": "L" }, { "abbrev": true, "full_module": "C.Loops", "short_module": "CL" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": true, "full_module": "FStar.Bytes", "short_module": "B32" }, { "abbrev": false, "full_module": "LowParse.SLow.Combinators", "short_module": null }, { "abbrev": false, "full_module": "LowParse.Spec.List", "short_module": null }, { "abbrev": false, "full_module": "LowParse.SLow", "short_module": null }, { "abbrev": false, "full_module": "LowParse.SLow", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let list_append_rev_cons (#t: Type) (v: t) (aux l: list t) : Lemma (L.append (L.rev (v ::aux)) l == L.append (L.rev aux) (v :: l)) = L.rev_rev' (v :: aux); L.rev_rev' aux; L.append_assoc (L.rev aux) [v] l
val list_append_rev_cons (#t: Type) (v: t) (aux l: list t) : Lemma (L.append (L.rev (v :: aux)) l == L.append (L.rev aux) (v :: l)) let list_append_rev_cons (#t: Type) (v: t) (aux l: list t) : Lemma (L.append (L.rev (v :: aux)) l == L.append (L.rev aux) (v :: l)) =
false
null
true
L.rev_rev' (v :: aux); L.rev_rev' aux; L.append_assoc (L.rev aux) [v] l
{ "checked_file": "LowParse.SLow.List.fst.checked", "dependencies": [ "prims.fst.checked", "LowParse.Spec.List.fsti.checked", "LowParse.SLow.Combinators.fst.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.Bytes.fsti.checked", "C.Loops.fst.checked" ], "interface_file": false, "source_file": "LowParse.SLow.List.fst" }
[ "lemma" ]
[ "Prims.list", "FStar.List.Tot.Properties.append_assoc", "FStar.List.Tot.Base.rev", "Prims.Cons", "Prims.Nil", "Prims.unit", "FStar.List.Tot.Properties.rev_rev'", "Prims.l_True", "Prims.squash", "Prims.eq2", "FStar.List.Tot.Base.append", "FStar.Pervasives.pattern" ]
[]
module LowParse.SLow.List include LowParse.Spec.List include LowParse.SLow.Combinators module B32 = FStar.Bytes module U32 = FStar.UInt32 module CL = C.Loops #set-options "--z3rlimit 16 --max_fuel 8 --max_ifuel 8" module L = FStar.List.Tot let rec parse_list_tailrec' (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) (aux: list t) : GTot (option (list t)) (decreases (B32.length b)) = parse_list_eq p (B32.reveal b); if B32.len b = 0ul then Some (L.rev aux) else match p32 b with | None -> None | Some (v, n) -> if n = 0ul then None (* elements cannot be empty *) else parse_list_tailrec' p32 (B32.slice b n (B32.len b)) (v :: aux) let list_append_rev_cons (#t: Type) (v: t) (aux l: list t)
false
false
LowParse.SLow.List.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 8, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 16, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val list_append_rev_cons (#t: Type) (v: t) (aux l: list t) : Lemma (L.append (L.rev (v :: aux)) l == L.append (L.rev aux) (v :: l))
[]
LowParse.SLow.List.list_append_rev_cons
{ "file_name": "src/lowparse/LowParse.SLow.List.fst", "git_rev": "446a08ce38df905547cf20f28c43776b22b8087a", "git_url": "https://github.com/project-everest/everparse.git", "project_name": "everparse" }
v: t -> aux: Prims.list t -> l: Prims.list t -> FStar.Pervasives.Lemma (ensures FStar.List.Tot.Base.rev (v :: aux) @ l == FStar.List.Tot.Base.rev aux @ v :: l)
{ "end_col": 34, "end_line": 42, "start_col": 2, "start_line": 40 }
Prims.GTot
val size32_list_inv (#t: Type) (#k: parser_kind) (#p: parser k t) (#s: serializer p) (s32: size32 s) (u: unit{serialize_list_precond k}) (input: list t) (continue: bool) (accu: (U32.t * list t)) : GTot Type0
[ { "abbrev": true, "full_module": "FStar.List.Tot", "short_module": "L" }, { "abbrev": true, "full_module": "C.Loops", "short_module": "CL" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": true, "full_module": "FStar.Bytes", "short_module": "B32" }, { "abbrev": false, "full_module": "LowParse.SLow.Combinators", "short_module": null }, { "abbrev": false, "full_module": "LowParse.Spec.List", "short_module": null }, { "abbrev": false, "full_module": "LowParse.SLow", "short_module": null }, { "abbrev": false, "full_module": "LowParse.SLow", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let size32_list_inv (#t: Type) (#k: parser_kind) (#p: parser k t) (#s: serializer p) (s32: size32 s) (u: unit { serialize_list_precond k }) (input: list t) (continue: bool) (accu: (U32.t * list t)) : GTot Type0 = let (len, rem) = accu in let sz = Seq.length (serialize (serialize_list p s) input) in if continue then U32.v len < U32.v u32_max /\ sz == U32.v len + Seq.length (serialize (serialize_list p s) rem) else size32_postcond (serialize_list p s) input len
val size32_list_inv (#t: Type) (#k: parser_kind) (#p: parser k t) (#s: serializer p) (s32: size32 s) (u: unit{serialize_list_precond k}) (input: list t) (continue: bool) (accu: (U32.t * list t)) : GTot Type0 let size32_list_inv (#t: Type) (#k: parser_kind) (#p: parser k t) (#s: serializer p) (s32: size32 s) (u: unit{serialize_list_precond k}) (input: list t) (continue: bool) (accu: (U32.t * list t)) : GTot Type0 =
false
null
false
let len, rem = accu in let sz = Seq.length (serialize (serialize_list p s) input) in if continue then U32.v len < U32.v u32_max /\ sz == U32.v len + Seq.length (serialize (serialize_list p s) rem) else size32_postcond (serialize_list p s) input len
{ "checked_file": "LowParse.SLow.List.fst.checked", "dependencies": [ "prims.fst.checked", "LowParse.Spec.List.fsti.checked", "LowParse.SLow.Combinators.fst.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.Bytes.fsti.checked", "C.Loops.fst.checked" ], "interface_file": false, "source_file": "LowParse.SLow.List.fst" }
[ "sometrivial" ]
[ "LowParse.Spec.Base.parser_kind", "LowParse.Spec.Base.parser", "LowParse.Spec.Base.serializer", "LowParse.SLow.Base.size32", "Prims.unit", "Prims.b2t", "LowParse.Spec.List.serialize_list_precond", "Prims.list", "Prims.bool", "FStar.Pervasives.Native.tuple2", "FStar.UInt32.t", "Prims.l_and", "Prims.op_LessThan", "FStar.UInt32.v", "LowParse.SLow.Base.u32_max", "Prims.eq2", "Prims.int", "Prims.op_Addition", "FStar.Seq.Base.length", "LowParse.Bytes.byte", "LowParse.Spec.Base.serialize", "LowParse.Spec.List.parse_list_kind", "LowParse.Spec.List.parse_list", "LowParse.Spec.List.serialize_list", "LowParse.SLow.Base.size32_postcond", "Prims.nat" ]
[]
module LowParse.SLow.List include LowParse.Spec.List include LowParse.SLow.Combinators module B32 = FStar.Bytes module U32 = FStar.UInt32 module CL = C.Loops #set-options "--z3rlimit 16 --max_fuel 8 --max_ifuel 8" module L = FStar.List.Tot let rec parse_list_tailrec' (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) (aux: list t) : GTot (option (list t)) (decreases (B32.length b)) = parse_list_eq p (B32.reveal b); if B32.len b = 0ul then Some (L.rev aux) else match p32 b with | None -> None | Some (v, n) -> if n = 0ul then None (* elements cannot be empty *) else parse_list_tailrec' p32 (B32.slice b n (B32.len b)) (v :: aux) let list_append_rev_cons (#t: Type) (v: t) (aux l: list t) : Lemma (L.append (L.rev (v ::aux)) l == L.append (L.rev aux) (v :: l)) = L.rev_rev' (v :: aux); L.rev_rev' aux; L.append_assoc (L.rev aux) [v] l let rec parse_list_tailrec'_correct' (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) (aux: list t) : Lemma (requires True) (ensures ( parse_list_tailrec' p32 b aux == ( match parse (parse_list p) (B32.reveal b) with | Some (l, n) -> Some (L.append (L.rev aux) l) | None -> None ))) (decreases (B32.length b)) = parse_list_eq p (B32.reveal b); if B32.len b = 0ul then L.append_l_nil (L.rev aux) else match p32 b with | None -> () | Some (v, n) -> if n = 0ul then () else begin let s = B32.slice b n (B32.len b) in parse_list_tailrec'_correct' p32 s (v :: aux); match parse (parse_list p) (B32.reveal s) with | Some (l, n') -> list_append_rev_cons v aux l | None -> () end let parse_list_tailrec'_correct (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) : Lemma begin match parse (parse_list p) (B32.reveal b) with | Some (l, n) -> parse_list_tailrec' p32 b [] == Some l | None -> parse_list_tailrec' p32 b [] == None end = parse_list_tailrec'_correct' p32 b [] let list_rev_inv (#t: Type) (l: list t) (b: bool) (x: list t * list t) : GTot Type0 = let (rem, acc) = x in L.rev l == L.rev_acc rem acc /\ (b == false ==> rem == []) let list_rev (#t: Type) (l: list t) : Tot (l' : list t { l' == L.rev l } ) = match l with | [] -> [] | _ -> let (_, l') = CL.total_while (fun (rem, _) -> L.length rem) (list_rev_inv l) (fun (rem, acc) -> match rem with | [] -> (false, (rem, acc)) | a :: q -> (true, (q, a :: acc)) ) (l, []) in l' let parse_list_tailrec_inv (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (input: bytes32) (b: bool) (x: option (bytes32 * list t)) : GTot Type0 = match x with | Some (input', accu') -> parse_list_tailrec' p32 input [] == parse_list_tailrec' p32 input' accu' /\ (b == false ==> B32.length input' == 0) | None -> b == false /\ None? (parse_list_tailrec' p32 input []) let parse_list_tailrec_measure (#t: Type) (x: option (bytes32 * list t)) : GTot nat = match x with | None -> 0 | Some (input', _) -> B32.length input' inline_for_extraction let parse_list_tailrec_body (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (input: bytes32) : (x: option (bytes32 * list t)) -> Pure (bool * option (bytes32 * list t)) (requires (parse_list_tailrec_inv p32 input true x)) (ensures (fun (continue, y) -> parse_list_tailrec_inv p32 input continue y /\ (if continue then parse_list_tailrec_measure y < parse_list_tailrec_measure x else True) )) = fun (x: option (bytes32 * list t)) -> let (Some (input', accu')) = x in let len = B32.len input' in if len = 0ul then (false, x) else match p32 input' with | Some (v, consumed) -> if consumed = 0ul then (false, None) else let input'' = B32.slice input' consumed len in (true, Some (input'', v :: accu')) | None -> (false, None) inline_for_extraction let parse_list_tailrec (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (input: bytes32) : Tot (res: option (list t) { res == parse_list_tailrec' p32 input [] } ) = let accu = CL.total_while (parse_list_tailrec_measure #t) (parse_list_tailrec_inv p32 input) (fun x -> parse_list_tailrec_body p32 input x) (Some (input, [])) in match accu with | None -> None | Some (_, accu') -> Some (list_rev accu') inline_for_extraction let parse32_list (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) : Tot (parser32 (parse_list p)) = fun (input: bytes32) -> (( parse_list_tailrec'_correct p32 input; parser_kind_prop_equiv parse_list_kind (parse_list p); match parse_list_tailrec p32 input with | None -> None | Some res -> Some (res, B32.len input) ) <: (res: option (list t * U32.t) { parser32_correct (parse_list p) input res } )) let rec partial_serialize32_list' (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (input: list t) : Ghost bytes32 (requires ( serialize_list_precond k /\ ( Seq.length (serialize (serialize_list p s) input) < 4294967296 ))) (ensures (fun (res: bytes32) -> serialize_list_precond k /\ serializer32_correct (serialize_list p s) input res )) (decreases input) = match input with | [] -> serialize_list_nil p s; let res = B32.empty_bytes in assert (Seq.equal (B32.reveal res) (Seq.empty)); res | a :: q -> serialize_list_cons p s a q; let sa = s32 a in let sq = partial_serialize32_list' p s s32 q in let res = B32.append sa sq in res let rec partial_serialize32_list_tailrec' (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (accu: bytes32) (input: list t) : Ghost bytes32 (requires ( serialize_list_precond k /\ ( B32.length accu + Seq.length (serialize (serialize_list p s) input) < 4294967296 ))) (ensures (fun (res: bytes32) -> serialize_list_precond k /\ Seq.length (serialize (serialize_list p s) input) < 4294967296 /\ B32.reveal res == Seq.append (B32.reveal accu) (B32.reveal (partial_serialize32_list' p s s32 input)) )) (decreases input) = match input with | [] -> serialize_list_nil p s; Seq.append_empty_r (B32.reveal accu); accu | a :: q -> serialize_list_cons p s a q; let sa = s32 a in let accu' = B32.append accu sa in Seq.append_assoc (B32.reveal accu) (B32.reveal sa) (B32.reveal (partial_serialize32_list' p s s32 q)); partial_serialize32_list_tailrec' p s s32 accu' q let partial_serialize32_list'_inv (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (input: list t) (continue: bool) (x: bytes32 * list t) : GTot Type0 = serialize_list_precond k /\ Seq.length (serialize (serialize_list p s) input) < 4294967296 /\ ( let (accu, input') = x in B32.length accu + Seq.length (serialize (serialize_list p s) input') < 4294967296 /\ serializer32_correct (serialize_list p s) input (partial_serialize32_list_tailrec' p s s32 accu input') /\ (continue == false ==> L.length input' == 0) ) let partial_serialize32_list'_measure (#t: Type) (x: bytes32 * list t) : GTot nat = L.length (snd x) inline_for_extraction let partial_serialize32_list'_body (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (input: list t) : (x: (bytes32 * list t)) -> Pure (bool * (bytes32 * list t)) (requires (partial_serialize32_list'_inv p s s32 input true x)) (ensures (fun (continue, y) -> partial_serialize32_list'_inv p s s32 input continue y /\ (continue == true ==> partial_serialize32_list'_measure y < partial_serialize32_list'_measure x) )) = fun (x: bytes32 * list t) -> let (accu, input') = x in match input' with | [] -> (false, x) | a :: q -> [@inline_let] let _ = serialize_list_cons p s a q in let sa = s32 a in let accu' = B32.append accu sa in (true, (accu', q)) let partial_serialize32_list'_init (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (input: list t) : Lemma (requires ( serialize_list_precond k /\ Seq.length (serialize (serialize_list p s) input) < 4294967296 )) (ensures ( partial_serialize32_list'_inv p s s32 input true (B32.empty_bytes, input) )) = assert (Seq.equal (B32.reveal B32.empty_bytes) Seq.empty); Seq.append_empty_l (B32.reveal (partial_serialize32_list' p s s32 input)); assert (B32.reveal (partial_serialize32_list' p s s32 input) == B32.reveal (partial_serialize32_list_tailrec' p s s32 B32.empty_bytes input)); assert (serializer32_correct (serialize_list p s) input (partial_serialize32_list_tailrec' p s s32 B32.empty_bytes input)) inline_for_extraction let partial_serialize32_list (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (u: unit { serialize_list_precond k }) : Tot (partial_serializer32 (serialize_list p s)) = fun (input: list t { Seq.length (serialize (serialize_list p s) input) < 4294967296 } ) -> (( let (res, _) = partial_serialize32_list'_init p s s32 input; CL.total_while partial_serialize32_list'_measure (partial_serialize32_list'_inv p s s32 input) (fun x -> partial_serialize32_list'_body p s s32 input x) (B32.empty_bytes, input) in res ) <: (res: bytes32 { serializer32_correct (serialize_list p s) input res })) let size32_list_inv (#t: Type) (#k: parser_kind) (#p: parser k t) (#s: serializer p) (s32: size32 s) (u: unit { serialize_list_precond k }) (input: list t) (continue: bool) (accu: (U32.t * list t))
false
false
LowParse.SLow.List.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 8, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 16, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val size32_list_inv (#t: Type) (#k: parser_kind) (#p: parser k t) (#s: serializer p) (s32: size32 s) (u: unit{serialize_list_precond k}) (input: list t) (continue: bool) (accu: (U32.t * list t)) : GTot Type0
[]
LowParse.SLow.List.size32_list_inv
{ "file_name": "src/lowparse/LowParse.SLow.List.fst", "git_rev": "446a08ce38df905547cf20f28c43776b22b8087a", "git_url": "https://github.com/project-everest/everparse.git", "project_name": "everparse" }
s32: LowParse.SLow.Base.size32 s -> u107: u111: Prims.unit{LowParse.Spec.List.serialize_list_precond k} -> input: Prims.list t -> continue: Prims.bool -> accu: (FStar.UInt32.t * Prims.list t) -> Prims.GTot Type0
{ "end_col": 50, "end_line": 387, "start_col": 1, "start_line": 380 }
Prims.Tot
val parse_list_tailrec (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (input: bytes32) : Tot (res: option (list t) {res == parse_list_tailrec' p32 input []})
[ { "abbrev": true, "full_module": "FStar.List.Tot", "short_module": "L" }, { "abbrev": true, "full_module": "C.Loops", "short_module": "CL" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": true, "full_module": "FStar.Bytes", "short_module": "B32" }, { "abbrev": false, "full_module": "LowParse.SLow.Combinators", "short_module": null }, { "abbrev": false, "full_module": "LowParse.Spec.List", "short_module": null }, { "abbrev": false, "full_module": "LowParse.SLow", "short_module": null }, { "abbrev": false, "full_module": "LowParse.SLow", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let parse_list_tailrec (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (input: bytes32) : Tot (res: option (list t) { res == parse_list_tailrec' p32 input [] } ) = let accu = CL.total_while (parse_list_tailrec_measure #t) (parse_list_tailrec_inv p32 input) (fun x -> parse_list_tailrec_body p32 input x) (Some (input, [])) in match accu with | None -> None | Some (_, accu') -> Some (list_rev accu')
val parse_list_tailrec (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (input: bytes32) : Tot (res: option (list t) {res == parse_list_tailrec' p32 input []}) let parse_list_tailrec (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (input: bytes32) : Tot (res: option (list t) {res == parse_list_tailrec' p32 input []}) =
false
null
false
let accu = CL.total_while (parse_list_tailrec_measure #t) (parse_list_tailrec_inv p32 input) (fun x -> parse_list_tailrec_body p32 input x) (Some (input, [])) in match accu with | None -> None | Some (_, accu') -> Some (list_rev accu')
{ "checked_file": "LowParse.SLow.List.fst.checked", "dependencies": [ "prims.fst.checked", "LowParse.Spec.List.fsti.checked", "LowParse.SLow.Combinators.fst.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.Bytes.fsti.checked", "C.Loops.fst.checked" ], "interface_file": false, "source_file": "LowParse.SLow.List.fst" }
[ "total" ]
[ "LowParse.Spec.Base.parser_kind", "LowParse.Spec.Base.parser", "LowParse.SLow.Base.parser32", "LowParse.SLow.Base.bytes32", "FStar.Pervasives.Native.None", "Prims.list", "FStar.Pervasives.Native.Some", "LowParse.SLow.List.list_rev", "FStar.Pervasives.Native.option", "Prims.eq2", "LowParse.SLow.List.parse_list_tailrec'", "Prims.Nil", "FStar.Pervasives.Native.tuple2", "C.Loops.total_while", "LowParse.SLow.List.parse_list_tailrec_measure", "LowParse.SLow.List.parse_list_tailrec_inv", "LowParse.SLow.List.parse_list_tailrec_body", "Prims.bool", "FStar.Pervasives.Native.Mktuple2" ]
[]
module LowParse.SLow.List include LowParse.Spec.List include LowParse.SLow.Combinators module B32 = FStar.Bytes module U32 = FStar.UInt32 module CL = C.Loops #set-options "--z3rlimit 16 --max_fuel 8 --max_ifuel 8" module L = FStar.List.Tot let rec parse_list_tailrec' (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) (aux: list t) : GTot (option (list t)) (decreases (B32.length b)) = parse_list_eq p (B32.reveal b); if B32.len b = 0ul then Some (L.rev aux) else match p32 b with | None -> None | Some (v, n) -> if n = 0ul then None (* elements cannot be empty *) else parse_list_tailrec' p32 (B32.slice b n (B32.len b)) (v :: aux) let list_append_rev_cons (#t: Type) (v: t) (aux l: list t) : Lemma (L.append (L.rev (v ::aux)) l == L.append (L.rev aux) (v :: l)) = L.rev_rev' (v :: aux); L.rev_rev' aux; L.append_assoc (L.rev aux) [v] l let rec parse_list_tailrec'_correct' (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) (aux: list t) : Lemma (requires True) (ensures ( parse_list_tailrec' p32 b aux == ( match parse (parse_list p) (B32.reveal b) with | Some (l, n) -> Some (L.append (L.rev aux) l) | None -> None ))) (decreases (B32.length b)) = parse_list_eq p (B32.reveal b); if B32.len b = 0ul then L.append_l_nil (L.rev aux) else match p32 b with | None -> () | Some (v, n) -> if n = 0ul then () else begin let s = B32.slice b n (B32.len b) in parse_list_tailrec'_correct' p32 s (v :: aux); match parse (parse_list p) (B32.reveal s) with | Some (l, n') -> list_append_rev_cons v aux l | None -> () end let parse_list_tailrec'_correct (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) : Lemma begin match parse (parse_list p) (B32.reveal b) with | Some (l, n) -> parse_list_tailrec' p32 b [] == Some l | None -> parse_list_tailrec' p32 b [] == None end = parse_list_tailrec'_correct' p32 b [] let list_rev_inv (#t: Type) (l: list t) (b: bool) (x: list t * list t) : GTot Type0 = let (rem, acc) = x in L.rev l == L.rev_acc rem acc /\ (b == false ==> rem == []) let list_rev (#t: Type) (l: list t) : Tot (l' : list t { l' == L.rev l } ) = match l with | [] -> [] | _ -> let (_, l') = CL.total_while (fun (rem, _) -> L.length rem) (list_rev_inv l) (fun (rem, acc) -> match rem with | [] -> (false, (rem, acc)) | a :: q -> (true, (q, a :: acc)) ) (l, []) in l' let parse_list_tailrec_inv (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (input: bytes32) (b: bool) (x: option (bytes32 * list t)) : GTot Type0 = match x with | Some (input', accu') -> parse_list_tailrec' p32 input [] == parse_list_tailrec' p32 input' accu' /\ (b == false ==> B32.length input' == 0) | None -> b == false /\ None? (parse_list_tailrec' p32 input []) let parse_list_tailrec_measure (#t: Type) (x: option (bytes32 * list t)) : GTot nat = match x with | None -> 0 | Some (input', _) -> B32.length input' inline_for_extraction let parse_list_tailrec_body (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (input: bytes32) : (x: option (bytes32 * list t)) -> Pure (bool * option (bytes32 * list t)) (requires (parse_list_tailrec_inv p32 input true x)) (ensures (fun (continue, y) -> parse_list_tailrec_inv p32 input continue y /\ (if continue then parse_list_tailrec_measure y < parse_list_tailrec_measure x else True) )) = fun (x: option (bytes32 * list t)) -> let (Some (input', accu')) = x in let len = B32.len input' in if len = 0ul then (false, x) else match p32 input' with | Some (v, consumed) -> if consumed = 0ul then (false, None) else let input'' = B32.slice input' consumed len in (true, Some (input'', v :: accu')) | None -> (false, None) inline_for_extraction let parse_list_tailrec (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (input: bytes32)
false
false
LowParse.SLow.List.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 8, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 16, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val parse_list_tailrec (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (input: bytes32) : Tot (res: option (list t) {res == parse_list_tailrec' p32 input []})
[]
LowParse.SLow.List.parse_list_tailrec
{ "file_name": "src/lowparse/LowParse.SLow.List.fst", "git_rev": "446a08ce38df905547cf20f28c43776b22b8087a", "git_url": "https://github.com/project-everest/everparse.git", "project_name": "everparse" }
p32: LowParse.SLow.Base.parser32 p -> input: LowParse.SLow.Base.bytes32 -> res: FStar.Pervasives.Native.option (Prims.list t) {res == LowParse.SLow.List.parse_list_tailrec' p32 input []}
{ "end_col": 44, "end_line": 192, "start_col": 1, "start_line": 183 }
Prims.GTot
val partial_serialize32_list'_inv (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (input: list t) (continue: bool) (x: (bytes32 * list t)) : GTot Type0
[ { "abbrev": true, "full_module": "FStar.List.Tot", "short_module": "L" }, { "abbrev": true, "full_module": "C.Loops", "short_module": "CL" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": true, "full_module": "FStar.Bytes", "short_module": "B32" }, { "abbrev": false, "full_module": "LowParse.SLow.Combinators", "short_module": null }, { "abbrev": false, "full_module": "LowParse.Spec.List", "short_module": null }, { "abbrev": false, "full_module": "LowParse.SLow", "short_module": null }, { "abbrev": false, "full_module": "LowParse.SLow", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let partial_serialize32_list'_inv (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (input: list t) (continue: bool) (x: bytes32 * list t) : GTot Type0 = serialize_list_precond k /\ Seq.length (serialize (serialize_list p s) input) < 4294967296 /\ ( let (accu, input') = x in B32.length accu + Seq.length (serialize (serialize_list p s) input') < 4294967296 /\ serializer32_correct (serialize_list p s) input (partial_serialize32_list_tailrec' p s s32 accu input') /\ (continue == false ==> L.length input' == 0) )
val partial_serialize32_list'_inv (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (input: list t) (continue: bool) (x: (bytes32 * list t)) : GTot Type0 let partial_serialize32_list'_inv (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (input: list t) (continue: bool) (x: bytes32 * list t) : GTot Type0 =
false
null
false
serialize_list_precond k /\ Seq.length (serialize (serialize_list p s) input) < 4294967296 /\ (let accu, input' = x in B32.length accu + Seq.length (serialize (serialize_list p s) input') < 4294967296 /\ serializer32_correct (serialize_list p s) input (partial_serialize32_list_tailrec' p s s32 accu input') /\ (continue == false ==> L.length input' == 0))
{ "checked_file": "LowParse.SLow.List.fst.checked", "dependencies": [ "prims.fst.checked", "LowParse.Spec.List.fsti.checked", "LowParse.SLow.Combinators.fst.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.Bytes.fsti.checked", "C.Loops.fst.checked" ], "interface_file": false, "source_file": "LowParse.SLow.List.fst" }
[ "sometrivial" ]
[ "LowParse.Spec.Base.parser_kind", "LowParse.Spec.Base.parser", "LowParse.Spec.Base.serializer", "LowParse.SLow.Base.partial_serializer32", "Prims.list", "Prims.bool", "FStar.Pervasives.Native.tuple2", "LowParse.SLow.Base.bytes32", "Prims.l_and", "Prims.b2t", "LowParse.Spec.List.serialize_list_precond", "Prims.op_LessThan", "FStar.Seq.Base.length", "LowParse.Bytes.byte", "LowParse.Spec.Base.serialize", "LowParse.Spec.List.parse_list_kind", "LowParse.Spec.List.parse_list", "LowParse.Spec.List.serialize_list", "Prims.op_Addition", "FStar.Bytes.length", "LowParse.SLow.Base.serializer32_correct", "LowParse.SLow.List.partial_serialize32_list_tailrec'", "Prims.l_imp", "Prims.eq2", "Prims.int", "FStar.List.Tot.Base.length", "Prims.logical" ]
[]
module LowParse.SLow.List include LowParse.Spec.List include LowParse.SLow.Combinators module B32 = FStar.Bytes module U32 = FStar.UInt32 module CL = C.Loops #set-options "--z3rlimit 16 --max_fuel 8 --max_ifuel 8" module L = FStar.List.Tot let rec parse_list_tailrec' (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) (aux: list t) : GTot (option (list t)) (decreases (B32.length b)) = parse_list_eq p (B32.reveal b); if B32.len b = 0ul then Some (L.rev aux) else match p32 b with | None -> None | Some (v, n) -> if n = 0ul then None (* elements cannot be empty *) else parse_list_tailrec' p32 (B32.slice b n (B32.len b)) (v :: aux) let list_append_rev_cons (#t: Type) (v: t) (aux l: list t) : Lemma (L.append (L.rev (v ::aux)) l == L.append (L.rev aux) (v :: l)) = L.rev_rev' (v :: aux); L.rev_rev' aux; L.append_assoc (L.rev aux) [v] l let rec parse_list_tailrec'_correct' (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) (aux: list t) : Lemma (requires True) (ensures ( parse_list_tailrec' p32 b aux == ( match parse (parse_list p) (B32.reveal b) with | Some (l, n) -> Some (L.append (L.rev aux) l) | None -> None ))) (decreases (B32.length b)) = parse_list_eq p (B32.reveal b); if B32.len b = 0ul then L.append_l_nil (L.rev aux) else match p32 b with | None -> () | Some (v, n) -> if n = 0ul then () else begin let s = B32.slice b n (B32.len b) in parse_list_tailrec'_correct' p32 s (v :: aux); match parse (parse_list p) (B32.reveal s) with | Some (l, n') -> list_append_rev_cons v aux l | None -> () end let parse_list_tailrec'_correct (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) : Lemma begin match parse (parse_list p) (B32.reveal b) with | Some (l, n) -> parse_list_tailrec' p32 b [] == Some l | None -> parse_list_tailrec' p32 b [] == None end = parse_list_tailrec'_correct' p32 b [] let list_rev_inv (#t: Type) (l: list t) (b: bool) (x: list t * list t) : GTot Type0 = let (rem, acc) = x in L.rev l == L.rev_acc rem acc /\ (b == false ==> rem == []) let list_rev (#t: Type) (l: list t) : Tot (l' : list t { l' == L.rev l } ) = match l with | [] -> [] | _ -> let (_, l') = CL.total_while (fun (rem, _) -> L.length rem) (list_rev_inv l) (fun (rem, acc) -> match rem with | [] -> (false, (rem, acc)) | a :: q -> (true, (q, a :: acc)) ) (l, []) in l' let parse_list_tailrec_inv (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (input: bytes32) (b: bool) (x: option (bytes32 * list t)) : GTot Type0 = match x with | Some (input', accu') -> parse_list_tailrec' p32 input [] == parse_list_tailrec' p32 input' accu' /\ (b == false ==> B32.length input' == 0) | None -> b == false /\ None? (parse_list_tailrec' p32 input []) let parse_list_tailrec_measure (#t: Type) (x: option (bytes32 * list t)) : GTot nat = match x with | None -> 0 | Some (input', _) -> B32.length input' inline_for_extraction let parse_list_tailrec_body (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (input: bytes32) : (x: option (bytes32 * list t)) -> Pure (bool * option (bytes32 * list t)) (requires (parse_list_tailrec_inv p32 input true x)) (ensures (fun (continue, y) -> parse_list_tailrec_inv p32 input continue y /\ (if continue then parse_list_tailrec_measure y < parse_list_tailrec_measure x else True) )) = fun (x: option (bytes32 * list t)) -> let (Some (input', accu')) = x in let len = B32.len input' in if len = 0ul then (false, x) else match p32 input' with | Some (v, consumed) -> if consumed = 0ul then (false, None) else let input'' = B32.slice input' consumed len in (true, Some (input'', v :: accu')) | None -> (false, None) inline_for_extraction let parse_list_tailrec (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (input: bytes32) : Tot (res: option (list t) { res == parse_list_tailrec' p32 input [] } ) = let accu = CL.total_while (parse_list_tailrec_measure #t) (parse_list_tailrec_inv p32 input) (fun x -> parse_list_tailrec_body p32 input x) (Some (input, [])) in match accu with | None -> None | Some (_, accu') -> Some (list_rev accu') inline_for_extraction let parse32_list (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) : Tot (parser32 (parse_list p)) = fun (input: bytes32) -> (( parse_list_tailrec'_correct p32 input; parser_kind_prop_equiv parse_list_kind (parse_list p); match parse_list_tailrec p32 input with | None -> None | Some res -> Some (res, B32.len input) ) <: (res: option (list t * U32.t) { parser32_correct (parse_list p) input res } )) let rec partial_serialize32_list' (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (input: list t) : Ghost bytes32 (requires ( serialize_list_precond k /\ ( Seq.length (serialize (serialize_list p s) input) < 4294967296 ))) (ensures (fun (res: bytes32) -> serialize_list_precond k /\ serializer32_correct (serialize_list p s) input res )) (decreases input) = match input with | [] -> serialize_list_nil p s; let res = B32.empty_bytes in assert (Seq.equal (B32.reveal res) (Seq.empty)); res | a :: q -> serialize_list_cons p s a q; let sa = s32 a in let sq = partial_serialize32_list' p s s32 q in let res = B32.append sa sq in res let rec partial_serialize32_list_tailrec' (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (accu: bytes32) (input: list t) : Ghost bytes32 (requires ( serialize_list_precond k /\ ( B32.length accu + Seq.length (serialize (serialize_list p s) input) < 4294967296 ))) (ensures (fun (res: bytes32) -> serialize_list_precond k /\ Seq.length (serialize (serialize_list p s) input) < 4294967296 /\ B32.reveal res == Seq.append (B32.reveal accu) (B32.reveal (partial_serialize32_list' p s s32 input)) )) (decreases input) = match input with | [] -> serialize_list_nil p s; Seq.append_empty_r (B32.reveal accu); accu | a :: q -> serialize_list_cons p s a q; let sa = s32 a in let accu' = B32.append accu sa in Seq.append_assoc (B32.reveal accu) (B32.reveal sa) (B32.reveal (partial_serialize32_list' p s s32 q)); partial_serialize32_list_tailrec' p s s32 accu' q let partial_serialize32_list'_inv (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (input: list t) (continue: bool) (x: bytes32 * list t)
false
false
LowParse.SLow.List.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 8, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 16, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val partial_serialize32_list'_inv (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (input: list t) (continue: bool) (x: (bytes32 * list t)) : GTot Type0
[]
LowParse.SLow.List.partial_serialize32_list'_inv
{ "file_name": "src/lowparse/LowParse.SLow.List.fst", "git_rev": "446a08ce38df905547cf20f28c43776b22b8087a", "git_url": "https://github.com/project-everest/everparse.git", "project_name": "everparse" }
p: LowParse.Spec.Base.parser k t -> s: LowParse.Spec.Base.serializer p -> s32: LowParse.SLow.Base.partial_serializer32 s -> input: Prims.list t -> continue: Prims.bool -> x: (LowParse.SLow.Base.bytes32 * Prims.list t) -> Prims.GTot Type0
{ "end_col": 3, "end_line": 290, "start_col": 2, "start_line": 281 }
Prims.Tot
val list_rev (#t: Type) (l: list t) : Tot (l': list t {l' == L.rev l})
[ { "abbrev": true, "full_module": "FStar.List.Tot", "short_module": "L" }, { "abbrev": true, "full_module": "C.Loops", "short_module": "CL" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": true, "full_module": "FStar.Bytes", "short_module": "B32" }, { "abbrev": false, "full_module": "LowParse.SLow.Combinators", "short_module": null }, { "abbrev": false, "full_module": "LowParse.Spec.List", "short_module": null }, { "abbrev": false, "full_module": "LowParse.SLow", "short_module": null }, { "abbrev": false, "full_module": "LowParse.SLow", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let list_rev (#t: Type) (l: list t) : Tot (l' : list t { l' == L.rev l } ) = match l with | [] -> [] | _ -> let (_, l') = CL.total_while (fun (rem, _) -> L.length rem) (list_rev_inv l) (fun (rem, acc) -> match rem with | [] -> (false, (rem, acc)) | a :: q -> (true, (q, a :: acc)) ) (l, []) in l'
val list_rev (#t: Type) (l: list t) : Tot (l': list t {l' == L.rev l}) let list_rev (#t: Type) (l: list t) : Tot (l': list t {l' == L.rev l}) =
false
null
false
match l with | [] -> [] | _ -> let _, l' = CL.total_while (fun (rem, _) -> L.length rem) (list_rev_inv l) (fun (rem, acc) -> match rem with | [] -> (false, (rem, acc)) | a :: q -> (true, (q, a :: acc))) (l, []) in l'
{ "checked_file": "LowParse.SLow.List.fst.checked", "dependencies": [ "prims.fst.checked", "LowParse.Spec.List.fsti.checked", "LowParse.SLow.Combinators.fst.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.Bytes.fsti.checked", "C.Loops.fst.checked" ], "interface_file": false, "source_file": "LowParse.SLow.List.fst" }
[ "total" ]
[ "Prims.list", "Prims.Nil", "Prims.eq2", "FStar.List.Tot.Base.rev", "FStar.Pervasives.Native.tuple2", "C.Loops.total_while", "FStar.List.Tot.Base.length", "Prims.nat", "LowParse.SLow.List.list_rev_inv", "FStar.Pervasives.Native.Mktuple2", "Prims.bool", "Prims.Cons" ]
[]
module LowParse.SLow.List include LowParse.Spec.List include LowParse.SLow.Combinators module B32 = FStar.Bytes module U32 = FStar.UInt32 module CL = C.Loops #set-options "--z3rlimit 16 --max_fuel 8 --max_ifuel 8" module L = FStar.List.Tot let rec parse_list_tailrec' (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) (aux: list t) : GTot (option (list t)) (decreases (B32.length b)) = parse_list_eq p (B32.reveal b); if B32.len b = 0ul then Some (L.rev aux) else match p32 b with | None -> None | Some (v, n) -> if n = 0ul then None (* elements cannot be empty *) else parse_list_tailrec' p32 (B32.slice b n (B32.len b)) (v :: aux) let list_append_rev_cons (#t: Type) (v: t) (aux l: list t) : Lemma (L.append (L.rev (v ::aux)) l == L.append (L.rev aux) (v :: l)) = L.rev_rev' (v :: aux); L.rev_rev' aux; L.append_assoc (L.rev aux) [v] l let rec parse_list_tailrec'_correct' (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) (aux: list t) : Lemma (requires True) (ensures ( parse_list_tailrec' p32 b aux == ( match parse (parse_list p) (B32.reveal b) with | Some (l, n) -> Some (L.append (L.rev aux) l) | None -> None ))) (decreases (B32.length b)) = parse_list_eq p (B32.reveal b); if B32.len b = 0ul then L.append_l_nil (L.rev aux) else match p32 b with | None -> () | Some (v, n) -> if n = 0ul then () else begin let s = B32.slice b n (B32.len b) in parse_list_tailrec'_correct' p32 s (v :: aux); match parse (parse_list p) (B32.reveal s) with | Some (l, n') -> list_append_rev_cons v aux l | None -> () end let parse_list_tailrec'_correct (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) : Lemma begin match parse (parse_list p) (B32.reveal b) with | Some (l, n) -> parse_list_tailrec' p32 b [] == Some l | None -> parse_list_tailrec' p32 b [] == None end = parse_list_tailrec'_correct' p32 b [] let list_rev_inv (#t: Type) (l: list t) (b: bool) (x: list t * list t) : GTot Type0 = let (rem, acc) = x in L.rev l == L.rev_acc rem acc /\ (b == false ==> rem == []) let list_rev (#t: Type) (l: list t)
false
false
LowParse.SLow.List.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 8, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 16, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val list_rev (#t: Type) (l: list t) : Tot (l': list t {l' == L.rev l})
[]
LowParse.SLow.List.list_rev
{ "file_name": "src/lowparse/LowParse.SLow.List.fst", "git_rev": "446a08ce38df905547cf20f28c43776b22b8087a", "git_url": "https://github.com/project-everest/everparse.git", "project_name": "everparse" }
l: Prims.list t -> l': Prims.list t {l' == FStar.List.Tot.Base.rev l}
{ "end_col": 6, "end_line": 120, "start_col": 2, "start_line": 106 }
Prims.Tot
val parse32_list (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) : Tot (parser32 (parse_list p))
[ { "abbrev": true, "full_module": "FStar.List.Tot", "short_module": "L" }, { "abbrev": true, "full_module": "C.Loops", "short_module": "CL" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": true, "full_module": "FStar.Bytes", "short_module": "B32" }, { "abbrev": false, "full_module": "LowParse.SLow.Combinators", "short_module": null }, { "abbrev": false, "full_module": "LowParse.Spec.List", "short_module": null }, { "abbrev": false, "full_module": "LowParse.SLow", "short_module": null }, { "abbrev": false, "full_module": "LowParse.SLow", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let parse32_list (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) : Tot (parser32 (parse_list p)) = fun (input: bytes32) -> (( parse_list_tailrec'_correct p32 input; parser_kind_prop_equiv parse_list_kind (parse_list p); match parse_list_tailrec p32 input with | None -> None | Some res -> Some (res, B32.len input) ) <: (res: option (list t * U32.t) { parser32_correct (parse_list p) input res } ))
val parse32_list (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) : Tot (parser32 (parse_list p)) let parse32_list (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) : Tot (parser32 (parse_list p)) =
false
null
false
fun (input: bytes32) -> ((parse_list_tailrec'_correct p32 input; parser_kind_prop_equiv parse_list_kind (parse_list p); match parse_list_tailrec p32 input with | None -> None | Some res -> Some (res, B32.len input)) <: (res: option (list t * U32.t) {parser32_correct (parse_list p) input res}))
{ "checked_file": "LowParse.SLow.List.fst.checked", "dependencies": [ "prims.fst.checked", "LowParse.Spec.List.fsti.checked", "LowParse.SLow.Combinators.fst.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.Bytes.fsti.checked", "C.Loops.fst.checked" ], "interface_file": false, "source_file": "LowParse.SLow.List.fst" }
[ "total" ]
[ "LowParse.Spec.Base.parser_kind", "LowParse.Spec.Base.parser", "LowParse.SLow.Base.parser32", "LowParse.SLow.Base.bytes32", "LowParse.SLow.List.parse_list_tailrec", "FStar.Pervasives.Native.None", "FStar.Pervasives.Native.tuple2", "Prims.list", "FStar.UInt32.t", "FStar.Pervasives.Native.Some", "FStar.Pervasives.Native.Mktuple2", "FStar.Bytes.len", "FStar.Pervasives.Native.option", "LowParse.SLow.Base.parser32_correct", "LowParse.Spec.List.parse_list_kind", "LowParse.Spec.List.parse_list", "Prims.unit", "LowParse.Spec.Base.parser_kind_prop_equiv", "LowParse.SLow.List.parse_list_tailrec'_correct" ]
[]
module LowParse.SLow.List include LowParse.Spec.List include LowParse.SLow.Combinators module B32 = FStar.Bytes module U32 = FStar.UInt32 module CL = C.Loops #set-options "--z3rlimit 16 --max_fuel 8 --max_ifuel 8" module L = FStar.List.Tot let rec parse_list_tailrec' (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) (aux: list t) : GTot (option (list t)) (decreases (B32.length b)) = parse_list_eq p (B32.reveal b); if B32.len b = 0ul then Some (L.rev aux) else match p32 b with | None -> None | Some (v, n) -> if n = 0ul then None (* elements cannot be empty *) else parse_list_tailrec' p32 (B32.slice b n (B32.len b)) (v :: aux) let list_append_rev_cons (#t: Type) (v: t) (aux l: list t) : Lemma (L.append (L.rev (v ::aux)) l == L.append (L.rev aux) (v :: l)) = L.rev_rev' (v :: aux); L.rev_rev' aux; L.append_assoc (L.rev aux) [v] l let rec parse_list_tailrec'_correct' (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) (aux: list t) : Lemma (requires True) (ensures ( parse_list_tailrec' p32 b aux == ( match parse (parse_list p) (B32.reveal b) with | Some (l, n) -> Some (L.append (L.rev aux) l) | None -> None ))) (decreases (B32.length b)) = parse_list_eq p (B32.reveal b); if B32.len b = 0ul then L.append_l_nil (L.rev aux) else match p32 b with | None -> () | Some (v, n) -> if n = 0ul then () else begin let s = B32.slice b n (B32.len b) in parse_list_tailrec'_correct' p32 s (v :: aux); match parse (parse_list p) (B32.reveal s) with | Some (l, n') -> list_append_rev_cons v aux l | None -> () end let parse_list_tailrec'_correct (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) : Lemma begin match parse (parse_list p) (B32.reveal b) with | Some (l, n) -> parse_list_tailrec' p32 b [] == Some l | None -> parse_list_tailrec' p32 b [] == None end = parse_list_tailrec'_correct' p32 b [] let list_rev_inv (#t: Type) (l: list t) (b: bool) (x: list t * list t) : GTot Type0 = let (rem, acc) = x in L.rev l == L.rev_acc rem acc /\ (b == false ==> rem == []) let list_rev (#t: Type) (l: list t) : Tot (l' : list t { l' == L.rev l } ) = match l with | [] -> [] | _ -> let (_, l') = CL.total_while (fun (rem, _) -> L.length rem) (list_rev_inv l) (fun (rem, acc) -> match rem with | [] -> (false, (rem, acc)) | a :: q -> (true, (q, a :: acc)) ) (l, []) in l' let parse_list_tailrec_inv (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (input: bytes32) (b: bool) (x: option (bytes32 * list t)) : GTot Type0 = match x with | Some (input', accu') -> parse_list_tailrec' p32 input [] == parse_list_tailrec' p32 input' accu' /\ (b == false ==> B32.length input' == 0) | None -> b == false /\ None? (parse_list_tailrec' p32 input []) let parse_list_tailrec_measure (#t: Type) (x: option (bytes32 * list t)) : GTot nat = match x with | None -> 0 | Some (input', _) -> B32.length input' inline_for_extraction let parse_list_tailrec_body (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (input: bytes32) : (x: option (bytes32 * list t)) -> Pure (bool * option (bytes32 * list t)) (requires (parse_list_tailrec_inv p32 input true x)) (ensures (fun (continue, y) -> parse_list_tailrec_inv p32 input continue y /\ (if continue then parse_list_tailrec_measure y < parse_list_tailrec_measure x else True) )) = fun (x: option (bytes32 * list t)) -> let (Some (input', accu')) = x in let len = B32.len input' in if len = 0ul then (false, x) else match p32 input' with | Some (v, consumed) -> if consumed = 0ul then (false, None) else let input'' = B32.slice input' consumed len in (true, Some (input'', v :: accu')) | None -> (false, None) inline_for_extraction let parse_list_tailrec (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (input: bytes32) : Tot (res: option (list t) { res == parse_list_tailrec' p32 input [] } ) = let accu = CL.total_while (parse_list_tailrec_measure #t) (parse_list_tailrec_inv p32 input) (fun x -> parse_list_tailrec_body p32 input x) (Some (input, [])) in match accu with | None -> None | Some (_, accu') -> Some (list_rev accu') inline_for_extraction let parse32_list (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p)
false
false
LowParse.SLow.List.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 8, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 16, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val parse32_list (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) : Tot (parser32 (parse_list p))
[]
LowParse.SLow.List.parse32_list
{ "file_name": "src/lowparse/LowParse.SLow.List.fst", "git_rev": "446a08ce38df905547cf20f28c43776b22b8087a", "git_url": "https://github.com/project-everest/everparse.git", "project_name": "everparse" }
p32: LowParse.SLow.Base.parser32 p -> LowParse.SLow.Base.parser32 (LowParse.Spec.List.parse_list p)
{ "end_col": 85, "end_line": 208, "start_col": 2, "start_line": 201 }
FStar.Pervasives.Lemma
val partial_serialize32_list'_init (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (input: list t) : Lemma (requires (serialize_list_precond k /\ Seq.length (serialize (serialize_list p s) input) < 4294967296) ) (ensures (partial_serialize32_list'_inv p s s32 input true (B32.empty_bytes, input)))
[ { "abbrev": true, "full_module": "FStar.List.Tot", "short_module": "L" }, { "abbrev": true, "full_module": "C.Loops", "short_module": "CL" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": true, "full_module": "FStar.Bytes", "short_module": "B32" }, { "abbrev": false, "full_module": "LowParse.SLow.Combinators", "short_module": null }, { "abbrev": false, "full_module": "LowParse.Spec.List", "short_module": null }, { "abbrev": false, "full_module": "LowParse.SLow", "short_module": null }, { "abbrev": false, "full_module": "LowParse.SLow", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let partial_serialize32_list'_init (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (input: list t) : Lemma (requires ( serialize_list_precond k /\ Seq.length (serialize (serialize_list p s) input) < 4294967296 )) (ensures ( partial_serialize32_list'_inv p s s32 input true (B32.empty_bytes, input) )) = assert (Seq.equal (B32.reveal B32.empty_bytes) Seq.empty); Seq.append_empty_l (B32.reveal (partial_serialize32_list' p s s32 input)); assert (B32.reveal (partial_serialize32_list' p s s32 input) == B32.reveal (partial_serialize32_list_tailrec' p s s32 B32.empty_bytes input)); assert (serializer32_correct (serialize_list p s) input (partial_serialize32_list_tailrec' p s s32 B32.empty_bytes input))
val partial_serialize32_list'_init (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (input: list t) : Lemma (requires (serialize_list_precond k /\ Seq.length (serialize (serialize_list p s) input) < 4294967296) ) (ensures (partial_serialize32_list'_inv p s s32 input true (B32.empty_bytes, input))) let partial_serialize32_list'_init (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (input: list t) : Lemma (requires (serialize_list_precond k /\ Seq.length (serialize (serialize_list p s) input) < 4294967296) ) (ensures (partial_serialize32_list'_inv p s s32 input true (B32.empty_bytes, input))) =
false
null
true
assert (Seq.equal (B32.reveal B32.empty_bytes) Seq.empty); Seq.append_empty_l (B32.reveal (partial_serialize32_list' p s s32 input)); assert (B32.reveal (partial_serialize32_list' p s s32 input) == B32.reveal (partial_serialize32_list_tailrec' p s s32 B32.empty_bytes input)); assert (serializer32_correct (serialize_list p s) input (partial_serialize32_list_tailrec' p s s32 B32.empty_bytes input))
{ "checked_file": "LowParse.SLow.List.fst.checked", "dependencies": [ "prims.fst.checked", "LowParse.Spec.List.fsti.checked", "LowParse.SLow.Combinators.fst.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.Bytes.fsti.checked", "C.Loops.fst.checked" ], "interface_file": false, "source_file": "LowParse.SLow.List.fst" }
[ "lemma" ]
[ "LowParse.Spec.Base.parser_kind", "LowParse.Spec.Base.parser", "LowParse.Spec.Base.serializer", "LowParse.SLow.Base.partial_serializer32", "Prims.list", "Prims._assert", "LowParse.SLow.Base.serializer32_correct", "LowParse.Spec.List.parse_list_kind", "LowParse.Spec.List.parse_list", "LowParse.Spec.List.serialize_list", "LowParse.SLow.List.partial_serialize32_list_tailrec'", "FStar.Bytes.empty_bytes", "Prims.unit", "Prims.eq2", "FStar.Seq.Base.seq", "FStar.Bytes.byte", "FStar.Bytes.reveal", "LowParse.SLow.List.partial_serialize32_list'", "FStar.Seq.Base.append_empty_l", "FStar.Seq.Base.equal", "FStar.Seq.Base.empty", "Prims.l_and", "Prims.b2t", "LowParse.Spec.List.serialize_list_precond", "Prims.op_LessThan", "FStar.Seq.Base.length", "LowParse.Bytes.byte", "LowParse.Spec.Base.serialize", "Prims.squash", "LowParse.SLow.List.partial_serialize32_list'_inv", "FStar.Pervasives.Native.Mktuple2", "LowParse.SLow.Base.bytes32", "Prims.Nil", "FStar.Pervasives.pattern" ]
[]
module LowParse.SLow.List include LowParse.Spec.List include LowParse.SLow.Combinators module B32 = FStar.Bytes module U32 = FStar.UInt32 module CL = C.Loops #set-options "--z3rlimit 16 --max_fuel 8 --max_ifuel 8" module L = FStar.List.Tot let rec parse_list_tailrec' (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) (aux: list t) : GTot (option (list t)) (decreases (B32.length b)) = parse_list_eq p (B32.reveal b); if B32.len b = 0ul then Some (L.rev aux) else match p32 b with | None -> None | Some (v, n) -> if n = 0ul then None (* elements cannot be empty *) else parse_list_tailrec' p32 (B32.slice b n (B32.len b)) (v :: aux) let list_append_rev_cons (#t: Type) (v: t) (aux l: list t) : Lemma (L.append (L.rev (v ::aux)) l == L.append (L.rev aux) (v :: l)) = L.rev_rev' (v :: aux); L.rev_rev' aux; L.append_assoc (L.rev aux) [v] l let rec parse_list_tailrec'_correct' (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) (aux: list t) : Lemma (requires True) (ensures ( parse_list_tailrec' p32 b aux == ( match parse (parse_list p) (B32.reveal b) with | Some (l, n) -> Some (L.append (L.rev aux) l) | None -> None ))) (decreases (B32.length b)) = parse_list_eq p (B32.reveal b); if B32.len b = 0ul then L.append_l_nil (L.rev aux) else match p32 b with | None -> () | Some (v, n) -> if n = 0ul then () else begin let s = B32.slice b n (B32.len b) in parse_list_tailrec'_correct' p32 s (v :: aux); match parse (parse_list p) (B32.reveal s) with | Some (l, n') -> list_append_rev_cons v aux l | None -> () end let parse_list_tailrec'_correct (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) : Lemma begin match parse (parse_list p) (B32.reveal b) with | Some (l, n) -> parse_list_tailrec' p32 b [] == Some l | None -> parse_list_tailrec' p32 b [] == None end = parse_list_tailrec'_correct' p32 b [] let list_rev_inv (#t: Type) (l: list t) (b: bool) (x: list t * list t) : GTot Type0 = let (rem, acc) = x in L.rev l == L.rev_acc rem acc /\ (b == false ==> rem == []) let list_rev (#t: Type) (l: list t) : Tot (l' : list t { l' == L.rev l } ) = match l with | [] -> [] | _ -> let (_, l') = CL.total_while (fun (rem, _) -> L.length rem) (list_rev_inv l) (fun (rem, acc) -> match rem with | [] -> (false, (rem, acc)) | a :: q -> (true, (q, a :: acc)) ) (l, []) in l' let parse_list_tailrec_inv (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (input: bytes32) (b: bool) (x: option (bytes32 * list t)) : GTot Type0 = match x with | Some (input', accu') -> parse_list_tailrec' p32 input [] == parse_list_tailrec' p32 input' accu' /\ (b == false ==> B32.length input' == 0) | None -> b == false /\ None? (parse_list_tailrec' p32 input []) let parse_list_tailrec_measure (#t: Type) (x: option (bytes32 * list t)) : GTot nat = match x with | None -> 0 | Some (input', _) -> B32.length input' inline_for_extraction let parse_list_tailrec_body (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (input: bytes32) : (x: option (bytes32 * list t)) -> Pure (bool * option (bytes32 * list t)) (requires (parse_list_tailrec_inv p32 input true x)) (ensures (fun (continue, y) -> parse_list_tailrec_inv p32 input continue y /\ (if continue then parse_list_tailrec_measure y < parse_list_tailrec_measure x else True) )) = fun (x: option (bytes32 * list t)) -> let (Some (input', accu')) = x in let len = B32.len input' in if len = 0ul then (false, x) else match p32 input' with | Some (v, consumed) -> if consumed = 0ul then (false, None) else let input'' = B32.slice input' consumed len in (true, Some (input'', v :: accu')) | None -> (false, None) inline_for_extraction let parse_list_tailrec (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (input: bytes32) : Tot (res: option (list t) { res == parse_list_tailrec' p32 input [] } ) = let accu = CL.total_while (parse_list_tailrec_measure #t) (parse_list_tailrec_inv p32 input) (fun x -> parse_list_tailrec_body p32 input x) (Some (input, [])) in match accu with | None -> None | Some (_, accu') -> Some (list_rev accu') inline_for_extraction let parse32_list (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) : Tot (parser32 (parse_list p)) = fun (input: bytes32) -> (( parse_list_tailrec'_correct p32 input; parser_kind_prop_equiv parse_list_kind (parse_list p); match parse_list_tailrec p32 input with | None -> None | Some res -> Some (res, B32.len input) ) <: (res: option (list t * U32.t) { parser32_correct (parse_list p) input res } )) let rec partial_serialize32_list' (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (input: list t) : Ghost bytes32 (requires ( serialize_list_precond k /\ ( Seq.length (serialize (serialize_list p s) input) < 4294967296 ))) (ensures (fun (res: bytes32) -> serialize_list_precond k /\ serializer32_correct (serialize_list p s) input res )) (decreases input) = match input with | [] -> serialize_list_nil p s; let res = B32.empty_bytes in assert (Seq.equal (B32.reveal res) (Seq.empty)); res | a :: q -> serialize_list_cons p s a q; let sa = s32 a in let sq = partial_serialize32_list' p s s32 q in let res = B32.append sa sq in res let rec partial_serialize32_list_tailrec' (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (accu: bytes32) (input: list t) : Ghost bytes32 (requires ( serialize_list_precond k /\ ( B32.length accu + Seq.length (serialize (serialize_list p s) input) < 4294967296 ))) (ensures (fun (res: bytes32) -> serialize_list_precond k /\ Seq.length (serialize (serialize_list p s) input) < 4294967296 /\ B32.reveal res == Seq.append (B32.reveal accu) (B32.reveal (partial_serialize32_list' p s s32 input)) )) (decreases input) = match input with | [] -> serialize_list_nil p s; Seq.append_empty_r (B32.reveal accu); accu | a :: q -> serialize_list_cons p s a q; let sa = s32 a in let accu' = B32.append accu sa in Seq.append_assoc (B32.reveal accu) (B32.reveal sa) (B32.reveal (partial_serialize32_list' p s s32 q)); partial_serialize32_list_tailrec' p s s32 accu' q let partial_serialize32_list'_inv (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (input: list t) (continue: bool) (x: bytes32 * list t) : GTot Type0 = serialize_list_precond k /\ Seq.length (serialize (serialize_list p s) input) < 4294967296 /\ ( let (accu, input') = x in B32.length accu + Seq.length (serialize (serialize_list p s) input') < 4294967296 /\ serializer32_correct (serialize_list p s) input (partial_serialize32_list_tailrec' p s s32 accu input') /\ (continue == false ==> L.length input' == 0) ) let partial_serialize32_list'_measure (#t: Type) (x: bytes32 * list t) : GTot nat = L.length (snd x) inline_for_extraction let partial_serialize32_list'_body (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (input: list t) : (x: (bytes32 * list t)) -> Pure (bool * (bytes32 * list t)) (requires (partial_serialize32_list'_inv p s s32 input true x)) (ensures (fun (continue, y) -> partial_serialize32_list'_inv p s s32 input continue y /\ (continue == true ==> partial_serialize32_list'_measure y < partial_serialize32_list'_measure x) )) = fun (x: bytes32 * list t) -> let (accu, input') = x in match input' with | [] -> (false, x) | a :: q -> [@inline_let] let _ = serialize_list_cons p s a q in let sa = s32 a in let accu' = B32.append accu sa in (true, (accu', q)) let partial_serialize32_list'_init (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (input: list t) : Lemma (requires ( serialize_list_precond k /\ Seq.length (serialize (serialize_list p s) input) < 4294967296 )) (ensures ( partial_serialize32_list'_inv p s s32 input true (B32.empty_bytes, input)
false
false
LowParse.SLow.List.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 8, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 16, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val partial_serialize32_list'_init (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (input: list t) : Lemma (requires (serialize_list_precond k /\ Seq.length (serialize (serialize_list p s) input) < 4294967296) ) (ensures (partial_serialize32_list'_inv p s s32 input true (B32.empty_bytes, input)))
[]
LowParse.SLow.List.partial_serialize32_list'_init
{ "file_name": "src/lowparse/LowParse.SLow.List.fst", "git_rev": "446a08ce38df905547cf20f28c43776b22b8087a", "git_url": "https://github.com/project-everest/everparse.git", "project_name": "everparse" }
p: LowParse.Spec.Base.parser k t -> s: LowParse.Spec.Base.serializer p -> s32: LowParse.SLow.Base.partial_serializer32 s -> input: Prims.list t -> FStar.Pervasives.Lemma (requires LowParse.Spec.List.serialize_list_precond k /\ FStar.Seq.Base.length (LowParse.Spec.Base.serialize (LowParse.Spec.List.serialize_list p s) input) < 4294967296) (ensures LowParse.SLow.List.partial_serialize32_list'_inv p s s32 input true (FStar.Bytes.empty_bytes, input))
{ "end_col": 124, "end_line": 342, "start_col": 2, "start_line": 339 }
Prims.GTot
val parse_list_tailrec' (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) (aux: list t) : GTot (option (list t)) (decreases (B32.length b))
[ { "abbrev": true, "full_module": "FStar.List.Tot", "short_module": "L" }, { "abbrev": true, "full_module": "C.Loops", "short_module": "CL" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": true, "full_module": "FStar.Bytes", "short_module": "B32" }, { "abbrev": false, "full_module": "LowParse.SLow.Combinators", "short_module": null }, { "abbrev": false, "full_module": "LowParse.Spec.List", "short_module": null }, { "abbrev": false, "full_module": "LowParse.SLow", "short_module": null }, { "abbrev": false, "full_module": "LowParse.SLow", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let rec parse_list_tailrec' (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) (aux: list t) : GTot (option (list t)) (decreases (B32.length b)) = parse_list_eq p (B32.reveal b); if B32.len b = 0ul then Some (L.rev aux) else match p32 b with | None -> None | Some (v, n) -> if n = 0ul then None (* elements cannot be empty *) else parse_list_tailrec' p32 (B32.slice b n (B32.len b)) (v :: aux)
val parse_list_tailrec' (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) (aux: list t) : GTot (option (list t)) (decreases (B32.length b)) let rec parse_list_tailrec' (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) (aux: list t) : GTot (option (list t)) (decreases (B32.length b)) =
false
null
false
parse_list_eq p (B32.reveal b); if B32.len b = 0ul then Some (L.rev aux) else match p32 b with | None -> None | Some (v, n) -> if n = 0ul then None else parse_list_tailrec' p32 (B32.slice b n (B32.len b)) (v :: aux)
{ "checked_file": "LowParse.SLow.List.fst.checked", "dependencies": [ "prims.fst.checked", "LowParse.Spec.List.fsti.checked", "LowParse.SLow.Combinators.fst.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.Bytes.fsti.checked", "C.Loops.fst.checked" ], "interface_file": false, "source_file": "LowParse.SLow.List.fst" }
[ "sometrivial", "" ]
[ "LowParse.Spec.Base.parser_kind", "LowParse.Spec.Base.parser", "LowParse.SLow.Base.parser32", "LowParse.SLow.Base.bytes32", "Prims.list", "Prims.op_Equality", "FStar.UInt32.t", "FStar.Bytes.len", "FStar.UInt32.__uint_to_t", "FStar.Pervasives.Native.Some", "FStar.List.Tot.Base.rev", "Prims.bool", "FStar.Pervasives.Native.None", "LowParse.SLow.List.parse_list_tailrec'", "FStar.Bytes.slice", "Prims.Cons", "FStar.Pervasives.Native.option", "Prims.unit", "LowParse.Spec.List.parse_list_eq", "FStar.Bytes.reveal" ]
[]
module LowParse.SLow.List include LowParse.Spec.List include LowParse.SLow.Combinators module B32 = FStar.Bytes module U32 = FStar.UInt32 module CL = C.Loops #set-options "--z3rlimit 16 --max_fuel 8 --max_ifuel 8" module L = FStar.List.Tot let rec parse_list_tailrec' (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) (aux: list t) : GTot (option (list t))
false
false
LowParse.SLow.List.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 8, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 16, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val parse_list_tailrec' (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) (aux: list t) : GTot (option (list t)) (decreases (B32.length b))
[ "recursion" ]
LowParse.SLow.List.parse_list_tailrec'
{ "file_name": "src/lowparse/LowParse.SLow.List.fst", "git_rev": "446a08ce38df905547cf20f28c43776b22b8087a", "git_url": "https://github.com/project-everest/everparse.git", "project_name": "everparse" }
p32: LowParse.SLow.Base.parser32 p -> b: LowParse.SLow.Base.bytes32 -> aux: Prims.list t -> Prims.GTot (FStar.Pervasives.Native.option (Prims.list t))
{ "end_col": 63, "end_line": 33, "start_col": 2, "start_line": 22 }
Prims.Tot
val partial_serialize32_list (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (u: unit{serialize_list_precond k}) : Tot (partial_serializer32 (serialize_list p s))
[ { "abbrev": true, "full_module": "FStar.List.Tot", "short_module": "L" }, { "abbrev": true, "full_module": "C.Loops", "short_module": "CL" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": true, "full_module": "FStar.Bytes", "short_module": "B32" }, { "abbrev": false, "full_module": "LowParse.SLow.Combinators", "short_module": null }, { "abbrev": false, "full_module": "LowParse.Spec.List", "short_module": null }, { "abbrev": false, "full_module": "LowParse.SLow", "short_module": null }, { "abbrev": false, "full_module": "LowParse.SLow", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let partial_serialize32_list (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (u: unit { serialize_list_precond k }) : Tot (partial_serializer32 (serialize_list p s)) = fun (input: list t { Seq.length (serialize (serialize_list p s) input) < 4294967296 } ) -> (( let (res, _) = partial_serialize32_list'_init p s s32 input; CL.total_while partial_serialize32_list'_measure (partial_serialize32_list'_inv p s s32 input) (fun x -> partial_serialize32_list'_body p s s32 input x) (B32.empty_bytes, input) in res ) <: (res: bytes32 { serializer32_correct (serialize_list p s) input res }))
val partial_serialize32_list (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (u: unit{serialize_list_precond k}) : Tot (partial_serializer32 (serialize_list p s)) let partial_serialize32_list (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (u: unit{serialize_list_precond k}) : Tot (partial_serializer32 (serialize_list p s)) =
false
null
false
fun (input: list t {Seq.length (serialize (serialize_list p s) input) < 4294967296}) -> ((let res, _ = partial_serialize32_list'_init p s s32 input; CL.total_while partial_serialize32_list'_measure (partial_serialize32_list'_inv p s s32 input) (fun x -> partial_serialize32_list'_body p s s32 input x) (B32.empty_bytes, input) in res) <: (res: bytes32{serializer32_correct (serialize_list p s) input res}))
{ "checked_file": "LowParse.SLow.List.fst.checked", "dependencies": [ "prims.fst.checked", "LowParse.Spec.List.fsti.checked", "LowParse.SLow.Combinators.fst.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.Bytes.fsti.checked", "C.Loops.fst.checked" ], "interface_file": false, "source_file": "LowParse.SLow.List.fst" }
[ "total" ]
[ "LowParse.Spec.Base.parser_kind", "LowParse.Spec.Base.parser", "LowParse.Spec.Base.serializer", "LowParse.SLow.Base.partial_serializer32", "Prims.unit", "Prims.b2t", "LowParse.Spec.List.serialize_list_precond", "Prims.list", "Prims.op_LessThan", "FStar.Seq.Base.length", "LowParse.Bytes.byte", "LowParse.Spec.Base.serialize", "LowParse.Spec.List.parse_list_kind", "LowParse.Spec.List.parse_list", "LowParse.Spec.List.serialize_list", "LowParse.SLow.Base.bytes32", "LowParse.SLow.Base.serializer32_correct", "FStar.Pervasives.Native.tuple2", "C.Loops.total_while", "LowParse.SLow.List.partial_serialize32_list'_measure", "LowParse.SLow.List.partial_serialize32_list'_inv", "LowParse.SLow.List.partial_serialize32_list'_body", "Prims.bool", "FStar.Pervasives.Native.Mktuple2", "FStar.Bytes.empty_bytes", "LowParse.SLow.List.partial_serialize32_list'_init" ]
[]
module LowParse.SLow.List include LowParse.Spec.List include LowParse.SLow.Combinators module B32 = FStar.Bytes module U32 = FStar.UInt32 module CL = C.Loops #set-options "--z3rlimit 16 --max_fuel 8 --max_ifuel 8" module L = FStar.List.Tot let rec parse_list_tailrec' (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) (aux: list t) : GTot (option (list t)) (decreases (B32.length b)) = parse_list_eq p (B32.reveal b); if B32.len b = 0ul then Some (L.rev aux) else match p32 b with | None -> None | Some (v, n) -> if n = 0ul then None (* elements cannot be empty *) else parse_list_tailrec' p32 (B32.slice b n (B32.len b)) (v :: aux) let list_append_rev_cons (#t: Type) (v: t) (aux l: list t) : Lemma (L.append (L.rev (v ::aux)) l == L.append (L.rev aux) (v :: l)) = L.rev_rev' (v :: aux); L.rev_rev' aux; L.append_assoc (L.rev aux) [v] l let rec parse_list_tailrec'_correct' (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) (aux: list t) : Lemma (requires True) (ensures ( parse_list_tailrec' p32 b aux == ( match parse (parse_list p) (B32.reveal b) with | Some (l, n) -> Some (L.append (L.rev aux) l) | None -> None ))) (decreases (B32.length b)) = parse_list_eq p (B32.reveal b); if B32.len b = 0ul then L.append_l_nil (L.rev aux) else match p32 b with | None -> () | Some (v, n) -> if n = 0ul then () else begin let s = B32.slice b n (B32.len b) in parse_list_tailrec'_correct' p32 s (v :: aux); match parse (parse_list p) (B32.reveal s) with | Some (l, n') -> list_append_rev_cons v aux l | None -> () end let parse_list_tailrec'_correct (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) : Lemma begin match parse (parse_list p) (B32.reveal b) with | Some (l, n) -> parse_list_tailrec' p32 b [] == Some l | None -> parse_list_tailrec' p32 b [] == None end = parse_list_tailrec'_correct' p32 b [] let list_rev_inv (#t: Type) (l: list t) (b: bool) (x: list t * list t) : GTot Type0 = let (rem, acc) = x in L.rev l == L.rev_acc rem acc /\ (b == false ==> rem == []) let list_rev (#t: Type) (l: list t) : Tot (l' : list t { l' == L.rev l } ) = match l with | [] -> [] | _ -> let (_, l') = CL.total_while (fun (rem, _) -> L.length rem) (list_rev_inv l) (fun (rem, acc) -> match rem with | [] -> (false, (rem, acc)) | a :: q -> (true, (q, a :: acc)) ) (l, []) in l' let parse_list_tailrec_inv (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (input: bytes32) (b: bool) (x: option (bytes32 * list t)) : GTot Type0 = match x with | Some (input', accu') -> parse_list_tailrec' p32 input [] == parse_list_tailrec' p32 input' accu' /\ (b == false ==> B32.length input' == 0) | None -> b == false /\ None? (parse_list_tailrec' p32 input []) let parse_list_tailrec_measure (#t: Type) (x: option (bytes32 * list t)) : GTot nat = match x with | None -> 0 | Some (input', _) -> B32.length input' inline_for_extraction let parse_list_tailrec_body (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (input: bytes32) : (x: option (bytes32 * list t)) -> Pure (bool * option (bytes32 * list t)) (requires (parse_list_tailrec_inv p32 input true x)) (ensures (fun (continue, y) -> parse_list_tailrec_inv p32 input continue y /\ (if continue then parse_list_tailrec_measure y < parse_list_tailrec_measure x else True) )) = fun (x: option (bytes32 * list t)) -> let (Some (input', accu')) = x in let len = B32.len input' in if len = 0ul then (false, x) else match p32 input' with | Some (v, consumed) -> if consumed = 0ul then (false, None) else let input'' = B32.slice input' consumed len in (true, Some (input'', v :: accu')) | None -> (false, None) inline_for_extraction let parse_list_tailrec (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (input: bytes32) : Tot (res: option (list t) { res == parse_list_tailrec' p32 input [] } ) = let accu = CL.total_while (parse_list_tailrec_measure #t) (parse_list_tailrec_inv p32 input) (fun x -> parse_list_tailrec_body p32 input x) (Some (input, [])) in match accu with | None -> None | Some (_, accu') -> Some (list_rev accu') inline_for_extraction let parse32_list (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) : Tot (parser32 (parse_list p)) = fun (input: bytes32) -> (( parse_list_tailrec'_correct p32 input; parser_kind_prop_equiv parse_list_kind (parse_list p); match parse_list_tailrec p32 input with | None -> None | Some res -> Some (res, B32.len input) ) <: (res: option (list t * U32.t) { parser32_correct (parse_list p) input res } )) let rec partial_serialize32_list' (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (input: list t) : Ghost bytes32 (requires ( serialize_list_precond k /\ ( Seq.length (serialize (serialize_list p s) input) < 4294967296 ))) (ensures (fun (res: bytes32) -> serialize_list_precond k /\ serializer32_correct (serialize_list p s) input res )) (decreases input) = match input with | [] -> serialize_list_nil p s; let res = B32.empty_bytes in assert (Seq.equal (B32.reveal res) (Seq.empty)); res | a :: q -> serialize_list_cons p s a q; let sa = s32 a in let sq = partial_serialize32_list' p s s32 q in let res = B32.append sa sq in res let rec partial_serialize32_list_tailrec' (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (accu: bytes32) (input: list t) : Ghost bytes32 (requires ( serialize_list_precond k /\ ( B32.length accu + Seq.length (serialize (serialize_list p s) input) < 4294967296 ))) (ensures (fun (res: bytes32) -> serialize_list_precond k /\ Seq.length (serialize (serialize_list p s) input) < 4294967296 /\ B32.reveal res == Seq.append (B32.reveal accu) (B32.reveal (partial_serialize32_list' p s s32 input)) )) (decreases input) = match input with | [] -> serialize_list_nil p s; Seq.append_empty_r (B32.reveal accu); accu | a :: q -> serialize_list_cons p s a q; let sa = s32 a in let accu' = B32.append accu sa in Seq.append_assoc (B32.reveal accu) (B32.reveal sa) (B32.reveal (partial_serialize32_list' p s s32 q)); partial_serialize32_list_tailrec' p s s32 accu' q let partial_serialize32_list'_inv (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (input: list t) (continue: bool) (x: bytes32 * list t) : GTot Type0 = serialize_list_precond k /\ Seq.length (serialize (serialize_list p s) input) < 4294967296 /\ ( let (accu, input') = x in B32.length accu + Seq.length (serialize (serialize_list p s) input') < 4294967296 /\ serializer32_correct (serialize_list p s) input (partial_serialize32_list_tailrec' p s s32 accu input') /\ (continue == false ==> L.length input' == 0) ) let partial_serialize32_list'_measure (#t: Type) (x: bytes32 * list t) : GTot nat = L.length (snd x) inline_for_extraction let partial_serialize32_list'_body (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (input: list t) : (x: (bytes32 * list t)) -> Pure (bool * (bytes32 * list t)) (requires (partial_serialize32_list'_inv p s s32 input true x)) (ensures (fun (continue, y) -> partial_serialize32_list'_inv p s s32 input continue y /\ (continue == true ==> partial_serialize32_list'_measure y < partial_serialize32_list'_measure x) )) = fun (x: bytes32 * list t) -> let (accu, input') = x in match input' with | [] -> (false, x) | a :: q -> [@inline_let] let _ = serialize_list_cons p s a q in let sa = s32 a in let accu' = B32.append accu sa in (true, (accu', q)) let partial_serialize32_list'_init (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (input: list t) : Lemma (requires ( serialize_list_precond k /\ Seq.length (serialize (serialize_list p s) input) < 4294967296 )) (ensures ( partial_serialize32_list'_inv p s s32 input true (B32.empty_bytes, input) )) = assert (Seq.equal (B32.reveal B32.empty_bytes) Seq.empty); Seq.append_empty_l (B32.reveal (partial_serialize32_list' p s s32 input)); assert (B32.reveal (partial_serialize32_list' p s s32 input) == B32.reveal (partial_serialize32_list_tailrec' p s s32 B32.empty_bytes input)); assert (serializer32_correct (serialize_list p s) input (partial_serialize32_list_tailrec' p s s32 B32.empty_bytes input)) inline_for_extraction let partial_serialize32_list (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (u: unit { serialize_list_precond k })
false
false
LowParse.SLow.List.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 8, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 16, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val partial_serialize32_list (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (u: unit{serialize_list_precond k}) : Tot (partial_serializer32 (serialize_list p s))
[]
LowParse.SLow.List.partial_serialize32_list
{ "file_name": "src/lowparse/LowParse.SLow.List.fst", "git_rev": "446a08ce38df905547cf20f28c43776b22b8087a", "git_url": "https://github.com/project-everest/everparse.git", "project_name": "everparse" }
p: LowParse.Spec.Base.parser k t -> s: LowParse.Spec.Base.serializer p -> s32: LowParse.SLow.Base.partial_serializer32 s -> u98: u99: Prims.unit{LowParse.Spec.List.serialize_list_precond k} -> LowParse.SLow.Base.partial_serializer32 (LowParse.Spec.List.serialize_list p s)
{ "end_col": 78, "end_line": 365, "start_col": 2, "start_line": 355 }
Prims.Tot
val size32_list (#t: Type) (#k: parser_kind) (#p: parser k t) (#s: serializer p) (s32: size32 s) (u: unit{serialize_list_precond k}) : Tot (size32 (serialize_list p s))
[ { "abbrev": true, "full_module": "FStar.List.Tot", "short_module": "L" }, { "abbrev": true, "full_module": "C.Loops", "short_module": "CL" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": true, "full_module": "FStar.Bytes", "short_module": "B32" }, { "abbrev": false, "full_module": "LowParse.SLow.Combinators", "short_module": null }, { "abbrev": false, "full_module": "LowParse.Spec.List", "short_module": null }, { "abbrev": false, "full_module": "LowParse.SLow", "short_module": null }, { "abbrev": false, "full_module": "LowParse.SLow", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let size32_list (#t: Type) (#k: parser_kind) (#p: parser k t) (#s: serializer p) (s32: size32 s) (u: unit { serialize_list_precond k }) : Tot (size32 (serialize_list p s)) = fun input -> [@inline_let] let (len, _) = CL.total_while size32_list_measure (size32_list_inv s32 u input) (fun x -> size32_list_body s32 u input x) (0ul, input) in (len <: (len : U32.t { size32_postcond (serialize_list p s) input len } ))
val size32_list (#t: Type) (#k: parser_kind) (#p: parser k t) (#s: serializer p) (s32: size32 s) (u: unit{serialize_list_precond k}) : Tot (size32 (serialize_list p s)) let size32_list (#t: Type) (#k: parser_kind) (#p: parser k t) (#s: serializer p) (s32: size32 s) (u: unit{serialize_list_precond k}) : Tot (size32 (serialize_list p s)) =
false
null
false
fun input -> [@@ inline_let ]let len, _ = CL.total_while size32_list_measure (size32_list_inv s32 u input) (fun x -> size32_list_body s32 u input x) (0ul, input) in (len <: (len: U32.t{size32_postcond (serialize_list p s) input len}))
{ "checked_file": "LowParse.SLow.List.fst.checked", "dependencies": [ "prims.fst.checked", "LowParse.Spec.List.fsti.checked", "LowParse.SLow.Combinators.fst.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.Bytes.fsti.checked", "C.Loops.fst.checked" ], "interface_file": false, "source_file": "LowParse.SLow.List.fst" }
[ "total" ]
[ "LowParse.Spec.Base.parser_kind", "LowParse.Spec.Base.parser", "LowParse.Spec.Base.serializer", "LowParse.SLow.Base.size32", "Prims.unit", "Prims.b2t", "LowParse.Spec.List.serialize_list_precond", "Prims.list", "FStar.UInt32.t", "LowParse.SLow.Base.size32_postcond", "LowParse.Spec.List.parse_list_kind", "LowParse.Spec.List.parse_list", "LowParse.Spec.List.serialize_list", "FStar.Pervasives.Native.tuple2", "C.Loops.total_while", "LowParse.SLow.List.size32_list_measure", "LowParse.SLow.List.size32_list_inv", "LowParse.SLow.List.size32_list_body", "Prims.bool", "FStar.Pervasives.Native.Mktuple2", "FStar.UInt32.__uint_to_t" ]
[]
module LowParse.SLow.List include LowParse.Spec.List include LowParse.SLow.Combinators module B32 = FStar.Bytes module U32 = FStar.UInt32 module CL = C.Loops #set-options "--z3rlimit 16 --max_fuel 8 --max_ifuel 8" module L = FStar.List.Tot let rec parse_list_tailrec' (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) (aux: list t) : GTot (option (list t)) (decreases (B32.length b)) = parse_list_eq p (B32.reveal b); if B32.len b = 0ul then Some (L.rev aux) else match p32 b with | None -> None | Some (v, n) -> if n = 0ul then None (* elements cannot be empty *) else parse_list_tailrec' p32 (B32.slice b n (B32.len b)) (v :: aux) let list_append_rev_cons (#t: Type) (v: t) (aux l: list t) : Lemma (L.append (L.rev (v ::aux)) l == L.append (L.rev aux) (v :: l)) = L.rev_rev' (v :: aux); L.rev_rev' aux; L.append_assoc (L.rev aux) [v] l let rec parse_list_tailrec'_correct' (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) (aux: list t) : Lemma (requires True) (ensures ( parse_list_tailrec' p32 b aux == ( match parse (parse_list p) (B32.reveal b) with | Some (l, n) -> Some (L.append (L.rev aux) l) | None -> None ))) (decreases (B32.length b)) = parse_list_eq p (B32.reveal b); if B32.len b = 0ul then L.append_l_nil (L.rev aux) else match p32 b with | None -> () | Some (v, n) -> if n = 0ul then () else begin let s = B32.slice b n (B32.len b) in parse_list_tailrec'_correct' p32 s (v :: aux); match parse (parse_list p) (B32.reveal s) with | Some (l, n') -> list_append_rev_cons v aux l | None -> () end let parse_list_tailrec'_correct (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) : Lemma begin match parse (parse_list p) (B32.reveal b) with | Some (l, n) -> parse_list_tailrec' p32 b [] == Some l | None -> parse_list_tailrec' p32 b [] == None end = parse_list_tailrec'_correct' p32 b [] let list_rev_inv (#t: Type) (l: list t) (b: bool) (x: list t * list t) : GTot Type0 = let (rem, acc) = x in L.rev l == L.rev_acc rem acc /\ (b == false ==> rem == []) let list_rev (#t: Type) (l: list t) : Tot (l' : list t { l' == L.rev l } ) = match l with | [] -> [] | _ -> let (_, l') = CL.total_while (fun (rem, _) -> L.length rem) (list_rev_inv l) (fun (rem, acc) -> match rem with | [] -> (false, (rem, acc)) | a :: q -> (true, (q, a :: acc)) ) (l, []) in l' let parse_list_tailrec_inv (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (input: bytes32) (b: bool) (x: option (bytes32 * list t)) : GTot Type0 = match x with | Some (input', accu') -> parse_list_tailrec' p32 input [] == parse_list_tailrec' p32 input' accu' /\ (b == false ==> B32.length input' == 0) | None -> b == false /\ None? (parse_list_tailrec' p32 input []) let parse_list_tailrec_measure (#t: Type) (x: option (bytes32 * list t)) : GTot nat = match x with | None -> 0 | Some (input', _) -> B32.length input' inline_for_extraction let parse_list_tailrec_body (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (input: bytes32) : (x: option (bytes32 * list t)) -> Pure (bool * option (bytes32 * list t)) (requires (parse_list_tailrec_inv p32 input true x)) (ensures (fun (continue, y) -> parse_list_tailrec_inv p32 input continue y /\ (if continue then parse_list_tailrec_measure y < parse_list_tailrec_measure x else True) )) = fun (x: option (bytes32 * list t)) -> let (Some (input', accu')) = x in let len = B32.len input' in if len = 0ul then (false, x) else match p32 input' with | Some (v, consumed) -> if consumed = 0ul then (false, None) else let input'' = B32.slice input' consumed len in (true, Some (input'', v :: accu')) | None -> (false, None) inline_for_extraction let parse_list_tailrec (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (input: bytes32) : Tot (res: option (list t) { res == parse_list_tailrec' p32 input [] } ) = let accu = CL.total_while (parse_list_tailrec_measure #t) (parse_list_tailrec_inv p32 input) (fun x -> parse_list_tailrec_body p32 input x) (Some (input, [])) in match accu with | None -> None | Some (_, accu') -> Some (list_rev accu') inline_for_extraction let parse32_list (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) : Tot (parser32 (parse_list p)) = fun (input: bytes32) -> (( parse_list_tailrec'_correct p32 input; parser_kind_prop_equiv parse_list_kind (parse_list p); match parse_list_tailrec p32 input with | None -> None | Some res -> Some (res, B32.len input) ) <: (res: option (list t * U32.t) { parser32_correct (parse_list p) input res } )) let rec partial_serialize32_list' (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (input: list t) : Ghost bytes32 (requires ( serialize_list_precond k /\ ( Seq.length (serialize (serialize_list p s) input) < 4294967296 ))) (ensures (fun (res: bytes32) -> serialize_list_precond k /\ serializer32_correct (serialize_list p s) input res )) (decreases input) = match input with | [] -> serialize_list_nil p s; let res = B32.empty_bytes in assert (Seq.equal (B32.reveal res) (Seq.empty)); res | a :: q -> serialize_list_cons p s a q; let sa = s32 a in let sq = partial_serialize32_list' p s s32 q in let res = B32.append sa sq in res let rec partial_serialize32_list_tailrec' (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (accu: bytes32) (input: list t) : Ghost bytes32 (requires ( serialize_list_precond k /\ ( B32.length accu + Seq.length (serialize (serialize_list p s) input) < 4294967296 ))) (ensures (fun (res: bytes32) -> serialize_list_precond k /\ Seq.length (serialize (serialize_list p s) input) < 4294967296 /\ B32.reveal res == Seq.append (B32.reveal accu) (B32.reveal (partial_serialize32_list' p s s32 input)) )) (decreases input) = match input with | [] -> serialize_list_nil p s; Seq.append_empty_r (B32.reveal accu); accu | a :: q -> serialize_list_cons p s a q; let sa = s32 a in let accu' = B32.append accu sa in Seq.append_assoc (B32.reveal accu) (B32.reveal sa) (B32.reveal (partial_serialize32_list' p s s32 q)); partial_serialize32_list_tailrec' p s s32 accu' q let partial_serialize32_list'_inv (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (input: list t) (continue: bool) (x: bytes32 * list t) : GTot Type0 = serialize_list_precond k /\ Seq.length (serialize (serialize_list p s) input) < 4294967296 /\ ( let (accu, input') = x in B32.length accu + Seq.length (serialize (serialize_list p s) input') < 4294967296 /\ serializer32_correct (serialize_list p s) input (partial_serialize32_list_tailrec' p s s32 accu input') /\ (continue == false ==> L.length input' == 0) ) let partial_serialize32_list'_measure (#t: Type) (x: bytes32 * list t) : GTot nat = L.length (snd x) inline_for_extraction let partial_serialize32_list'_body (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (input: list t) : (x: (bytes32 * list t)) -> Pure (bool * (bytes32 * list t)) (requires (partial_serialize32_list'_inv p s s32 input true x)) (ensures (fun (continue, y) -> partial_serialize32_list'_inv p s s32 input continue y /\ (continue == true ==> partial_serialize32_list'_measure y < partial_serialize32_list'_measure x) )) = fun (x: bytes32 * list t) -> let (accu, input') = x in match input' with | [] -> (false, x) | a :: q -> [@inline_let] let _ = serialize_list_cons p s a q in let sa = s32 a in let accu' = B32.append accu sa in (true, (accu', q)) let partial_serialize32_list'_init (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (input: list t) : Lemma (requires ( serialize_list_precond k /\ Seq.length (serialize (serialize_list p s) input) < 4294967296 )) (ensures ( partial_serialize32_list'_inv p s s32 input true (B32.empty_bytes, input) )) = assert (Seq.equal (B32.reveal B32.empty_bytes) Seq.empty); Seq.append_empty_l (B32.reveal (partial_serialize32_list' p s s32 input)); assert (B32.reveal (partial_serialize32_list' p s s32 input) == B32.reveal (partial_serialize32_list_tailrec' p s s32 B32.empty_bytes input)); assert (serializer32_correct (serialize_list p s) input (partial_serialize32_list_tailrec' p s s32 B32.empty_bytes input)) inline_for_extraction let partial_serialize32_list (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (u: unit { serialize_list_precond k }) : Tot (partial_serializer32 (serialize_list p s)) = fun (input: list t { Seq.length (serialize (serialize_list p s) input) < 4294967296 } ) -> (( let (res, _) = partial_serialize32_list'_init p s s32 input; CL.total_while partial_serialize32_list'_measure (partial_serialize32_list'_inv p s s32 input) (fun x -> partial_serialize32_list'_body p s s32 input x) (B32.empty_bytes, input) in res ) <: (res: bytes32 { serializer32_correct (serialize_list p s) input res })) let size32_list_inv (#t: Type) (#k: parser_kind) (#p: parser k t) (#s: serializer p) (s32: size32 s) (u: unit { serialize_list_precond k }) (input: list t) (continue: bool) (accu: (U32.t * list t)) : GTot Type0 = let (len, rem) = accu in let sz = Seq.length (serialize (serialize_list p s) input) in if continue then U32.v len < U32.v u32_max /\ sz == U32.v len + Seq.length (serialize (serialize_list p s) rem) else size32_postcond (serialize_list p s) input len let size32_list_measure (#t: Type) (accu: (U32.t * list t)) : GTot nat = let (_, rem) = accu in L.length rem inline_for_extraction let size32_list_body (#t: Type) (#k: parser_kind) (#p: parser k t) (#s: serializer p) (s32: size32 s) (u: unit { serialize_list_precond k }) (input: list t) : (x: (U32.t * list t)) -> Pure (bool * (U32.t * list t)) (requires (size32_list_inv s32 u input true x)) (ensures (fun (continue, y) -> size32_list_inv s32 u input continue y /\ (continue == true ==> size32_list_measure y < size32_list_measure x) )) = fun accu -> let (len, rem) = accu in match rem with | [] -> [@inline_let] let _ = serialize_list_nil p s in (false, accu) | a :: q -> [@inline_let] let _ = serialize_list_cons p s a q in let sza = s32 a in let len' = add_overflow len sza in if len' = u32_max then (false, (u32_max, [])) else (true, (len', q)) inline_for_extraction let size32_list (#t: Type) (#k: parser_kind) (#p: parser k t) (#s: serializer p) (s32: size32 s) (u: unit { serialize_list_precond k })
false
false
LowParse.SLow.List.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 8, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 16, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val size32_list (#t: Type) (#k: parser_kind) (#p: parser k t) (#s: serializer p) (s32: size32 s) (u: unit{serialize_list_precond k}) : Tot (size32 (serialize_list p s))
[]
LowParse.SLow.List.size32_list
{ "file_name": "src/lowparse/LowParse.SLow.List.fst", "git_rev": "446a08ce38df905547cf20f28c43776b22b8087a", "git_url": "https://github.com/project-everest/everparse.git", "project_name": "everparse" }
s32: LowParse.SLow.Base.size32 s -> u123: u124: Prims.unit{LowParse.Spec.List.serialize_list_precond k} -> LowParse.SLow.Base.size32 (LowParse.Spec.List.serialize_list p s)
{ "end_col": 76, "end_line": 450, "start_col": 2, "start_line": 441 }
FStar.Pervasives.Lemma
val parse_list_tailrec'_correct (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) : Lemma (match parse (parse_list p) (B32.reveal b) with | Some (l, n) -> parse_list_tailrec' p32 b [] == Some l | None -> parse_list_tailrec' p32 b [] == None)
[ { "abbrev": true, "full_module": "FStar.List.Tot", "short_module": "L" }, { "abbrev": true, "full_module": "C.Loops", "short_module": "CL" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": true, "full_module": "FStar.Bytes", "short_module": "B32" }, { "abbrev": false, "full_module": "LowParse.SLow.Combinators", "short_module": null }, { "abbrev": false, "full_module": "LowParse.Spec.List", "short_module": null }, { "abbrev": false, "full_module": "LowParse.SLow", "short_module": null }, { "abbrev": false, "full_module": "LowParse.SLow", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let parse_list_tailrec'_correct (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) : Lemma begin match parse (parse_list p) (B32.reveal b) with | Some (l, n) -> parse_list_tailrec' p32 b [] == Some l | None -> parse_list_tailrec' p32 b [] == None end = parse_list_tailrec'_correct' p32 b []
val parse_list_tailrec'_correct (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) : Lemma (match parse (parse_list p) (B32.reveal b) with | Some (l, n) -> parse_list_tailrec' p32 b [] == Some l | None -> parse_list_tailrec' p32 b [] == None) let parse_list_tailrec'_correct (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) : Lemma (match parse (parse_list p) (B32.reveal b) with | Some (l, n) -> parse_list_tailrec' p32 b [] == Some l | None -> parse_list_tailrec' p32 b [] == None) =
false
null
true
parse_list_tailrec'_correct' p32 b []
{ "checked_file": "LowParse.SLow.List.fst.checked", "dependencies": [ "prims.fst.checked", "LowParse.Spec.List.fsti.checked", "LowParse.SLow.Combinators.fst.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.Bytes.fsti.checked", "C.Loops.fst.checked" ], "interface_file": false, "source_file": "LowParse.SLow.List.fst" }
[ "lemma" ]
[ "LowParse.Spec.Base.parser_kind", "LowParse.Spec.Base.parser", "LowParse.SLow.Base.parser32", "LowParse.SLow.Base.bytes32", "LowParse.SLow.List.parse_list_tailrec'_correct'", "Prims.Nil", "Prims.unit", "Prims.l_True", "Prims.squash", "LowParse.Spec.Base.parse", "Prims.list", "LowParse.Spec.List.parse_list", "FStar.Bytes.reveal", "LowParse.Spec.Base.consumed_length", "Prims.eq2", "FStar.Pervasives.Native.option", "LowParse.SLow.List.parse_list_tailrec'", "FStar.Pervasives.Native.Some", "FStar.Pervasives.Native.None", "FStar.Pervasives.pattern" ]
[]
module LowParse.SLow.List include LowParse.Spec.List include LowParse.SLow.Combinators module B32 = FStar.Bytes module U32 = FStar.UInt32 module CL = C.Loops #set-options "--z3rlimit 16 --max_fuel 8 --max_ifuel 8" module L = FStar.List.Tot let rec parse_list_tailrec' (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) (aux: list t) : GTot (option (list t)) (decreases (B32.length b)) = parse_list_eq p (B32.reveal b); if B32.len b = 0ul then Some (L.rev aux) else match p32 b with | None -> None | Some (v, n) -> if n = 0ul then None (* elements cannot be empty *) else parse_list_tailrec' p32 (B32.slice b n (B32.len b)) (v :: aux) let list_append_rev_cons (#t: Type) (v: t) (aux l: list t) : Lemma (L.append (L.rev (v ::aux)) l == L.append (L.rev aux) (v :: l)) = L.rev_rev' (v :: aux); L.rev_rev' aux; L.append_assoc (L.rev aux) [v] l let rec parse_list_tailrec'_correct' (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) (aux: list t) : Lemma (requires True) (ensures ( parse_list_tailrec' p32 b aux == ( match parse (parse_list p) (B32.reveal b) with | Some (l, n) -> Some (L.append (L.rev aux) l) | None -> None ))) (decreases (B32.length b)) = parse_list_eq p (B32.reveal b); if B32.len b = 0ul then L.append_l_nil (L.rev aux) else match p32 b with | None -> () | Some (v, n) -> if n = 0ul then () else begin let s = B32.slice b n (B32.len b) in parse_list_tailrec'_correct' p32 s (v :: aux); match parse (parse_list p) (B32.reveal s) with | Some (l, n') -> list_append_rev_cons v aux l | None -> () end let parse_list_tailrec'_correct (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) : Lemma begin match parse (parse_list p) (B32.reveal b) with | Some (l, n) -> parse_list_tailrec' p32 b [] == Some l | None -> parse_list_tailrec' p32 b [] == None
false
false
LowParse.SLow.List.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 8, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 16, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val parse_list_tailrec'_correct (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) : Lemma (match parse (parse_list p) (B32.reveal b) with | Some (l, n) -> parse_list_tailrec' p32 b [] == Some l | None -> parse_list_tailrec' p32 b [] == None)
[]
LowParse.SLow.List.parse_list_tailrec'_correct
{ "file_name": "src/lowparse/LowParse.SLow.List.fst", "git_rev": "446a08ce38df905547cf20f28c43776b22b8087a", "git_url": "https://github.com/project-everest/everparse.git", "project_name": "everparse" }
p32: LowParse.SLow.Base.parser32 p -> b: LowParse.SLow.Base.bytes32 -> FStar.Pervasives.Lemma (ensures ((match LowParse.Spec.Base.parse (LowParse.Spec.List.parse_list p) (FStar.Bytes.reveal b) with | FStar.Pervasives.Native.Some #_ (FStar.Pervasives.Native.Mktuple2 #_ #_ l _) -> LowParse.SLow.List.parse_list_tailrec' p32 b [] == FStar.Pervasives.Native.Some l | FStar.Pervasives.Native.None #_ -> LowParse.SLow.List.parse_list_tailrec' p32 b [] == FStar.Pervasives.Native.None) <: Type0))
{ "end_col": 39, "end_line": 90, "start_col": 2, "start_line": 90 }
Prims.Ghost
val partial_serialize32_list' (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (input: list t) : Ghost bytes32 (requires (serialize_list_precond k /\ (Seq.length (serialize (serialize_list p s) input) < 4294967296))) (ensures (fun (res: bytes32) -> serialize_list_precond k /\ serializer32_correct (serialize_list p s) input res)) (decreases input)
[ { "abbrev": true, "full_module": "FStar.List.Tot", "short_module": "L" }, { "abbrev": true, "full_module": "C.Loops", "short_module": "CL" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": true, "full_module": "FStar.Bytes", "short_module": "B32" }, { "abbrev": false, "full_module": "LowParse.SLow.Combinators", "short_module": null }, { "abbrev": false, "full_module": "LowParse.Spec.List", "short_module": null }, { "abbrev": false, "full_module": "LowParse.SLow", "short_module": null }, { "abbrev": false, "full_module": "LowParse.SLow", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let rec partial_serialize32_list' (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (input: list t) : Ghost bytes32 (requires ( serialize_list_precond k /\ ( Seq.length (serialize (serialize_list p s) input) < 4294967296 ))) (ensures (fun (res: bytes32) -> serialize_list_precond k /\ serializer32_correct (serialize_list p s) input res )) (decreases input) = match input with | [] -> serialize_list_nil p s; let res = B32.empty_bytes in assert (Seq.equal (B32.reveal res) (Seq.empty)); res | a :: q -> serialize_list_cons p s a q; let sa = s32 a in let sq = partial_serialize32_list' p s s32 q in let res = B32.append sa sq in res
val partial_serialize32_list' (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (input: list t) : Ghost bytes32 (requires (serialize_list_precond k /\ (Seq.length (serialize (serialize_list p s) input) < 4294967296))) (ensures (fun (res: bytes32) -> serialize_list_precond k /\ serializer32_correct (serialize_list p s) input res)) (decreases input) let rec partial_serialize32_list' (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (input: list t) : Ghost bytes32 (requires (serialize_list_precond k /\ (Seq.length (serialize (serialize_list p s) input) < 4294967296))) (ensures (fun (res: bytes32) -> serialize_list_precond k /\ serializer32_correct (serialize_list p s) input res)) (decreases input) =
false
null
false
match input with | [] -> serialize_list_nil p s; let res = B32.empty_bytes in assert (Seq.equal (B32.reveal res) (Seq.empty)); res | a :: q -> serialize_list_cons p s a q; let sa = s32 a in let sq = partial_serialize32_list' p s s32 q in let res = B32.append sa sq in res
{ "checked_file": "LowParse.SLow.List.fst.checked", "dependencies": [ "prims.fst.checked", "LowParse.Spec.List.fsti.checked", "LowParse.SLow.Combinators.fst.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.Bytes.fsti.checked", "C.Loops.fst.checked" ], "interface_file": false, "source_file": "LowParse.SLow.List.fst" }
[ "" ]
[ "LowParse.Spec.Base.parser_kind", "LowParse.Spec.Base.parser", "LowParse.Spec.Base.serializer", "LowParse.SLow.Base.partial_serializer32", "Prims.list", "Prims.unit", "Prims._assert", "FStar.Seq.Base.equal", "FStar.Bytes.byte", "FStar.Bytes.reveal", "FStar.Seq.Base.empty", "FStar.Bytes.lbytes", "FStar.Bytes.empty_bytes", "LowParse.Spec.List.serialize_list_nil", "FStar.Bytes.bytes", "FStar.Bytes.append", "LowParse.SLow.Base.bytes32", "LowParse.SLow.List.partial_serialize32_list'", "LowParse.SLow.Base.serializer32_correct", "LowParse.Spec.List.serialize_list_cons", "Prims.l_and", "Prims.b2t", "LowParse.Spec.List.serialize_list_precond", "Prims.op_LessThan", "FStar.Seq.Base.length", "LowParse.Bytes.byte", "LowParse.Spec.Base.serialize", "LowParse.Spec.List.parse_list_kind", "LowParse.Spec.List.parse_list", "LowParse.Spec.List.serialize_list" ]
[]
module LowParse.SLow.List include LowParse.Spec.List include LowParse.SLow.Combinators module B32 = FStar.Bytes module U32 = FStar.UInt32 module CL = C.Loops #set-options "--z3rlimit 16 --max_fuel 8 --max_ifuel 8" module L = FStar.List.Tot let rec parse_list_tailrec' (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) (aux: list t) : GTot (option (list t)) (decreases (B32.length b)) = parse_list_eq p (B32.reveal b); if B32.len b = 0ul then Some (L.rev aux) else match p32 b with | None -> None | Some (v, n) -> if n = 0ul then None (* elements cannot be empty *) else parse_list_tailrec' p32 (B32.slice b n (B32.len b)) (v :: aux) let list_append_rev_cons (#t: Type) (v: t) (aux l: list t) : Lemma (L.append (L.rev (v ::aux)) l == L.append (L.rev aux) (v :: l)) = L.rev_rev' (v :: aux); L.rev_rev' aux; L.append_assoc (L.rev aux) [v] l let rec parse_list_tailrec'_correct' (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) (aux: list t) : Lemma (requires True) (ensures ( parse_list_tailrec' p32 b aux == ( match parse (parse_list p) (B32.reveal b) with | Some (l, n) -> Some (L.append (L.rev aux) l) | None -> None ))) (decreases (B32.length b)) = parse_list_eq p (B32.reveal b); if B32.len b = 0ul then L.append_l_nil (L.rev aux) else match p32 b with | None -> () | Some (v, n) -> if n = 0ul then () else begin let s = B32.slice b n (B32.len b) in parse_list_tailrec'_correct' p32 s (v :: aux); match parse (parse_list p) (B32.reveal s) with | Some (l, n') -> list_append_rev_cons v aux l | None -> () end let parse_list_tailrec'_correct (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) : Lemma begin match parse (parse_list p) (B32.reveal b) with | Some (l, n) -> parse_list_tailrec' p32 b [] == Some l | None -> parse_list_tailrec' p32 b [] == None end = parse_list_tailrec'_correct' p32 b [] let list_rev_inv (#t: Type) (l: list t) (b: bool) (x: list t * list t) : GTot Type0 = let (rem, acc) = x in L.rev l == L.rev_acc rem acc /\ (b == false ==> rem == []) let list_rev (#t: Type) (l: list t) : Tot (l' : list t { l' == L.rev l } ) = match l with | [] -> [] | _ -> let (_, l') = CL.total_while (fun (rem, _) -> L.length rem) (list_rev_inv l) (fun (rem, acc) -> match rem with | [] -> (false, (rem, acc)) | a :: q -> (true, (q, a :: acc)) ) (l, []) in l' let parse_list_tailrec_inv (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (input: bytes32) (b: bool) (x: option (bytes32 * list t)) : GTot Type0 = match x with | Some (input', accu') -> parse_list_tailrec' p32 input [] == parse_list_tailrec' p32 input' accu' /\ (b == false ==> B32.length input' == 0) | None -> b == false /\ None? (parse_list_tailrec' p32 input []) let parse_list_tailrec_measure (#t: Type) (x: option (bytes32 * list t)) : GTot nat = match x with | None -> 0 | Some (input', _) -> B32.length input' inline_for_extraction let parse_list_tailrec_body (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (input: bytes32) : (x: option (bytes32 * list t)) -> Pure (bool * option (bytes32 * list t)) (requires (parse_list_tailrec_inv p32 input true x)) (ensures (fun (continue, y) -> parse_list_tailrec_inv p32 input continue y /\ (if continue then parse_list_tailrec_measure y < parse_list_tailrec_measure x else True) )) = fun (x: option (bytes32 * list t)) -> let (Some (input', accu')) = x in let len = B32.len input' in if len = 0ul then (false, x) else match p32 input' with | Some (v, consumed) -> if consumed = 0ul then (false, None) else let input'' = B32.slice input' consumed len in (true, Some (input'', v :: accu')) | None -> (false, None) inline_for_extraction let parse_list_tailrec (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (input: bytes32) : Tot (res: option (list t) { res == parse_list_tailrec' p32 input [] } ) = let accu = CL.total_while (parse_list_tailrec_measure #t) (parse_list_tailrec_inv p32 input) (fun x -> parse_list_tailrec_body p32 input x) (Some (input, [])) in match accu with | None -> None | Some (_, accu') -> Some (list_rev accu') inline_for_extraction let parse32_list (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) : Tot (parser32 (parse_list p)) = fun (input: bytes32) -> (( parse_list_tailrec'_correct p32 input; parser_kind_prop_equiv parse_list_kind (parse_list p); match parse_list_tailrec p32 input with | None -> None | Some res -> Some (res, B32.len input) ) <: (res: option (list t * U32.t) { parser32_correct (parse_list p) input res } )) let rec partial_serialize32_list' (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (input: list t) : Ghost bytes32 (requires ( serialize_list_precond k /\ ( Seq.length (serialize (serialize_list p s) input) < 4294967296 ))) (ensures (fun (res: bytes32) -> serialize_list_precond k /\ serializer32_correct (serialize_list p s) input res ))
false
false
LowParse.SLow.List.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 8, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 16, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val partial_serialize32_list' (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (input: list t) : Ghost bytes32 (requires (serialize_list_precond k /\ (Seq.length (serialize (serialize_list p s) input) < 4294967296))) (ensures (fun (res: bytes32) -> serialize_list_precond k /\ serializer32_correct (serialize_list p s) input res)) (decreases input)
[ "recursion" ]
LowParse.SLow.List.partial_serialize32_list'
{ "file_name": "src/lowparse/LowParse.SLow.List.fst", "git_rev": "446a08ce38df905547cf20f28c43776b22b8087a", "git_url": "https://github.com/project-everest/everparse.git", "project_name": "everparse" }
p: LowParse.Spec.Base.parser k t -> s: LowParse.Spec.Base.serializer p -> s32: LowParse.SLow.Base.partial_serializer32 s -> input: Prims.list t -> Prims.Ghost LowParse.SLow.Base.bytes32
{ "end_col": 7, "end_line": 238, "start_col": 2, "start_line": 227 }
Prims.Ghost
val partial_serialize32_list_tailrec' (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (accu: bytes32) (input: list t) : Ghost bytes32 (requires (serialize_list_precond k /\ (B32.length accu + Seq.length (serialize (serialize_list p s) input) < 4294967296))) (ensures (fun (res: bytes32) -> serialize_list_precond k /\ Seq.length (serialize (serialize_list p s) input) < 4294967296 /\ B32.reveal res == Seq.append (B32.reveal accu) (B32.reveal (partial_serialize32_list' p s s32 input)))) (decreases input)
[ { "abbrev": true, "full_module": "FStar.List.Tot", "short_module": "L" }, { "abbrev": true, "full_module": "C.Loops", "short_module": "CL" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": true, "full_module": "FStar.Bytes", "short_module": "B32" }, { "abbrev": false, "full_module": "LowParse.SLow.Combinators", "short_module": null }, { "abbrev": false, "full_module": "LowParse.Spec.List", "short_module": null }, { "abbrev": false, "full_module": "LowParse.SLow", "short_module": null }, { "abbrev": false, "full_module": "LowParse.SLow", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let rec partial_serialize32_list_tailrec' (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (accu: bytes32) (input: list t) : Ghost bytes32 (requires ( serialize_list_precond k /\ ( B32.length accu + Seq.length (serialize (serialize_list p s) input) < 4294967296 ))) (ensures (fun (res: bytes32) -> serialize_list_precond k /\ Seq.length (serialize (serialize_list p s) input) < 4294967296 /\ B32.reveal res == Seq.append (B32.reveal accu) (B32.reveal (partial_serialize32_list' p s s32 input)) )) (decreases input) = match input with | [] -> serialize_list_nil p s; Seq.append_empty_r (B32.reveal accu); accu | a :: q -> serialize_list_cons p s a q; let sa = s32 a in let accu' = B32.append accu sa in Seq.append_assoc (B32.reveal accu) (B32.reveal sa) (B32.reveal (partial_serialize32_list' p s s32 q)); partial_serialize32_list_tailrec' p s s32 accu' q
val partial_serialize32_list_tailrec' (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (accu: bytes32) (input: list t) : Ghost bytes32 (requires (serialize_list_precond k /\ (B32.length accu + Seq.length (serialize (serialize_list p s) input) < 4294967296))) (ensures (fun (res: bytes32) -> serialize_list_precond k /\ Seq.length (serialize (serialize_list p s) input) < 4294967296 /\ B32.reveal res == Seq.append (B32.reveal accu) (B32.reveal (partial_serialize32_list' p s s32 input)))) (decreases input) let rec partial_serialize32_list_tailrec' (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (accu: bytes32) (input: list t) : Ghost bytes32 (requires (serialize_list_precond k /\ (B32.length accu + Seq.length (serialize (serialize_list p s) input) < 4294967296))) (ensures (fun (res: bytes32) -> serialize_list_precond k /\ Seq.length (serialize (serialize_list p s) input) < 4294967296 /\ B32.reveal res == Seq.append (B32.reveal accu) (B32.reveal (partial_serialize32_list' p s s32 input)))) (decreases input) =
false
null
false
match input with | [] -> serialize_list_nil p s; Seq.append_empty_r (B32.reveal accu); accu | a :: q -> serialize_list_cons p s a q; let sa = s32 a in let accu' = B32.append accu sa in Seq.append_assoc (B32.reveal accu) (B32.reveal sa) (B32.reveal (partial_serialize32_list' p s s32 q)); partial_serialize32_list_tailrec' p s s32 accu' q
{ "checked_file": "LowParse.SLow.List.fst.checked", "dependencies": [ "prims.fst.checked", "LowParse.Spec.List.fsti.checked", "LowParse.SLow.Combinators.fst.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.Bytes.fsti.checked", "C.Loops.fst.checked" ], "interface_file": false, "source_file": "LowParse.SLow.List.fst" }
[ "" ]
[ "LowParse.Spec.Base.parser_kind", "LowParse.Spec.Base.parser", "LowParse.Spec.Base.serializer", "LowParse.SLow.Base.partial_serializer32", "LowParse.SLow.Base.bytes32", "Prims.list", "Prims.unit", "FStar.Seq.Base.append_empty_r", "FStar.Bytes.byte", "FStar.Bytes.reveal", "LowParse.Spec.List.serialize_list_nil", "LowParse.SLow.List.partial_serialize32_list_tailrec'", "FStar.Seq.Base.append_assoc", "LowParse.SLow.List.partial_serialize32_list'", "FStar.Bytes.bytes", "FStar.Bytes.append", "LowParse.SLow.Base.serializer32_correct", "LowParse.Spec.List.serialize_list_cons", "Prims.l_and", "Prims.b2t", "LowParse.Spec.List.serialize_list_precond", "Prims.op_LessThan", "Prims.op_Addition", "FStar.Bytes.length", "FStar.Seq.Base.length", "LowParse.Bytes.byte", "LowParse.Spec.Base.serialize", "LowParse.Spec.List.parse_list_kind", "LowParse.Spec.List.parse_list", "LowParse.Spec.List.serialize_list", "Prims.eq2", "FStar.Seq.Base.seq", "FStar.Seq.Base.append" ]
[]
module LowParse.SLow.List include LowParse.Spec.List include LowParse.SLow.Combinators module B32 = FStar.Bytes module U32 = FStar.UInt32 module CL = C.Loops #set-options "--z3rlimit 16 --max_fuel 8 --max_ifuel 8" module L = FStar.List.Tot let rec parse_list_tailrec' (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) (aux: list t) : GTot (option (list t)) (decreases (B32.length b)) = parse_list_eq p (B32.reveal b); if B32.len b = 0ul then Some (L.rev aux) else match p32 b with | None -> None | Some (v, n) -> if n = 0ul then None (* elements cannot be empty *) else parse_list_tailrec' p32 (B32.slice b n (B32.len b)) (v :: aux) let list_append_rev_cons (#t: Type) (v: t) (aux l: list t) : Lemma (L.append (L.rev (v ::aux)) l == L.append (L.rev aux) (v :: l)) = L.rev_rev' (v :: aux); L.rev_rev' aux; L.append_assoc (L.rev aux) [v] l let rec parse_list_tailrec'_correct' (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) (aux: list t) : Lemma (requires True) (ensures ( parse_list_tailrec' p32 b aux == ( match parse (parse_list p) (B32.reveal b) with | Some (l, n) -> Some (L.append (L.rev aux) l) | None -> None ))) (decreases (B32.length b)) = parse_list_eq p (B32.reveal b); if B32.len b = 0ul then L.append_l_nil (L.rev aux) else match p32 b with | None -> () | Some (v, n) -> if n = 0ul then () else begin let s = B32.slice b n (B32.len b) in parse_list_tailrec'_correct' p32 s (v :: aux); match parse (parse_list p) (B32.reveal s) with | Some (l, n') -> list_append_rev_cons v aux l | None -> () end let parse_list_tailrec'_correct (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) : Lemma begin match parse (parse_list p) (B32.reveal b) with | Some (l, n) -> parse_list_tailrec' p32 b [] == Some l | None -> parse_list_tailrec' p32 b [] == None end = parse_list_tailrec'_correct' p32 b [] let list_rev_inv (#t: Type) (l: list t) (b: bool) (x: list t * list t) : GTot Type0 = let (rem, acc) = x in L.rev l == L.rev_acc rem acc /\ (b == false ==> rem == []) let list_rev (#t: Type) (l: list t) : Tot (l' : list t { l' == L.rev l } ) = match l with | [] -> [] | _ -> let (_, l') = CL.total_while (fun (rem, _) -> L.length rem) (list_rev_inv l) (fun (rem, acc) -> match rem with | [] -> (false, (rem, acc)) | a :: q -> (true, (q, a :: acc)) ) (l, []) in l' let parse_list_tailrec_inv (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (input: bytes32) (b: bool) (x: option (bytes32 * list t)) : GTot Type0 = match x with | Some (input', accu') -> parse_list_tailrec' p32 input [] == parse_list_tailrec' p32 input' accu' /\ (b == false ==> B32.length input' == 0) | None -> b == false /\ None? (parse_list_tailrec' p32 input []) let parse_list_tailrec_measure (#t: Type) (x: option (bytes32 * list t)) : GTot nat = match x with | None -> 0 | Some (input', _) -> B32.length input' inline_for_extraction let parse_list_tailrec_body (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (input: bytes32) : (x: option (bytes32 * list t)) -> Pure (bool * option (bytes32 * list t)) (requires (parse_list_tailrec_inv p32 input true x)) (ensures (fun (continue, y) -> parse_list_tailrec_inv p32 input continue y /\ (if continue then parse_list_tailrec_measure y < parse_list_tailrec_measure x else True) )) = fun (x: option (bytes32 * list t)) -> let (Some (input', accu')) = x in let len = B32.len input' in if len = 0ul then (false, x) else match p32 input' with | Some (v, consumed) -> if consumed = 0ul then (false, None) else let input'' = B32.slice input' consumed len in (true, Some (input'', v :: accu')) | None -> (false, None) inline_for_extraction let parse_list_tailrec (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (input: bytes32) : Tot (res: option (list t) { res == parse_list_tailrec' p32 input [] } ) = let accu = CL.total_while (parse_list_tailrec_measure #t) (parse_list_tailrec_inv p32 input) (fun x -> parse_list_tailrec_body p32 input x) (Some (input, [])) in match accu with | None -> None | Some (_, accu') -> Some (list_rev accu') inline_for_extraction let parse32_list (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) : Tot (parser32 (parse_list p)) = fun (input: bytes32) -> (( parse_list_tailrec'_correct p32 input; parser_kind_prop_equiv parse_list_kind (parse_list p); match parse_list_tailrec p32 input with | None -> None | Some res -> Some (res, B32.len input) ) <: (res: option (list t * U32.t) { parser32_correct (parse_list p) input res } )) let rec partial_serialize32_list' (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (input: list t) : Ghost bytes32 (requires ( serialize_list_precond k /\ ( Seq.length (serialize (serialize_list p s) input) < 4294967296 ))) (ensures (fun (res: bytes32) -> serialize_list_precond k /\ serializer32_correct (serialize_list p s) input res )) (decreases input) = match input with | [] -> serialize_list_nil p s; let res = B32.empty_bytes in assert (Seq.equal (B32.reveal res) (Seq.empty)); res | a :: q -> serialize_list_cons p s a q; let sa = s32 a in let sq = partial_serialize32_list' p s s32 q in let res = B32.append sa sq in res let rec partial_serialize32_list_tailrec' (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (accu: bytes32) (input: list t) : Ghost bytes32 (requires ( serialize_list_precond k /\ ( B32.length accu + Seq.length (serialize (serialize_list p s) input) < 4294967296 ))) (ensures (fun (res: bytes32) -> serialize_list_precond k /\ Seq.length (serialize (serialize_list p s) input) < 4294967296 /\ B32.reveal res == Seq.append (B32.reveal accu) (B32.reveal (partial_serialize32_list' p s s32 input)) ))
false
false
LowParse.SLow.List.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 8, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 16, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val partial_serialize32_list_tailrec' (#t: Type) (#k: parser_kind) (p: parser k t) (s: serializer p) (s32: partial_serializer32 s) (accu: bytes32) (input: list t) : Ghost bytes32 (requires (serialize_list_precond k /\ (B32.length accu + Seq.length (serialize (serialize_list p s) input) < 4294967296))) (ensures (fun (res: bytes32) -> serialize_list_precond k /\ Seq.length (serialize (serialize_list p s) input) < 4294967296 /\ B32.reveal res == Seq.append (B32.reveal accu) (B32.reveal (partial_serialize32_list' p s s32 input)))) (decreases input)
[ "recursion" ]
LowParse.SLow.List.partial_serialize32_list_tailrec'
{ "file_name": "src/lowparse/LowParse.SLow.List.fst", "git_rev": "446a08ce38df905547cf20f28c43776b22b8087a", "git_url": "https://github.com/project-everest/everparse.git", "project_name": "everparse" }
p: LowParse.Spec.Base.parser k t -> s: LowParse.Spec.Base.serializer p -> s32: LowParse.SLow.Base.partial_serializer32 s -> accu: LowParse.SLow.Base.bytes32 -> input: Prims.list t -> Prims.Ghost LowParse.SLow.Base.bytes32
{ "end_col": 53, "end_line": 269, "start_col": 2, "start_line": 259 }
FStar.Pervasives.Lemma
val parse_list_tailrec'_correct' (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) (aux: list t) : Lemma (requires True) (ensures (parse_list_tailrec' p32 b aux == (match parse (parse_list p) (B32.reveal b) with | Some (l, n) -> Some (L.append (L.rev aux) l) | None -> None))) (decreases (B32.length b))
[ { "abbrev": true, "full_module": "FStar.List.Tot", "short_module": "L" }, { "abbrev": true, "full_module": "C.Loops", "short_module": "CL" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": true, "full_module": "FStar.Bytes", "short_module": "B32" }, { "abbrev": false, "full_module": "LowParse.SLow.Combinators", "short_module": null }, { "abbrev": false, "full_module": "LowParse.Spec.List", "short_module": null }, { "abbrev": false, "full_module": "LowParse.SLow", "short_module": null }, { "abbrev": false, "full_module": "LowParse.SLow", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let rec parse_list_tailrec'_correct' (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) (aux: list t) : Lemma (requires True) (ensures ( parse_list_tailrec' p32 b aux == ( match parse (parse_list p) (B32.reveal b) with | Some (l, n) -> Some (L.append (L.rev aux) l) | None -> None ))) (decreases (B32.length b)) = parse_list_eq p (B32.reveal b); if B32.len b = 0ul then L.append_l_nil (L.rev aux) else match p32 b with | None -> () | Some (v, n) -> if n = 0ul then () else begin let s = B32.slice b n (B32.len b) in parse_list_tailrec'_correct' p32 s (v :: aux); match parse (parse_list p) (B32.reveal s) with | Some (l, n') -> list_append_rev_cons v aux l | None -> () end
val parse_list_tailrec'_correct' (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) (aux: list t) : Lemma (requires True) (ensures (parse_list_tailrec' p32 b aux == (match parse (parse_list p) (B32.reveal b) with | Some (l, n) -> Some (L.append (L.rev aux) l) | None -> None))) (decreases (B32.length b)) let rec parse_list_tailrec'_correct' (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) (aux: list t) : Lemma (requires True) (ensures (parse_list_tailrec' p32 b aux == (match parse (parse_list p) (B32.reveal b) with | Some (l, n) -> Some (L.append (L.rev aux) l) | None -> None))) (decreases (B32.length b)) =
false
null
true
parse_list_eq p (B32.reveal b); if B32.len b = 0ul then L.append_l_nil (L.rev aux) else match p32 b with | None -> () | Some (v, n) -> if n = 0ul then () else let s = B32.slice b n (B32.len b) in parse_list_tailrec'_correct' p32 s (v :: aux); match parse (parse_list p) (B32.reveal s) with | Some (l, n') -> list_append_rev_cons v aux l | None -> ()
{ "checked_file": "LowParse.SLow.List.fst.checked", "dependencies": [ "prims.fst.checked", "LowParse.Spec.List.fsti.checked", "LowParse.SLow.Combinators.fst.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.Bytes.fsti.checked", "C.Loops.fst.checked" ], "interface_file": false, "source_file": "LowParse.SLow.List.fst" }
[ "lemma", "" ]
[ "LowParse.Spec.Base.parser_kind", "LowParse.Spec.Base.parser", "LowParse.SLow.Base.parser32", "LowParse.SLow.Base.bytes32", "Prims.list", "Prims.op_Equality", "FStar.UInt32.t", "FStar.Bytes.len", "FStar.UInt32.__uint_to_t", "FStar.List.Tot.Properties.append_l_nil", "FStar.List.Tot.Base.rev", "Prims.bool", "LowParse.Spec.Base.parse", "LowParse.Spec.List.parse_list", "FStar.Bytes.reveal", "LowParse.Spec.Base.consumed_length", "LowParse.SLow.List.list_append_rev_cons", "Prims.unit", "LowParse.SLow.List.parse_list_tailrec'_correct'", "Prims.Cons", "FStar.Bytes.bytes", "Prims.eq2", "FStar.Seq.Base.seq", "FStar.UInt8.t", "FStar.Seq.Base.slice", "FStar.UInt32.v", "FStar.Bytes.slice", "LowParse.Spec.List.parse_list_eq", "Prims.l_True", "Prims.squash", "FStar.Pervasives.Native.option", "LowParse.SLow.List.parse_list_tailrec'", "FStar.Pervasives.Native.Some", "FStar.List.Tot.Base.append", "FStar.Pervasives.Native.None", "Prims.Nil", "FStar.Pervasives.pattern" ]
[]
module LowParse.SLow.List include LowParse.Spec.List include LowParse.SLow.Combinators module B32 = FStar.Bytes module U32 = FStar.UInt32 module CL = C.Loops #set-options "--z3rlimit 16 --max_fuel 8 --max_ifuel 8" module L = FStar.List.Tot let rec parse_list_tailrec' (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) (aux: list t) : GTot (option (list t)) (decreases (B32.length b)) = parse_list_eq p (B32.reveal b); if B32.len b = 0ul then Some (L.rev aux) else match p32 b with | None -> None | Some (v, n) -> if n = 0ul then None (* elements cannot be empty *) else parse_list_tailrec' p32 (B32.slice b n (B32.len b)) (v :: aux) let list_append_rev_cons (#t: Type) (v: t) (aux l: list t) : Lemma (L.append (L.rev (v ::aux)) l == L.append (L.rev aux) (v :: l)) = L.rev_rev' (v :: aux); L.rev_rev' aux; L.append_assoc (L.rev aux) [v] l let rec parse_list_tailrec'_correct' (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) (aux: list t) : Lemma (requires True) (ensures ( parse_list_tailrec' p32 b aux == ( match parse (parse_list p) (B32.reveal b) with | Some (l, n) -> Some (L.append (L.rev aux) l) | None -> None )))
false
false
LowParse.SLow.List.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 8, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 16, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val parse_list_tailrec'_correct' (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (b: bytes32) (aux: list t) : Lemma (requires True) (ensures (parse_list_tailrec' p32 b aux == (match parse (parse_list p) (B32.reveal b) with | Some (l, n) -> Some (L.append (L.rev aux) l) | None -> None))) (decreases (B32.length b))
[ "recursion" ]
LowParse.SLow.List.parse_list_tailrec'_correct'
{ "file_name": "src/lowparse/LowParse.SLow.List.fst", "git_rev": "446a08ce38df905547cf20f28c43776b22b8087a", "git_url": "https://github.com/project-everest/everparse.git", "project_name": "everparse" }
p32: LowParse.SLow.Base.parser32 p -> b: LowParse.SLow.Base.bytes32 -> aux: Prims.list t -> FStar.Pervasives.Lemma (ensures LowParse.SLow.List.parse_list_tailrec' p32 b aux == (match LowParse.Spec.Base.parse (LowParse.Spec.List.parse_list p) (FStar.Bytes.reveal b) with | FStar.Pervasives.Native.Some #_ (FStar.Pervasives.Native.Mktuple2 #_ #_ l _) -> FStar.Pervasives.Native.Some (FStar.List.Tot.Base.rev aux @ l) | FStar.Pervasives.Native.None #_ -> FStar.Pervasives.Native.None)) (decreases FStar.Bytes.length b)
{ "end_col": 9, "end_line": 77, "start_col": 2, "start_line": 60 }
Prims.Tot
[ { "abbrev": false, "full_module": "FStar", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let reflexive (#a:Type) (rel:relation a) = forall (x:a). rel x x
let reflexive (#a: Type) (rel: relation a) =
false
null
false
forall (x: a). rel x x
{ "checked_file": "FStar.Preorder.fst.checked", "dependencies": [ "prims.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": false, "source_file": "FStar.Preorder.fst" }
[ "total" ]
[ "FStar.Preorder.relation", "Prims.l_Forall", "Prims.logical" ]
[]
(* Copyright 2008-2018 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module FStar.Preorder (* Preordered relations and stable predicates *) type relation (a:Type) = a -> a -> Type0 type predicate (a:Type) = a -> Type0
false
false
FStar.Preorder.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val reflexive : rel: FStar.Preorder.relation a -> Prims.logical
[]
FStar.Preorder.reflexive
{ "file_name": "ulib/FStar.Preorder.fst", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
rel: FStar.Preorder.relation a -> Prims.logical
{ "end_col": 23, "end_line": 25, "start_col": 2, "start_line": 25 }
Prims.Tot
[ { "abbrev": false, "full_module": "FStar", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let preorder_rel (#a:Type) (rel:relation a) = reflexive rel /\ transitive rel
let preorder_rel (#a: Type) (rel: relation a) =
false
null
false
reflexive rel /\ transitive rel
{ "checked_file": "FStar.Preorder.fst.checked", "dependencies": [ "prims.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": false, "source_file": "FStar.Preorder.fst" }
[ "total" ]
[ "FStar.Preorder.relation", "Prims.l_and", "FStar.Preorder.reflexive", "FStar.Preorder.transitive", "Prims.logical" ]
[]
(* Copyright 2008-2018 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module FStar.Preorder (* Preordered relations and stable predicates *) type relation (a:Type) = a -> a -> Type0 type predicate (a:Type) = a -> Type0 let reflexive (#a:Type) (rel:relation a) = forall (x:a). rel x x let transitive (#a:Type) (rel:relation a) = forall (x:a) (y:a) (z:a). (rel x y /\ rel y z) ==> rel x z
false
false
FStar.Preorder.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val preorder_rel : rel: FStar.Preorder.relation a -> Prims.logical
[]
FStar.Preorder.preorder_rel
{ "file_name": "ulib/FStar.Preorder.fst", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
rel: FStar.Preorder.relation a -> Prims.logical
{ "end_col": 33, "end_line": 31, "start_col": 2, "start_line": 31 }
Prims.Tot
[ { "abbrev": false, "full_module": "FStar", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let transitive (#a:Type) (rel:relation a) = forall (x:a) (y:a) (z:a). (rel x y /\ rel y z) ==> rel x z
let transitive (#a: Type) (rel: relation a) =
false
null
false
forall (x: a) (y: a) (z: a). (rel x y /\ rel y z) ==> rel x z
{ "checked_file": "FStar.Preorder.fst.checked", "dependencies": [ "prims.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": false, "source_file": "FStar.Preorder.fst" }
[ "total" ]
[ "FStar.Preorder.relation", "Prims.l_Forall", "Prims.l_imp", "Prims.l_and", "Prims.logical" ]
[]
(* Copyright 2008-2018 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module FStar.Preorder (* Preordered relations and stable predicates *) type relation (a:Type) = a -> a -> Type0 type predicate (a:Type) = a -> Type0 let reflexive (#a:Type) (rel:relation a) = forall (x:a). rel x x
false
false
FStar.Preorder.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val transitive : rel: FStar.Preorder.relation a -> Prims.logical
[]
FStar.Preorder.transitive
{ "file_name": "ulib/FStar.Preorder.fst", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
rel: FStar.Preorder.relation a -> Prims.logical
{ "end_col": 60, "end_line": 28, "start_col": 2, "start_line": 28 }
Prims.Tot
[ { "abbrev": false, "full_module": "FStar", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let stable (#a:Type) (p:predicate a) (rel:relation a{preorder_rel rel}) = forall (x:a) (y:a). (p x /\ rel x y) ==> p y
let stable (#a: Type) (p: predicate a) (rel: relation a {preorder_rel rel}) =
false
null
false
forall (x: a) (y: a). (p x /\ rel x y) ==> p y
{ "checked_file": "FStar.Preorder.fst.checked", "dependencies": [ "prims.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": false, "source_file": "FStar.Preorder.fst" }
[ "total" ]
[ "FStar.Preorder.predicate", "FStar.Preorder.relation", "FStar.Preorder.preorder_rel", "Prims.l_Forall", "Prims.l_imp", "Prims.l_and", "Prims.logical" ]
[]
(* Copyright 2008-2018 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module FStar.Preorder (* Preordered relations and stable predicates *) type relation (a:Type) = a -> a -> Type0 type predicate (a:Type) = a -> Type0 let reflexive (#a:Type) (rel:relation a) = forall (x:a). rel x x let transitive (#a:Type) (rel:relation a) = forall (x:a) (y:a) (z:a). (rel x y /\ rel y z) ==> rel x z let preorder_rel (#a:Type) (rel:relation a) = reflexive rel /\ transitive rel type preorder (a:Type) = rel:relation a{preorder_rel rel}
false
false
FStar.Preorder.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val stable : p: FStar.Preorder.predicate a -> rel: FStar.Preorder.relation a {FStar.Preorder.preorder_rel rel} -> Prims.logical
[]
FStar.Preorder.stable
{ "file_name": "ulib/FStar.Preorder.fst", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
p: FStar.Preorder.predicate a -> rel: FStar.Preorder.relation a {FStar.Preorder.preorder_rel rel} -> Prims.logical
{ "end_col": 46, "end_line": 36, "start_col": 2, "start_line": 36 }
FStar.HyperStack.ST.Stack
val raw_to_uncompressed: pk_raw:lbuffer uint8 64ul -> pk:lbuffer uint8 65ul -> Stack unit (requires fun h -> live h pk /\ live h pk_raw /\ disjoint pk pk_raw) (ensures fun h0 _ h1 -> modifies (loc pk) h0 h1 /\ as_seq h1 pk == S.pk_uncompressed_from_raw (as_seq h0 pk_raw))
[ { "abbrev": true, "full_module": "Lib.ByteSequence", "short_module": "BSeq" }, { "abbrev": true, "full_module": "Lib.Sequence", "short_module": "LSeq" }, { "abbrev": true, "full_module": "Hacl.Impl.P256.Point", "short_module": "P" }, { "abbrev": false, "full_module": "Hacl.Impl.P256.Field", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.P256.Bignum", "short_module": null }, { "abbrev": true, "full_module": "Spec.P256", "short_module": "S" }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.All", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.P256", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.P256", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let raw_to_uncompressed pk_raw pk = let h0 = ST.get () in pk.(0ul) <- u8 0x04; update_sub pk 1ul 64ul pk_raw; let h1 = ST.get () in LSeq.eq_intro (as_seq h1 pk) (S.pk_uncompressed_from_raw (as_seq h0 pk_raw))
val raw_to_uncompressed: pk_raw:lbuffer uint8 64ul -> pk:lbuffer uint8 65ul -> Stack unit (requires fun h -> live h pk /\ live h pk_raw /\ disjoint pk pk_raw) (ensures fun h0 _ h1 -> modifies (loc pk) h0 h1 /\ as_seq h1 pk == S.pk_uncompressed_from_raw (as_seq h0 pk_raw)) let raw_to_uncompressed pk_raw pk =
true
null
false
let h0 = ST.get () in pk.(0ul) <- u8 0x04; update_sub pk 1ul 64ul pk_raw; let h1 = ST.get () in LSeq.eq_intro (as_seq h1 pk) (S.pk_uncompressed_from_raw (as_seq h0 pk_raw))
{ "checked_file": "Hacl.Impl.P256.Compression.fst.checked", "dependencies": [ "Spec.P256.fst.checked", "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.ByteSequence.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Impl.P256.Point.fsti.checked", "Hacl.Impl.P256.Field.fsti.checked", "Hacl.Impl.P256.Bignum.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.All.fst.checked", "FStar.HyperStack.fst.checked" ], "interface_file": true, "source_file": "Hacl.Impl.P256.Compression.fst" }
[]
[ "Lib.Buffer.lbuffer", "Lib.IntTypes.uint8", "FStar.UInt32.__uint_to_t", "Lib.Sequence.eq_intro", "Lib.IntTypes.v", "Lib.IntTypes.U32", "Lib.IntTypes.PUB", "Lib.Buffer.as_seq", "Lib.Buffer.MUT", "Spec.P256.pk_uncompressed_from_raw", "Prims.unit", "FStar.Monotonic.HyperStack.mem", "FStar.HyperStack.ST.get", "Lib.Buffer.update_sub", "Lib.Buffer.op_Array_Assignment", "Lib.IntTypes.u8" ]
[]
module Hacl.Impl.P256.Compression open FStar.Mul open FStar.HyperStack.All open FStar.HyperStack module ST = FStar.HyperStack.ST open Lib.IntTypes open Lib.Buffer open Hacl.Impl.P256.Bignum open Hacl.Impl.P256.Field module P = Hacl.Impl.P256.Point module S = Spec.P256 module LSeq = Lib.Sequence module BSeq = Lib.ByteSequence #set-options "--z3rlimit 50 --ifuel 0 --fuel 0" let uncompressed_to_raw pk pk_raw = let pk0 = pk.(0ul) in if Lib.RawIntTypes.u8_to_UInt8 pk0 <> 0x04uy then false else begin copy pk_raw (sub pk 1ul 64ul); true end let compressed_to_raw pk pk_raw = push_frame (); let xa = create_felem () in let ya = create_felem () in let pk_xb = sub pk 1ul 32ul in let b = P.aff_point_decompress_vartime xa ya pk in if b then begin let h0 = ST.get () in update_sub pk_raw 0ul 32ul pk_xb; let h1 = ST.get () in update_sub_f h1 pk_raw 32ul 32ul (fun h -> BSeq.nat_to_bytes_be 32 (as_nat h1 ya)) (fun _ -> bn_to_bytes_be4 (sub pk_raw 32ul 32ul) ya); let h2 = ST.get () in LSeq.eq_intro (as_seq h2 pk_raw) (LSeq.concat #_ #32 #32 (as_seq h0 pk_xb) (BSeq.nat_to_bytes_be 32 (as_nat h0 ya))) end; pop_frame (); b
false
false
Hacl.Impl.P256.Compression.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val raw_to_uncompressed: pk_raw:lbuffer uint8 64ul -> pk:lbuffer uint8 65ul -> Stack unit (requires fun h -> live h pk /\ live h pk_raw /\ disjoint pk pk_raw) (ensures fun h0 _ h1 -> modifies (loc pk) h0 h1 /\ as_seq h1 pk == S.pk_uncompressed_from_raw (as_seq h0 pk_raw))
[]
Hacl.Impl.P256.Compression.raw_to_uncompressed
{ "file_name": "code/ecdsap256/Hacl.Impl.P256.Compression.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
pk_raw: Lib.Buffer.lbuffer Lib.IntTypes.uint8 64ul -> pk: Lib.Buffer.lbuffer Lib.IntTypes.uint8 65ul -> FStar.HyperStack.ST.Stack Prims.unit
{ "end_col": 78, "end_line": 55, "start_col": 35, "start_line": 50 }
FStar.HyperStack.ST.Stack
val raw_to_compressed_get_pk0: f:lbuffer uint8 32ul -> Stack uint8 (requires fun h -> live h f) (ensures fun h0 b h1 -> modifies0 h0 h1 /\ v b == (if (BSeq.nat_from_bytes_be (as_seq h0 f) % 2 = 1) then 0x03 else 0x02))
[ { "abbrev": true, "full_module": "Lib.ByteSequence", "short_module": "BSeq" }, { "abbrev": true, "full_module": "Lib.Sequence", "short_module": "LSeq" }, { "abbrev": true, "full_module": "Spec.P256", "short_module": "S" }, { "abbrev": true, "full_module": "Hacl.Impl.P256.Point", "short_module": "P" }, { "abbrev": false, "full_module": "Hacl.Impl.P256.Field", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.P256.Bignum", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.All", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": true, "full_module": "Spec.P256", "short_module": "S" }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.All", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.P256", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.P256", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let raw_to_compressed_get_pk0 f = push_frame (); let bn_f = create_felem () in bn_from_bytes_be4 bn_f f; let is_odd_f = bn_is_odd4 bn_f in pop_frame (); to_u8 is_odd_f +! u8 0x02
val raw_to_compressed_get_pk0: f:lbuffer uint8 32ul -> Stack uint8 (requires fun h -> live h f) (ensures fun h0 b h1 -> modifies0 h0 h1 /\ v b == (if (BSeq.nat_from_bytes_be (as_seq h0 f) % 2 = 1) then 0x03 else 0x02)) let raw_to_compressed_get_pk0 f =
true
null
false
push_frame (); let bn_f = create_felem () in bn_from_bytes_be4 bn_f f; let is_odd_f = bn_is_odd4 bn_f in pop_frame (); to_u8 is_odd_f +! u8 0x02
{ "checked_file": "Hacl.Impl.P256.Compression.fst.checked", "dependencies": [ "Spec.P256.fst.checked", "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.ByteSequence.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Impl.P256.Point.fsti.checked", "Hacl.Impl.P256.Field.fsti.checked", "Hacl.Impl.P256.Bignum.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.All.fst.checked", "FStar.HyperStack.fst.checked" ], "interface_file": true, "source_file": "Hacl.Impl.P256.Compression.fst" }
[]
[ "Lib.Buffer.lbuffer", "Lib.IntTypes.uint8", "FStar.UInt32.__uint_to_t", "Lib.IntTypes.op_Plus_Bang", "Lib.IntTypes.U8", "Lib.IntTypes.SEC", "Lib.IntTypes.to_u8", "Lib.IntTypes.U64", "Lib.IntTypes.u8", "Prims.unit", "FStar.HyperStack.ST.pop_frame", "Lib.IntTypes.int_t", "Hacl.Impl.P256.Bignum.bn_is_odd4", "Lib.IntTypes.uint64", "Hacl.Impl.P256.Bignum.bn_from_bytes_be4", "Hacl.Impl.P256.Bignum.felem", "Hacl.Impl.P256.Bignum.create_felem", "FStar.HyperStack.ST.push_frame" ]
[]
module Hacl.Impl.P256.Compression open FStar.Mul open FStar.HyperStack.All open FStar.HyperStack module ST = FStar.HyperStack.ST open Lib.IntTypes open Lib.Buffer open Hacl.Impl.P256.Bignum open Hacl.Impl.P256.Field module P = Hacl.Impl.P256.Point module S = Spec.P256 module LSeq = Lib.Sequence module BSeq = Lib.ByteSequence #set-options "--z3rlimit 50 --ifuel 0 --fuel 0" let uncompressed_to_raw pk pk_raw = let pk0 = pk.(0ul) in if Lib.RawIntTypes.u8_to_UInt8 pk0 <> 0x04uy then false else begin copy pk_raw (sub pk 1ul 64ul); true end let compressed_to_raw pk pk_raw = push_frame (); let xa = create_felem () in let ya = create_felem () in let pk_xb = sub pk 1ul 32ul in let b = P.aff_point_decompress_vartime xa ya pk in if b then begin let h0 = ST.get () in update_sub pk_raw 0ul 32ul pk_xb; let h1 = ST.get () in update_sub_f h1 pk_raw 32ul 32ul (fun h -> BSeq.nat_to_bytes_be 32 (as_nat h1 ya)) (fun _ -> bn_to_bytes_be4 (sub pk_raw 32ul 32ul) ya); let h2 = ST.get () in LSeq.eq_intro (as_seq h2 pk_raw) (LSeq.concat #_ #32 #32 (as_seq h0 pk_xb) (BSeq.nat_to_bytes_be 32 (as_nat h0 ya))) end; pop_frame (); b let raw_to_uncompressed pk_raw pk = let h0 = ST.get () in pk.(0ul) <- u8 0x04; update_sub pk 1ul 64ul pk_raw; let h1 = ST.get () in LSeq.eq_intro (as_seq h1 pk) (S.pk_uncompressed_from_raw (as_seq h0 pk_raw)) inline_for_extraction noextract val raw_to_compressed_get_pk0: f:lbuffer uint8 32ul -> Stack uint8 (requires fun h -> live h f) (ensures fun h0 b h1 -> modifies0 h0 h1 /\ v b == (if (BSeq.nat_from_bytes_be (as_seq h0 f) % 2 = 1) then 0x03 else 0x02))
false
false
Hacl.Impl.P256.Compression.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val raw_to_compressed_get_pk0: f:lbuffer uint8 32ul -> Stack uint8 (requires fun h -> live h f) (ensures fun h0 b h1 -> modifies0 h0 h1 /\ v b == (if (BSeq.nat_from_bytes_be (as_seq h0 f) % 2 = 1) then 0x03 else 0x02))
[]
Hacl.Impl.P256.Compression.raw_to_compressed_get_pk0
{ "file_name": "code/ecdsap256/Hacl.Impl.P256.Compression.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
f: Lib.Buffer.lbuffer Lib.IntTypes.uint8 32ul -> FStar.HyperStack.ST.Stack Lib.IntTypes.uint8
{ "end_col": 27, "end_line": 70, "start_col": 2, "start_line": 65 }
FStar.HyperStack.ST.Stack
val uncompressed_to_raw: pk:lbuffer uint8 65ul -> pk_raw:lbuffer uint8 64ul -> Stack bool (requires fun h -> live h pk /\ live h pk_raw /\ disjoint pk pk_raw) (ensures fun h0 b h1 -> modifies (loc pk_raw) h0 h1 /\ (b <==> Some? (S.pk_uncompressed_to_raw (as_seq h0 pk))) /\ (b ==> (as_seq h1 pk_raw == Some?.v (S.pk_uncompressed_to_raw (as_seq h0 pk)))))
[ { "abbrev": true, "full_module": "Lib.ByteSequence", "short_module": "BSeq" }, { "abbrev": true, "full_module": "Lib.Sequence", "short_module": "LSeq" }, { "abbrev": true, "full_module": "Hacl.Impl.P256.Point", "short_module": "P" }, { "abbrev": false, "full_module": "Hacl.Impl.P256.Field", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.P256.Bignum", "short_module": null }, { "abbrev": true, "full_module": "Spec.P256", "short_module": "S" }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.All", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.P256", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.P256", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let uncompressed_to_raw pk pk_raw = let pk0 = pk.(0ul) in if Lib.RawIntTypes.u8_to_UInt8 pk0 <> 0x04uy then false else begin copy pk_raw (sub pk 1ul 64ul); true end
val uncompressed_to_raw: pk:lbuffer uint8 65ul -> pk_raw:lbuffer uint8 64ul -> Stack bool (requires fun h -> live h pk /\ live h pk_raw /\ disjoint pk pk_raw) (ensures fun h0 b h1 -> modifies (loc pk_raw) h0 h1 /\ (b <==> Some? (S.pk_uncompressed_to_raw (as_seq h0 pk))) /\ (b ==> (as_seq h1 pk_raw == Some?.v (S.pk_uncompressed_to_raw (as_seq h0 pk))))) let uncompressed_to_raw pk pk_raw =
true
null
false
let pk0 = pk.(0ul) in if Lib.RawIntTypes.u8_to_UInt8 pk0 <> 0x04uy then false else (copy pk_raw (sub pk 1ul 64ul); true)
{ "checked_file": "Hacl.Impl.P256.Compression.fst.checked", "dependencies": [ "Spec.P256.fst.checked", "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.ByteSequence.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Impl.P256.Point.fsti.checked", "Hacl.Impl.P256.Field.fsti.checked", "Hacl.Impl.P256.Bignum.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.All.fst.checked", "FStar.HyperStack.fst.checked" ], "interface_file": true, "source_file": "Hacl.Impl.P256.Compression.fst" }
[]
[ "Lib.Buffer.lbuffer", "Lib.IntTypes.uint8", "FStar.UInt32.__uint_to_t", "Prims.op_disEquality", "FStar.UInt8.t", "Lib.RawIntTypes.u8_to_UInt8", "FStar.UInt8.__uint_to_t", "Prims.bool", "Prims.unit", "Lib.Buffer.copy", "Lib.Buffer.MUT", "Lib.Buffer.lbuffer_t", "Lib.IntTypes.int_t", "Lib.IntTypes.U8", "Lib.IntTypes.SEC", "FStar.UInt32.uint_to_t", "Lib.Buffer.sub", "Lib.Buffer.op_Array_Access" ]
[]
module Hacl.Impl.P256.Compression open FStar.Mul open FStar.HyperStack.All open FStar.HyperStack module ST = FStar.HyperStack.ST open Lib.IntTypes open Lib.Buffer open Hacl.Impl.P256.Bignum open Hacl.Impl.P256.Field module P = Hacl.Impl.P256.Point module S = Spec.P256 module LSeq = Lib.Sequence module BSeq = Lib.ByteSequence #set-options "--z3rlimit 50 --ifuel 0 --fuel 0"
false
false
Hacl.Impl.P256.Compression.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val uncompressed_to_raw: pk:lbuffer uint8 65ul -> pk_raw:lbuffer uint8 64ul -> Stack bool (requires fun h -> live h pk /\ live h pk_raw /\ disjoint pk pk_raw) (ensures fun h0 b h1 -> modifies (loc pk_raw) h0 h1 /\ (b <==> Some? (S.pk_uncompressed_to_raw (as_seq h0 pk))) /\ (b ==> (as_seq h1 pk_raw == Some?.v (S.pk_uncompressed_to_raw (as_seq h0 pk)))))
[]
Hacl.Impl.P256.Compression.uncompressed_to_raw
{ "file_name": "code/ecdsap256/Hacl.Impl.P256.Compression.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
pk: Lib.Buffer.lbuffer Lib.IntTypes.uint8 65ul -> pk_raw: Lib.Buffer.lbuffer Lib.IntTypes.uint8 64ul -> FStar.HyperStack.ST.Stack Prims.bool
{ "end_col": 12, "end_line": 26, "start_col": 35, "start_line": 21 }
FStar.HyperStack.ST.Stack
val raw_to_compressed: pk_raw:lbuffer uint8 64ul -> pk:lbuffer uint8 33ul -> Stack unit (requires fun h -> live h pk /\ live h pk_raw /\ disjoint pk pk_raw) (ensures fun h0 _ h1 -> modifies (loc pk) h0 h1 /\ as_seq h1 pk == S.pk_compressed_from_raw (as_seq h0 pk_raw))
[ { "abbrev": true, "full_module": "Lib.ByteSequence", "short_module": "BSeq" }, { "abbrev": true, "full_module": "Lib.Sequence", "short_module": "LSeq" }, { "abbrev": true, "full_module": "Hacl.Impl.P256.Point", "short_module": "P" }, { "abbrev": false, "full_module": "Hacl.Impl.P256.Field", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.P256.Bignum", "short_module": null }, { "abbrev": true, "full_module": "Spec.P256", "short_module": "S" }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.All", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.P256", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.P256", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let raw_to_compressed pk_raw pk = let h0 = ST.get () in let pk_x = sub pk_raw 0ul 32ul in let pk_y = sub pk_raw 32ul 32ul in pk.(0ul) <- raw_to_compressed_get_pk0 pk_y; update_sub pk 1ul 32ul pk_x; let h1 = ST.get () in LSeq.eq_intro (as_seq h1 pk) (S.pk_compressed_from_raw (as_seq h0 pk_raw))
val raw_to_compressed: pk_raw:lbuffer uint8 64ul -> pk:lbuffer uint8 33ul -> Stack unit (requires fun h -> live h pk /\ live h pk_raw /\ disjoint pk pk_raw) (ensures fun h0 _ h1 -> modifies (loc pk) h0 h1 /\ as_seq h1 pk == S.pk_compressed_from_raw (as_seq h0 pk_raw)) let raw_to_compressed pk_raw pk =
true
null
false
let h0 = ST.get () in let pk_x = sub pk_raw 0ul 32ul in let pk_y = sub pk_raw 32ul 32ul in pk.(0ul) <- raw_to_compressed_get_pk0 pk_y; update_sub pk 1ul 32ul pk_x; let h1 = ST.get () in LSeq.eq_intro (as_seq h1 pk) (S.pk_compressed_from_raw (as_seq h0 pk_raw))
{ "checked_file": "Hacl.Impl.P256.Compression.fst.checked", "dependencies": [ "Spec.P256.fst.checked", "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.ByteSequence.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Impl.P256.Point.fsti.checked", "Hacl.Impl.P256.Field.fsti.checked", "Hacl.Impl.P256.Bignum.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.All.fst.checked", "FStar.HyperStack.fst.checked" ], "interface_file": true, "source_file": "Hacl.Impl.P256.Compression.fst" }
[]
[ "Lib.Buffer.lbuffer", "Lib.IntTypes.uint8", "FStar.UInt32.__uint_to_t", "Lib.Sequence.eq_intro", "Lib.IntTypes.v", "Lib.IntTypes.U32", "Lib.IntTypes.PUB", "Lib.Buffer.as_seq", "Lib.Buffer.MUT", "Spec.P256.pk_compressed_from_raw", "Prims.unit", "FStar.Monotonic.HyperStack.mem", "FStar.HyperStack.ST.get", "Lib.Buffer.update_sub", "Lib.Buffer.op_Array_Assignment", "Lib.IntTypes.int_t", "Lib.IntTypes.U8", "Lib.IntTypes.SEC", "Hacl.Impl.P256.Compression.raw_to_compressed_get_pk0", "Lib.Buffer.lbuffer_t", "FStar.UInt32.uint_to_t", "FStar.UInt32.t", "Lib.Buffer.sub" ]
[]
module Hacl.Impl.P256.Compression open FStar.Mul open FStar.HyperStack.All open FStar.HyperStack module ST = FStar.HyperStack.ST open Lib.IntTypes open Lib.Buffer open Hacl.Impl.P256.Bignum open Hacl.Impl.P256.Field module P = Hacl.Impl.P256.Point module S = Spec.P256 module LSeq = Lib.Sequence module BSeq = Lib.ByteSequence #set-options "--z3rlimit 50 --ifuel 0 --fuel 0" let uncompressed_to_raw pk pk_raw = let pk0 = pk.(0ul) in if Lib.RawIntTypes.u8_to_UInt8 pk0 <> 0x04uy then false else begin copy pk_raw (sub pk 1ul 64ul); true end let compressed_to_raw pk pk_raw = push_frame (); let xa = create_felem () in let ya = create_felem () in let pk_xb = sub pk 1ul 32ul in let b = P.aff_point_decompress_vartime xa ya pk in if b then begin let h0 = ST.get () in update_sub pk_raw 0ul 32ul pk_xb; let h1 = ST.get () in update_sub_f h1 pk_raw 32ul 32ul (fun h -> BSeq.nat_to_bytes_be 32 (as_nat h1 ya)) (fun _ -> bn_to_bytes_be4 (sub pk_raw 32ul 32ul) ya); let h2 = ST.get () in LSeq.eq_intro (as_seq h2 pk_raw) (LSeq.concat #_ #32 #32 (as_seq h0 pk_xb) (BSeq.nat_to_bytes_be 32 (as_nat h0 ya))) end; pop_frame (); b let raw_to_uncompressed pk_raw pk = let h0 = ST.get () in pk.(0ul) <- u8 0x04; update_sub pk 1ul 64ul pk_raw; let h1 = ST.get () in LSeq.eq_intro (as_seq h1 pk) (S.pk_uncompressed_from_raw (as_seq h0 pk_raw)) inline_for_extraction noextract val raw_to_compressed_get_pk0: f:lbuffer uint8 32ul -> Stack uint8 (requires fun h -> live h f) (ensures fun h0 b h1 -> modifies0 h0 h1 /\ v b == (if (BSeq.nat_from_bytes_be (as_seq h0 f) % 2 = 1) then 0x03 else 0x02)) let raw_to_compressed_get_pk0 f = push_frame (); let bn_f = create_felem () in bn_from_bytes_be4 bn_f f; let is_odd_f = bn_is_odd4 bn_f in pop_frame (); to_u8 is_odd_f +! u8 0x02
false
false
Hacl.Impl.P256.Compression.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val raw_to_compressed: pk_raw:lbuffer uint8 64ul -> pk:lbuffer uint8 33ul -> Stack unit (requires fun h -> live h pk /\ live h pk_raw /\ disjoint pk pk_raw) (ensures fun h0 _ h1 -> modifies (loc pk) h0 h1 /\ as_seq h1 pk == S.pk_compressed_from_raw (as_seq h0 pk_raw))
[]
Hacl.Impl.P256.Compression.raw_to_compressed
{ "file_name": "code/ecdsap256/Hacl.Impl.P256.Compression.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
pk_raw: Lib.Buffer.lbuffer Lib.IntTypes.uint8 64ul -> pk: Lib.Buffer.lbuffer Lib.IntTypes.uint8 33ul -> FStar.HyperStack.ST.Stack Prims.unit
{ "end_col": 76, "end_line": 80, "start_col": 33, "start_line": 73 }
FStar.HyperStack.ST.Stack
val compressed_to_raw: pk:lbuffer uint8 33ul -> pk_raw:lbuffer uint8 64ul -> Stack bool (requires fun h -> live h pk /\ live h pk_raw /\ disjoint pk pk_raw) (ensures fun h0 b h1 -> modifies (loc pk_raw) h0 h1 /\ (b <==> Some? (S.pk_compressed_to_raw (as_seq h0 pk))) /\ (b ==> (as_seq h1 pk_raw == Some?.v (S.pk_compressed_to_raw (as_seq h0 pk)))))
[ { "abbrev": true, "full_module": "Lib.ByteSequence", "short_module": "BSeq" }, { "abbrev": true, "full_module": "Lib.Sequence", "short_module": "LSeq" }, { "abbrev": true, "full_module": "Hacl.Impl.P256.Point", "short_module": "P" }, { "abbrev": false, "full_module": "Hacl.Impl.P256.Field", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.P256.Bignum", "short_module": null }, { "abbrev": true, "full_module": "Spec.P256", "short_module": "S" }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.All", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.P256", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.P256", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let compressed_to_raw pk pk_raw = push_frame (); let xa = create_felem () in let ya = create_felem () in let pk_xb = sub pk 1ul 32ul in let b = P.aff_point_decompress_vartime xa ya pk in if b then begin let h0 = ST.get () in update_sub pk_raw 0ul 32ul pk_xb; let h1 = ST.get () in update_sub_f h1 pk_raw 32ul 32ul (fun h -> BSeq.nat_to_bytes_be 32 (as_nat h1 ya)) (fun _ -> bn_to_bytes_be4 (sub pk_raw 32ul 32ul) ya); let h2 = ST.get () in LSeq.eq_intro (as_seq h2 pk_raw) (LSeq.concat #_ #32 #32 (as_seq h0 pk_xb) (BSeq.nat_to_bytes_be 32 (as_nat h0 ya))) end; pop_frame (); b
val compressed_to_raw: pk:lbuffer uint8 33ul -> pk_raw:lbuffer uint8 64ul -> Stack bool (requires fun h -> live h pk /\ live h pk_raw /\ disjoint pk pk_raw) (ensures fun h0 b h1 -> modifies (loc pk_raw) h0 h1 /\ (b <==> Some? (S.pk_compressed_to_raw (as_seq h0 pk))) /\ (b ==> (as_seq h1 pk_raw == Some?.v (S.pk_compressed_to_raw (as_seq h0 pk))))) let compressed_to_raw pk pk_raw =
true
null
false
push_frame (); let xa = create_felem () in let ya = create_felem () in let pk_xb = sub pk 1ul 32ul in let b = P.aff_point_decompress_vartime xa ya pk in if b then (let h0 = ST.get () in update_sub pk_raw 0ul 32ul pk_xb; let h1 = ST.get () in update_sub_f h1 pk_raw 32ul 32ul (fun h -> BSeq.nat_to_bytes_be 32 (as_nat h1 ya)) (fun _ -> bn_to_bytes_be4 (sub pk_raw 32ul 32ul) ya); let h2 = ST.get () in LSeq.eq_intro (as_seq h2 pk_raw) (LSeq.concat #_ #32 #32 (as_seq h0 pk_xb) (BSeq.nat_to_bytes_be 32 (as_nat h0 ya)))); pop_frame (); b
{ "checked_file": "Hacl.Impl.P256.Compression.fst.checked", "dependencies": [ "Spec.P256.fst.checked", "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.ByteSequence.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Impl.P256.Point.fsti.checked", "Hacl.Impl.P256.Field.fsti.checked", "Hacl.Impl.P256.Bignum.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.All.fst.checked", "FStar.HyperStack.fst.checked" ], "interface_file": true, "source_file": "Hacl.Impl.P256.Compression.fst" }
[]
[ "Lib.Buffer.lbuffer", "Lib.IntTypes.uint8", "FStar.UInt32.__uint_to_t", "Prims.bool", "Prims.unit", "FStar.HyperStack.ST.pop_frame", "Lib.Sequence.eq_intro", "Lib.IntTypes.v", "Lib.IntTypes.U32", "Lib.IntTypes.PUB", "Lib.Buffer.as_seq", "Lib.Buffer.MUT", "Lib.Sequence.concat", "Lib.ByteSequence.nat_to_bytes_be", "Lib.IntTypes.SEC", "Hacl.Impl.P256.Bignum.as_nat", "FStar.Monotonic.HyperStack.mem", "FStar.HyperStack.ST.get", "Lib.Buffer.update_sub_f", "Lib.Sequence.lseq", "Hacl.Impl.P256.Bignum.bn_to_bytes_be4", "Lib.Buffer.lbuffer_t", "Lib.IntTypes.int_t", "Lib.IntTypes.U8", "FStar.UInt32.uint_to_t", "FStar.UInt32.t", "Lib.Buffer.sub", "Lib.Buffer.update_sub", "Hacl.Impl.P256.Point.aff_point_decompress_vartime", "Hacl.Impl.P256.Bignum.felem", "Hacl.Impl.P256.Bignum.create_felem", "FStar.HyperStack.ST.push_frame" ]
[]
module Hacl.Impl.P256.Compression open FStar.Mul open FStar.HyperStack.All open FStar.HyperStack module ST = FStar.HyperStack.ST open Lib.IntTypes open Lib.Buffer open Hacl.Impl.P256.Bignum open Hacl.Impl.P256.Field module P = Hacl.Impl.P256.Point module S = Spec.P256 module LSeq = Lib.Sequence module BSeq = Lib.ByteSequence #set-options "--z3rlimit 50 --ifuel 0 --fuel 0" let uncompressed_to_raw pk pk_raw = let pk0 = pk.(0ul) in if Lib.RawIntTypes.u8_to_UInt8 pk0 <> 0x04uy then false else begin copy pk_raw (sub pk 1ul 64ul); true end
false
false
Hacl.Impl.P256.Compression.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val compressed_to_raw: pk:lbuffer uint8 33ul -> pk_raw:lbuffer uint8 64ul -> Stack bool (requires fun h -> live h pk /\ live h pk_raw /\ disjoint pk pk_raw) (ensures fun h0 b h1 -> modifies (loc pk_raw) h0 h1 /\ (b <==> Some? (S.pk_compressed_to_raw (as_seq h0 pk))) /\ (b ==> (as_seq h1 pk_raw == Some?.v (S.pk_compressed_to_raw (as_seq h0 pk)))))
[]
Hacl.Impl.P256.Compression.compressed_to_raw
{ "file_name": "code/ecdsap256/Hacl.Impl.P256.Compression.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
pk: Lib.Buffer.lbuffer Lib.IntTypes.uint8 33ul -> pk_raw: Lib.Buffer.lbuffer Lib.IntTypes.uint8 64ul -> FStar.HyperStack.ST.Stack Prims.bool
{ "end_col": 3, "end_line": 47, "start_col": 2, "start_line": 30 }
FStar.Pervasives.Lemma
val lemma_pow2_256: n:nat -> Lemma (requires (n = 256)) (ensures (pow2 n = 0x10000000000000000000000000000000000000000000000000000000000000000)) [SMTPat (pow2 n)]
[ { "abbrev": false, "full_module": "Spec.Curve25519", "short_module": null }, { "abbrev": false, "full_module": "Spec.Curve25519", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let lemma_pow2_256 n = assert_norm(pow2 256 = 0x10000000000000000000000000000000000000000000000000000000000000000)
val lemma_pow2_256: n:nat -> Lemma (requires (n = 256)) (ensures (pow2 n = 0x10000000000000000000000000000000000000000000000000000000000000000)) [SMTPat (pow2 n)] let lemma_pow2_256 n =
false
null
true
assert_norm (pow2 256 = 0x10000000000000000000000000000000000000000000000000000000000000000)
{ "checked_file": "Spec.Curve25519.Lemmas.fst.checked", "dependencies": [ "prims.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": false, "source_file": "Spec.Curve25519.Lemmas.fst" }
[ "lemma" ]
[ "Prims.nat", "FStar.Pervasives.assert_norm", "Prims.b2t", "Prims.op_Equality", "Prims.int", "Prims.pow2", "Prims.unit" ]
[]
module Spec.Curve25519.Lemmas val lemma_prime_value: n:nat -> Lemma (requires (n = 255)) (ensures (pow2 n - 19 = 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed)) [SMTPat (pow2 n - 19)] let lemma_prime_value n = assert_norm(pow2 255 - 19 = 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed) val lemma_div_n: n:nat -> Lemma (requires (n > 1)) (ensures (n / 2 < n /\ n / 2 > 0)) [SMTPat (n / 2)] let lemma_div_n n = () val lemma_pow2_256: n:nat -> Lemma (requires (n = 256)) (ensures (pow2 n = 0x10000000000000000000000000000000000000000000000000000000000000000))
false
false
Spec.Curve25519.Lemmas.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val lemma_pow2_256: n:nat -> Lemma (requires (n = 256)) (ensures (pow2 n = 0x10000000000000000000000000000000000000000000000000000000000000000)) [SMTPat (pow2 n)]
[]
Spec.Curve25519.Lemmas.lemma_pow2_256
{ "file_name": "specs/lemmas/Spec.Curve25519.Lemmas.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
n: Prims.nat -> FStar.Pervasives.Lemma (requires n = 256) (ensures Prims.pow2 n = 0x10000000000000000000000000000000000000000000000000000000000000000) [SMTPat (Prims.pow2 n)]
{ "end_col": 114, "end_line": 19, "start_col": 23, "start_line": 19 }
FStar.Pervasives.Lemma
val lemma_prime_value: n:nat -> Lemma (requires (n = 255)) (ensures (pow2 n - 19 = 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed)) [SMTPat (pow2 n - 19)]
[ { "abbrev": false, "full_module": "Spec.Curve25519", "short_module": null }, { "abbrev": false, "full_module": "Spec.Curve25519", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let lemma_prime_value n = assert_norm(pow2 255 - 19 = 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed)
val lemma_prime_value: n:nat -> Lemma (requires (n = 255)) (ensures (pow2 n - 19 = 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed)) [SMTPat (pow2 n - 19)] let lemma_prime_value n =
false
null
true
assert_norm (pow2 255 - 19 = 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed)
{ "checked_file": "Spec.Curve25519.Lemmas.fst.checked", "dependencies": [ "prims.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": false, "source_file": "Spec.Curve25519.Lemmas.fst" }
[ "lemma" ]
[ "Prims.nat", "FStar.Pervasives.assert_norm", "Prims.b2t", "Prims.op_Equality", "Prims.int", "Prims.op_Subtraction", "Prims.pow2", "Prims.unit" ]
[]
module Spec.Curve25519.Lemmas val lemma_prime_value: n:nat -> Lemma (requires (n = 255)) (ensures (pow2 n - 19 = 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed))
false
false
Spec.Curve25519.Lemmas.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val lemma_prime_value: n:nat -> Lemma (requires (n = 255)) (ensures (pow2 n - 19 = 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed)) [SMTPat (pow2 n - 19)]
[]
Spec.Curve25519.Lemmas.lemma_prime_value
{ "file_name": "specs/lemmas/Spec.Curve25519.Lemmas.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
n: Prims.nat -> FStar.Pervasives.Lemma (requires n = 255) (ensures Prims.pow2 n - 19 = 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed) [SMTPat (Prims.pow2 n - 19)]
{ "end_col": 121, "end_line": 7, "start_col": 26, "start_line": 7 }
Prims.Tot
[ { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let h224 = Seq.seq_of_list h224_l
let h224 =
false
null
false
Seq.seq_of_list h224_l
{ "checked_file": "Spec.SHA2.Constants.fst.checked", "dependencies": [ "prims.fst.checked", "Lib.IntTypes.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.fst.checked" ], "interface_file": false, "source_file": "Spec.SHA2.Constants.fst" }
[ "total" ]
[ "FStar.Seq.Properties.seq_of_list", "Lib.IntTypes.int_t", "Lib.IntTypes.U32", "Lib.IntTypes.SEC", "Spec.SHA2.Constants.h224_l" ]
[]
module Spec.SHA2.Constants #set-options "--z3rlimit 100" open Lib.IntTypes // K shuffling vectors [@"opaque_to_smt"] inline_for_extraction let k224_256_l: List.llist uint32 64 = [@inline_let] let l = [u32 0x428a2f98; u32 0x71374491; u32 0xb5c0fbcf; u32 0xe9b5dba5; u32 0x3956c25b; u32 0x59f111f1; u32 0x923f82a4; u32 0xab1c5ed5; u32 0xd807aa98; u32 0x12835b01; u32 0x243185be; u32 0x550c7dc3; u32 0x72be5d74; u32 0x80deb1fe; u32 0x9bdc06a7; u32 0xc19bf174; u32 0xe49b69c1; u32 0xefbe4786; u32 0x0fc19dc6; u32 0x240ca1cc; u32 0x2de92c6f; u32 0x4a7484aa; u32 0x5cb0a9dc; u32 0x76f988da; u32 0x983e5152; u32 0xa831c66d; u32 0xb00327c8; u32 0xbf597fc7; u32 0xc6e00bf3; u32 0xd5a79147; u32 0x06ca6351; u32 0x14292967; u32 0x27b70a85; u32 0x2e1b2138; u32 0x4d2c6dfc; u32 0x53380d13; u32 0x650a7354; u32 0x766a0abb; u32 0x81c2c92e; u32 0x92722c85; u32 0xa2bfe8a1; u32 0xa81a664b; u32 0xc24b8b70; u32 0xc76c51a3; u32 0xd192e819; u32 0xd6990624; u32 0xf40e3585; u32 0x106aa070; u32 0x19a4c116; u32 0x1e376c08; u32 0x2748774c; u32 0x34b0bcb5; u32 0x391c0cb3; u32 0x4ed8aa4a; u32 0x5b9cca4f; u32 0x682e6ff3; u32 0x748f82ee; u32 0x78a5636f; u32 0x84c87814; u32 0x8cc70208; u32 0x90befffa; u32 0xa4506ceb; u32 0xbef9a3f7; u32 0xc67178f2] in assert_norm (List.length l = 64); l let k224_256 = Seq.seq_of_list k224_256_l [@"opaque_to_smt"] inline_for_extraction let k384_512_l: List.llist uint64 80 = [@inline_let] let l = [u64 0x428a2f98d728ae22; u64 0x7137449123ef65cd; u64 0xb5c0fbcfec4d3b2f; u64 0xe9b5dba58189dbbc; u64 0x3956c25bf348b538; u64 0x59f111f1b605d019; u64 0x923f82a4af194f9b; u64 0xab1c5ed5da6d8118; u64 0xd807aa98a3030242; u64 0x12835b0145706fbe; u64 0x243185be4ee4b28c; u64 0x550c7dc3d5ffb4e2; u64 0x72be5d74f27b896f; u64 0x80deb1fe3b1696b1; u64 0x9bdc06a725c71235; u64 0xc19bf174cf692694; u64 0xe49b69c19ef14ad2; u64 0xefbe4786384f25e3; u64 0x0fc19dc68b8cd5b5; u64 0x240ca1cc77ac9c65; u64 0x2de92c6f592b0275; u64 0x4a7484aa6ea6e483; u64 0x5cb0a9dcbd41fbd4; u64 0x76f988da831153b5; u64 0x983e5152ee66dfab; u64 0xa831c66d2db43210; u64 0xb00327c898fb213f; u64 0xbf597fc7beef0ee4; u64 0xc6e00bf33da88fc2; u64 0xd5a79147930aa725; u64 0x06ca6351e003826f; u64 0x142929670a0e6e70; u64 0x27b70a8546d22ffc; u64 0x2e1b21385c26c926; u64 0x4d2c6dfc5ac42aed; u64 0x53380d139d95b3df; u64 0x650a73548baf63de; u64 0x766a0abb3c77b2a8; u64 0x81c2c92e47edaee6; u64 0x92722c851482353b; u64 0xa2bfe8a14cf10364; u64 0xa81a664bbc423001; u64 0xc24b8b70d0f89791; u64 0xc76c51a30654be30; u64 0xd192e819d6ef5218; u64 0xd69906245565a910; u64 0xf40e35855771202a; u64 0x106aa07032bbd1b8; u64 0x19a4c116b8d2d0c8; u64 0x1e376c085141ab53; u64 0x2748774cdf8eeb99; u64 0x34b0bcb5e19b48a8; u64 0x391c0cb3c5c95a63; u64 0x4ed8aa4ae3418acb; u64 0x5b9cca4f7763e373; u64 0x682e6ff3d6b2b8a3; u64 0x748f82ee5defb2fc; u64 0x78a5636f43172f60; u64 0x84c87814a1f0ab72; u64 0x8cc702081a6439ec; u64 0x90befffa23631e28; u64 0xa4506cebde82bde9; u64 0xbef9a3f7b2c67915; u64 0xc67178f2e372532b; u64 0xca273eceea26619c; u64 0xd186b8c721c0c207; u64 0xeada7dd6cde0eb1e; u64 0xf57d4f7fee6ed178; u64 0x06f067aa72176fba; u64 0x0a637dc5a2c898a6; u64 0x113f9804bef90dae; u64 0x1b710b35131c471b; u64 0x28db77f523047d84; u64 0x32caab7b40c72493; u64 0x3c9ebe0a15c9bebc; u64 0x431d67c49c100d4c; u64 0x4cc5d4becb3e42b6; u64 0x597f299cfc657e2a; u64 0x5fcb6fab3ad6faec; u64 0x6c44198c4a475817 ] in assert_norm (List.length l = 80); l let k384_512 = Seq.seq_of_list k384_512_l // H0 vectors, i.e. initial values of the accumulator [@"opaque_to_smt"] inline_for_extraction let h224_l: List.llist uint32 8 = [@inline_let] let l = [ u32 0xc1059ed8; u32 0x367cd507; u32 0x3070dd17; u32 0xf70e5939; u32 0xffc00b31; u32 0x68581511; u32 0x64f98fa7; u32 0xbefa4fa4 ] in assert_norm (List.length l = 8); l
false
false
Spec.SHA2.Constants.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 100, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val h224 : s: FStar.Seq.Base.seq (Lib.IntTypes.int_t Lib.IntTypes.U32 Lib.IntTypes.SEC) {FStar.List.Tot.Base.length Spec.SHA2.Constants.h224_l = FStar.Seq.Base.length s}
[]
Spec.SHA2.Constants.h224
{ "file_name": "specs/Spec.SHA2.Constants.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
s: FStar.Seq.Base.seq (Lib.IntTypes.int_t Lib.IntTypes.U32 Lib.IntTypes.SEC) {FStar.List.Tot.Base.length Spec.SHA2.Constants.h224_l = FStar.Seq.Base.length s}
{ "end_col": 33, "end_line": 77, "start_col": 11, "start_line": 77 }
Prims.Tot
[ { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let k384_512 = Seq.seq_of_list k384_512_l
let k384_512 =
false
null
false
Seq.seq_of_list k384_512_l
{ "checked_file": "Spec.SHA2.Constants.fst.checked", "dependencies": [ "prims.fst.checked", "Lib.IntTypes.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.fst.checked" ], "interface_file": false, "source_file": "Spec.SHA2.Constants.fst" }
[ "total" ]
[ "FStar.Seq.Properties.seq_of_list", "Lib.IntTypes.int_t", "Lib.IntTypes.U64", "Lib.IntTypes.SEC", "Spec.SHA2.Constants.k384_512_l" ]
[]
module Spec.SHA2.Constants #set-options "--z3rlimit 100" open Lib.IntTypes // K shuffling vectors [@"opaque_to_smt"] inline_for_extraction let k224_256_l: List.llist uint32 64 = [@inline_let] let l = [u32 0x428a2f98; u32 0x71374491; u32 0xb5c0fbcf; u32 0xe9b5dba5; u32 0x3956c25b; u32 0x59f111f1; u32 0x923f82a4; u32 0xab1c5ed5; u32 0xd807aa98; u32 0x12835b01; u32 0x243185be; u32 0x550c7dc3; u32 0x72be5d74; u32 0x80deb1fe; u32 0x9bdc06a7; u32 0xc19bf174; u32 0xe49b69c1; u32 0xefbe4786; u32 0x0fc19dc6; u32 0x240ca1cc; u32 0x2de92c6f; u32 0x4a7484aa; u32 0x5cb0a9dc; u32 0x76f988da; u32 0x983e5152; u32 0xa831c66d; u32 0xb00327c8; u32 0xbf597fc7; u32 0xc6e00bf3; u32 0xd5a79147; u32 0x06ca6351; u32 0x14292967; u32 0x27b70a85; u32 0x2e1b2138; u32 0x4d2c6dfc; u32 0x53380d13; u32 0x650a7354; u32 0x766a0abb; u32 0x81c2c92e; u32 0x92722c85; u32 0xa2bfe8a1; u32 0xa81a664b; u32 0xc24b8b70; u32 0xc76c51a3; u32 0xd192e819; u32 0xd6990624; u32 0xf40e3585; u32 0x106aa070; u32 0x19a4c116; u32 0x1e376c08; u32 0x2748774c; u32 0x34b0bcb5; u32 0x391c0cb3; u32 0x4ed8aa4a; u32 0x5b9cca4f; u32 0x682e6ff3; u32 0x748f82ee; u32 0x78a5636f; u32 0x84c87814; u32 0x8cc70208; u32 0x90befffa; u32 0xa4506ceb; u32 0xbef9a3f7; u32 0xc67178f2] in assert_norm (List.length l = 64); l let k224_256 = Seq.seq_of_list k224_256_l [@"opaque_to_smt"] inline_for_extraction let k384_512_l: List.llist uint64 80 = [@inline_let] let l = [u64 0x428a2f98d728ae22; u64 0x7137449123ef65cd; u64 0xb5c0fbcfec4d3b2f; u64 0xe9b5dba58189dbbc; u64 0x3956c25bf348b538; u64 0x59f111f1b605d019; u64 0x923f82a4af194f9b; u64 0xab1c5ed5da6d8118; u64 0xd807aa98a3030242; u64 0x12835b0145706fbe; u64 0x243185be4ee4b28c; u64 0x550c7dc3d5ffb4e2; u64 0x72be5d74f27b896f; u64 0x80deb1fe3b1696b1; u64 0x9bdc06a725c71235; u64 0xc19bf174cf692694; u64 0xe49b69c19ef14ad2; u64 0xefbe4786384f25e3; u64 0x0fc19dc68b8cd5b5; u64 0x240ca1cc77ac9c65; u64 0x2de92c6f592b0275; u64 0x4a7484aa6ea6e483; u64 0x5cb0a9dcbd41fbd4; u64 0x76f988da831153b5; u64 0x983e5152ee66dfab; u64 0xa831c66d2db43210; u64 0xb00327c898fb213f; u64 0xbf597fc7beef0ee4; u64 0xc6e00bf33da88fc2; u64 0xd5a79147930aa725; u64 0x06ca6351e003826f; u64 0x142929670a0e6e70; u64 0x27b70a8546d22ffc; u64 0x2e1b21385c26c926; u64 0x4d2c6dfc5ac42aed; u64 0x53380d139d95b3df; u64 0x650a73548baf63de; u64 0x766a0abb3c77b2a8; u64 0x81c2c92e47edaee6; u64 0x92722c851482353b; u64 0xa2bfe8a14cf10364; u64 0xa81a664bbc423001; u64 0xc24b8b70d0f89791; u64 0xc76c51a30654be30; u64 0xd192e819d6ef5218; u64 0xd69906245565a910; u64 0xf40e35855771202a; u64 0x106aa07032bbd1b8; u64 0x19a4c116b8d2d0c8; u64 0x1e376c085141ab53; u64 0x2748774cdf8eeb99; u64 0x34b0bcb5e19b48a8; u64 0x391c0cb3c5c95a63; u64 0x4ed8aa4ae3418acb; u64 0x5b9cca4f7763e373; u64 0x682e6ff3d6b2b8a3; u64 0x748f82ee5defb2fc; u64 0x78a5636f43172f60; u64 0x84c87814a1f0ab72; u64 0x8cc702081a6439ec; u64 0x90befffa23631e28; u64 0xa4506cebde82bde9; u64 0xbef9a3f7b2c67915; u64 0xc67178f2e372532b; u64 0xca273eceea26619c; u64 0xd186b8c721c0c207; u64 0xeada7dd6cde0eb1e; u64 0xf57d4f7fee6ed178; u64 0x06f067aa72176fba; u64 0x0a637dc5a2c898a6; u64 0x113f9804bef90dae; u64 0x1b710b35131c471b; u64 0x28db77f523047d84; u64 0x32caab7b40c72493; u64 0x3c9ebe0a15c9bebc; u64 0x431d67c49c100d4c; u64 0x4cc5d4becb3e42b6; u64 0x597f299cfc657e2a; u64 0x5fcb6fab3ad6faec; u64 0x6c44198c4a475817 ] in assert_norm (List.length l = 80); l
false
false
Spec.SHA2.Constants.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 100, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val k384_512 : s: FStar.Seq.Base.seq (Lib.IntTypes.int_t Lib.IntTypes.U64 Lib.IntTypes.SEC) {FStar.List.Tot.Base.length Spec.SHA2.Constants.k384_512_l = FStar.Seq.Base.length s}
[]
Spec.SHA2.Constants.k384_512
{ "file_name": "specs/Spec.SHA2.Constants.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
s: FStar.Seq.Base.seq (Lib.IntTypes.int_t Lib.IntTypes.U64 Lib.IntTypes.SEC) {FStar.List.Tot.Base.length Spec.SHA2.Constants.k384_512_l = FStar.Seq.Base.length s}
{ "end_col": 41, "end_line": 62, "start_col": 15, "start_line": 62 }
Prims.Tot
[ { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let h256 = Seq.seq_of_list h256_l
let h256 =
false
null
false
Seq.seq_of_list h256_l
{ "checked_file": "Spec.SHA2.Constants.fst.checked", "dependencies": [ "prims.fst.checked", "Lib.IntTypes.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.fst.checked" ], "interface_file": false, "source_file": "Spec.SHA2.Constants.fst" }
[ "total" ]
[ "FStar.Seq.Properties.seq_of_list", "Lib.IntTypes.int_t", "Lib.IntTypes.U32", "Lib.IntTypes.SEC", "Spec.SHA2.Constants.h256_l" ]
[]
module Spec.SHA2.Constants #set-options "--z3rlimit 100" open Lib.IntTypes // K shuffling vectors [@"opaque_to_smt"] inline_for_extraction let k224_256_l: List.llist uint32 64 = [@inline_let] let l = [u32 0x428a2f98; u32 0x71374491; u32 0xb5c0fbcf; u32 0xe9b5dba5; u32 0x3956c25b; u32 0x59f111f1; u32 0x923f82a4; u32 0xab1c5ed5; u32 0xd807aa98; u32 0x12835b01; u32 0x243185be; u32 0x550c7dc3; u32 0x72be5d74; u32 0x80deb1fe; u32 0x9bdc06a7; u32 0xc19bf174; u32 0xe49b69c1; u32 0xefbe4786; u32 0x0fc19dc6; u32 0x240ca1cc; u32 0x2de92c6f; u32 0x4a7484aa; u32 0x5cb0a9dc; u32 0x76f988da; u32 0x983e5152; u32 0xa831c66d; u32 0xb00327c8; u32 0xbf597fc7; u32 0xc6e00bf3; u32 0xd5a79147; u32 0x06ca6351; u32 0x14292967; u32 0x27b70a85; u32 0x2e1b2138; u32 0x4d2c6dfc; u32 0x53380d13; u32 0x650a7354; u32 0x766a0abb; u32 0x81c2c92e; u32 0x92722c85; u32 0xa2bfe8a1; u32 0xa81a664b; u32 0xc24b8b70; u32 0xc76c51a3; u32 0xd192e819; u32 0xd6990624; u32 0xf40e3585; u32 0x106aa070; u32 0x19a4c116; u32 0x1e376c08; u32 0x2748774c; u32 0x34b0bcb5; u32 0x391c0cb3; u32 0x4ed8aa4a; u32 0x5b9cca4f; u32 0x682e6ff3; u32 0x748f82ee; u32 0x78a5636f; u32 0x84c87814; u32 0x8cc70208; u32 0x90befffa; u32 0xa4506ceb; u32 0xbef9a3f7; u32 0xc67178f2] in assert_norm (List.length l = 64); l let k224_256 = Seq.seq_of_list k224_256_l [@"opaque_to_smt"] inline_for_extraction let k384_512_l: List.llist uint64 80 = [@inline_let] let l = [u64 0x428a2f98d728ae22; u64 0x7137449123ef65cd; u64 0xb5c0fbcfec4d3b2f; u64 0xe9b5dba58189dbbc; u64 0x3956c25bf348b538; u64 0x59f111f1b605d019; u64 0x923f82a4af194f9b; u64 0xab1c5ed5da6d8118; u64 0xd807aa98a3030242; u64 0x12835b0145706fbe; u64 0x243185be4ee4b28c; u64 0x550c7dc3d5ffb4e2; u64 0x72be5d74f27b896f; u64 0x80deb1fe3b1696b1; u64 0x9bdc06a725c71235; u64 0xc19bf174cf692694; u64 0xe49b69c19ef14ad2; u64 0xefbe4786384f25e3; u64 0x0fc19dc68b8cd5b5; u64 0x240ca1cc77ac9c65; u64 0x2de92c6f592b0275; u64 0x4a7484aa6ea6e483; u64 0x5cb0a9dcbd41fbd4; u64 0x76f988da831153b5; u64 0x983e5152ee66dfab; u64 0xa831c66d2db43210; u64 0xb00327c898fb213f; u64 0xbf597fc7beef0ee4; u64 0xc6e00bf33da88fc2; u64 0xd5a79147930aa725; u64 0x06ca6351e003826f; u64 0x142929670a0e6e70; u64 0x27b70a8546d22ffc; u64 0x2e1b21385c26c926; u64 0x4d2c6dfc5ac42aed; u64 0x53380d139d95b3df; u64 0x650a73548baf63de; u64 0x766a0abb3c77b2a8; u64 0x81c2c92e47edaee6; u64 0x92722c851482353b; u64 0xa2bfe8a14cf10364; u64 0xa81a664bbc423001; u64 0xc24b8b70d0f89791; u64 0xc76c51a30654be30; u64 0xd192e819d6ef5218; u64 0xd69906245565a910; u64 0xf40e35855771202a; u64 0x106aa07032bbd1b8; u64 0x19a4c116b8d2d0c8; u64 0x1e376c085141ab53; u64 0x2748774cdf8eeb99; u64 0x34b0bcb5e19b48a8; u64 0x391c0cb3c5c95a63; u64 0x4ed8aa4ae3418acb; u64 0x5b9cca4f7763e373; u64 0x682e6ff3d6b2b8a3; u64 0x748f82ee5defb2fc; u64 0x78a5636f43172f60; u64 0x84c87814a1f0ab72; u64 0x8cc702081a6439ec; u64 0x90befffa23631e28; u64 0xa4506cebde82bde9; u64 0xbef9a3f7b2c67915; u64 0xc67178f2e372532b; u64 0xca273eceea26619c; u64 0xd186b8c721c0c207; u64 0xeada7dd6cde0eb1e; u64 0xf57d4f7fee6ed178; u64 0x06f067aa72176fba; u64 0x0a637dc5a2c898a6; u64 0x113f9804bef90dae; u64 0x1b710b35131c471b; u64 0x28db77f523047d84; u64 0x32caab7b40c72493; u64 0x3c9ebe0a15c9bebc; u64 0x431d67c49c100d4c; u64 0x4cc5d4becb3e42b6; u64 0x597f299cfc657e2a; u64 0x5fcb6fab3ad6faec; u64 0x6c44198c4a475817 ] in assert_norm (List.length l = 80); l let k384_512 = Seq.seq_of_list k384_512_l // H0 vectors, i.e. initial values of the accumulator [@"opaque_to_smt"] inline_for_extraction let h224_l: List.llist uint32 8 = [@inline_let] let l = [ u32 0xc1059ed8; u32 0x367cd507; u32 0x3070dd17; u32 0xf70e5939; u32 0xffc00b31; u32 0x68581511; u32 0x64f98fa7; u32 0xbefa4fa4 ] in assert_norm (List.length l = 8); l let h224 = Seq.seq_of_list h224_l [@"opaque_to_smt"] inline_for_extraction let h256_l: List.llist uint32 8 = [@inline_let] let l = [u32 0x6a09e667; u32 0xbb67ae85; u32 0x3c6ef372; u32 0xa54ff53a; u32 0x510e527f; u32 0x9b05688c; u32 0x1f83d9ab; u32 0x5be0cd19] in assert_norm (List.length l = 8); l
false
false
Spec.SHA2.Constants.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 100, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val h256 : s: FStar.Seq.Base.seq (Lib.IntTypes.int_t Lib.IntTypes.U32 Lib.IntTypes.SEC) {FStar.List.Tot.Base.length Spec.SHA2.Constants.h256_l = FStar.Seq.Base.length s}
[]
Spec.SHA2.Constants.h256
{ "file_name": "specs/Spec.SHA2.Constants.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
s: FStar.Seq.Base.seq (Lib.IntTypes.int_t Lib.IntTypes.U32 Lib.IntTypes.SEC) {FStar.List.Tot.Base.length Spec.SHA2.Constants.h256_l = FStar.Seq.Base.length s}
{ "end_col": 33, "end_line": 90, "start_col": 11, "start_line": 90 }
Prims.Tot
[ { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let h384 = Seq.seq_of_list h384_l
let h384 =
false
null
false
Seq.seq_of_list h384_l
{ "checked_file": "Spec.SHA2.Constants.fst.checked", "dependencies": [ "prims.fst.checked", "Lib.IntTypes.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.fst.checked" ], "interface_file": false, "source_file": "Spec.SHA2.Constants.fst" }
[ "total" ]
[ "FStar.Seq.Properties.seq_of_list", "Lib.IntTypes.int_t", "Lib.IntTypes.U64", "Lib.IntTypes.SEC", "Spec.SHA2.Constants.h384_l" ]
[]
module Spec.SHA2.Constants #set-options "--z3rlimit 100" open Lib.IntTypes // K shuffling vectors [@"opaque_to_smt"] inline_for_extraction let k224_256_l: List.llist uint32 64 = [@inline_let] let l = [u32 0x428a2f98; u32 0x71374491; u32 0xb5c0fbcf; u32 0xe9b5dba5; u32 0x3956c25b; u32 0x59f111f1; u32 0x923f82a4; u32 0xab1c5ed5; u32 0xd807aa98; u32 0x12835b01; u32 0x243185be; u32 0x550c7dc3; u32 0x72be5d74; u32 0x80deb1fe; u32 0x9bdc06a7; u32 0xc19bf174; u32 0xe49b69c1; u32 0xefbe4786; u32 0x0fc19dc6; u32 0x240ca1cc; u32 0x2de92c6f; u32 0x4a7484aa; u32 0x5cb0a9dc; u32 0x76f988da; u32 0x983e5152; u32 0xa831c66d; u32 0xb00327c8; u32 0xbf597fc7; u32 0xc6e00bf3; u32 0xd5a79147; u32 0x06ca6351; u32 0x14292967; u32 0x27b70a85; u32 0x2e1b2138; u32 0x4d2c6dfc; u32 0x53380d13; u32 0x650a7354; u32 0x766a0abb; u32 0x81c2c92e; u32 0x92722c85; u32 0xa2bfe8a1; u32 0xa81a664b; u32 0xc24b8b70; u32 0xc76c51a3; u32 0xd192e819; u32 0xd6990624; u32 0xf40e3585; u32 0x106aa070; u32 0x19a4c116; u32 0x1e376c08; u32 0x2748774c; u32 0x34b0bcb5; u32 0x391c0cb3; u32 0x4ed8aa4a; u32 0x5b9cca4f; u32 0x682e6ff3; u32 0x748f82ee; u32 0x78a5636f; u32 0x84c87814; u32 0x8cc70208; u32 0x90befffa; u32 0xa4506ceb; u32 0xbef9a3f7; u32 0xc67178f2] in assert_norm (List.length l = 64); l let k224_256 = Seq.seq_of_list k224_256_l [@"opaque_to_smt"] inline_for_extraction let k384_512_l: List.llist uint64 80 = [@inline_let] let l = [u64 0x428a2f98d728ae22; u64 0x7137449123ef65cd; u64 0xb5c0fbcfec4d3b2f; u64 0xe9b5dba58189dbbc; u64 0x3956c25bf348b538; u64 0x59f111f1b605d019; u64 0x923f82a4af194f9b; u64 0xab1c5ed5da6d8118; u64 0xd807aa98a3030242; u64 0x12835b0145706fbe; u64 0x243185be4ee4b28c; u64 0x550c7dc3d5ffb4e2; u64 0x72be5d74f27b896f; u64 0x80deb1fe3b1696b1; u64 0x9bdc06a725c71235; u64 0xc19bf174cf692694; u64 0xe49b69c19ef14ad2; u64 0xefbe4786384f25e3; u64 0x0fc19dc68b8cd5b5; u64 0x240ca1cc77ac9c65; u64 0x2de92c6f592b0275; u64 0x4a7484aa6ea6e483; u64 0x5cb0a9dcbd41fbd4; u64 0x76f988da831153b5; u64 0x983e5152ee66dfab; u64 0xa831c66d2db43210; u64 0xb00327c898fb213f; u64 0xbf597fc7beef0ee4; u64 0xc6e00bf33da88fc2; u64 0xd5a79147930aa725; u64 0x06ca6351e003826f; u64 0x142929670a0e6e70; u64 0x27b70a8546d22ffc; u64 0x2e1b21385c26c926; u64 0x4d2c6dfc5ac42aed; u64 0x53380d139d95b3df; u64 0x650a73548baf63de; u64 0x766a0abb3c77b2a8; u64 0x81c2c92e47edaee6; u64 0x92722c851482353b; u64 0xa2bfe8a14cf10364; u64 0xa81a664bbc423001; u64 0xc24b8b70d0f89791; u64 0xc76c51a30654be30; u64 0xd192e819d6ef5218; u64 0xd69906245565a910; u64 0xf40e35855771202a; u64 0x106aa07032bbd1b8; u64 0x19a4c116b8d2d0c8; u64 0x1e376c085141ab53; u64 0x2748774cdf8eeb99; u64 0x34b0bcb5e19b48a8; u64 0x391c0cb3c5c95a63; u64 0x4ed8aa4ae3418acb; u64 0x5b9cca4f7763e373; u64 0x682e6ff3d6b2b8a3; u64 0x748f82ee5defb2fc; u64 0x78a5636f43172f60; u64 0x84c87814a1f0ab72; u64 0x8cc702081a6439ec; u64 0x90befffa23631e28; u64 0xa4506cebde82bde9; u64 0xbef9a3f7b2c67915; u64 0xc67178f2e372532b; u64 0xca273eceea26619c; u64 0xd186b8c721c0c207; u64 0xeada7dd6cde0eb1e; u64 0xf57d4f7fee6ed178; u64 0x06f067aa72176fba; u64 0x0a637dc5a2c898a6; u64 0x113f9804bef90dae; u64 0x1b710b35131c471b; u64 0x28db77f523047d84; u64 0x32caab7b40c72493; u64 0x3c9ebe0a15c9bebc; u64 0x431d67c49c100d4c; u64 0x4cc5d4becb3e42b6; u64 0x597f299cfc657e2a; u64 0x5fcb6fab3ad6faec; u64 0x6c44198c4a475817 ] in assert_norm (List.length l = 80); l let k384_512 = Seq.seq_of_list k384_512_l // H0 vectors, i.e. initial values of the accumulator [@"opaque_to_smt"] inline_for_extraction let h224_l: List.llist uint32 8 = [@inline_let] let l = [ u32 0xc1059ed8; u32 0x367cd507; u32 0x3070dd17; u32 0xf70e5939; u32 0xffc00b31; u32 0x68581511; u32 0x64f98fa7; u32 0xbefa4fa4 ] in assert_norm (List.length l = 8); l let h224 = Seq.seq_of_list h224_l [@"opaque_to_smt"] inline_for_extraction let h256_l: List.llist uint32 8 = [@inline_let] let l = [u32 0x6a09e667; u32 0xbb67ae85; u32 0x3c6ef372; u32 0xa54ff53a; u32 0x510e527f; u32 0x9b05688c; u32 0x1f83d9ab; u32 0x5be0cd19] in assert_norm (List.length l = 8); l let h256 = Seq.seq_of_list h256_l [@"opaque_to_smt"] inline_for_extraction let h384_l: List.llist uint64 8 = [@inline_let] let l = [ u64 0xcbbb9d5dc1059ed8; u64 0x629a292a367cd507; u64 0x9159015a3070dd17; u64 0x152fecd8f70e5939; u64 0x67332667ffc00b31; u64 0x8eb44a8768581511; u64 0xdb0c2e0d64f98fa7; u64 0x47b5481dbefa4fa4 ] in assert_norm (List.length l = 8); l
false
false
Spec.SHA2.Constants.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 100, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val h384 : s: FStar.Seq.Base.seq (Lib.IntTypes.int_t Lib.IntTypes.U64 Lib.IntTypes.SEC) {FStar.List.Tot.Base.length Spec.SHA2.Constants.h384_l = FStar.Seq.Base.length s}
[]
Spec.SHA2.Constants.h384
{ "file_name": "specs/Spec.SHA2.Constants.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
s: FStar.Seq.Base.seq (Lib.IntTypes.int_t Lib.IntTypes.U64 Lib.IntTypes.SEC) {FStar.List.Tot.Base.length Spec.SHA2.Constants.h384_l = FStar.Seq.Base.length s}
{ "end_col": 33, "end_line": 103, "start_col": 11, "start_line": 103 }
Prims.Tot
[ { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let h512 = Seq.seq_of_list h512_l
let h512 =
false
null
false
Seq.seq_of_list h512_l
{ "checked_file": "Spec.SHA2.Constants.fst.checked", "dependencies": [ "prims.fst.checked", "Lib.IntTypes.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.fst.checked" ], "interface_file": false, "source_file": "Spec.SHA2.Constants.fst" }
[ "total" ]
[ "FStar.Seq.Properties.seq_of_list", "Lib.IntTypes.int_t", "Lib.IntTypes.U64", "Lib.IntTypes.SEC", "Spec.SHA2.Constants.h512_l" ]
[]
module Spec.SHA2.Constants #set-options "--z3rlimit 100" open Lib.IntTypes // K shuffling vectors [@"opaque_to_smt"] inline_for_extraction let k224_256_l: List.llist uint32 64 = [@inline_let] let l = [u32 0x428a2f98; u32 0x71374491; u32 0xb5c0fbcf; u32 0xe9b5dba5; u32 0x3956c25b; u32 0x59f111f1; u32 0x923f82a4; u32 0xab1c5ed5; u32 0xd807aa98; u32 0x12835b01; u32 0x243185be; u32 0x550c7dc3; u32 0x72be5d74; u32 0x80deb1fe; u32 0x9bdc06a7; u32 0xc19bf174; u32 0xe49b69c1; u32 0xefbe4786; u32 0x0fc19dc6; u32 0x240ca1cc; u32 0x2de92c6f; u32 0x4a7484aa; u32 0x5cb0a9dc; u32 0x76f988da; u32 0x983e5152; u32 0xa831c66d; u32 0xb00327c8; u32 0xbf597fc7; u32 0xc6e00bf3; u32 0xd5a79147; u32 0x06ca6351; u32 0x14292967; u32 0x27b70a85; u32 0x2e1b2138; u32 0x4d2c6dfc; u32 0x53380d13; u32 0x650a7354; u32 0x766a0abb; u32 0x81c2c92e; u32 0x92722c85; u32 0xa2bfe8a1; u32 0xa81a664b; u32 0xc24b8b70; u32 0xc76c51a3; u32 0xd192e819; u32 0xd6990624; u32 0xf40e3585; u32 0x106aa070; u32 0x19a4c116; u32 0x1e376c08; u32 0x2748774c; u32 0x34b0bcb5; u32 0x391c0cb3; u32 0x4ed8aa4a; u32 0x5b9cca4f; u32 0x682e6ff3; u32 0x748f82ee; u32 0x78a5636f; u32 0x84c87814; u32 0x8cc70208; u32 0x90befffa; u32 0xa4506ceb; u32 0xbef9a3f7; u32 0xc67178f2] in assert_norm (List.length l = 64); l let k224_256 = Seq.seq_of_list k224_256_l [@"opaque_to_smt"] inline_for_extraction let k384_512_l: List.llist uint64 80 = [@inline_let] let l = [u64 0x428a2f98d728ae22; u64 0x7137449123ef65cd; u64 0xb5c0fbcfec4d3b2f; u64 0xe9b5dba58189dbbc; u64 0x3956c25bf348b538; u64 0x59f111f1b605d019; u64 0x923f82a4af194f9b; u64 0xab1c5ed5da6d8118; u64 0xd807aa98a3030242; u64 0x12835b0145706fbe; u64 0x243185be4ee4b28c; u64 0x550c7dc3d5ffb4e2; u64 0x72be5d74f27b896f; u64 0x80deb1fe3b1696b1; u64 0x9bdc06a725c71235; u64 0xc19bf174cf692694; u64 0xe49b69c19ef14ad2; u64 0xefbe4786384f25e3; u64 0x0fc19dc68b8cd5b5; u64 0x240ca1cc77ac9c65; u64 0x2de92c6f592b0275; u64 0x4a7484aa6ea6e483; u64 0x5cb0a9dcbd41fbd4; u64 0x76f988da831153b5; u64 0x983e5152ee66dfab; u64 0xa831c66d2db43210; u64 0xb00327c898fb213f; u64 0xbf597fc7beef0ee4; u64 0xc6e00bf33da88fc2; u64 0xd5a79147930aa725; u64 0x06ca6351e003826f; u64 0x142929670a0e6e70; u64 0x27b70a8546d22ffc; u64 0x2e1b21385c26c926; u64 0x4d2c6dfc5ac42aed; u64 0x53380d139d95b3df; u64 0x650a73548baf63de; u64 0x766a0abb3c77b2a8; u64 0x81c2c92e47edaee6; u64 0x92722c851482353b; u64 0xa2bfe8a14cf10364; u64 0xa81a664bbc423001; u64 0xc24b8b70d0f89791; u64 0xc76c51a30654be30; u64 0xd192e819d6ef5218; u64 0xd69906245565a910; u64 0xf40e35855771202a; u64 0x106aa07032bbd1b8; u64 0x19a4c116b8d2d0c8; u64 0x1e376c085141ab53; u64 0x2748774cdf8eeb99; u64 0x34b0bcb5e19b48a8; u64 0x391c0cb3c5c95a63; u64 0x4ed8aa4ae3418acb; u64 0x5b9cca4f7763e373; u64 0x682e6ff3d6b2b8a3; u64 0x748f82ee5defb2fc; u64 0x78a5636f43172f60; u64 0x84c87814a1f0ab72; u64 0x8cc702081a6439ec; u64 0x90befffa23631e28; u64 0xa4506cebde82bde9; u64 0xbef9a3f7b2c67915; u64 0xc67178f2e372532b; u64 0xca273eceea26619c; u64 0xd186b8c721c0c207; u64 0xeada7dd6cde0eb1e; u64 0xf57d4f7fee6ed178; u64 0x06f067aa72176fba; u64 0x0a637dc5a2c898a6; u64 0x113f9804bef90dae; u64 0x1b710b35131c471b; u64 0x28db77f523047d84; u64 0x32caab7b40c72493; u64 0x3c9ebe0a15c9bebc; u64 0x431d67c49c100d4c; u64 0x4cc5d4becb3e42b6; u64 0x597f299cfc657e2a; u64 0x5fcb6fab3ad6faec; u64 0x6c44198c4a475817 ] in assert_norm (List.length l = 80); l let k384_512 = Seq.seq_of_list k384_512_l // H0 vectors, i.e. initial values of the accumulator [@"opaque_to_smt"] inline_for_extraction let h224_l: List.llist uint32 8 = [@inline_let] let l = [ u32 0xc1059ed8; u32 0x367cd507; u32 0x3070dd17; u32 0xf70e5939; u32 0xffc00b31; u32 0x68581511; u32 0x64f98fa7; u32 0xbefa4fa4 ] in assert_norm (List.length l = 8); l let h224 = Seq.seq_of_list h224_l [@"opaque_to_smt"] inline_for_extraction let h256_l: List.llist uint32 8 = [@inline_let] let l = [u32 0x6a09e667; u32 0xbb67ae85; u32 0x3c6ef372; u32 0xa54ff53a; u32 0x510e527f; u32 0x9b05688c; u32 0x1f83d9ab; u32 0x5be0cd19] in assert_norm (List.length l = 8); l let h256 = Seq.seq_of_list h256_l [@"opaque_to_smt"] inline_for_extraction let h384_l: List.llist uint64 8 = [@inline_let] let l = [ u64 0xcbbb9d5dc1059ed8; u64 0x629a292a367cd507; u64 0x9159015a3070dd17; u64 0x152fecd8f70e5939; u64 0x67332667ffc00b31; u64 0x8eb44a8768581511; u64 0xdb0c2e0d64f98fa7; u64 0x47b5481dbefa4fa4 ] in assert_norm (List.length l = 8); l let h384 = Seq.seq_of_list h384_l [@"opaque_to_smt"] inline_for_extraction let h512_l: List.llist uint64 8 = [@inline_let] let l = [ u64 0x6a09e667f3bcc908; u64 0xbb67ae8584caa73b; u64 0x3c6ef372fe94f82b; u64 0xa54ff53a5f1d36f1; u64 0x510e527fade682d1; u64 0x9b05688c2b3e6c1f; u64 0x1f83d9abfb41bd6b; u64 0x5be0cd19137e2179 ] in assert_norm (List.length l = 8); l
false
false
Spec.SHA2.Constants.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 100, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val h512 : s: FStar.Seq.Base.seq (Lib.IntTypes.int_t Lib.IntTypes.U64 Lib.IntTypes.SEC) {FStar.List.Tot.Base.length Spec.SHA2.Constants.h512_l = FStar.Seq.Base.length s}
[]
Spec.SHA2.Constants.h512
{ "file_name": "specs/Spec.SHA2.Constants.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
s: FStar.Seq.Base.seq (Lib.IntTypes.int_t Lib.IntTypes.U64 Lib.IntTypes.SEC) {FStar.List.Tot.Base.length Spec.SHA2.Constants.h512_l = FStar.Seq.Base.length s}
{ "end_col": 33, "end_line": 116, "start_col": 11, "start_line": 116 }
Prims.Tot
[ { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let k224_256 = Seq.seq_of_list k224_256_l
let k224_256 =
false
null
false
Seq.seq_of_list k224_256_l
{ "checked_file": "Spec.SHA2.Constants.fst.checked", "dependencies": [ "prims.fst.checked", "Lib.IntTypes.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.fst.checked" ], "interface_file": false, "source_file": "Spec.SHA2.Constants.fst" }
[ "total" ]
[ "FStar.Seq.Properties.seq_of_list", "Lib.IntTypes.int_t", "Lib.IntTypes.U32", "Lib.IntTypes.SEC", "Spec.SHA2.Constants.k224_256_l" ]
[]
module Spec.SHA2.Constants #set-options "--z3rlimit 100" open Lib.IntTypes // K shuffling vectors [@"opaque_to_smt"] inline_for_extraction let k224_256_l: List.llist uint32 64 = [@inline_let] let l = [u32 0x428a2f98; u32 0x71374491; u32 0xb5c0fbcf; u32 0xe9b5dba5; u32 0x3956c25b; u32 0x59f111f1; u32 0x923f82a4; u32 0xab1c5ed5; u32 0xd807aa98; u32 0x12835b01; u32 0x243185be; u32 0x550c7dc3; u32 0x72be5d74; u32 0x80deb1fe; u32 0x9bdc06a7; u32 0xc19bf174; u32 0xe49b69c1; u32 0xefbe4786; u32 0x0fc19dc6; u32 0x240ca1cc; u32 0x2de92c6f; u32 0x4a7484aa; u32 0x5cb0a9dc; u32 0x76f988da; u32 0x983e5152; u32 0xa831c66d; u32 0xb00327c8; u32 0xbf597fc7; u32 0xc6e00bf3; u32 0xd5a79147; u32 0x06ca6351; u32 0x14292967; u32 0x27b70a85; u32 0x2e1b2138; u32 0x4d2c6dfc; u32 0x53380d13; u32 0x650a7354; u32 0x766a0abb; u32 0x81c2c92e; u32 0x92722c85; u32 0xa2bfe8a1; u32 0xa81a664b; u32 0xc24b8b70; u32 0xc76c51a3; u32 0xd192e819; u32 0xd6990624; u32 0xf40e3585; u32 0x106aa070; u32 0x19a4c116; u32 0x1e376c08; u32 0x2748774c; u32 0x34b0bcb5; u32 0x391c0cb3; u32 0x4ed8aa4a; u32 0x5b9cca4f; u32 0x682e6ff3; u32 0x748f82ee; u32 0x78a5636f; u32 0x84c87814; u32 0x8cc70208; u32 0x90befffa; u32 0xa4506ceb; u32 0xbef9a3f7; u32 0xc67178f2] in assert_norm (List.length l = 64); l
false
false
Spec.SHA2.Constants.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 100, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val k224_256 : s: FStar.Seq.Base.seq (Lib.IntTypes.int_t Lib.IntTypes.U32 Lib.IntTypes.SEC) {FStar.List.Tot.Base.length Spec.SHA2.Constants.k224_256_l = FStar.Seq.Base.length s}
[]
Spec.SHA2.Constants.k224_256
{ "file_name": "specs/Spec.SHA2.Constants.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
s: FStar.Seq.Base.seq (Lib.IntTypes.int_t Lib.IntTypes.U32 Lib.IntTypes.SEC) {FStar.List.Tot.Base.length Spec.SHA2.Constants.k224_256_l = FStar.Seq.Base.length s}
{ "end_col": 41, "end_line": 31, "start_col": 15, "start_line": 31 }
Prims.Tot
val h256_l:List.llist uint32 8
[ { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let h256_l: List.llist uint32 8 = [@inline_let] let l = [u32 0x6a09e667; u32 0xbb67ae85; u32 0x3c6ef372; u32 0xa54ff53a; u32 0x510e527f; u32 0x9b05688c; u32 0x1f83d9ab; u32 0x5be0cd19] in assert_norm (List.length l = 8); l
val h256_l:List.llist uint32 8 let h256_l:List.llist uint32 8 =
false
null
false
[@@ inline_let ]let l = [ u32 0x6a09e667; u32 0xbb67ae85; u32 0x3c6ef372; u32 0xa54ff53a; u32 0x510e527f; u32 0x9b05688c; u32 0x1f83d9ab; u32 0x5be0cd19 ] in assert_norm (List.length l = 8); l
{ "checked_file": "Spec.SHA2.Constants.fst.checked", "dependencies": [ "prims.fst.checked", "Lib.IntTypes.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.fst.checked" ], "interface_file": false, "source_file": "Spec.SHA2.Constants.fst" }
[ "total" ]
[ "Prims.unit", "FStar.Pervasives.assert_norm", "Prims.b2t", "Prims.op_Equality", "Prims.int", "FStar.List.Tot.Base.length", "Lib.IntTypes.int_t", "Lib.IntTypes.U32", "Lib.IntTypes.SEC", "Prims.list", "Prims.Cons", "Lib.IntTypes.u32", "Prims.Nil" ]
[]
module Spec.SHA2.Constants #set-options "--z3rlimit 100" open Lib.IntTypes // K shuffling vectors [@"opaque_to_smt"] inline_for_extraction let k224_256_l: List.llist uint32 64 = [@inline_let] let l = [u32 0x428a2f98; u32 0x71374491; u32 0xb5c0fbcf; u32 0xe9b5dba5; u32 0x3956c25b; u32 0x59f111f1; u32 0x923f82a4; u32 0xab1c5ed5; u32 0xd807aa98; u32 0x12835b01; u32 0x243185be; u32 0x550c7dc3; u32 0x72be5d74; u32 0x80deb1fe; u32 0x9bdc06a7; u32 0xc19bf174; u32 0xe49b69c1; u32 0xefbe4786; u32 0x0fc19dc6; u32 0x240ca1cc; u32 0x2de92c6f; u32 0x4a7484aa; u32 0x5cb0a9dc; u32 0x76f988da; u32 0x983e5152; u32 0xa831c66d; u32 0xb00327c8; u32 0xbf597fc7; u32 0xc6e00bf3; u32 0xd5a79147; u32 0x06ca6351; u32 0x14292967; u32 0x27b70a85; u32 0x2e1b2138; u32 0x4d2c6dfc; u32 0x53380d13; u32 0x650a7354; u32 0x766a0abb; u32 0x81c2c92e; u32 0x92722c85; u32 0xa2bfe8a1; u32 0xa81a664b; u32 0xc24b8b70; u32 0xc76c51a3; u32 0xd192e819; u32 0xd6990624; u32 0xf40e3585; u32 0x106aa070; u32 0x19a4c116; u32 0x1e376c08; u32 0x2748774c; u32 0x34b0bcb5; u32 0x391c0cb3; u32 0x4ed8aa4a; u32 0x5b9cca4f; u32 0x682e6ff3; u32 0x748f82ee; u32 0x78a5636f; u32 0x84c87814; u32 0x8cc70208; u32 0x90befffa; u32 0xa4506ceb; u32 0xbef9a3f7; u32 0xc67178f2] in assert_norm (List.length l = 64); l let k224_256 = Seq.seq_of_list k224_256_l [@"opaque_to_smt"] inline_for_extraction let k384_512_l: List.llist uint64 80 = [@inline_let] let l = [u64 0x428a2f98d728ae22; u64 0x7137449123ef65cd; u64 0xb5c0fbcfec4d3b2f; u64 0xe9b5dba58189dbbc; u64 0x3956c25bf348b538; u64 0x59f111f1b605d019; u64 0x923f82a4af194f9b; u64 0xab1c5ed5da6d8118; u64 0xd807aa98a3030242; u64 0x12835b0145706fbe; u64 0x243185be4ee4b28c; u64 0x550c7dc3d5ffb4e2; u64 0x72be5d74f27b896f; u64 0x80deb1fe3b1696b1; u64 0x9bdc06a725c71235; u64 0xc19bf174cf692694; u64 0xe49b69c19ef14ad2; u64 0xefbe4786384f25e3; u64 0x0fc19dc68b8cd5b5; u64 0x240ca1cc77ac9c65; u64 0x2de92c6f592b0275; u64 0x4a7484aa6ea6e483; u64 0x5cb0a9dcbd41fbd4; u64 0x76f988da831153b5; u64 0x983e5152ee66dfab; u64 0xa831c66d2db43210; u64 0xb00327c898fb213f; u64 0xbf597fc7beef0ee4; u64 0xc6e00bf33da88fc2; u64 0xd5a79147930aa725; u64 0x06ca6351e003826f; u64 0x142929670a0e6e70; u64 0x27b70a8546d22ffc; u64 0x2e1b21385c26c926; u64 0x4d2c6dfc5ac42aed; u64 0x53380d139d95b3df; u64 0x650a73548baf63de; u64 0x766a0abb3c77b2a8; u64 0x81c2c92e47edaee6; u64 0x92722c851482353b; u64 0xa2bfe8a14cf10364; u64 0xa81a664bbc423001; u64 0xc24b8b70d0f89791; u64 0xc76c51a30654be30; u64 0xd192e819d6ef5218; u64 0xd69906245565a910; u64 0xf40e35855771202a; u64 0x106aa07032bbd1b8; u64 0x19a4c116b8d2d0c8; u64 0x1e376c085141ab53; u64 0x2748774cdf8eeb99; u64 0x34b0bcb5e19b48a8; u64 0x391c0cb3c5c95a63; u64 0x4ed8aa4ae3418acb; u64 0x5b9cca4f7763e373; u64 0x682e6ff3d6b2b8a3; u64 0x748f82ee5defb2fc; u64 0x78a5636f43172f60; u64 0x84c87814a1f0ab72; u64 0x8cc702081a6439ec; u64 0x90befffa23631e28; u64 0xa4506cebde82bde9; u64 0xbef9a3f7b2c67915; u64 0xc67178f2e372532b; u64 0xca273eceea26619c; u64 0xd186b8c721c0c207; u64 0xeada7dd6cde0eb1e; u64 0xf57d4f7fee6ed178; u64 0x06f067aa72176fba; u64 0x0a637dc5a2c898a6; u64 0x113f9804bef90dae; u64 0x1b710b35131c471b; u64 0x28db77f523047d84; u64 0x32caab7b40c72493; u64 0x3c9ebe0a15c9bebc; u64 0x431d67c49c100d4c; u64 0x4cc5d4becb3e42b6; u64 0x597f299cfc657e2a; u64 0x5fcb6fab3ad6faec; u64 0x6c44198c4a475817 ] in assert_norm (List.length l = 80); l let k384_512 = Seq.seq_of_list k384_512_l // H0 vectors, i.e. initial values of the accumulator [@"opaque_to_smt"] inline_for_extraction let h224_l: List.llist uint32 8 = [@inline_let] let l = [ u32 0xc1059ed8; u32 0x367cd507; u32 0x3070dd17; u32 0xf70e5939; u32 0xffc00b31; u32 0x68581511; u32 0x64f98fa7; u32 0xbefa4fa4 ] in assert_norm (List.length l = 8); l let h224 = Seq.seq_of_list h224_l [@"opaque_to_smt"] inline_for_extraction
false
false
Spec.SHA2.Constants.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 100, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val h256_l:List.llist uint32 8
[]
Spec.SHA2.Constants.h256_l
{ "file_name": "specs/Spec.SHA2.Constants.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
FStar.List.Tot.Properties.llist (Lib.IntTypes.int_t Lib.IntTypes.U32 Lib.IntTypes.SEC) 8
{ "end_col": 3, "end_line": 88, "start_col": 2, "start_line": 82 }
Prims.Tot
val h224_l:List.llist uint32 8
[ { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let h224_l: List.llist uint32 8 = [@inline_let] let l = [ u32 0xc1059ed8; u32 0x367cd507; u32 0x3070dd17; u32 0xf70e5939; u32 0xffc00b31; u32 0x68581511; u32 0x64f98fa7; u32 0xbefa4fa4 ] in assert_norm (List.length l = 8); l
val h224_l:List.llist uint32 8 let h224_l:List.llist uint32 8 =
false
null
false
[@@ inline_let ]let l = [ u32 0xc1059ed8; u32 0x367cd507; u32 0x3070dd17; u32 0xf70e5939; u32 0xffc00b31; u32 0x68581511; u32 0x64f98fa7; u32 0xbefa4fa4 ] in assert_norm (List.length l = 8); l
{ "checked_file": "Spec.SHA2.Constants.fst.checked", "dependencies": [ "prims.fst.checked", "Lib.IntTypes.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.fst.checked" ], "interface_file": false, "source_file": "Spec.SHA2.Constants.fst" }
[ "total" ]
[ "Prims.unit", "FStar.Pervasives.assert_norm", "Prims.b2t", "Prims.op_Equality", "Prims.int", "FStar.List.Tot.Base.length", "Lib.IntTypes.int_t", "Lib.IntTypes.U32", "Lib.IntTypes.SEC", "Prims.list", "Prims.Cons", "Lib.IntTypes.u32", "Prims.Nil" ]
[]
module Spec.SHA2.Constants #set-options "--z3rlimit 100" open Lib.IntTypes // K shuffling vectors [@"opaque_to_smt"] inline_for_extraction let k224_256_l: List.llist uint32 64 = [@inline_let] let l = [u32 0x428a2f98; u32 0x71374491; u32 0xb5c0fbcf; u32 0xe9b5dba5; u32 0x3956c25b; u32 0x59f111f1; u32 0x923f82a4; u32 0xab1c5ed5; u32 0xd807aa98; u32 0x12835b01; u32 0x243185be; u32 0x550c7dc3; u32 0x72be5d74; u32 0x80deb1fe; u32 0x9bdc06a7; u32 0xc19bf174; u32 0xe49b69c1; u32 0xefbe4786; u32 0x0fc19dc6; u32 0x240ca1cc; u32 0x2de92c6f; u32 0x4a7484aa; u32 0x5cb0a9dc; u32 0x76f988da; u32 0x983e5152; u32 0xa831c66d; u32 0xb00327c8; u32 0xbf597fc7; u32 0xc6e00bf3; u32 0xd5a79147; u32 0x06ca6351; u32 0x14292967; u32 0x27b70a85; u32 0x2e1b2138; u32 0x4d2c6dfc; u32 0x53380d13; u32 0x650a7354; u32 0x766a0abb; u32 0x81c2c92e; u32 0x92722c85; u32 0xa2bfe8a1; u32 0xa81a664b; u32 0xc24b8b70; u32 0xc76c51a3; u32 0xd192e819; u32 0xd6990624; u32 0xf40e3585; u32 0x106aa070; u32 0x19a4c116; u32 0x1e376c08; u32 0x2748774c; u32 0x34b0bcb5; u32 0x391c0cb3; u32 0x4ed8aa4a; u32 0x5b9cca4f; u32 0x682e6ff3; u32 0x748f82ee; u32 0x78a5636f; u32 0x84c87814; u32 0x8cc70208; u32 0x90befffa; u32 0xa4506ceb; u32 0xbef9a3f7; u32 0xc67178f2] in assert_norm (List.length l = 64); l let k224_256 = Seq.seq_of_list k224_256_l [@"opaque_to_smt"] inline_for_extraction let k384_512_l: List.llist uint64 80 = [@inline_let] let l = [u64 0x428a2f98d728ae22; u64 0x7137449123ef65cd; u64 0xb5c0fbcfec4d3b2f; u64 0xe9b5dba58189dbbc; u64 0x3956c25bf348b538; u64 0x59f111f1b605d019; u64 0x923f82a4af194f9b; u64 0xab1c5ed5da6d8118; u64 0xd807aa98a3030242; u64 0x12835b0145706fbe; u64 0x243185be4ee4b28c; u64 0x550c7dc3d5ffb4e2; u64 0x72be5d74f27b896f; u64 0x80deb1fe3b1696b1; u64 0x9bdc06a725c71235; u64 0xc19bf174cf692694; u64 0xe49b69c19ef14ad2; u64 0xefbe4786384f25e3; u64 0x0fc19dc68b8cd5b5; u64 0x240ca1cc77ac9c65; u64 0x2de92c6f592b0275; u64 0x4a7484aa6ea6e483; u64 0x5cb0a9dcbd41fbd4; u64 0x76f988da831153b5; u64 0x983e5152ee66dfab; u64 0xa831c66d2db43210; u64 0xb00327c898fb213f; u64 0xbf597fc7beef0ee4; u64 0xc6e00bf33da88fc2; u64 0xd5a79147930aa725; u64 0x06ca6351e003826f; u64 0x142929670a0e6e70; u64 0x27b70a8546d22ffc; u64 0x2e1b21385c26c926; u64 0x4d2c6dfc5ac42aed; u64 0x53380d139d95b3df; u64 0x650a73548baf63de; u64 0x766a0abb3c77b2a8; u64 0x81c2c92e47edaee6; u64 0x92722c851482353b; u64 0xa2bfe8a14cf10364; u64 0xa81a664bbc423001; u64 0xc24b8b70d0f89791; u64 0xc76c51a30654be30; u64 0xd192e819d6ef5218; u64 0xd69906245565a910; u64 0xf40e35855771202a; u64 0x106aa07032bbd1b8; u64 0x19a4c116b8d2d0c8; u64 0x1e376c085141ab53; u64 0x2748774cdf8eeb99; u64 0x34b0bcb5e19b48a8; u64 0x391c0cb3c5c95a63; u64 0x4ed8aa4ae3418acb; u64 0x5b9cca4f7763e373; u64 0x682e6ff3d6b2b8a3; u64 0x748f82ee5defb2fc; u64 0x78a5636f43172f60; u64 0x84c87814a1f0ab72; u64 0x8cc702081a6439ec; u64 0x90befffa23631e28; u64 0xa4506cebde82bde9; u64 0xbef9a3f7b2c67915; u64 0xc67178f2e372532b; u64 0xca273eceea26619c; u64 0xd186b8c721c0c207; u64 0xeada7dd6cde0eb1e; u64 0xf57d4f7fee6ed178; u64 0x06f067aa72176fba; u64 0x0a637dc5a2c898a6; u64 0x113f9804bef90dae; u64 0x1b710b35131c471b; u64 0x28db77f523047d84; u64 0x32caab7b40c72493; u64 0x3c9ebe0a15c9bebc; u64 0x431d67c49c100d4c; u64 0x4cc5d4becb3e42b6; u64 0x597f299cfc657e2a; u64 0x5fcb6fab3ad6faec; u64 0x6c44198c4a475817 ] in assert_norm (List.length l = 80); l let k384_512 = Seq.seq_of_list k384_512_l // H0 vectors, i.e. initial values of the accumulator [@"opaque_to_smt"] inline_for_extraction
false
false
Spec.SHA2.Constants.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 100, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val h224_l:List.llist uint32 8
[]
Spec.SHA2.Constants.h224_l
{ "file_name": "specs/Spec.SHA2.Constants.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
FStar.List.Tot.Properties.llist (Lib.IntTypes.int_t Lib.IntTypes.U32 Lib.IntTypes.SEC) 8
{ "end_col": 3, "end_line": 75, "start_col": 2, "start_line": 69 }
Prims.Tot
val h512_l:List.llist uint64 8
[ { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let h512_l: List.llist uint64 8 = [@inline_let] let l = [ u64 0x6a09e667f3bcc908; u64 0xbb67ae8584caa73b; u64 0x3c6ef372fe94f82b; u64 0xa54ff53a5f1d36f1; u64 0x510e527fade682d1; u64 0x9b05688c2b3e6c1f; u64 0x1f83d9abfb41bd6b; u64 0x5be0cd19137e2179 ] in assert_norm (List.length l = 8); l
val h512_l:List.llist uint64 8 let h512_l:List.llist uint64 8 =
false
null
false
[@@ inline_let ]let l = [ u64 0x6a09e667f3bcc908; u64 0xbb67ae8584caa73b; u64 0x3c6ef372fe94f82b; u64 0xa54ff53a5f1d36f1; u64 0x510e527fade682d1; u64 0x9b05688c2b3e6c1f; u64 0x1f83d9abfb41bd6b; u64 0x5be0cd19137e2179 ] in assert_norm (List.length l = 8); l
{ "checked_file": "Spec.SHA2.Constants.fst.checked", "dependencies": [ "prims.fst.checked", "Lib.IntTypes.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.fst.checked" ], "interface_file": false, "source_file": "Spec.SHA2.Constants.fst" }
[ "total" ]
[ "Prims.unit", "FStar.Pervasives.assert_norm", "Prims.b2t", "Prims.op_Equality", "Prims.int", "FStar.List.Tot.Base.length", "Lib.IntTypes.int_t", "Lib.IntTypes.U64", "Lib.IntTypes.SEC", "Prims.list", "Prims.Cons", "Lib.IntTypes.u64", "Prims.Nil" ]
[]
module Spec.SHA2.Constants #set-options "--z3rlimit 100" open Lib.IntTypes // K shuffling vectors [@"opaque_to_smt"] inline_for_extraction let k224_256_l: List.llist uint32 64 = [@inline_let] let l = [u32 0x428a2f98; u32 0x71374491; u32 0xb5c0fbcf; u32 0xe9b5dba5; u32 0x3956c25b; u32 0x59f111f1; u32 0x923f82a4; u32 0xab1c5ed5; u32 0xd807aa98; u32 0x12835b01; u32 0x243185be; u32 0x550c7dc3; u32 0x72be5d74; u32 0x80deb1fe; u32 0x9bdc06a7; u32 0xc19bf174; u32 0xe49b69c1; u32 0xefbe4786; u32 0x0fc19dc6; u32 0x240ca1cc; u32 0x2de92c6f; u32 0x4a7484aa; u32 0x5cb0a9dc; u32 0x76f988da; u32 0x983e5152; u32 0xa831c66d; u32 0xb00327c8; u32 0xbf597fc7; u32 0xc6e00bf3; u32 0xd5a79147; u32 0x06ca6351; u32 0x14292967; u32 0x27b70a85; u32 0x2e1b2138; u32 0x4d2c6dfc; u32 0x53380d13; u32 0x650a7354; u32 0x766a0abb; u32 0x81c2c92e; u32 0x92722c85; u32 0xa2bfe8a1; u32 0xa81a664b; u32 0xc24b8b70; u32 0xc76c51a3; u32 0xd192e819; u32 0xd6990624; u32 0xf40e3585; u32 0x106aa070; u32 0x19a4c116; u32 0x1e376c08; u32 0x2748774c; u32 0x34b0bcb5; u32 0x391c0cb3; u32 0x4ed8aa4a; u32 0x5b9cca4f; u32 0x682e6ff3; u32 0x748f82ee; u32 0x78a5636f; u32 0x84c87814; u32 0x8cc70208; u32 0x90befffa; u32 0xa4506ceb; u32 0xbef9a3f7; u32 0xc67178f2] in assert_norm (List.length l = 64); l let k224_256 = Seq.seq_of_list k224_256_l [@"opaque_to_smt"] inline_for_extraction let k384_512_l: List.llist uint64 80 = [@inline_let] let l = [u64 0x428a2f98d728ae22; u64 0x7137449123ef65cd; u64 0xb5c0fbcfec4d3b2f; u64 0xe9b5dba58189dbbc; u64 0x3956c25bf348b538; u64 0x59f111f1b605d019; u64 0x923f82a4af194f9b; u64 0xab1c5ed5da6d8118; u64 0xd807aa98a3030242; u64 0x12835b0145706fbe; u64 0x243185be4ee4b28c; u64 0x550c7dc3d5ffb4e2; u64 0x72be5d74f27b896f; u64 0x80deb1fe3b1696b1; u64 0x9bdc06a725c71235; u64 0xc19bf174cf692694; u64 0xe49b69c19ef14ad2; u64 0xefbe4786384f25e3; u64 0x0fc19dc68b8cd5b5; u64 0x240ca1cc77ac9c65; u64 0x2de92c6f592b0275; u64 0x4a7484aa6ea6e483; u64 0x5cb0a9dcbd41fbd4; u64 0x76f988da831153b5; u64 0x983e5152ee66dfab; u64 0xa831c66d2db43210; u64 0xb00327c898fb213f; u64 0xbf597fc7beef0ee4; u64 0xc6e00bf33da88fc2; u64 0xd5a79147930aa725; u64 0x06ca6351e003826f; u64 0x142929670a0e6e70; u64 0x27b70a8546d22ffc; u64 0x2e1b21385c26c926; u64 0x4d2c6dfc5ac42aed; u64 0x53380d139d95b3df; u64 0x650a73548baf63de; u64 0x766a0abb3c77b2a8; u64 0x81c2c92e47edaee6; u64 0x92722c851482353b; u64 0xa2bfe8a14cf10364; u64 0xa81a664bbc423001; u64 0xc24b8b70d0f89791; u64 0xc76c51a30654be30; u64 0xd192e819d6ef5218; u64 0xd69906245565a910; u64 0xf40e35855771202a; u64 0x106aa07032bbd1b8; u64 0x19a4c116b8d2d0c8; u64 0x1e376c085141ab53; u64 0x2748774cdf8eeb99; u64 0x34b0bcb5e19b48a8; u64 0x391c0cb3c5c95a63; u64 0x4ed8aa4ae3418acb; u64 0x5b9cca4f7763e373; u64 0x682e6ff3d6b2b8a3; u64 0x748f82ee5defb2fc; u64 0x78a5636f43172f60; u64 0x84c87814a1f0ab72; u64 0x8cc702081a6439ec; u64 0x90befffa23631e28; u64 0xa4506cebde82bde9; u64 0xbef9a3f7b2c67915; u64 0xc67178f2e372532b; u64 0xca273eceea26619c; u64 0xd186b8c721c0c207; u64 0xeada7dd6cde0eb1e; u64 0xf57d4f7fee6ed178; u64 0x06f067aa72176fba; u64 0x0a637dc5a2c898a6; u64 0x113f9804bef90dae; u64 0x1b710b35131c471b; u64 0x28db77f523047d84; u64 0x32caab7b40c72493; u64 0x3c9ebe0a15c9bebc; u64 0x431d67c49c100d4c; u64 0x4cc5d4becb3e42b6; u64 0x597f299cfc657e2a; u64 0x5fcb6fab3ad6faec; u64 0x6c44198c4a475817 ] in assert_norm (List.length l = 80); l let k384_512 = Seq.seq_of_list k384_512_l // H0 vectors, i.e. initial values of the accumulator [@"opaque_to_smt"] inline_for_extraction let h224_l: List.llist uint32 8 = [@inline_let] let l = [ u32 0xc1059ed8; u32 0x367cd507; u32 0x3070dd17; u32 0xf70e5939; u32 0xffc00b31; u32 0x68581511; u32 0x64f98fa7; u32 0xbefa4fa4 ] in assert_norm (List.length l = 8); l let h224 = Seq.seq_of_list h224_l [@"opaque_to_smt"] inline_for_extraction let h256_l: List.llist uint32 8 = [@inline_let] let l = [u32 0x6a09e667; u32 0xbb67ae85; u32 0x3c6ef372; u32 0xa54ff53a; u32 0x510e527f; u32 0x9b05688c; u32 0x1f83d9ab; u32 0x5be0cd19] in assert_norm (List.length l = 8); l let h256 = Seq.seq_of_list h256_l [@"opaque_to_smt"] inline_for_extraction let h384_l: List.llist uint64 8 = [@inline_let] let l = [ u64 0xcbbb9d5dc1059ed8; u64 0x629a292a367cd507; u64 0x9159015a3070dd17; u64 0x152fecd8f70e5939; u64 0x67332667ffc00b31; u64 0x8eb44a8768581511; u64 0xdb0c2e0d64f98fa7; u64 0x47b5481dbefa4fa4 ] in assert_norm (List.length l = 8); l let h384 = Seq.seq_of_list h384_l [@"opaque_to_smt"] inline_for_extraction
false
false
Spec.SHA2.Constants.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 100, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val h512_l:List.llist uint64 8
[]
Spec.SHA2.Constants.h512_l
{ "file_name": "specs/Spec.SHA2.Constants.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
FStar.List.Tot.Properties.llist (Lib.IntTypes.int_t Lib.IntTypes.U64 Lib.IntTypes.SEC) 8
{ "end_col": 3, "end_line": 114, "start_col": 2, "start_line": 108 }
Prims.Tot
val h384_l:List.llist uint64 8
[ { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let h384_l: List.llist uint64 8 = [@inline_let] let l = [ u64 0xcbbb9d5dc1059ed8; u64 0x629a292a367cd507; u64 0x9159015a3070dd17; u64 0x152fecd8f70e5939; u64 0x67332667ffc00b31; u64 0x8eb44a8768581511; u64 0xdb0c2e0d64f98fa7; u64 0x47b5481dbefa4fa4 ] in assert_norm (List.length l = 8); l
val h384_l:List.llist uint64 8 let h384_l:List.llist uint64 8 =
false
null
false
[@@ inline_let ]let l = [ u64 0xcbbb9d5dc1059ed8; u64 0x629a292a367cd507; u64 0x9159015a3070dd17; u64 0x152fecd8f70e5939; u64 0x67332667ffc00b31; u64 0x8eb44a8768581511; u64 0xdb0c2e0d64f98fa7; u64 0x47b5481dbefa4fa4 ] in assert_norm (List.length l = 8); l
{ "checked_file": "Spec.SHA2.Constants.fst.checked", "dependencies": [ "prims.fst.checked", "Lib.IntTypes.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.fst.checked" ], "interface_file": false, "source_file": "Spec.SHA2.Constants.fst" }
[ "total" ]
[ "Prims.unit", "FStar.Pervasives.assert_norm", "Prims.b2t", "Prims.op_Equality", "Prims.int", "FStar.List.Tot.Base.length", "Lib.IntTypes.int_t", "Lib.IntTypes.U64", "Lib.IntTypes.SEC", "Prims.list", "Prims.Cons", "Lib.IntTypes.u64", "Prims.Nil" ]
[]
module Spec.SHA2.Constants #set-options "--z3rlimit 100" open Lib.IntTypes // K shuffling vectors [@"opaque_to_smt"] inline_for_extraction let k224_256_l: List.llist uint32 64 = [@inline_let] let l = [u32 0x428a2f98; u32 0x71374491; u32 0xb5c0fbcf; u32 0xe9b5dba5; u32 0x3956c25b; u32 0x59f111f1; u32 0x923f82a4; u32 0xab1c5ed5; u32 0xd807aa98; u32 0x12835b01; u32 0x243185be; u32 0x550c7dc3; u32 0x72be5d74; u32 0x80deb1fe; u32 0x9bdc06a7; u32 0xc19bf174; u32 0xe49b69c1; u32 0xefbe4786; u32 0x0fc19dc6; u32 0x240ca1cc; u32 0x2de92c6f; u32 0x4a7484aa; u32 0x5cb0a9dc; u32 0x76f988da; u32 0x983e5152; u32 0xa831c66d; u32 0xb00327c8; u32 0xbf597fc7; u32 0xc6e00bf3; u32 0xd5a79147; u32 0x06ca6351; u32 0x14292967; u32 0x27b70a85; u32 0x2e1b2138; u32 0x4d2c6dfc; u32 0x53380d13; u32 0x650a7354; u32 0x766a0abb; u32 0x81c2c92e; u32 0x92722c85; u32 0xa2bfe8a1; u32 0xa81a664b; u32 0xc24b8b70; u32 0xc76c51a3; u32 0xd192e819; u32 0xd6990624; u32 0xf40e3585; u32 0x106aa070; u32 0x19a4c116; u32 0x1e376c08; u32 0x2748774c; u32 0x34b0bcb5; u32 0x391c0cb3; u32 0x4ed8aa4a; u32 0x5b9cca4f; u32 0x682e6ff3; u32 0x748f82ee; u32 0x78a5636f; u32 0x84c87814; u32 0x8cc70208; u32 0x90befffa; u32 0xa4506ceb; u32 0xbef9a3f7; u32 0xc67178f2] in assert_norm (List.length l = 64); l let k224_256 = Seq.seq_of_list k224_256_l [@"opaque_to_smt"] inline_for_extraction let k384_512_l: List.llist uint64 80 = [@inline_let] let l = [u64 0x428a2f98d728ae22; u64 0x7137449123ef65cd; u64 0xb5c0fbcfec4d3b2f; u64 0xe9b5dba58189dbbc; u64 0x3956c25bf348b538; u64 0x59f111f1b605d019; u64 0x923f82a4af194f9b; u64 0xab1c5ed5da6d8118; u64 0xd807aa98a3030242; u64 0x12835b0145706fbe; u64 0x243185be4ee4b28c; u64 0x550c7dc3d5ffb4e2; u64 0x72be5d74f27b896f; u64 0x80deb1fe3b1696b1; u64 0x9bdc06a725c71235; u64 0xc19bf174cf692694; u64 0xe49b69c19ef14ad2; u64 0xefbe4786384f25e3; u64 0x0fc19dc68b8cd5b5; u64 0x240ca1cc77ac9c65; u64 0x2de92c6f592b0275; u64 0x4a7484aa6ea6e483; u64 0x5cb0a9dcbd41fbd4; u64 0x76f988da831153b5; u64 0x983e5152ee66dfab; u64 0xa831c66d2db43210; u64 0xb00327c898fb213f; u64 0xbf597fc7beef0ee4; u64 0xc6e00bf33da88fc2; u64 0xd5a79147930aa725; u64 0x06ca6351e003826f; u64 0x142929670a0e6e70; u64 0x27b70a8546d22ffc; u64 0x2e1b21385c26c926; u64 0x4d2c6dfc5ac42aed; u64 0x53380d139d95b3df; u64 0x650a73548baf63de; u64 0x766a0abb3c77b2a8; u64 0x81c2c92e47edaee6; u64 0x92722c851482353b; u64 0xa2bfe8a14cf10364; u64 0xa81a664bbc423001; u64 0xc24b8b70d0f89791; u64 0xc76c51a30654be30; u64 0xd192e819d6ef5218; u64 0xd69906245565a910; u64 0xf40e35855771202a; u64 0x106aa07032bbd1b8; u64 0x19a4c116b8d2d0c8; u64 0x1e376c085141ab53; u64 0x2748774cdf8eeb99; u64 0x34b0bcb5e19b48a8; u64 0x391c0cb3c5c95a63; u64 0x4ed8aa4ae3418acb; u64 0x5b9cca4f7763e373; u64 0x682e6ff3d6b2b8a3; u64 0x748f82ee5defb2fc; u64 0x78a5636f43172f60; u64 0x84c87814a1f0ab72; u64 0x8cc702081a6439ec; u64 0x90befffa23631e28; u64 0xa4506cebde82bde9; u64 0xbef9a3f7b2c67915; u64 0xc67178f2e372532b; u64 0xca273eceea26619c; u64 0xd186b8c721c0c207; u64 0xeada7dd6cde0eb1e; u64 0xf57d4f7fee6ed178; u64 0x06f067aa72176fba; u64 0x0a637dc5a2c898a6; u64 0x113f9804bef90dae; u64 0x1b710b35131c471b; u64 0x28db77f523047d84; u64 0x32caab7b40c72493; u64 0x3c9ebe0a15c9bebc; u64 0x431d67c49c100d4c; u64 0x4cc5d4becb3e42b6; u64 0x597f299cfc657e2a; u64 0x5fcb6fab3ad6faec; u64 0x6c44198c4a475817 ] in assert_norm (List.length l = 80); l let k384_512 = Seq.seq_of_list k384_512_l // H0 vectors, i.e. initial values of the accumulator [@"opaque_to_smt"] inline_for_extraction let h224_l: List.llist uint32 8 = [@inline_let] let l = [ u32 0xc1059ed8; u32 0x367cd507; u32 0x3070dd17; u32 0xf70e5939; u32 0xffc00b31; u32 0x68581511; u32 0x64f98fa7; u32 0xbefa4fa4 ] in assert_norm (List.length l = 8); l let h224 = Seq.seq_of_list h224_l [@"opaque_to_smt"] inline_for_extraction let h256_l: List.llist uint32 8 = [@inline_let] let l = [u32 0x6a09e667; u32 0xbb67ae85; u32 0x3c6ef372; u32 0xa54ff53a; u32 0x510e527f; u32 0x9b05688c; u32 0x1f83d9ab; u32 0x5be0cd19] in assert_norm (List.length l = 8); l let h256 = Seq.seq_of_list h256_l [@"opaque_to_smt"] inline_for_extraction
false
false
Spec.SHA2.Constants.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 100, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val h384_l:List.llist uint64 8
[]
Spec.SHA2.Constants.h384_l
{ "file_name": "specs/Spec.SHA2.Constants.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
FStar.List.Tot.Properties.llist (Lib.IntTypes.int_t Lib.IntTypes.U64 Lib.IntTypes.SEC) 8
{ "end_col": 3, "end_line": 101, "start_col": 2, "start_line": 95 }
Prims.Tot
val k224_256_l:List.llist uint32 64
[ { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let k224_256_l: List.llist uint32 64 = [@inline_let] let l = [u32 0x428a2f98; u32 0x71374491; u32 0xb5c0fbcf; u32 0xe9b5dba5; u32 0x3956c25b; u32 0x59f111f1; u32 0x923f82a4; u32 0xab1c5ed5; u32 0xd807aa98; u32 0x12835b01; u32 0x243185be; u32 0x550c7dc3; u32 0x72be5d74; u32 0x80deb1fe; u32 0x9bdc06a7; u32 0xc19bf174; u32 0xe49b69c1; u32 0xefbe4786; u32 0x0fc19dc6; u32 0x240ca1cc; u32 0x2de92c6f; u32 0x4a7484aa; u32 0x5cb0a9dc; u32 0x76f988da; u32 0x983e5152; u32 0xa831c66d; u32 0xb00327c8; u32 0xbf597fc7; u32 0xc6e00bf3; u32 0xd5a79147; u32 0x06ca6351; u32 0x14292967; u32 0x27b70a85; u32 0x2e1b2138; u32 0x4d2c6dfc; u32 0x53380d13; u32 0x650a7354; u32 0x766a0abb; u32 0x81c2c92e; u32 0x92722c85; u32 0xa2bfe8a1; u32 0xa81a664b; u32 0xc24b8b70; u32 0xc76c51a3; u32 0xd192e819; u32 0xd6990624; u32 0xf40e3585; u32 0x106aa070; u32 0x19a4c116; u32 0x1e376c08; u32 0x2748774c; u32 0x34b0bcb5; u32 0x391c0cb3; u32 0x4ed8aa4a; u32 0x5b9cca4f; u32 0x682e6ff3; u32 0x748f82ee; u32 0x78a5636f; u32 0x84c87814; u32 0x8cc70208; u32 0x90befffa; u32 0xa4506ceb; u32 0xbef9a3f7; u32 0xc67178f2] in assert_norm (List.length l = 64); l
val k224_256_l:List.llist uint32 64 let k224_256_l:List.llist uint32 64 =
false
null
false
[@@ inline_let ]let l = [ u32 0x428a2f98; u32 0x71374491; u32 0xb5c0fbcf; u32 0xe9b5dba5; u32 0x3956c25b; u32 0x59f111f1; u32 0x923f82a4; u32 0xab1c5ed5; u32 0xd807aa98; u32 0x12835b01; u32 0x243185be; u32 0x550c7dc3; u32 0x72be5d74; u32 0x80deb1fe; u32 0x9bdc06a7; u32 0xc19bf174; u32 0xe49b69c1; u32 0xefbe4786; u32 0x0fc19dc6; u32 0x240ca1cc; u32 0x2de92c6f; u32 0x4a7484aa; u32 0x5cb0a9dc; u32 0x76f988da; u32 0x983e5152; u32 0xa831c66d; u32 0xb00327c8; u32 0xbf597fc7; u32 0xc6e00bf3; u32 0xd5a79147; u32 0x06ca6351; u32 0x14292967; u32 0x27b70a85; u32 0x2e1b2138; u32 0x4d2c6dfc; u32 0x53380d13; u32 0x650a7354; u32 0x766a0abb; u32 0x81c2c92e; u32 0x92722c85; u32 0xa2bfe8a1; u32 0xa81a664b; u32 0xc24b8b70; u32 0xc76c51a3; u32 0xd192e819; u32 0xd6990624; u32 0xf40e3585; u32 0x106aa070; u32 0x19a4c116; u32 0x1e376c08; u32 0x2748774c; u32 0x34b0bcb5; u32 0x391c0cb3; u32 0x4ed8aa4a; u32 0x5b9cca4f; u32 0x682e6ff3; u32 0x748f82ee; u32 0x78a5636f; u32 0x84c87814; u32 0x8cc70208; u32 0x90befffa; u32 0xa4506ceb; u32 0xbef9a3f7; u32 0xc67178f2 ] in assert_norm (List.length l = 64); l
{ "checked_file": "Spec.SHA2.Constants.fst.checked", "dependencies": [ "prims.fst.checked", "Lib.IntTypes.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.fst.checked" ], "interface_file": false, "source_file": "Spec.SHA2.Constants.fst" }
[ "total" ]
[ "Prims.unit", "FStar.Pervasives.assert_norm", "Prims.b2t", "Prims.op_Equality", "Prims.int", "FStar.List.Tot.Base.length", "Lib.IntTypes.int_t", "Lib.IntTypes.U32", "Lib.IntTypes.SEC", "Prims.list", "Prims.Cons", "Lib.IntTypes.u32", "Prims.Nil" ]
[]
module Spec.SHA2.Constants #set-options "--z3rlimit 100" open Lib.IntTypes // K shuffling vectors [@"opaque_to_smt"] inline_for_extraction
false
false
Spec.SHA2.Constants.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 100, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val k224_256_l:List.llist uint32 64
[]
Spec.SHA2.Constants.k224_256_l
{ "file_name": "specs/Spec.SHA2.Constants.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
FStar.List.Tot.Properties.llist (Lib.IntTypes.int_t Lib.IntTypes.U32 Lib.IntTypes.SEC) 64
{ "end_col": 3, "end_line": 29, "start_col": 2, "start_line": 10 }
Prims.Tot
val k384_512_l:List.llist uint64 80
[ { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let k384_512_l: List.llist uint64 80 = [@inline_let] let l = [u64 0x428a2f98d728ae22; u64 0x7137449123ef65cd; u64 0xb5c0fbcfec4d3b2f; u64 0xe9b5dba58189dbbc; u64 0x3956c25bf348b538; u64 0x59f111f1b605d019; u64 0x923f82a4af194f9b; u64 0xab1c5ed5da6d8118; u64 0xd807aa98a3030242; u64 0x12835b0145706fbe; u64 0x243185be4ee4b28c; u64 0x550c7dc3d5ffb4e2; u64 0x72be5d74f27b896f; u64 0x80deb1fe3b1696b1; u64 0x9bdc06a725c71235; u64 0xc19bf174cf692694; u64 0xe49b69c19ef14ad2; u64 0xefbe4786384f25e3; u64 0x0fc19dc68b8cd5b5; u64 0x240ca1cc77ac9c65; u64 0x2de92c6f592b0275; u64 0x4a7484aa6ea6e483; u64 0x5cb0a9dcbd41fbd4; u64 0x76f988da831153b5; u64 0x983e5152ee66dfab; u64 0xa831c66d2db43210; u64 0xb00327c898fb213f; u64 0xbf597fc7beef0ee4; u64 0xc6e00bf33da88fc2; u64 0xd5a79147930aa725; u64 0x06ca6351e003826f; u64 0x142929670a0e6e70; u64 0x27b70a8546d22ffc; u64 0x2e1b21385c26c926; u64 0x4d2c6dfc5ac42aed; u64 0x53380d139d95b3df; u64 0x650a73548baf63de; u64 0x766a0abb3c77b2a8; u64 0x81c2c92e47edaee6; u64 0x92722c851482353b; u64 0xa2bfe8a14cf10364; u64 0xa81a664bbc423001; u64 0xc24b8b70d0f89791; u64 0xc76c51a30654be30; u64 0xd192e819d6ef5218; u64 0xd69906245565a910; u64 0xf40e35855771202a; u64 0x106aa07032bbd1b8; u64 0x19a4c116b8d2d0c8; u64 0x1e376c085141ab53; u64 0x2748774cdf8eeb99; u64 0x34b0bcb5e19b48a8; u64 0x391c0cb3c5c95a63; u64 0x4ed8aa4ae3418acb; u64 0x5b9cca4f7763e373; u64 0x682e6ff3d6b2b8a3; u64 0x748f82ee5defb2fc; u64 0x78a5636f43172f60; u64 0x84c87814a1f0ab72; u64 0x8cc702081a6439ec; u64 0x90befffa23631e28; u64 0xa4506cebde82bde9; u64 0xbef9a3f7b2c67915; u64 0xc67178f2e372532b; u64 0xca273eceea26619c; u64 0xd186b8c721c0c207; u64 0xeada7dd6cde0eb1e; u64 0xf57d4f7fee6ed178; u64 0x06f067aa72176fba; u64 0x0a637dc5a2c898a6; u64 0x113f9804bef90dae; u64 0x1b710b35131c471b; u64 0x28db77f523047d84; u64 0x32caab7b40c72493; u64 0x3c9ebe0a15c9bebc; u64 0x431d67c49c100d4c; u64 0x4cc5d4becb3e42b6; u64 0x597f299cfc657e2a; u64 0x5fcb6fab3ad6faec; u64 0x6c44198c4a475817 ] in assert_norm (List.length l = 80); l
val k384_512_l:List.llist uint64 80 let k384_512_l:List.llist uint64 80 =
false
null
false
[@@ inline_let ]let l = [ u64 0x428a2f98d728ae22; u64 0x7137449123ef65cd; u64 0xb5c0fbcfec4d3b2f; u64 0xe9b5dba58189dbbc; u64 0x3956c25bf348b538; u64 0x59f111f1b605d019; u64 0x923f82a4af194f9b; u64 0xab1c5ed5da6d8118; u64 0xd807aa98a3030242; u64 0x12835b0145706fbe; u64 0x243185be4ee4b28c; u64 0x550c7dc3d5ffb4e2; u64 0x72be5d74f27b896f; u64 0x80deb1fe3b1696b1; u64 0x9bdc06a725c71235; u64 0xc19bf174cf692694; u64 0xe49b69c19ef14ad2; u64 0xefbe4786384f25e3; u64 0x0fc19dc68b8cd5b5; u64 0x240ca1cc77ac9c65; u64 0x2de92c6f592b0275; u64 0x4a7484aa6ea6e483; u64 0x5cb0a9dcbd41fbd4; u64 0x76f988da831153b5; u64 0x983e5152ee66dfab; u64 0xa831c66d2db43210; u64 0xb00327c898fb213f; u64 0xbf597fc7beef0ee4; u64 0xc6e00bf33da88fc2; u64 0xd5a79147930aa725; u64 0x06ca6351e003826f; u64 0x142929670a0e6e70; u64 0x27b70a8546d22ffc; u64 0x2e1b21385c26c926; u64 0x4d2c6dfc5ac42aed; u64 0x53380d139d95b3df; u64 0x650a73548baf63de; u64 0x766a0abb3c77b2a8; u64 0x81c2c92e47edaee6; u64 0x92722c851482353b; u64 0xa2bfe8a14cf10364; u64 0xa81a664bbc423001; u64 0xc24b8b70d0f89791; u64 0xc76c51a30654be30; u64 0xd192e819d6ef5218; u64 0xd69906245565a910; u64 0xf40e35855771202a; u64 0x106aa07032bbd1b8; u64 0x19a4c116b8d2d0c8; u64 0x1e376c085141ab53; u64 0x2748774cdf8eeb99; u64 0x34b0bcb5e19b48a8; u64 0x391c0cb3c5c95a63; u64 0x4ed8aa4ae3418acb; u64 0x5b9cca4f7763e373; u64 0x682e6ff3d6b2b8a3; u64 0x748f82ee5defb2fc; u64 0x78a5636f43172f60; u64 0x84c87814a1f0ab72; u64 0x8cc702081a6439ec; u64 0x90befffa23631e28; u64 0xa4506cebde82bde9; u64 0xbef9a3f7b2c67915; u64 0xc67178f2e372532b; u64 0xca273eceea26619c; u64 0xd186b8c721c0c207; u64 0xeada7dd6cde0eb1e; u64 0xf57d4f7fee6ed178; u64 0x06f067aa72176fba; u64 0x0a637dc5a2c898a6; u64 0x113f9804bef90dae; u64 0x1b710b35131c471b; u64 0x28db77f523047d84; u64 0x32caab7b40c72493; u64 0x3c9ebe0a15c9bebc; u64 0x431d67c49c100d4c; u64 0x4cc5d4becb3e42b6; u64 0x597f299cfc657e2a; u64 0x5fcb6fab3ad6faec; u64 0x6c44198c4a475817 ] in assert_norm (List.length l = 80); l
{ "checked_file": "Spec.SHA2.Constants.fst.checked", "dependencies": [ "prims.fst.checked", "Lib.IntTypes.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.fst.checked" ], "interface_file": false, "source_file": "Spec.SHA2.Constants.fst" }
[ "total" ]
[ "Prims.unit", "FStar.Pervasives.assert_norm", "Prims.b2t", "Prims.op_Equality", "Prims.int", "FStar.List.Tot.Base.length", "Lib.IntTypes.int_t", "Lib.IntTypes.U64", "Lib.IntTypes.SEC", "Prims.list", "Prims.Cons", "Lib.IntTypes.u64", "Prims.Nil" ]
[]
module Spec.SHA2.Constants #set-options "--z3rlimit 100" open Lib.IntTypes // K shuffling vectors [@"opaque_to_smt"] inline_for_extraction let k224_256_l: List.llist uint32 64 = [@inline_let] let l = [u32 0x428a2f98; u32 0x71374491; u32 0xb5c0fbcf; u32 0xe9b5dba5; u32 0x3956c25b; u32 0x59f111f1; u32 0x923f82a4; u32 0xab1c5ed5; u32 0xd807aa98; u32 0x12835b01; u32 0x243185be; u32 0x550c7dc3; u32 0x72be5d74; u32 0x80deb1fe; u32 0x9bdc06a7; u32 0xc19bf174; u32 0xe49b69c1; u32 0xefbe4786; u32 0x0fc19dc6; u32 0x240ca1cc; u32 0x2de92c6f; u32 0x4a7484aa; u32 0x5cb0a9dc; u32 0x76f988da; u32 0x983e5152; u32 0xa831c66d; u32 0xb00327c8; u32 0xbf597fc7; u32 0xc6e00bf3; u32 0xd5a79147; u32 0x06ca6351; u32 0x14292967; u32 0x27b70a85; u32 0x2e1b2138; u32 0x4d2c6dfc; u32 0x53380d13; u32 0x650a7354; u32 0x766a0abb; u32 0x81c2c92e; u32 0x92722c85; u32 0xa2bfe8a1; u32 0xa81a664b; u32 0xc24b8b70; u32 0xc76c51a3; u32 0xd192e819; u32 0xd6990624; u32 0xf40e3585; u32 0x106aa070; u32 0x19a4c116; u32 0x1e376c08; u32 0x2748774c; u32 0x34b0bcb5; u32 0x391c0cb3; u32 0x4ed8aa4a; u32 0x5b9cca4f; u32 0x682e6ff3; u32 0x748f82ee; u32 0x78a5636f; u32 0x84c87814; u32 0x8cc70208; u32 0x90befffa; u32 0xa4506ceb; u32 0xbef9a3f7; u32 0xc67178f2] in assert_norm (List.length l = 64); l let k224_256 = Seq.seq_of_list k224_256_l [@"opaque_to_smt"] inline_for_extraction
false
false
Spec.SHA2.Constants.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 100, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val k384_512_l:List.llist uint64 80
[]
Spec.SHA2.Constants.k384_512_l
{ "file_name": "specs/Spec.SHA2.Constants.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
FStar.List.Tot.Properties.llist (Lib.IntTypes.int_t Lib.IntTypes.U64 Lib.IntTypes.SEC) 80
{ "end_col": 3, "end_line": 60, "start_col": 2, "start_line": 36 }
Prims.Tot
val on_range (p: (nat -> vprop)) (i j: nat) : vprop
[ { "abbrev": false, "full_module": "Steel.ST.GenElim", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST.Util", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let rec on_range (p: (nat -> vprop)) (i j: nat) : Tot vprop (decreases (if j <= i then 0 else j - i)) = if j < i then pure False else if j = i then emp else p i `star` on_range p (i + 1) j
val on_range (p: (nat -> vprop)) (i j: nat) : vprop let rec on_range (p: (nat -> vprop)) (i j: nat) : Tot vprop (decreases (if j <= i then 0 else j - i)) =
false
null
false
if j < i then pure False else if j = i then emp else (p i) `star` (on_range p (i + 1) j)
{ "checked_file": "Steel.ST.OnRange.fst.checked", "dependencies": [ "Steel.ST.GenElim.fsti.checked", "prims.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Steel.ST.OnRange.fst" }
[ "", "total" ]
[ "Prims.nat", "Steel.Effect.Common.vprop", "Prims.op_LessThan", "Steel.ST.Util.pure", "Prims.l_False", "Prims.bool", "Prims.op_Equality", "Steel.Effect.Common.emp", "Steel.Effect.Common.star", "Steel.ST.OnRange.on_range", "Prims.op_Addition" ]
[]
module Steel.ST.OnRange open Steel.ST.GenElim let rec on_range (p: (nat -> vprop)) (i j: nat) : Tot vprop
false
true
Steel.ST.OnRange.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val on_range (p: (nat -> vprop)) (i j: nat) : vprop
[ "recursion" ]
Steel.ST.OnRange.on_range
{ "file_name": "lib/steel/Steel.ST.OnRange.fst", "git_rev": "7fbb54e94dd4f48ff7cb867d3bae6889a635541e", "git_url": "https://github.com/FStarLang/steel.git", "project_name": "steel" }
p: (_: Prims.nat -> Steel.Effect.Common.vprop) -> i: Prims.nat -> j: Prims.nat -> Prims.Tot Steel.Effect.Common.vprop
{ "end_col": 38, "end_line": 13, "start_col": 2, "start_line": 9 }
Steel.ST.Effect.Ghost.STGhost
val on_range_empty (#opened: _) (p: (nat -> vprop)) (i: nat) (j: nat) : STGhost unit opened emp (fun _ -> on_range p i j) (i == j) (fun _ -> True)
[ { "abbrev": false, "full_module": "Steel.ST.GenElim", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST.Util", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let on_range_empty p i j = rewrite emp (on_range p i j)
val on_range_empty (#opened: _) (p: (nat -> vprop)) (i: nat) (j: nat) : STGhost unit opened emp (fun _ -> on_range p i j) (i == j) (fun _ -> True) let on_range_empty p i j =
true
null
false
rewrite emp (on_range p i j)
{ "checked_file": "Steel.ST.OnRange.fst.checked", "dependencies": [ "Steel.ST.GenElim.fsti.checked", "prims.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Steel.ST.OnRange.fst" }
[]
[ "Steel.Memory.inames", "Prims.nat", "Steel.Effect.Common.vprop", "Steel.ST.Util.rewrite", "Steel.Effect.Common.emp", "Steel.ST.OnRange.on_range", "Prims.unit" ]
[]
module Steel.ST.OnRange open Steel.ST.GenElim let rec on_range (p: (nat -> vprop)) (i j: nat) : Tot vprop (decreases (if j <= i then 0 else j - i)) = if j < i then pure False else if j = i then emp else p i `star` on_range p (i + 1) j let on_range_le p i j = if i <= j then noop () else begin rewrite (on_range p i j) (pure False); let _ = gen_elim () in rewrite emp (on_range p i j); // by contradiction noop () end let on_range_empty
false
false
Steel.ST.OnRange.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val on_range_empty (#opened: _) (p: (nat -> vprop)) (i: nat) (j: nat) : STGhost unit opened emp (fun _ -> on_range p i j) (i == j) (fun _ -> True)
[]
Steel.ST.OnRange.on_range_empty
{ "file_name": "lib/steel/Steel.ST.OnRange.fst", "git_rev": "7fbb54e94dd4f48ff7cb867d3bae6889a635541e", "git_url": "https://github.com/FStarLang/steel.git", "project_name": "steel" }
p: (_: Prims.nat -> Steel.Effect.Common.vprop) -> i: Prims.nat -> j: Prims.nat -> Steel.ST.Effect.Ghost.STGhost Prims.unit
{ "end_col": 30, "end_line": 28, "start_col": 2, "start_line": 28 }
Steel.ST.Effect.Ghost.STGhost
val on_range_singleton_elim (#opened: _) (p: (nat -> vprop)) (i j: nat) : STGhost unit opened (on_range p i j) (fun _ -> p i) (j == i + 1) (fun _ -> True)
[ { "abbrev": false, "full_module": "Steel.ST.GenElim", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST.Util", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let on_range_singleton_elim p i j = rewrite (on_range p i j) (p i `star` emp)
val on_range_singleton_elim (#opened: _) (p: (nat -> vprop)) (i j: nat) : STGhost unit opened (on_range p i j) (fun _ -> p i) (j == i + 1) (fun _ -> True) let on_range_singleton_elim p i j =
true
null
false
rewrite (on_range p i j) ((p i) `star` emp)
{ "checked_file": "Steel.ST.OnRange.fst.checked", "dependencies": [ "Steel.ST.GenElim.fsti.checked", "prims.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Steel.ST.OnRange.fst" }
[]
[ "Steel.Memory.inames", "Prims.nat", "Steel.Effect.Common.vprop", "Steel.ST.Util.rewrite", "Steel.ST.OnRange.on_range", "Steel.Effect.Common.star", "Steel.Effect.Common.emp", "Prims.unit" ]
[]
module Steel.ST.OnRange open Steel.ST.GenElim let rec on_range (p: (nat -> vprop)) (i j: nat) : Tot vprop (decreases (if j <= i then 0 else j - i)) = if j < i then pure False else if j = i then emp else p i `star` on_range p (i + 1) j let on_range_le p i j = if i <= j then noop () else begin rewrite (on_range p i j) (pure False); let _ = gen_elim () in rewrite emp (on_range p i j); // by contradiction noop () end let on_range_empty p i j = rewrite emp (on_range p i j) let on_range_singleton_intro p i j = rewrite (p i `star` emp) (on_range p i j) let on_range_singleton_elim
false
false
Steel.ST.OnRange.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val on_range_singleton_elim (#opened: _) (p: (nat -> vprop)) (i j: nat) : STGhost unit opened (on_range p i j) (fun _ -> p i) (j == i + 1) (fun _ -> True)
[]
Steel.ST.OnRange.on_range_singleton_elim
{ "file_name": "lib/steel/Steel.ST.OnRange.fst", "git_rev": "7fbb54e94dd4f48ff7cb867d3bae6889a635541e", "git_url": "https://github.com/FStarLang/steel.git", "project_name": "steel" }
p: (_: Prims.nat -> Steel.Effect.Common.vprop) -> i: Prims.nat -> j: Prims.nat -> Steel.ST.Effect.Ghost.STGhost Prims.unit
{ "end_col": 43, "end_line": 36, "start_col": 2, "start_line": 36 }
Steel.ST.Effect.Ghost.STGhost
val on_range_singleton_intro (#opened: _) (p: (nat -> vprop)) (i: nat) (j: nat) : STGhost unit opened (p i) (fun _ -> on_range p i j) (j == i + 1) (fun _ -> True)
[ { "abbrev": false, "full_module": "Steel.ST.GenElim", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST.Util", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let on_range_singleton_intro p i j = rewrite (p i `star` emp) (on_range p i j)
val on_range_singleton_intro (#opened: _) (p: (nat -> vprop)) (i: nat) (j: nat) : STGhost unit opened (p i) (fun _ -> on_range p i j) (j == i + 1) (fun _ -> True) let on_range_singleton_intro p i j =
true
null
false
rewrite ((p i) `star` emp) (on_range p i j)
{ "checked_file": "Steel.ST.OnRange.fst.checked", "dependencies": [ "Steel.ST.GenElim.fsti.checked", "prims.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Steel.ST.OnRange.fst" }
[]
[ "Steel.Memory.inames", "Prims.nat", "Steel.Effect.Common.vprop", "Steel.ST.Util.rewrite", "Steel.Effect.Common.star", "Steel.Effect.Common.emp", "Steel.ST.OnRange.on_range", "Prims.unit" ]
[]
module Steel.ST.OnRange open Steel.ST.GenElim let rec on_range (p: (nat -> vprop)) (i j: nat) : Tot vprop (decreases (if j <= i then 0 else j - i)) = if j < i then pure False else if j = i then emp else p i `star` on_range p (i + 1) j let on_range_le p i j = if i <= j then noop () else begin rewrite (on_range p i j) (pure False); let _ = gen_elim () in rewrite emp (on_range p i j); // by contradiction noop () end let on_range_empty p i j = rewrite emp (on_range p i j) let on_range_singleton_intro
false
false
Steel.ST.OnRange.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val on_range_singleton_intro (#opened: _) (p: (nat -> vprop)) (i: nat) (j: nat) : STGhost unit opened (p i) (fun _ -> on_range p i j) (j == i + 1) (fun _ -> True)
[]
Steel.ST.OnRange.on_range_singleton_intro
{ "file_name": "lib/steel/Steel.ST.OnRange.fst", "git_rev": "7fbb54e94dd4f48ff7cb867d3bae6889a635541e", "git_url": "https://github.com/FStarLang/steel.git", "project_name": "steel" }
p: (_: Prims.nat -> Steel.Effect.Common.vprop) -> i: Prims.nat -> j: Prims.nat -> Steel.ST.Effect.Ghost.STGhost Prims.unit
{ "end_col": 43, "end_line": 32, "start_col": 2, "start_line": 32 }
Steel.ST.Effect.Ghost.STGhost
val on_range_split (#opened: _) (p: (nat -> vprop)) (i j k: nat) : STGhost unit opened (on_range p i k) (fun _ -> on_range p i j `star` on_range p j k) (i <= j /\ j <= k) (fun _ -> True)
[ { "abbrev": false, "full_module": "Steel.ST.GenElim", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST.Util", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let rec on_range_split (#opened: _) (p: (nat -> vprop)) (i j k: nat) : STGhost unit opened (on_range p i k) (fun _ -> on_range p i j `star` on_range p j k) (i <= j /\ j <= k) (fun _ -> True) (decreases (j - i)) = if i = j then begin rewrite emp (on_range p i j); rewrite (on_range p i k) (on_range p j k) end else begin rewrite (on_range p i k) (p i `star` on_range p (i + 1) k); on_range_split p (i + 1) j k; rewrite (p i `star` on_range p (i + 1) j) (on_range p i j) end
val on_range_split (#opened: _) (p: (nat -> vprop)) (i j k: nat) : STGhost unit opened (on_range p i k) (fun _ -> on_range p i j `star` on_range p j k) (i <= j /\ j <= k) (fun _ -> True) let rec on_range_split (#opened: _) (p: (nat -> vprop)) (i j k: nat) : STGhost unit opened (on_range p i k) (fun _ -> (on_range p i j) `star` (on_range p j k)) (i <= j /\ j <= k) (fun _ -> True) (decreases (j - i)) =
true
null
false
if i = j then (rewrite emp (on_range p i j); rewrite (on_range p i k) (on_range p j k)) else (rewrite (on_range p i k) ((p i) `star` (on_range p (i + 1) k)); on_range_split p (i + 1) j k; rewrite ((p i) `star` (on_range p (i + 1) j)) (on_range p i j))
{ "checked_file": "Steel.ST.OnRange.fst.checked", "dependencies": [ "Steel.ST.GenElim.fsti.checked", "prims.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Steel.ST.OnRange.fst" }
[ "" ]
[ "Steel.Memory.inames", "Prims.nat", "Steel.Effect.Common.vprop", "Prims.op_Equality", "Steel.ST.Util.rewrite", "Steel.ST.OnRange.on_range", "Prims.unit", "Steel.Effect.Common.emp", "Prims.bool", "Steel.Effect.Common.star", "Prims.op_Addition", "Steel.ST.OnRange.on_range_split", "Prims.l_and", "Prims.b2t", "Prims.op_LessThanOrEqual", "Prims.l_True" ]
[]
module Steel.ST.OnRange open Steel.ST.GenElim let rec on_range (p: (nat -> vprop)) (i j: nat) : Tot vprop (decreases (if j <= i then 0 else j - i)) = if j < i then pure False else if j = i then emp else p i `star` on_range p (i + 1) j let on_range_le p i j = if i <= j then noop () else begin rewrite (on_range p i j) (pure False); let _ = gen_elim () in rewrite emp (on_range p i j); // by contradiction noop () end let on_range_empty p i j = rewrite emp (on_range p i j) let on_range_singleton_intro p i j = rewrite (p i `star` emp) (on_range p i j) let on_range_singleton_elim p i j = rewrite (on_range p i j) (p i `star` emp) let rec on_range_split (#opened: _) (p: (nat -> vprop)) (i j k: nat) : STGhost unit opened (on_range p i k) (fun _ -> on_range p i j `star` on_range p j k) (i <= j /\ j <= k) (fun _ -> True)
false
false
Steel.ST.OnRange.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val on_range_split (#opened: _) (p: (nat -> vprop)) (i j k: nat) : STGhost unit opened (on_range p i k) (fun _ -> on_range p i j `star` on_range p j k) (i <= j /\ j <= k) (fun _ -> True)
[ "recursion" ]
Steel.ST.OnRange.on_range_split
{ "file_name": "lib/steel/Steel.ST.OnRange.fst", "git_rev": "7fbb54e94dd4f48ff7cb867d3bae6889a635541e", "git_url": "https://github.com/FStarLang/steel.git", "project_name": "steel" }
p: (_: Prims.nat -> Steel.Effect.Common.vprop) -> i: Prims.nat -> j: Prims.nat -> k: Prims.nat -> Steel.ST.Effect.Ghost.STGhost Prims.unit
{ "end_col": 5, "end_line": 56, "start_col": 2, "start_line": 48 }
Steel.ST.Effect.Ghost.STGhostT
val on_range_join (#opened: _) (p: (nat -> vprop)) (i j k: nat) : STGhostT unit opened (on_range p i j `star` on_range p j k) (fun _ -> on_range p i k)
[ { "abbrev": false, "full_module": "Steel.ST.GenElim", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST.Util", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let rec on_range_join (#opened: _) (p: (nat -> vprop)) (i j k: nat) : STGhostT unit opened (on_range p i j `star` on_range p j k) (fun _ -> on_range p i k) (decreases (if j >= i then j - i else 0)) = on_range_le p i j; on_range_le p j k; if i = j then begin rewrite (on_range p i j) emp; rewrite (on_range p j k) (on_range p i k) end else begin rewrite (on_range p i j) (p i `star` on_range p (i + 1) j); on_range_join p (i + 1) j k; rewrite (p i `star` on_range p (i + 1) k) (on_range p i k) end
val on_range_join (#opened: _) (p: (nat -> vprop)) (i j k: nat) : STGhostT unit opened (on_range p i j `star` on_range p j k) (fun _ -> on_range p i k) let rec on_range_join (#opened: _) (p: (nat -> vprop)) (i j k: nat) : STGhostT unit opened ((on_range p i j) `star` (on_range p j k)) (fun _ -> on_range p i k) (decreases (if j >= i then j - i else 0)) =
true
null
false
on_range_le p i j; on_range_le p j k; if i = j then (rewrite (on_range p i j) emp; rewrite (on_range p j k) (on_range p i k)) else (rewrite (on_range p i j) ((p i) `star` (on_range p (i + 1) j)); on_range_join p (i + 1) j k; rewrite ((p i) `star` (on_range p (i + 1) k)) (on_range p i k))
{ "checked_file": "Steel.ST.OnRange.fst.checked", "dependencies": [ "Steel.ST.GenElim.fsti.checked", "prims.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Steel.ST.OnRange.fst" }
[ "" ]
[ "Steel.Memory.inames", "Prims.nat", "Steel.Effect.Common.vprop", "Prims.op_Equality", "Steel.ST.Util.rewrite", "Steel.ST.OnRange.on_range", "Prims.unit", "Steel.Effect.Common.emp", "Prims.bool", "Steel.Effect.Common.star", "Prims.op_Addition", "Steel.ST.OnRange.on_range_join", "Steel.ST.OnRange.on_range_le" ]
[]
module Steel.ST.OnRange open Steel.ST.GenElim let rec on_range (p: (nat -> vprop)) (i j: nat) : Tot vprop (decreases (if j <= i then 0 else j - i)) = if j < i then pure False else if j = i then emp else p i `star` on_range p (i + 1) j let on_range_le p i j = if i <= j then noop () else begin rewrite (on_range p i j) (pure False); let _ = gen_elim () in rewrite emp (on_range p i j); // by contradiction noop () end let on_range_empty p i j = rewrite emp (on_range p i j) let on_range_singleton_intro p i j = rewrite (p i `star` emp) (on_range p i j) let on_range_singleton_elim p i j = rewrite (on_range p i j) (p i `star` emp) let rec on_range_split (#opened: _) (p: (nat -> vprop)) (i j k: nat) : STGhost unit opened (on_range p i k) (fun _ -> on_range p i j `star` on_range p j k) (i <= j /\ j <= k) (fun _ -> True) (decreases (j - i)) = if i = j then begin rewrite emp (on_range p i j); rewrite (on_range p i k) (on_range p j k) end else begin rewrite (on_range p i k) (p i `star` on_range p (i + 1) k); on_range_split p (i + 1) j k; rewrite (p i `star` on_range p (i + 1) j) (on_range p i j) end let rec on_range_join (#opened: _) (p: (nat -> vprop)) (i j k: nat) : STGhostT unit opened (on_range p i j `star` on_range p j k) (fun _ -> on_range p i k)
false
false
Steel.ST.OnRange.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val on_range_join (#opened: _) (p: (nat -> vprop)) (i j k: nat) : STGhostT unit opened (on_range p i j `star` on_range p j k) (fun _ -> on_range p i k)
[ "recursion" ]
Steel.ST.OnRange.on_range_join
{ "file_name": "lib/steel/Steel.ST.OnRange.fst", "git_rev": "7fbb54e94dd4f48ff7cb867d3bae6889a635541e", "git_url": "https://github.com/FStarLang/steel.git", "project_name": "steel" }
p: (_: Prims.nat -> Steel.Effect.Common.vprop) -> i: Prims.nat -> j: Prims.nat -> k: Prims.nat -> Steel.ST.Effect.Ghost.STGhostT Prims.unit
{ "end_col": 5, "end_line": 76, "start_col": 2, "start_line": 66 }
Prims.Tot
val bn_check_modulus_u32 (len: BN.meta_len U32) : bn_check_modulus_st U32 len
[ { "abbrev": true, "full_module": "Hacl.Bignum", "short_module": "BN" }, { "abbrev": true, "full_module": "Hacl.Spec.Bignum", "short_module": "SB" }, { "abbrev": true, "full_module": "Hacl.Spec.Bignum.Montgomery", "short_module": "S" }, { "abbrev": true, "full_module": "LowStar.Buffer", "short_module": "B" }, { "abbrev": true, "full_module": "Lib.Sequence", "short_module": "LSeq" }, { "abbrev": true, "full_module": "Lib.LoopCombinators", "short_module": "Loops" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "Hacl.Bignum.Base", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Bignum.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Bignum.ModInvLimb", "short_module": null }, { "abbrev": true, "full_module": "Hacl.Bignum", "short_module": "BN" }, { "abbrev": true, "full_module": "Hacl.Spec.Bignum.Montgomery", "short_module": "S" }, { "abbrev": false, "full_module": "Hacl.Bignum.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Bignum", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Bignum", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let bn_check_modulus_u32 (len:BN.meta_len U32) : bn_check_modulus_st U32 len = bn_check_modulus #U32 #len
val bn_check_modulus_u32 (len: BN.meta_len U32) : bn_check_modulus_st U32 len let bn_check_modulus_u32 (len: BN.meta_len U32) : bn_check_modulus_st U32 len =
false
null
false
bn_check_modulus #U32 #len
{ "checked_file": "Hacl.Bignum.Montgomery.fst.checked", "dependencies": [ "prims.fst.checked", "LowStar.Buffer.fst.checked", "Lib.Sequence.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Spec.Bignum.Montgomery.fst.checked", "Hacl.Spec.Bignum.Montgomery.fst.checked", "Hacl.Spec.Bignum.fsti.checked", "Hacl.Bignum.Definitions.fst.checked", "Hacl.Bignum.Base.fst.checked", "Hacl.Bignum.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked" ], "interface_file": true, "source_file": "Hacl.Bignum.Montgomery.fst" }
[ "total" ]
[ "Hacl.Bignum.meta_len", "Lib.IntTypes.U32", "Hacl.Bignum.Montgomery.bn_check_modulus", "Hacl.Bignum.Montgomery.bn_check_modulus_st" ]
[]
module Hacl.Bignum.Montgomery open FStar.HyperStack open FStar.HyperStack.ST open FStar.Mul open Lib.IntTypes open Lib.Buffer open Hacl.Bignum.Definitions open Hacl.Bignum.Base module ST = FStar.HyperStack.ST module Loops = Lib.LoopCombinators module LSeq = Lib.Sequence module B = LowStar.Buffer module S = Hacl.Spec.Bignum.Montgomery module SB = Hacl.Spec.Bignum module BN = Hacl.Bignum friend Hacl.Spec.Bignum.Montgomery #reset-options "--z3rlimit 50 --fuel 0 --ifuel 0" let bn_check_modulus #t #len n = push_frame (); let one = create len (uint #t 0) in BN.bn_from_uint len (uint #t 1) one; let bit0 = BN.bn_is_odd len n in let m0 = uint #t 0 -. bit0 in let m1 = BN.bn_lt_mask len one n in let m = m0 &. m1 in pop_frame (); m let bn_precomp_r2_mod_n #t k nBits n res = [@inline_let] let len = k.BN.len in memset res (uint #t 0) len; BN.bn_set_ith_bit len res nBits; [@inline_let] let spec h = S.bn_lshift1_mod_n (as_seq h n) in let h0 = ST.get () in loop1 h0 (2ul *! size (bits t) *! len -! nBits) res spec (fun i -> Loops.unfold_repeati (2 * bits t * v len - v nBits) (spec h0) (as_seq h0 res) (v i); BN.add_mod_n n res res res ) let bn_mont_precomp #t len precompr2 nBits n r2 = precompr2 nBits n r2; mod_inv_limb n.(0ul) inline_for_extraction noextract val bn_mont_reduction_f: #t:limb_t -> len:size_t{v len + v len <= max_size_t} -> n:lbignum t len -> nInv:(limb t) -> j:size_t{v j < v len} -> c:lbuffer (carry t) 1ul -> res:lbignum t (len +! len) -> Stack unit (requires fun h -> live h n /\ live h res /\ live h c /\ disjoint n res /\ disjoint n c /\ disjoint c res) (ensures fun h0 _ h1 -> modifies (loc res |+| loc c) h0 h1 /\ (Seq.index (as_seq h1 c) 0, as_seq h1 res) == S.bn_mont_reduction_f (as_seq h0 n) nInv (v j) (Seq.index (as_seq h0 c) 0, as_seq h0 res)) let bn_mont_reduction_f #t len n nInv j c res = let qj = nInv *. res.(j) in // Keeping the inline_for_extraction version here. let c1 = BN.bn_mul1_lshift_add_in_place len n qj (len +! len) j res in let h0 = ST.get () in let resb = sub res (len +! j) 1ul in let res_j = res.(len +! j) in c.(0ul) <- addcarry_st c.(0ul) c1 res_j resb; let h1 = ST.get () in let tmp = sub res (len +! j) 1ul in B.modifies_buffer_elim (B.gsub #(limb t) res 0ul (len +! j)) (loc c |+| loc tmp) h0 h1; assert (v (len +! j +! 1ul) + v (len +! len -! len -! j -! 1ul) == v (len +! len)); B.modifies_buffer_elim (B.gsub #(limb t) res (len +! j +! 1ul) (len -! j -! 1ul)) (loc c |+| loc tmp) h0 h1; LSeq.lemma_update_sub (as_seq h0 res) (v len + v j) 1 (LSeq.sub (as_seq h1 res) (v len + v j) 1) (as_seq h1 res); LSeq.eq_intro (as_seq h1 res) (LSeq.upd (as_seq h0 res) (v len + v j) (Seq.index (as_seq h1 res) (v len + v j))) inline_for_extraction noextract let bn_mont_reduction_loop_div_r_st (t:limb_t) (len:size_t{0 < v len /\ v len + v len <= max_size_t}) = n:lbignum t len -> mu:limb t -> c:lbignum t (len +! len) -> res:lbignum t len -> Stack (carry t) (requires fun h -> live h n /\ live h c /\ live h res /\ disjoint res n /\ disjoint res c /\ disjoint n c) (ensures fun h0 c0 h1 -> modifies (loc res |+| loc c) h0 h1 /\ (c0, as_seq h1 res) == S.bn_mont_reduction_loop_div_r (as_seq h0 n) mu (as_seq h0 c)) inline_for_extraction noextract val bn_mont_reduction_loop_div_r: #t:limb_t -> k:BN.bn t -> bn_mont_reduction_loop_div_r_st t k.BN.len let bn_mont_reduction_loop_div_r #t k n nInv c res = [@inline_let] let len = k.BN.len in push_frame (); let c0 = create 1ul (uint #t 0) in [@inline_let] let refl h i : GTot (S.bn_mont_reduction_t i) = Seq.index (as_seq h c0) 0, as_seq h c in [@inline_let] let footprint i = loc c0 |+| loc c in [@ inline_let] let spec h = S.bn_mont_reduction_f (as_seq h n) nInv in let h0 = ST.get () in loop h0 len S.bn_mont_reduction_t refl footprint spec (fun j -> Loops.unfold_repeat_gen (v len) S.bn_mont_reduction_t (spec h0) (refl h0 0) (v j); bn_mont_reduction_f len n nInv j c0 c ); BN.bn_rshift (len +! len) c len res; let c0 = c0.(0ul) in pop_frame (); c0 let bn_mont_reduction #t k n nInv c res = [@inline_let] let len = k.BN.len in let c0 = bn_mont_reduction_loop_div_r #t k n nInv c res in BN.bn_reduce_once len n c0 res let bn_to_mont #t k mont_reduction n nInv r2 a aM = [@inline_let] let len = k.BN.len in push_frame (); let c = create (len +! len) (uint #t 0) in BN.mul a r2 c; mont_reduction n nInv c aM; pop_frame () let bn_from_mont #t k mont_reduction n nInv_u64 aM a = [@inline_let] let len = k.BN.len in push_frame (); let tmp = create (len +! len) (uint #t 0) in update_sub tmp 0ul len aM; mont_reduction n nInv_u64 tmp a; pop_frame () let bn_mont_mul #t k mont_reduction n nInv_u64 aM bM resM = [@inline_let] let len = k.BN.len in push_frame (); let c = create (len +! len) (uint #t 0) in // In case you need to debug the type class projection, this is the explicit // syntax without referring to the implicitly-defined projector. k.BN.mul aM bM c; mont_reduction n nInv_u64 c resM; pop_frame () let bn_mont_sqr #t k mont_reduction n nInv_u64 aM resM = [@inline_let] let len = k.BN.len in push_frame (); let c = create (len +! len) (uint #t 0) in k.BN.sqr aM c; mont_reduction n nInv_u64 c resM; pop_frame () /// All of the functions above are inline_for_extraction noextract meaning that /// they're intended to be specialized by clients for a specific value of /// ``len``. We provide a default implementation that actually keeps ``len`` at /// runtime, to offer a version of mod_exp where all the parameters are present /// at run-time.
false
false
Hacl.Bignum.Montgomery.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val bn_check_modulus_u32 (len: BN.meta_len U32) : bn_check_modulus_st U32 len
[]
Hacl.Bignum.Montgomery.bn_check_modulus_u32
{ "file_name": "code/bignum/Hacl.Bignum.Montgomery.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
len: Hacl.Bignum.meta_len Lib.IntTypes.U32 -> Hacl.Bignum.Montgomery.bn_check_modulus_st Lib.IntTypes.U32 len
{ "end_col": 28, "end_line": 182, "start_col": 2, "start_line": 182 }
Prims.Tot
val bn_check_modulus_u64 (len: BN.meta_len U64) : bn_check_modulus_st U64 len
[ { "abbrev": true, "full_module": "Hacl.Bignum", "short_module": "BN" }, { "abbrev": true, "full_module": "Hacl.Spec.Bignum", "short_module": "SB" }, { "abbrev": true, "full_module": "Hacl.Spec.Bignum.Montgomery", "short_module": "S" }, { "abbrev": true, "full_module": "LowStar.Buffer", "short_module": "B" }, { "abbrev": true, "full_module": "Lib.Sequence", "short_module": "LSeq" }, { "abbrev": true, "full_module": "Lib.LoopCombinators", "short_module": "Loops" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "Hacl.Bignum.Base", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Bignum.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Bignum.ModInvLimb", "short_module": null }, { "abbrev": true, "full_module": "Hacl.Bignum", "short_module": "BN" }, { "abbrev": true, "full_module": "Hacl.Spec.Bignum.Montgomery", "short_module": "S" }, { "abbrev": false, "full_module": "Hacl.Bignum.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Bignum", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Bignum", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let bn_check_modulus_u64 (len:BN.meta_len U64) : bn_check_modulus_st U64 len = bn_check_modulus #U64 #len
val bn_check_modulus_u64 (len: BN.meta_len U64) : bn_check_modulus_st U64 len let bn_check_modulus_u64 (len: BN.meta_len U64) : bn_check_modulus_st U64 len =
false
null
false
bn_check_modulus #U64 #len
{ "checked_file": "Hacl.Bignum.Montgomery.fst.checked", "dependencies": [ "prims.fst.checked", "LowStar.Buffer.fst.checked", "Lib.Sequence.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Spec.Bignum.Montgomery.fst.checked", "Hacl.Spec.Bignum.Montgomery.fst.checked", "Hacl.Spec.Bignum.fsti.checked", "Hacl.Bignum.Definitions.fst.checked", "Hacl.Bignum.Base.fst.checked", "Hacl.Bignum.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked" ], "interface_file": true, "source_file": "Hacl.Bignum.Montgomery.fst" }
[ "total" ]
[ "Hacl.Bignum.meta_len", "Lib.IntTypes.U64", "Hacl.Bignum.Montgomery.bn_check_modulus", "Hacl.Bignum.Montgomery.bn_check_modulus_st" ]
[]
module Hacl.Bignum.Montgomery open FStar.HyperStack open FStar.HyperStack.ST open FStar.Mul open Lib.IntTypes open Lib.Buffer open Hacl.Bignum.Definitions open Hacl.Bignum.Base module ST = FStar.HyperStack.ST module Loops = Lib.LoopCombinators module LSeq = Lib.Sequence module B = LowStar.Buffer module S = Hacl.Spec.Bignum.Montgomery module SB = Hacl.Spec.Bignum module BN = Hacl.Bignum friend Hacl.Spec.Bignum.Montgomery #reset-options "--z3rlimit 50 --fuel 0 --ifuel 0" let bn_check_modulus #t #len n = push_frame (); let one = create len (uint #t 0) in BN.bn_from_uint len (uint #t 1) one; let bit0 = BN.bn_is_odd len n in let m0 = uint #t 0 -. bit0 in let m1 = BN.bn_lt_mask len one n in let m = m0 &. m1 in pop_frame (); m let bn_precomp_r2_mod_n #t k nBits n res = [@inline_let] let len = k.BN.len in memset res (uint #t 0) len; BN.bn_set_ith_bit len res nBits; [@inline_let] let spec h = S.bn_lshift1_mod_n (as_seq h n) in let h0 = ST.get () in loop1 h0 (2ul *! size (bits t) *! len -! nBits) res spec (fun i -> Loops.unfold_repeati (2 * bits t * v len - v nBits) (spec h0) (as_seq h0 res) (v i); BN.add_mod_n n res res res ) let bn_mont_precomp #t len precompr2 nBits n r2 = precompr2 nBits n r2; mod_inv_limb n.(0ul) inline_for_extraction noextract val bn_mont_reduction_f: #t:limb_t -> len:size_t{v len + v len <= max_size_t} -> n:lbignum t len -> nInv:(limb t) -> j:size_t{v j < v len} -> c:lbuffer (carry t) 1ul -> res:lbignum t (len +! len) -> Stack unit (requires fun h -> live h n /\ live h res /\ live h c /\ disjoint n res /\ disjoint n c /\ disjoint c res) (ensures fun h0 _ h1 -> modifies (loc res |+| loc c) h0 h1 /\ (Seq.index (as_seq h1 c) 0, as_seq h1 res) == S.bn_mont_reduction_f (as_seq h0 n) nInv (v j) (Seq.index (as_seq h0 c) 0, as_seq h0 res)) let bn_mont_reduction_f #t len n nInv j c res = let qj = nInv *. res.(j) in // Keeping the inline_for_extraction version here. let c1 = BN.bn_mul1_lshift_add_in_place len n qj (len +! len) j res in let h0 = ST.get () in let resb = sub res (len +! j) 1ul in let res_j = res.(len +! j) in c.(0ul) <- addcarry_st c.(0ul) c1 res_j resb; let h1 = ST.get () in let tmp = sub res (len +! j) 1ul in B.modifies_buffer_elim (B.gsub #(limb t) res 0ul (len +! j)) (loc c |+| loc tmp) h0 h1; assert (v (len +! j +! 1ul) + v (len +! len -! len -! j -! 1ul) == v (len +! len)); B.modifies_buffer_elim (B.gsub #(limb t) res (len +! j +! 1ul) (len -! j -! 1ul)) (loc c |+| loc tmp) h0 h1; LSeq.lemma_update_sub (as_seq h0 res) (v len + v j) 1 (LSeq.sub (as_seq h1 res) (v len + v j) 1) (as_seq h1 res); LSeq.eq_intro (as_seq h1 res) (LSeq.upd (as_seq h0 res) (v len + v j) (Seq.index (as_seq h1 res) (v len + v j))) inline_for_extraction noextract let bn_mont_reduction_loop_div_r_st (t:limb_t) (len:size_t{0 < v len /\ v len + v len <= max_size_t}) = n:lbignum t len -> mu:limb t -> c:lbignum t (len +! len) -> res:lbignum t len -> Stack (carry t) (requires fun h -> live h n /\ live h c /\ live h res /\ disjoint res n /\ disjoint res c /\ disjoint n c) (ensures fun h0 c0 h1 -> modifies (loc res |+| loc c) h0 h1 /\ (c0, as_seq h1 res) == S.bn_mont_reduction_loop_div_r (as_seq h0 n) mu (as_seq h0 c)) inline_for_extraction noextract val bn_mont_reduction_loop_div_r: #t:limb_t -> k:BN.bn t -> bn_mont_reduction_loop_div_r_st t k.BN.len let bn_mont_reduction_loop_div_r #t k n nInv c res = [@inline_let] let len = k.BN.len in push_frame (); let c0 = create 1ul (uint #t 0) in [@inline_let] let refl h i : GTot (S.bn_mont_reduction_t i) = Seq.index (as_seq h c0) 0, as_seq h c in [@inline_let] let footprint i = loc c0 |+| loc c in [@ inline_let] let spec h = S.bn_mont_reduction_f (as_seq h n) nInv in let h0 = ST.get () in loop h0 len S.bn_mont_reduction_t refl footprint spec (fun j -> Loops.unfold_repeat_gen (v len) S.bn_mont_reduction_t (spec h0) (refl h0 0) (v j); bn_mont_reduction_f len n nInv j c0 c ); BN.bn_rshift (len +! len) c len res; let c0 = c0.(0ul) in pop_frame (); c0 let bn_mont_reduction #t k n nInv c res = [@inline_let] let len = k.BN.len in let c0 = bn_mont_reduction_loop_div_r #t k n nInv c res in BN.bn_reduce_once len n c0 res let bn_to_mont #t k mont_reduction n nInv r2 a aM = [@inline_let] let len = k.BN.len in push_frame (); let c = create (len +! len) (uint #t 0) in BN.mul a r2 c; mont_reduction n nInv c aM; pop_frame () let bn_from_mont #t k mont_reduction n nInv_u64 aM a = [@inline_let] let len = k.BN.len in push_frame (); let tmp = create (len +! len) (uint #t 0) in update_sub tmp 0ul len aM; mont_reduction n nInv_u64 tmp a; pop_frame () let bn_mont_mul #t k mont_reduction n nInv_u64 aM bM resM = [@inline_let] let len = k.BN.len in push_frame (); let c = create (len +! len) (uint #t 0) in // In case you need to debug the type class projection, this is the explicit // syntax without referring to the implicitly-defined projector. k.BN.mul aM bM c; mont_reduction n nInv_u64 c resM; pop_frame () let bn_mont_sqr #t k mont_reduction n nInv_u64 aM resM = [@inline_let] let len = k.BN.len in push_frame (); let c = create (len +! len) (uint #t 0) in k.BN.sqr aM c; mont_reduction n nInv_u64 c resM; pop_frame () /// All of the functions above are inline_for_extraction noextract meaning that /// they're intended to be specialized by clients for a specific value of /// ``len``. We provide a default implementation that actually keeps ``len`` at /// runtime, to offer a version of mod_exp where all the parameters are present /// at run-time. let bn_check_modulus_u32 (len:BN.meta_len U32) : bn_check_modulus_st U32 len = bn_check_modulus #U32 #len let bn_precomp_r2_mod_n_u32 (len:BN.meta_len U32) : bn_precomp_r2_mod_n_st U32 len = bn_precomp_r2_mod_n (BN.mk_runtime_bn U32 len) let bn_mont_reduction_u32 (len:BN.meta_len U32) : bn_mont_reduction_st U32 len = bn_mont_reduction (BN.mk_runtime_bn U32 len) let bn_to_mont_u32 (len:BN.meta_len U32) : bn_to_mont_st U32 len = bn_to_mont (BN.mk_runtime_bn U32 len) (bn_mont_reduction_u32 len) let bn_from_mont_u32 (len:BN.meta_len U32) : bn_from_mont_st U32 len = bn_from_mont (BN.mk_runtime_bn U32 len) (bn_mont_reduction_u32 len) let bn_mont_mul_u32 (len:BN.meta_len U32) : bn_mont_mul_st U32 len = bn_mont_mul (BN.mk_runtime_bn U32 len) (bn_mont_reduction_u32 len) let bn_mont_sqr_u32 (len:BN.meta_len U32) : bn_mont_sqr_st U32 len = bn_mont_sqr (BN.mk_runtime_bn U32 len) (bn_mont_reduction_u32 len) inline_for_extraction noextract let mk_runtime_mont_u32 (len:BN.meta_len U32) : mont U32 = { bn = BN.mk_runtime_bn U32 len; mont_check = bn_check_modulus_u32 len; precomp = bn_precomp_r2_mod_n_u32 len; reduction = bn_mont_reduction_u32 len; to = bn_to_mont_u32 len; from = bn_from_mont_u32 len; mul = bn_mont_mul_u32 len; sqr = bn_mont_sqr_u32 len; }
false
false
Hacl.Bignum.Montgomery.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val bn_check_modulus_u64 (len: BN.meta_len U64) : bn_check_modulus_st U64 len
[]
Hacl.Bignum.Montgomery.bn_check_modulus_u64
{ "file_name": "code/bignum/Hacl.Bignum.Montgomery.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
len: Hacl.Bignum.meta_len Lib.IntTypes.U64 -> Hacl.Bignum.Montgomery.bn_check_modulus_st Lib.IntTypes.U64 len
{ "end_col": 28, "end_line": 210, "start_col": 2, "start_line": 210 }
Prims.Tot
val bn_precomp_r2_mod_n_u64 (len: BN.meta_len U64) : bn_precomp_r2_mod_n_st U64 len
[ { "abbrev": true, "full_module": "Hacl.Bignum", "short_module": "BN" }, { "abbrev": true, "full_module": "Hacl.Spec.Bignum", "short_module": "SB" }, { "abbrev": true, "full_module": "Hacl.Spec.Bignum.Montgomery", "short_module": "S" }, { "abbrev": true, "full_module": "LowStar.Buffer", "short_module": "B" }, { "abbrev": true, "full_module": "Lib.Sequence", "short_module": "LSeq" }, { "abbrev": true, "full_module": "Lib.LoopCombinators", "short_module": "Loops" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "Hacl.Bignum.Base", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Bignum.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Bignum.ModInvLimb", "short_module": null }, { "abbrev": true, "full_module": "Hacl.Bignum", "short_module": "BN" }, { "abbrev": true, "full_module": "Hacl.Spec.Bignum.Montgomery", "short_module": "S" }, { "abbrev": false, "full_module": "Hacl.Bignum.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Bignum", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Bignum", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let bn_precomp_r2_mod_n_u64 (len:BN.meta_len U64) : bn_precomp_r2_mod_n_st U64 len = bn_precomp_r2_mod_n (BN.mk_runtime_bn U64 len)
val bn_precomp_r2_mod_n_u64 (len: BN.meta_len U64) : bn_precomp_r2_mod_n_st U64 len let bn_precomp_r2_mod_n_u64 (len: BN.meta_len U64) : bn_precomp_r2_mod_n_st U64 len =
false
null
false
bn_precomp_r2_mod_n (BN.mk_runtime_bn U64 len)
{ "checked_file": "Hacl.Bignum.Montgomery.fst.checked", "dependencies": [ "prims.fst.checked", "LowStar.Buffer.fst.checked", "Lib.Sequence.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Spec.Bignum.Montgomery.fst.checked", "Hacl.Spec.Bignum.Montgomery.fst.checked", "Hacl.Spec.Bignum.fsti.checked", "Hacl.Bignum.Definitions.fst.checked", "Hacl.Bignum.Base.fst.checked", "Hacl.Bignum.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked" ], "interface_file": true, "source_file": "Hacl.Bignum.Montgomery.fst" }
[ "total" ]
[ "Hacl.Bignum.meta_len", "Lib.IntTypes.U64", "Hacl.Bignum.Montgomery.bn_precomp_r2_mod_n", "Hacl.Bignum.mk_runtime_bn", "Hacl.Bignum.Montgomery.bn_precomp_r2_mod_n_st" ]
[]
module Hacl.Bignum.Montgomery open FStar.HyperStack open FStar.HyperStack.ST open FStar.Mul open Lib.IntTypes open Lib.Buffer open Hacl.Bignum.Definitions open Hacl.Bignum.Base module ST = FStar.HyperStack.ST module Loops = Lib.LoopCombinators module LSeq = Lib.Sequence module B = LowStar.Buffer module S = Hacl.Spec.Bignum.Montgomery module SB = Hacl.Spec.Bignum module BN = Hacl.Bignum friend Hacl.Spec.Bignum.Montgomery #reset-options "--z3rlimit 50 --fuel 0 --ifuel 0" let bn_check_modulus #t #len n = push_frame (); let one = create len (uint #t 0) in BN.bn_from_uint len (uint #t 1) one; let bit0 = BN.bn_is_odd len n in let m0 = uint #t 0 -. bit0 in let m1 = BN.bn_lt_mask len one n in let m = m0 &. m1 in pop_frame (); m let bn_precomp_r2_mod_n #t k nBits n res = [@inline_let] let len = k.BN.len in memset res (uint #t 0) len; BN.bn_set_ith_bit len res nBits; [@inline_let] let spec h = S.bn_lshift1_mod_n (as_seq h n) in let h0 = ST.get () in loop1 h0 (2ul *! size (bits t) *! len -! nBits) res spec (fun i -> Loops.unfold_repeati (2 * bits t * v len - v nBits) (spec h0) (as_seq h0 res) (v i); BN.add_mod_n n res res res ) let bn_mont_precomp #t len precompr2 nBits n r2 = precompr2 nBits n r2; mod_inv_limb n.(0ul) inline_for_extraction noextract val bn_mont_reduction_f: #t:limb_t -> len:size_t{v len + v len <= max_size_t} -> n:lbignum t len -> nInv:(limb t) -> j:size_t{v j < v len} -> c:lbuffer (carry t) 1ul -> res:lbignum t (len +! len) -> Stack unit (requires fun h -> live h n /\ live h res /\ live h c /\ disjoint n res /\ disjoint n c /\ disjoint c res) (ensures fun h0 _ h1 -> modifies (loc res |+| loc c) h0 h1 /\ (Seq.index (as_seq h1 c) 0, as_seq h1 res) == S.bn_mont_reduction_f (as_seq h0 n) nInv (v j) (Seq.index (as_seq h0 c) 0, as_seq h0 res)) let bn_mont_reduction_f #t len n nInv j c res = let qj = nInv *. res.(j) in // Keeping the inline_for_extraction version here. let c1 = BN.bn_mul1_lshift_add_in_place len n qj (len +! len) j res in let h0 = ST.get () in let resb = sub res (len +! j) 1ul in let res_j = res.(len +! j) in c.(0ul) <- addcarry_st c.(0ul) c1 res_j resb; let h1 = ST.get () in let tmp = sub res (len +! j) 1ul in B.modifies_buffer_elim (B.gsub #(limb t) res 0ul (len +! j)) (loc c |+| loc tmp) h0 h1; assert (v (len +! j +! 1ul) + v (len +! len -! len -! j -! 1ul) == v (len +! len)); B.modifies_buffer_elim (B.gsub #(limb t) res (len +! j +! 1ul) (len -! j -! 1ul)) (loc c |+| loc tmp) h0 h1; LSeq.lemma_update_sub (as_seq h0 res) (v len + v j) 1 (LSeq.sub (as_seq h1 res) (v len + v j) 1) (as_seq h1 res); LSeq.eq_intro (as_seq h1 res) (LSeq.upd (as_seq h0 res) (v len + v j) (Seq.index (as_seq h1 res) (v len + v j))) inline_for_extraction noextract let bn_mont_reduction_loop_div_r_st (t:limb_t) (len:size_t{0 < v len /\ v len + v len <= max_size_t}) = n:lbignum t len -> mu:limb t -> c:lbignum t (len +! len) -> res:lbignum t len -> Stack (carry t) (requires fun h -> live h n /\ live h c /\ live h res /\ disjoint res n /\ disjoint res c /\ disjoint n c) (ensures fun h0 c0 h1 -> modifies (loc res |+| loc c) h0 h1 /\ (c0, as_seq h1 res) == S.bn_mont_reduction_loop_div_r (as_seq h0 n) mu (as_seq h0 c)) inline_for_extraction noextract val bn_mont_reduction_loop_div_r: #t:limb_t -> k:BN.bn t -> bn_mont_reduction_loop_div_r_st t k.BN.len let bn_mont_reduction_loop_div_r #t k n nInv c res = [@inline_let] let len = k.BN.len in push_frame (); let c0 = create 1ul (uint #t 0) in [@inline_let] let refl h i : GTot (S.bn_mont_reduction_t i) = Seq.index (as_seq h c0) 0, as_seq h c in [@inline_let] let footprint i = loc c0 |+| loc c in [@ inline_let] let spec h = S.bn_mont_reduction_f (as_seq h n) nInv in let h0 = ST.get () in loop h0 len S.bn_mont_reduction_t refl footprint spec (fun j -> Loops.unfold_repeat_gen (v len) S.bn_mont_reduction_t (spec h0) (refl h0 0) (v j); bn_mont_reduction_f len n nInv j c0 c ); BN.bn_rshift (len +! len) c len res; let c0 = c0.(0ul) in pop_frame (); c0 let bn_mont_reduction #t k n nInv c res = [@inline_let] let len = k.BN.len in let c0 = bn_mont_reduction_loop_div_r #t k n nInv c res in BN.bn_reduce_once len n c0 res let bn_to_mont #t k mont_reduction n nInv r2 a aM = [@inline_let] let len = k.BN.len in push_frame (); let c = create (len +! len) (uint #t 0) in BN.mul a r2 c; mont_reduction n nInv c aM; pop_frame () let bn_from_mont #t k mont_reduction n nInv_u64 aM a = [@inline_let] let len = k.BN.len in push_frame (); let tmp = create (len +! len) (uint #t 0) in update_sub tmp 0ul len aM; mont_reduction n nInv_u64 tmp a; pop_frame () let bn_mont_mul #t k mont_reduction n nInv_u64 aM bM resM = [@inline_let] let len = k.BN.len in push_frame (); let c = create (len +! len) (uint #t 0) in // In case you need to debug the type class projection, this is the explicit // syntax without referring to the implicitly-defined projector. k.BN.mul aM bM c; mont_reduction n nInv_u64 c resM; pop_frame () let bn_mont_sqr #t k mont_reduction n nInv_u64 aM resM = [@inline_let] let len = k.BN.len in push_frame (); let c = create (len +! len) (uint #t 0) in k.BN.sqr aM c; mont_reduction n nInv_u64 c resM; pop_frame () /// All of the functions above are inline_for_extraction noextract meaning that /// they're intended to be specialized by clients for a specific value of /// ``len``. We provide a default implementation that actually keeps ``len`` at /// runtime, to offer a version of mod_exp where all the parameters are present /// at run-time. let bn_check_modulus_u32 (len:BN.meta_len U32) : bn_check_modulus_st U32 len = bn_check_modulus #U32 #len let bn_precomp_r2_mod_n_u32 (len:BN.meta_len U32) : bn_precomp_r2_mod_n_st U32 len = bn_precomp_r2_mod_n (BN.mk_runtime_bn U32 len) let bn_mont_reduction_u32 (len:BN.meta_len U32) : bn_mont_reduction_st U32 len = bn_mont_reduction (BN.mk_runtime_bn U32 len) let bn_to_mont_u32 (len:BN.meta_len U32) : bn_to_mont_st U32 len = bn_to_mont (BN.mk_runtime_bn U32 len) (bn_mont_reduction_u32 len) let bn_from_mont_u32 (len:BN.meta_len U32) : bn_from_mont_st U32 len = bn_from_mont (BN.mk_runtime_bn U32 len) (bn_mont_reduction_u32 len) let bn_mont_mul_u32 (len:BN.meta_len U32) : bn_mont_mul_st U32 len = bn_mont_mul (BN.mk_runtime_bn U32 len) (bn_mont_reduction_u32 len) let bn_mont_sqr_u32 (len:BN.meta_len U32) : bn_mont_sqr_st U32 len = bn_mont_sqr (BN.mk_runtime_bn U32 len) (bn_mont_reduction_u32 len) inline_for_extraction noextract let mk_runtime_mont_u32 (len:BN.meta_len U32) : mont U32 = { bn = BN.mk_runtime_bn U32 len; mont_check = bn_check_modulus_u32 len; precomp = bn_precomp_r2_mod_n_u32 len; reduction = bn_mont_reduction_u32 len; to = bn_to_mont_u32 len; from = bn_from_mont_u32 len; mul = bn_mont_mul_u32 len; sqr = bn_mont_sqr_u32 len; } let bn_check_modulus_u64 (len:BN.meta_len U64) : bn_check_modulus_st U64 len = bn_check_modulus #U64 #len
false
false
Hacl.Bignum.Montgomery.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val bn_precomp_r2_mod_n_u64 (len: BN.meta_len U64) : bn_precomp_r2_mod_n_st U64 len
[]
Hacl.Bignum.Montgomery.bn_precomp_r2_mod_n_u64
{ "file_name": "code/bignum/Hacl.Bignum.Montgomery.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
len: Hacl.Bignum.meta_len Lib.IntTypes.U64 -> Hacl.Bignum.Montgomery.bn_precomp_r2_mod_n_st Lib.IntTypes.U64 len
{ "end_col": 48, "end_line": 212, "start_col": 2, "start_line": 212 }
Prims.Tot
val bn_mont_one: #t:limb_t -> len:BN.meta_len t -> bn_mont_from:bn_from_mont_st t len -> bn_mont_one_st t len
[ { "abbrev": true, "full_module": "Hacl.Bignum", "short_module": "BN" }, { "abbrev": true, "full_module": "Hacl.Spec.Bignum", "short_module": "SB" }, { "abbrev": true, "full_module": "Hacl.Spec.Bignum.Montgomery", "short_module": "S" }, { "abbrev": true, "full_module": "LowStar.Buffer", "short_module": "B" }, { "abbrev": true, "full_module": "Lib.Sequence", "short_module": "LSeq" }, { "abbrev": true, "full_module": "Lib.LoopCombinators", "short_module": "Loops" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "Hacl.Bignum.Base", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Bignum.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Bignum.ModInvLimb", "short_module": null }, { "abbrev": true, "full_module": "Hacl.Bignum", "short_module": "BN" }, { "abbrev": true, "full_module": "Hacl.Spec.Bignum.Montgomery", "short_module": "S" }, { "abbrev": false, "full_module": "Hacl.Bignum.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Bignum", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Bignum", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let bn_mont_one #t len bn_from_mont n mu r2 oneM = bn_from_mont n mu r2 oneM
val bn_mont_one: #t:limb_t -> len:BN.meta_len t -> bn_mont_from:bn_from_mont_st t len -> bn_mont_one_st t len let bn_mont_one #t len bn_from_mont n mu r2 oneM =
false
null
false
bn_from_mont n mu r2 oneM
{ "checked_file": "Hacl.Bignum.Montgomery.fst.checked", "dependencies": [ "prims.fst.checked", "LowStar.Buffer.fst.checked", "Lib.Sequence.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Spec.Bignum.Montgomery.fst.checked", "Hacl.Spec.Bignum.Montgomery.fst.checked", "Hacl.Spec.Bignum.fsti.checked", "Hacl.Bignum.Definitions.fst.checked", "Hacl.Bignum.Base.fst.checked", "Hacl.Bignum.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked" ], "interface_file": true, "source_file": "Hacl.Bignum.Montgomery.fst" }
[ "total" ]
[ "Hacl.Bignum.Definitions.limb_t", "Hacl.Bignum.meta_len", "Hacl.Bignum.Montgomery.bn_from_mont_st", "Hacl.Bignum.Definitions.lbignum", "Hacl.Bignum.Definitions.limb", "Prims.unit" ]
[]
module Hacl.Bignum.Montgomery open FStar.HyperStack open FStar.HyperStack.ST open FStar.Mul open Lib.IntTypes open Lib.Buffer open Hacl.Bignum.Definitions open Hacl.Bignum.Base module ST = FStar.HyperStack.ST module Loops = Lib.LoopCombinators module LSeq = Lib.Sequence module B = LowStar.Buffer module S = Hacl.Spec.Bignum.Montgomery module SB = Hacl.Spec.Bignum module BN = Hacl.Bignum friend Hacl.Spec.Bignum.Montgomery #reset-options "--z3rlimit 50 --fuel 0 --ifuel 0" let bn_check_modulus #t #len n = push_frame (); let one = create len (uint #t 0) in BN.bn_from_uint len (uint #t 1) one; let bit0 = BN.bn_is_odd len n in let m0 = uint #t 0 -. bit0 in let m1 = BN.bn_lt_mask len one n in let m = m0 &. m1 in pop_frame (); m let bn_precomp_r2_mod_n #t k nBits n res = [@inline_let] let len = k.BN.len in memset res (uint #t 0) len; BN.bn_set_ith_bit len res nBits; [@inline_let] let spec h = S.bn_lshift1_mod_n (as_seq h n) in let h0 = ST.get () in loop1 h0 (2ul *! size (bits t) *! len -! nBits) res spec (fun i -> Loops.unfold_repeati (2 * bits t * v len - v nBits) (spec h0) (as_seq h0 res) (v i); BN.add_mod_n n res res res ) let bn_mont_precomp #t len precompr2 nBits n r2 = precompr2 nBits n r2; mod_inv_limb n.(0ul) inline_for_extraction noextract val bn_mont_reduction_f: #t:limb_t -> len:size_t{v len + v len <= max_size_t} -> n:lbignum t len -> nInv:(limb t) -> j:size_t{v j < v len} -> c:lbuffer (carry t) 1ul -> res:lbignum t (len +! len) -> Stack unit (requires fun h -> live h n /\ live h res /\ live h c /\ disjoint n res /\ disjoint n c /\ disjoint c res) (ensures fun h0 _ h1 -> modifies (loc res |+| loc c) h0 h1 /\ (Seq.index (as_seq h1 c) 0, as_seq h1 res) == S.bn_mont_reduction_f (as_seq h0 n) nInv (v j) (Seq.index (as_seq h0 c) 0, as_seq h0 res)) let bn_mont_reduction_f #t len n nInv j c res = let qj = nInv *. res.(j) in // Keeping the inline_for_extraction version here. let c1 = BN.bn_mul1_lshift_add_in_place len n qj (len +! len) j res in let h0 = ST.get () in let resb = sub res (len +! j) 1ul in let res_j = res.(len +! j) in c.(0ul) <- addcarry_st c.(0ul) c1 res_j resb; let h1 = ST.get () in let tmp = sub res (len +! j) 1ul in B.modifies_buffer_elim (B.gsub #(limb t) res 0ul (len +! j)) (loc c |+| loc tmp) h0 h1; assert (v (len +! j +! 1ul) + v (len +! len -! len -! j -! 1ul) == v (len +! len)); B.modifies_buffer_elim (B.gsub #(limb t) res (len +! j +! 1ul) (len -! j -! 1ul)) (loc c |+| loc tmp) h0 h1; LSeq.lemma_update_sub (as_seq h0 res) (v len + v j) 1 (LSeq.sub (as_seq h1 res) (v len + v j) 1) (as_seq h1 res); LSeq.eq_intro (as_seq h1 res) (LSeq.upd (as_seq h0 res) (v len + v j) (Seq.index (as_seq h1 res) (v len + v j))) inline_for_extraction noextract let bn_mont_reduction_loop_div_r_st (t:limb_t) (len:size_t{0 < v len /\ v len + v len <= max_size_t}) = n:lbignum t len -> mu:limb t -> c:lbignum t (len +! len) -> res:lbignum t len -> Stack (carry t) (requires fun h -> live h n /\ live h c /\ live h res /\ disjoint res n /\ disjoint res c /\ disjoint n c) (ensures fun h0 c0 h1 -> modifies (loc res |+| loc c) h0 h1 /\ (c0, as_seq h1 res) == S.bn_mont_reduction_loop_div_r (as_seq h0 n) mu (as_seq h0 c)) inline_for_extraction noextract val bn_mont_reduction_loop_div_r: #t:limb_t -> k:BN.bn t -> bn_mont_reduction_loop_div_r_st t k.BN.len let bn_mont_reduction_loop_div_r #t k n nInv c res = [@inline_let] let len = k.BN.len in push_frame (); let c0 = create 1ul (uint #t 0) in [@inline_let] let refl h i : GTot (S.bn_mont_reduction_t i) = Seq.index (as_seq h c0) 0, as_seq h c in [@inline_let] let footprint i = loc c0 |+| loc c in [@ inline_let] let spec h = S.bn_mont_reduction_f (as_seq h n) nInv in let h0 = ST.get () in loop h0 len S.bn_mont_reduction_t refl footprint spec (fun j -> Loops.unfold_repeat_gen (v len) S.bn_mont_reduction_t (spec h0) (refl h0 0) (v j); bn_mont_reduction_f len n nInv j c0 c ); BN.bn_rshift (len +! len) c len res; let c0 = c0.(0ul) in pop_frame (); c0 let bn_mont_reduction #t k n nInv c res = [@inline_let] let len = k.BN.len in let c0 = bn_mont_reduction_loop_div_r #t k n nInv c res in BN.bn_reduce_once len n c0 res let bn_to_mont #t k mont_reduction n nInv r2 a aM = [@inline_let] let len = k.BN.len in push_frame (); let c = create (len +! len) (uint #t 0) in BN.mul a r2 c; mont_reduction n nInv c aM; pop_frame () let bn_from_mont #t k mont_reduction n nInv_u64 aM a = [@inline_let] let len = k.BN.len in push_frame (); let tmp = create (len +! len) (uint #t 0) in update_sub tmp 0ul len aM; mont_reduction n nInv_u64 tmp a; pop_frame () let bn_mont_mul #t k mont_reduction n nInv_u64 aM bM resM = [@inline_let] let len = k.BN.len in push_frame (); let c = create (len +! len) (uint #t 0) in // In case you need to debug the type class projection, this is the explicit // syntax without referring to the implicitly-defined projector. k.BN.mul aM bM c; mont_reduction n nInv_u64 c resM; pop_frame () let bn_mont_sqr #t k mont_reduction n nInv_u64 aM resM = [@inline_let] let len = k.BN.len in push_frame (); let c = create (len +! len) (uint #t 0) in k.BN.sqr aM c; mont_reduction n nInv_u64 c resM; pop_frame () /// All of the functions above are inline_for_extraction noextract meaning that /// they're intended to be specialized by clients for a specific value of /// ``len``. We provide a default implementation that actually keeps ``len`` at /// runtime, to offer a version of mod_exp where all the parameters are present /// at run-time. let bn_check_modulus_u32 (len:BN.meta_len U32) : bn_check_modulus_st U32 len = bn_check_modulus #U32 #len let bn_precomp_r2_mod_n_u32 (len:BN.meta_len U32) : bn_precomp_r2_mod_n_st U32 len = bn_precomp_r2_mod_n (BN.mk_runtime_bn U32 len) let bn_mont_reduction_u32 (len:BN.meta_len U32) : bn_mont_reduction_st U32 len = bn_mont_reduction (BN.mk_runtime_bn U32 len) let bn_to_mont_u32 (len:BN.meta_len U32) : bn_to_mont_st U32 len = bn_to_mont (BN.mk_runtime_bn U32 len) (bn_mont_reduction_u32 len) let bn_from_mont_u32 (len:BN.meta_len U32) : bn_from_mont_st U32 len = bn_from_mont (BN.mk_runtime_bn U32 len) (bn_mont_reduction_u32 len) let bn_mont_mul_u32 (len:BN.meta_len U32) : bn_mont_mul_st U32 len = bn_mont_mul (BN.mk_runtime_bn U32 len) (bn_mont_reduction_u32 len) let bn_mont_sqr_u32 (len:BN.meta_len U32) : bn_mont_sqr_st U32 len = bn_mont_sqr (BN.mk_runtime_bn U32 len) (bn_mont_reduction_u32 len) inline_for_extraction noextract let mk_runtime_mont_u32 (len:BN.meta_len U32) : mont U32 = { bn = BN.mk_runtime_bn U32 len; mont_check = bn_check_modulus_u32 len; precomp = bn_precomp_r2_mod_n_u32 len; reduction = bn_mont_reduction_u32 len; to = bn_to_mont_u32 len; from = bn_from_mont_u32 len; mul = bn_mont_mul_u32 len; sqr = bn_mont_sqr_u32 len; } let bn_check_modulus_u64 (len:BN.meta_len U64) : bn_check_modulus_st U64 len = bn_check_modulus #U64 #len let bn_precomp_r2_mod_n_u64 (len:BN.meta_len U64) : bn_precomp_r2_mod_n_st U64 len = bn_precomp_r2_mod_n (BN.mk_runtime_bn U64 len) let bn_mont_reduction_u64 (len:BN.meta_len U64) : bn_mont_reduction_st U64 len = bn_mont_reduction (BN.mk_runtime_bn U64 len) let bn_to_mont_u64 (len:BN.meta_len U64) : bn_to_mont_st U64 len = bn_to_mont (BN.mk_runtime_bn U64 len) (bn_mont_reduction_u64 len) let bn_from_mont_u64 (len:BN.meta_len U64) : bn_from_mont_st U64 len = bn_from_mont (BN.mk_runtime_bn U64 len) (bn_mont_reduction_u64 len) let bn_mont_mul_u64 (len:BN.meta_len U64) : bn_mont_mul_st U64 len = bn_mont_mul (BN.mk_runtime_bn U64 len) (bn_mont_reduction_u64 len) let bn_mont_sqr_u64 (len:BN.meta_len U64) : bn_mont_sqr_st U64 len = bn_mont_sqr (BN.mk_runtime_bn U64 len) (bn_mont_reduction_u64 len) inline_for_extraction noextract let mk_runtime_mont_u64 (len:BN.meta_len U64) : mont U64 = { bn = BN.mk_runtime_bn U64 len; mont_check = bn_check_modulus_u64 len; precomp = bn_precomp_r2_mod_n_u64 len; reduction = bn_mont_reduction_u64 len; to = bn_to_mont_u64 len; from = bn_from_mont_u64 len; mul = bn_mont_mul_u64 len; sqr = bn_mont_sqr_u64 len; } let mk_runtime_mont (#t:limb_t) (len:BN.meta_len t) : mont t = match t with | U32 -> mk_runtime_mont_u32 len | U64 -> mk_runtime_mont_u64 len let mk_runtime_mont_len_lemma #t len = ()
false
false
Hacl.Bignum.Montgomery.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val bn_mont_one: #t:limb_t -> len:BN.meta_len t -> bn_mont_from:bn_from_mont_st t len -> bn_mont_one_st t len
[]
Hacl.Bignum.Montgomery.bn_mont_one
{ "file_name": "code/bignum/Hacl.Bignum.Montgomery.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
len: Hacl.Bignum.meta_len t -> bn_mont_from: Hacl.Bignum.Montgomery.bn_from_mont_st t len -> Hacl.Bignum.Montgomery.bn_mont_one_st t len
{ "end_col": 27, "end_line": 245, "start_col": 2, "start_line": 245 }
Prims.Tot
val bn_mont_sqr_u64 (len: BN.meta_len U64) : bn_mont_sqr_st U64 len
[ { "abbrev": true, "full_module": "Hacl.Bignum", "short_module": "BN" }, { "abbrev": true, "full_module": "Hacl.Spec.Bignum", "short_module": "SB" }, { "abbrev": true, "full_module": "Hacl.Spec.Bignum.Montgomery", "short_module": "S" }, { "abbrev": true, "full_module": "LowStar.Buffer", "short_module": "B" }, { "abbrev": true, "full_module": "Lib.Sequence", "short_module": "LSeq" }, { "abbrev": true, "full_module": "Lib.LoopCombinators", "short_module": "Loops" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "Hacl.Bignum.Base", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Bignum.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Bignum.ModInvLimb", "short_module": null }, { "abbrev": true, "full_module": "Hacl.Bignum", "short_module": "BN" }, { "abbrev": true, "full_module": "Hacl.Spec.Bignum.Montgomery", "short_module": "S" }, { "abbrev": false, "full_module": "Hacl.Bignum.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Bignum", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Bignum", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let bn_mont_sqr_u64 (len:BN.meta_len U64) : bn_mont_sqr_st U64 len = bn_mont_sqr (BN.mk_runtime_bn U64 len) (bn_mont_reduction_u64 len)
val bn_mont_sqr_u64 (len: BN.meta_len U64) : bn_mont_sqr_st U64 len let bn_mont_sqr_u64 (len: BN.meta_len U64) : bn_mont_sqr_st U64 len =
false
null
false
bn_mont_sqr (BN.mk_runtime_bn U64 len) (bn_mont_reduction_u64 len)
{ "checked_file": "Hacl.Bignum.Montgomery.fst.checked", "dependencies": [ "prims.fst.checked", "LowStar.Buffer.fst.checked", "Lib.Sequence.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Spec.Bignum.Montgomery.fst.checked", "Hacl.Spec.Bignum.Montgomery.fst.checked", "Hacl.Spec.Bignum.fsti.checked", "Hacl.Bignum.Definitions.fst.checked", "Hacl.Bignum.Base.fst.checked", "Hacl.Bignum.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked" ], "interface_file": true, "source_file": "Hacl.Bignum.Montgomery.fst" }
[ "total" ]
[ "Hacl.Bignum.meta_len", "Lib.IntTypes.U64", "Hacl.Bignum.Montgomery.bn_mont_sqr", "Hacl.Bignum.mk_runtime_bn", "Hacl.Bignum.Montgomery.bn_mont_reduction_u64", "Hacl.Bignum.Montgomery.bn_mont_sqr_st" ]
[]
module Hacl.Bignum.Montgomery open FStar.HyperStack open FStar.HyperStack.ST open FStar.Mul open Lib.IntTypes open Lib.Buffer open Hacl.Bignum.Definitions open Hacl.Bignum.Base module ST = FStar.HyperStack.ST module Loops = Lib.LoopCombinators module LSeq = Lib.Sequence module B = LowStar.Buffer module S = Hacl.Spec.Bignum.Montgomery module SB = Hacl.Spec.Bignum module BN = Hacl.Bignum friend Hacl.Spec.Bignum.Montgomery #reset-options "--z3rlimit 50 --fuel 0 --ifuel 0" let bn_check_modulus #t #len n = push_frame (); let one = create len (uint #t 0) in BN.bn_from_uint len (uint #t 1) one; let bit0 = BN.bn_is_odd len n in let m0 = uint #t 0 -. bit0 in let m1 = BN.bn_lt_mask len one n in let m = m0 &. m1 in pop_frame (); m let bn_precomp_r2_mod_n #t k nBits n res = [@inline_let] let len = k.BN.len in memset res (uint #t 0) len; BN.bn_set_ith_bit len res nBits; [@inline_let] let spec h = S.bn_lshift1_mod_n (as_seq h n) in let h0 = ST.get () in loop1 h0 (2ul *! size (bits t) *! len -! nBits) res spec (fun i -> Loops.unfold_repeati (2 * bits t * v len - v nBits) (spec h0) (as_seq h0 res) (v i); BN.add_mod_n n res res res ) let bn_mont_precomp #t len precompr2 nBits n r2 = precompr2 nBits n r2; mod_inv_limb n.(0ul) inline_for_extraction noextract val bn_mont_reduction_f: #t:limb_t -> len:size_t{v len + v len <= max_size_t} -> n:lbignum t len -> nInv:(limb t) -> j:size_t{v j < v len} -> c:lbuffer (carry t) 1ul -> res:lbignum t (len +! len) -> Stack unit (requires fun h -> live h n /\ live h res /\ live h c /\ disjoint n res /\ disjoint n c /\ disjoint c res) (ensures fun h0 _ h1 -> modifies (loc res |+| loc c) h0 h1 /\ (Seq.index (as_seq h1 c) 0, as_seq h1 res) == S.bn_mont_reduction_f (as_seq h0 n) nInv (v j) (Seq.index (as_seq h0 c) 0, as_seq h0 res)) let bn_mont_reduction_f #t len n nInv j c res = let qj = nInv *. res.(j) in // Keeping the inline_for_extraction version here. let c1 = BN.bn_mul1_lshift_add_in_place len n qj (len +! len) j res in let h0 = ST.get () in let resb = sub res (len +! j) 1ul in let res_j = res.(len +! j) in c.(0ul) <- addcarry_st c.(0ul) c1 res_j resb; let h1 = ST.get () in let tmp = sub res (len +! j) 1ul in B.modifies_buffer_elim (B.gsub #(limb t) res 0ul (len +! j)) (loc c |+| loc tmp) h0 h1; assert (v (len +! j +! 1ul) + v (len +! len -! len -! j -! 1ul) == v (len +! len)); B.modifies_buffer_elim (B.gsub #(limb t) res (len +! j +! 1ul) (len -! j -! 1ul)) (loc c |+| loc tmp) h0 h1; LSeq.lemma_update_sub (as_seq h0 res) (v len + v j) 1 (LSeq.sub (as_seq h1 res) (v len + v j) 1) (as_seq h1 res); LSeq.eq_intro (as_seq h1 res) (LSeq.upd (as_seq h0 res) (v len + v j) (Seq.index (as_seq h1 res) (v len + v j))) inline_for_extraction noextract let bn_mont_reduction_loop_div_r_st (t:limb_t) (len:size_t{0 < v len /\ v len + v len <= max_size_t}) = n:lbignum t len -> mu:limb t -> c:lbignum t (len +! len) -> res:lbignum t len -> Stack (carry t) (requires fun h -> live h n /\ live h c /\ live h res /\ disjoint res n /\ disjoint res c /\ disjoint n c) (ensures fun h0 c0 h1 -> modifies (loc res |+| loc c) h0 h1 /\ (c0, as_seq h1 res) == S.bn_mont_reduction_loop_div_r (as_seq h0 n) mu (as_seq h0 c)) inline_for_extraction noextract val bn_mont_reduction_loop_div_r: #t:limb_t -> k:BN.bn t -> bn_mont_reduction_loop_div_r_st t k.BN.len let bn_mont_reduction_loop_div_r #t k n nInv c res = [@inline_let] let len = k.BN.len in push_frame (); let c0 = create 1ul (uint #t 0) in [@inline_let] let refl h i : GTot (S.bn_mont_reduction_t i) = Seq.index (as_seq h c0) 0, as_seq h c in [@inline_let] let footprint i = loc c0 |+| loc c in [@ inline_let] let spec h = S.bn_mont_reduction_f (as_seq h n) nInv in let h0 = ST.get () in loop h0 len S.bn_mont_reduction_t refl footprint spec (fun j -> Loops.unfold_repeat_gen (v len) S.bn_mont_reduction_t (spec h0) (refl h0 0) (v j); bn_mont_reduction_f len n nInv j c0 c ); BN.bn_rshift (len +! len) c len res; let c0 = c0.(0ul) in pop_frame (); c0 let bn_mont_reduction #t k n nInv c res = [@inline_let] let len = k.BN.len in let c0 = bn_mont_reduction_loop_div_r #t k n nInv c res in BN.bn_reduce_once len n c0 res let bn_to_mont #t k mont_reduction n nInv r2 a aM = [@inline_let] let len = k.BN.len in push_frame (); let c = create (len +! len) (uint #t 0) in BN.mul a r2 c; mont_reduction n nInv c aM; pop_frame () let bn_from_mont #t k mont_reduction n nInv_u64 aM a = [@inline_let] let len = k.BN.len in push_frame (); let tmp = create (len +! len) (uint #t 0) in update_sub tmp 0ul len aM; mont_reduction n nInv_u64 tmp a; pop_frame () let bn_mont_mul #t k mont_reduction n nInv_u64 aM bM resM = [@inline_let] let len = k.BN.len in push_frame (); let c = create (len +! len) (uint #t 0) in // In case you need to debug the type class projection, this is the explicit // syntax without referring to the implicitly-defined projector. k.BN.mul aM bM c; mont_reduction n nInv_u64 c resM; pop_frame () let bn_mont_sqr #t k mont_reduction n nInv_u64 aM resM = [@inline_let] let len = k.BN.len in push_frame (); let c = create (len +! len) (uint #t 0) in k.BN.sqr aM c; mont_reduction n nInv_u64 c resM; pop_frame () /// All of the functions above are inline_for_extraction noextract meaning that /// they're intended to be specialized by clients for a specific value of /// ``len``. We provide a default implementation that actually keeps ``len`` at /// runtime, to offer a version of mod_exp where all the parameters are present /// at run-time. let bn_check_modulus_u32 (len:BN.meta_len U32) : bn_check_modulus_st U32 len = bn_check_modulus #U32 #len let bn_precomp_r2_mod_n_u32 (len:BN.meta_len U32) : bn_precomp_r2_mod_n_st U32 len = bn_precomp_r2_mod_n (BN.mk_runtime_bn U32 len) let bn_mont_reduction_u32 (len:BN.meta_len U32) : bn_mont_reduction_st U32 len = bn_mont_reduction (BN.mk_runtime_bn U32 len) let bn_to_mont_u32 (len:BN.meta_len U32) : bn_to_mont_st U32 len = bn_to_mont (BN.mk_runtime_bn U32 len) (bn_mont_reduction_u32 len) let bn_from_mont_u32 (len:BN.meta_len U32) : bn_from_mont_st U32 len = bn_from_mont (BN.mk_runtime_bn U32 len) (bn_mont_reduction_u32 len) let bn_mont_mul_u32 (len:BN.meta_len U32) : bn_mont_mul_st U32 len = bn_mont_mul (BN.mk_runtime_bn U32 len) (bn_mont_reduction_u32 len) let bn_mont_sqr_u32 (len:BN.meta_len U32) : bn_mont_sqr_st U32 len = bn_mont_sqr (BN.mk_runtime_bn U32 len) (bn_mont_reduction_u32 len) inline_for_extraction noextract let mk_runtime_mont_u32 (len:BN.meta_len U32) : mont U32 = { bn = BN.mk_runtime_bn U32 len; mont_check = bn_check_modulus_u32 len; precomp = bn_precomp_r2_mod_n_u32 len; reduction = bn_mont_reduction_u32 len; to = bn_to_mont_u32 len; from = bn_from_mont_u32 len; mul = bn_mont_mul_u32 len; sqr = bn_mont_sqr_u32 len; } let bn_check_modulus_u64 (len:BN.meta_len U64) : bn_check_modulus_st U64 len = bn_check_modulus #U64 #len let bn_precomp_r2_mod_n_u64 (len:BN.meta_len U64) : bn_precomp_r2_mod_n_st U64 len = bn_precomp_r2_mod_n (BN.mk_runtime_bn U64 len) let bn_mont_reduction_u64 (len:BN.meta_len U64) : bn_mont_reduction_st U64 len = bn_mont_reduction (BN.mk_runtime_bn U64 len) let bn_to_mont_u64 (len:BN.meta_len U64) : bn_to_mont_st U64 len = bn_to_mont (BN.mk_runtime_bn U64 len) (bn_mont_reduction_u64 len) let bn_from_mont_u64 (len:BN.meta_len U64) : bn_from_mont_st U64 len = bn_from_mont (BN.mk_runtime_bn U64 len) (bn_mont_reduction_u64 len) let bn_mont_mul_u64 (len:BN.meta_len U64) : bn_mont_mul_st U64 len = bn_mont_mul (BN.mk_runtime_bn U64 len) (bn_mont_reduction_u64 len)
false
false
Hacl.Bignum.Montgomery.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val bn_mont_sqr_u64 (len: BN.meta_len U64) : bn_mont_sqr_st U64 len
[]
Hacl.Bignum.Montgomery.bn_mont_sqr_u64
{ "file_name": "code/bignum/Hacl.Bignum.Montgomery.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
len: Hacl.Bignum.meta_len Lib.IntTypes.U64 -> Hacl.Bignum.Montgomery.bn_mont_sqr_st Lib.IntTypes.U64 len
{ "end_col": 68, "end_line": 222, "start_col": 2, "start_line": 222 }
Prims.Tot
val bn_precomp_r2_mod_n_u32 (len: BN.meta_len U32) : bn_precomp_r2_mod_n_st U32 len
[ { "abbrev": true, "full_module": "Hacl.Bignum", "short_module": "BN" }, { "abbrev": true, "full_module": "Hacl.Spec.Bignum", "short_module": "SB" }, { "abbrev": true, "full_module": "Hacl.Spec.Bignum.Montgomery", "short_module": "S" }, { "abbrev": true, "full_module": "LowStar.Buffer", "short_module": "B" }, { "abbrev": true, "full_module": "Lib.Sequence", "short_module": "LSeq" }, { "abbrev": true, "full_module": "Lib.LoopCombinators", "short_module": "Loops" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "Hacl.Bignum.Base", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Bignum.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Bignum.ModInvLimb", "short_module": null }, { "abbrev": true, "full_module": "Hacl.Bignum", "short_module": "BN" }, { "abbrev": true, "full_module": "Hacl.Spec.Bignum.Montgomery", "short_module": "S" }, { "abbrev": false, "full_module": "Hacl.Bignum.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Bignum", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Bignum", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let bn_precomp_r2_mod_n_u32 (len:BN.meta_len U32) : bn_precomp_r2_mod_n_st U32 len = bn_precomp_r2_mod_n (BN.mk_runtime_bn U32 len)
val bn_precomp_r2_mod_n_u32 (len: BN.meta_len U32) : bn_precomp_r2_mod_n_st U32 len let bn_precomp_r2_mod_n_u32 (len: BN.meta_len U32) : bn_precomp_r2_mod_n_st U32 len =
false
null
false
bn_precomp_r2_mod_n (BN.mk_runtime_bn U32 len)
{ "checked_file": "Hacl.Bignum.Montgomery.fst.checked", "dependencies": [ "prims.fst.checked", "LowStar.Buffer.fst.checked", "Lib.Sequence.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Spec.Bignum.Montgomery.fst.checked", "Hacl.Spec.Bignum.Montgomery.fst.checked", "Hacl.Spec.Bignum.fsti.checked", "Hacl.Bignum.Definitions.fst.checked", "Hacl.Bignum.Base.fst.checked", "Hacl.Bignum.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked" ], "interface_file": true, "source_file": "Hacl.Bignum.Montgomery.fst" }
[ "total" ]
[ "Hacl.Bignum.meta_len", "Lib.IntTypes.U32", "Hacl.Bignum.Montgomery.bn_precomp_r2_mod_n", "Hacl.Bignum.mk_runtime_bn", "Hacl.Bignum.Montgomery.bn_precomp_r2_mod_n_st" ]
[]
module Hacl.Bignum.Montgomery open FStar.HyperStack open FStar.HyperStack.ST open FStar.Mul open Lib.IntTypes open Lib.Buffer open Hacl.Bignum.Definitions open Hacl.Bignum.Base module ST = FStar.HyperStack.ST module Loops = Lib.LoopCombinators module LSeq = Lib.Sequence module B = LowStar.Buffer module S = Hacl.Spec.Bignum.Montgomery module SB = Hacl.Spec.Bignum module BN = Hacl.Bignum friend Hacl.Spec.Bignum.Montgomery #reset-options "--z3rlimit 50 --fuel 0 --ifuel 0" let bn_check_modulus #t #len n = push_frame (); let one = create len (uint #t 0) in BN.bn_from_uint len (uint #t 1) one; let bit0 = BN.bn_is_odd len n in let m0 = uint #t 0 -. bit0 in let m1 = BN.bn_lt_mask len one n in let m = m0 &. m1 in pop_frame (); m let bn_precomp_r2_mod_n #t k nBits n res = [@inline_let] let len = k.BN.len in memset res (uint #t 0) len; BN.bn_set_ith_bit len res nBits; [@inline_let] let spec h = S.bn_lshift1_mod_n (as_seq h n) in let h0 = ST.get () in loop1 h0 (2ul *! size (bits t) *! len -! nBits) res spec (fun i -> Loops.unfold_repeati (2 * bits t * v len - v nBits) (spec h0) (as_seq h0 res) (v i); BN.add_mod_n n res res res ) let bn_mont_precomp #t len precompr2 nBits n r2 = precompr2 nBits n r2; mod_inv_limb n.(0ul) inline_for_extraction noextract val bn_mont_reduction_f: #t:limb_t -> len:size_t{v len + v len <= max_size_t} -> n:lbignum t len -> nInv:(limb t) -> j:size_t{v j < v len} -> c:lbuffer (carry t) 1ul -> res:lbignum t (len +! len) -> Stack unit (requires fun h -> live h n /\ live h res /\ live h c /\ disjoint n res /\ disjoint n c /\ disjoint c res) (ensures fun h0 _ h1 -> modifies (loc res |+| loc c) h0 h1 /\ (Seq.index (as_seq h1 c) 0, as_seq h1 res) == S.bn_mont_reduction_f (as_seq h0 n) nInv (v j) (Seq.index (as_seq h0 c) 0, as_seq h0 res)) let bn_mont_reduction_f #t len n nInv j c res = let qj = nInv *. res.(j) in // Keeping the inline_for_extraction version here. let c1 = BN.bn_mul1_lshift_add_in_place len n qj (len +! len) j res in let h0 = ST.get () in let resb = sub res (len +! j) 1ul in let res_j = res.(len +! j) in c.(0ul) <- addcarry_st c.(0ul) c1 res_j resb; let h1 = ST.get () in let tmp = sub res (len +! j) 1ul in B.modifies_buffer_elim (B.gsub #(limb t) res 0ul (len +! j)) (loc c |+| loc tmp) h0 h1; assert (v (len +! j +! 1ul) + v (len +! len -! len -! j -! 1ul) == v (len +! len)); B.modifies_buffer_elim (B.gsub #(limb t) res (len +! j +! 1ul) (len -! j -! 1ul)) (loc c |+| loc tmp) h0 h1; LSeq.lemma_update_sub (as_seq h0 res) (v len + v j) 1 (LSeq.sub (as_seq h1 res) (v len + v j) 1) (as_seq h1 res); LSeq.eq_intro (as_seq h1 res) (LSeq.upd (as_seq h0 res) (v len + v j) (Seq.index (as_seq h1 res) (v len + v j))) inline_for_extraction noextract let bn_mont_reduction_loop_div_r_st (t:limb_t) (len:size_t{0 < v len /\ v len + v len <= max_size_t}) = n:lbignum t len -> mu:limb t -> c:lbignum t (len +! len) -> res:lbignum t len -> Stack (carry t) (requires fun h -> live h n /\ live h c /\ live h res /\ disjoint res n /\ disjoint res c /\ disjoint n c) (ensures fun h0 c0 h1 -> modifies (loc res |+| loc c) h0 h1 /\ (c0, as_seq h1 res) == S.bn_mont_reduction_loop_div_r (as_seq h0 n) mu (as_seq h0 c)) inline_for_extraction noextract val bn_mont_reduction_loop_div_r: #t:limb_t -> k:BN.bn t -> bn_mont_reduction_loop_div_r_st t k.BN.len let bn_mont_reduction_loop_div_r #t k n nInv c res = [@inline_let] let len = k.BN.len in push_frame (); let c0 = create 1ul (uint #t 0) in [@inline_let] let refl h i : GTot (S.bn_mont_reduction_t i) = Seq.index (as_seq h c0) 0, as_seq h c in [@inline_let] let footprint i = loc c0 |+| loc c in [@ inline_let] let spec h = S.bn_mont_reduction_f (as_seq h n) nInv in let h0 = ST.get () in loop h0 len S.bn_mont_reduction_t refl footprint spec (fun j -> Loops.unfold_repeat_gen (v len) S.bn_mont_reduction_t (spec h0) (refl h0 0) (v j); bn_mont_reduction_f len n nInv j c0 c ); BN.bn_rshift (len +! len) c len res; let c0 = c0.(0ul) in pop_frame (); c0 let bn_mont_reduction #t k n nInv c res = [@inline_let] let len = k.BN.len in let c0 = bn_mont_reduction_loop_div_r #t k n nInv c res in BN.bn_reduce_once len n c0 res let bn_to_mont #t k mont_reduction n nInv r2 a aM = [@inline_let] let len = k.BN.len in push_frame (); let c = create (len +! len) (uint #t 0) in BN.mul a r2 c; mont_reduction n nInv c aM; pop_frame () let bn_from_mont #t k mont_reduction n nInv_u64 aM a = [@inline_let] let len = k.BN.len in push_frame (); let tmp = create (len +! len) (uint #t 0) in update_sub tmp 0ul len aM; mont_reduction n nInv_u64 tmp a; pop_frame () let bn_mont_mul #t k mont_reduction n nInv_u64 aM bM resM = [@inline_let] let len = k.BN.len in push_frame (); let c = create (len +! len) (uint #t 0) in // In case you need to debug the type class projection, this is the explicit // syntax without referring to the implicitly-defined projector. k.BN.mul aM bM c; mont_reduction n nInv_u64 c resM; pop_frame () let bn_mont_sqr #t k mont_reduction n nInv_u64 aM resM = [@inline_let] let len = k.BN.len in push_frame (); let c = create (len +! len) (uint #t 0) in k.BN.sqr aM c; mont_reduction n nInv_u64 c resM; pop_frame () /// All of the functions above are inline_for_extraction noextract meaning that /// they're intended to be specialized by clients for a specific value of /// ``len``. We provide a default implementation that actually keeps ``len`` at /// runtime, to offer a version of mod_exp where all the parameters are present /// at run-time. let bn_check_modulus_u32 (len:BN.meta_len U32) : bn_check_modulus_st U32 len = bn_check_modulus #U32 #len
false
false
Hacl.Bignum.Montgomery.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val bn_precomp_r2_mod_n_u32 (len: BN.meta_len U32) : bn_precomp_r2_mod_n_st U32 len
[]
Hacl.Bignum.Montgomery.bn_precomp_r2_mod_n_u32
{ "file_name": "code/bignum/Hacl.Bignum.Montgomery.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
len: Hacl.Bignum.meta_len Lib.IntTypes.U32 -> Hacl.Bignum.Montgomery.bn_precomp_r2_mod_n_st Lib.IntTypes.U32 len
{ "end_col": 48, "end_line": 184, "start_col": 2, "start_line": 184 }