file_name stringlengths 5 52 | name stringlengths 4 95 | original_source_type stringlengths 0 23k | source_type stringlengths 9 23k | source_definition stringlengths 9 57.9k | source dict | source_range dict | file_context stringlengths 0 721k | dependencies dict | opens_and_abbrevs listlengths 2 94 | vconfig dict | interleaved bool 1
class | verbose_type stringlengths 1 7.42k | effect stringclasses 118
values | effect_flags listlengths 0 2 | mutual_with listlengths 0 11 | ideal_premises listlengths 0 236 | proof_features listlengths 0 1 | is_simple_lemma bool 2
classes | is_div bool 2
classes | is_proof bool 2
classes | is_simply_typed bool 2
classes | is_type bool 2
classes | partial_definition stringlengths 5 3.99k | completed_definiton stringlengths 1 1.63M | isa_cross_project_example bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Lib.Sequence.fst | Lib.Sequence.of_list | val of_list:
#a:Type
-> l:list a{List.Tot.length l <= max_size_t} ->
Tot (s:lseq a (List.Tot.length l){to_seq s == Seq.seq_of_list l}) | val of_list:
#a:Type
-> l:list a{List.Tot.length l <= max_size_t} ->
Tot (s:lseq a (List.Tot.length l){to_seq s == Seq.seq_of_list l}) | let of_list #a l = Seq.seq_of_list #a l | {
"file_name": "lib/Lib.Sequence.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 39,
"end_line": 17,
"start_col": 0,
"start_line": 17
} | module Lib.Sequence
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
#set-options "--z3rlimit 30 --max_fuel 0 --max_ifuel 0 --using_facts_from '-* +Prims +FStar.Pervasives +FStar.Math.Lemmas +FStar.Seq +Lib.IntTypes +Lib.Sequence'"
let index #a #len s n = Seq.index s n
let create #a len init = Seq.create #... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Seq.Properties.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"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": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"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_el... | false | l: Prims.list a {FStar.List.Tot.Base.length l <= Lib.IntTypes.max_size_t}
-> s:
Lib.Sequence.lseq a (FStar.List.Tot.Base.length l)
{Lib.Sequence.to_seq s == FStar.Seq.Base.seq_of_list l} | Prims.Tot | [
"total"
] | [] | [
"Prims.list",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"FStar.List.Tot.Base.length",
"Lib.IntTypes.max_size_t",
"FStar.Seq.Base.seq_of_list",
"Lib.Sequence.lseq",
"Prims.eq2",
"FStar.Seq.Base.seq",
"Lib.Sequence.to_seq"
] | [] | false | false | false | false | false | let of_list #a l =
| Seq.seq_of_list #a l | false |
Lib.Sequence.fst | Lib.Sequence.upd | val upd:
#a:Type
-> #len:size_nat
-> s:lseq a len
-> n:size_nat{n < len}
-> x:a ->
Tot (o:lseq a len{to_seq o == Seq.upd (to_seq s) n x /\ index o n == x /\ (forall (i:size_nat).
{:pattern (index s i)} (i < len /\ i <> n) ==> index o i == index s i)}) | val upd:
#a:Type
-> #len:size_nat
-> s:lseq a len
-> n:size_nat{n < len}
-> x:a ->
Tot (o:lseq a len{to_seq o == Seq.upd (to_seq s) n x /\ index o n == x /\ (forall (i:size_nat).
{:pattern (index s i)} (i < len /\ i <> n) ==> index o i == index s i)}) | let upd #a #len s n x = Seq.upd #a s n x | {
"file_name": "lib/Lib.Sequence.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 40,
"end_line": 35,
"start_col": 0,
"start_line": 35
} | module Lib.Sequence
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
#set-options "--z3rlimit 30 --max_fuel 0 --max_ifuel 0 --using_facts_from '-* +Prims +FStar.Pervasives +FStar.Math.Lemmas +FStar.Seq +Lib.IntTypes +Lib.Sequence'"
let index #a #len s n = Seq.index s n
let create #a len init = Seq.create #... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Seq.Properties.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"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": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"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_el... | false | s: Lib.Sequence.lseq a len -> n: Lib.IntTypes.size_nat{n < len} -> x: a
-> o:
Lib.Sequence.lseq a len
{ Lib.Sequence.to_seq o == FStar.Seq.Base.upd (Lib.Sequence.to_seq s) n x /\
Lib.Sequence.index o n == x /\
(forall (i: Lib.IntTypes.size_nat). {:pattern Lib.Sequence.index s i}
... | Prims.Tot | [
"total"
] | [] | [
"Lib.IntTypes.size_nat",
"Lib.Sequence.lseq",
"Prims.b2t",
"Prims.op_LessThan",
"FStar.Seq.Base.upd",
"Prims.l_and",
"Prims.eq2",
"FStar.Seq.Base.seq",
"Lib.Sequence.to_seq",
"Lib.Sequence.index",
"Prims.l_Forall",
"Prims.l_imp",
"Prims.op_disEquality",
"Prims.l_or",
"FStar.Seq.Base.inde... | [] | false | false | false | false | false | let upd #a #len s n x =
| Seq.upd #a s n x | false |
Lib.Sequence.fst | Lib.Sequence.eq_elim | val eq_elim: #a:Type -> #len:size_nat -> s1:lseq a len -> s2:lseq a len ->
Lemma
(requires equal s1 s2)
(ensures s1 == s2)
[SMTPat (equal s1 s2)] | val eq_elim: #a:Type -> #len:size_nat -> s1:lseq a len -> s2:lseq a len ->
Lemma
(requires equal s1 s2)
(ensures s1 == s2)
[SMTPat (equal s1 s2)] | let eq_elim #a #len s1 s2 =
assert (forall (i:nat{i < len}).{:pattern (Seq.index s1 i); (Seq.index s2 i)}
index s1 i == index s2 i);
Seq.lemma_eq_elim #a s1 s2 | {
"file_name": "lib/Lib.Sequence.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 28,
"end_line": 33,
"start_col": 0,
"start_line": 30
} | module Lib.Sequence
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
#set-options "--z3rlimit 30 --max_fuel 0 --max_ifuel 0 --using_facts_from '-* +Prims +FStar.Pervasives +FStar.Math.Lemmas +FStar.Seq +Lib.IntTypes +Lib.Sequence'"
let index #a #len s n = Seq.index s n
let create #a len init = Seq.create #... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Seq.Properties.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"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": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"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_el... | false | s1: Lib.Sequence.lseq a len -> s2: Lib.Sequence.lseq a len
-> FStar.Pervasives.Lemma (requires Lib.Sequence.equal s1 s2)
(ensures s1 == s2)
[SMTPat (Lib.Sequence.equal s1 s2)] | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Lib.IntTypes.size_nat",
"Lib.Sequence.lseq",
"FStar.Seq.Base.lemma_eq_elim",
"Prims.unit",
"Prims._assert",
"Prims.l_Forall",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.eq2",
"Prims.l_or",
"FStar.Seq.Base.index",
"Lib.Sequence.to_seq",
"Lib.Sequence.index"
] | [] | false | false | true | false | false | let eq_elim #a #len s1 s2 =
| assert (forall (i: nat{i < len}). {:pattern (Seq.index s1 i); (Seq.index s2 i)}
index s1 i == index s2 i);
Seq.lemma_eq_elim #a s1 s2 | false |
Lib.Sequence.fst | Lib.Sequence.lemma_concat2 | val lemma_concat2:
#a:Type0
-> len0:size_nat
-> s0:lseq a len0
-> len1:size_nat{len0 + len1 <= max_size_t}
-> s1:lseq a len1
-> s:lseq a (len0 + len1) ->
Lemma
(requires
sub s 0 len0 == s0 /\
sub s len0 len1 == s1)
(ensures s == concat s0 s1) | val lemma_concat2:
#a:Type0
-> len0:size_nat
-> s0:lseq a len0
-> len1:size_nat{len0 + len1 <= max_size_t}
-> s1:lseq a len1
-> s:lseq a (len0 + len1) ->
Lemma
(requires
sub s 0 len0 == s0 /\
sub s len0 len1 == s1)
(ensures s == concat s0 s1) | let lemma_concat2 #a len0 s0 len1 s1 s =
Seq.Properties.lemma_split s len0;
Seq.Properties.lemma_split (concat s0 s1) len0;
Seq.lemma_eq_intro s (concat s0 s1) | {
"file_name": "lib/Lib.Sequence.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 37,
"end_line": 60,
"start_col": 0,
"start_line": 57
} | module Lib.Sequence
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
#set-options "--z3rlimit 30 --max_fuel 0 --max_ifuel 0 --using_facts_from '-* +Prims +FStar.Pervasives +FStar.Math.Lemmas +FStar.Seq +Lib.IntTypes +Lib.Sequence'"
let index #a #len s n = Seq.index s n
let create #a len init = Seq.create #... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Seq.Properties.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"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": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"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_el... | false |
len0: Lib.IntTypes.size_nat ->
s0: Lib.Sequence.lseq a len0 ->
len1: Lib.IntTypes.size_nat{len0 + len1 <= Lib.IntTypes.max_size_t} ->
s1: Lib.Sequence.lseq a len1 ->
s: Lib.Sequence.lseq a (len0 + len1)
-> FStar.Pervasives.Lemma
(requires Lib.Sequence.sub s 0 len0 == s0 /\ Lib.Sequence.sub ... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Lib.IntTypes.size_nat",
"Lib.Sequence.lseq",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_Addition",
"Lib.IntTypes.max_size_t",
"FStar.Seq.Base.lemma_eq_intro",
"Lib.Sequence.concat",
"Prims.unit",
"FStar.Seq.Properties.lemma_split"
] | [] | true | false | true | false | false | let lemma_concat2 #a len0 s0 len1 s1 s =
| Seq.Properties.lemma_split s len0;
Seq.Properties.lemma_split (concat s0 s1) len0;
Seq.lemma_eq_intro s (concat s0 s1) | false |
Lib.Sequence.fst | Lib.Sequence.createi_a | val createi_a : a: Type0 ->
len: Lib.IntTypes.size_nat ->
init: (i: Prims.nat{i < len} -> a) ->
k: Prims.nat{k <= len}
-> Type0 | let createi_a (a:Type) (len:size_nat) (init:(i:nat{i < len} -> a)) (k:nat{k <= len}) =
lseq a k | {
"file_name": "lib/Lib.Sequence.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 10,
"end_line": 71,
"start_col": 0,
"start_line": 70
} | module Lib.Sequence
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
#set-options "--z3rlimit 30 --max_fuel 0 --max_ifuel 0 --using_facts_from '-* +Prims +FStar.Pervasives +FStar.Math.Lemmas +FStar.Seq +Lib.IntTypes +Lib.Sequence'"
let index #a #len s n = Seq.index s n
let create #a len init = Seq.create #... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Seq.Properties.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"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": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"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_el... | false |
a: Type0 ->
len: Lib.IntTypes.size_nat ->
init: (i: Prims.nat{i < len} -> a) ->
k: Prims.nat{k <= len}
-> Type0 | Prims.Tot | [
"total"
] | [] | [
"Lib.IntTypes.size_nat",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.op_LessThanOrEqual",
"Lib.Sequence.lseq"
] | [] | false | false | false | false | true | let createi_a (a: Type) (len: size_nat) (init: (i: nat{i < len} -> a)) (k: nat{k <= len}) =
| lseq a k | false | |
Lib.Sequence.fst | Lib.Sequence.of_list_index | val of_list_index:
#a:Type
-> l:list a{List.Tot.length l <= max_size_t}
-> i:nat{i < List.Tot.length l} ->
Lemma (index (of_list l) i == List.Tot.index l i)
[SMTPat (index (of_list l) i)] | val of_list_index:
#a:Type
-> l:list a{List.Tot.length l <= max_size_t}
-> i:nat{i < List.Tot.length l} ->
Lemma (index (of_list l) i == List.Tot.index l i)
[SMTPat (index (of_list l) i)] | let of_list_index #a l i =
Seq.lemma_seq_of_list_index #a l i | {
"file_name": "lib/Lib.Sequence.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 36,
"end_line": 20,
"start_col": 0,
"start_line": 19
} | module Lib.Sequence
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
#set-options "--z3rlimit 30 --max_fuel 0 --max_ifuel 0 --using_facts_from '-* +Prims +FStar.Pervasives +FStar.Math.Lemmas +FStar.Seq +Lib.IntTypes +Lib.Sequence'"
let index #a #len s n = Seq.index s n
let create #a len init = Seq.create #... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Seq.Properties.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"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": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"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_el... | false |
l: Prims.list a {FStar.List.Tot.Base.length l <= Lib.IntTypes.max_size_t} ->
i: Prims.nat{i < FStar.List.Tot.Base.length l}
-> FStar.Pervasives.Lemma
(ensures Lib.Sequence.index (Lib.Sequence.of_list l) i == FStar.List.Tot.Base.index l i)
[SMTPat (Lib.Sequence.index (Lib.Sequence.of_list l) i)] | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.list",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"FStar.List.Tot.Base.length",
"Lib.IntTypes.max_size_t",
"Prims.nat",
"Prims.op_LessThan",
"FStar.Seq.Properties.lemma_seq_of_list_index",
"Prims.unit"
] | [] | true | false | true | false | false | let of_list_index #a l i =
| Seq.lemma_seq_of_list_index #a l i | false |
Lib.Sequence.fst | Lib.Sequence.equal | val equal (#a:Type) (#len:size_nat) (s1:lseq a len) (s2:lseq a len) : Type0 | val equal (#a:Type) (#len:size_nat) (s1:lseq a len) (s2:lseq a len) : Type0 | let equal #a #len s1 s2 =
forall (i:size_nat{i < len}).{:pattern (index s1 i); (index s2 i)} index s1 i == index s2 i | {
"file_name": "lib/Lib.Sequence.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 93,
"end_line": 23,
"start_col": 0,
"start_line": 22
} | module Lib.Sequence
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
#set-options "--z3rlimit 30 --max_fuel 0 --max_ifuel 0 --using_facts_from '-* +Prims +FStar.Pervasives +FStar.Math.Lemmas +FStar.Seq +Lib.IntTypes +Lib.Sequence'"
let index #a #len s n = Seq.index s n
let create #a len init = Seq.create #... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Seq.Properties.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"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": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"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_el... | false | s1: Lib.Sequence.lseq a len -> s2: Lib.Sequence.lseq a len -> Type0 | Prims.Tot | [
"total"
] | [] | [
"Lib.IntTypes.size_nat",
"Lib.Sequence.lseq",
"Prims.l_Forall",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.eq2",
"Prims.l_or",
"FStar.Seq.Base.index",
"Lib.Sequence.to_seq",
"Lib.Sequence.index"
] | [] | false | false | false | false | true | let equal #a #len s1 s2 =
| forall (i: size_nat{i < len}). {:pattern (index s1 i); (index s2 i)} index s1 i == index s2 i | false |
Lib.Sequence.fst | Lib.Sequence.map | val map:#a:Type -> #b:Type -> #len:size_nat
-> f:(a -> Tot b)
-> s1:lseq a len ->
Tot (s2:lseq b len{(forall (i:nat).
{:pattern (index s2 i)} i < len ==> index s2 i == f s1.[i])}) | val map:#a:Type -> #b:Type -> #len:size_nat
-> f:(a -> Tot b)
-> s1:lseq a len ->
Tot (s2:lseq b len{(forall (i:nat).
{:pattern (index s2 i)} i < len ==> index s2 i == f s1.[i])}) | let map #a #b #len f s =
createi #b len (map_inner #a #b #len f s) | {
"file_name": "lib/Lib.Sequence.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 43,
"end_line": 110,
"start_col": 0,
"start_line": 109
} | module Lib.Sequence
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
#set-options "--z3rlimit 30 --max_fuel 0 --max_ifuel 0 --using_facts_from '-* +Prims +FStar.Pervasives +FStar.Math.Lemmas +FStar.Seq +Lib.IntTypes +Lib.Sequence'"
let index #a #len s n = Seq.index s n
let create #a len init = Seq.create #... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Seq.Properties.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"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": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"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_el... | false | f: (_: a -> b) -> s1: Lib.Sequence.lseq a len
-> s2:
Lib.Sequence.lseq b len
{ forall (i: Prims.nat). {:pattern Lib.Sequence.index s2 i}
i < len ==> Lib.Sequence.index s2 i == f s1.[ i ] } | Prims.Tot | [
"total"
] | [] | [
"Lib.IntTypes.size_nat",
"Lib.Sequence.lseq",
"Lib.Sequence.createi",
"Lib.Sequence.map_inner",
"Prims.l_Forall",
"Prims.nat",
"Prims.l_imp",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.eq2",
"Lib.Sequence.index",
"Lib.Sequence.op_String_Access"
] | [] | false | false | false | false | false | let map #a #b #len f s =
| createi #b len (map_inner #a #b #len f s) | false |
Lib.Sequence.fst | Lib.Sequence.eq_intro | val eq_intro: #a:Type -> #len:size_nat -> s1:lseq a len -> s2:lseq a len ->
Lemma
(requires forall i. {:pattern index s1 i; index s2 i} index s1 i == index s2 i)
(ensures equal s1 s2)
[SMTPat (equal s1 s2)] | val eq_intro: #a:Type -> #len:size_nat -> s1:lseq a len -> s2:lseq a len ->
Lemma
(requires forall i. {:pattern index s1 i; index s2 i} index s1 i == index s2 i)
(ensures equal s1 s2)
[SMTPat (equal s1 s2)] | let eq_intro #a #len s1 s2 =
assert (forall (i:nat{i < len}).{:pattern (Seq.index s1 i); (Seq.index s2 i)}
index s1 i == index s2 i);
Seq.lemma_eq_intro #a (to_seq s1) (to_seq s2) | {
"file_name": "lib/Lib.Sequence.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 47,
"end_line": 28,
"start_col": 0,
"start_line": 25
} | module Lib.Sequence
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
#set-options "--z3rlimit 30 --max_fuel 0 --max_ifuel 0 --using_facts_from '-* +Prims +FStar.Pervasives +FStar.Math.Lemmas +FStar.Seq +Lib.IntTypes +Lib.Sequence'"
let index #a #len s n = Seq.index s n
let create #a len init = Seq.create #... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Seq.Properties.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"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": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"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_el... | false | s1: Lib.Sequence.lseq a len -> s2: Lib.Sequence.lseq a len
-> FStar.Pervasives.Lemma
(requires
forall (i: Lib.IntTypes.size_nat{i < len /\ i < len}).
{:pattern Lib.Sequence.index s1 i; Lib.Sequence.index s2 i}
Lib.Sequence.index s1 i == Lib.Sequence.index s2 i)
(ensures Lib.Seq... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Lib.IntTypes.size_nat",
"Lib.Sequence.lseq",
"FStar.Seq.Base.lemma_eq_intro",
"Lib.Sequence.to_seq",
"Prims.unit",
"Prims._assert",
"Prims.l_Forall",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.eq2",
"Prims.l_or",
"FStar.Seq.Base.index",
"Lib.Sequence.index"
] | [] | false | false | true | false | false | let eq_intro #a #len s1 s2 =
| assert (forall (i: nat{i < len}). {:pattern (Seq.index s1 i); (Seq.index s2 i)}
index s1 i == index s2 i);
Seq.lemma_eq_intro #a (to_seq s1) (to_seq s2) | false |
Lib.Sequence.fst | Lib.Sequence.map2i | val map2i:#a:Type -> #b:Type -> #c:Type -> #len:size_nat
-> f:(i:nat{i < len} -> a -> b -> Tot c)
-> s1:lseq a len
-> s2:lseq b len ->
Tot (s3:lseq c len{(forall (i:nat).
{:pattern (index s3 i)} i < len ==> index s3 i == f i s1.[i] s2.[i])}) | val map2i:#a:Type -> #b:Type -> #c:Type -> #len:size_nat
-> f:(i:nat{i < len} -> a -> b -> Tot c)
-> s1:lseq a len
-> s2:lseq b len ->
Tot (s3:lseq c len{(forall (i:nat).
{:pattern (index s3 i)} i < len ==> index s3 i == f i s1.[i] s2.[i])}) | let map2i #a #b #c #len f s1 s2 =
createi #c len (fun i -> f i s1.[i] s2.[i]) | {
"file_name": "lib/Lib.Sequence.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 45,
"end_line": 113,
"start_col": 0,
"start_line": 112
} | module Lib.Sequence
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
#set-options "--z3rlimit 30 --max_fuel 0 --max_ifuel 0 --using_facts_from '-* +Prims +FStar.Pervasives +FStar.Math.Lemmas +FStar.Seq +Lib.IntTypes +Lib.Sequence'"
let index #a #len s n = Seq.index s n
let create #a len init = Seq.create #... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Seq.Properties.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"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": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"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_el... | false |
f: (i: Prims.nat{i < len} -> _: a -> _: b -> c) ->
s1: Lib.Sequence.lseq a len ->
s2: Lib.Sequence.lseq b len
-> s3:
Lib.Sequence.lseq c len
{ forall (i: Prims.nat). {:pattern Lib.Sequence.index s3 i}
i < len ==> Lib.Sequence.index s3 i == f i s1.[ i ] s2.[ i ] } | Prims.Tot | [
"total"
] | [] | [
"Lib.IntTypes.size_nat",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"Lib.Sequence.lseq",
"Lib.Sequence.createi",
"Lib.Sequence.op_String_Access",
"Prims.l_Forall",
"Prims.l_imp",
"Prims.eq2",
"Lib.Sequence.index"
] | [] | false | false | false | false | false | let map2i #a #b #c #len f s1 s2 =
| createi #c len (fun i -> f i s1.[ i ] s2.[ i ]) | false |
Lib.Sequence.fst | Lib.Sequence.update_sub | val update_sub:
#a:Type
-> #len:size_nat
-> i:lseq a len
-> start:size_nat
-> n:size_nat{start + n <= len}
-> x:lseq a n ->
Tot (o:lseq a len{sub o start n == x /\
(forall (k:nat{(0 <= k /\ k < start) \/ (start + n <= k /\ k < len)}).
{:pattern (index o k)} index o k == index i k)}) | val update_sub:
#a:Type
-> #len:size_nat
-> i:lseq a len
-> start:size_nat
-> n:size_nat{start + n <= len}
-> x:lseq a n ->
Tot (o:lseq a len{sub o start n == x /\
(forall (k:nat{(0 <= k /\ k < start) \/ (start + n <= k /\ k < len)}).
{:pattern (index o k)} index o k == index i k)}) | let update_sub #a #len s start n x =
let o =
Seq.append
(Seq.append (Seq.slice s 0 start) x)
(Seq.slice s (start + n) (length s)) in
Seq.lemma_eq_intro (Seq.slice o start (start + n)) x;
o | {
"file_name": "lib/Lib.Sequence.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 3,
"end_line": 47,
"start_col": 0,
"start_line": 41
} | module Lib.Sequence
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
#set-options "--z3rlimit 30 --max_fuel 0 --max_ifuel 0 --using_facts_from '-* +Prims +FStar.Pervasives +FStar.Math.Lemmas +FStar.Seq +Lib.IntTypes +Lib.Sequence'"
let index #a #len s n = Seq.index s n
let create #a len init = Seq.create #... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Seq.Properties.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"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": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"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_el... | false |
i: Lib.Sequence.lseq a len ->
start: Lib.IntTypes.size_nat ->
n: Lib.IntTypes.size_nat{start + n <= len} ->
x: Lib.Sequence.lseq a n
-> o:
Lib.Sequence.lseq a len
{ Lib.Sequence.sub o start n == x /\
(forall (k: Prims.nat{0 <= k /\ k < start \/ start + n <= k /\ k < len}).
... | Prims.Tot | [
"total"
] | [] | [
"Lib.IntTypes.size_nat",
"Lib.Sequence.lseq",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_Addition",
"Prims.unit",
"FStar.Seq.Base.lemma_eq_intro",
"FStar.Seq.Base.slice",
"FStar.Seq.Base.seq",
"FStar.Seq.Base.append",
"Lib.Sequence.length",
"Prims.l_and",
"Prims.eq2",
"Lib.Sequence... | [] | false | false | false | false | false | let update_sub #a #len s start n x =
| let o = Seq.append (Seq.append (Seq.slice s 0 start) x) (Seq.slice s (start + n) (length s)) in
Seq.lemma_eq_intro (Seq.slice o start (start + n)) x;
o | false |
Lib.Sequence.fst | Lib.Sequence.sub | val sub:
#a:Type
-> #len:size_nat
-> s1:lseq a len
-> start:size_nat
-> n:size_nat{start + n <= len} ->
Tot (s2:lseq a n{to_seq s2 == Seq.slice (to_seq s1) start (start + n) /\
(forall (k:nat{k < n}). {:pattern (index s2 k)} index s2 k == index s1 (start + k))}) | val sub:
#a:Type
-> #len:size_nat
-> s1:lseq a len
-> start:size_nat
-> n:size_nat{start + n <= len} ->
Tot (s2:lseq a n{to_seq s2 == Seq.slice (to_seq s1) start (start + n) /\
(forall (k:nat{k < n}). {:pattern (index s2 k)} index s2 k == index s1 (start + k))}) | let sub #a #len s start n = Seq.slice #a s start (start + n) | {
"file_name": "lib/Lib.Sequence.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 60,
"end_line": 39,
"start_col": 0,
"start_line": 39
} | module Lib.Sequence
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
#set-options "--z3rlimit 30 --max_fuel 0 --max_ifuel 0 --using_facts_from '-* +Prims +FStar.Pervasives +FStar.Math.Lemmas +FStar.Seq +Lib.IntTypes +Lib.Sequence'"
let index #a #len s n = Seq.index s n
let create #a len init = Seq.create #... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Seq.Properties.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"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": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"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_el... | false |
s1: Lib.Sequence.lseq a len ->
start: Lib.IntTypes.size_nat ->
n: Lib.IntTypes.size_nat{start + n <= len}
-> s2:
Lib.Sequence.lseq a n
{ Lib.Sequence.to_seq s2 == FStar.Seq.Base.slice (Lib.Sequence.to_seq s1) start (start + n) /\
(forall (k: Prims.nat{k < n}). {:pattern Lib.Sequence.ind... | Prims.Tot | [
"total"
] | [] | [
"Lib.IntTypes.size_nat",
"Lib.Sequence.lseq",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_Addition",
"FStar.Seq.Base.slice",
"Prims.l_and",
"Prims.eq2",
"FStar.Seq.Base.seq",
"Lib.Sequence.to_seq",
"Prims.l_Forall",
"Prims.nat",
"Prims.op_LessThan",
"Prims.l_or",
"FStar.Seq.Base.i... | [] | false | false | false | false | false | let sub #a #len s start n =
| Seq.slice #a s start (start + n) | false |
Lib.Sequence.fst | Lib.Sequence.mapi | val mapi:#a:Type -> #b:Type -> #len:size_nat
-> f:(i:nat{i < len} -> a -> Tot b)
-> s1:lseq a len ->
Tot (s2:lseq b len{(forall (i:nat).
{:pattern (index s2 i)} i < len ==> index s2 i == f i s1.[i])}) | val mapi:#a:Type -> #b:Type -> #len:size_nat
-> f:(i:nat{i < len} -> a -> Tot b)
-> s1:lseq a len ->
Tot (s2:lseq b len{(forall (i:nat).
{:pattern (index s2 i)} i < len ==> index s2 i == f i s1.[i])}) | let mapi #a #b #len f s =
createi #b len (mapi_inner #a #b #len f s) | {
"file_name": "lib/Lib.Sequence.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 44,
"end_line": 102,
"start_col": 0,
"start_line": 101
} | module Lib.Sequence
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
#set-options "--z3rlimit 30 --max_fuel 0 --max_ifuel 0 --using_facts_from '-* +Prims +FStar.Pervasives +FStar.Math.Lemmas +FStar.Seq +Lib.IntTypes +Lib.Sequence'"
let index #a #len s n = Seq.index s n
let create #a len init = Seq.create #... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Seq.Properties.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"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": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"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_el... | false | f: (i: Prims.nat{i < len} -> _: a -> b) -> s1: Lib.Sequence.lseq a len
-> s2:
Lib.Sequence.lseq b len
{ forall (i: Prims.nat). {:pattern Lib.Sequence.index s2 i}
i < len ==> Lib.Sequence.index s2 i == f i s1.[ i ] } | Prims.Tot | [
"total"
] | [] | [
"Lib.IntTypes.size_nat",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"Lib.Sequence.lseq",
"Lib.Sequence.createi",
"Lib.Sequence.mapi_inner",
"Prims.l_Forall",
"Prims.l_imp",
"Prims.eq2",
"Lib.Sequence.index",
"Lib.Sequence.op_String_Access"
] | [] | false | false | false | false | false | let mapi #a #b #len f s =
| createi #b len (mapi_inner #a #b #len f s) | false |
Lib.Sequence.fst | Lib.Sequence.generate_blocks_simple_a | val generate_blocks_simple_a : a: Type0 -> bs: Lib.IntTypes.size_nat -> max: Prims.nat -> i: Prims.nat{i <= max} -> Type0 | let generate_blocks_simple_a (a:Type) (bs:size_nat) (max:nat) (i:nat{i <= max}) = s:seq a{length s == i * bs} | {
"file_name": "lib/Lib.Sequence.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 109,
"end_line": 210,
"start_col": 0,
"start_line": 210
} | module Lib.Sequence
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
#set-options "--z3rlimit 30 --max_fuel 0 --max_ifuel 0 --using_facts_from '-* +Prims +FStar.Pervasives +FStar.Math.Lemmas +FStar.Seq +Lib.IntTypes +Lib.Sequence'"
let index #a #len s n = Seq.index s n
let create #a len init = Seq.create #... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Seq.Properties.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"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": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"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_el... | false | a: Type0 -> bs: Lib.IntTypes.size_nat -> max: Prims.nat -> i: Prims.nat{i <= max} -> Type0 | Prims.Tot | [
"total"
] | [] | [
"Lib.IntTypes.size_nat",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Lib.Sequence.seq",
"Prims.eq2",
"Prims.int",
"Lib.Sequence.length",
"FStar.Mul.op_Star"
] | [] | false | false | false | false | true | let generate_blocks_simple_a (a: Type) (bs: size_nat) (max: nat) (i: nat{i <= max}) =
| s: seq a {length s == i * bs} | false | |
Lib.Sequence.fst | Lib.Sequence.generate_blocks_a | val generate_blocks_a : t: Type0 ->
blocklen: Lib.IntTypes.size_nat ->
max: Prims.nat ->
a: (i: Prims.nat{i <= max} -> Type) ->
i: Prims.nat{i <= max}
-> Type | let generate_blocks_a (t:Type) (blocklen:size_nat) (max:nat) (a:(i:nat{i <= max} -> Type)) (i:nat{i <= max}) = a i & s:seq t{length s == i * blocklen} | {
"file_name": "lib/Lib.Sequence.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 150,
"end_line": 198,
"start_col": 0,
"start_line": 198
} | module Lib.Sequence
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
#set-options "--z3rlimit 30 --max_fuel 0 --max_ifuel 0 --using_facts_from '-* +Prims +FStar.Pervasives +FStar.Math.Lemmas +FStar.Seq +Lib.IntTypes +Lib.Sequence'"
let index #a #len s n = Seq.index s n
let create #a len init = Seq.create #... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Seq.Properties.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"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": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"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_el... | false |
t: Type0 ->
blocklen: Lib.IntTypes.size_nat ->
max: Prims.nat ->
a: (i: Prims.nat{i <= max} -> Type) ->
i: Prims.nat{i <= max}
-> Type | Prims.Tot | [
"total"
] | [] | [
"Lib.IntTypes.size_nat",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"FStar.Pervasives.Native.tuple2",
"Lib.Sequence.seq",
"Prims.eq2",
"Prims.int",
"Lib.Sequence.length",
"FStar.Mul.op_Star"
] | [] | false | false | false | false | true | let generate_blocks_a
(t: Type)
(blocklen: size_nat)
(max: nat)
(a: (i: nat{i <= max} -> Type))
(i: nat{i <= max})
=
| a i & s: seq t {length s == i * blocklen} | false | |
Lib.Sequence.fst | Lib.Sequence.map2 | val map2:#a:Type -> #b:Type -> #c:Type -> #len:size_nat
-> f:(a -> b -> Tot c)
-> s1:lseq a len
-> s2:lseq b len ->
Tot (s3:lseq c len{(forall (i:nat).
{:pattern (index s3 i)} i < len ==> index s3 i == f s1.[i] s2.[i])}) | val map2:#a:Type -> #b:Type -> #c:Type -> #len:size_nat
-> f:(a -> b -> Tot c)
-> s1:lseq a len
-> s2:lseq b len ->
Tot (s3:lseq c len{(forall (i:nat).
{:pattern (index s3 i)} i < len ==> index s3 i == f s1.[i] s2.[i])}) | let map2 #a #b #c #len f s1 s2 =
createi #c len (map2_inner #a #b #c #len f s1 s2) | {
"file_name": "lib/Lib.Sequence.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 51,
"end_line": 121,
"start_col": 0,
"start_line": 120
} | module Lib.Sequence
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
#set-options "--z3rlimit 30 --max_fuel 0 --max_ifuel 0 --using_facts_from '-* +Prims +FStar.Pervasives +FStar.Math.Lemmas +FStar.Seq +Lib.IntTypes +Lib.Sequence'"
let index #a #len s n = Seq.index s n
let create #a len init = Seq.create #... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Seq.Properties.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"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": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"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_el... | false | f: (_: a -> _: b -> c) -> s1: Lib.Sequence.lseq a len -> s2: Lib.Sequence.lseq b len
-> s3:
Lib.Sequence.lseq c len
{ forall (i: Prims.nat). {:pattern Lib.Sequence.index s3 i}
i < len ==> Lib.Sequence.index s3 i == f s1.[ i ] s2.[ i ] } | Prims.Tot | [
"total"
] | [] | [
"Lib.IntTypes.size_nat",
"Lib.Sequence.lseq",
"Lib.Sequence.createi",
"Lib.Sequence.map2_inner",
"Prims.l_Forall",
"Prims.nat",
"Prims.l_imp",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.eq2",
"Lib.Sequence.index",
"Lib.Sequence.op_String_Access"
] | [] | false | false | false | false | false | let map2 #a #b #c #len f s1 s2 =
| createi #c len (map2_inner #a #b #c #len f s1 s2) | false |
LowParse.Low.IfThenElse.fst | LowParse.Low.IfThenElse.clens_ifthenelse_payload | val clens_ifthenelse_payload
(#p: parse_ifthenelse_param)
(s: serialize_ifthenelse_param p)
(b: bool)
: Tot (clens p.parse_ifthenelse_t (p.parse_ifthenelse_payload_t b)) | val clens_ifthenelse_payload
(#p: parse_ifthenelse_param)
(s: serialize_ifthenelse_param p)
(b: bool)
: Tot (clens p.parse_ifthenelse_t (p.parse_ifthenelse_payload_t b)) | let clens_ifthenelse_payload
(#p: parse_ifthenelse_param)
(s: serialize_ifthenelse_param p)
(b: bool)
: Tot (clens p.parse_ifthenelse_t (p.parse_ifthenelse_payload_t b))
= {
clens_cond = (fun (x: p.parse_ifthenelse_t) -> p.parse_ifthenelse_tag_cond (dfst (s.serialize_ifthenelse_synth_recip x)) == b);
clen... | {
"file_name": "src/lowparse/LowParse.Low.IfThenElse.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 3,
"end_line": 175,
"start_col": 0,
"start_line": 167
} | module LowParse.Low.IfThenElse
include LowParse.Spec.IfThenElse
include LowParse.Low.Combinators
module U32 = FStar.UInt32
module HS = FStar.HyperStack
module HST = FStar.HyperStack.ST
module B = LowStar.Buffer
module Cast = FStar.Int.Cast
module U64 = FStar.UInt64
let valid_ifthenelse_intro
(p: parse_ifthenelse_pa... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"LowParse.Spec.IfThenElse.fst.checked",
"LowParse.Low.Combinators.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Int.Cast.fst.... | [
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": "FStar.Int.Cast",
"short_module": "Cast"
},
{
"abbrev": true,
"full_module": "LowStar.Buffer",
"short_module": "B"
},
{
"abbrev": true,
"full_module": "F... | {
"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_el... | false | s: LowParse.Spec.IfThenElse.serialize_ifthenelse_param p -> b: Prims.bool
-> LowParse.Low.Base.Spec.clens (Mkparse_ifthenelse_param?.parse_ifthenelse_t p)
(Mkparse_ifthenelse_param?.parse_ifthenelse_payload_t p b) | Prims.Tot | [
"total"
] | [] | [
"LowParse.Spec.IfThenElse.parse_ifthenelse_param",
"LowParse.Spec.IfThenElse.serialize_ifthenelse_param",
"Prims.bool",
"LowParse.Low.Base.Spec.Mkclens",
"LowParse.Spec.IfThenElse.__proj__Mkparse_ifthenelse_param__item__parse_ifthenelse_t",
"LowParse.Spec.IfThenElse.__proj__Mkparse_ifthenelse_param__item_... | [] | false | false | false | false | false | let clens_ifthenelse_payload
(#p: parse_ifthenelse_param)
(s: serialize_ifthenelse_param p)
(b: bool)
: Tot (clens p.parse_ifthenelse_t (p.parse_ifthenelse_payload_t b)) =
| {
clens_cond
=
(fun (x: p.parse_ifthenelse_t) ->
p.parse_ifthenelse_tag_cond (dfst (s.serialize_ifthenelse_synth_recip x)) == b);
clens_get
=
(fun (x: p.parse_ifthenelse_t) ->
dsnd (s.serialize_ifthenelse_synth_recip x)
<:
Ghost (p.parse_ifthenelse_payload_t b)
(requires (p.p... | false |
LowParse.Low.IfThenElse.fst | LowParse.Low.IfThenElse.gaccessor_ifthenelse_payload'' | val gaccessor_ifthenelse_payload''
(#p: parse_ifthenelse_param)
(s: serialize_ifthenelse_param p)
(b: bool)
(input: bytes)
: Ghost nat
(requires
(gaccessor_pre (parse_ifthenelse p)
(dsnd (p.parse_ifthenelse_payload_parser b))
(clens_ifthenelse_payload s ... | val gaccessor_ifthenelse_payload''
(#p: parse_ifthenelse_param)
(s: serialize_ifthenelse_param p)
(b: bool)
(input: bytes)
: Ghost nat
(requires
(gaccessor_pre (parse_ifthenelse p)
(dsnd (p.parse_ifthenelse_payload_parser b))
(clens_ifthenelse_payload s ... | let gaccessor_ifthenelse_payload''
(#p: parse_ifthenelse_param)
(s: serialize_ifthenelse_param p)
(b: bool)
(input: bytes)
: Ghost nat
(requires (
gaccessor_pre (parse_ifthenelse p) (dsnd (p.parse_ifthenelse_payload_parser b)) (clens_ifthenelse_payload s b) input
))
(ensures (fun res ->
gaccessor_... | {
"file_name": "src/lowparse/LowParse.Low.IfThenElse.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 12,
"end_line": 192,
"start_col": 0,
"start_line": 177
} | module LowParse.Low.IfThenElse
include LowParse.Spec.IfThenElse
include LowParse.Low.Combinators
module U32 = FStar.UInt32
module HS = FStar.HyperStack
module HST = FStar.HyperStack.ST
module B = LowStar.Buffer
module Cast = FStar.Int.Cast
module U64 = FStar.UInt64
let valid_ifthenelse_intro
(p: parse_ifthenelse_pa... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"LowParse.Spec.IfThenElse.fst.checked",
"LowParse.Low.Combinators.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Int.Cast.fst.... | [
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": "FStar.Int.Cast",
"short_module": "Cast"
},
{
"abbrev": true,
"full_module": "LowStar.Buffer",
"short_module": "B"
},
{
"abbrev": true,
"full_module": "F... | {
"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_el... | false |
s: LowParse.Spec.IfThenElse.serialize_ifthenelse_param p ->
b: Prims.bool ->
input: LowParse.Bytes.bytes
-> Prims.Ghost Prims.nat | Prims.Ghost | [] | [] | [
"LowParse.Spec.IfThenElse.parse_ifthenelse_param",
"LowParse.Spec.IfThenElse.serialize_ifthenelse_param",
"Prims.bool",
"LowParse.Bytes.bytes",
"LowParse.Spec.IfThenElse.__proj__Mkparse_ifthenelse_param__item__parse_ifthenelse_tag_t",
"LowParse.Spec.Base.consumed_length",
"Prims.nat",
"FStar.Pervasive... | [] | false | false | false | false | false | let gaccessor_ifthenelse_payload''
(#p: parse_ifthenelse_param)
(s: serialize_ifthenelse_param p)
(b: bool)
(input: bytes)
: Ghost nat
(requires
(gaccessor_pre (parse_ifthenelse p)
(dsnd (p.parse_ifthenelse_payload_parser b))
(clens_ifthenelse_payload s ... | parse_ifthenelse_eq p input;
parse_ifthenelse_parse_tag_payload s input;
let Some (t, consumed) = parse p.parse_ifthenelse_tag_parser input in
consumed | false |
Lib.Sequence.fst | Lib.Sequence.createi | val createi: #a:Type
-> len:size_nat
-> init:(i:nat{i < len} -> a) ->
Tot (s:lseq a len{(forall (i:nat).
{:pattern (index s i)} i < len ==> index s i == init i)}) | val createi: #a:Type
-> len:size_nat
-> init:(i:nat{i < len} -> a) ->
Tot (s:lseq a len{(forall (i:nat).
{:pattern (index s i)} i < len ==> index s i == init i)}) | let createi #a len init_f =
repeat_gen_inductive len
(createi_a a len init_f)
(createi_pred a len init_f)
(createi_step a len init_f)
(of_list []) | {
"file_name": "lib/Lib.Sequence.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 16,
"end_line": 92,
"start_col": 0,
"start_line": 87
} | module Lib.Sequence
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
#set-options "--z3rlimit 30 --max_fuel 0 --max_ifuel 0 --using_facts_from '-* +Prims +FStar.Pervasives +FStar.Math.Lemmas +FStar.Seq +Lib.IntTypes +Lib.Sequence'"
let index #a #len s n = Seq.index s n
let create #a len init = Seq.create #... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Seq.Properties.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"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": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 1,
"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_el... | false | len: Lib.IntTypes.size_nat -> init: (i: Prims.nat{i < len} -> a)
-> s:
Lib.Sequence.lseq a len
{ forall (i: Prims.nat). {:pattern Lib.Sequence.index s i}
i < len ==> Lib.Sequence.index s i == init i } | Prims.Tot | [
"total"
] | [] | [
"Lib.IntTypes.size_nat",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"Lib.LoopCombinators.repeat_gen_inductive",
"Lib.Sequence.createi_a",
"Lib.Sequence.createi_pred",
"Lib.Sequence.createi_step",
"Lib.Sequence.of_list",
"Prims.Nil",
"Lib.Sequence.lseq",
"Prims.l_Forall",
"Prims.l_imp",
... | [] | false | false | false | false | false | let createi #a len init_f =
| repeat_gen_inductive len
(createi_a a len init_f)
(createi_pred a len init_f)
(createi_step a len init_f)
(of_list []) | false |
Lib.Sequence.fst | Lib.Sequence.createi_step | val createi_step
(a: Type)
(len: size_nat)
(init: (i: nat{i < len} -> a))
(i: nat{i < len})
(si: createi_a a len init i)
: r:
createi_a a len init (i + 1)
{createi_pred a len init i si ==> createi_pred a len init (i + 1) r} | val createi_step
(a: Type)
(len: size_nat)
(init: (i: nat{i < len} -> a))
(i: nat{i < len})
(si: createi_a a len init i)
: r:
createi_a a len init (i + 1)
{createi_pred a len init i si ==> createi_pred a len init (i + 1) r} | let createi_step (a:Type) (len:size_nat) (init:(i:nat{i < len} -> a)) (i:nat{i < len})
(si:createi_a a len init i)
: r:createi_a a len init (i + 1)
{createi_pred a len init i si ==> createi_pred a len init (i + 1) r}
=
assert (createi_pred a len init i si ==> (forall (j:nat). j < i ==> inde... | {
"file_name": "lib/Lib.Sequence.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 22,
"end_line": 83,
"start_col": 0,
"start_line": 77
} | module Lib.Sequence
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
#set-options "--z3rlimit 30 --max_fuel 0 --max_ifuel 0 --using_facts_from '-* +Prims +FStar.Pervasives +FStar.Math.Lemmas +FStar.Seq +Lib.IntTypes +Lib.Sequence'"
let index #a #len s n = Seq.index s n
let create #a len init = Seq.create #... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Seq.Properties.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"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": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"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_el... | false |
a: Type0 ->
len: Lib.IntTypes.size_nat ->
init: (i: Prims.nat{i < len} -> a) ->
i: Prims.nat{i < len} ->
si: Lib.Sequence.createi_a a len init i
-> r:
Lib.Sequence.createi_a a len init (i + 1)
{Lib.Sequence.createi_pred a len init i si ==> Lib.Sequence.createi_pred a len init (i + 1) r} | Prims.Tot | [
"total"
] | [] | [
"Lib.IntTypes.size_nat",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"Lib.Sequence.createi_a",
"FStar.Seq.Properties.snoc",
"Prims.unit",
"Prims._assert",
"Prims.l_imp",
"Lib.Sequence.createi_pred",
"Prims.l_Forall",
"Prims.eq2",
"Lib.Sequence.index",
"Prims.op_Addition"
] | [] | false | false | false | false | false | let createi_step
(a: Type)
(len: size_nat)
(init: (i: nat{i < len} -> a))
(i: nat{i < len})
(si: createi_a a len init i)
: r:
createi_a a len init (i + 1)
{createi_pred a len init i si ==> createi_pred a len init (i + 1) r} =
| assert (createi_pred a len init i si ==> (forall (j: nat). j < i ==> index si j == init j));
Seq.snoc si (init i) | false |
Lib.Sequence.fst | Lib.Sequence.createi_pred | val createi_pred : a: Type0 ->
len: Lib.IntTypes.size_nat ->
init: (i: Prims.nat{i < len} -> a) ->
k: Prims.nat{k <= len} ->
s: Lib.Sequence.createi_a a len init k
-> Prims.logical | let createi_pred (a:Type) (len:size_nat) (init:(i:nat{i < len} -> a)) (k:nat{k <= len})
(s:createi_a a len init k) =
forall (i:nat).{:pattern (index s i)} i < k ==> index s i == init i | {
"file_name": "lib/Lib.Sequence.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 69,
"end_line": 75,
"start_col": 0,
"start_line": 73
} | module Lib.Sequence
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
#set-options "--z3rlimit 30 --max_fuel 0 --max_ifuel 0 --using_facts_from '-* +Prims +FStar.Pervasives +FStar.Math.Lemmas +FStar.Seq +Lib.IntTypes +Lib.Sequence'"
let index #a #len s n = Seq.index s n
let create #a len init = Seq.create #... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Seq.Properties.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"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": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"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_el... | false |
a: Type0 ->
len: Lib.IntTypes.size_nat ->
init: (i: Prims.nat{i < len} -> a) ->
k: Prims.nat{k <= len} ->
s: Lib.Sequence.createi_a a len init k
-> Prims.logical | Prims.Tot | [
"total"
] | [] | [
"Lib.IntTypes.size_nat",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.op_LessThanOrEqual",
"Lib.Sequence.createi_a",
"Prims.l_Forall",
"Prims.l_imp",
"Prims.eq2",
"Lib.Sequence.index",
"Prims.logical"
] | [] | false | false | false | false | true | let createi_pred
(a: Type)
(len: size_nat)
(init: (i: nat{i < len} -> a))
(k: nat{k <= len})
(s: createi_a a len init k)
=
| forall (i: nat). {:pattern (index s i)} i < k ==> index s i == init i | false | |
Lib.Sequence.fst | Lib.Sequence.seq_sub | val seq_sub:
#a:Type
-> s1:seq a
-> start:nat
-> n:nat{start + n <= length s1}
-> s2:seq a{length s2 == n /\
(forall (k:nat{k < n}). {:pattern (Seq.index s2 k)} Seq.index s2 k == Seq.index s1 (start + k))} | val seq_sub:
#a:Type
-> s1:seq a
-> start:nat
-> n:nat{start + n <= length s1}
-> s2:seq a{length s2 == n /\
(forall (k:nat{k < n}). {:pattern (Seq.index s2 k)} Seq.index s2 k == Seq.index s1 (start + k))} | let seq_sub #a s start n =
Seq.slice #a s start (start + n) | {
"file_name": "lib/Lib.Sequence.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 34,
"end_line": 138,
"start_col": 0,
"start_line": 137
} | module Lib.Sequence
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
#set-options "--z3rlimit 30 --max_fuel 0 --max_ifuel 0 --using_facts_from '-* +Prims +FStar.Pervasives +FStar.Math.Lemmas +FStar.Seq +Lib.IntTypes +Lib.Sequence'"
let index #a #len s n = Seq.index s n
let create #a len init = Seq.create #... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Seq.Properties.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"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": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"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_el... | false | s1: Lib.Sequence.seq a -> start: Prims.nat -> n: Prims.nat{start + n <= Lib.Sequence.length s1}
-> s2:
Lib.Sequence.seq a
{ Lib.Sequence.length s2 == n /\
(forall (k: Prims.nat{k < n}). {:pattern FStar.Seq.Base.index s2 k}
FStar.Seq.Base.index s2 k == FStar.Seq.Base.index s1 (start + k))... | Prims.Tot | [
"total"
] | [] | [
"Lib.Sequence.seq",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_Addition",
"Lib.Sequence.length",
"FStar.Seq.Base.slice",
"Prims.l_and",
"Prims.eq2",
"Prims.l_Forall",
"Prims.op_LessThan",
"FStar.Seq.Base.index"
] | [] | false | false | false | false | false | let seq_sub #a s start n =
| Seq.slice #a s start (start + n) | false |
Lib.Sequence.fst | Lib.Sequence.for_all2 | val for_all2:#a:Type -> #b:Type -> #len:size_nat
-> (a -> b -> Tot bool)
-> s1:lseq a len
-> s2:lseq b len ->
Tot bool | val for_all2:#a:Type -> #b:Type -> #len:size_nat
-> (a -> b -> Tot bool)
-> s1:lseq a len
-> s2:lseq b len ->
Tot bool | let for_all2 #a #b #len f x y =
let r = map2 (fun xi yi -> f xi yi) x y in
Seq.for_all (fun bi -> bi = true) r | {
"file_name": "lib/Lib.Sequence.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 37,
"end_line": 127,
"start_col": 0,
"start_line": 125
} | module Lib.Sequence
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
#set-options "--z3rlimit 30 --max_fuel 0 --max_ifuel 0 --using_facts_from '-* +Prims +FStar.Pervasives +FStar.Math.Lemmas +FStar.Seq +Lib.IntTypes +Lib.Sequence'"
let index #a #len s n = Seq.index s n
let create #a len init = Seq.create #... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Seq.Properties.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"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": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"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_el... | false | f: (_: a -> _: b -> Prims.bool) -> s1: Lib.Sequence.lseq a len -> s2: Lib.Sequence.lseq b len
-> Prims.bool | Prims.Tot | [
"total"
] | [] | [
"Lib.IntTypes.size_nat",
"Prims.bool",
"Lib.Sequence.lseq",
"FStar.Seq.Properties.for_all",
"Prims.op_Equality",
"Prims.l_Forall",
"Prims.nat",
"Prims.l_imp",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.eq2",
"Lib.Sequence.index",
"Lib.Sequence.map2"
] | [] | false | false | false | false | false | let for_all2 #a #b #len f x y =
| let r = map2 (fun xi yi -> f xi yi) x y in
Seq.for_all (fun bi -> bi = true) r | false |
Lib.Sequence.fst | Lib.Sequence.lemma_concat3 | val lemma_concat3:
#a:Type0
-> len0:size_nat
-> s0:lseq a len0
-> len1:size_nat{len0 + len1 <= max_size_t}
-> s1:lseq a len1
-> len2:size_nat{len0 + len1 + len2 <= max_size_t}
-> s2:lseq a len2
-> s:lseq a (len0 + len1 + len2) ->
Lemma
(requires
sub s 0 len0 == s0 /\
sub s len0 len1 ... | val lemma_concat3:
#a:Type0
-> len0:size_nat
-> s0:lseq a len0
-> len1:size_nat{len0 + len1 <= max_size_t}
-> s1:lseq a len1
-> len2:size_nat{len0 + len1 + len2 <= max_size_t}
-> s2:lseq a len2
-> s:lseq a (len0 + len1 + len2) ->
Lemma
(requires
sub s 0 len0 == s0 /\
sub s len0 len1 ... | let lemma_concat3 #a len0 s0 len1 s1 len2 s2 s =
let s' = concat (concat s0 s1) s2 in
Seq.Properties.lemma_split (sub s 0 (len0 + len1)) len0;
Seq.Properties.lemma_split (sub s' 0 (len0 + len1)) len0;
Seq.Properties.lemma_split s (len0 + len1);
Seq.Properties.lemma_split s' (len0 + len1);
Seq.lemma_eq_intro... | {
"file_name": "lib/Lib.Sequence.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 49,
"end_line": 68,
"start_col": 0,
"start_line": 62
} | module Lib.Sequence
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
#set-options "--z3rlimit 30 --max_fuel 0 --max_ifuel 0 --using_facts_from '-* +Prims +FStar.Pervasives +FStar.Math.Lemmas +FStar.Seq +Lib.IntTypes +Lib.Sequence'"
let index #a #len s n = Seq.index s n
let create #a len init = Seq.create #... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Seq.Properties.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"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": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"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_el... | false |
len0: Lib.IntTypes.size_nat ->
s0: Lib.Sequence.lseq a len0 ->
len1: Lib.IntTypes.size_nat{len0 + len1 <= Lib.IntTypes.max_size_t} ->
s1: Lib.Sequence.lseq a len1 ->
len2: Lib.IntTypes.size_nat{len0 + len1 + len2 <= Lib.IntTypes.max_size_t} ->
s2: Lib.Sequence.lseq a len2 ->
s: Lib.Sequence... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Lib.IntTypes.size_nat",
"Lib.Sequence.lseq",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_Addition",
"Lib.IntTypes.max_size_t",
"FStar.Seq.Base.lemma_eq_intro",
"Lib.Sequence.concat",
"Prims.unit",
"FStar.Seq.Properties.lemma_split",
"Lib.Sequence.sub",
"Prims.eq2",
"FStar.Seq.Base.se... | [] | true | false | true | false | false | let lemma_concat3 #a len0 s0 len1 s1 len2 s2 s =
| let s' = concat (concat s0 s1) s2 in
Seq.Properties.lemma_split (sub s 0 (len0 + len1)) len0;
Seq.Properties.lemma_split (sub s' 0 (len0 + len1)) len0;
Seq.Properties.lemma_split s (len0 + len1);
Seq.Properties.lemma_split s' (len0 + len1);
Seq.lemma_eq_intro s (concat (concat s0 s1) s2) | false |
LowParse.Low.IfThenElse.fst | LowParse.Low.IfThenElse.gaccessor_ifthenelse_tag | val gaccessor_ifthenelse_tag (#p: parse_ifthenelse_param) (s: serialize_ifthenelse_param p)
: Tot (gaccessor (parse_ifthenelse p) p.parse_ifthenelse_tag_parser (clens_ifthenelse_tag s)) | val gaccessor_ifthenelse_tag (#p: parse_ifthenelse_param) (s: serialize_ifthenelse_param p)
: Tot (gaccessor (parse_ifthenelse p) p.parse_ifthenelse_tag_parser (clens_ifthenelse_tag s)) | let gaccessor_ifthenelse_tag
(#p: parse_ifthenelse_param)
(s: serialize_ifthenelse_param p)
: Tot (gaccessor (parse_ifthenelse p) p.parse_ifthenelse_tag_parser (clens_ifthenelse_tag s))
= gaccessor_prop_equiv (parse_ifthenelse p) p.parse_ifthenelse_tag_parser (clens_ifthenelse_tag s) (gaccessor_ifthenelse_tag' s);
... | {
"file_name": "src/lowparse/LowParse.Low.IfThenElse.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 29,
"end_line": 155,
"start_col": 0,
"start_line": 150
} | module LowParse.Low.IfThenElse
include LowParse.Spec.IfThenElse
include LowParse.Low.Combinators
module U32 = FStar.UInt32
module HS = FStar.HyperStack
module HST = FStar.HyperStack.ST
module B = LowStar.Buffer
module Cast = FStar.Int.Cast
module U64 = FStar.UInt64
let valid_ifthenelse_intro
(p: parse_ifthenelse_pa... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"LowParse.Spec.IfThenElse.fst.checked",
"LowParse.Low.Combinators.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Int.Cast.fst.... | [
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": "FStar.Int.Cast",
"short_module": "Cast"
},
{
"abbrev": true,
"full_module": "LowStar.Buffer",
"short_module": "B"
},
{
"abbrev": true,
"full_module": "F... | {
"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_el... | false | s: LowParse.Spec.IfThenElse.serialize_ifthenelse_param p
-> LowParse.Low.Base.Spec.gaccessor (LowParse.Spec.IfThenElse.parse_ifthenelse p)
(Mkparse_ifthenelse_param?.parse_ifthenelse_tag_parser p)
(LowParse.Low.IfThenElse.clens_ifthenelse_tag s) | Prims.Tot | [
"total"
] | [] | [
"LowParse.Spec.IfThenElse.parse_ifthenelse_param",
"LowParse.Spec.IfThenElse.serialize_ifthenelse_param",
"LowParse.Low.IfThenElse.gaccessor_ifthenelse_tag'",
"Prims.unit",
"LowParse.Low.Base.Spec.gaccessor_prop_equiv",
"LowParse.Spec.IfThenElse.parse_ifthenelse_kind",
"LowParse.Spec.IfThenElse.__proj__... | [] | false | false | false | false | false | let gaccessor_ifthenelse_tag (#p: parse_ifthenelse_param) (s: serialize_ifthenelse_param p)
: Tot (gaccessor (parse_ifthenelse p) p.parse_ifthenelse_tag_parser (clens_ifthenelse_tag s)) =
| gaccessor_prop_equiv (parse_ifthenelse p)
p.parse_ifthenelse_tag_parser
(clens_ifthenelse_tag s)
(gaccessor_ifthenelse_tag' s);
gaccessor_ifthenelse_tag' s | false |
LowParse.Low.IfThenElse.fst | LowParse.Low.IfThenElse.jump_ifthenelse | val jump_ifthenelse
(p: parse_ifthenelse_param)
(vt: jumper p.parse_ifthenelse_tag_parser)
(test: test_ifthenelse_tag p)
(vp: (b: bool -> Tot (jumper (dsnd (p.parse_ifthenelse_payload_parser b)))))
: Tot (jumper (parse_ifthenelse p)) | val jump_ifthenelse
(p: parse_ifthenelse_param)
(vt: jumper p.parse_ifthenelse_tag_parser)
(test: test_ifthenelse_tag p)
(vp: (b: bool -> Tot (jumper (dsnd (p.parse_ifthenelse_payload_parser b)))))
: Tot (jumper (parse_ifthenelse p)) | let jump_ifthenelse
(p: parse_ifthenelse_param)
(vt: jumper p.parse_ifthenelse_tag_parser)
(test: test_ifthenelse_tag p)
(vp: (b: bool) -> Tot (jumper (dsnd (p.parse_ifthenelse_payload_parser b))))
: Tot (jumper (parse_ifthenelse p))
= fun #rrel #rel input pos ->
let h = HST.get () in
[@inline_let] let _ =
... | {
"file_name": "src/lowparse/LowParse.Low.IfThenElse.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 33,
"end_line": 129,
"start_col": 0,
"start_line": 114
} | module LowParse.Low.IfThenElse
include LowParse.Spec.IfThenElse
include LowParse.Low.Combinators
module U32 = FStar.UInt32
module HS = FStar.HyperStack
module HST = FStar.HyperStack.ST
module B = LowStar.Buffer
module Cast = FStar.Int.Cast
module U64 = FStar.UInt64
let valid_ifthenelse_intro
(p: parse_ifthenelse_pa... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"LowParse.Spec.IfThenElse.fst.checked",
"LowParse.Low.Combinators.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Int.Cast.fst.... | [
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": "FStar.Int.Cast",
"short_module": "Cast"
},
{
"abbrev": true,
"full_module": "LowStar.Buffer",
"short_module": "B"
},
{
"abbrev": true,
"full_module": "F... | {
"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_el... | false |
p: LowParse.Spec.IfThenElse.parse_ifthenelse_param ->
vt: LowParse.Low.Base.jumper (Mkparse_ifthenelse_param?.parse_ifthenelse_tag_parser p) ->
test: LowParse.Low.IfThenElse.test_ifthenelse_tag p ->
vp:
(b: Prims.bool
-> LowParse.Low.Base.jumper (FStar.Pervasives.dsnd (Mkparse_ifthenels... | Prims.Tot | [
"total"
] | [] | [
"LowParse.Spec.IfThenElse.parse_ifthenelse_param",
"LowParse.Low.Base.jumper",
"LowParse.Spec.IfThenElse.__proj__Mkparse_ifthenelse_param__item__parse_ifthenelse_tag_kind",
"LowParse.Spec.IfThenElse.__proj__Mkparse_ifthenelse_param__item__parse_ifthenelse_tag_t",
"LowParse.Spec.IfThenElse.__proj__Mkparse_if... | [] | false | false | false | false | false | let jump_ifthenelse
(p: parse_ifthenelse_param)
(vt: jumper p.parse_ifthenelse_tag_parser)
(test: test_ifthenelse_tag p)
(vp: (b: bool -> Tot (jumper (dsnd (p.parse_ifthenelse_payload_parser b)))))
: Tot (jumper (parse_ifthenelse p)) =
| fun #rrel #rel input pos ->
let h = HST.get () in
[@@ inline_let ]let _ = Classical.move_requires (valid_ifthenelse_elim p h input) pos in
let pos_after_t = vt input pos in
let b = test input pos in
if b then vp true input pos_after_t else vp false input pos_after_t | false |
Lib.Sequence.fst | Lib.Sequence.repeati_blocks_f | val repeati_blocks_f:
#a:Type0
-> #b:Type0
-> blocksize:size_nat{blocksize > 0}
-> inp:seq a
-> f:(i:nat{i < length inp / blocksize} -> lseq a blocksize -> b -> b)
-> nb:nat{nb == length inp / blocksize}
-> i:nat{i < nb}
-> acc:b
-> b | val repeati_blocks_f:
#a:Type0
-> #b:Type0
-> blocksize:size_nat{blocksize > 0}
-> inp:seq a
-> f:(i:nat{i < length inp / blocksize} -> lseq a blocksize -> b -> b)
-> nb:nat{nb == length inp / blocksize}
-> i:nat{i < nb}
-> acc:b
-> b | let repeati_blocks_f #a #b bs inp f nb i acc =
assert ((i+1) * bs <= nb * bs);
let block = seq_sub inp (i * bs) bs in
f i block acc | {
"file_name": "lib/Lib.Sequence.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 15,
"end_line": 171,
"start_col": 0,
"start_line": 168
} | module Lib.Sequence
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
#set-options "--z3rlimit 30 --max_fuel 0 --max_ifuel 0 --using_facts_from '-* +Prims +FStar.Pervasives +FStar.Math.Lemmas +FStar.Seq +Lib.IntTypes +Lib.Sequence'"
let index #a #len s n = Seq.index s n
let create #a len init = Seq.create #... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Seq.Properties.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"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": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"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_el... | false |
blocksize: Lib.IntTypes.size_nat{blocksize > 0} ->
inp: Lib.Sequence.seq a ->
f:
(
i: Prims.nat{i < Lib.Sequence.length inp / blocksize} ->
_: Lib.Sequence.lseq a blocksize ->
_: b
-> b) ->
nb: Prims.nat{nb == Lib.Sequence.length inp / blocksize} ->
... | Prims.Tot | [
"total"
] | [] | [
"Lib.IntTypes.size_nat",
"Prims.b2t",
"Prims.op_GreaterThan",
"Lib.Sequence.seq",
"Prims.nat",
"Prims.op_LessThan",
"Prims.op_Division",
"Lib.Sequence.length",
"Lib.Sequence.lseq",
"Prims.eq2",
"Prims.int",
"Prims.l_and",
"Prims.l_Forall",
"FStar.Seq.Base.index",
"Prims.op_Addition",
"... | [] | false | false | false | false | false | let repeati_blocks_f #a #b bs inp f nb i acc =
| assert ((i + 1) * bs <= nb * bs);
let block = seq_sub inp (i * bs) bs in
f i block acc | false |
Lib.Sequence.fst | Lib.Sequence.seq_update_sub | val seq_update_sub:
#a:Type
-> i:seq a
-> start:nat
-> n:nat{start + n <= length i}
-> x:seq a{length x == n}
-> o:seq a{length o == length i /\ seq_sub o start n == x /\
(forall (k:nat{(0 <= k /\ k < start) \/ (start + n <= k /\ k < length i)}).
{:pattern (Seq.index o k)} Seq.index o k == Seq.i... | val seq_update_sub:
#a:Type
-> i:seq a
-> start:nat
-> n:nat{start + n <= length i}
-> x:seq a{length x == n}
-> o:seq a{length o == length i /\ seq_sub o start n == x /\
(forall (k:nat{(0 <= k /\ k < start) \/ (start + n <= k /\ k < length i)}).
{:pattern (Seq.index o k)} Seq.index o k == Seq.i... | let seq_update_sub #a s start n x =
let o =
Seq.append
(Seq.append (Seq.slice s 0 start) x)
(Seq.slice s (start + n) (length s)) in
Seq.lemma_eq_intro (Seq.slice o start (start + n)) x;
o | {
"file_name": "lib/Lib.Sequence.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 3,
"end_line": 156,
"start_col": 0,
"start_line": 150
} | module Lib.Sequence
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
#set-options "--z3rlimit 30 --max_fuel 0 --max_ifuel 0 --using_facts_from '-* +Prims +FStar.Pervasives +FStar.Math.Lemmas +FStar.Seq +Lib.IntTypes +Lib.Sequence'"
let index #a #len s n = Seq.index s n
let create #a len init = Seq.create #... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Seq.Properties.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"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": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"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_el... | false |
i: Lib.Sequence.seq a ->
start: Prims.nat ->
n: Prims.nat{start + n <= Lib.Sequence.length i} ->
x: Lib.Sequence.seq a {Lib.Sequence.length x == n}
-> o:
Lib.Sequence.seq a
{ Lib.Sequence.length o == Lib.Sequence.length i /\ Lib.Sequence.seq_sub o start n == x /\
(forall (k: Prims.n... | Prims.Tot | [
"total"
] | [] | [
"Lib.Sequence.seq",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_Addition",
"Lib.Sequence.length",
"Prims.eq2",
"Prims.unit",
"FStar.Seq.Base.lemma_eq_intro",
"FStar.Seq.Base.slice",
"FStar.Seq.Base.seq",
"FStar.Seq.Base.append",
"Prims.l_and",
"Prims.l_or",
"Prims.l_F... | [] | false | false | false | false | false | let seq_update_sub #a s start n x =
| let o = Seq.append (Seq.append (Seq.slice s 0 start) x) (Seq.slice s (start + n) (length s)) in
Seq.lemma_eq_intro (Seq.slice o start (start + n)) x;
o | false |
LowParse.Low.IfThenElse.fst | LowParse.Low.IfThenElse.gaccessor_ifthenelse_payload' | val gaccessor_ifthenelse_payload'
(#p: parse_ifthenelse_param)
(s: serialize_ifthenelse_param p)
(b: bool)
: Tot
(gaccessor' (parse_ifthenelse p)
(dsnd (p.parse_ifthenelse_payload_parser b))
(clens_ifthenelse_payload s b)) | val gaccessor_ifthenelse_payload'
(#p: parse_ifthenelse_param)
(s: serialize_ifthenelse_param p)
(b: bool)
: Tot
(gaccessor' (parse_ifthenelse p)
(dsnd (p.parse_ifthenelse_payload_parser b))
(clens_ifthenelse_payload s b)) | let gaccessor_ifthenelse_payload'
(#p: parse_ifthenelse_param)
(s: serialize_ifthenelse_param p)
(b: bool)
: Tot (gaccessor' (parse_ifthenelse p) (dsnd (p.parse_ifthenelse_payload_parser b)) (clens_ifthenelse_payload s b))
= fun (input: bytes) ->
match parse (parse_ifthenelse p) input with
| Some (x, _) -... | {
"file_name": "src/lowparse/LowParse.Low.IfThenElse.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 12,
"end_line": 205,
"start_col": 0,
"start_line": 194
} | module LowParse.Low.IfThenElse
include LowParse.Spec.IfThenElse
include LowParse.Low.Combinators
module U32 = FStar.UInt32
module HS = FStar.HyperStack
module HST = FStar.HyperStack.ST
module B = LowStar.Buffer
module Cast = FStar.Int.Cast
module U64 = FStar.UInt64
let valid_ifthenelse_intro
(p: parse_ifthenelse_pa... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"LowParse.Spec.IfThenElse.fst.checked",
"LowParse.Low.Combinators.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Int.Cast.fst.... | [
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": "FStar.Int.Cast",
"short_module": "Cast"
},
{
"abbrev": true,
"full_module": "LowStar.Buffer",
"short_module": "B"
},
{
"abbrev": true,
"full_module": "F... | {
"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_el... | false | s: LowParse.Spec.IfThenElse.serialize_ifthenelse_param p -> b: Prims.bool
-> LowParse.Low.Base.Spec.gaccessor' (LowParse.Spec.IfThenElse.parse_ifthenelse p)
(FStar.Pervasives.dsnd (Mkparse_ifthenelse_param?.parse_ifthenelse_payload_parser p b))
(LowParse.Low.IfThenElse.clens_ifthenelse_payload s b) | Prims.Tot | [
"total"
] | [] | [
"LowParse.Spec.IfThenElse.parse_ifthenelse_param",
"LowParse.Spec.IfThenElse.serialize_ifthenelse_param",
"Prims.bool",
"LowParse.Bytes.bytes",
"LowParse.Spec.Base.parse",
"LowParse.Spec.IfThenElse.__proj__Mkparse_ifthenelse_param__item__parse_ifthenelse_t",
"LowParse.Spec.IfThenElse.parse_ifthenelse",
... | [] | false | false | false | false | false | let gaccessor_ifthenelse_payload'
(#p: parse_ifthenelse_param)
(s: serialize_ifthenelse_param p)
(b: bool)
: Tot
(gaccessor' (parse_ifthenelse p)
(dsnd (p.parse_ifthenelse_payload_parser b))
(clens_ifthenelse_payload s b)) =
| fun (input: bytes) ->
match parse (parse_ifthenelse p) input with
| Some (x, _) ->
if p.parse_ifthenelse_tag_cond (dfst (s.serialize_ifthenelse_synth_recip x)) = b
then gaccessor_ifthenelse_payload'' s b input
else 0
| _ -> 0 | false |
Lib.Sequence.fst | Lib.Sequence.repeati_blocks | val repeati_blocks:
#a:Type0
-> #b:Type0
-> blocksize:size_pos
-> inp:seq a
-> f:(i:nat{i < length inp / blocksize} -> lseq a blocksize -> b -> b)
-> l:(i:nat{i == length inp / blocksize} -> len:size_nat{len == length inp % blocksize} -> s:lseq a len -> b -> b)
-> init:b ->
Tot b | val repeati_blocks:
#a:Type0
-> #b:Type0
-> blocksize:size_pos
-> inp:seq a
-> f:(i:nat{i < length inp / blocksize} -> lseq a blocksize -> b -> b)
-> l:(i:nat{i == length inp / blocksize} -> len:size_nat{len == length inp % blocksize} -> s:lseq a len -> b -> b)
-> init:b ->
Tot b | let repeati_blocks #a #b bs inp f g init =
let len = length inp in
let nb = len / bs in
let rem = len % bs in
let acc = repeati nb (repeati_blocks_f bs inp f nb) init in
let last = seq_sub inp (nb * bs) rem in
g nb rem last acc | {
"file_name": "lib/Lib.Sequence.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 19,
"end_line": 179,
"start_col": 0,
"start_line": 173
} | module Lib.Sequence
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
#set-options "--z3rlimit 30 --max_fuel 0 --max_ifuel 0 --using_facts_from '-* +Prims +FStar.Pervasives +FStar.Math.Lemmas +FStar.Seq +Lib.IntTypes +Lib.Sequence'"
let index #a #len s n = Seq.index s n
let create #a len init = Seq.create #... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Seq.Properties.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"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": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"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_el... | false |
blocksize: Lib.IntTypes.size_pos ->
inp: Lib.Sequence.seq a ->
f:
(
i: Prims.nat{i < Lib.Sequence.length inp / blocksize} ->
_: Lib.Sequence.lseq a blocksize ->
_: b
-> b) ->
l:
(
i: Prims.nat{i == Lib.Sequence.length inp / blocksize... | Prims.Tot | [
"total"
] | [] | [
"Lib.IntTypes.size_pos",
"Lib.Sequence.seq",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.op_Division",
"Lib.Sequence.length",
"Lib.Sequence.lseq",
"Prims.eq2",
"Prims.int",
"Lib.IntTypes.size_nat",
"Prims.op_Modulus",
"Prims.l_and",
"Prims.l_Forall",
"FStar.Seq.Base.index",
"... | [] | false | false | false | false | false | let repeati_blocks #a #b bs inp f g init =
| let len = length inp in
let nb = len / bs in
let rem = len % bs in
let acc = repeati nb (repeati_blocks_f bs inp f nb) init in
let last = seq_sub inp (nb * bs) rem in
g nb rem last acc | false |
LowParse.Low.IfThenElse.fst | LowParse.Low.IfThenElse.valid_ifthenelse_elim | val valid_ifthenelse_elim
(p: parse_ifthenelse_param)
(h: HS.mem)
(#rrel #rel: _)
(sl: slice rrel rel)
(pos: U32.t)
: Lemma (requires (valid (parse_ifthenelse p) h sl pos))
(ensures
(valid p.parse_ifthenelse_tag_parser h sl pos /\
(let t = contents p.parse_ifthe... | val valid_ifthenelse_elim
(p: parse_ifthenelse_param)
(h: HS.mem)
(#rrel #rel: _)
(sl: slice rrel rel)
(pos: U32.t)
: Lemma (requires (valid (parse_ifthenelse p) h sl pos))
(ensures
(valid p.parse_ifthenelse_tag_parser h sl pos /\
(let t = contents p.parse_ifthe... | let valid_ifthenelse_elim
(p: parse_ifthenelse_param)
(h: HS.mem)
(#rrel #rel: _)
(sl: slice rrel rel)
(pos: U32.t)
: Lemma
(requires (valid (parse_ifthenelse p) h sl pos))
(ensures (
valid p.parse_ifthenelse_tag_parser h sl pos /\ (
let t = contents p.parse_ifthenelse_tag_parser h sl pos in
l... | {
"file_name": "src/lowparse/LowParse.Low.IfThenElse.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 75,
"end_line": 76,
"start_col": 0,
"start_line": 48
} | module LowParse.Low.IfThenElse
include LowParse.Spec.IfThenElse
include LowParse.Low.Combinators
module U32 = FStar.UInt32
module HS = FStar.HyperStack
module HST = FStar.HyperStack.ST
module B = LowStar.Buffer
module Cast = FStar.Int.Cast
module U64 = FStar.UInt64
let valid_ifthenelse_intro
(p: parse_ifthenelse_pa... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"LowParse.Spec.IfThenElse.fst.checked",
"LowParse.Low.Combinators.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Int.Cast.fst.... | [
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": "FStar.Int.Cast",
"short_module": "Cast"
},
{
"abbrev": true,
"full_module": "LowStar.Buffer",
"short_module": "B"
},
{
"abbrev": true,
"full_module": "F... | {
"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_el... | false |
p: LowParse.Spec.IfThenElse.parse_ifthenelse_param ->
h: FStar.Monotonic.HyperStack.mem ->
sl: LowParse.Slice.slice rrel rel ->
pos: FStar.UInt32.t
-> FStar.Pervasives.Lemma
(requires LowParse.Low.Base.Spec.valid (LowParse.Spec.IfThenElse.parse_ifthenelse p) h sl pos)
(ensures
Low... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"LowParse.Spec.IfThenElse.parse_ifthenelse_param",
"FStar.Monotonic.HyperStack.mem",
"LowParse.Slice.srel",
"LowParse.Bytes.byte",
"LowParse.Slice.slice",
"FStar.UInt32.t",
"LowParse.Low.Base.Spec.valid_facts",
"Prims.__proj__Mkdtuple2__item___1",
"LowParse.Spec.Base.parser_kind",
"LowParse.Spec.B... | [] | false | false | true | false | false | let valid_ifthenelse_elim
(p: parse_ifthenelse_param)
(h: HS.mem)
(#rrel #rel: _)
(sl: slice rrel rel)
(pos: U32.t)
: Lemma (requires (valid (parse_ifthenelse p) h sl pos))
(ensures
(valid p.parse_ifthenelse_tag_parser h sl pos /\
(let t = contents p.parse_ifthe... | valid_facts (parse_ifthenelse p) h sl pos;
parse_ifthenelse_eq p (bytes_of_slice_from h sl pos);
valid_facts p.parse_ifthenelse_tag_parser h sl pos;
let pos_after_t = get_valid_pos p.parse_ifthenelse_tag_parser h sl pos in
let t = contents p.parse_ifthenelse_tag_parser h sl pos in
let b = p.parse_ifthenelse_tag_cond t ... | false |
LowParse.Low.IfThenElse.fst | LowParse.Low.IfThenElse.valid_ifthenelse_intro | val valid_ifthenelse_intro
(p: parse_ifthenelse_param)
(h: HS.mem)
(#rrel #rel: _)
(sl: slice rrel rel)
(pos: U32.t)
: Lemma
(requires
(valid p.parse_ifthenelse_tag_parser h sl pos /\
(let t = contents p.parse_ifthenelse_tag_parser h sl pos in
let po... | val valid_ifthenelse_intro
(p: parse_ifthenelse_param)
(h: HS.mem)
(#rrel #rel: _)
(sl: slice rrel rel)
(pos: U32.t)
: Lemma
(requires
(valid p.parse_ifthenelse_tag_parser h sl pos /\
(let t = contents p.parse_ifthenelse_tag_parser h sl pos in
let po... | let valid_ifthenelse_intro
(p: parse_ifthenelse_param)
(h: HS.mem)
(#rrel #rel: _)
(sl: slice rrel rel)
(pos: U32.t)
: Lemma
(requires (
valid p.parse_ifthenelse_tag_parser h sl pos /\ (
let t = contents p.parse_ifthenelse_tag_parser h sl pos in
let pos_after_t = get_valid_pos p.parse_ifthenelse... | {
"file_name": "src/lowparse/LowParse.Low.IfThenElse.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 54,
"end_line": 46,
"start_col": 0,
"start_line": 12
} | module LowParse.Low.IfThenElse
include LowParse.Spec.IfThenElse
include LowParse.Low.Combinators
module U32 = FStar.UInt32
module HS = FStar.HyperStack
module HST = FStar.HyperStack.ST
module B = LowStar.Buffer
module Cast = FStar.Int.Cast
module U64 = FStar.UInt64 | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"LowParse.Spec.IfThenElse.fst.checked",
"LowParse.Low.Combinators.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Int.Cast.fst.... | [
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": "FStar.Int.Cast",
"short_module": "Cast"
},
{
"abbrev": true,
"full_module": "LowStar.Buffer",
"short_module": "B"
},
{
"abbrev": true,
"full_module": "F... | {
"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_el... | false |
p: LowParse.Spec.IfThenElse.parse_ifthenelse_param ->
h: FStar.Monotonic.HyperStack.mem ->
sl: LowParse.Slice.slice rrel rel ->
pos: FStar.UInt32.t
-> FStar.Pervasives.Lemma
(requires
LowParse.Low.Base.Spec.valid (Mkparse_ifthenelse_param?.parse_ifthenelse_tag_parser p)
h
... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"LowParse.Spec.IfThenElse.parse_ifthenelse_param",
"FStar.Monotonic.HyperStack.mem",
"LowParse.Slice.srel",
"LowParse.Bytes.byte",
"LowParse.Slice.slice",
"FStar.UInt32.t",
"LowParse.Spec.IfThenElse.parse_ifthenelse_eq",
"LowParse.Slice.bytes_of_slice_from",
"Prims.unit",
"LowParse.Low.Base.Spec.v... | [] | false | false | true | false | false | let valid_ifthenelse_intro
(p: parse_ifthenelse_param)
(h: HS.mem)
(#rrel #rel: _)
(sl: slice rrel rel)
(pos: U32.t)
: Lemma
(requires
(valid p.parse_ifthenelse_tag_parser h sl pos /\
(let t = contents p.parse_ifthenelse_tag_parser h sl pos in
let po... | valid_facts (parse_ifthenelse p) h sl pos;
valid_facts p.parse_ifthenelse_tag_parser h sl pos;
let pos_after_t = get_valid_pos p.parse_ifthenelse_tag_parser h sl pos in
let t = contents p.parse_ifthenelse_tag_parser h sl pos in
let b = p.parse_ifthenelse_tag_cond t in
valid_facts (dsnd (p.parse_ifthenelse_payload_parse... | false |
LowParse.Low.IfThenElse.fst | LowParse.Low.IfThenElse.gaccessor_ifthenelse_payload_injective | val gaccessor_ifthenelse_payload_injective
(#p: parse_ifthenelse_param)
(s: serialize_ifthenelse_param p)
(b: bool)
(sl sl': bytes)
: Lemma
(requires
(gaccessor_pre (parse_ifthenelse p)
(dsnd (p.parse_ifthenelse_payload_parser b))
(clens_ifthenelse_paylo... | val gaccessor_ifthenelse_payload_injective
(#p: parse_ifthenelse_param)
(s: serialize_ifthenelse_param p)
(b: bool)
(sl sl': bytes)
: Lemma
(requires
(gaccessor_pre (parse_ifthenelse p)
(dsnd (p.parse_ifthenelse_payload_parser b))
(clens_ifthenelse_paylo... | let gaccessor_ifthenelse_payload_injective
(#p: parse_ifthenelse_param)
(s: serialize_ifthenelse_param p)
(b: bool)
(sl sl' : bytes)
: Lemma
(requires (
gaccessor_pre (parse_ifthenelse p) (dsnd (p.parse_ifthenelse_payload_parser b)) (clens_ifthenelse_payload s b) sl /\
gaccessor_pre (parse_ifthenelse ... | {
"file_name": "src/lowparse/LowParse.Low.IfThenElse.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 54,
"end_line": 223,
"start_col": 0,
"start_line": 207
} | module LowParse.Low.IfThenElse
include LowParse.Spec.IfThenElse
include LowParse.Low.Combinators
module U32 = FStar.UInt32
module HS = FStar.HyperStack
module HST = FStar.HyperStack.ST
module B = LowStar.Buffer
module Cast = FStar.Int.Cast
module U64 = FStar.UInt64
let valid_ifthenelse_intro
(p: parse_ifthenelse_pa... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"LowParse.Spec.IfThenElse.fst.checked",
"LowParse.Low.Combinators.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Int.Cast.fst.... | [
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": "FStar.Int.Cast",
"short_module": "Cast"
},
{
"abbrev": true,
"full_module": "LowStar.Buffer",
"short_module": "B"
},
{
"abbrev": true,
"full_module": "F... | {
"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_el... | false |
s: LowParse.Spec.IfThenElse.serialize_ifthenelse_param p ->
b: Prims.bool ->
sl: LowParse.Bytes.bytes ->
sl': LowParse.Bytes.bytes
-> FStar.Pervasives.Lemma
(requires
LowParse.Low.Base.Spec.gaccessor_pre (LowParse.Spec.IfThenElse.parse_ifthenelse p)
(FStar.Pervasives.dsnd (Mkp... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"LowParse.Spec.IfThenElse.parse_ifthenelse_param",
"LowParse.Spec.IfThenElse.serialize_ifthenelse_param",
"Prims.bool",
"LowParse.Bytes.bytes",
"LowParse.Spec.Base.parse_injective",
"LowParse.Spec.IfThenElse.__proj__Mkparse_ifthenelse_param__item__parse_ifthenelse_tag_kind",
"LowParse.Spec.IfThenElse.__... | [] | true | false | true | false | false | let gaccessor_ifthenelse_payload_injective
(#p: parse_ifthenelse_param)
(s: serialize_ifthenelse_param p)
(b: bool)
(sl sl': bytes)
: Lemma
(requires
(gaccessor_pre (parse_ifthenelse p)
(dsnd (p.parse_ifthenelse_payload_parser b))
(clens_ifthenelse_paylo... | parse_ifthenelse_eq p sl;
parse_ifthenelse_eq p sl';
parse_ifthenelse_parse_tag_payload s sl;
parse_ifthenelse_parse_tag_payload s sl';
parse_injective p.parse_ifthenelse_tag_parser sl sl' | false |
Lib.Sequence.fst | Lib.Sequence.repeat_blocks | val repeat_blocks:
#a:Type0
-> #b:Type0
-> #c:Type0
-> blocksize:size_pos
-> inp:seq a
-> f:(lseq a blocksize -> b -> b)
-> l:(len:nat{len < blocksize} -> s:lseq a len -> b -> c)
-> init:b ->
Tot c | val repeat_blocks:
#a:Type0
-> #b:Type0
-> #c:Type0
-> blocksize:size_pos
-> inp:seq a
-> f:(lseq a blocksize -> b -> b)
-> l:(len:nat{len < blocksize} -> s:lseq a len -> b -> c)
-> init:b ->
Tot c | let repeat_blocks #a #b #c bs inp f l init =
let len = length inp in
let nb = len / bs in
let rem = len % bs in
let acc = repeati nb (repeat_blocks_f bs inp f nb) init in
let last = seq_sub inp (nb * bs) rem in
l rem last acc | {
"file_name": "lib/Lib.Sequence.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 16,
"end_line": 187,
"start_col": 0,
"start_line": 181
} | module Lib.Sequence
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
#set-options "--z3rlimit 30 --max_fuel 0 --max_ifuel 0 --using_facts_from '-* +Prims +FStar.Pervasives +FStar.Math.Lemmas +FStar.Seq +Lib.IntTypes +Lib.Sequence'"
let index #a #len s n = Seq.index s n
let create #a len init = Seq.create #... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Seq.Properties.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"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": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"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_el... | false |
blocksize: Lib.IntTypes.size_pos ->
inp: Lib.Sequence.seq a ->
f: (_: Lib.Sequence.lseq a blocksize -> _: b -> b) ->
l: (len: Prims.nat{len < blocksize} -> s: Lib.Sequence.lseq a len -> _: b -> c) ->
init: b
-> c | Prims.Tot | [
"total"
] | [] | [
"Lib.IntTypes.size_pos",
"Lib.Sequence.seq",
"Lib.Sequence.lseq",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.l_and",
"Prims.eq2",
"Lib.Sequence.length",
"Prims.l_Forall",
"FStar.Seq.Base.index",
"Prims.op_Addition",
"Prims.op_Multiply",
"Lib.Sequence.seq_sub",
"FStar.Mul.op_St... | [] | false | false | false | false | false | let repeat_blocks #a #b #c bs inp f l init =
| let len = length inp in
let nb = len / bs in
let rem = len % bs in
let acc = repeati nb (repeat_blocks_f bs inp f nb) init in
let last = seq_sub inp (nb * bs) rem in
l rem last acc | false |
LowParse.Low.IfThenElse.fst | LowParse.Low.IfThenElse.gaccessor_ifthenelse_payload | val gaccessor_ifthenelse_payload
(#p: parse_ifthenelse_param)
(s: serialize_ifthenelse_param p)
(b: bool)
: Tot
(gaccessor (parse_ifthenelse p)
(dsnd (p.parse_ifthenelse_payload_parser b))
(clens_ifthenelse_payload s b)) | val gaccessor_ifthenelse_payload
(#p: parse_ifthenelse_param)
(s: serialize_ifthenelse_param p)
(b: bool)
: Tot
(gaccessor (parse_ifthenelse p)
(dsnd (p.parse_ifthenelse_payload_parser b))
(clens_ifthenelse_payload s b)) | let gaccessor_ifthenelse_payload
(#p: parse_ifthenelse_param)
(s: serialize_ifthenelse_param p)
(b: bool)
: Tot (gaccessor (parse_ifthenelse p) (dsnd (p.parse_ifthenelse_payload_parser b)) (clens_ifthenelse_payload s b))
= Classical.forall_intro_2 (fun x -> Classical.move_requires (gaccessor_ifthenelse_payload_in... | {
"file_name": "src/lowparse/LowParse.Low.IfThenElse.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 35,
"end_line": 253,
"start_col": 0,
"start_line": 245
} | module LowParse.Low.IfThenElse
include LowParse.Spec.IfThenElse
include LowParse.Low.Combinators
module U32 = FStar.UInt32
module HS = FStar.HyperStack
module HST = FStar.HyperStack.ST
module B = LowStar.Buffer
module Cast = FStar.Int.Cast
module U64 = FStar.UInt64
let valid_ifthenelse_intro
(p: parse_ifthenelse_pa... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"LowParse.Spec.IfThenElse.fst.checked",
"LowParse.Low.Combinators.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Int.Cast.fst.... | [
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": "FStar.Int.Cast",
"short_module": "Cast"
},
{
"abbrev": true,
"full_module": "LowStar.Buffer",
"short_module": "B"
},
{
"abbrev": true,
"full_module": "F... | {
"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_el... | false | s: LowParse.Spec.IfThenElse.serialize_ifthenelse_param p -> b: Prims.bool
-> LowParse.Low.Base.Spec.gaccessor (LowParse.Spec.IfThenElse.parse_ifthenelse p)
(FStar.Pervasives.dsnd (Mkparse_ifthenelse_param?.parse_ifthenelse_payload_parser p b))
(LowParse.Low.IfThenElse.clens_ifthenelse_payload s b) | Prims.Tot | [
"total"
] | [] | [
"LowParse.Spec.IfThenElse.parse_ifthenelse_param",
"LowParse.Spec.IfThenElse.serialize_ifthenelse_param",
"Prims.bool",
"LowParse.Low.IfThenElse.gaccessor_ifthenelse_payload'",
"Prims.unit",
"LowParse.Low.Base.Spec.gaccessor_prop_equiv",
"LowParse.Spec.IfThenElse.parse_ifthenelse_kind",
"LowParse.Spec... | [] | false | false | false | false | false | let gaccessor_ifthenelse_payload
(#p: parse_ifthenelse_param)
(s: serialize_ifthenelse_param p)
(b: bool)
: Tot
(gaccessor (parse_ifthenelse p)
(dsnd (p.parse_ifthenelse_payload_parser b))
(clens_ifthenelse_payload s b)) =
| Classical.forall_intro_2 (fun x ->
Classical.move_requires (gaccessor_ifthenelse_payload_injective s b x));
Classical.forall_intro_2 (fun x ->
Classical.move_requires (gaccessor_ifthenelse_payload_no_lookahead s b x));
gaccessor_prop_equiv (parse_ifthenelse p)
(dsnd (p.parse_ifthenelse_payload_parser b))
... | false |
Lib.Sequence.fst | Lib.Sequence.lemma_update_sub | val lemma_update_sub:
#a:Type
-> #len:size_nat
-> dst:lseq a len
-> start:size_nat
-> n:size_nat{start + n <= len}
-> src:lseq a n
-> res:lseq a len ->
Lemma
(requires
sub res 0 start == sub dst 0 start /\
sub res start n == src /\
sub res (start + n) (len - start - n) ==
s... | val lemma_update_sub:
#a:Type
-> #len:size_nat
-> dst:lseq a len
-> start:size_nat
-> n:size_nat{start + n <= len}
-> src:lseq a n
-> res:lseq a len ->
Lemma
(requires
sub res 0 start == sub dst 0 start /\
sub res start n == src /\
sub res (start + n) (len - start - n) ==
s... | let lemma_update_sub #a #len dst start n src res =
let res1 = update_sub dst start n src in
Seq.lemma_split (sub res 0 (start + n)) start;
Seq.lemma_split (sub res1 0 (start + n)) start;
Seq.lemma_split res (start + n);
Seq.lemma_split res1 (start + n);
Seq.lemma_eq_intro res (update_sub dst start n src) | {
"file_name": "lib/Lib.Sequence.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 53,
"end_line": 55,
"start_col": 0,
"start_line": 49
} | module Lib.Sequence
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
#set-options "--z3rlimit 30 --max_fuel 0 --max_ifuel 0 --using_facts_from '-* +Prims +FStar.Pervasives +FStar.Math.Lemmas +FStar.Seq +Lib.IntTypes +Lib.Sequence'"
let index #a #len s n = Seq.index s n
let create #a len init = Seq.create #... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Seq.Properties.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"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": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"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_el... | false |
dst: Lib.Sequence.lseq a len ->
start: Lib.IntTypes.size_nat ->
n: Lib.IntTypes.size_nat{start + n <= len} ->
src: Lib.Sequence.lseq a n ->
res: Lib.Sequence.lseq a len
-> FStar.Pervasives.Lemma
(requires
Lib.Sequence.sub res 0 start == Lib.Sequence.sub dst 0 start /\
Lib.Se... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Lib.IntTypes.size_nat",
"Lib.Sequence.lseq",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_Addition",
"FStar.Seq.Base.lemma_eq_intro",
"Lib.Sequence.update_sub",
"Prims.unit",
"FStar.Seq.Properties.lemma_split",
"Lib.Sequence.sub",
"Prims.l_and",
"Prims.eq2",
"Prims.l_Forall",
"Prims... | [] | true | false | true | false | false | let lemma_update_sub #a #len dst start n src res =
| let res1 = update_sub dst start n src in
Seq.lemma_split (sub res 0 (start + n)) start;
Seq.lemma_split (sub res1 0 (start + n)) start;
Seq.lemma_split res (start + n);
Seq.lemma_split res1 (start + n);
Seq.lemma_eq_intro res (update_sub dst start n src) | false |
Lib.Sequence.fst | Lib.Sequence.generate_blocks_inner | val generate_blocks_inner
(t: Type)
(blocklen: size_nat)
(max: nat)
(a: (i: nat{i <= max} -> Type))
(f: (i: nat{i < max} -> a i -> a (i + 1) & s: seq t {length s == blocklen}))
(i: nat{i < max})
(acc: generate_blocks_a t blocklen max a i)
: generate_blocks_a t blocklen max ... | val generate_blocks_inner
(t: Type)
(blocklen: size_nat)
(max: nat)
(a: (i: nat{i <= max} -> Type))
(f: (i: nat{i < max} -> a i -> a (i + 1) & s: seq t {length s == blocklen}))
(i: nat{i < max})
(acc: generate_blocks_a t blocklen max a i)
: generate_blocks_a t blocklen max ... | let generate_blocks_inner (t:Type) (blocklen:size_nat) (max:nat) (a:(i:nat{i <= max} -> Type)) (f:(i:nat{i < max} -> a i -> a (i + 1) & s:seq t{length s == blocklen})) (i:nat{i < max}) (acc:generate_blocks_a t blocklen max a i) : generate_blocks_a t blocklen max a (i + 1) =
let acc, o = acc in
let acc', block =... | {
"file_name": "lib/Lib.Sequence.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 12,
"end_line": 204,
"start_col": 0,
"start_line": 200
} | module Lib.Sequence
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
#set-options "--z3rlimit 30 --max_fuel 0 --max_ifuel 0 --using_facts_from '-* +Prims +FStar.Pervasives +FStar.Math.Lemmas +FStar.Seq +Lib.IntTypes +Lib.Sequence'"
let index #a #len s n = Seq.index s n
let create #a len init = Seq.create #... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Seq.Properties.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"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": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"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_el... | false |
t: Type0 ->
blocklen: Lib.IntTypes.size_nat ->
max: Prims.nat ->
a: (i: Prims.nat{i <= max} -> Type) ->
f:
(i: Prims.nat{i < max} -> _: a i
-> a (i + 1) * s: Lib.Sequence.seq t {Lib.Sequence.length s == blocklen}) ->
i: Prims.nat{i < max} ->
acc: Lib.Sequence.generate_blocks... | Prims.Tot | [
"total"
] | [] | [
"Lib.IntTypes.size_nat",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_LessThan",
"FStar.Pervasives.Native.tuple2",
"Prims.op_Addition",
"Lib.Sequence.seq",
"Prims.eq2",
"Lib.Sequence.length",
"Lib.Sequence.generate_blocks_a",
"Prims.int",
"FStar.Mul.op_Star",
"FStar.Perv... | [] | false | false | false | false | false | let generate_blocks_inner
(t: Type)
(blocklen: size_nat)
(max: nat)
(a: (i: nat{i <= max} -> Type))
(f: (i: nat{i < max} -> a i -> a (i + 1) & s: seq t {length s == blocklen}))
(i: nat{i < max})
(acc: generate_blocks_a t blocklen max a i)
: generate_blocks_a t blocklen max ... | let acc, o = acc in
let acc', block = f i acc in
let o':s: seq t {length s == ((i + 1) * blocklen)} = Seq.append o block in
acc', o' | false |
Lib.Sequence.fst | Lib.Sequence.mod_div_lt | val mod_div_lt: b:pos -> i:int -> j:int -> Lemma
(requires (j / b) * b <= i /\ i < j)
(ensures i % b < j % b) | val mod_div_lt: b:pos -> i:int -> j:int -> Lemma
(requires (j / b) * b <= i /\ i < j)
(ensures i % b < j % b) | let mod_div_lt b i j =
mod_interval_lt b (j / b) i j | {
"file_name": "lib/Lib.Sequence.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 31,
"end_line": 238,
"start_col": 0,
"start_line": 237
} | module Lib.Sequence
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
#set-options "--z3rlimit 30 --max_fuel 0 --max_ifuel 0 --using_facts_from '-* +Prims +FStar.Pervasives +FStar.Math.Lemmas +FStar.Seq +Lib.IntTypes +Lib.Sequence'"
let index #a #len s n = Seq.index s n
let create #a len init = Seq.create #... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Seq.Properties.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"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": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"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_el... | false | b: Prims.pos -> i: Prims.int -> j: Prims.int
-> FStar.Pervasives.Lemma (requires (j / b) * b <= i /\ i < j) (ensures i % b < j % b) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.pos",
"Prims.int",
"Lib.Sequence.mod_interval_lt",
"Prims.op_Division",
"Prims.unit"
] | [] | true | false | true | false | false | let mod_div_lt b i j =
| mod_interval_lt b (j / b) i j | false |
Lib.Sequence.fst | Lib.Sequence.generate_blocks | val generate_blocks:
#t:Type0
-> len:size_nat
-> max:nat
-> n:nat{n <= max}
-> a:(i:nat{i <= max} -> Type)
-> f:(i:nat{i < max} -> a i -> a (i + 1) & s:seq t{length s == len})
-> init:a 0 ->
Tot (a n & s:seq t{length s == n * len}) | val generate_blocks:
#t:Type0
-> len:size_nat
-> max:nat
-> n:nat{n <= max}
-> a:(i:nat{i <= max} -> Type)
-> f:(i:nat{i < max} -> a i -> a (i + 1) & s:seq t{length s == len})
-> init:a 0 ->
Tot (a n & s:seq t{length s == n * len}) | let generate_blocks #t len max n a f acc0 =
let a0 = (acc0, (Seq.empty <: s:seq t{length s == 0 * len})) in
repeat_gen n (generate_blocks_a t len max a) (generate_blocks_inner t len max a f) a0 | {
"file_name": "lib/Lib.Sequence.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 87,
"end_line": 208,
"start_col": 0,
"start_line": 206
} | module Lib.Sequence
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
#set-options "--z3rlimit 30 --max_fuel 0 --max_ifuel 0 --using_facts_from '-* +Prims +FStar.Pervasives +FStar.Math.Lemmas +FStar.Seq +Lib.IntTypes +Lib.Sequence'"
let index #a #len s n = Seq.index s n
let create #a len init = Seq.create #... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Seq.Properties.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"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": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"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_el... | false |
len: Lib.IntTypes.size_nat ->
max: Prims.nat ->
n: Prims.nat{n <= max} ->
a: (i: Prims.nat{i <= max} -> Type) ->
f:
(i: Prims.nat{i < max} -> _: a i
-> a (i + 1) * s: Lib.Sequence.seq t {Lib.Sequence.length s == len}) ->
init: a 0
-> a n * s: Lib.Sequence.seq t {Lib.Sequence.l... | Prims.Tot | [
"total"
] | [] | [
"Lib.IntTypes.size_nat",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_LessThan",
"FStar.Pervasives.Native.tuple2",
"Prims.op_Addition",
"Lib.Sequence.seq",
"Prims.eq2",
"Lib.Sequence.length",
"Lib.LoopCombinators.repeat_gen",
"Lib.Sequence.generate_blocks_a",
"Lib.Sequence... | [] | false | false | false | false | false | let generate_blocks #t len max n a f acc0 =
| let a0 = (acc0, (Seq.empty <: s: seq t {length s == 0 * len})) in
repeat_gen n (generate_blocks_a t len max a) (generate_blocks_inner t len max a f) a0 | false |
LowParse.Low.IfThenElse.fst | LowParse.Low.IfThenElse.gaccessor_ifthenelse_tag' | val gaccessor_ifthenelse_tag' (#p: parse_ifthenelse_param) (s: serialize_ifthenelse_param p)
: Tot (gaccessor' (parse_ifthenelse p) p.parse_ifthenelse_tag_parser (clens_ifthenelse_tag s)) | val gaccessor_ifthenelse_tag' (#p: parse_ifthenelse_param) (s: serialize_ifthenelse_param p)
: Tot (gaccessor' (parse_ifthenelse p) p.parse_ifthenelse_tag_parser (clens_ifthenelse_tag s)) | let gaccessor_ifthenelse_tag'
(#p: parse_ifthenelse_param)
(s: serialize_ifthenelse_param p)
: Tot (gaccessor' (parse_ifthenelse p) p.parse_ifthenelse_tag_parser (clens_ifthenelse_tag s))
= fun input ->
parse_ifthenelse_eq p input;
if Some? (parse (parse_ifthenelse p) input)
then parse_ifthenelse_parse_... | {
"file_name": "src/lowparse/LowParse.Low.IfThenElse.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 5,
"end_line": 148,
"start_col": 0,
"start_line": 140
} | module LowParse.Low.IfThenElse
include LowParse.Spec.IfThenElse
include LowParse.Low.Combinators
module U32 = FStar.UInt32
module HS = FStar.HyperStack
module HST = FStar.HyperStack.ST
module B = LowStar.Buffer
module Cast = FStar.Int.Cast
module U64 = FStar.UInt64
let valid_ifthenelse_intro
(p: parse_ifthenelse_pa... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"LowParse.Spec.IfThenElse.fst.checked",
"LowParse.Low.Combinators.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Int.Cast.fst.... | [
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": "FStar.Int.Cast",
"short_module": "Cast"
},
{
"abbrev": true,
"full_module": "LowStar.Buffer",
"short_module": "B"
},
{
"abbrev": true,
"full_module": "F... | {
"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_el... | false | s: LowParse.Spec.IfThenElse.serialize_ifthenelse_param p
-> LowParse.Low.Base.Spec.gaccessor' (LowParse.Spec.IfThenElse.parse_ifthenelse p)
(Mkparse_ifthenelse_param?.parse_ifthenelse_tag_parser p)
(LowParse.Low.IfThenElse.clens_ifthenelse_tag s) | Prims.Tot | [
"total"
] | [] | [
"LowParse.Spec.IfThenElse.parse_ifthenelse_param",
"LowParse.Spec.IfThenElse.serialize_ifthenelse_param",
"LowParse.Bytes.bytes",
"Prims.unit",
"FStar.Pervasives.Native.uu___is_Some",
"FStar.Pervasives.Native.tuple2",
"LowParse.Spec.IfThenElse.__proj__Mkparse_ifthenelse_param__item__parse_ifthenelse_t",... | [] | false | false | false | false | false | let gaccessor_ifthenelse_tag' (#p: parse_ifthenelse_param) (s: serialize_ifthenelse_param p)
: Tot (gaccessor' (parse_ifthenelse p) p.parse_ifthenelse_tag_parser (clens_ifthenelse_tag s)) =
| fun input ->
parse_ifthenelse_eq p input;
if Some? (parse (parse_ifthenelse p) input) then parse_ifthenelse_parse_tag_payload s input;
0 | false |
Lib.Sequence.fst | Lib.Sequence.generate_blocks_simple | val generate_blocks_simple:
#a:Type0
-> blocksize:size_pos
-> max:nat
-> n:nat{n <= max}
-> f:(i:nat{i < max} -> lseq a blocksize) ->
Tot (s:seq a{length s == n * blocksize}) | val generate_blocks_simple:
#a:Type0
-> blocksize:size_pos
-> max:nat
-> n:nat{n <= max}
-> f:(i:nat{i < max} -> lseq a blocksize) ->
Tot (s:seq a{length s == n * blocksize}) | let generate_blocks_simple #a bs max nb f =
repeat_gen nb (generate_blocks_simple_a a bs max)
(generate_blocks_simple_f #a bs max f) Seq.empty | {
"file_name": "lib/Lib.Sequence.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 51,
"end_line": 224,
"start_col": 0,
"start_line": 222
} | module Lib.Sequence
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
#set-options "--z3rlimit 30 --max_fuel 0 --max_ifuel 0 --using_facts_from '-* +Prims +FStar.Pervasives +FStar.Math.Lemmas +FStar.Seq +Lib.IntTypes +Lib.Sequence'"
let index #a #len s n = Seq.index s n
let create #a len init = Seq.create #... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Seq.Properties.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"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": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"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_el... | false |
blocksize: Lib.IntTypes.size_pos ->
max: Prims.nat ->
n: Prims.nat{n <= max} ->
f: (i: Prims.nat{i < max} -> Lib.Sequence.lseq a blocksize)
-> s: Lib.Sequence.seq a {Lib.Sequence.length s == n * blocksize} | Prims.Tot | [
"total"
] | [] | [
"Lib.IntTypes.size_pos",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_LessThan",
"Lib.Sequence.lseq",
"Lib.LoopCombinators.repeat_gen",
"Lib.Sequence.generate_blocks_simple_a",
"Lib.Sequence.generate_blocks_simple_f",
"FStar.Seq.Base.empty",
"Lib.Sequence.seq",
"Prims.eq2",
... | [] | false | false | false | false | false | let generate_blocks_simple #a bs max nb f =
| repeat_gen nb (generate_blocks_simple_a a bs max) (generate_blocks_simple_f #a bs max f) Seq.empty | false |
Lib.Sequence.fst | Lib.Sequence.repeat_blocks_multi | val repeat_blocks_multi:
#a:Type0
-> #b:Type0
-> blocksize:size_pos
-> inp:seq a{length inp % blocksize = 0}
-> f:(lseq a blocksize -> b -> b)
-> init:b ->
Tot b | val repeat_blocks_multi:
#a:Type0
-> #b:Type0
-> blocksize:size_pos
-> inp:seq a{length inp % blocksize = 0}
-> f:(lseq a blocksize -> b -> b)
-> init:b ->
Tot b | let repeat_blocks_multi #a #b bs inp f init =
let len = length inp in
let nb = len / bs in
repeati nb (repeat_blocks_f bs inp f nb) init | {
"file_name": "lib/Lib.Sequence.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 47,
"end_line": 194,
"start_col": 0,
"start_line": 191
} | module Lib.Sequence
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
#set-options "--z3rlimit 30 --max_fuel 0 --max_ifuel 0 --using_facts_from '-* +Prims +FStar.Pervasives +FStar.Math.Lemmas +FStar.Seq +Lib.IntTypes +Lib.Sequence'"
let index #a #len s n = Seq.index s n
let create #a len init = Seq.create #... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Seq.Properties.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"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": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"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_el... | false |
blocksize: Lib.IntTypes.size_pos ->
inp: Lib.Sequence.seq a {Lib.Sequence.length inp % blocksize = 0} ->
f: (_: Lib.Sequence.lseq a blocksize -> _: b -> b) ->
init: b
-> b | Prims.Tot | [
"total"
] | [] | [
"Lib.IntTypes.size_pos",
"Lib.Sequence.seq",
"Prims.b2t",
"Prims.op_Equality",
"Prims.int",
"Prims.op_Modulus",
"Lib.Sequence.length",
"Lib.Sequence.lseq",
"Lib.LoopCombinators.repeati",
"Lib.Sequence.repeat_blocks_f",
"Prims.op_Division",
"Prims.nat"
] | [] | false | false | false | false | false | let repeat_blocks_multi #a #b bs inp f init =
| let len = length inp in
let nb = len / bs in
repeati nb (repeat_blocks_f bs inp f nb) init | false |
Lib.Sequence.fst | Lib.Sequence.map_blocks_multi | val map_blocks_multi:
#a:Type0
-> blocksize:size_pos
-> max:nat
-> n:nat{n <= max}
-> inp:seq a{length inp == max * blocksize}
-> f:(i:nat{i < max} -> lseq a blocksize -> lseq a blocksize) ->
Tot (out:seq a {length out == n * blocksize}) | val map_blocks_multi:
#a:Type0
-> blocksize:size_pos
-> max:nat
-> n:nat{n <= max}
-> inp:seq a{length inp == max * blocksize}
-> f:(i:nat{i < max} -> lseq a blocksize -> lseq a blocksize) ->
Tot (out:seq a {length out == n * blocksize}) | let map_blocks_multi #a bs max nb inp f =
repeat_gen nb (map_blocks_a a bs max)
(map_blocks_f #a bs max inp f) Seq.empty | {
"file_name": "lib/Lib.Sequence.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 44,
"end_line": 258,
"start_col": 0,
"start_line": 256
} | module Lib.Sequence
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
#set-options "--z3rlimit 30 --max_fuel 0 --max_ifuel 0 --using_facts_from '-* +Prims +FStar.Pervasives +FStar.Math.Lemmas +FStar.Seq +Lib.IntTypes +Lib.Sequence'"
let index #a #len s n = Seq.index s n
let create #a len init = Seq.create #... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Seq.Properties.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"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": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"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_el... | false |
blocksize: Lib.IntTypes.size_pos ->
max: Prims.nat ->
n: Prims.nat{n <= max} ->
inp: Lib.Sequence.seq a {Lib.Sequence.length inp == max * blocksize} ->
f: (i: Prims.nat{i < max} -> _: Lib.Sequence.lseq a blocksize -> Lib.Sequence.lseq a blocksize)
-> out: Lib.Sequence.seq a {Lib.Sequence.length o... | Prims.Tot | [
"total"
] | [] | [
"Lib.IntTypes.size_pos",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Lib.Sequence.seq",
"Prims.eq2",
"Prims.int",
"Lib.Sequence.length",
"FStar.Mul.op_Star",
"Prims.op_LessThan",
"Lib.Sequence.lseq",
"Lib.LoopCombinators.repeat_gen",
"Lib.Sequence.map_blocks_a",
"Lib.Sequence.ma... | [] | false | false | false | false | false | let map_blocks_multi #a bs max nb inp f =
| repeat_gen nb (map_blocks_a a bs max) (map_blocks_f #a bs max inp f) Seq.empty | false |
Lib.Sequence.fst | Lib.Sequence.div_interval | val div_interval: b:pos -> n:int -> i:int -> Lemma
(requires n * b <= i /\ i < (n + 1) * b)
(ensures i / b = n) | val div_interval: b:pos -> n:int -> i:int -> Lemma
(requires n * b <= i /\ i < (n + 1) * b)
(ensures i / b = n) | let div_interval b n i =
Math.Lemmas.lemma_div_le (n * b) i b;
Math.Lemmas.cancel_mul_div n b | {
"file_name": "lib/Lib.Sequence.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 32,
"end_line": 229,
"start_col": 0,
"start_line": 227
} | module Lib.Sequence
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
#set-options "--z3rlimit 30 --max_fuel 0 --max_ifuel 0 --using_facts_from '-* +Prims +FStar.Pervasives +FStar.Math.Lemmas +FStar.Seq +Lib.IntTypes +Lib.Sequence'"
let index #a #len s n = Seq.index s n
let create #a len init = Seq.create #... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Seq.Properties.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"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": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"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_el... | false | b: Prims.pos -> n: Prims.int -> i: Prims.int
-> FStar.Pervasives.Lemma (requires n * b <= i /\ i < (n + 1) * b) (ensures i / b = n) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.pos",
"Prims.int",
"FStar.Math.Lemmas.cancel_mul_div",
"Prims.unit",
"FStar.Math.Lemmas.lemma_div_le",
"FStar.Mul.op_Star"
] | [] | true | false | true | false | false | let div_interval b n i =
| Math.Lemmas.lemma_div_le (n * b) i b;
Math.Lemmas.cancel_mul_div n b | false |
Lib.Sequence.fst | Lib.Sequence.generate_blocks_simple_f | val generate_blocks_simple_f
(#a: Type)
(bs: size_nat{bs > 0})
(max: nat)
(f: (i: nat{i < max} -> lseq a bs))
(i: nat{i < max})
(acc: generate_blocks_simple_a a bs max i)
: generate_blocks_simple_a a bs max (i + 1) | val generate_blocks_simple_f
(#a: Type)
(bs: size_nat{bs > 0})
(max: nat)
(f: (i: nat{i < max} -> lseq a bs))
(i: nat{i < max})
(acc: generate_blocks_simple_a a bs max i)
: generate_blocks_simple_a a bs max (i + 1) | let generate_blocks_simple_f
(#a:Type)
(bs:size_nat{bs > 0})
(max:nat)
(f:(i:nat{i < max} -> lseq a bs))
(i:nat{i < max})
(acc:generate_blocks_simple_a a bs max i) : generate_blocks_simple_a a bs max (i + 1)
=
Seq.append acc (f i) | {
"file_name": "lib/Lib.Sequence.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 21,
"end_line": 220,
"start_col": 0,
"start_line": 212
} | module Lib.Sequence
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
#set-options "--z3rlimit 30 --max_fuel 0 --max_ifuel 0 --using_facts_from '-* +Prims +FStar.Pervasives +FStar.Math.Lemmas +FStar.Seq +Lib.IntTypes +Lib.Sequence'"
let index #a #len s n = Seq.index s n
let create #a len init = Seq.create #... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Seq.Properties.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"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": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"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_el... | false |
bs: Lib.IntTypes.size_nat{bs > 0} ->
max: Prims.nat ->
f: (i: Prims.nat{i < max} -> Lib.Sequence.lseq a bs) ->
i: Prims.nat{i < max} ->
acc: Lib.Sequence.generate_blocks_simple_a a bs max i
-> Lib.Sequence.generate_blocks_simple_a a bs max (i + 1) | Prims.Tot | [
"total"
] | [] | [
"Lib.IntTypes.size_nat",
"Prims.b2t",
"Prims.op_GreaterThan",
"Prims.nat",
"Prims.op_LessThan",
"Lib.Sequence.lseq",
"Lib.Sequence.generate_blocks_simple_a",
"FStar.Seq.Base.append",
"Prims.op_Addition"
] | [] | false | false | false | false | false | let generate_blocks_simple_f
(#a: Type)
(bs: size_nat{bs > 0})
(max: nat)
(f: (i: nat{i < max} -> lseq a bs))
(i: nat{i < max})
(acc: generate_blocks_simple_a a bs max i)
: generate_blocks_simple_a a bs max (i + 1) =
| Seq.append acc (f i) | false |
Pulse.C.Types.Array.fsti | Pulse.C.Types.Array.base_array_index_t | val base_array_index_t (n: array_size_t) : Tot eqtype | val base_array_index_t (n: array_size_t) : Tot eqtype | let base_array_index_t (n: array_size_t) : Tot eqtype =
Pulse.C.Types.Array.Base.array_domain (Ghost.hide n) | {
"file_name": "share/steel/examples/pulse/lib/c/Pulse.C.Types.Array.fsti",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 54,
"end_line": 15,
"start_col": 0,
"start_line": 14
} | module Pulse.C.Types.Array
open Pulse.Lib.Pervasives
include Pulse.C.Types.Base
open Pulse.C.Typenat
module SZ = FStar.SizeT
// To be extracted as: t[tn]
// Per the C standard, base array types must be of nonzero size
inline_for_extraction [@@noextract_to "krml"]
let array_size_t = (n: SZ.t { SZ.v n > 0 })
val base_a... | {
"checked_file": "/",
"dependencies": [
"Pulse.Lib.Pervasives.fst.checked",
"Pulse.C.Types.Base.fsti.checked",
"Pulse.C.Types.Array.Base.fst.checked",
"Pulse.C.Typenat.fsti.checked",
"prims.fst.checked",
"FStar.SizeT.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.che... | [
{
"abbrev": true,
"full_module": "FStar.SizeT",
"short_module": "SZ"
},
{
"abbrev": false,
"full_module": "Pulse.C.Typenat",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.C.Types.Base",
"short_module": null
},
{
"abbrev": false,
"full_module... | {
"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_el... | false | n: Pulse.C.Types.Array.array_size_t -> Prims.eqtype | Prims.Tot | [
"total"
] | [] | [
"Pulse.C.Types.Array.array_size_t",
"Pulse.C.Types.Array.Base.array_domain",
"FStar.Ghost.hide",
"FStar.SizeT.t",
"Prims.eqtype"
] | [] | false | false | false | true | false | let base_array_index_t (n: array_size_t) : Tot eqtype =
| Pulse.C.Types.Array.Base.array_domain (Ghost.hide n) | false |
Lib.Sequence.fst | Lib.Sequence.mod_interval_lt | val mod_interval_lt: b:pos -> n:int -> i:int -> j:int -> Lemma
(requires n * b <= i /\ i < j /\ j < (n + 1) * b)
(ensures i % b < j % b) | val mod_interval_lt: b:pos -> n:int -> i:int -> j:int -> Lemma
(requires n * b <= i /\ i < j /\ j < (n + 1) * b)
(ensures i % b < j % b) | let mod_interval_lt b n i j =
div_interval b n i;
div_interval b n j | {
"file_name": "lib/Lib.Sequence.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 20,
"end_line": 233,
"start_col": 0,
"start_line": 231
} | module Lib.Sequence
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
#set-options "--z3rlimit 30 --max_fuel 0 --max_ifuel 0 --using_facts_from '-* +Prims +FStar.Pervasives +FStar.Math.Lemmas +FStar.Seq +Lib.IntTypes +Lib.Sequence'"
let index #a #len s n = Seq.index s n
let create #a len init = Seq.create #... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Seq.Properties.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"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": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"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_el... | false | b: Prims.pos -> n: Prims.int -> i: Prims.int -> j: Prims.int
-> FStar.Pervasives.Lemma (requires n * b <= i /\ i < j /\ j < (n + 1) * b)
(ensures i % b < j % b) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.pos",
"Prims.int",
"Lib.Sequence.div_interval",
"Prims.unit"
] | [] | true | false | true | false | false | let mod_interval_lt b n i j =
| div_interval b n i;
div_interval b n j | false |
LowParse.Low.IfThenElse.fst | LowParse.Low.IfThenElse.accessor_ifthenelse_payload' | val accessor_ifthenelse_payload'
(#p: parse_ifthenelse_param)
(s: serialize_ifthenelse_param p)
(j: jumper p.parse_ifthenelse_tag_parser)
(b: bool)
(#rrel #rel: _)
(input: slice rrel rel)
(pos: U32.t)
: HST.Stack U32.t
(requires
(fun h ->
valid (pa... | val accessor_ifthenelse_payload'
(#p: parse_ifthenelse_param)
(s: serialize_ifthenelse_param p)
(j: jumper p.parse_ifthenelse_tag_parser)
(b: bool)
(#rrel #rel: _)
(input: slice rrel rel)
(pos: U32.t)
: HST.Stack U32.t
(requires
(fun h ->
valid (pa... | let accessor_ifthenelse_payload'
(#p: parse_ifthenelse_param)
(s: serialize_ifthenelse_param p)
(j: jumper p.parse_ifthenelse_tag_parser)
(b: bool)
(#rrel #rel: _)
(input: slice rrel rel)
(pos: U32.t)
: HST.Stack U32.t
(requires (fun h ->
valid (parse_ifthenelse p) h input pos /\
(clens_ifthenel... | {
"file_name": "src/lowparse/LowParse.Low.IfThenElse.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 13,
"end_line": 283,
"start_col": 0,
"start_line": 256
} | module LowParse.Low.IfThenElse
include LowParse.Spec.IfThenElse
include LowParse.Low.Combinators
module U32 = FStar.UInt32
module HS = FStar.HyperStack
module HST = FStar.HyperStack.ST
module B = LowStar.Buffer
module Cast = FStar.Int.Cast
module U64 = FStar.UInt64
let valid_ifthenelse_intro
(p: parse_ifthenelse_pa... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"LowParse.Spec.IfThenElse.fst.checked",
"LowParse.Low.Combinators.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Int.Cast.fst.... | [
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": "FStar.Int.Cast",
"short_module": "Cast"
},
{
"abbrev": true,
"full_module": "LowStar.Buffer",
"short_module": "B"
},
{
"abbrev": true,
"full_module": "F... | {
"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_el... | false |
s: LowParse.Spec.IfThenElse.serialize_ifthenelse_param p ->
j: LowParse.Low.Base.jumper (Mkparse_ifthenelse_param?.parse_ifthenelse_tag_parser p) ->
b: Prims.bool ->
input: LowParse.Slice.slice rrel rel ->
pos: FStar.UInt32.t
-> FStar.HyperStack.ST.Stack FStar.UInt32.t | FStar.HyperStack.ST.Stack | [] | [] | [
"LowParse.Spec.IfThenElse.parse_ifthenelse_param",
"LowParse.Spec.IfThenElse.serialize_ifthenelse_param",
"LowParse.Low.Base.jumper",
"LowParse.Spec.IfThenElse.__proj__Mkparse_ifthenelse_param__item__parse_ifthenelse_tag_kind",
"LowParse.Spec.IfThenElse.__proj__Mkparse_ifthenelse_param__item__parse_ifthenel... | [] | false | true | false | false | false | let accessor_ifthenelse_payload'
(#p: parse_ifthenelse_param)
(s: serialize_ifthenelse_param p)
(j: jumper p.parse_ifthenelse_tag_parser)
(b: bool)
(#rrel #rel: _)
(input: slice rrel rel)
(pos: U32.t)
: HST.Stack U32.t
(requires
(fun h ->
valid (pa... | let h = HST.get () in
[@@ inline_let ]let _ =
let pos' = get_valid_pos (parse_ifthenelse p) h input pos in
let large = bytes_of_slice_from h input pos in
slice_access_eq h (gaccessor_ifthenelse_payload s b) input pos;
valid_facts (parse_ifthenelse p) h input pos;
parse_ifthenelse_eq p large;
valid_facts p.p... | false |
LowParse.Low.IfThenElse.fst | LowParse.Low.IfThenElse.accessor_ifthenelse_tag | val accessor_ifthenelse_tag (#p: parse_ifthenelse_param) (s: serialize_ifthenelse_param p)
: Tot (accessor (gaccessor_ifthenelse_tag s)) | val accessor_ifthenelse_tag (#p: parse_ifthenelse_param) (s: serialize_ifthenelse_param p)
: Tot (accessor (gaccessor_ifthenelse_tag s)) | let accessor_ifthenelse_tag
(#p: parse_ifthenelse_param)
(s: serialize_ifthenelse_param p)
: Tot (accessor (gaccessor_ifthenelse_tag s))
= fun #rrel #rel sl pos ->
let h = HST.get () in
slice_access_eq h (gaccessor_ifthenelse_tag s) sl pos;
pos | {
"file_name": "src/lowparse/LowParse.Low.IfThenElse.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 7,
"end_line": 165,
"start_col": 0,
"start_line": 158
} | module LowParse.Low.IfThenElse
include LowParse.Spec.IfThenElse
include LowParse.Low.Combinators
module U32 = FStar.UInt32
module HS = FStar.HyperStack
module HST = FStar.HyperStack.ST
module B = LowStar.Buffer
module Cast = FStar.Int.Cast
module U64 = FStar.UInt64
let valid_ifthenelse_intro
(p: parse_ifthenelse_pa... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"LowParse.Spec.IfThenElse.fst.checked",
"LowParse.Low.Combinators.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Int.Cast.fst.... | [
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": "FStar.Int.Cast",
"short_module": "Cast"
},
{
"abbrev": true,
"full_module": "LowStar.Buffer",
"short_module": "B"
},
{
"abbrev": true,
"full_module": "F... | {
"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_el... | false | s: LowParse.Spec.IfThenElse.serialize_ifthenelse_param p
-> LowParse.Low.Base.accessor (LowParse.Low.IfThenElse.gaccessor_ifthenelse_tag s) | Prims.Tot | [
"total"
] | [] | [
"LowParse.Spec.IfThenElse.parse_ifthenelse_param",
"LowParse.Spec.IfThenElse.serialize_ifthenelse_param",
"LowParse.Slice.srel",
"LowParse.Bytes.byte",
"LowParse.Slice.slice",
"FStar.UInt32.t",
"Prims.unit",
"LowParse.Low.Base.Spec.slice_access_eq",
"LowParse.Spec.IfThenElse.parse_ifthenelse_kind",
... | [] | false | false | false | false | false | let accessor_ifthenelse_tag (#p: parse_ifthenelse_param) (s: serialize_ifthenelse_param p)
: Tot (accessor (gaccessor_ifthenelse_tag s)) =
| fun #rrel #rel sl pos ->
let h = HST.get () in
slice_access_eq h (gaccessor_ifthenelse_tag s) sl pos;
pos | false |
Lib.Sequence.fst | Lib.Sequence.mod_prop | val mod_prop: n:pos -> a:nat -> b:nat{a * n <= b /\ b < (a + 1) * n} ->
Lemma (b - a * n == b % n) | val mod_prop: n:pos -> a:nat -> b:nat{a * n <= b /\ b < (a + 1) * n} ->
Lemma (b - a * n == b % n) | let mod_prop n a b =
Math.Lemmas.modulo_lemma (b - a * n) n;
Math.Lemmas.lemma_mod_sub b n a | {
"file_name": "lib/Lib.Sequence.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 33,
"end_line": 267,
"start_col": 0,
"start_line": 265
} | module Lib.Sequence
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
#set-options "--z3rlimit 30 --max_fuel 0 --max_ifuel 0 --using_facts_from '-* +Prims +FStar.Pervasives +FStar.Math.Lemmas +FStar.Seq +Lib.IntTypes +Lib.Sequence'"
let index #a #len s n = Seq.index s n
let create #a len init = Seq.create #... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Seq.Properties.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"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": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"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_el... | false | n: Prims.pos -> a: Prims.nat -> b: Prims.nat{a * n <= b /\ b < (a + 1) * n}
-> FStar.Pervasives.Lemma (ensures b - a * n == b % n) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.pos",
"Prims.nat",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"FStar.Mul.op_Star",
"Prims.op_LessThan",
"Prims.op_Addition",
"FStar.Math.Lemmas.lemma_mod_sub",
"Prims.unit",
"FStar.Math.Lemmas.modulo_lemma",
"Prims.op_Subtraction"
] | [] | true | false | true | false | false | let mod_prop n a b =
| Math.Lemmas.modulo_lemma (b - a * n) n;
Math.Lemmas.lemma_mod_sub b n a | false |
Pulse.C.Types.Array.fsti | Pulse.C.Types.Array.array_ptr | val array_ptr : td: Pulse.C.Types.Base.typedef t -> Type0 | let array_ptr (#t: Type) (td: typedef t) = array_ptr_gen t | {
"file_name": "share/steel/examples/pulse/lib/c/Pulse.C.Types.Array.fsti",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 58,
"end_line": 169,
"start_col": 0,
"start_line": 169
} | module Pulse.C.Types.Array
open Pulse.Lib.Pervasives
include Pulse.C.Types.Base
open Pulse.C.Typenat
module SZ = FStar.SizeT
// To be extracted as: t[tn]
// Per the C standard, base array types must be of nonzero size
inline_for_extraction [@@noextract_to "krml"]
let array_size_t = (n: SZ.t { SZ.v n > 0 })
val base_a... | {
"checked_file": "/",
"dependencies": [
"Pulse.Lib.Pervasives.fst.checked",
"Pulse.C.Types.Base.fsti.checked",
"Pulse.C.Types.Array.Base.fst.checked",
"Pulse.C.Typenat.fsti.checked",
"prims.fst.checked",
"FStar.SizeT.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.che... | [
{
"abbrev": true,
"full_module": "FStar.SizeT",
"short_module": "SZ"
},
{
"abbrev": false,
"full_module": "Pulse.C.Typenat",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.C.Types.Base",
"short_module": null
},
{
"abbrev": false,
"full_module... | {
"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_el... | false | td: Pulse.C.Types.Base.typedef t -> Type0 | Prims.Tot | [
"total"
] | [] | [
"Pulse.C.Types.Base.typedef",
"Pulse.C.Types.Array.array_ptr_gen"
] | [] | false | false | false | true | true | let array_ptr (#t: Type) (td: typedef t) =
| array_ptr_gen t | false | |
Pulse.C.Types.Array.fsti | Pulse.C.Types.Array.array_size_t | val array_size_t : Type0 | let array_size_t = (n: SZ.t { SZ.v n > 0 }) | {
"file_name": "share/steel/examples/pulse/lib/c/Pulse.C.Types.Array.fsti",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 43,
"end_line": 11,
"start_col": 0,
"start_line": 11
} | module Pulse.C.Types.Array
open Pulse.Lib.Pervasives
include Pulse.C.Types.Base
open Pulse.C.Typenat
module SZ = FStar.SizeT
// To be extracted as: t[tn]
// Per the C standard, base array types must be of nonzero size | {
"checked_file": "/",
"dependencies": [
"Pulse.Lib.Pervasives.fst.checked",
"Pulse.C.Types.Base.fsti.checked",
"Pulse.C.Types.Array.Base.fst.checked",
"Pulse.C.Typenat.fsti.checked",
"prims.fst.checked",
"FStar.SizeT.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.che... | [
{
"abbrev": true,
"full_module": "FStar.SizeT",
"short_module": "SZ"
},
{
"abbrev": false,
"full_module": "Pulse.C.Typenat",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.C.Types.Base",
"short_module": null
},
{
"abbrev": false,
"full_module... | {
"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_el... | false | Type0 | Prims.Tot | [
"total"
] | [] | [
"FStar.SizeT.t",
"Prims.b2t",
"Prims.op_GreaterThan",
"FStar.SizeT.v"
] | [] | false | false | false | true | true | let array_size_t =
| (n: SZ.t{SZ.v n > 0}) | false | |
Pulse.C.Types.Array.fsti | Pulse.C.Types.Array.array_ptr_gen | val array_ptr_gen ([@@@ unused]t: Type0) : Tot Type0 | val array_ptr_gen ([@@@ unused]t: Type0) : Tot Type0 | let array_ptr_gen ([@@@unused] t: Type0) : Tot Type0 = array_void_ptr | {
"file_name": "share/steel/examples/pulse/lib/c/Pulse.C.Types.Array.fsti",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 69,
"end_line": 167,
"start_col": 0,
"start_line": 167
} | module Pulse.C.Types.Array
open Pulse.Lib.Pervasives
include Pulse.C.Types.Base
open Pulse.C.Typenat
module SZ = FStar.SizeT
// To be extracted as: t[tn]
// Per the C standard, base array types must be of nonzero size
inline_for_extraction [@@noextract_to "krml"]
let array_size_t = (n: SZ.t { SZ.v n > 0 })
val base_a... | {
"checked_file": "/",
"dependencies": [
"Pulse.Lib.Pervasives.fst.checked",
"Pulse.C.Types.Base.fsti.checked",
"Pulse.C.Types.Array.Base.fst.checked",
"Pulse.C.Typenat.fsti.checked",
"prims.fst.checked",
"FStar.SizeT.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.che... | [
{
"abbrev": true,
"full_module": "FStar.SizeT",
"short_module": "SZ"
},
{
"abbrev": false,
"full_module": "Pulse.C.Typenat",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.C.Types.Base",
"short_module": null
},
{
"abbrev": false,
"full_module... | {
"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_el... | false | t: Type0 -> Type0 | Prims.Tot | [
"total"
] | [] | [
"Pulse.C.Types.Array.array_void_ptr"
] | [] | false | false | false | true | true | let array_ptr_gen ([@@@ unused]t: Type0) : Tot Type0 =
| array_void_ptr | false |
LowParse.Low.IfThenElse.fst | LowParse.Low.IfThenElse.validate_ifthenelse | val validate_ifthenelse
(p: parse_ifthenelse_param)
(vt: validator p.parse_ifthenelse_tag_parser)
(test: test_ifthenelse_tag p)
(vp: (b: bool -> Tot (validator (dsnd (p.parse_ifthenelse_payload_parser b)))))
: Tot (validator (parse_ifthenelse p)) | val validate_ifthenelse
(p: parse_ifthenelse_param)
(vt: validator p.parse_ifthenelse_tag_parser)
(test: test_ifthenelse_tag p)
(vp: (b: bool -> Tot (validator (dsnd (p.parse_ifthenelse_payload_parser b)))))
: Tot (validator (parse_ifthenelse p)) | let validate_ifthenelse
(p: parse_ifthenelse_param)
(vt: validator p.parse_ifthenelse_tag_parser)
(test: test_ifthenelse_tag p)
(vp: (b: bool) -> Tot (validator (dsnd (p.parse_ifthenelse_payload_parser b))))
: Tot (validator (parse_ifthenelse p))
= fun #rrel #rel input pos ->
let h = HST.get () in
[@inline_... | {
"file_name": "src/lowparse/LowParse.Low.IfThenElse.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 35,
"end_line": 111,
"start_col": 0,
"start_line": 92
} | module LowParse.Low.IfThenElse
include LowParse.Spec.IfThenElse
include LowParse.Low.Combinators
module U32 = FStar.UInt32
module HS = FStar.HyperStack
module HST = FStar.HyperStack.ST
module B = LowStar.Buffer
module Cast = FStar.Int.Cast
module U64 = FStar.UInt64
let valid_ifthenelse_intro
(p: parse_ifthenelse_pa... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"LowParse.Spec.IfThenElse.fst.checked",
"LowParse.Low.Combinators.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Int.Cast.fst.... | [
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": "FStar.Int.Cast",
"short_module": "Cast"
},
{
"abbrev": true,
"full_module": "LowStar.Buffer",
"short_module": "B"
},
{
"abbrev": true,
"full_module": "F... | {
"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_el... | false |
p: LowParse.Spec.IfThenElse.parse_ifthenelse_param ->
vt: LowParse.Low.Base.validator (Mkparse_ifthenelse_param?.parse_ifthenelse_tag_parser p) ->
test: LowParse.Low.IfThenElse.test_ifthenelse_tag p ->
vp:
(b: Prims.bool
-> LowParse.Low.Base.validator (FStar.Pervasives.dsnd (Mkparse_ift... | Prims.Tot | [
"total"
] | [] | [
"LowParse.Spec.IfThenElse.parse_ifthenelse_param",
"LowParse.Low.Base.validator",
"LowParse.Spec.IfThenElse.__proj__Mkparse_ifthenelse_param__item__parse_ifthenelse_tag_kind",
"LowParse.Spec.IfThenElse.__proj__Mkparse_ifthenelse_param__item__parse_ifthenelse_tag_t",
"LowParse.Spec.IfThenElse.__proj__Mkparse... | [] | false | false | false | false | false | let validate_ifthenelse
(p: parse_ifthenelse_param)
(vt: validator p.parse_ifthenelse_tag_parser)
(test: test_ifthenelse_tag p)
(vp: (b: bool -> Tot (validator (dsnd (p.parse_ifthenelse_payload_parser b)))))
: Tot (validator (parse_ifthenelse p)) =
| fun #rrel #rel input pos ->
let h = HST.get () in
[@@ inline_let ]let _ =
Classical.move_requires (valid_ifthenelse_intro p h input) (uint64_to_uint32 pos);
Classical.move_requires (valid_ifthenelse_elim p h input) (uint64_to_uint32 pos)
in
let pos_after_t = vt input pos in
if is_error pos_after_t
t... | false |
Pulse.C.Types.Array.fsti | Pulse.C.Types.Array.array_ref | val array_ref : td: Pulse.C.Types.Base.typedef t -> Type0 | let array_ref (#t: Type) (td: typedef t) = (a: array_ptr td { g_array_ptr_is_null a == false }) | {
"file_name": "share/steel/examples/pulse/lib/c/Pulse.C.Types.Array.fsti",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 95,
"end_line": 178,
"start_col": 0,
"start_line": 178
} | module Pulse.C.Types.Array
open Pulse.Lib.Pervasives
include Pulse.C.Types.Base
open Pulse.C.Typenat
module SZ = FStar.SizeT
// To be extracted as: t[tn]
// Per the C standard, base array types must be of nonzero size
inline_for_extraction [@@noextract_to "krml"]
let array_size_t = (n: SZ.t { SZ.v n > 0 })
val base_a... | {
"checked_file": "/",
"dependencies": [
"Pulse.Lib.Pervasives.fst.checked",
"Pulse.C.Types.Base.fsti.checked",
"Pulse.C.Types.Array.Base.fst.checked",
"Pulse.C.Typenat.fsti.checked",
"prims.fst.checked",
"FStar.SizeT.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.che... | [
{
"abbrev": true,
"full_module": "FStar.SizeT",
"short_module": "SZ"
},
{
"abbrev": false,
"full_module": "Pulse.C.Typenat",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.C.Types.Base",
"short_module": null
},
{
"abbrev": false,
"full_module... | {
"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_el... | false | td: Pulse.C.Types.Base.typedef t -> Type0 | Prims.Tot | [
"total"
] | [] | [
"Pulse.C.Types.Base.typedef",
"Pulse.C.Types.Array.array_ptr",
"Prims.eq2",
"Prims.bool",
"Pulse.C.Types.Array.g_array_ptr_is_null"
] | [] | false | false | false | true | true | let array_ref (#t: Type) (td: typedef t) =
| (a: array_ptr td {g_array_ptr_is_null a == false}) | false | |
Lib.Sequence.fst | Lib.Sequence.map_blocks | val map_blocks:
#a:Type0
-> blocksize:size_pos
-> inp:seq a
-> f:(block (length inp) blocksize -> lseq a blocksize -> lseq a blocksize)
-> g:(last (length inp) blocksize -> rem:size_nat{rem < blocksize} -> s:lseq a rem -> lseq a rem) ->
Tot (out:seq a{length out == length inp}) | val map_blocks:
#a:Type0
-> blocksize:size_pos
-> inp:seq a
-> f:(block (length inp) blocksize -> lseq a blocksize -> lseq a blocksize)
-> g:(last (length inp) blocksize -> rem:size_nat{rem < blocksize} -> s:lseq a rem -> lseq a rem) ->
Tot (out:seq a{length out == length inp}) | let map_blocks #a blocksize inp f g =
let len = length inp in
let nb = len / blocksize in
let rem = len % blocksize in
let blocks = Seq.slice inp 0 (nb * blocksize) in
let last = Seq.slice inp (nb * blocksize) len in
let bs = map_blocks_multi #a blocksize nb nb blocks f in
if (rem > 0) then
Seq.append... | {
"file_name": "lib/Lib.Sequence.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 9,
"end_line": 298,
"start_col": 0,
"start_line": 289
} | module Lib.Sequence
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
#set-options "--z3rlimit 30 --max_fuel 0 --max_ifuel 0 --using_facts_from '-* +Prims +FStar.Pervasives +FStar.Math.Lemmas +FStar.Seq +Lib.IntTypes +Lib.Sequence'"
let index #a #len s n = Seq.index s n
let create #a len init = Seq.create #... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Seq.Properties.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"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": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"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_el... | false |
blocksize: Lib.IntTypes.size_pos ->
inp: Lib.Sequence.seq a ->
f:
(_: Lib.Sequence.block (Lib.Sequence.length inp) blocksize -> _: Lib.Sequence.lseq a blocksize
-> Lib.Sequence.lseq a blocksize) ->
g:
(
_: Lib.Sequence.last (Lib.Sequence.length inp) blocksize ->
... | Prims.Tot | [
"total"
] | [] | [
"Lib.IntTypes.size_pos",
"Lib.Sequence.seq",
"Lib.Sequence.block",
"Lib.Sequence.length",
"Lib.Sequence.lseq",
"Lib.Sequence.last",
"Lib.IntTypes.size_nat",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.op_GreaterThan",
"FStar.Seq.Base.append",
"Prims.bool",
"Prims.eq2",
"Prims.nat",
"Prims.i... | [] | false | false | false | false | false | let map_blocks #a blocksize inp f g =
| let len = length inp in
let nb = len / blocksize in
let rem = len % blocksize in
let blocks = Seq.slice inp 0 (nb * blocksize) in
let last = Seq.slice inp (nb * blocksize) len in
let bs = map_blocks_multi #a blocksize nb nb blocks f in
if (rem > 0) then Seq.append bs (g nb rem last) else bs | false |
Pulse.C.Types.Array.fsti | Pulse.C.Types.Array.array_len_t | val array_len_t (#t: Type) (#td: typedef t) (r: array_ptr td) : Tot Type0 | val array_len_t (#t: Type) (#td: typedef t) (r: array_ptr td) : Tot Type0 | let array_len_t (#t: Type) (#td: typedef t) (r: array_ptr td) : Tot Type0 =
(len: Ghost.erased SZ.t { SZ.v (array_ref_offset r) + SZ.v len <= SZ.v (array_ref_base_size r) }) | {
"file_name": "share/steel/examples/pulse/lib/c/Pulse.C.Types.Array.fsti",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 99,
"end_line": 205,
"start_col": 0,
"start_line": 204
} | module Pulse.C.Types.Array
open Pulse.Lib.Pervasives
include Pulse.C.Types.Base
open Pulse.C.Typenat
module SZ = FStar.SizeT
// To be extracted as: t[tn]
// Per the C standard, base array types must be of nonzero size
inline_for_extraction [@@noextract_to "krml"]
let array_size_t = (n: SZ.t { SZ.v n > 0 })
val base_a... | {
"checked_file": "/",
"dependencies": [
"Pulse.Lib.Pervasives.fst.checked",
"Pulse.C.Types.Base.fsti.checked",
"Pulse.C.Types.Array.Base.fst.checked",
"Pulse.C.Typenat.fsti.checked",
"prims.fst.checked",
"FStar.SizeT.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.che... | [
{
"abbrev": true,
"full_module": "FStar.SizeT",
"short_module": "SZ"
},
{
"abbrev": false,
"full_module": "Pulse.C.Typenat",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.C.Types.Base",
"short_module": null
},
{
"abbrev": false,
"full_module... | {
"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_el... | false | r: Pulse.C.Types.Array.array_ptr td -> Type0 | Prims.Tot | [
"total"
] | [] | [
"Pulse.C.Types.Base.typedef",
"Pulse.C.Types.Array.array_ptr",
"FStar.Ghost.erased",
"FStar.SizeT.t",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_Addition",
"FStar.SizeT.v",
"Pulse.C.Types.Array.array_ref_offset",
"FStar.Ghost.reveal",
"Pulse.C.Types.Array.array_ref_base_size"
] | [] | false | false | false | false | true | let array_len_t (#t: Type) (#td: typedef t) (r: array_ptr td) : Tot Type0 =
| (len: Ghost.erased SZ.t {SZ.v (array_ref_offset r) + SZ.v len <= SZ.v (array_ref_base_size r)}) | false |
Pulse.C.Types.Array.fsti | Pulse.C.Types.Array.array | val array (#t: Type) (td: typedef t) : Tot Type0 | val array (#t: Type) (td: typedef t) : Tot Type0 | let array (#t: Type) (td: typedef t) : Tot Type0 = (a: array_or_null td { g_array_is_null a == false }) | {
"file_name": "share/steel/examples/pulse/lib/c/Pulse.C.Types.Array.fsti",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 103,
"end_line": 227,
"start_col": 0,
"start_line": 227
} | module Pulse.C.Types.Array
open Pulse.Lib.Pervasives
include Pulse.C.Types.Base
open Pulse.C.Typenat
module SZ = FStar.SizeT
// To be extracted as: t[tn]
// Per the C standard, base array types must be of nonzero size
inline_for_extraction [@@noextract_to "krml"]
let array_size_t = (n: SZ.t { SZ.v n > 0 })
val base_a... | {
"checked_file": "/",
"dependencies": [
"Pulse.Lib.Pervasives.fst.checked",
"Pulse.C.Types.Base.fsti.checked",
"Pulse.C.Types.Array.Base.fst.checked",
"Pulse.C.Typenat.fsti.checked",
"prims.fst.checked",
"FStar.SizeT.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.che... | [
{
"abbrev": true,
"full_module": "FStar.SizeT",
"short_module": "SZ"
},
{
"abbrev": false,
"full_module": "Pulse.C.Typenat",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.C.Types.Base",
"short_module": null
},
{
"abbrev": false,
"full_module... | {
"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_el... | false | td: Pulse.C.Types.Base.typedef t -> Type0 | Prims.Tot | [
"total"
] | [] | [
"Pulse.C.Types.Base.typedef",
"Pulse.C.Types.Array.array_or_null",
"Prims.eq2",
"Prims.bool",
"Pulse.C.Types.Array.g_array_is_null"
] | [] | false | false | false | true | true | let array (#t: Type) (td: typedef t) : Tot Type0 =
| (a: array_or_null td {g_array_is_null a == false}) | false |
Lib.Sequence.fst | Lib.Sequence.unfold_generate_blocks | val unfold_generate_blocks:
#t:Type0
-> len:size_nat
-> n:nat
-> a:(i:nat{i <= n} -> Type)
-> f:(i:nat{i < n} -> a i -> a (i + 1) & s:seq t{length s == len})
-> init:a 0
-> i:nat{i < n} ->
Lemma (generate_blocks #t len n (i+1) a f init ==
(let (acc,s) = generate_blocks #t len n i a f init i... | val unfold_generate_blocks:
#t:Type0
-> len:size_nat
-> n:nat
-> a:(i:nat{i <= n} -> Type)
-> f:(i:nat{i < n} -> a i -> a (i + 1) & s:seq t{length s == len})
-> init:a 0
-> i:nat{i < n} ->
Lemma (generate_blocks #t len n (i+1) a f init ==
(let (acc,s) = generate_blocks #t len n i a f init i... | let unfold_generate_blocks #t len n a f acc0 i =
let a0 = (acc0, (Seq.empty <: s:seq t{length s == 0 * len})) in
assert (generate_blocks #t len n (i+1) a f acc0 ==
repeat_gen (i+1) (generate_blocks_a t len n a) (generate_blocks_inner t len n a f) a0);
unfold_repeat_gen (i+1) (generate_blocks_a t len n... | {
"file_name": "lib/Lib.Sequence.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 96,
"end_line": 346,
"start_col": 0,
"start_line": 342
} | module Lib.Sequence
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
#set-options "--z3rlimit 30 --max_fuel 0 --max_ifuel 0 --using_facts_from '-* +Prims +FStar.Pervasives +FStar.Math.Lemmas +FStar.Seq +Lib.IntTypes +Lib.Sequence'"
let index #a #len s n = Seq.index s n
let create #a len init = Seq.create #... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Seq.Properties.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"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": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"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_el... | false |
len: Lib.IntTypes.size_nat ->
n: Prims.nat ->
a: (i: Prims.nat{i <= n} -> Type) ->
f:
(i: Prims.nat{i < n} -> _: a i
-> a (i + 1) * s: Lib.Sequence.seq t {Lib.Sequence.length s == len}) ->
init: a 0 ->
i: Prims.nat{i < n}
-> FStar.Pervasives.Lemma
(ensures
Lib.Sequen... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Lib.IntTypes.size_nat",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_LessThan",
"FStar.Pervasives.Native.tuple2",
"Prims.op_Addition",
"Lib.Sequence.seq",
"Prims.eq2",
"Lib.Sequence.length",
"Lib.LoopCombinators.unfold_repeat_gen",
"Lib.Sequence.generate_blocks_a",
"Lib.S... | [] | true | false | true | false | false | let unfold_generate_blocks #t len n a f acc0 i =
| let a0 = (acc0, (Seq.empty <: s: seq t {length s == 0 * len})) in
assert (generate_blocks #t len n (i + 1) a f acc0 ==
repeat_gen (i + 1) (generate_blocks_a t len n a) (generate_blocks_inner t len n a f) a0);
unfold_repeat_gen (i + 1) (generate_blocks_a t len n a) (generate_blocks_inner t len n a f) a0 i | false |
Pulse.C.Types.Array.fsti | Pulse.C.Types.Array.array_ptr_of | val array_ptr_of (#t: Type) (#td: typedef t) (ar: array_or_null td) : Tot (array_ptr td) | val array_ptr_of (#t: Type) (#td: typedef t) (ar: array_or_null td) : Tot (array_ptr td) | let array_ptr_of (#t: Type) (#td: typedef t) (ar: array_or_null td) : Tot (array_ptr td) =
match ar with
| (| a, _ |) -> a | {
"file_name": "share/steel/examples/pulse/lib/c/Pulse.C.Types.Array.fsti",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 19,
"end_line": 213,
"start_col": 0,
"start_line": 211
} | module Pulse.C.Types.Array
open Pulse.Lib.Pervasives
include Pulse.C.Types.Base
open Pulse.C.Typenat
module SZ = FStar.SizeT
// To be extracted as: t[tn]
// Per the C standard, base array types must be of nonzero size
inline_for_extraction [@@noextract_to "krml"]
let array_size_t = (n: SZ.t { SZ.v n > 0 })
val base_a... | {
"checked_file": "/",
"dependencies": [
"Pulse.Lib.Pervasives.fst.checked",
"Pulse.C.Types.Base.fsti.checked",
"Pulse.C.Types.Array.Base.fst.checked",
"Pulse.C.Typenat.fsti.checked",
"prims.fst.checked",
"FStar.SizeT.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.che... | [
{
"abbrev": true,
"full_module": "FStar.SizeT",
"short_module": "SZ"
},
{
"abbrev": false,
"full_module": "Pulse.C.Typenat",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.C.Types.Base",
"short_module": null
},
{
"abbrev": false,
"full_module... | {
"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_el... | false | ar: Pulse.C.Types.Array.array_or_null td -> Pulse.C.Types.Array.array_ptr td | Prims.Tot | [
"total"
] | [] | [
"Pulse.C.Types.Base.typedef",
"Pulse.C.Types.Array.array_or_null",
"Pulse.C.Types.Array.array_ptr",
"Pulse.C.Types.Array.array_len_t"
] | [] | false | false | false | false | false | let array_ptr_of (#t: Type) (#td: typedef t) (ar: array_or_null td) : Tot (array_ptr td) =
| match ar with | (| a , _ |) -> a | false |
Pulse.C.Types.Array.fsti | Pulse.C.Types.Array.null_array_ptr | val null_array_ptr (#t: Type) (td: typedef t) : Tot (array_ptr td) | val null_array_ptr (#t: Type) (td: typedef t) : Tot (array_ptr td) | let null_array_ptr (#t: Type) (td: typedef t) : Tot (array_ptr td) = null_array_void_ptr | {
"file_name": "share/steel/examples/pulse/lib/c/Pulse.C.Types.Array.fsti",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 88,
"end_line": 173,
"start_col": 0,
"start_line": 173
} | module Pulse.C.Types.Array
open Pulse.Lib.Pervasives
include Pulse.C.Types.Base
open Pulse.C.Typenat
module SZ = FStar.SizeT
// To be extracted as: t[tn]
// Per the C standard, base array types must be of nonzero size
inline_for_extraction [@@noextract_to "krml"]
let array_size_t = (n: SZ.t { SZ.v n > 0 })
val base_a... | {
"checked_file": "/",
"dependencies": [
"Pulse.Lib.Pervasives.fst.checked",
"Pulse.C.Types.Base.fsti.checked",
"Pulse.C.Types.Array.Base.fst.checked",
"Pulse.C.Typenat.fsti.checked",
"prims.fst.checked",
"FStar.SizeT.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.che... | [
{
"abbrev": true,
"full_module": "FStar.SizeT",
"short_module": "SZ"
},
{
"abbrev": false,
"full_module": "Pulse.C.Typenat",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.C.Types.Base",
"short_module": null
},
{
"abbrev": false,
"full_module... | {
"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_el... | false | td: Pulse.C.Types.Base.typedef t -> Pulse.C.Types.Array.array_ptr td | Prims.Tot | [
"total"
] | [] | [
"Pulse.C.Types.Base.typedef",
"Pulse.C.Types.Array.null_array_void_ptr",
"Pulse.C.Types.Array.array_ptr"
] | [] | false | false | false | false | false | let null_array_ptr (#t: Type) (td: typedef t) : Tot (array_ptr td) =
| null_array_void_ptr | false |
Pulse.C.Types.Array.fsti | Pulse.C.Types.Array.array_or_null | val array_or_null (#t: Type) (td: typedef t) : Tot Type0 | val array_or_null (#t: Type) (td: typedef t) : Tot Type0 | let array_or_null (#t: Type) (td: typedef t) : Tot Type0 = (r: array_ptr td & array_len_t r) | {
"file_name": "share/steel/examples/pulse/lib/c/Pulse.C.Types.Array.fsti",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 92,
"end_line": 208,
"start_col": 0,
"start_line": 208
} | module Pulse.C.Types.Array
open Pulse.Lib.Pervasives
include Pulse.C.Types.Base
open Pulse.C.Typenat
module SZ = FStar.SizeT
// To be extracted as: t[tn]
// Per the C standard, base array types must be of nonzero size
inline_for_extraction [@@noextract_to "krml"]
let array_size_t = (n: SZ.t { SZ.v n > 0 })
val base_a... | {
"checked_file": "/",
"dependencies": [
"Pulse.Lib.Pervasives.fst.checked",
"Pulse.C.Types.Base.fsti.checked",
"Pulse.C.Types.Array.Base.fst.checked",
"Pulse.C.Typenat.fsti.checked",
"prims.fst.checked",
"FStar.SizeT.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.che... | [
{
"abbrev": true,
"full_module": "FStar.SizeT",
"short_module": "SZ"
},
{
"abbrev": false,
"full_module": "Pulse.C.Typenat",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.C.Types.Base",
"short_module": null
},
{
"abbrev": false,
"full_module... | {
"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_el... | false | td: Pulse.C.Types.Base.typedef t -> Type0 | Prims.Tot | [
"total"
] | [] | [
"Pulse.C.Types.Base.typedef",
"Prims.dtuple2",
"Pulse.C.Types.Array.array_ptr",
"Pulse.C.Types.Array.array_len_t"
] | [] | false | false | false | true | true | let array_or_null (#t: Type) (td: typedef t) : Tot Type0 =
| (r: array_ptr td & array_len_t r) | false |
Pulse.C.Types.Array.fsti | Pulse.C.Types.Array.mk_array_or_null | val mk_array_or_null (#t: Type) (#td: typedef t) (a: array_ptr td) (len: array_len_t a)
: Tot (array_or_null td) | val mk_array_or_null (#t: Type) (#td: typedef t) (a: array_ptr td) (len: array_len_t a)
: Tot (array_or_null td) | let mk_array_or_null (#t: Type) (#td: typedef t) (a: array_ptr td) (len: array_len_t a) : Tot (array_or_null td) =
(| a, len |) | {
"file_name": "share/steel/examples/pulse/lib/c/Pulse.C.Types.Array.fsti",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 14,
"end_line": 221,
"start_col": 0,
"start_line": 220
} | module Pulse.C.Types.Array
open Pulse.Lib.Pervasives
include Pulse.C.Types.Base
open Pulse.C.Typenat
module SZ = FStar.SizeT
// To be extracted as: t[tn]
// Per the C standard, base array types must be of nonzero size
inline_for_extraction [@@noextract_to "krml"]
let array_size_t = (n: SZ.t { SZ.v n > 0 })
val base_a... | {
"checked_file": "/",
"dependencies": [
"Pulse.Lib.Pervasives.fst.checked",
"Pulse.C.Types.Base.fsti.checked",
"Pulse.C.Types.Array.Base.fst.checked",
"Pulse.C.Typenat.fsti.checked",
"prims.fst.checked",
"FStar.SizeT.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.che... | [
{
"abbrev": true,
"full_module": "FStar.SizeT",
"short_module": "SZ"
},
{
"abbrev": false,
"full_module": "Pulse.C.Typenat",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.C.Types.Base",
"short_module": null
},
{
"abbrev": false,
"full_module... | {
"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_el... | false | a: Pulse.C.Types.Array.array_ptr td -> len: Pulse.C.Types.Array.array_len_t a
-> Pulse.C.Types.Array.array_or_null td | Prims.Tot | [
"total"
] | [] | [
"Pulse.C.Types.Base.typedef",
"Pulse.C.Types.Array.array_ptr",
"Pulse.C.Types.Array.array_len_t",
"Prims.Mkdtuple2",
"Pulse.C.Types.Array.array_or_null"
] | [] | false | false | false | false | false | let mk_array_or_null (#t: Type) (#td: typedef t) (a: array_ptr td) (len: array_len_t a)
: Tot (array_or_null td) =
| (| a, len |) | false |
Lib.Sequence.fst | Lib.Sequence.create2_lemma | val create2_lemma: #a:Type -> x0:a -> x1:a ->
Lemma (let s = create2 x0 x1 in
s.[0] == x0 /\ s.[1] == x1)
[SMTPat (create2 #a x0 x1)] | val create2_lemma: #a:Type -> x0:a -> x1:a ->
Lemma (let s = create2 x0 x1 in
s.[0] == x0 /\ s.[1] == x1)
[SMTPat (create2 #a x0 x1)] | let create2_lemma #a x0 x1 =
Seq.elim_of_list [x0; x1] | {
"file_name": "lib/Lib.Sequence.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 27,
"end_line": 377,
"start_col": 0,
"start_line": 376
} | module Lib.Sequence
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
#set-options "--z3rlimit 30 --max_fuel 0 --max_ifuel 0 --using_facts_from '-* +Prims +FStar.Pervasives +FStar.Math.Lemmas +FStar.Seq +Lib.IntTypes +Lib.Sequence'"
let index #a #len s n = Seq.index s n
let create #a len init = Seq.create #... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Seq.Properties.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"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": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"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_el... | false | x0: a -> x1: a
-> FStar.Pervasives.Lemma
(ensures
(let s = Lib.Sequence.create2 x0 x1 in
s.[ 0 ] == x0 /\ s.[ 1 ] == x1)) [SMTPat (Lib.Sequence.create2 x0 x1)] | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"FStar.Seq.Properties.elim_of_list",
"Prims.Cons",
"Prims.Nil",
"Prims.unit"
] | [] | true | false | true | false | false | let create2_lemma #a x0 x1 =
| Seq.elim_of_list [x0; x1] | false |
LowParse.Low.IfThenElse.fst | LowParse.Low.IfThenElse.gaccessor_ifthenelse_payload_no_lookahead | val gaccessor_ifthenelse_payload_no_lookahead
(#p: parse_ifthenelse_param)
(s: serialize_ifthenelse_param p)
(b: bool)
(sl sl': bytes)
: Lemma
(requires
((parse_ifthenelse_kind p).parser_kind_subkind == Some ParserStrong /\
gaccessor_pre (parse_ifthenelse p)
... | val gaccessor_ifthenelse_payload_no_lookahead
(#p: parse_ifthenelse_param)
(s: serialize_ifthenelse_param p)
(b: bool)
(sl sl': bytes)
: Lemma
(requires
((parse_ifthenelse_kind p).parser_kind_subkind == Some ParserStrong /\
gaccessor_pre (parse_ifthenelse p)
... | let gaccessor_ifthenelse_payload_no_lookahead
(#p: parse_ifthenelse_param)
(s: serialize_ifthenelse_param p)
(b: bool)
(sl sl' : bytes)
: Lemma
(requires (
(parse_ifthenelse_kind p).parser_kind_subkind == Some ParserStrong /\
gaccessor_pre (parse_ifthenelse p) (dsnd (p.parse_ifthenelse_payload_parser ... | {
"file_name": "src/lowparse/LowParse.Low.IfThenElse.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 54,
"end_line": 243,
"start_col": 0,
"start_line": 225
} | module LowParse.Low.IfThenElse
include LowParse.Spec.IfThenElse
include LowParse.Low.Combinators
module U32 = FStar.UInt32
module HS = FStar.HyperStack
module HST = FStar.HyperStack.ST
module B = LowStar.Buffer
module Cast = FStar.Int.Cast
module U64 = FStar.UInt64
let valid_ifthenelse_intro
(p: parse_ifthenelse_pa... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"LowParse.Spec.IfThenElse.fst.checked",
"LowParse.Low.Combinators.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Int.Cast.fst.... | [
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": "FStar.Int.Cast",
"short_module": "Cast"
},
{
"abbrev": true,
"full_module": "LowStar.Buffer",
"short_module": "B"
},
{
"abbrev": true,
"full_module": "F... | {
"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_el... | false |
s: LowParse.Spec.IfThenElse.serialize_ifthenelse_param p ->
b: Prims.bool ->
sl: LowParse.Bytes.bytes ->
sl': LowParse.Bytes.bytes
-> FStar.Pervasives.Lemma
(requires
Mkparser_kind'?.parser_kind_subkind (LowParse.Spec.IfThenElse.parse_ifthenelse_kind p) ==
FStar.Pervasives.Nativ... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"LowParse.Spec.IfThenElse.parse_ifthenelse_param",
"LowParse.Spec.IfThenElse.serialize_ifthenelse_param",
"Prims.bool",
"LowParse.Bytes.bytes",
"LowParse.Spec.Base.parse_injective",
"LowParse.Spec.IfThenElse.__proj__Mkparse_ifthenelse_param__item__parse_ifthenelse_tag_kind",
"LowParse.Spec.IfThenElse.__... | [] | true | false | true | false | false | let gaccessor_ifthenelse_payload_no_lookahead
(#p: parse_ifthenelse_param)
(s: serialize_ifthenelse_param p)
(b: bool)
(sl sl': bytes)
: Lemma
(requires
((parse_ifthenelse_kind p).parser_kind_subkind == Some ParserStrong /\
gaccessor_pre (parse_ifthenelse p)
... | parse_ifthenelse_eq p sl;
parse_ifthenelse_eq p sl';
parse_ifthenelse_parse_tag_payload s sl;
parse_ifthenelse_parse_tag_payload s sl';
parse_strong_prefix (parse_ifthenelse p) sl sl';
parse_injective p.parse_ifthenelse_tag_parser sl sl' | false |
Lib.Sequence.fst | Lib.Sequence.index_map_blocks | val index_map_blocks:
#a:Type
-> blocksize:size_pos
-> inp:seq a
-> f:(block (length inp) blocksize -> lseq a blocksize -> lseq a blocksize)
-> g:(last (length inp) blocksize -> rem:size_nat{rem < blocksize} -> lseq a rem -> lseq a rem)
-> i:nat{i < length inp} ->
Lemma (
let output = map_blocks blo... | val index_map_blocks:
#a:Type
-> blocksize:size_pos
-> inp:seq a
-> f:(block (length inp) blocksize -> lseq a blocksize -> lseq a blocksize)
-> g:(last (length inp) blocksize -> rem:size_nat{rem < blocksize} -> lseq a rem -> lseq a rem)
-> i:nat{i < length inp} ->
Lemma (
let output = map_blocks blo... | let index_map_blocks #a bs inp f g i =
let len = length inp in
let nb = len / bs in
let rem = len % bs in
let blocks = Seq.slice inp 0 (nb * bs) in
if rem > 0 then
begin
let s1 = map_blocks_multi #a bs nb nb blocks f in
let last = Seq.slice inp (nb * bs) len in
calc (==) {
length last;
... | {
"file_name": "lib/Lib.Sequence.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 52,
"end_line": 334,
"start_col": 0,
"start_line": 302
} | module Lib.Sequence
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
#set-options "--z3rlimit 30 --max_fuel 0 --max_ifuel 0 --using_facts_from '-* +Prims +FStar.Pervasives +FStar.Math.Lemmas +FStar.Seq +Lib.IntTypes +Lib.Sequence'"
let index #a #len s n = Seq.index s n
let create #a len init = Seq.create #... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Seq.Properties.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"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": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"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_el... | false |
blocksize: Lib.IntTypes.size_pos ->
inp: Lib.Sequence.seq a ->
f:
(_: Lib.Sequence.block (Lib.Sequence.length inp) blocksize -> _: Lib.Sequence.lseq a blocksize
-> Lib.Sequence.lseq a blocksize) ->
g:
(
_: Lib.Sequence.last (Lib.Sequence.length inp) blocksize ->
... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Lib.IntTypes.size_pos",
"Lib.Sequence.seq",
"Lib.Sequence.block",
"Lib.Sequence.length",
"Lib.Sequence.lseq",
"Lib.Sequence.last",
"Lib.IntTypes.size_nat",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.nat",
"Prims.op_GreaterThan",
"FStar.Mul.op_Star",
"Lib.Sequence.index_map_blocks_multi",
"P... | [] | false | false | true | false | false | let index_map_blocks #a bs inp f g i =
| let len = length inp in
let nb = len / bs in
let rem = len % bs in
let blocks = Seq.slice inp 0 (nb * bs) in
if rem > 0
then
let s1 = map_blocks_multi #a bs nb nb blocks f in
let last = Seq.slice inp (nb * bs) len in
calc ( == ) {
length last;
( == ) { Seq.lemma_len_slice inp (nb * bs) len }
len - nb ... | false |
Pulse.C.Types.Array.fsti | Pulse.C.Types.Array.g_array_is_null | val g_array_is_null (#t: Type) (#td: typedef t) (a: array_or_null td) : GTot bool | val g_array_is_null (#t: Type) (#td: typedef t) (a: array_or_null td) : GTot bool | let g_array_is_null (#t: Type) (#td: typedef t) (a: array_or_null td) : GTot bool =
g_array_ptr_is_null (array_ptr_of a) | {
"file_name": "share/steel/examples/pulse/lib/c/Pulse.C.Types.Array.fsti",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 38,
"end_line": 224,
"start_col": 0,
"start_line": 223
} | module Pulse.C.Types.Array
open Pulse.Lib.Pervasives
include Pulse.C.Types.Base
open Pulse.C.Typenat
module SZ = FStar.SizeT
// To be extracted as: t[tn]
// Per the C standard, base array types must be of nonzero size
inline_for_extraction [@@noextract_to "krml"]
let array_size_t = (n: SZ.t { SZ.v n > 0 })
val base_a... | {
"checked_file": "/",
"dependencies": [
"Pulse.Lib.Pervasives.fst.checked",
"Pulse.C.Types.Base.fsti.checked",
"Pulse.C.Types.Array.Base.fst.checked",
"Pulse.C.Typenat.fsti.checked",
"prims.fst.checked",
"FStar.SizeT.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.che... | [
{
"abbrev": true,
"full_module": "FStar.SizeT",
"short_module": "SZ"
},
{
"abbrev": false,
"full_module": "Pulse.C.Typenat",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.C.Types.Base",
"short_module": null
},
{
"abbrev": false,
"full_module... | {
"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_el... | false | a: Pulse.C.Types.Array.array_or_null td -> Prims.GTot Prims.bool | Prims.GTot | [
"sometrivial"
] | [] | [
"Pulse.C.Types.Base.typedef",
"Pulse.C.Types.Array.array_or_null",
"Pulse.C.Types.Array.g_array_ptr_is_null",
"Pulse.C.Types.Array.array_ptr_of",
"Prims.bool"
] | [] | false | false | false | false | false | let g_array_is_null (#t: Type) (#td: typedef t) (a: array_or_null td) : GTot bool =
| g_array_ptr_is_null (array_ptr_of a) | false |
Lib.Sequence.fst | Lib.Sequence.create8_lemma | val create8_lemma: #a:Type -> x0:a -> x1:a -> x2:a -> x3:a -> x4:a -> x5:a -> x6:a -> x7:a ->
Lemma (let s = create8 x0 x1 x2 x3 x4 x5 x6 x7 in
s.[0] == x0 /\ s.[1] == x1 /\ s.[2] == x2 /\ s.[3] == x3 /\
s.[4] == x4 /\ s.[5] == x5 /\ s.[6] == x6 /\ s.[7] == x7)
[SMTPat (create8 #a x0 x1 x2 x3 x4 x5 x6 x7)] | val create8_lemma: #a:Type -> x0:a -> x1:a -> x2:a -> x3:a -> x4:a -> x5:a -> x6:a -> x7:a ->
Lemma (let s = create8 x0 x1 x2 x3 x4 x5 x6 x7 in
s.[0] == x0 /\ s.[1] == x1 /\ s.[2] == x2 /\ s.[3] == x3 /\
s.[4] == x4 /\ s.[5] == x5 /\ s.[6] == x6 /\ s.[7] == x7)
[SMTPat (create8 #a x0 x1 x2 x3 x4 x5 x6 x7)] | let create8_lemma #a x0 x1 x2 x3 x4 x5 x6 x7 =
Seq.elim_of_list [x0; x1; x2; x3; x4; x5; x6; x7] | {
"file_name": "lib/Lib.Sequence.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 51,
"end_line": 393,
"start_col": 0,
"start_line": 392
} | module Lib.Sequence
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
#set-options "--z3rlimit 30 --max_fuel 0 --max_ifuel 0 --using_facts_from '-* +Prims +FStar.Pervasives +FStar.Math.Lemmas +FStar.Seq +Lib.IntTypes +Lib.Sequence'"
let index #a #len s n = Seq.index s n
let create #a len init = Seq.create #... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Seq.Properties.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"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": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"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_el... | false | x0: a -> x1: a -> x2: a -> x3: a -> x4: a -> x5: a -> x6: a -> x7: a
-> FStar.Pervasives.Lemma
(ensures
(let s = Lib.Sequence.create8 x0 x1 x2 x3 x4 x5 x6 x7 in
s.[ 0 ] == x0 /\ s.[ 1 ] == x1 /\ s.[ 2 ] == x2 /\ s.[ 3 ] == x3 /\ s.[ 4 ] == x4 /\
s.[ 5 ] == x5 /\ s.[ 6 ] == x6 /\ s.[ ... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"FStar.Seq.Properties.elim_of_list",
"Prims.Cons",
"Prims.Nil",
"Prims.unit"
] | [] | true | false | true | false | false | let create8_lemma #a x0 x1 x2 x3 x4 x5 x6 x7 =
| Seq.elim_of_list [x0; x1; x2; x3; x4; x5; x6; x7] | false |
Lib.Sequence.fst | Lib.Sequence.create4_lemma | val create4_lemma: #a:Type -> x0:a -> x1:a -> x2:a -> x3:a ->
Lemma (let s = create4 x0 x1 x2 x3 in
s.[0] == x0 /\ s.[1] == x1 /\ s.[2] == x2 /\ s.[3] == x3)
[SMTPat (create4 #a x0 x1 x2 x3)] | val create4_lemma: #a:Type -> x0:a -> x1:a -> x2:a -> x3:a ->
Lemma (let s = create4 x0 x1 x2 x3 in
s.[0] == x0 /\ s.[1] == x1 /\ s.[2] == x2 /\ s.[3] == x3)
[SMTPat (create4 #a x0 x1 x2 x3)] | let create4_lemma #a x0 x1 x2 x3 =
Seq.elim_of_list [x0; x1; x2; x3] | {
"file_name": "lib/Lib.Sequence.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 35,
"end_line": 385,
"start_col": 0,
"start_line": 384
} | module Lib.Sequence
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
#set-options "--z3rlimit 30 --max_fuel 0 --max_ifuel 0 --using_facts_from '-* +Prims +FStar.Pervasives +FStar.Math.Lemmas +FStar.Seq +Lib.IntTypes +Lib.Sequence'"
let index #a #len s n = Seq.index s n
let create #a len init = Seq.create #... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Seq.Properties.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"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": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"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_el... | false | x0: a -> x1: a -> x2: a -> x3: a
-> FStar.Pervasives.Lemma
(ensures
(let s = Lib.Sequence.create4 x0 x1 x2 x3 in
s.[ 0 ] == x0 /\ s.[ 1 ] == x1 /\ s.[ 2 ] == x2 /\ s.[ 3 ] == x3))
[SMTPat (Lib.Sequence.create4 x0 x1 x2 x3)] | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"FStar.Seq.Properties.elim_of_list",
"Prims.Cons",
"Prims.Nil",
"Prims.unit"
] | [] | true | false | true | false | false | let create4_lemma #a x0 x1 x2 x3 =
| Seq.elim_of_list [x0; x1; x2; x3] | false |
Lib.Sequence.fst | Lib.Sequence.create16_lemma | val create16_lemma: #a:Type
-> x0:a -> x1:a -> x2:a -> x3:a -> x4:a -> x5:a -> x6:a -> x7:a
-> x8:a -> x9:a -> x10:a -> x11:a -> x12:a -> x13:a -> x14:a -> x15:a ->
Lemma (let s = create16 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 in
s.[0] == x0 /\ s.[1] == x1 /\ s.[2] == x2 /\ s.[3] == x3 /\
... | val create16_lemma: #a:Type
-> x0:a -> x1:a -> x2:a -> x3:a -> x4:a -> x5:a -> x6:a -> x7:a
-> x8:a -> x9:a -> x10:a -> x11:a -> x12:a -> x13:a -> x14:a -> x15:a ->
Lemma (let s = create16 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 in
s.[0] == x0 /\ s.[1] == x1 /\ s.[2] == x2 /\ s.[3] == x3 /\
... | let create16_lemma #a x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 =
Seq.elim_of_list [x0; x1; x2; x3; x4; x5; x6; x7; x8; x9; x10; x11; x12; x13; x14; x15] | {
"file_name": "lib/Lib.Sequence.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 89,
"end_line": 401,
"start_col": 0,
"start_line": 400
} | module Lib.Sequence
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
#set-options "--z3rlimit 30 --max_fuel 0 --max_ifuel 0 --using_facts_from '-* +Prims +FStar.Pervasives +FStar.Math.Lemmas +FStar.Seq +Lib.IntTypes +Lib.Sequence'"
let index #a #len s n = Seq.index s n
let create #a len init = Seq.create #... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Seq.Properties.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"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": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"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_el... | false |
x0: a ->
x1: a ->
x2: a ->
x3: a ->
x4: a ->
x5: a ->
x6: a ->
x7: a ->
x8: a ->
x9: a ->
x10: a ->
x11: a ->
x12: a ->
x13: a ->
x14: a ->
x15: a
-> FStar.Pervasives.Lemma
(ensures
(let s = Lib.Sequence.create16 x0 x1 x2 x3 x4 x5 x6 x7 x8... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"FStar.Seq.Properties.elim_of_list",
"Prims.Cons",
"Prims.Nil",
"Prims.unit"
] | [] | true | false | true | false | false | let create16_lemma #a x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 =
| Seq.elim_of_list [x0; x1; x2; x3; x4; x5; x6; x7; x8; x9; x10; x11; x12; x13; x14; x15] | false |
Lib.Sequence.fst | Lib.Sequence.create2 | val create2: #a:Type -> x0:a -> x1:a -> lseq a 2 | val create2: #a:Type -> x0:a -> x1:a -> lseq a 2 | let create2 #a x0 x1 =
let l = [x0; x1] in
assert_norm (List.Tot.length l = 2);
createL l | {
"file_name": "lib/Lib.Sequence.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 11,
"end_line": 374,
"start_col": 0,
"start_line": 371
} | module Lib.Sequence
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
#set-options "--z3rlimit 30 --max_fuel 0 --max_ifuel 0 --using_facts_from '-* +Prims +FStar.Pervasives +FStar.Math.Lemmas +FStar.Seq +Lib.IntTypes +Lib.Sequence'"
let index #a #len s n = Seq.index s n
let create #a len init = Seq.create #... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Seq.Properties.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"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": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"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_el... | false | x0: a -> x1: a -> Lib.Sequence.lseq a 2 | Prims.Tot | [
"total"
] | [] | [
"Lib.Sequence.createL",
"Prims.unit",
"FStar.Pervasives.assert_norm",
"Prims.b2t",
"Prims.op_Equality",
"Prims.int",
"FStar.List.Tot.Base.length",
"Prims.list",
"Prims.Cons",
"Prims.Nil",
"Lib.Sequence.lseq"
] | [] | false | false | false | false | false | let create2 #a x0 x1 =
| let l = [x0; x1] in
assert_norm (List.Tot.length l = 2);
createL l | false |
Lib.Sequence.fst | Lib.Sequence.div_mul_l | val div_mul_l: a:int -> b:int -> c:pos -> d:pos -> Lemma
(requires a / d = b / d)
(ensures a / (c * d) = b / (c * d)) | val div_mul_l: a:int -> b:int -> c:pos -> d:pos -> Lemma
(requires a / d = b / d)
(ensures a / (c * d) = b / (c * d)) | let div_mul_l a b c d =
calc (==) {
a / (c * d);
== { }
a / (d * c);
== { Math.Lemmas.division_multiplication_lemma a d c }
(a / d) / c;
== { }
(b / d) / c;
== { Math.Lemmas.division_multiplication_lemma b d c }
b / (d * c);
== { }
b / (c * d);
} | {
"file_name": "lib/Lib.Sequence.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 3,
"end_line": 253,
"start_col": 0,
"start_line": 240
} | module Lib.Sequence
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
#set-options "--z3rlimit 30 --max_fuel 0 --max_ifuel 0 --using_facts_from '-* +Prims +FStar.Pervasives +FStar.Math.Lemmas +FStar.Seq +Lib.IntTypes +Lib.Sequence'"
let index #a #len s n = Seq.index s n
let create #a len init = Seq.create #... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Seq.Properties.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"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": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"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_el... | false | a: Prims.int -> b: Prims.int -> c: Prims.pos -> d: Prims.pos
-> FStar.Pervasives.Lemma (requires a / d = b / d) (ensures a / (c * d) = b / (c * d)) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.int",
"Prims.pos",
"FStar.Calc.calc_finish",
"Prims.eq2",
"Prims.op_Division",
"FStar.Mul.op_Star",
"Prims.Cons",
"FStar.Preorder.relation",
"Prims.Nil",
"Prims.unit",
"FStar.Calc.calc_step",
"FStar.Calc.calc_init",
"FStar.Calc.calc_pack",
"Prims.squash",
"FStar.Math.Lemmas.divisi... | [] | false | false | true | false | false | let div_mul_l a b c d =
| calc ( == ) {
a / (c * d);
( == ) { () }
a / (d * c);
( == ) { Math.Lemmas.division_multiplication_lemma a d c }
(a / d) / c;
( == ) { () }
(b / d) / c;
( == ) { Math.Lemmas.division_multiplication_lemma b d c }
b / (d * c);
( == ) { () }
b / (c * d);
} | false |
Lib.Sequence.fst | Lib.Sequence.create16 | val create16: #a:Type
-> x0:a -> x1:a -> x2:a -> x3:a -> x4:a -> x5:a -> x6:a -> x7:a
-> x8:a -> x9:a -> x10:a -> x11:a -> x12:a -> x13:a -> x14:a -> x15:a -> lseq a 16 | val create16: #a:Type
-> x0:a -> x1:a -> x2:a -> x3:a -> x4:a -> x5:a -> x6:a -> x7:a
-> x8:a -> x9:a -> x10:a -> x11:a -> x12:a -> x13:a -> x14:a -> x15:a -> lseq a 16 | let create16 #a x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 =
let l = [x0; x1; x2; x3; x4; x5; x6; x7; x8; x9; x10; x11; x12; x13; x14; x15] in
assert_norm (List.Tot.length l = 16);
createL l | {
"file_name": "lib/Lib.Sequence.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 11,
"end_line": 398,
"start_col": 0,
"start_line": 395
} | module Lib.Sequence
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
#set-options "--z3rlimit 30 --max_fuel 0 --max_ifuel 0 --using_facts_from '-* +Prims +FStar.Pervasives +FStar.Math.Lemmas +FStar.Seq +Lib.IntTypes +Lib.Sequence'"
let index #a #len s n = Seq.index s n
let create #a len init = Seq.create #... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Seq.Properties.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"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": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"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_el... | false |
x0: a ->
x1: a ->
x2: a ->
x3: a ->
x4: a ->
x5: a ->
x6: a ->
x7: a ->
x8: a ->
x9: a ->
x10: a ->
x11: a ->
x12: a ->
x13: a ->
x14: a ->
x15: a
-> Lib.Sequence.lseq a 16 | Prims.Tot | [
"total"
] | [] | [
"Lib.Sequence.createL",
"Prims.unit",
"FStar.Pervasives.assert_norm",
"Prims.b2t",
"Prims.op_Equality",
"Prims.int",
"FStar.List.Tot.Base.length",
"Prims.list",
"Prims.Cons",
"Prims.Nil",
"Lib.Sequence.lseq"
] | [] | false | false | false | false | false | let create16 #a x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 =
| let l = [x0; x1; x2; x3; x4; x5; x6; x7; x8; x9; x10; x11; x12; x13; x14; x15] in
assert_norm (List.Tot.length l = 16);
createL l | false |
Lib.Sequence.fst | Lib.Sequence.eq_generate_blocks0 | val eq_generate_blocks0:
#t:Type0
-> len:size_nat
-> n:nat
-> a:(i:nat{i <= n} -> Type)
-> f:(i:nat{i < n} -> a i -> a (i + 1) & s:seq t{length s == len})
-> init:a 0 ->
Lemma (generate_blocks #t len n 0 a f init ==
(init,Seq.empty)) | val eq_generate_blocks0:
#t:Type0
-> len:size_nat
-> n:nat
-> a:(i:nat{i <= n} -> Type)
-> f:(i:nat{i < n} -> a i -> a (i + 1) & s:seq t{length s == len})
-> init:a 0 ->
Lemma (generate_blocks #t len n 0 a f init ==
(init,Seq.empty)) | let eq_generate_blocks0 #t len n a f acc0 =
let a0 = (acc0, (Seq.empty <: s:seq t{length s == 0 * len})) in
assert (generate_blocks #t len n 0 a f acc0 ==
repeat_gen 0 (generate_blocks_a t len n a) (generate_blocks_inner t len n a f) a0);
eq_repeat_gen0 0 (generate_blocks_a t len n a) (generate_blocks... | {
"file_name": "lib/Lib.Sequence.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 87,
"end_line": 340,
"start_col": 0,
"start_line": 336
} | module Lib.Sequence
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
#set-options "--z3rlimit 30 --max_fuel 0 --max_ifuel 0 --using_facts_from '-* +Prims +FStar.Pervasives +FStar.Math.Lemmas +FStar.Seq +Lib.IntTypes +Lib.Sequence'"
let index #a #len s n = Seq.index s n
let create #a len init = Seq.create #... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Seq.Properties.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"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": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"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_el... | false |
len: Lib.IntTypes.size_nat ->
n: Prims.nat ->
a: (i: Prims.nat{i <= n} -> Type) ->
f:
(i: Prims.nat{i < n} -> _: a i
-> a (i + 1) * s: Lib.Sequence.seq t {Lib.Sequence.length s == len}) ->
init: a 0
-> FStar.Pervasives.Lemma
(ensures Lib.Sequence.generate_blocks len n 0 a f in... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Lib.IntTypes.size_nat",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_LessThan",
"FStar.Pervasives.Native.tuple2",
"Prims.op_Addition",
"Lib.Sequence.seq",
"Prims.eq2",
"Lib.Sequence.length",
"Lib.LoopCombinators.eq_repeat_gen0",
"Lib.Sequence.generate_blocks_a",
"Lib.Sequ... | [] | true | false | true | false | false | let eq_generate_blocks0 #t len n a f acc0 =
| let a0 = (acc0, (Seq.empty <: s: seq t {length s == 0 * len})) in
assert (generate_blocks #t len n 0 a f acc0 ==
repeat_gen 0 (generate_blocks_a t len n a) (generate_blocks_inner t len n a f) a0);
eq_repeat_gen0 0 (generate_blocks_a t len n a) (generate_blocks_inner t len n a f) a0 | false |
Lib.Sequence.fst | Lib.Sequence.create8 | val create8: #a:Type -> x0:a -> x1:a -> x2:a -> x3:a -> x4:a -> x5:a -> x6:a -> x7:a -> lseq a 8 | val create8: #a:Type -> x0:a -> x1:a -> x2:a -> x3:a -> x4:a -> x5:a -> x6:a -> x7:a -> lseq a 8 | let create8 #a x0 x1 x2 x3 x4 x5 x6 x7 =
let l = [x0; x1; x2; x3; x4; x5; x6; x7] in
assert_norm (List.Tot.length l = 8);
createL l | {
"file_name": "lib/Lib.Sequence.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 11,
"end_line": 390,
"start_col": 0,
"start_line": 387
} | module Lib.Sequence
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
#set-options "--z3rlimit 30 --max_fuel 0 --max_ifuel 0 --using_facts_from '-* +Prims +FStar.Pervasives +FStar.Math.Lemmas +FStar.Seq +Lib.IntTypes +Lib.Sequence'"
let index #a #len s n = Seq.index s n
let create #a len init = Seq.create #... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Seq.Properties.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"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": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"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_el... | false | x0: a -> x1: a -> x2: a -> x3: a -> x4: a -> x5: a -> x6: a -> x7: a -> Lib.Sequence.lseq a 8 | Prims.Tot | [
"total"
] | [] | [
"Lib.Sequence.createL",
"Prims.unit",
"FStar.Pervasives.assert_norm",
"Prims.b2t",
"Prims.op_Equality",
"Prims.int",
"FStar.List.Tot.Base.length",
"Prims.list",
"Prims.Cons",
"Prims.Nil",
"Lib.Sequence.lseq"
] | [] | false | false | false | false | false | let create8 #a x0 x1 x2 x3 x4 x5 x6 x7 =
| let l = [x0; x1; x2; x3; x4; x5; x6; x7] in
assert_norm (List.Tot.length l = 8);
createL l | false |
Lib.Sequence.fst | Lib.Sequence.create4 | val create4: #a:Type -> x0:a -> x1:a -> x2:a -> x3:a -> lseq a 4 | val create4: #a:Type -> x0:a -> x1:a -> x2:a -> x3:a -> lseq a 4 | let create4 #a x0 x1 x2 x3 =
let l = [x0; x1; x2; x3] in
assert_norm (List.Tot.length l = 4);
createL l | {
"file_name": "lib/Lib.Sequence.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 11,
"end_line": 382,
"start_col": 0,
"start_line": 379
} | module Lib.Sequence
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
#set-options "--z3rlimit 30 --max_fuel 0 --max_ifuel 0 --using_facts_from '-* +Prims +FStar.Pervasives +FStar.Math.Lemmas +FStar.Seq +Lib.IntTypes +Lib.Sequence'"
let index #a #len s n = Seq.index s n
let create #a len init = Seq.create #... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Seq.Properties.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"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": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"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_el... | false | x0: a -> x1: a -> x2: a -> x3: a -> Lib.Sequence.lseq a 4 | Prims.Tot | [
"total"
] | [] | [
"Lib.Sequence.createL",
"Prims.unit",
"FStar.Pervasives.assert_norm",
"Prims.b2t",
"Prims.op_Equality",
"Prims.int",
"FStar.List.Tot.Base.length",
"Prims.list",
"Prims.Cons",
"Prims.Nil",
"Lib.Sequence.lseq"
] | [] | false | false | false | false | false | let create4 #a x0 x1 x2 x3 =
| let l = [x0; x1; x2; x3] in
assert_norm (List.Tot.length l = 4);
createL l | false |
VariantsWithRecords.fst | VariantsWithRecords.e | val e : VariantsWithRecords.expr Prims.string | let e = StringOfInt { value = Add { x = ConstInt 3; y = ConstInt 39} } | {
"file_name": "examples/misc/VariantsWithRecords.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 70,
"end_line": 39,
"start_col": 0,
"start_line": 39
} | module VariantsWithRecords
(**** General usage *)
/// A record type is declared using the following syntax:
type record = { field1: int; field2: string (* ... *) }
/// A variant type can be of any arity, and can be declared using a
/// few different syntaxes.
type foo =
(** constructor [A] carries an integer and a... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": false,
"source_file": "VariantsWithRecords.fst"
} | [
{
"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
}
] | {
"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_el... | false | VariantsWithRecords.expr Prims.string | Prims.Tot | [
"total"
] | [] | [
"VariantsWithRecords.StringOfInt",
"VariantsWithRecords.Mkexpr__StringOfInt__payload",
"VariantsWithRecords.Add",
"VariantsWithRecords.Mkexpr__Add__payload",
"VariantsWithRecords.ConstInt"
] | [] | false | false | false | true | false | let e =
| StringOfInt ({ value = Add ({ x = ConstInt 3; y = ConstInt 39 }) }) | false | |
FStar.Pure.BreakVC.fsti | FStar.Pure.BreakVC.break_wp' | val break_wp':pure_wp' unit | val break_wp':pure_wp' unit | let break_wp' : pure_wp' unit =
fun p -> spinoff (squash (p ())) | {
"file_name": "ulib/FStar.Pure.BreakVC.fsti",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 34,
"end_line": 6,
"start_col": 0,
"start_line": 5
} | module FStar.Pure.BreakVC
open FStar.Tactics | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": false,
"source_file": "FStar.Pure.BreakVC.fsti"
} | [
{
"abbrev": false,
"full_module": "FStar.Tactics",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pure",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pure",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.... | {
"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_el... | false | Prims.pure_wp' Prims.unit | Prims.Tot | [
"total"
] | [] | [
"Prims.pure_post",
"Prims.unit",
"FStar.Pervasives.spinoff",
"Prims.squash",
"Prims.pure_pre"
] | [] | false | false | false | true | false | let break_wp':pure_wp' unit =
| fun p -> spinoff (squash (p ())) | false |
Pulse.C.Types.Array.fsti | Pulse.C.Types.Array.array_length | val array_length (#t: Type) (#td: typedef t) (a: array td) : GTot nat | val array_length (#t: Type) (#td: typedef t) (a: array td) : GTot nat | let array_length
(#t: Type)
(#td: typedef t)
(a: array td)
: GTot nat
= SZ.v (dsnd a) | {
"file_name": "share/steel/examples/pulse/lib/c/Pulse.C.Types.Array.fsti",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 15,
"end_line": 242,
"start_col": 0,
"start_line": 237
} | module Pulse.C.Types.Array
open Pulse.Lib.Pervasives
include Pulse.C.Types.Base
open Pulse.C.Typenat
module SZ = FStar.SizeT
// To be extracted as: t[tn]
// Per the C standard, base array types must be of nonzero size
inline_for_extraction [@@noextract_to "krml"]
let array_size_t = (n: SZ.t { SZ.v n > 0 })
val base_a... | {
"checked_file": "/",
"dependencies": [
"Pulse.Lib.Pervasives.fst.checked",
"Pulse.C.Types.Base.fsti.checked",
"Pulse.C.Types.Array.Base.fst.checked",
"Pulse.C.Typenat.fsti.checked",
"prims.fst.checked",
"FStar.SizeT.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.che... | [
{
"abbrev": true,
"full_module": "FStar.SizeT",
"short_module": "SZ"
},
{
"abbrev": false,
"full_module": "Pulse.C.Typenat",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.C.Types.Base",
"short_module": null
},
{
"abbrev": false,
"full_module... | {
"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_el... | false | a: Pulse.C.Types.Array.array td -> Prims.GTot Prims.nat | Prims.GTot | [
"sometrivial"
] | [] | [
"Pulse.C.Types.Base.typedef",
"Pulse.C.Types.Array.array",
"FStar.SizeT.v",
"FStar.Ghost.reveal",
"FStar.SizeT.t",
"FStar.Pervasives.dsnd",
"Pulse.C.Types.Array.array_ptr",
"Pulse.C.Types.Array.array_len_t",
"Prims.nat"
] | [] | false | false | false | false | false | let array_length (#t: Type) (#td: typedef t) (a: array td) : GTot nat =
| SZ.v (dsnd a) | false |
FStar.Pure.BreakVC.fsti | FStar.Pure.BreakVC.post | val post: Prims.unit -> Tac unit | val post: Prims.unit -> Tac unit | let post () : Tac unit =
norm [delta_fully [`%mono_lem; `%break_wp']];
trefl() | {
"file_name": "ulib/FStar.Pure.BreakVC.fsti",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 9,
"end_line": 13,
"start_col": 0,
"start_line": 11
} | module FStar.Pure.BreakVC
open FStar.Tactics
let break_wp' : pure_wp' unit =
fun p -> spinoff (squash (p ()))
val mono_lem () : Lemma (pure_wp_monotonic unit break_wp') | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": false,
"source_file": "FStar.Pure.BreakVC.fsti"
} | [
{
"abbrev": false,
"full_module": "FStar.Tactics",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pure",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pure",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.... | {
"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_el... | false | _: Prims.unit -> FStar.Tactics.Effect.Tac Prims.unit | FStar.Tactics.Effect.Tac | [] | [] | [
"Prims.unit",
"FStar.Tactics.V1.Derived.trefl",
"FStar.Stubs.Tactics.V1.Builtins.norm",
"Prims.Cons",
"FStar.Pervasives.norm_step",
"FStar.Pervasives.delta_fully",
"Prims.string",
"Prims.Nil"
] | [] | false | true | false | false | false | let post () : Tac unit =
| norm [delta_fully [`%mono_lem; `%break_wp']];
trefl () | false |
Pulse.C.Types.Array.fsti | Pulse.C.Types.Array.full_seq | val full_seq (#t: Type) (td: typedef t) (v: Seq.seq t) : GTot prop | val full_seq (#t: Type) (td: typedef t) (v: Seq.seq t) : GTot prop | let full_seq (#t: Type) (td: typedef t) (v: Seq.seq t) : GTot prop =
forall (i: nat { i < Seq.length v }) . {:pattern (Seq.index v i)} full td (Seq.index v i) | {
"file_name": "share/steel/examples/pulse/lib/c/Pulse.C.Types.Array.fsti",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 91,
"end_line": 522,
"start_col": 0,
"start_line": 521
} | module Pulse.C.Types.Array
open Pulse.Lib.Pervasives
include Pulse.C.Types.Base
open Pulse.C.Typenat
module SZ = FStar.SizeT
// To be extracted as: t[tn]
// Per the C standard, base array types must be of nonzero size
inline_for_extraction [@@noextract_to "krml"]
let array_size_t = (n: SZ.t { SZ.v n > 0 })
val base_a... | {
"checked_file": "/",
"dependencies": [
"Pulse.Lib.Pervasives.fst.checked",
"Pulse.C.Types.Base.fsti.checked",
"Pulse.C.Types.Array.Base.fst.checked",
"Pulse.C.Typenat.fsti.checked",
"prims.fst.checked",
"FStar.SizeT.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.che... | [
{
"abbrev": true,
"full_module": "FStar.SizeT",
"short_module": "SZ"
},
{
"abbrev": false,
"full_module": "Pulse.C.Typenat",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.C.Types.Base",
"short_module": null
},
{
"abbrev": false,
"full_module... | {
"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_el... | false | td: Pulse.C.Types.Base.typedef t -> v: FStar.Seq.Base.seq t -> Prims.GTot Prims.prop | Prims.GTot | [
"sometrivial"
] | [] | [
"Pulse.C.Types.Base.typedef",
"FStar.Seq.Base.seq",
"Prims.l_Forall",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"FStar.Seq.Base.length",
"Pulse.C.Types.Base.full",
"FStar.Seq.Base.index",
"Prims.prop"
] | [] | false | false | false | false | true | let full_seq (#t: Type) (td: typedef t) (v: Seq.seq t) : GTot prop =
| forall (i: nat{i < Seq.length v}). {:pattern (Seq.index v i)} full td (Seq.index v i) | false |
Pulse.C.Types.Array.fsti | Pulse.C.Types.Array.array_ref_of_base_post | val array_ref_of_base_post
(#t: Type)
(#tn: Type0)
(#n: Ghost.erased array_size_t)
(#td: typedef t)
(v: Ghost.erased (base_array_t t tn n))
(r: ref (base_array0 tn td n))
(a: array_ref td)
(ar: array td)
: GTot prop | val array_ref_of_base_post
(#t: Type)
(#tn: Type0)
(#n: Ghost.erased array_size_t)
(#td: typedef t)
(v: Ghost.erased (base_array_t t tn n))
(r: ref (base_array0 tn td n))
(a: array_ref td)
(ar: array td)
: GTot prop | let array_ref_of_base_post
(#t: Type)
(#tn: Type0)
(#n: Ghost.erased array_size_t)
(#td: typedef t)
(v: Ghost.erased (base_array_t t tn n))
(r: ref (base_array0 tn td n))
(a: array_ref td)
(ar: array td)
: GTot prop
=
array_ptr_of ar == a /\
array_ref_base_size a == Ghost.reveal n /\
... | {
"file_name": "share/steel/examples/pulse/lib/c/Pulse.C.Types.Array.fsti",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 48,
"end_line": 397,
"start_col": 0,
"start_line": 382
} | module Pulse.C.Types.Array
open Pulse.Lib.Pervasives
include Pulse.C.Types.Base
open Pulse.C.Typenat
module SZ = FStar.SizeT
// To be extracted as: t[tn]
// Per the C standard, base array types must be of nonzero size
inline_for_extraction [@@noextract_to "krml"]
let array_size_t = (n: SZ.t { SZ.v n > 0 })
val base_a... | {
"checked_file": "/",
"dependencies": [
"Pulse.Lib.Pervasives.fst.checked",
"Pulse.C.Types.Base.fsti.checked",
"Pulse.C.Types.Array.Base.fst.checked",
"Pulse.C.Typenat.fsti.checked",
"prims.fst.checked",
"FStar.SizeT.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.che... | [
{
"abbrev": true,
"full_module": "FStar.SizeT",
"short_module": "SZ"
},
{
"abbrev": false,
"full_module": "Pulse.C.Typenat",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.C.Types.Base",
"short_module": null
},
{
"abbrev": false,
"full_module... | {
"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_el... | false |
v: FStar.Ghost.erased (Pulse.C.Types.Array.base_array_t t tn (FStar.Ghost.reveal n)) ->
r: Pulse.C.Types.Base.ref (Pulse.C.Types.Array.base_array0 tn td (FStar.Ghost.reveal n)) ->
a: Pulse.C.Types.Array.array_ref td ->
ar: Pulse.C.Types.Array.array td
-> Prims.GTot Prims.prop | Prims.GTot | [
"sometrivial"
] | [] | [
"FStar.Ghost.erased",
"Pulse.C.Types.Array.array_size_t",
"Pulse.C.Types.Base.typedef",
"Pulse.C.Types.Array.base_array_t",
"FStar.Ghost.reveal",
"Pulse.C.Types.Base.ref",
"Pulse.C.Types.Array.base_array0",
"Pulse.C.Types.Array.array_ref",
"Pulse.C.Types.Array.array",
"Prims.l_and",
"Prims.eq2",... | [] | false | false | false | false | true | let array_ref_of_base_post
(#t: Type)
(#tn: Type0)
(#n: Ghost.erased array_size_t)
(#td: typedef t)
(v: Ghost.erased (base_array_t t tn n))
(r: ref (base_array0 tn td n))
(a: array_ref td)
(ar: array td)
: GTot prop =
| array_ptr_of ar == a /\ array_ref_base_size a == Ghost.reveal n /\ array_ref_offset a == 0sz /\
has_array_of_base r ar /\ Ghost.reveal (dsnd ar) == Ghost.reveal n | false |
VariantsWithRecords.fst | VariantsWithRecords.eval | val eval (e: expr 'a) : 'a | val eval (e: expr 'a) : 'a | let rec eval (e: expr 'a): 'a
= match e with
| ConstInt c -> c
| ConstStr s -> s
| Add {x; y} -> eval x + eval y
| StringOfInt {value} -> string_of_int (eval value) | {
"file_name": "examples/misc/VariantsWithRecords.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 53,
"end_line": 37,
"start_col": 0,
"start_line": 32
} | module VariantsWithRecords
(**** General usage *)
/// A record type is declared using the following syntax:
type record = { field1: int; field2: string (* ... *) }
/// A variant type can be of any arity, and can be declared using a
/// few different syntaxes.
type foo =
(** constructor [A] carries an integer and a... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": false,
"source_file": "VariantsWithRecords.fst"
} | [
{
"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
}
] | {
"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_el... | false | e: VariantsWithRecords.expr 'a -> 'a | Prims.Tot | [
"total"
] | [] | [
"VariantsWithRecords.expr",
"Prims.int",
"Prims.string",
"Prims.op_Addition",
"VariantsWithRecords.eval",
"Prims.string_of_int"
] | [
"recursion"
] | false | false | false | true | false | let rec eval (e: expr 'a) : 'a =
| match e with
| ConstInt c -> c
| ConstStr s -> s
| Add { x = x ; y = y } -> eval x + eval y
| StringOfInt { value = value } -> string_of_int (eval value) | false |
Pulse.C.Types.Array.fsti | Pulse.C.Types.Array.fractionable_seq | val fractionable_seq (#t: Type) (td: typedef t) (s: Seq.seq t) : GTot prop | val fractionable_seq (#t: Type) (td: typedef t) (s: Seq.seq t) : GTot prop | let fractionable_seq (#t: Type) (td: typedef t) (s: Seq.seq t) : GTot prop =
forall (i: nat). i < Seq.length s ==> fractionable td (Seq.index s i) | {
"file_name": "share/steel/examples/pulse/lib/c/Pulse.C.Types.Array.fsti",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 71,
"end_line": 980,
"start_col": 0,
"start_line": 979
} | module Pulse.C.Types.Array
open Pulse.Lib.Pervasives
include Pulse.C.Types.Base
open Pulse.C.Typenat
module SZ = FStar.SizeT
// To be extracted as: t[tn]
// Per the C standard, base array types must be of nonzero size
inline_for_extraction [@@noextract_to "krml"]
let array_size_t = (n: SZ.t { SZ.v n > 0 })
val base_a... | {
"checked_file": "/",
"dependencies": [
"Pulse.Lib.Pervasives.fst.checked",
"Pulse.C.Types.Base.fsti.checked",
"Pulse.C.Types.Array.Base.fst.checked",
"Pulse.C.Typenat.fsti.checked",
"prims.fst.checked",
"FStar.SizeT.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.che... | [
{
"abbrev": true,
"full_module": "FStar.SizeT",
"short_module": "SZ"
},
{
"abbrev": false,
"full_module": "Pulse.C.Typenat",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.C.Types.Base",
"short_module": null
},
{
"abbrev": false,
"full_module... | {
"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_el... | false | td: Pulse.C.Types.Base.typedef t -> s: FStar.Seq.Base.seq t -> Prims.GTot Prims.prop | Prims.GTot | [
"sometrivial"
] | [] | [
"Pulse.C.Types.Base.typedef",
"FStar.Seq.Base.seq",
"Prims.l_Forall",
"Prims.nat",
"Prims.l_imp",
"Prims.b2t",
"Prims.op_LessThan",
"FStar.Seq.Base.length",
"Pulse.C.Types.Base.fractionable",
"FStar.Seq.Base.index",
"Prims.prop"
] | [] | false | false | false | false | true | let fractionable_seq (#t: Type) (td: typedef t) (s: Seq.seq t) : GTot prop =
| forall (i: nat). i < Seq.length s ==> fractionable td (Seq.index s i) | false |
IfcExample.fst | IfcExample.c1_0 | val c1_0 : body: While.com -> While.com | let c1_0 body = While (AVar c) body (AVar c) | {
"file_name": "examples/rel/IfcExample.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 44,
"end_line": 49,
"start_col": 0,
"start_line": 49
} | (*
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 agre... | {
"checked_file": "/",
"dependencies": [
"While.fst.checked",
"Rel.fst.checked",
"prims.fst.checked",
"IfcRules.fst.checked",
"FStar.ST.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Heap.fst.checked"
],
"interface_file": false,
"source_file": "IfcExample.fst"
} | [
{
"abbrev": false,
"full_module": "FStar.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Heap",
"short_module": null
},
{
"abbrev": false,
"full_module": "IfcRules",
"short_module": null
},
{
"abbrev": false,
"full_module": "While",
"... | {
"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_el... | false | body: While.com -> While.com | Prims.Tot | [
"total"
] | [] | [
"While.com",
"While.While",
"While.AVar",
"IfcExample.c"
] | [] | false | false | false | true | false | let c1_0 body =
| While (AVar c) body (AVar c) | false | |
IfcExample.fst | IfcExample.c1_1 | val c1_1 : While.com | let c1_1 = Assign x (AVar y) | {
"file_name": "examples/rel/IfcExample.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 28,
"end_line": 50,
"start_col": 0,
"start_line": 50
} | (*
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 agre... | {
"checked_file": "/",
"dependencies": [
"While.fst.checked",
"Rel.fst.checked",
"prims.fst.checked",
"IfcRules.fst.checked",
"FStar.ST.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Heap.fst.checked"
],
"interface_file": false,
"source_file": "IfcExample.fst"
} | [
{
"abbrev": false,
"full_module": "FStar.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Heap",
"short_module": null
},
{
"abbrev": false,
"full_module": "IfcRules",
"short_module": null
},
{
"abbrev": false,
"full_module": "While",
"... | {
"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_el... | false | While.com | Prims.Tot | [
"total"
] | [] | [
"While.Assign",
"IfcExample.x",
"While.AVar",
"IfcExample.y"
] | [] | false | false | false | true | false | let c1_1 =
| Assign x (AVar y) | false | |
IfcExample.fst | IfcExample.c1_2 | val c1_2 : While.com | let c1_2 = Assign y (AOp Plus (AVar x) (AInt 6)) | {
"file_name": "examples/rel/IfcExample.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 48,
"end_line": 51,
"start_col": 0,
"start_line": 51
} | (*
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 agre... | {
"checked_file": "/",
"dependencies": [
"While.fst.checked",
"Rel.fst.checked",
"prims.fst.checked",
"IfcRules.fst.checked",
"FStar.ST.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Heap.fst.checked"
],
"interface_file": false,
"source_file": "IfcExample.fst"
} | [
{
"abbrev": false,
"full_module": "FStar.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Heap",
"short_module": null
},
{
"abbrev": false,
"full_module": "IfcRules",
"short_module": null
},
{
"abbrev": false,
"full_module": "While",
"... | {
"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_el... | false | While.com | Prims.Tot | [
"total"
] | [] | [
"While.Assign",
"IfcExample.y",
"While.AOp",
"While.Plus",
"While.AVar",
"IfcExample.x",
"While.AInt"
] | [] | false | false | false | true | false | let c1_2 =
| Assign y (AOp Plus (AVar x) (AInt 6)) | false | |
Pulse.C.Types.Array.fsti | Pulse.C.Types.Array.mk_base_array_inj | val mk_base_array_inj (#t: Type) (tn: Type0) (n: array_size_t) (v1 v2: Seq.seq t)
: Lemma
(requires
(Seq.length v1 == SZ.v n /\ Seq.length v2 == SZ.v n /\
mk_base_array tn n v1 == mk_base_array tn n v2))
(ensures (v1 == v2))
[SMTPat (mk_base_array tn n v1); SMTPat (mk_base_array ... | val mk_base_array_inj (#t: Type) (tn: Type0) (n: array_size_t) (v1 v2: Seq.seq t)
: Lemma
(requires
(Seq.length v1 == SZ.v n /\ Seq.length v2 == SZ.v n /\
mk_base_array tn n v1 == mk_base_array tn n v2))
(ensures (v1 == v2))
[SMTPat (mk_base_array tn n v1); SMTPat (mk_base_array ... | let mk_base_array_inj (#t: Type) (tn: Type0) (n: array_size_t) (v1 v2: Seq.seq t) : Lemma
(requires (
Seq.length v1 == SZ.v n /\
Seq.length v2 == SZ.v n /\
mk_base_array tn n v1 == mk_base_array tn n v2
))
(ensures (v1 == v2))
[SMTPat (mk_base_array tn n v1); SMTPat (mk_base_array tn n v2)]
= asser... | {
"file_name": "share/steel/examples/pulse/lib/c/Pulse.C.Types.Array.fsti",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 28,
"end_line": 53,
"start_col": 0,
"start_line": 44
} | module Pulse.C.Types.Array
open Pulse.Lib.Pervasives
include Pulse.C.Types.Base
open Pulse.C.Typenat
module SZ = FStar.SizeT
// To be extracted as: t[tn]
// Per the C standard, base array types must be of nonzero size
inline_for_extraction [@@noextract_to "krml"]
let array_size_t = (n: SZ.t { SZ.v n > 0 })
val base_a... | {
"checked_file": "/",
"dependencies": [
"Pulse.Lib.Pervasives.fst.checked",
"Pulse.C.Types.Base.fsti.checked",
"Pulse.C.Types.Array.Base.fst.checked",
"Pulse.C.Typenat.fsti.checked",
"prims.fst.checked",
"FStar.SizeT.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.che... | [
{
"abbrev": true,
"full_module": "FStar.SizeT",
"short_module": "SZ"
},
{
"abbrev": false,
"full_module": "Pulse.C.Typenat",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.C.Types.Base",
"short_module": null
},
{
"abbrev": false,
"full_module... | {
"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_el... | false |
tn: Type0 ->
n: Pulse.C.Types.Array.array_size_t ->
v1: FStar.Seq.Base.seq t ->
v2: FStar.Seq.Base.seq t
-> FStar.Pervasives.Lemma
(requires
FStar.Seq.Base.length v1 == FStar.SizeT.v n /\ FStar.Seq.Base.length v2 == FStar.SizeT.v n /\
Pulse.C.Types.Array.mk_base_array tn n v1 ==... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Pulse.C.Types.Array.array_size_t",
"FStar.Seq.Base.seq",
"Prims._assert",
"FStar.Seq.Base.equal",
"Prims.unit",
"Prims.l_Forall",
"Prims.nat",
"Prims.l_imp",
"Prims.b2t",
"Prims.op_LessThan",
"FStar.SizeT.v",
"Prims.eq2",
"Pulse.C.Types.Array.base_array_index",
"Pulse.C.Types.Array.mk_bas... | [] | false | false | true | false | false | let mk_base_array_inj (#t: Type) (tn: Type0) (n: array_size_t) (v1 v2: Seq.seq t)
: Lemma
(requires
(Seq.length v1 == SZ.v n /\ Seq.length v2 == SZ.v n /\
mk_base_array tn n v1 == mk_base_array tn n v2))
(ensures (v1 == v2))
[SMTPat (mk_base_array tn n v1); SMTPat (mk_base_array ... | assert (forall (i: nat).
i < SZ.v n ==>
base_array_index (mk_base_array tn n v1) (SZ.uint_to_t i) ==
base_array_index (mk_base_array tn n v2) (SZ.uint_to_t i));
assert (v1 `Seq.equal` v2) | false |
IfcExample.fst | IfcExample.c1_3 | val c1_3 : While.com | let c1_3 = Assign z (AOp Plus (AVar y) (AInt 7)) | {
"file_name": "examples/rel/IfcExample.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 48,
"end_line": 52,
"start_col": 0,
"start_line": 52
} | (*
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 agre... | {
"checked_file": "/",
"dependencies": [
"While.fst.checked",
"Rel.fst.checked",
"prims.fst.checked",
"IfcRules.fst.checked",
"FStar.ST.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Heap.fst.checked"
],
"interface_file": false,
"source_file": "IfcExample.fst"
} | [
{
"abbrev": false,
"full_module": "FStar.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Heap",
"short_module": null
},
{
"abbrev": false,
"full_module": "IfcRules",
"short_module": null
},
{
"abbrev": false,
"full_module": "While",
"... | {
"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_el... | false | While.com | Prims.Tot | [
"total"
] | [] | [
"While.Assign",
"IfcExample.z",
"While.AOp",
"While.Plus",
"While.AVar",
"IfcExample.y",
"While.AInt"
] | [] | false | false | false | true | false | let c1_3 =
| Assign z (AOp Plus (AVar y) (AInt 7)) | false | |
Pulse.C.Types.Array.fsti | Pulse.C.Types.Array.array_len_of | val array_len_of (#t: Type) (#td: typedef t) (ar: array_or_null td)
: Tot (array_len_t (array_ptr_of ar)) | val array_len_of (#t: Type) (#td: typedef t) (ar: array_or_null td)
: Tot (array_len_t (array_ptr_of ar)) | let array_len_of (#t: Type) (#td: typedef t) (ar: array_or_null td) : Tot (array_len_t (array_ptr_of ar)) =
match ar with
| (| _, a |) -> a | {
"file_name": "share/steel/examples/pulse/lib/c/Pulse.C.Types.Array.fsti",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 19,
"end_line": 217,
"start_col": 0,
"start_line": 215
} | module Pulse.C.Types.Array
open Pulse.Lib.Pervasives
include Pulse.C.Types.Base
open Pulse.C.Typenat
module SZ = FStar.SizeT
// To be extracted as: t[tn]
// Per the C standard, base array types must be of nonzero size
inline_for_extraction [@@noextract_to "krml"]
let array_size_t = (n: SZ.t { SZ.v n > 0 })
val base_a... | {
"checked_file": "/",
"dependencies": [
"Pulse.Lib.Pervasives.fst.checked",
"Pulse.C.Types.Base.fsti.checked",
"Pulse.C.Types.Array.Base.fst.checked",
"Pulse.C.Typenat.fsti.checked",
"prims.fst.checked",
"FStar.SizeT.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.che... | [
{
"abbrev": true,
"full_module": "FStar.SizeT",
"short_module": "SZ"
},
{
"abbrev": false,
"full_module": "Pulse.C.Typenat",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.C.Types.Base",
"short_module": null
},
{
"abbrev": false,
"full_module... | {
"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_el... | false | ar: Pulse.C.Types.Array.array_or_null td
-> Pulse.C.Types.Array.array_len_t (Pulse.C.Types.Array.array_ptr_of ar) | Prims.Tot | [
"total"
] | [] | [
"Pulse.C.Types.Base.typedef",
"Pulse.C.Types.Array.array_or_null",
"Pulse.C.Types.Array.array_ptr",
"Pulse.C.Types.Array.array_len_t",
"Pulse.C.Types.Array.array_ptr_of"
] | [] | false | false | false | false | false | let array_len_of (#t: Type) (#td: typedef t) (ar: array_or_null td)
: Tot (array_len_t (array_ptr_of ar)) =
| match ar with | (| _ , a |) -> a | false |
Hacl.Impl.K256.Verify.fst | Hacl.Impl.K256.Verify.ecdsa_verify_hashed_msg | val ecdsa_verify_hashed_msg (msgHash:lbytes 32ul)
(public_key signature:lbytes 64ul) : Stack bool
(requires fun h ->
live h msgHash /\ live h public_key /\ live h signature)
(ensures fun h0 b h1 -> modifies0 h0 h1 /\
b == S.ecdsa_verify_hashed_msg (as_seq h0 msgHash) (as_seq h0 public_key) (as_seq h0 sign... | val ecdsa_verify_hashed_msg (msgHash:lbytes 32ul)
(public_key signature:lbytes 64ul) : Stack bool
(requires fun h ->
live h msgHash /\ live h public_key /\ live h signature)
(ensures fun h0 b h1 -> modifies0 h0 h1 /\
b == S.ecdsa_verify_hashed_msg (as_seq h0 msgHash) (as_seq h0 public_key) (as_seq h0 sign... | let ecdsa_verify_hashed_msg msgHash public_key signature =
push_frame ();
let tmp = create 35ul (u64 0) in
let pk = sub tmp 0ul 15ul in
let r_q = sub tmp 15ul 4ul in
let s_q = sub tmp 19ul 4ul in
let u1 = sub tmp 23ul 4ul in
let u2 = sub tmp 27ul 4ul in
let m_q = sub tmp 31ul 4ul in
let is_pk_vali... | {
"file_name": "code/k256/Hacl.Impl.K256.Verify.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 5,
"end_line": 219,
"start_col": 0,
"start_line": 199
} | module Hacl.Impl.K256.Verify
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
module ST = FStar.HyperStack.ST
module S = Spec.K256
module KL = Spec.K256.Lemmas
open Hacl.K256.Field
open Hacl.Impl.K256.Point
open Hacl.Impl.K256.PointMul
open Hacl.Impl.K256.GLV
module ... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.Lemmas.fsti.checked",
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.K256.Field52.Lemmas.fsti.checked",
"Hacl.K256.Scalar.fsti.checke... | [
{
"abbrev": true,
"full_module": "Lib.ByteSequence",
"short_module": "BSeq"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Field52.Lemmas",
"short_module": "BL"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.K256.Qinv",
"short_module": "QI"
},
{
"abbrev": tru... | {
"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_el... | false |
msgHash: Hacl.Impl.K256.Verify.lbytes 32ul ->
public_key: Hacl.Impl.K256.Verify.lbytes 64ul ->
signature: Hacl.Impl.K256.Verify.lbytes 64ul
-> FStar.HyperStack.ST.Stack Prims.bool | FStar.HyperStack.ST.Stack | [] | [] | [
"Hacl.Impl.K256.Verify.lbytes",
"FStar.UInt32.__uint_to_t",
"Prims.bool",
"Prims.unit",
"FStar.HyperStack.ST.pop_frame",
"Prims.op_Negation",
"Prims.op_AmpAmp",
"Hacl.Impl.K256.Verify.ecdsa_verify_cmpr",
"Hacl.Impl.K256.Verify.ecdsa_verify_get_u12",
"Hacl.K256.Scalar.load_qelem_modq",
"Hacl.Impl... | [] | false | true | false | false | false | let ecdsa_verify_hashed_msg msgHash public_key signature =
| push_frame ();
let tmp = create 35ul (u64 0) in
let pk = sub tmp 0ul 15ul in
let r_q = sub tmp 15ul 4ul in
let s_q = sub tmp 19ul 4ul in
let u1 = sub tmp 23ul 4ul in
let u2 = sub tmp 27ul 4ul in
let m_q = sub tmp 31ul 4ul in
let is_pk_valid = load_point_vartime pk public_key in
let is_rs_valid = load_signature r_q s_q ... | false |
IfcExample.fst | IfcExample.env | val env : var: Prims.nat -> Prims.GTot IfcRules.label | let env (var: nat) =
if var = addr_of x then Low
else if var = addr_of y then Low
else if var = addr_of c then Low
else if var = addr_of z then High
else High | {
"file_name": "examples/rel/IfcExample.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 17,
"end_line": 36,
"start_col": 0,
"start_line": 31
} | (*
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 agre... | {
"checked_file": "/",
"dependencies": [
"While.fst.checked",
"Rel.fst.checked",
"prims.fst.checked",
"IfcRules.fst.checked",
"FStar.ST.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Heap.fst.checked"
],
"interface_file": false,
"source_file": "IfcExample.fst"
} | [
{
"abbrev": false,
"full_module": "FStar.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Heap",
"short_module": null
},
{
"abbrev": false,
"full_module": "IfcRules",
"short_module": null
},
{
"abbrev": false,
"full_module": "While",
"... | {
"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_el... | false | var: Prims.nat -> Prims.GTot IfcRules.label | Prims.GTot | [
"sometrivial"
] | [] | [
"Prims.nat",
"Prims.op_Equality",
"Prims.int",
"Prims.l_or",
"Prims.b2t",
"Prims.op_GreaterThanOrEqual",
"Prims.op_GreaterThan",
"FStar.Monotonic.Heap.addr_of",
"FStar.Heap.trivial_preorder",
"IfcExample.x",
"IfcRules.Low",
"Prims.bool",
"IfcExample.y",
"IfcExample.c",
"IfcExample.z",
... | [] | false | false | false | false | false | let env (var: nat) =
| if var = addr_of x
then Low
else
if var = addr_of y
then Low
else if var = addr_of c then Low else if var = addr_of z then High else High | false | |
Pulse.C.Types.Array.fsti | Pulse.C.Types.Array.base_array | val base_array
(#t #tn: Type0)
(td: typedef t)
(n: nat{SZ.fits n /\ n > 0})
(#[solve_nat_t_of_nat ()] prf: squash (norm norm_typenat (nat_t_of_nat n == tn)))
: Tot (typedef (base_array_t t tn (SZ.uint_to_t n))) | val base_array
(#t #tn: Type0)
(td: typedef t)
(n: nat{SZ.fits n /\ n > 0})
(#[solve_nat_t_of_nat ()] prf: squash (norm norm_typenat (nat_t_of_nat n == tn)))
: Tot (typedef (base_array_t t tn (SZ.uint_to_t n))) | let base_array (#t: Type0) (#tn: Type0) (td: typedef t) (n: nat {SZ.fits n /\ n > 0}) (# [solve_nat_t_of_nat ()] prf: squash (norm norm_typenat (nat_t_of_nat n == tn))) : Tot (typedef (base_array_t t tn (SZ.uint_to_t n)))
= base_array0 tn td (SZ.uint_to_t n) | {
"file_name": "share/steel/examples/pulse/lib/c/Pulse.C.Types.Array.fsti",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 36,
"end_line": 22,
"start_col": 0,
"start_line": 21
} | module Pulse.C.Types.Array
open Pulse.Lib.Pervasives
include Pulse.C.Types.Base
open Pulse.C.Typenat
module SZ = FStar.SizeT
// To be extracted as: t[tn]
// Per the C standard, base array types must be of nonzero size
inline_for_extraction [@@noextract_to "krml"]
let array_size_t = (n: SZ.t { SZ.v n > 0 })
val base_a... | {
"checked_file": "/",
"dependencies": [
"Pulse.Lib.Pervasives.fst.checked",
"Pulse.C.Types.Base.fsti.checked",
"Pulse.C.Types.Array.Base.fst.checked",
"Pulse.C.Typenat.fsti.checked",
"prims.fst.checked",
"FStar.SizeT.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.che... | [
{
"abbrev": true,
"full_module": "FStar.SizeT",
"short_module": "SZ"
},
{
"abbrev": false,
"full_module": "Pulse.C.Typenat",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.C.Types.Base",
"short_module": null
},
{
"abbrev": false,
"full_module... | {
"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_el... | false | td: Pulse.C.Types.Base.typedef t -> n: Prims.nat{FStar.SizeT.fits n /\ n > 0}
-> Pulse.C.Types.Base.typedef (Pulse.C.Types.Array.base_array_t t tn (FStar.SizeT.uint_to_t n)) | Prims.Tot | [
"total"
] | [] | [
"Pulse.C.Types.Base.typedef",
"Prims.nat",
"Prims.l_and",
"FStar.SizeT.fits",
"Prims.b2t",
"Prims.op_GreaterThan",
"Prims.squash",
"FStar.Pervasives.norm",
"Pulse.C.Typenat.norm_typenat",
"Prims.eq2",
"Pulse.C.Typenat.nat_t_of_nat",
"Pulse.C.Types.Array.base_array0",
"FStar.SizeT.uint_to_t",... | [] | false | false | false | false | false | let base_array
(#t #tn: Type0)
(td: typedef t)
(n: nat{SZ.fits n /\ n > 0})
(#[solve_nat_t_of_nat ()] prf: squash (norm norm_typenat (nat_t_of_nat n == tn)))
: Tot (typedef (base_array_t t tn (SZ.uint_to_t n))) =
| base_array0 tn td (SZ.uint_to_t n) | false |
IfcExample.fst | IfcExample.c1_5 | val c1_5 : While.com | let c1_5 = Assign c (AOp Minus (AVar c) (AInt 1)) | {
"file_name": "examples/rel/IfcExample.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 49,
"end_line": 54,
"start_col": 0,
"start_line": 54
} | (*
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 agre... | {
"checked_file": "/",
"dependencies": [
"While.fst.checked",
"Rel.fst.checked",
"prims.fst.checked",
"IfcRules.fst.checked",
"FStar.ST.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Heap.fst.checked"
],
"interface_file": false,
"source_file": "IfcExample.fst"
} | [
{
"abbrev": false,
"full_module": "FStar.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Heap",
"short_module": null
},
{
"abbrev": false,
"full_module": "IfcRules",
"short_module": null
},
{
"abbrev": false,
"full_module": "While",
"... | {
"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_el... | false | While.com | Prims.Tot | [
"total"
] | [] | [
"While.Assign",
"IfcExample.c",
"While.AOp",
"While.Minus",
"While.AVar",
"While.AInt"
] | [] | false | false | false | true | false | let c1_5 =
| Assign c (AOp Minus (AVar c) (AInt 1)) | false | |
IfcExample.fst | IfcExample.c1_4 | val c1_4 : While.com | let c1_4 = Assign x (AOp Plus (AVar z) (AInt 7)) | {
"file_name": "examples/rel/IfcExample.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 48,
"end_line": 53,
"start_col": 0,
"start_line": 53
} | (*
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 agre... | {
"checked_file": "/",
"dependencies": [
"While.fst.checked",
"Rel.fst.checked",
"prims.fst.checked",
"IfcRules.fst.checked",
"FStar.ST.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Heap.fst.checked"
],
"interface_file": false,
"source_file": "IfcExample.fst"
} | [
{
"abbrev": false,
"full_module": "FStar.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Heap",
"short_module": null
},
{
"abbrev": false,
"full_module": "IfcRules",
"short_module": null
},
{
"abbrev": false,
"full_module": "While",
"... | {
"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_el... | false | While.com | Prims.Tot | [
"total"
] | [] | [
"While.Assign",
"IfcExample.x",
"While.AOp",
"While.Plus",
"While.AVar",
"IfcExample.z",
"While.AInt"
] | [] | false | false | false | true | false | let c1_4 =
| Assign x (AOp Plus (AVar z) (AInt 7)) | false | |
IfcExample.fst | IfcExample.c1 | val c1 : While.com | let c1 = c1_0 c1_6 | {
"file_name": "examples/rel/IfcExample.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 18,
"end_line": 57,
"start_col": 0,
"start_line": 57
} | (*
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 agre... | {
"checked_file": "/",
"dependencies": [
"While.fst.checked",
"Rel.fst.checked",
"prims.fst.checked",
"IfcRules.fst.checked",
"FStar.ST.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Heap.fst.checked"
],
"interface_file": false,
"source_file": "IfcExample.fst"
} | [
{
"abbrev": false,
"full_module": "FStar.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Heap",
"short_module": null
},
{
"abbrev": false,
"full_module": "IfcRules",
"short_module": null
},
{
"abbrev": false,
"full_module": "While",
"... | {
"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_el... | false | While.com | Prims.Tot | [
"total"
] | [] | [
"IfcExample.c1_0",
"IfcExample.c1_6"
] | [] | false | false | false | true | false | let c1 =
| c1_0 c1_6 | false | |
IfcExample.fst | IfcExample.c1_6 | val c1_6 : While.com | let c1_6 = Seq c1_1 (Seq c1_2 (Seq c1_3 (Seq c1_4 c1_5))) | {
"file_name": "examples/rel/IfcExample.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 57,
"end_line": 55,
"start_col": 0,
"start_line": 55
} | (*
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 agre... | {
"checked_file": "/",
"dependencies": [
"While.fst.checked",
"Rel.fst.checked",
"prims.fst.checked",
"IfcRules.fst.checked",
"FStar.ST.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Heap.fst.checked"
],
"interface_file": false,
"source_file": "IfcExample.fst"
} | [
{
"abbrev": false,
"full_module": "FStar.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Heap",
"short_module": null
},
{
"abbrev": false,
"full_module": "IfcRules",
"short_module": null
},
{
"abbrev": false,
"full_module": "While",
"... | {
"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_el... | false | While.com | Prims.Tot | [
"total"
] | [] | [
"While.Seq",
"IfcExample.c1_1",
"IfcExample.c1_2",
"IfcExample.c1_3",
"IfcExample.c1_4",
"IfcExample.c1_5"
] | [] | false | false | false | true | false | let c1_6 =
| Seq c1_1 (Seq c1_2 (Seq c1_3 (Seq c1_4 c1_5))) | false | |
FStar.Pure.BreakVC.fsti | FStar.Pure.BreakVC.break_wp | val break_wp:pure_wp unit | val break_wp:pure_wp unit | let break_wp : pure_wp unit =
let _ = mono_lem () in
break_wp' | {
"file_name": "ulib/FStar.Pure.BreakVC.fsti",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 11,
"end_line": 19,
"start_col": 0,
"start_line": 17
} | module FStar.Pure.BreakVC
open FStar.Tactics
let break_wp' : pure_wp' unit =
fun p -> spinoff (squash (p ()))
val mono_lem () : Lemma (pure_wp_monotonic unit break_wp')
private
let post () : Tac unit =
norm [delta_fully [`%mono_lem; `%break_wp']];
trefl()
[@@postprocess_with post] | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": false,
"source_file": "FStar.Pure.BreakVC.fsti"
} | [
{
"abbrev": false,
"full_module": "FStar.Tactics",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pure",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pure",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.... | {
"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_el... | false | Prims.pure_wp Prims.unit | Prims.Tot | [
"total"
] | [] | [
"Prims.unit",
"Prims.l_True",
"FStar.Pervasives.spinoff",
"Prims.squash",
"Prims.pure_pre"
] | [] | false | false | false | true | false | let break_wp:pure_wp unit =
| let _ = mono_lem () in
break_wp' | false |
ExtractRefs.fst | ExtractRefs.swap | val swap (r1 r2: ref U32.t)
: Steel unit
((vptr r1) `star` (vptr r2))
(fun _ -> (vptr r1) `star` (vptr r2))
(requires fun _ -> True)
(ensures fun h0 _ h1 -> sel r1 h0 == sel r2 h1 /\ sel r2 h0 == sel r1 h1) | val swap (r1 r2: ref U32.t)
: Steel unit
((vptr r1) `star` (vptr r2))
(fun _ -> (vptr r1) `star` (vptr r2))
(requires fun _ -> True)
(ensures fun h0 _ h1 -> sel r1 h0 == sel r2 h1 /\ sel r2 h0 == sel r1 h1) | let swap (r1 r2:ref U32.t) : Steel unit
(vptr r1 `star` vptr r2)
(fun _ -> vptr r1 `star` vptr r2)
(requires fun _ -> True)
(ensures fun h0 _ h1 ->
sel r1 h0 == sel r2 h1 /\
sel r2 h0 == sel r1 h1)
= let x1 = read r1 in
let x2 = read r2 in
write r2 x1;
write r1 x2 | {
"file_name": "share/steel/tutorial/ExtractRefs.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 15,
"end_line": 27,
"start_col": 0,
"start_line": 17
} | module ExtractRefs
open FStar.Ghost
open Steel.FractionalPermission
open Steel.Effect.Atomic
open Steel.Effect
open Steel.Reference
module U32 = FStar.UInt32
/// Some examples using Steel references with fractional permissions
#push-options "--fuel 0 --ifuel 0 --ide_id_info_off"
(** Swap examples **) | {
"checked_file": "/",
"dependencies": [
"Steel.Reference.fsti.checked",
"Steel.FractionalPermission.fst.checked",
"Steel.Effect.Atomic.fsti.checked",
"Steel.Effect.fsti.checked",
"prims.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Ghost.fsti.che... | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": false,
"full_module": "Steel.Reference",
"short_module": null
},
{
"abbrev": false,
"full_module": "Steel.Effect",
"short_module": null
},
{
"abbrev": false,
"full_module": "... | {
"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_el... | false | r1: Steel.Reference.ref FStar.UInt32.t -> r2: Steel.Reference.ref FStar.UInt32.t
-> Steel.Effect.Steel Prims.unit | Steel.Effect.Steel | [] | [] | [
"Steel.Reference.ref",
"FStar.UInt32.t",
"Steel.Reference.write",
"Prims.unit",
"Steel.Reference.read",
"Steel.Effect.Common.star",
"Steel.Reference.vptr",
"Steel.Effect.Common.vprop",
"Steel.Effect.Common.rmem",
"Prims.l_True",
"Prims.l_and",
"Prims.eq2",
"Steel.Effect.Common.normal",
"St... | [] | false | true | false | false | false | let swap (r1 r2: ref U32.t)
: Steel unit
((vptr r1) `star` (vptr r2))
(fun _ -> (vptr r1) `star` (vptr r2))
(requires fun _ -> True)
(ensures fun h0 _ h1 -> sel r1 h0 == sel r2 h1 /\ sel r2 h0 == sel r1 h1) =
| let x1 = read r1 in
let x2 = read r2 in
write r2 x1;
write r1 x2 | false |
Lib.IntTypes.fst | Lib.IntTypes.cast | val cast: #t:inttype -> #l:secrecy_level
-> t':inttype
-> l':secrecy_level{PUB? l \/ SEC? l'}
-> u1:int_t t l{unsigned t' \/ range (v u1) t'}
-> u2:int_t t' l'{v u2 == v u1 @%. t'} | val cast: #t:inttype -> #l:secrecy_level
-> t':inttype
-> l':secrecy_level{PUB? l \/ SEC? l'}
-> u1:int_t t l{unsigned t' \/ range (v u1) t'}
-> u2:int_t t' l'{v u2 == v u1 @%. t'} | let cast #t #l t' l' u =
assert_norm (pow2 8 = 2 * pow2 7);
assert_norm (pow2 16 = 2 * pow2 15);
assert_norm (pow2 64 * pow2 64 = pow2 128);
assert_norm (pow2 16 * pow2 48 = pow2 64);
assert_norm (pow2 8 * pow2 56 = pow2 64);
assert_norm (pow2 32 * pow2 32 = pow2 64);
modulo_modulo_lemma (v u) (pow2 32) (... | {
"file_name": "lib/Lib.IntTypes.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 20,
"end_line": 261,
"start_col": 0,
"start_line": 116
} | module Lib.IntTypes
open FStar.Math.Lemmas
#push-options "--max_fuel 0 --max_ifuel 1 --z3rlimit 200"
let pow2_2 _ = assert_norm (pow2 2 = 4)
let pow2_3 _ = assert_norm (pow2 3 = 8)
let pow2_4 _ = assert_norm (pow2 4 = 16)
let pow2_127 _ = assert_norm (pow2 127 = 0x80000000000000000000000000000000)
let bits_nu... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt16.fsti.checked",
"FStar.UInt128.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Nat... | [
{
"abbrev": false,
"full_module": "FStar.Math.Lemmas",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib",
... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"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_el... | false |
t': Lib.IntTypes.inttype ->
l': Lib.IntTypes.secrecy_level{PUB? l \/ SEC? l'} ->
u1:
Lib.IntTypes.int_t t l {Lib.IntTypes.unsigned t' \/ Lib.IntTypes.range (Lib.IntTypes.v u1) t'}
-> u2: Lib.IntTypes.int_t t' l' {Lib.IntTypes.v u2 == Lib.IntTypes.v u1 @%. t'} | Prims.Tot | [
"total"
] | [] | [
"Lib.IntTypes.inttype",
"Lib.IntTypes.secrecy_level",
"Prims.l_or",
"Prims.b2t",
"Lib.IntTypes.uu___is_PUB",
"Lib.IntTypes.uu___is_SEC",
"Lib.IntTypes.int_t",
"Lib.IntTypes.unsigned",
"Lib.IntTypes.range",
"Lib.IntTypes.v",
"FStar.Pervasives.Native.Mktuple2",
"FStar.Int.Cast.uint8_to_uint16",
... | [] | false | false | false | false | false | let cast #t #l t' l' u =
| assert_norm (pow2 8 = 2 * pow2 7);
assert_norm (pow2 16 = 2 * pow2 15);
assert_norm (pow2 64 * pow2 64 = pow2 128);
assert_norm (pow2 16 * pow2 48 = pow2 64);
assert_norm (pow2 8 * pow2 56 = pow2 64);
assert_norm (pow2 32 * pow2 32 = pow2 64);
modulo_modulo_lemma (v u) (pow2 32) (pow2 32);
modulo_modulo_lemma (v u) (po... | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.