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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Vale.Def.Types_s.fst | Vale.Def.Types_s.le_seq_quad32_to_bytes_length | val le_seq_quad32_to_bytes_length (s: seq quad32)
: Lemma (ensures length (le_seq_quad32_to_bytes s) == 16 * (length s))
[SMTPat (length (le_seq_quad32_to_bytes s))] | val le_seq_quad32_to_bytes_length (s: seq quad32)
: Lemma (ensures length (le_seq_quad32_to_bytes s) == 16 * (length s))
[SMTPat (length (le_seq_quad32_to_bytes s))] | let le_seq_quad32_to_bytes_length (s:seq quad32) : Lemma
(ensures length (le_seq_quad32_to_bytes s) == 16 * (length s))
[SMTPat (length (le_seq_quad32_to_bytes s))]
=
le_seq_quad32_to_bytes_reveal () | {
"file_name": "vale/specs/defs/Vale.Def.Types_s.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 34,
"end_line": 107,
"start_col": 0,
"start_line": 103
} | module Vale.Def.Types_s
open FStar.Mul
open Vale.Def.Opaque_s
open Vale.Def.Words_s
open Vale.Def.Words.Two_s
open Vale.Def.Words.Four_s
open Vale.Def.Words.Seq_s
open FStar.Seq
open Vale.Lib.Seqs_s
unfold let nat8 = Vale.Def.Words_s.nat8
unfold let nat16 = Vale.Def.Words_s.nat16
unfold let nat32 = Vale.Def.Words_s.n... | {
"checked_file": "/",
"dependencies": [
"Vale.Lib.Seqs_s.fst.checked",
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Words.Two_s.fsti.checked",
"Vale.Def.Words.Seq_s.fsti.checked",
"Vale.Def.Words.Four_s.fsti.checked",
"Vale.Def.Opaque_s.fsti.checked",
"prims.fst.checked",
"FStar.Seq.f... | [
{
"abbrev": false,
"full_module": "FStar.Seq",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.Seqs_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Seq",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.D... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | s: FStar.Seq.Base.seq Vale.Def.Types_s.quad32
-> FStar.Pervasives.Lemma
(ensures
FStar.Seq.Base.length (Vale.Def.Types_s.le_seq_quad32_to_bytes s) ==
16 * FStar.Seq.Base.length s)
[SMTPat (FStar.Seq.Base.length (Vale.Def.Types_s.le_seq_quad32_to_bytes s))] | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"FStar.Seq.Base.seq",
"Vale.Def.Types_s.quad32",
"Vale.Def.Types_s.le_seq_quad32_to_bytes_reveal",
"Prims.unit",
"Prims.l_True",
"Prims.squash",
"Prims.eq2",
"Prims.int",
"FStar.Seq.Base.length",
"Vale.Def.Types_s.nat8",
"Vale.Def.Types_s.le_seq_quad32_to_bytes",
"FStar.Mul.op_Star",
"Prims.... | [] | true | false | true | false | false | let le_seq_quad32_to_bytes_length (s: seq quad32)
: Lemma (ensures length (le_seq_quad32_to_bytes s) == 16 * (length s))
[SMTPat (length (le_seq_quad32_to_bytes s))] =
| le_seq_quad32_to_bytes_reveal () | false |
Vale.Def.Types_s.fst | Vale.Def.Types_s.le_bytes_to_quad32_def | val le_bytes_to_quad32_def (b: seq nat8)
: Pure quad32 (requires length b == 16) (ensures fun _ -> True) | val le_bytes_to_quad32_def (b: seq nat8)
: Pure quad32 (requires length b == 16) (ensures fun _ -> True) | let le_bytes_to_quad32_def (b:seq nat8) : Pure quad32 (requires length b == 16) (ensures fun _ -> True) =
seq_to_four_LE (seq_map (four_to_nat 8) (seq_to_seq_four_LE b)) | {
"file_name": "vale/specs/defs/Vale.Def.Types_s.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 65,
"end_line": 85,
"start_col": 0,
"start_line": 84
} | module Vale.Def.Types_s
open FStar.Mul
open Vale.Def.Opaque_s
open Vale.Def.Words_s
open Vale.Def.Words.Two_s
open Vale.Def.Words.Four_s
open Vale.Def.Words.Seq_s
open FStar.Seq
open Vale.Lib.Seqs_s
unfold let nat8 = Vale.Def.Words_s.nat8
unfold let nat16 = Vale.Def.Words_s.nat16
unfold let nat32 = Vale.Def.Words_s.n... | {
"checked_file": "/",
"dependencies": [
"Vale.Lib.Seqs_s.fst.checked",
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Words.Two_s.fsti.checked",
"Vale.Def.Words.Seq_s.fsti.checked",
"Vale.Def.Words.Four_s.fsti.checked",
"Vale.Def.Opaque_s.fsti.checked",
"prims.fst.checked",
"FStar.Seq.f... | [
{
"abbrev": false,
"full_module": "FStar.Seq",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.Seqs_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Seq",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.D... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | b: FStar.Seq.Base.seq Vale.Def.Types_s.nat8 -> Prims.Pure Vale.Def.Types_s.quad32 | Prims.Pure | [] | [] | [
"FStar.Seq.Base.seq",
"Vale.Def.Types_s.nat8",
"Vale.Def.Words.Seq_s.seq_to_four_LE",
"Vale.Def.Types_s.nat32",
"Vale.Lib.Seqs_s.seq_map",
"Vale.Def.Words_s.four",
"Vale.Def.Words.Four_s.four_to_nat",
"Vale.Def.Words.Seq_s.seq_to_seq_four_LE",
"Vale.Def.Types_s.quad32",
"Prims.eq2",
"Prims.int",... | [] | false | false | false | false | false | let le_bytes_to_quad32_def (b: seq nat8)
: Pure quad32 (requires length b == 16) (ensures fun _ -> True) =
| seq_to_four_LE (seq_map (four_to_nat 8) (seq_to_seq_four_LE b)) | false |
Simplifier.fst | Simplifier.goal_is_true | val goal_is_true: Prims.unit -> Tac unit | val goal_is_true: Prims.unit -> Tac unit | let goal_is_true () : Tac unit =
let g = cur_goal () in
match term_as_formula g with
| True_ -> trivial ()
| r ->
dump ("not syntactically true " ^ term_to_string (quote r));
fail ("not syntactically true " ^ term_to_string (quote r)) | {
"file_name": "examples/tactics/Simplifier.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 65,
"end_line": 27,
"start_col": 0,
"start_line": 21
} | (*
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": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Simplifier.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": false,
"source_file": "Simplifier.fst"
} | [
{
"abbrev": false,
"full_module": "FStar.Tactics.Simplifier",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
... | {
"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.V2.Derived.trivial",
"FStar.Reflection.V2.Formula.formula",
"FStar.Tactics.V2.Derived.fail",
"Prims.string",
"Prims.op_Hat",
"FStar.Stubs.Tactics.V2.Builtins.term_to_string",
"FStar.Stubs.Reflection.Types.term",
"FStar.Stubs.Tactics.V2.Builtins.dump",
"FStar.Reflection... | [] | false | true | false | false | false | let goal_is_true () : Tac unit =
| let g = cur_goal () in
match term_as_formula g with
| True_ -> trivial ()
| r ->
dump ("not syntactically true " ^ term_to_string (quote r));
fail ("not syntactically true " ^ term_to_string (quote r)) | false |
Vale.Def.Types_s.fst | Vale.Def.Types_s.reverse_bytes_nat32_def | val reverse_bytes_nat32_def (n: nat32) : nat32 | val reverse_bytes_nat32_def (n: nat32) : nat32 | let reverse_bytes_nat32_def (n:nat32) : nat32 =
be_bytes_to_nat32 (reverse_seq (nat32_to_be_bytes n)) | {
"file_name": "vale/specs/defs/Vale.Def.Types_s.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 55,
"end_line": 118,
"start_col": 0,
"start_line": 117
} | module Vale.Def.Types_s
open FStar.Mul
open Vale.Def.Opaque_s
open Vale.Def.Words_s
open Vale.Def.Words.Two_s
open Vale.Def.Words.Four_s
open Vale.Def.Words.Seq_s
open FStar.Seq
open Vale.Lib.Seqs_s
unfold let nat8 = Vale.Def.Words_s.nat8
unfold let nat16 = Vale.Def.Words_s.nat16
unfold let nat32 = Vale.Def.Words_s.n... | {
"checked_file": "/",
"dependencies": [
"Vale.Lib.Seqs_s.fst.checked",
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Words.Two_s.fsti.checked",
"Vale.Def.Words.Seq_s.fsti.checked",
"Vale.Def.Words.Four_s.fsti.checked",
"Vale.Def.Opaque_s.fsti.checked",
"prims.fst.checked",
"FStar.Seq.f... | [
{
"abbrev": false,
"full_module": "FStar.Seq",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.Seqs_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Seq",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.D... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | n: Vale.Def.Types_s.nat32 -> Vale.Def.Types_s.nat32 | Prims.Tot | [
"total"
] | [] | [
"Vale.Def.Types_s.nat32",
"Vale.Def.Types_s.be_bytes_to_nat32",
"Vale.Lib.Seqs_s.reverse_seq",
"Vale.Def.Types_s.nat8",
"Vale.Def.Types_s.nat32_to_be_bytes"
] | [] | false | false | false | true | false | let reverse_bytes_nat32_def (n: nat32) : nat32 =
| be_bytes_to_nat32 (reverse_seq (nat32_to_be_bytes n)) | false |
Simplifier.fst | Simplifier.test_simplify | val test_simplify: Prims.unit -> Tac unit | val test_simplify: Prims.unit -> Tac unit | let test_simplify () : Tac unit =
simplify ();
or_else goal_is_true (fun () -> dump ""; fail "simplify left open goals") | {
"file_name": "examples/tactics/Simplifier.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 77,
"end_line": 31,
"start_col": 0,
"start_line": 29
} | (*
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": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Simplifier.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": false,
"source_file": "Simplifier.fst"
} | [
{
"abbrev": false,
"full_module": "FStar.Tactics.Simplifier",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
... | {
"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.V2.Derived.or_else",
"Simplifier.goal_is_true",
"FStar.Tactics.V2.Derived.fail",
"FStar.Stubs.Tactics.V2.Builtins.dump",
"FStar.Tactics.Simplifier.simplify"
] | [] | false | true | false | false | false | let test_simplify () : Tac unit =
| simplify ();
or_else goal_is_true
(fun () ->
dump "";
fail "simplify left open goals") | false |
Steel.Primitive.ForkJoin.Unix.fst | Steel.Primitive.ForkJoin.Unix.kfork | val kfork (#p #q: vprop) (f: (unit -> SteelK unit p (fun _ -> q)))
: SteelK (thread q) p (fun _ -> emp) | val kfork (#p #q: vprop) (f: (unit -> SteelK unit p (fun _ -> q)))
: SteelK (thread q) p (fun _ -> emp) | let kfork (#p:vprop) (#q:vprop) (f : unit -> SteelK unit p (fun _ -> q))
: SteelK (thread q) p (fun _ -> emp)
=
SteelK?.reflect (
fun (#frame:vprop) (#postf:vprop)
(k : (x:(thread q) -> SteelT unit (frame `star` emp) (fun _ -> postf))) ->
noop ();
let t1 () : SteelT unit (emp `star` p) (fun _ -> q) ... | {
"file_name": "lib/steel/Steel.Primitive.ForkJoin.Unix.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 11,
"end_line": 205,
"start_col": 0,
"start_line": 190
} | (*
Copyright 2020 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"Steel.Reference.fsti.checked",
"Steel.Primitive.ForkJoin.fsti.checked",
"Steel.Memory.fsti.checked",
"Steel.FractionalPermission.fst.checked",
"Steel.Effect.Atomic.fsti.checked",
"Steel.Effect.fsti.checked",
"prims.fst.checked",
"FStar.Tactic... | [
{
"abbrev": false,
"full_module": "Steel.Primitive.ForkJoin",
"short_module": null
},
{
"abbrev": false,
"full_module": "Steel.Reference",
"short_module": null
},
{
"abbrev": false,
"full_module": "Steel.Effect",
"short_module": null
},
{
"abbrev": false,
"ful... | {
"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 | f: (_: Prims.unit -> Steel.Primitive.ForkJoin.Unix.SteelK Prims.unit)
-> Steel.Primitive.ForkJoin.Unix.SteelK (Steel.Primitive.ForkJoin.thread q) | Steel.Primitive.ForkJoin.Unix.SteelK | [] | [] | [
"Steel.Effect.Common.vprop",
"Prims.unit",
"Steel.Primitive.ForkJoin.thread",
"Steel.Effect.Common.star",
"Steel.Effect.Common.emp",
"Steel.Primitive.ForkJoin.fork",
"Steel.Primitive.ForkJoin.Unix.idk",
"Steel.Primitive.ForkJoin.Unix.steelK",
"Steel.Effect.Atomic.noop",
"FStar.Ghost.hide",
"FSta... | [] | false | true | false | false | false | let kfork (#p #q: vprop) (f: (unit -> SteelK unit p (fun _ -> q)))
: SteelK (thread q) p (fun _ -> emp) =
| SteelK?.reflect (fun
(#frame: vprop)
(#postf: vprop)
(k: (x: (thread q) -> SteelT unit (frame `star` emp) (fun _ -> postf)))
->
noop ();
let t1 () : SteelT unit (emp `star` p) (fun _ -> q) =
let r:steelK unit false p (fun _ -> q) = reify (f ()) in
r #emp #q (fun _ -> ... | false |
Vale.Def.Types_s.fst | Vale.Def.Types_s.reverse_bytes_nat64_def | val reverse_bytes_nat64_def (n: nat64) : nat64 | val reverse_bytes_nat64_def (n: nat64) : nat64 | let reverse_bytes_nat64_def (n:nat64) : nat64 =
let Mktwo n0 n1 = nat_to_two 32 n in
two_to_nat 32 (Mktwo (reverse_bytes_nat32 n1) (reverse_bytes_nat32 n0)) | {
"file_name": "vale/specs/defs/Vale.Def.Types_s.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 73,
"end_line": 124,
"start_col": 0,
"start_line": 122
} | module Vale.Def.Types_s
open FStar.Mul
open Vale.Def.Opaque_s
open Vale.Def.Words_s
open Vale.Def.Words.Two_s
open Vale.Def.Words.Four_s
open Vale.Def.Words.Seq_s
open FStar.Seq
open Vale.Lib.Seqs_s
unfold let nat8 = Vale.Def.Words_s.nat8
unfold let nat16 = Vale.Def.Words_s.nat16
unfold let nat32 = Vale.Def.Words_s.n... | {
"checked_file": "/",
"dependencies": [
"Vale.Lib.Seqs_s.fst.checked",
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Words.Two_s.fsti.checked",
"Vale.Def.Words.Seq_s.fsti.checked",
"Vale.Def.Words.Four_s.fsti.checked",
"Vale.Def.Opaque_s.fsti.checked",
"prims.fst.checked",
"FStar.Seq.f... | [
{
"abbrev": false,
"full_module": "FStar.Seq",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.Seqs_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Seq",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.D... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | n: Vale.Def.Types_s.nat64 -> Vale.Def.Types_s.nat64 | Prims.Tot | [
"total"
] | [] | [
"Vale.Def.Types_s.nat64",
"Vale.Def.Words_s.natN",
"Prims.pow2",
"Vale.Def.Words.Two_s.two_to_nat",
"Vale.Def.Words_s.Mktwo",
"Vale.Def.Types_s.reverse_bytes_nat32",
"Vale.Def.Words_s.two",
"Vale.Def.Words.Two_s.nat_to_two"
] | [] | false | false | false | true | false | let reverse_bytes_nat64_def (n: nat64) : nat64 =
| let Mktwo n0 n1 = nat_to_two 32 n in
two_to_nat 32 (Mktwo (reverse_bytes_nat32 n1) (reverse_bytes_nat32 n0)) | false |
LowParseWriters.fst | LowParseWriters.valid_rptr | val valid_rptr (p: parser) : memory_invariant -> rptr -> GTot Type0 | val valid_rptr (p: parser) : memory_invariant -> rptr -> GTot Type0 | let valid_rptr
p inv x
=
inv.lwrite `B.loc_disjoint` B.loc_buffer x.rptr_base /\
valid_buffer p inv.h0 x.rptr_base | {
"file_name": "examples/layeredeffects/LowParseWriters.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 35,
"end_line": 99,
"start_col": 0,
"start_line": 95
} | (*
Copyright 2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.StrongExcludedMiddle.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure... | [
{
"abbrev": false,
"full_module": "FStar.Monotonic.Pure",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"... | {
"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: LowParseWriters.LowParse.parser ->
inv: LowParseWriters.memory_invariant ->
x: LowParseWriters.rptr
-> Prims.GTot Type0 | Prims.GTot | [
"sometrivial"
] | [] | [
"LowParseWriters.LowParse.parser",
"LowParseWriters.memory_invariant",
"LowParseWriters.rptr",
"Prims.l_and",
"LowStar.Monotonic.Buffer.loc_disjoint",
"FStar.Ghost.reveal",
"LowStar.Monotonic.Buffer.loc",
"LowParseWriters.__proj__Mkmemory_invariant__item__lwrite",
"LowStar.Monotonic.Buffer.loc_buffe... | [] | false | false | false | false | true | let valid_rptr p inv x =
| inv.lwrite `B.loc_disjoint` (B.loc_buffer x.rptr_base) /\ valid_buffer p inv.h0 x.rptr_base | false |
LowParseWriters.fst | LowParseWriters.extract_read_repr_impl | val extract_read_repr_impl
(a:Type u#x)
(pre: pure_pre)
(post: pure_post' a pre)
(post_err: pure_post_err pre)
(l: memory_invariant)
(spec: read_repr_spec a pre post post_err)
(impl: read_repr_impl a pre post post_err l spec)
: HST.Stack (result a)
(requires (fun h ->
B.modifies l.lwrite l.h0 h /\
... | val extract_read_repr_impl
(a:Type u#x)
(pre: pure_pre)
(post: pure_post' a pre)
(post_err: pure_post_err pre)
(l: memory_invariant)
(spec: read_repr_spec a pre post post_err)
(impl: read_repr_impl a pre post post_err l spec)
: HST.Stack (result a)
(requires (fun h ->
B.modifies l.lwrite l.h0 h /\
... | let extract_read_repr_impl
a pre post post_err l spec impl
=
impl () | {
"file_name": "examples/layeredeffects/LowParseWriters.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 9,
"end_line": 51,
"start_col": 0,
"start_line": 48
} | (*
Copyright 2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.StrongExcludedMiddle.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure... | [
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_mod... | {
"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: Type ->
pre: Prims.pure_pre ->
post: LowParseWriters.pure_post' a pre ->
post_err: LowParseWriters.pure_post_err pre ->
l: LowParseWriters.memory_invariant ->
spec: LowParseWriters.read_repr_spec a pre post post_err ->
impl: LowParseWriters.read_repr_impl a pre post post_err l spec
-> ... | FStar.HyperStack.ST.Stack | [] | [] | [
"Prims.pure_pre",
"LowParseWriters.pure_post'",
"LowParseWriters.pure_post_err",
"LowParseWriters.memory_invariant",
"LowParseWriters.read_repr_spec",
"LowParseWriters.read_repr_impl",
"LowParseWriters.result"
] | [] | false | true | false | false | false | let extract_read_repr_impl a pre post post_err l spec impl =
| impl () | false |
LowParseWriters.fst | LowParseWriters.read_subcomp_impl | val read_subcomp_impl (a:Type)
(pre: pure_pre) (post: pure_post' a pre) (post_err: pure_post_err pre)
(pre': pure_pre) (post': pure_post' a pre') (post_err': pure_post_err pre')
(l:memory_invariant)
(l' : memory_invariant)
(f_subcomp_spec:read_repr_spec a pre post post_err)
(f_subcomp:read_repr_impl a pre p... | val read_subcomp_impl (a:Type)
(pre: pure_pre) (post: pure_post' a pre) (post_err: pure_post_err pre)
(pre': pure_pre) (post': pure_post' a pre') (post_err': pure_post_err pre')
(l:memory_invariant)
(l' : memory_invariant)
(f_subcomp_spec:read_repr_spec a pre post post_err)
(f_subcomp:read_repr_impl a pre p... | let read_subcomp_impl
a pre post post_err pre' post' post_err' l l' f_subcomp_spec f_subcomp sq
=
fun _ -> f_subcomp () | {
"file_name": "examples/layeredeffects/LowParseWriters.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 23,
"end_line": 68,
"start_col": 0,
"start_line": 65
} | (*
Copyright 2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.StrongExcludedMiddle.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure... | [
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_mod... | {
"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: Type ->
pre: Prims.pure_pre ->
post: LowParseWriters.pure_post' a pre ->
post_err: LowParseWriters.pure_post_err pre ->
pre': Prims.pure_pre ->
post': LowParseWriters.pure_post' a pre' ->
post_err': LowParseWriters.pure_post_err pre' ->
l: LowParseWriters.memory_invariant ->
l': ... | Prims.Tot | [
"total"
] | [] | [
"Prims.pure_pre",
"LowParseWriters.pure_post'",
"LowParseWriters.pure_post_err",
"LowParseWriters.memory_invariant",
"LowParseWriters.read_repr_spec",
"LowParseWriters.read_repr_impl",
"Prims.squash",
"LowParseWriters.read_subcomp_cond",
"Prims.unit",
"LowParseWriters.result"
] | [] | false | false | false | false | false | let read_subcomp_impl a pre post post_err pre' post' post_err' l l' f_subcomp_spec f_subcomp sq =
| fun _ -> f_subcomp () | false |
LowParseWriters.fst | LowParseWriters.mk_read_repr_impl | val mk_read_repr_impl
(a:Type u#x)
(pre: pure_pre)
(post: pure_post' a pre)
(post_err: pure_post_err pre)
(l: memory_invariant)
(spec: read_repr_spec a pre post post_err)
(impl: (
unit ->
HST.Stack (result a)
(requires (fun h ->
B.modifies l.lwrite l.h0 h /\
HS.get_tip l.h0 `HS.inc... | val mk_read_repr_impl
(a:Type u#x)
(pre: pure_pre)
(post: pure_post' a pre)
(post_err: pure_post_err pre)
(l: memory_invariant)
(spec: read_repr_spec a pre post post_err)
(impl: (
unit ->
HST.Stack (result a)
(requires (fun h ->
B.modifies l.lwrite l.h0 h /\
HS.get_tip l.h0 `HS.inc... | let mk_read_repr_impl
a pre post post_err l spec impl
=
impl | {
"file_name": "examples/layeredeffects/LowParseWriters.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 6,
"end_line": 46,
"start_col": 0,
"start_line": 43
} | (*
Copyright 2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.StrongExcludedMiddle.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure... | [
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_mod... | {
"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: Type ->
pre: Prims.pure_pre ->
post: LowParseWriters.pure_post' a pre ->
post_err: LowParseWriters.pure_post_err pre ->
l: LowParseWriters.memory_invariant ->
spec: LowParseWriters.read_repr_spec a pre post post_err ->
impl: (_: Prims.unit -> FStar.HyperStack.ST.Stack (LowParseWriters.re... | Prims.Tot | [
"total"
] | [] | [
"Prims.pure_pre",
"LowParseWriters.pure_post'",
"LowParseWriters.pure_post_err",
"LowParseWriters.memory_invariant",
"LowParseWriters.read_repr_spec",
"Prims.unit",
"LowParseWriters.result",
"FStar.Monotonic.HyperStack.mem",
"Prims.l_and",
"LowStar.Monotonic.Buffer.modifies",
"FStar.Ghost.reveal... | [] | false | false | false | false | false | let mk_read_repr_impl a pre post post_err l spec impl =
| impl | false |
LowParseWriters.fst | LowParseWriters.read_return_impl | val read_return_impl
(a:Type) (x:a) (inv: memory_invariant)
: Tot (read_repr_impl a True (fun res -> res == x) (fun _ -> False) inv (read_return_spec a x)) | val read_return_impl
(a:Type) (x:a) (inv: memory_invariant)
: Tot (read_repr_impl a True (fun res -> res == x) (fun _ -> False) inv (read_return_spec a x)) | let read_return_impl
a x inv
= fun _ -> Correct x | {
"file_name": "examples/layeredeffects/LowParseWriters.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 20,
"end_line": 55,
"start_col": 0,
"start_line": 53
} | (*
Copyright 2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.StrongExcludedMiddle.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure... | [
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_mod... | {
"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: Type -> x: a -> inv: LowParseWriters.memory_invariant
-> LowParseWriters.read_repr_impl a
Prims.l_True
(fun res -> res == x)
(fun _ -> Prims.l_False)
inv
(LowParseWriters.read_return_spec a x) | Prims.Tot | [
"total"
] | [] | [
"LowParseWriters.memory_invariant",
"Prims.unit",
"LowParseWriters.Correct",
"LowParseWriters.result"
] | [] | false | false | false | false | false | let read_return_impl a x inv =
| fun _ -> Correct x | false |
LowParseWriters.fst | LowParseWriters.read_repr_impl | val read_repr_impl
(a:Type u#x)
(pre: pure_pre)
(post: pure_post' a pre)
(post_err: pure_post_err pre)
(l: memory_invariant)
(spec: read_repr_spec a pre post post_err)
: Tot Type0 | val read_repr_impl
(a:Type u#x)
(pre: pure_pre)
(post: pure_post' a pre)
(post_err: pure_post_err pre)
(l: memory_invariant)
(spec: read_repr_spec a pre post post_err)
: Tot Type0 | let read_repr_impl
a pre post post_err l spec
=
unit ->
HST.Stack (result a)
(requires (fun h ->
B.modifies l.lwrite l.h0 h /\
HS.get_tip l.h0 `HS.includes` HS.get_tip h /\
pre
))
(ensures (fun h res h' ->
B.modifies B.loc_none h h' /\
res == spec ()
)) | {
"file_name": "examples/layeredeffects/LowParseWriters.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 4,
"end_line": 41,
"start_col": 0,
"start_line": 28
} | (*
Copyright 2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.StrongExcludedMiddle.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure... | [
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_mod... | {
"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: Type ->
pre: Prims.pure_pre ->
post: LowParseWriters.pure_post' a pre ->
post_err: LowParseWriters.pure_post_err pre ->
l: LowParseWriters.memory_invariant ->
spec: LowParseWriters.read_repr_spec a pre post post_err
-> Type0 | Prims.Tot | [
"total"
] | [] | [
"Prims.pure_pre",
"LowParseWriters.pure_post'",
"LowParseWriters.pure_post_err",
"LowParseWriters.memory_invariant",
"LowParseWriters.read_repr_spec",
"Prims.unit",
"LowParseWriters.result",
"FStar.Monotonic.HyperStack.mem",
"Prims.l_and",
"LowStar.Monotonic.Buffer.modifies",
"FStar.Ghost.reveal... | [] | false | false | false | false | true | let read_repr_impl a pre post post_err l spec =
| unit
-> HST.Stack (result a)
(requires
(fun h ->
B.modifies l.lwrite l.h0 h /\ (HS.get_tip l.h0) `HS.includes` (HS.get_tip h) /\ pre))
(ensures (fun h res h' -> B.modifies B.loc_none h h' /\ res == spec ())) | false |
LowParseWriters.fst | LowParseWriters.read_bind_impl | val read_bind_impl
(a:Type) (b:Type)
(pre_f: pure_pre) (post_f: pure_post' a pre_f)
(post_err_f: pure_post_err pre_f)
(pre_g: (x:a) -> pure_pre) (post_g: (x:a) -> pure_post' b (pre_g x))
(post_err_g: (x: a) -> pure_post_err (pre_g x))
(f_bind_impl: read_repr_spec a pre_f post_f post_err_f)
(g:(x:a -> read... | val read_bind_impl
(a:Type) (b:Type)
(pre_f: pure_pre) (post_f: pure_post' a pre_f)
(post_err_f: pure_post_err pre_f)
(pre_g: (x:a) -> pure_pre) (post_g: (x:a) -> pure_post' b (pre_g x))
(post_err_g: (x: a) -> pure_post_err (pre_g x))
(f_bind_impl: read_repr_spec a pre_f post_f post_err_f)
(g:(x:a -> read... | let read_bind_impl
a b pre_f post_f post_err_f pre_g post_g post_err_g f_bind_impl g l f' g'
=
fun _ ->
match f' () with
| Correct x -> g' x ()
| Error e -> Error e | {
"file_name": "examples/layeredeffects/LowParseWriters.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 22,
"end_line": 63,
"start_col": 0,
"start_line": 57
} | (*
Copyright 2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.StrongExcludedMiddle.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure... | [
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_mod... | {
"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: Type ->
b: Type ->
pre_f: Prims.pure_pre ->
post_f: LowParseWriters.pure_post' a pre_f ->
post_err_f: LowParseWriters.pure_post_err pre_f ->
pre_g: (x: a -> Prims.pure_pre) ->
post_g: (x: a -> LowParseWriters.pure_post' b (pre_g x)) ->
post_err_g: (x: a -> LowParseWriters.pure_post_e... | Prims.Tot | [
"total"
] | [] | [
"Prims.pure_pre",
"LowParseWriters.pure_post'",
"LowParseWriters.pure_post_err",
"LowParseWriters.read_repr_spec",
"LowParseWriters.memory_invariant",
"LowParseWriters.read_repr_impl",
"Prims.unit",
"LowParseWriters.result",
"Prims.string",
"LowParseWriters.Error"
] | [] | false | false | false | false | false | let read_bind_impl a b pre_f post_f post_err_f pre_g post_g post_err_g f_bind_impl g l f' g' =
| fun _ ->
match f' () with
| Correct x -> g' x ()
| Error e -> Error e | false |
LowParseWriters.fst | LowParseWriters.deref_spec | val deref_spec (#p: parser) (#inv: memory_invariant) (x: ptr p inv) : GTot (Parser?.t p) | val deref_spec (#p: parser) (#inv: memory_invariant) (x: ptr p inv) : GTot (Parser?.t p) | let deref_spec
#p #inv x
=
buffer_contents p inv.h0 x.rptr_base | {
"file_name": "examples/layeredeffects/LowParseWriters.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 38,
"end_line": 104,
"start_col": 0,
"start_line": 101
} | (*
Copyright 2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.StrongExcludedMiddle.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure... | [
{
"abbrev": false,
"full_module": "FStar.Monotonic.Pure",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"... | {
"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 | x: LowParseWriters.ptr p inv -> Prims.GTot (Parser?.t p) | Prims.GTot | [
"sometrivial"
] | [] | [
"LowParseWriters.LowParse.parser",
"LowParseWriters.memory_invariant",
"LowParseWriters.ptr",
"LowParseWriters.LowParse.buffer_contents",
"FStar.Ghost.reveal",
"FStar.Monotonic.HyperStack.mem",
"LowParseWriters.__proj__Mkmemory_invariant__item__h0",
"LowParseWriters.__proj__Mkrptr__item__rptr_base",
... | [] | false | false | false | false | false | let deref_spec #p #inv x =
| buffer_contents p inv.h0 x.rptr_base | false |
LowParseWriters.fst | LowParseWriters.mk_ptr | val mk_ptr
(p: parser)
(inv: memory_invariant)
(b: B.buffer u8)
(len: U32.t { len == B.len b })
: Pure (ptr p inv)
(requires (valid_buffer p inv.h0 b /\ inv.lwrite `B.loc_disjoint` B.loc_buffer b))
(ensures (fun res -> deref_spec res == buffer_contents p inv.h0 b)) | val mk_ptr
(p: parser)
(inv: memory_invariant)
(b: B.buffer u8)
(len: U32.t { len == B.len b })
: Pure (ptr p inv)
(requires (valid_buffer p inv.h0 b /\ inv.lwrite `B.loc_disjoint` B.loc_buffer b))
(ensures (fun res -> deref_spec res == buffer_contents p inv.h0 b)) | let mk_ptr
p inv b len
= {
rptr_base = b;
rptr_len = len;
} | {
"file_name": "examples/layeredeffects/LowParseWriters.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 1,
"end_line": 111,
"start_col": 0,
"start_line": 106
} | (*
Copyright 2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.StrongExcludedMiddle.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure... | [
{
"abbrev": false,
"full_module": "FStar.Monotonic.Pure",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"... | {
"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: LowParseWriters.LowParse.parser ->
inv: LowParseWriters.memory_invariant ->
b: LowStar.Buffer.buffer LowParseWriters.LowParse.u8 ->
len: FStar.UInt32.t{len == LowStar.Monotonic.Buffer.len b}
-> Prims.Pure (LowParseWriters.ptr p inv) | Prims.Pure | [] | [] | [
"LowParseWriters.LowParse.parser",
"LowParseWriters.memory_invariant",
"LowStar.Buffer.buffer",
"LowParseWriters.LowParse.u8",
"FStar.UInt32.t",
"Prims.eq2",
"LowStar.Monotonic.Buffer.len",
"LowStar.Buffer.trivial_preorder",
"LowParseWriters.Mkrptr",
"LowParseWriters.ptr"
] | [] | false | false | false | false | false | let mk_ptr p inv b len =
| { rptr_base = b; rptr_len = len } | false |
Selectors.LList2.fst | Selectors.LList2.is_nil | val is_nil (#a:Type0) (ptr:t a)
: Steel bool (llist ptr) (fun _ -> llist ptr)
(requires fun _ -> True)
(ensures fun h0 res h1 ->
(res == true <==> ptr == null_llist #a) /\
v_llist ptr h0 == v_llist ptr h1 /\
res == Nil? (v_llist ptr h1)) | val is_nil (#a:Type0) (ptr:t a)
: Steel bool (llist ptr) (fun _ -> llist ptr)
(requires fun _ -> True)
(ensures fun h0 res h1 ->
(res == true <==> ptr == null_llist #a) /\
v_llist ptr h0 == v_llist ptr h1 /\
res == Nil? (v_llist ptr h1)) | let is_nil
#a ptr
= is_nil' ptr;
return (is_null ptr) | {
"file_name": "share/steel/examples/steel/Selectors.LList2.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 22,
"end_line": 270,
"start_col": 0,
"start_line": 267
} | module Selectors.LList2
open Steel.FractionalPermission
module Mem = Steel.Memory
#push-options "--__no_positivity"
noeq
type cell (a: Type0) = {
tail_fuel: Ghost.erased nat;
next: ref (cell a);
data: a;
}
#pop-options
let next #a (c:cell a) : t a = c.next
let data #a (c:cell a) : a = c.data
let mk_cell #a (n:... | {
"checked_file": "/",
"dependencies": [
"Steel.Memory.fsti.checked",
"Steel.FractionalPermission.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Ghost.fsti.checked"
],
"interface_file": true,
"source_file": "Selectors.LList2.fst"
} | [
{
"abbrev": true,
"full_module": "Steel.Memory",
"short_module": "Mem"
},
{
"abbrev": false,
"full_module": "Steel.FractionalPermission",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "L"
},
{
"abbrev": false,
"full... | {
"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 | ptr: Selectors.LList2.t a -> Steel.Effect.Steel Prims.bool | Steel.Effect.Steel | [] | [] | [
"Selectors.LList2.t",
"Steel.Effect.Atomic.return",
"Prims.bool",
"FStar.Ghost.hide",
"FStar.Set.set",
"Steel.Memory.iname",
"FStar.Set.empty",
"Selectors.LList2.llist",
"Steel.Effect.Common.vprop",
"Selectors.LList2.is_null",
"Prims.unit",
"Selectors.LList2.is_nil'"
] | [] | false | true | false | false | false | let is_nil #a ptr =
| is_nil' ptr;
return (is_null ptr) | false |
LowParseWriters.fst | LowParseWriters.failwith_impl | val failwith_impl
(a: Type)
(inv: memory_invariant)
(s: string)
: Tot (read_repr_impl a True (fun _ -> False) (fun _ -> True) inv (failwith_spec a s)) | val failwith_impl
(a: Type)
(inv: memory_invariant)
(s: string)
: Tot (read_repr_impl a True (fun _ -> False) (fun _ -> True) inv (failwith_spec a s)) | let failwith_impl
a inv s
= fun _ -> Error s | {
"file_name": "examples/layeredeffects/LowParseWriters.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 18,
"end_line": 77,
"start_col": 0,
"start_line": 75
} | (*
Copyright 2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.StrongExcludedMiddle.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure... | [
{
"abbrev": false,
"full_module": "FStar.Monotonic.Pure",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"... | {
"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: Type -> inv: LowParseWriters.memory_invariant -> s: Prims.string
-> LowParseWriters.read_repr_impl a
Prims.l_True
(fun _ -> Prims.l_False)
(fun _ -> Prims.l_True)
inv
(LowParseWriters.failwith_spec a s) | Prims.Tot | [
"total"
] | [] | [
"LowParseWriters.memory_invariant",
"Prims.string",
"Prims.unit",
"LowParseWriters.Error",
"LowParseWriters.result"
] | [] | false | false | false | false | false | let failwith_impl a inv s =
| fun _ -> Error s | false |
LowParseWriters.fst | LowParseWriters.validate_spec | val validate_spec
(p: parser)
(inv: memory_invariant)
(b: B.buffer U8.t)
: Tot (read_repr_spec (ptr p inv & U32.t) (validate_pre inv b) (validate_post p inv b) (validate_post_err p inv b)) | val validate_spec
(p: parser)
(inv: memory_invariant)
(b: B.buffer U8.t)
: Tot (read_repr_spec (ptr p inv & U32.t) (validate_pre inv b) (validate_post p inv b) (validate_post_err p inv b)) | let validate_spec
p inv b
= fun _ ->
match gvalidate p inv.h0 b with
| None -> Error "validation failed"
| Some pos ->
let b' = B.gsub b 0ul pos in
let x = { rptr_base = b' ; rptr_len = pos } in
Correct (x, pos) | {
"file_name": "examples/layeredeffects/LowParseWriters.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 20,
"end_line": 155,
"start_col": 0,
"start_line": 147
} | (*
Copyright 2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.StrongExcludedMiddle.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure... | [
{
"abbrev": false,
"full_module": "FStar.Monotonic.Pure",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"... | {
"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: LowParseWriters.LowParse.parser ->
inv: LowParseWriters.memory_invariant ->
b: LowStar.Buffer.buffer FStar.UInt8.t
-> LowParseWriters.read_repr_spec (LowParseWriters.ptr p inv * FStar.UInt32.t)
(LowParseWriters.validate_pre inv b)
(LowParseWriters.validate_post p inv b)
(LowParseWrit... | Prims.Tot | [
"total"
] | [] | [
"LowParseWriters.LowParse.parser",
"LowParseWriters.memory_invariant",
"LowStar.Buffer.buffer",
"FStar.UInt8.t",
"Prims.unit",
"LowParseWriters.LowParse.gvalidate",
"FStar.Ghost.reveal",
"FStar.Monotonic.HyperStack.mem",
"LowParseWriters.__proj__Mkmemory_invariant__item__h0",
"LowParseWriters.Erro... | [] | false | false | false | false | false | let validate_spec p inv b =
| fun _ ->
match gvalidate p inv.h0 b with
| None -> Error "validation failed"
| Some pos ->
let b' = B.gsub b 0ul pos in
let x = { rptr_base = b'; rptr_len = pos } in
Correct (x, pos) | false |
Selectors.LList2.fst | Selectors.LList2.llist0_of_llist | val llist0_of_llist (#opened: _) (#a: Type) (r: t a)
: SteelGhost unit
opened
(llist r)
(fun _ -> llist0 r)
(fun _ -> True)
(fun h0 _ h1 -> h1 (llist0 r) == h0 (llist r)) | val llist0_of_llist (#opened: _) (#a: Type) (r: t a)
: SteelGhost unit
opened
(llist r)
(fun _ -> llist0 r)
(fun _ -> True)
(fun h0 _ h1 -> h1 (llist0 r) == h0 (llist r)) | let llist0_of_llist
(#opened: _)
(#a: Type)
(r: t a)
: SteelGhost unit opened
(llist r)
(fun _ -> llist0 r)
(fun _ -> True)
(fun h0 _ h1 -> h1 (llist0 r) == h0 (llist r))
=
change_slprop_rel
(llist r)
(llist0 r)
(fun x y -> x == y)
(fun _ -> ()) | {
"file_name": "share/steel/examples/steel/Selectors.LList2.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 17,
"end_line": 225,
"start_col": 0,
"start_line": 211
} | module Selectors.LList2
open Steel.FractionalPermission
module Mem = Steel.Memory
#push-options "--__no_positivity"
noeq
type cell (a: Type0) = {
tail_fuel: Ghost.erased nat;
next: ref (cell a);
data: a;
}
#pop-options
let next #a (c:cell a) : t a = c.next
let data #a (c:cell a) : a = c.data
let mk_cell #a (n:... | {
"checked_file": "/",
"dependencies": [
"Steel.Memory.fsti.checked",
"Steel.FractionalPermission.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Ghost.fsti.checked"
],
"interface_file": true,
"source_file": "Selectors.LList2.fst"
} | [
{
"abbrev": true,
"full_module": "Steel.Memory",
"short_module": "Mem"
},
{
"abbrev": false,
"full_module": "Steel.FractionalPermission",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "L"
},
{
"abbrev": false,
"full... | {
"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: Selectors.LList2.t a -> Steel.Effect.Atomic.SteelGhost Prims.unit | Steel.Effect.Atomic.SteelGhost | [] | [] | [
"Steel.Memory.inames",
"Selectors.LList2.t",
"Steel.Effect.Atomic.change_slprop_rel",
"Selectors.LList2.llist",
"Selectors.LList2.llist0",
"Steel.Effect.Common.normal",
"Steel.Effect.Common.t_of",
"Prims.eq2",
"Prims.prop",
"Steel.Memory.mem",
"Prims.unit",
"Steel.Effect.Common.vprop",
"Stee... | [] | false | true | false | false | false | let llist0_of_llist (#opened: _) (#a: Type) (r: t a)
: SteelGhost unit
opened
(llist r)
(fun _ -> llist0 r)
(fun _ -> True)
(fun h0 _ h1 -> h1 (llist0 r) == h0 (llist r)) =
| change_slprop_rel (llist r) (llist0 r) (fun x y -> x == y) (fun _ -> ()) | false |
LowParseWriters.fst | LowParseWriters.repr_impl | val repr_impl
(a:Type u#x)
(r_in: parser)
(r_out: parser)
(pre: pre_t r_in)
(post: post_t a r_in r_out pre)
(post_err: post_err_t r_in pre)
(l: memory_invariant)
(spec: repr_spec a r_in r_out pre post post_err)
: Tot Type0 | val repr_impl
(a:Type u#x)
(r_in: parser)
(r_out: parser)
(pre: pre_t r_in)
(post: post_t a r_in r_out pre)
(post_err: post_err_t r_in pre)
(l: memory_invariant)
(spec: repr_spec a r_in r_out pre post post_err)
: Tot Type0 | let repr_impl
(a:Type u#x)
(r_in: parser)
(r_out: parser)
(pre: pre_t r_in)
(post: post_t a r_in r_out pre)
(post_err: post_err_t r_in pre)
(l: memory_invariant)
(spec: repr_spec a r_in r_out pre post post_err)
: Tot Type0 =
(b: B.buffer u8 { l.lwrite `B.loc_includes` B.loc_buffer b }) ->
(len: U32.... | {
"file_name": "examples/layeredeffects/LowParseWriters.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 4,
"end_line": 217,
"start_col": 0,
"start_line": 195
} | (*
Copyright 2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.StrongExcludedMiddle.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure... | [
{
"abbrev": false,
"full_module": "FStar.Monotonic.Pure",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"... | {
"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: Type ->
r_in: LowParseWriters.LowParse.parser ->
r_out: LowParseWriters.LowParse.parser ->
pre: LowParseWriters.pre_t r_in ->
post: LowParseWriters.post_t a r_in r_out pre ->
post_err: LowParseWriters.post_err_t r_in pre ->
l: LowParseWriters.memory_invariant ->
spec: LowParseWriters... | Prims.Tot | [
"total"
] | [] | [
"LowParseWriters.LowParse.parser",
"LowParseWriters.pre_t",
"LowParseWriters.post_t",
"LowParseWriters.post_err_t",
"LowParseWriters.memory_invariant",
"LowParseWriters.repr_spec",
"LowStar.Buffer.buffer",
"LowParseWriters.LowParse.u8",
"LowStar.Monotonic.Buffer.loc_includes",
"FStar.Ghost.reveal"... | [] | false | false | false | false | true | let repr_impl
(a: Type u#x)
(r_in r_out: parser)
(pre: pre_t r_in)
(post: post_t a r_in r_out pre)
(post_err: post_err_t r_in pre)
(l: memory_invariant)
(spec: repr_spec a r_in r_out pre post post_err)
: Tot Type0 =
|
b: B.buffer u8 {l.lwrite `B.loc_includes` (B.loc_buffer b)} ->
len: U32.t{len == B.len b} ->
pos1: buffer_offset b
-> HST.Stack (iresult a)
(requires
(fun h ->
B.modifies l.lwrite l.h0 h /\ (HS.get_tip l.h0) `HS.includes` (HS.get_tip h) /\
valid_pos r_in h b 0ul pos1... | false |
LowParseWriters.fst | LowParseWriters.lift_pure_read_impl | val lift_pure_read_impl
(a:Type) (wp:pure_wp a)
(f_pure_spec_for_impl:unit -> PURE a wp)
(l: memory_invariant)
: Tot (read_repr_impl a _ _ _ l (lift_pure_read_spec a wp f_pure_spec_for_impl)) | val lift_pure_read_impl
(a:Type) (wp:pure_wp a)
(f_pure_spec_for_impl:unit -> PURE a wp)
(l: memory_invariant)
: Tot (read_repr_impl a _ _ _ l (lift_pure_read_spec a wp f_pure_spec_for_impl)) | let lift_pure_read_impl
a wp f_pure_spec_for_impl l
= FStar.Monotonic.Pure.elim_pure_wp_monotonicity wp;
fun _ -> Correct (f_pure_spec_for_impl ()) | {
"file_name": "examples/layeredeffects/LowParseWriters.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 44,
"end_line": 73,
"start_col": 0,
"start_line": 70
} | (*
Copyright 2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.StrongExcludedMiddle.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure... | [
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_mod... | {
"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: Type ->
wp: Prims.pure_wp a ->
f_pure_spec_for_impl: (_: Prims.unit -> Prims.PURE a) ->
l: LowParseWriters.memory_invariant
-> LowParseWriters.read_repr_impl a
(wp (fun _ -> Prims.l_True))
(fun x -> ~(wp (fun x' -> ~(x == x'))))
(fun _ -> Prims.l_False)
l
(LowParseWri... | Prims.Tot | [
"total"
] | [] | [
"Prims.pure_wp",
"Prims.unit",
"LowParseWriters.memory_invariant",
"LowParseWriters.Correct",
"LowParseWriters.result",
"FStar.Monotonic.Pure.elim_pure_wp_monotonicity",
"LowParseWriters.read_repr_impl",
"Prims.l_True",
"Prims.l_not",
"Prims.eq2",
"Prims.l_False",
"LowParseWriters.lift_pure_re... | [] | false | false | false | false | false | let lift_pure_read_impl a wp f_pure_spec_for_impl l =
| FStar.Monotonic.Pure.elim_pure_wp_monotonicity wp;
fun _ -> Correct (f_pure_spec_for_impl ()) | false |
LowParseWriters.fst | LowParseWriters.deref_impl | val deref_impl
(#p: parser)
(#inv: memory_invariant)
(r: leaf_reader p)
(x: ptr p inv)
: Tot (read_repr_impl (Parser?.t p) True (fun res -> res == deref_spec x) (fun _ -> False) inv (fun _ -> Correct (deref_spec x))) | val deref_impl
(#p: parser)
(#inv: memory_invariant)
(r: leaf_reader p)
(x: ptr p inv)
: Tot (read_repr_impl (Parser?.t p) True (fun res -> res == deref_spec x) (fun _ -> False) inv (fun _ -> Correct (deref_spec x))) | let deref_impl
#p #inv r x _
=
let h = HST.get () in
valid_frame p inv.h0 x.rptr_base 0ul (B.len x.rptr_base) inv.lwrite h;
Correct (r x.rptr_base x.rptr_len) | {
"file_name": "examples/layeredeffects/LowParseWriters.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 36,
"end_line": 127,
"start_col": 0,
"start_line": 122
} | (*
Copyright 2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.StrongExcludedMiddle.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure... | [
{
"abbrev": false,
"full_module": "FStar.Monotonic.Pure",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"... | {
"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: LowParseWriters.LowParse.leaf_reader p -> x: LowParseWriters.ptr p inv
-> LowParseWriters.read_repr_impl (Parser?.t p)
Prims.l_True
(fun res -> res == LowParseWriters.deref_spec x)
(fun _ -> Prims.l_False)
inv
(fun _ -> LowParseWriters.Correct (LowParseWriters.deref_spec x)) | Prims.Tot | [
"total"
] | [] | [
"LowParseWriters.LowParse.parser",
"LowParseWriters.memory_invariant",
"LowParseWriters.LowParse.leaf_reader",
"LowParseWriters.ptr",
"Prims.unit",
"LowParseWriters.Correct",
"LowParseWriters.LowParse.__proj__Parser__item__t",
"LowParseWriters.result",
"LowParseWriters.__proj__Mkrptr__item__rptr_bas... | [] | false | false | false | false | false | let deref_impl #p #inv r x _ =
| let h = HST.get () in
valid_frame p inv.h0 x.rptr_base 0ul (B.len x.rptr_base) inv.lwrite h;
Correct (r x.rptr_base x.rptr_len) | false |
LowParseWriters.fst | LowParseWriters.buffer_index_impl | val buffer_index_impl
(#t: Type)
(inv: memory_invariant)
(b: B.buffer t)
(i: U32.t)
: Tot (read_repr_impl _ _ _ _ inv (buffer_index_spec inv b i)) | val buffer_index_impl
(#t: Type)
(inv: memory_invariant)
(b: B.buffer t)
(i: U32.t)
: Tot (read_repr_impl _ _ _ _ inv (buffer_index_spec inv b i)) | let buffer_index_impl
#t inv b i
=
fun _ -> Correct (B.index b i) | {
"file_name": "examples/layeredeffects/LowParseWriters.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 32,
"end_line": 82,
"start_col": 0,
"start_line": 79
} | (*
Copyright 2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.StrongExcludedMiddle.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure... | [
{
"abbrev": false,
"full_module": "FStar.Monotonic.Pure",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"... | {
"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 | inv: LowParseWriters.memory_invariant -> b: LowStar.Buffer.buffer t -> i: FStar.UInt32.t
-> LowParseWriters.read_repr_impl t
(LowStar.Monotonic.Buffer.live (FStar.Ghost.reveal (Mkmemory_invariant?.h0 inv)) b /\
LowStar.Monotonic.Buffer.loc_disjoint (LowStar.Monotonic.Buffer.loc_buffer b)
(FSta... | Prims.Tot | [
"total"
] | [] | [
"LowParseWriters.memory_invariant",
"LowStar.Buffer.buffer",
"FStar.UInt32.t",
"Prims.unit",
"LowParseWriters.Correct",
"LowParseWriters.result",
"LowStar.Monotonic.Buffer.index",
"LowStar.Buffer.trivial_preorder"
] | [] | false | false | false | false | false | let buffer_index_impl #t inv b i =
| fun _ -> Correct (B.index b i) | false |
OWGCounter.fst | OWGCounter.incr_ctr | val incr_ctr (#v: G.erased int) (r: ref int)
: SteelT unit (pts_to r full_perm v) (fun _ -> pts_to r full_perm (v + 1)) | val incr_ctr (#v: G.erased int) (r: ref int)
: SteelT unit (pts_to r full_perm v) (fun _ -> pts_to r full_perm (v + 1)) | let incr_ctr (#v:G.erased int) (r:ref int)
: SteelT unit
(pts_to r full_perm v)
(fun _ -> pts_to r full_perm (v+1))
= let n = R.read_pt r in
R.write_pt r (n+1);
rewrite_slprop (pts_to r full_perm (n + 1))
(pts_to r full_perm (v+1))
(fun _ -> ()) | {
"file_name": "share/steel/examples/steel/OWGCounter.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 31,
"end_line": 185,
"start_col": 0,
"start_line": 177
} | (*
Copyright 2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"Steel.SpinLock.fsti.checked",
"Steel.Reference.fsti.checked",
"Steel.Memory.fsti.checked",
"Steel.FractionalPermission.fst.checked",
"Steel.Effect.Atomic.fsti.checked",
"Steel.Effect.fsti.checked",
"prims.fst.checked",
"FStar.Tactics.Effect.f... | [
{
"abbrev": true,
"full_module": "Steel.Effect.Atomic",
"short_module": "A"
},
{
"abbrev": true,
"full_module": "Steel.FractionalPermission",
"short_module": "P"
},
{
"abbrev": true,
"full_module": "Steel.Reference",
"short_module": "R"
},
{
"abbrev": false,
"... | {
"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 | r: Steel.Reference.ref Prims.int -> Steel.Effect.SteelT Prims.unit | Steel.Effect.SteelT | [] | [] | [
"FStar.Ghost.erased",
"Prims.int",
"Steel.Reference.ref",
"Steel.Effect.Atomic.rewrite_slprop",
"FStar.Ghost.hide",
"FStar.Set.set",
"Steel.Memory.iname",
"FStar.Set.empty",
"Steel.Reference.pts_to",
"Steel.FractionalPermission.full_perm",
"Prims.op_Addition",
"FStar.Ghost.reveal",
"Steel.Me... | [] | false | true | false | false | false | let incr_ctr (#v: G.erased int) (r: ref int)
: SteelT unit (pts_to r full_perm v) (fun _ -> pts_to r full_perm (v + 1)) =
| let n = R.read_pt r in
R.write_pt r (n + 1);
rewrite_slprop (pts_to r full_perm (n + 1)) (pts_to r full_perm (v + 1)) (fun _ -> ()) | false |
LowParseWriters.fst | LowParseWriters.return_impl | val return_impl
(a:Type) (x:a) (r: parser)
(l: memory_invariant)
: Tot (repr_impl a (r) r _ _ _ l (return_spec a x r)) | val return_impl
(a:Type) (x:a) (r: parser)
(l: memory_invariant)
: Tot (repr_impl a (r) r _ _ _ l (return_spec a x r)) | let return_impl
a x r l
= fun b len pos1 -> ICorrect x pos1 | {
"file_name": "examples/layeredeffects/LowParseWriters.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 35,
"end_line": 232,
"start_col": 0,
"start_line": 230
} | (*
Copyright 2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.StrongExcludedMiddle.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure... | [
{
"abbrev": false,
"full_module": "FStar.Monotonic.Pure",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"... | {
"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: Type -> x: a -> r: LowParseWriters.LowParse.parser -> l: LowParseWriters.memory_invariant
-> LowParseWriters.repr_impl a
r
r
(fun _ -> Prims.l_True)
(fun v_in x' v_out -> x' == x /\ v_out == v_in)
(fun _ -> Prims.l_False)
l
(LowParseWriters.return_spec a x r) | Prims.Tot | [
"total"
] | [] | [
"LowParseWriters.LowParse.parser",
"LowParseWriters.memory_invariant",
"LowStar.Buffer.buffer",
"LowParseWriters.LowParse.u8",
"LowStar.Monotonic.Buffer.loc_includes",
"FStar.Ghost.reveal",
"LowStar.Monotonic.Buffer.loc",
"LowParseWriters.__proj__Mkmemory_invariant__item__lwrite",
"LowStar.Monotonic... | [] | false | false | false | false | false | let return_impl a x r l =
| fun b len pos1 -> ICorrect x pos1 | false |
LowParseWriters.fst | LowParseWriters.access_spec | val access_spec
(#p1 #p2: parser)
(#lens: clens (Parser?.t p1) (Parser?.t p2))
(#inv: memory_invariant)
(g: gaccessor p1 p2 lens)
(x: ptr p1 inv)
: Ghost (ptr p2 inv)
(requires (lens.clens_cond (deref_spec x)))
(ensures (fun res -> deref_spec res == lens.clens_get (deref_spec x))) | val access_spec
(#p1 #p2: parser)
(#lens: clens (Parser?.t p1) (Parser?.t p2))
(#inv: memory_invariant)
(g: gaccessor p1 p2 lens)
(x: ptr p1 inv)
: Ghost (ptr p2 inv)
(requires (lens.clens_cond (deref_spec x)))
(ensures (fun res -> deref_spec res == lens.clens_get (deref_spec x))) | let access_spec
#p1 #p2 #lens #inv g x
=
let y' = gaccess g inv.h0 x.rptr_base in
{ rptr_base = y'; rptr_len = B.len y' } | {
"file_name": "examples/layeredeffects/LowParseWriters.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 41,
"end_line": 133,
"start_col": 0,
"start_line": 129
} | (*
Copyright 2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.StrongExcludedMiddle.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure... | [
{
"abbrev": false,
"full_module": "FStar.Monotonic.Pure",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"... | {
"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 | g: LowParseWriters.LowParse.gaccessor p1 p2 lens -> x: LowParseWriters.ptr p1 inv
-> Prims.Ghost (LowParseWriters.ptr p2 inv) | Prims.Ghost | [] | [] | [
"LowParseWriters.LowParse.parser",
"LowParseWriters.LowParse.clens",
"LowParseWriters.LowParse.__proj__Parser__item__t",
"LowParseWriters.memory_invariant",
"LowParseWriters.LowParse.gaccessor",
"LowParseWriters.ptr",
"LowParseWriters.Mkrptr",
"LowStar.Monotonic.Buffer.len",
"LowParseWriters.LowPars... | [] | false | false | false | false | false | let access_spec #p1 #p2 #lens #inv g x =
| let y' = gaccess g inv.h0 x.rptr_base in
{ rptr_base = y'; rptr_len = B.len y' } | false |
LowParseWriters.fst | LowParseWriters.buffer_of_ptr | val buffer_of_ptr
(#p: parser)
(#inv: memory_invariant)
(x: ptr p inv)
: Tot (bl: (B.buffer u8 & U32.t) {
let (b, len) = bl in
B.len b == len /\
valid_buffer p inv.h0 b /\
inv.lwrite `B.loc_disjoint` B.loc_buffer b /\
deref_spec x == buffer_contents p inv.h0 b
}) | val buffer_of_ptr
(#p: parser)
(#inv: memory_invariant)
(x: ptr p inv)
: Tot (bl: (B.buffer u8 & U32.t) {
let (b, len) = bl in
B.len b == len /\
valid_buffer p inv.h0 b /\
inv.lwrite `B.loc_disjoint` B.loc_buffer b /\
deref_spec x == buffer_contents p inv.h0 b
}) | let buffer_of_ptr
#p #inv x
=
(x.rptr_base, x.rptr_len) | {
"file_name": "examples/layeredeffects/LowParseWriters.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 27,
"end_line": 116,
"start_col": 0,
"start_line": 113
} | (*
Copyright 2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.StrongExcludedMiddle.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure... | [
{
"abbrev": false,
"full_module": "FStar.Monotonic.Pure",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"... | {
"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 | x: LowParseWriters.ptr p inv
-> bl:
(LowStar.Buffer.buffer LowParseWriters.LowParse.u8 * FStar.UInt32.t)
{ let _ = bl in
(let FStar.Pervasives.Native.Mktuple2 #_ #_ b len = _ in
LowStar.Monotonic.Buffer.len b == len /\
LowParseWriters.LowParse.valid_buffer p
(FStar.Gh... | Prims.Tot | [
"total"
] | [] | [
"LowParseWriters.LowParse.parser",
"LowParseWriters.memory_invariant",
"LowParseWriters.ptr",
"FStar.Pervasives.Native.Mktuple2",
"LowStar.Buffer.buffer",
"LowParseWriters.LowParse.u8",
"FStar.UInt32.t",
"LowParseWriters.__proj__Mkrptr__item__rptr_base",
"LowParseWriters.__proj__Mkrptr__item__rptr_l... | [] | false | false | false | false | false | let buffer_of_ptr #p #inv x =
| (x.rptr_base, x.rptr_len) | false |
LowParseWriters.fst | LowParseWriters.valid_rptr_frame | val valid_rptr_frame
(#p: parser) (#inv: memory_invariant) (x: ptr p inv) (inv' : memory_invariant)
: Lemma
(requires (
inv `memory_invariant_includes` inv'
))
(ensures (
valid_rptr p inv' x /\
deref_spec #p #inv' x == deref_spec #p #inv x
))
[SMTPatOr [
[SMTPat (inv `memory_invariant_includ... | val valid_rptr_frame
(#p: parser) (#inv: memory_invariant) (x: ptr p inv) (inv' : memory_invariant)
: Lemma
(requires (
inv `memory_invariant_includes` inv'
))
(ensures (
valid_rptr p inv' x /\
deref_spec #p #inv' x == deref_spec #p #inv x
))
[SMTPatOr [
[SMTPat (inv `memory_invariant_includ... | let valid_rptr_frame
#p #inv x inv'
= valid_frame p inv.h0 x.rptr_base 0ul (B.len x.rptr_base) inv.lwrite inv'.h0 | {
"file_name": "examples/layeredeffects/LowParseWriters.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 77,
"end_line": 120,
"start_col": 0,
"start_line": 118
} | (*
Copyright 2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.StrongExcludedMiddle.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure... | [
{
"abbrev": false,
"full_module": "FStar.Monotonic.Pure",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"... | {
"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 | x: LowParseWriters.ptr p inv -> inv': LowParseWriters.memory_invariant
-> FStar.Pervasives.Lemma (requires LowParseWriters.memory_invariant_includes inv inv')
(ensures
LowParseWriters.valid_rptr p inv' x /\
LowParseWriters.deref_spec x == LowParseWriters.deref_spec x)
[
SMTPatOr [
... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"LowParseWriters.LowParse.parser",
"LowParseWriters.memory_invariant",
"LowParseWriters.ptr",
"LowParseWriters.LowParse.valid_frame",
"FStar.Ghost.reveal",
"FStar.Monotonic.HyperStack.mem",
"LowParseWriters.__proj__Mkmemory_invariant__item__h0",
"LowParseWriters.__proj__Mkrptr__item__rptr_base",
"FS... | [] | true | false | true | false | false | let valid_rptr_frame #p #inv x inv' =
| valid_frame p inv.h0 x.rptr_base 0ul (B.len x.rptr_base) inv.lwrite inv'.h0 | false |
LowParseWriters.fst | LowParseWriters.valid_frame' | val valid_frame'
(p: parser)
(h: HS.mem)
(b: B.buffer U8.t)
(pos: U32.t)
(l: B.loc)
(h': HS.mem)
(pos': U32.t)
: Lemma
((B.live h b /\ (valid_pos p h b pos pos' \/ valid_pos p h' b pos pos') /\ B.modifies l h h' /\
B.loc_disjoint l (B.loc_buffer_from_to b pos po... | val valid_frame'
(p: parser)
(h: HS.mem)
(b: B.buffer U8.t)
(pos: U32.t)
(l: B.loc)
(h': HS.mem)
(pos': U32.t)
: Lemma
((B.live h b /\ (valid_pos p h b pos pos' \/ valid_pos p h' b pos pos') /\ B.modifies l h h' /\
B.loc_disjoint l (B.loc_buffer_from_to b pos po... | let valid_frame'
(p: parser)
(h: HS.mem)
(b: B.buffer U8.t)
(pos: U32.t)
(l: B.loc)
(h' : HS.mem)
(pos' : U32.t)
: Lemma
((
B.live h b /\
(valid_pos p h b pos pos' \/ valid_pos p h' b pos pos') /\
B.modifies l h h' /\
B.loc_disjoint l (B.loc_buffer_from_to b pos pos')
) ==> (
valid... | {
"file_name": "examples/layeredeffects/LowParseWriters.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 59,
"end_line": 176,
"start_col": 0,
"start_line": 157
} | (*
Copyright 2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.StrongExcludedMiddle.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure... | [
{
"abbrev": false,
"full_module": "FStar.Monotonic.Pure",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full... | {
"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: LowParseWriters.LowParse.parser ->
h: FStar.Monotonic.HyperStack.mem ->
b: LowStar.Buffer.buffer FStar.UInt8.t ->
pos: FStar.UInt32.t ->
l: LowStar.Monotonic.Buffer.loc ->
h': FStar.Monotonic.HyperStack.mem ->
pos': FStar.UInt32.t
-> FStar.Pervasives.Lemma
(ensures
LowStar.Mo... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"LowParseWriters.LowParse.parser",
"FStar.Monotonic.HyperStack.mem",
"LowStar.Buffer.buffer",
"FStar.UInt8.t",
"FStar.UInt32.t",
"LowStar.Monotonic.Buffer.loc",
"FStar.Classical.move_requires",
"Prims.l_and",
"LowStar.Monotonic.Buffer.live",
"LowStar.Buffer.trivial_preorder",
"Prims.l_or",
"Lo... | [] | false | false | true | false | false | let valid_frame'
(p: parser)
(h: HS.mem)
(b: B.buffer U8.t)
(pos: U32.t)
(l: B.loc)
(h': HS.mem)
(pos': U32.t)
: Lemma
((B.live h b /\ (valid_pos p h b pos pos' \/ valid_pos p h' b pos pos') /\ B.modifies l h h' /\
B.loc_disjoint l (B.loc_buffer_from_to b pos po... | Classical.move_requires (valid_frame p h b pos pos' l) h' | false |
LowParseWriters.fst | LowParseWriters.mk_repr_impl | val mk_repr_impl
(a:Type u#x)
(r_in: parser)
(r_out: parser)
(pre: pre_t r_in)
(post: post_t a r_in r_out pre)
(post_err: post_err_t r_in pre)
(l: memory_invariant)
(spec: repr_spec a r_in r_out pre post post_err)
(impl: (
(b: B.buffer u8 { l.lwrite `B.loc_includes` B.loc_buffer b }) ->
(len: ... | val mk_repr_impl
(a:Type u#x)
(r_in: parser)
(r_out: parser)
(pre: pre_t r_in)
(post: post_t a r_in r_out pre)
(post_err: post_err_t r_in pre)
(l: memory_invariant)
(spec: repr_spec a r_in r_out pre post post_err)
(impl: (
(b: B.buffer u8 { l.lwrite `B.loc_includes` B.loc_buffer b }) ->
(len: ... | let mk_repr_impl
a r_in r_out pre post post_err l spec impl
=
impl | {
"file_name": "examples/layeredeffects/LowParseWriters.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 6,
"end_line": 222,
"start_col": 0,
"start_line": 219
} | (*
Copyright 2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.StrongExcludedMiddle.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure... | [
{
"abbrev": false,
"full_module": "FStar.Monotonic.Pure",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"... | {
"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: Type ->
r_in: LowParseWriters.LowParse.parser ->
r_out: LowParseWriters.LowParse.parser ->
pre: LowParseWriters.pre_t r_in ->
post: LowParseWriters.post_t a r_in r_out pre ->
post_err: LowParseWriters.post_err_t r_in pre ->
l: LowParseWriters.memory_invariant ->
spec: LowParseWriters... | Prims.Tot | [
"total"
] | [] | [
"LowParseWriters.LowParse.parser",
"LowParseWriters.pre_t",
"LowParseWriters.post_t",
"LowParseWriters.post_err_t",
"LowParseWriters.memory_invariant",
"LowParseWriters.repr_spec",
"LowStar.Buffer.buffer",
"LowParseWriters.LowParse.u8",
"LowStar.Monotonic.Buffer.loc_includes",
"FStar.Ghost.reveal"... | [] | false | false | false | false | false | let mk_repr_impl a r_in r_out pre post post_err l spec impl =
| impl | false |
LowParseWriters.fst | LowParseWriters.access_impl | val access_impl
(#p1 #p2: parser)
(#lens: clens (Parser?.t p1) (Parser?.t p2))
(#inv: memory_invariant)
(#g: gaccessor p1 p2 lens)
(a: accessor g)
(x: ptr p1 inv)
: Tot (read_repr_impl (ptr p2 inv) (lens.clens_cond (deref_spec x)) (fun res -> lens.clens_cond (deref_spec x) /\ deref_spec res == lens.clens_ge... | val access_impl
(#p1 #p2: parser)
(#lens: clens (Parser?.t p1) (Parser?.t p2))
(#inv: memory_invariant)
(#g: gaccessor p1 p2 lens)
(a: accessor g)
(x: ptr p1 inv)
: Tot (read_repr_impl (ptr p2 inv) (lens.clens_cond (deref_spec x)) (fun res -> lens.clens_cond (deref_spec x) /\ deref_spec res == lens.clens_ge... | let access_impl
#p1 #p2 #lens #inv #g a x
=
fun _ ->
let h = HST.get () in
valid_frame p1 inv.h0 x.rptr_base 0ul (B.len x.rptr_base) inv.lwrite h;
let (base', len') = baccess a x.rptr_base x.rptr_len in
let h' = HST.get () in
gaccessor_frame g inv.h0 x.rptr_base inv.lwrite h;
gaccessor_frame g inv.h0 x.... | {
"file_name": "examples/layeredeffects/LowParseWriters.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 50,
"end_line": 145,
"start_col": 0,
"start_line": 135
} | (*
Copyright 2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.StrongExcludedMiddle.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure... | [
{
"abbrev": false,
"full_module": "FStar.Monotonic.Pure",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"... | {
"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: LowParseWriters.LowParse.accessor g -> x: LowParseWriters.ptr p1 inv
-> LowParseWriters.read_repr_impl (LowParseWriters.ptr p2 inv)
(Mkclens?.clens_cond lens (LowParseWriters.deref_spec x))
(fun res ->
Mkclens?.clens_cond lens (LowParseWriters.deref_spec x) /\
LowParseWriters.deref_... | Prims.Tot | [
"total"
] | [] | [
"LowParseWriters.LowParse.parser",
"LowParseWriters.LowParse.clens",
"LowParseWriters.LowParse.__proj__Parser__item__t",
"LowParseWriters.memory_invariant",
"LowParseWriters.LowParse.gaccessor",
"LowParseWriters.LowParse.accessor",
"LowParseWriters.ptr",
"Prims.unit",
"LowStar.Buffer.buffer",
"Low... | [] | false | false | false | false | false | let access_impl #p1 #p2 #lens #inv #g a x =
| fun _ ->
let h = HST.get () in
valid_frame p1 inv.h0 x.rptr_base 0ul (B.len x.rptr_base) inv.lwrite h;
let base', len' = baccess a x.rptr_base x.rptr_len in
let h' = HST.get () in
gaccessor_frame g inv.h0 x.rptr_base inv.lwrite h;
gaccessor_frame g inv.h0 x.rptr_base inv.lwrite h';
Correct ({ rptr_base = ... | false |
Steel.ST.CancellableSpinLock.fst | Steel.ST.CancellableSpinLock.acquire | val acquire (#v:vprop) (c:cancellable_lock v)
: STT bool emp (fun b -> maybe_acquired b c) | val acquire (#v:vprop) (c:cancellable_lock v)
: STT bool emp (fun b -> maybe_acquired b c) | let acquire #v c =
acquire c.llock;
let b_erased = elim_exists () in
let b = read c.lref in
if b
then begin
rewrite (if b_erased then v else emp) v;
rewrite (v `star` can_release c)
(maybe_acquired b c)
end
else begin
intro_exists (G.reveal b_erased) (lock_inv_pred c.lref v);
r... | {
"file_name": "lib/steel/Steel.ST.CancellableSpinLock.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 10,
"end_line": 66,
"start_col": 0,
"start_line": 51
} | (*
Copyright 2021 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"Steel.ST.Util.fsti.checked",
"Steel.ST.SpinLock.fsti.checked",
"Steel.ST.Reference.fsti.checked",
"Steel.ST.Effect.fsti.checked",
"Steel.FractionalPermission.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Ghost.fst... | [
{
"abbrev": true,
"full_module": "FStar.Ghost",
"short_module": "G"
},
{
"abbrev": false,
"full_module": "Steel.ST.SpinLock",
"short_module": null
},
{
"abbrev": false,
"full_module": "Steel.ST.Reference",
"short_module": null
},
{
"abbrev": false,
"full_modul... | {
"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 | c: Steel.ST.CancellableSpinLock.cancellable_lock v -> Steel.ST.Effect.STT Prims.bool | Steel.ST.Effect.STT | [] | [] | [
"Steel.Effect.Common.vprop",
"Steel.ST.CancellableSpinLock.cancellable_lock",
"Steel.ST.Util.return",
"Prims.bool",
"FStar.Ghost.hide",
"FStar.Set.set",
"Steel.Memory.iname",
"FStar.Set.empty",
"Steel.ST.CancellableSpinLock.maybe_acquired",
"Prims.unit",
"Steel.ST.Util.rewrite",
"Steel.Effect.... | [] | false | true | false | false | false | let acquire #v c =
| acquire c.llock;
let b_erased = elim_exists () in
let b = read c.lref in
if b
then
(rewrite (if b_erased then v else emp) v;
rewrite (v `star` (can_release c)) (maybe_acquired b c))
else
(intro_exists (G.reveal b_erased) (lock_inv_pred c.lref v);
release c.llock;
rewrite emp (maybe_acquired b c));
retur... | false |
LowParseWriters.fst | LowParseWriters.buffer_sub_impl | val buffer_sub_impl
(#t: Type)
(inv: memory_invariant)
(b: B.buffer t)
(i: U32.t)
(len: Ghost.erased U32.t)
: Tot (read_repr_impl _ _ _ _ inv (buffer_sub_spec inv b i len)) | val buffer_sub_impl
(#t: Type)
(inv: memory_invariant)
(b: B.buffer t)
(i: U32.t)
(len: Ghost.erased U32.t)
: Tot (read_repr_impl _ _ _ _ inv (buffer_sub_spec inv b i len)) | let buffer_sub_impl
#t inv b i len
=
fun _ -> Correct (B.sub b i len) | {
"file_name": "examples/layeredeffects/LowParseWriters.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 34,
"end_line": 87,
"start_col": 0,
"start_line": 84
} | (*
Copyright 2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.StrongExcludedMiddle.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure... | [
{
"abbrev": false,
"full_module": "FStar.Monotonic.Pure",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"... | {
"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 |
inv: LowParseWriters.memory_invariant ->
b: LowStar.Buffer.buffer t ->
i: FStar.UInt32.t ->
len: FStar.Ghost.erased FStar.UInt32.t
-> LowParseWriters.read_repr_impl (LowStar.Buffer.buffer t)
(LowStar.Monotonic.Buffer.live (FStar.Ghost.reveal (Mkmemory_invariant?.h0 inv)) b /\
LowStar.Mo... | Prims.Tot | [
"total"
] | [] | [
"LowParseWriters.memory_invariant",
"LowStar.Buffer.buffer",
"FStar.UInt32.t",
"FStar.Ghost.erased",
"Prims.unit",
"LowParseWriters.Correct",
"LowParseWriters.result",
"LowStar.Buffer.sub",
"LowStar.Monotonic.Buffer.mbuffer",
"LowStar.Buffer.trivial_preorder"
] | [] | false | false | false | false | false | let buffer_sub_impl #t inv b i len =
| fun _ -> Correct (B.sub b i len) | false |
Selectors.LList2.fst | Selectors.LList2.llist_of_llist0 | val llist_of_llist0 (#opened: _) (#a: Type) (r: t a)
: SteelGhost unit
opened
(llist0 r)
(fun _ -> llist r)
(fun _ -> True)
(fun h0 _ h1 -> h1 (llist r) == h0 (llist0 r)) | val llist_of_llist0 (#opened: _) (#a: Type) (r: t a)
: SteelGhost unit
opened
(llist0 r)
(fun _ -> llist r)
(fun _ -> True)
(fun h0 _ h1 -> h1 (llist r) == h0 (llist0 r)) | let llist_of_llist0
(#opened: _)
(#a: Type)
(r: t a)
: SteelGhost unit opened
(llist0 r)
(fun _ -> llist r)
(fun _ -> True)
(fun h0 _ h1 -> h1 (llist r) == h0 (llist0 r))
=
change_slprop_rel
(llist0 r)
(llist r)
(fun x y -> x == y)
(fun _ -> ()) | {
"file_name": "share/steel/examples/steel/Selectors.LList2.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 17,
"end_line": 209,
"start_col": 0,
"start_line": 195
} | module Selectors.LList2
open Steel.FractionalPermission
module Mem = Steel.Memory
#push-options "--__no_positivity"
noeq
type cell (a: Type0) = {
tail_fuel: Ghost.erased nat;
next: ref (cell a);
data: a;
}
#pop-options
let next #a (c:cell a) : t a = c.next
let data #a (c:cell a) : a = c.data
let mk_cell #a (n:... | {
"checked_file": "/",
"dependencies": [
"Steel.Memory.fsti.checked",
"Steel.FractionalPermission.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Ghost.fsti.checked"
],
"interface_file": true,
"source_file": "Selectors.LList2.fst"
} | [
{
"abbrev": true,
"full_module": "Steel.Memory",
"short_module": "Mem"
},
{
"abbrev": false,
"full_module": "Steel.FractionalPermission",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "L"
},
{
"abbrev": false,
"full... | {
"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: Selectors.LList2.t a -> Steel.Effect.Atomic.SteelGhost Prims.unit | Steel.Effect.Atomic.SteelGhost | [] | [] | [
"Steel.Memory.inames",
"Selectors.LList2.t",
"Steel.Effect.Atomic.change_slprop_rel",
"Selectors.LList2.llist0",
"Selectors.LList2.llist",
"Steel.Effect.Common.normal",
"Steel.Effect.Common.t_of",
"Prims.eq2",
"Prims.prop",
"Steel.Memory.mem",
"Prims.unit",
"Steel.Effect.Common.vprop",
"Stee... | [] | false | true | false | false | false | let llist_of_llist0 (#opened: _) (#a: Type) (r: t a)
: SteelGhost unit
opened
(llist0 r)
(fun _ -> llist r)
(fun _ -> True)
(fun h0 _ h1 -> h1 (llist r) == h0 (llist0 r)) =
| change_slprop_rel (llist0 r) (llist r) (fun x y -> x == y) (fun _ -> ()) | false |
LowParseWriters.fst | LowParseWriters.extract_repr_impl | val extract_repr_impl
(a:Type u#x)
(r_in: parser)
(r_out: parser)
(pre: pre_t r_in)
(post: post_t a r_in r_out pre)
(post_err: post_err_t r_in pre)
(l: memory_invariant)
(spec: repr_spec a r_in r_out pre post post_err)
(impl: repr_impl a r_in r_out pre post post_err l spec)
(b: B.buffer u8 { l.lwrit... | val extract_repr_impl
(a:Type u#x)
(r_in: parser)
(r_out: parser)
(pre: pre_t r_in)
(post: post_t a r_in r_out pre)
(post_err: post_err_t r_in pre)
(l: memory_invariant)
(spec: repr_spec a r_in r_out pre post post_err)
(impl: repr_impl a r_in r_out pre post post_err l spec)
(b: B.buffer u8 { l.lwrit... | let extract_repr_impl
a r_in r_out pre post post_err l spec impl
=
impl | {
"file_name": "examples/layeredeffects/LowParseWriters.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 6,
"end_line": 227,
"start_col": 0,
"start_line": 224
} | (*
Copyright 2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.StrongExcludedMiddle.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure... | [
{
"abbrev": false,
"full_module": "FStar.Monotonic.Pure",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"... | {
"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: Type ->
r_in: LowParseWriters.LowParse.parser ->
r_out: LowParseWriters.LowParse.parser ->
pre: LowParseWriters.pre_t r_in ->
post: LowParseWriters.post_t a r_in r_out pre ->
post_err: LowParseWriters.post_err_t r_in pre ->
l: LowParseWriters.memory_invariant ->
spec: LowParseWriters... | FStar.HyperStack.ST.Stack | [] | [] | [
"LowParseWriters.LowParse.parser",
"LowParseWriters.pre_t",
"LowParseWriters.post_t",
"LowParseWriters.post_err_t",
"LowParseWriters.memory_invariant",
"LowParseWriters.repr_spec",
"LowParseWriters.repr_impl",
"LowStar.Buffer.buffer",
"LowParseWriters.LowParse.u8",
"LowStar.Monotonic.Buffer.loc_in... | [] | false | true | false | false | false | let extract_repr_impl a r_in r_out pre post post_err l spec impl =
| impl | false |
LowParseWriters.fst | LowParseWriters.validate_impl | val validate_impl
(#p: parser)
(v: validator p)
(inv: memory_invariant)
(b: B.buffer U8.t)
(len: U32.t { B.len b == len })
: Tot (read_repr_impl _ _ _ _ inv (validate_spec p inv b)) | val validate_impl
(#p: parser)
(v: validator p)
(inv: memory_invariant)
(b: B.buffer U8.t)
(len: U32.t { B.len b == len })
: Tot (read_repr_impl _ _ _ _ inv (validate_spec p inv b)) | let validate_impl
#p v inv b len
= fun _ ->
let h1 = HST.get () in
Classical.forall_intro (valid_frame' p inv.h0 b 0ul inv.lwrite h1);
gvalidate_frame p inv.h0 b inv.lwrite h1;
let res = bvalidate v b len in
let h2 = HST.get () in
Classical.forall_intro (valid_frame' p inv.h0 b 0ul inv.lwrite h2);
gvali... | {
"file_name": "examples/layeredeffects/LowParseWriters.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 20,
"end_line": 193,
"start_col": 0,
"start_line": 178
} | (*
Copyright 2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.StrongExcludedMiddle.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure... | [
{
"abbrev": false,
"full_module": "FStar.Monotonic.Pure",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"... | {
"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: LowParseWriters.LowParse.validator p ->
inv: LowParseWriters.memory_invariant ->
b: LowStar.Buffer.buffer FStar.UInt8.t ->
len: FStar.UInt32.t{LowStar.Monotonic.Buffer.len b == len}
-> LowParseWriters.read_repr_impl (LowParseWriters.ptr p inv * FStar.UInt32.t)
(LowParseWriters.validate_pre i... | Prims.Tot | [
"total"
] | [] | [
"LowParseWriters.LowParse.parser",
"LowParseWriters.LowParse.validator",
"LowParseWriters.memory_invariant",
"LowStar.Buffer.buffer",
"FStar.UInt8.t",
"FStar.UInt32.t",
"Prims.eq2",
"LowStar.Monotonic.Buffer.len",
"LowStar.Buffer.trivial_preorder",
"Prims.unit",
"LowParseWriters.Error",
"FStar... | [] | false | false | false | false | false | let validate_impl #p v inv b len =
| fun _ ->
let h1 = HST.get () in
Classical.forall_intro (valid_frame' p inv.h0 b 0ul inv.lwrite h1);
gvalidate_frame p inv.h0 b inv.lwrite h1;
let res = bvalidate v b len in
let h2 = HST.get () in
Classical.forall_intro (valid_frame' p inv.h0 b 0ul inv.lwrite h2);
gvalidate_frame p inv.h0 b inv.lwrite h2;
... | false |
Metaprogramming.fst | Metaprogramming.my_int | val my_int:int | val my_int:int | let my_int : int = _ by (exact (quote 42)) | {
"file_name": "examples/tactics/eci19/Metaprogramming.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 42,
"end_line": 13,
"start_col": 0,
"start_line": 13
} | module Metaprogramming
open FStar.Tactics.V2
(*
Now, we shall turn to the automated generation of programs. Meta-F*
enables this in much the same way that it allows handling proofs: it
provides the user with a proofstate, a set of hypotheses and goals, and
one uses primitives to solve them. The way to call Meta-F* fo... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": false,
"source_file": "Metaprogramming.fst"
} | [
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FS... | {
"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.int | Prims.Tot | [
"total"
] | [] | [] | [] | false | false | false | true | false | let my_int:int =
| FStar.Tactics.Effect.synth_by_tactic (fun _ -> (exact (quote 42))) | false |
Metaprogramming.fst | Metaprogramming.fancy_id | val fancy_id (x: int) : int | val fancy_id (x: int) : int | let fancy_id : x:int -> int = _ by (let x = intro () in
exact (binding_to_term x)) | {
"file_name": "examples/tactics/eci19/Metaprogramming.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 57,
"end_line": 70,
"start_col": 0,
"start_line": 69
} | module Metaprogramming
open FStar.Tactics.V2
(*
Now, we shall turn to the automated generation of programs. Meta-F*
enables this in much the same way that it allows handling proofs: it
provides the user with a proofstate, a set of hypotheses and goals, and
one uses primitives to solve them. The way to call Meta-F* fo... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": false,
"source_file": "Metaprogramming.fst"
} | [
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FS... | {
"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 | x: Prims.int -> Prims.int | Prims.Tot | [
"total"
] | [] | [
"Prims.int"
] | [] | false | false | false | true | false | let fancy_id: x: int -> int =
| FStar.Tactics.Effect.synth_by_tactic (fun _ ->
(let x = intro () in
exact (binding_to_term x))) | false |
Metaprogramming.fst | Metaprogramming.metasum | val metasum:int | val metasum:int | let metasum : int = _ by (apply (quote (+));
// dump ""; // You should see two new goals here!
exact (`13);
exact (`29)) | {
"file_name": "examples/tactics/eci19/Metaprogramming.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 36,
"end_line": 59,
"start_col": 0,
"start_line": 56
} | module Metaprogramming
open FStar.Tactics.V2
(*
Now, we shall turn to the automated generation of programs. Meta-F*
enables this in much the same way that it allows handling proofs: it
provides the user with a proofstate, a set of hypotheses and goals, and
one uses primitives to solve them. The way to call Meta-F* fo... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": false,
"source_file": "Metaprogramming.fst"
} | [
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FS... | {
"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.int | Prims.Tot | [
"total"
] | [] | [
"Prims.op_Addition"
] | [] | false | false | false | true | false | let metasum:int =
| FStar.Tactics.Effect.synth_by_tactic (fun _ ->
(apply (quote ( + ));
exact (`13);
exact (`29))) | false |
Metaprogramming.fst | Metaprogramming.matchenum | val matchenum: enum -> int | val matchenum: enum -> int | let matchenum : enum -> int =
_ by (let x = intro () in
destruct (binding_to_term x);
ignore (intro ()); exact (`1);
ignore (intro ()); exact (`2);
ignore (intro ()); exact (`3)) | {
"file_name": "examples/tactics/eci19/Metaprogramming.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 38,
"end_line": 104,
"start_col": 0,
"start_line": 99
} | module Metaprogramming
open FStar.Tactics.V2
(*
Now, we shall turn to the automated generation of programs. Meta-F*
enables this in much the same way that it allows handling proofs: it
provides the user with a proofstate, a set of hypotheses and goals, and
one uses primitives to solve them. The way to call Meta-F* fo... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": false,
"source_file": "Metaprogramming.fst"
} | [
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FS... | {
"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 | _: Metaprogramming.enum -> Prims.int | Prims.Tot | [
"total"
] | [] | [
"Metaprogramming.enum",
"Prims.int"
] | [] | false | false | false | true | false | let matchenum: enum -> int =
| FStar.Tactics.Effect.synth_by_tactic (fun _ ->
(let x = intro () in
destruct (binding_to_term x);
ignore (intro ());
exact (`1);
ignore (intro ());
exact (`2);
ignore (intro ());
exact (`3))) | false |
Metaprogramming.fst | Metaprogramming.matcheither | val matcheither: either int int -> int | val matcheither: either int int -> int | let matcheither : either int int -> int =
_ by (let x = intro () in
destruct (binding_to_term x);
let x = intro() in ignore (intro ()); exact (binding_to_term x);
let y = intro() in ignore (intro ()); exact (binding_to_term y)) | {
"file_name": "examples/tactics/eci19/Metaprogramming.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 72,
"end_line": 115,
"start_col": 0,
"start_line": 111
} | module Metaprogramming
open FStar.Tactics.V2
(*
Now, we shall turn to the automated generation of programs. Meta-F*
enables this in much the same way that it allows handling proofs: it
provides the user with a proofstate, a set of hypotheses and goals, and
one uses primitives to solve them. The way to call Meta-F* fo... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": false,
"source_file": "Metaprogramming.fst"
} | [
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FS... | {
"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 | _: Metaprogramming.either Prims.int Prims.int -> Prims.int | Prims.Tot | [
"total"
] | [] | [
"Metaprogramming.either",
"Prims.int"
] | [] | false | false | false | true | false | let matcheither: either int int -> int =
| FStar.Tactics.Effect.synth_by_tactic (fun _ ->
(let x = intro () in
destruct (binding_to_term x);
let x = intro () in
ignore (intro ());
exact (binding_to_term x);
let y = intro () in
ignore (intro ());
exact (binding_to_term y))) | false |
LowParseWriters.fst | LowParseWriters.bind_impl | val bind_impl
(a:Type) (b:Type)
(r_in_f:parser) (r_out_f: parser)
(pre_f: pre_t r_in_f) (post_f: post_t a r_in_f r_out_f pre_f)
(post_err_f: post_err_t r_in_f pre_f)
(r_out_g: parser)
(pre_g: (x:a) -> pre_t (r_out_f)) (post_g: (x:a) -> post_t b (r_out_f) r_out_g (pre_g x))
(post_err_g: (x:a) -> post_err_t... | val bind_impl
(a:Type) (b:Type)
(r_in_f:parser) (r_out_f: parser)
(pre_f: pre_t r_in_f) (post_f: post_t a r_in_f r_out_f pre_f)
(post_err_f: post_err_t r_in_f pre_f)
(r_out_g: parser)
(pre_g: (x:a) -> pre_t (r_out_f)) (post_g: (x:a) -> post_t b (r_out_f) r_out_g (pre_g x))
(post_err_g: (x:a) -> post_err_t... | let bind_impl
a b r_in_f r_out_f pre_f post_f post_err_f r_out_g pre_g post_g post_err_g f_bind_impl g l f' g'
= fun buf len pos ->
match f' buf len pos with
| IError e -> IError e
| IOverflow -> IOverflow
| ICorrect x posf -> g' x buf len posf | {
"file_name": "examples/layeredeffects/LowParseWriters.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 40,
"end_line": 241,
"start_col": 0,
"start_line": 235
} | (*
Copyright 2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.StrongExcludedMiddle.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure... | [
{
"abbrev": false,
"full_module": "FStar.Monotonic.Pure",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"... | {
"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: Type ->
b: Type ->
r_in_f: LowParseWriters.LowParse.parser ->
r_out_f: LowParseWriters.LowParse.parser ->
pre_f: LowParseWriters.pre_t r_in_f ->
post_f: LowParseWriters.post_t a r_in_f r_out_f pre_f ->
post_err_f: LowParseWriters.post_err_t r_in_f pre_f ->
r_out_g: LowParseWriters.Lo... | Prims.Tot | [
"total"
] | [] | [
"LowParseWriters.LowParse.parser",
"LowParseWriters.pre_t",
"LowParseWriters.post_t",
"LowParseWriters.post_err_t",
"LowParseWriters.repr_spec",
"LowParseWriters.memory_invariant",
"LowParseWriters.repr_impl",
"LowStar.Buffer.buffer",
"LowParseWriters.LowParse.u8",
"LowStar.Monotonic.Buffer.loc_in... | [] | false | false | false | false | false | let bind_impl
a
b
r_in_f
r_out_f
pre_f
post_f
post_err_f
r_out_g
pre_g
post_g
post_err_g
f_bind_impl
g
l
f'
g'
=
| fun buf len pos ->
match f' buf len pos with
| IError e -> IError e
| IOverflow -> IOverflow
| ICorrect x posf -> g' x buf len posf | false |
LowParseWriters.fst | LowParseWriters.check_precond_repr | val check_precond_repr
(p1: parser)
(precond: pre_t p1)
(c: check_precond_t p1 precond)
(inv: memory_invariant)
: Tot (repr unit p1 (p1) precond (fun vin _ vout -> vin == vout /\ precond vin) (fun vin -> ~ (precond vin)) inv) | val check_precond_repr
(p1: parser)
(precond: pre_t p1)
(c: check_precond_t p1 precond)
(inv: memory_invariant)
: Tot (repr unit p1 (p1) precond (fun vin _ vout -> vin == vout /\ precond vin) (fun vin -> ~ (precond vin)) inv) | let check_precond_repr
p1 precond c inv
= Repr _ (check_precond_impl p1 precond c inv) | {
"file_name": "examples/layeredeffects/LowParseWriters.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 46,
"end_line": 405,
"start_col": 0,
"start_line": 403
} | (*
Copyright 2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.StrongExcludedMiddle.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure... | [
{
"abbrev": false,
"full_module": "FStar.Monotonic.Pure",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"... | {
"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 |
p1: LowParseWriters.LowParse.parser ->
precond: LowParseWriters.pre_t p1 ->
c: LowParseWriters.check_precond_t p1 precond ->
inv: LowParseWriters.memory_invariant
-> LowParseWriters.repr Prims.unit
p1
p1
precond
(fun vin _ vout -> vin == vout /\ precond vin)
(fun vin -> ... | Prims.Tot | [
"total"
] | [] | [
"LowParseWriters.LowParse.parser",
"LowParseWriters.pre_t",
"LowParseWriters.check_precond_t",
"LowParseWriters.memory_invariant",
"LowParseWriters.Repr",
"Prims.unit",
"LowParseWriters.LowParse.__proj__Parser__item__t",
"Prims.l_and",
"Prims.eq2",
"Prims.l_not",
"LowParseWriters.check_precond_s... | [] | false | false | false | false | false | let check_precond_repr p1 precond c inv =
| Repr _ (check_precond_impl p1 precond c inv) | false |
LowParseWriters.fst | LowParseWriters.lift_read_impl | val lift_read_impl
(a: Type)
(pre: pure_pre)
(post: pure_post' a pre)
(post_err: pure_post_err pre)
(inv: memory_invariant)
(r: parser)
(f_read_spec: read_repr a pre post post_err inv)
: Tot (repr_impl a r (r) _ _ _ inv (lift_read_spec a pre post post_err inv r f_read_spec)) | val lift_read_impl
(a: Type)
(pre: pure_pre)
(post: pure_post' a pre)
(post_err: pure_post_err pre)
(inv: memory_invariant)
(r: parser)
(f_read_spec: read_repr a pre post post_err inv)
: Tot (repr_impl a r (r) _ _ _ inv (lift_read_spec a pre post post_err inv r f_read_spec)) | let lift_read_impl
a pre post post_err inv r f_read_spec
=
fun b len pos ->
let h = HST.get () in
match ReadRepr?.impl f_read_spec () with
| Correct res ->
let h' = HST.get () in
valid_frame r h b 0ul pos B.loc_none h';
ICorrect res pos
| Error e ->
IError e | {
"file_name": "examples/layeredeffects/LowParseWriters.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 14,
"end_line": 269,
"start_col": 0,
"start_line": 258
} | (*
Copyright 2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.StrongExcludedMiddle.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure... | [
{
"abbrev": false,
"full_module": "FStar.Monotonic.Pure",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"... | {
"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: Type ->
pre: Prims.pure_pre ->
post: LowParseWriters.pure_post' a pre ->
post_err: LowParseWriters.pure_post_err pre ->
inv: LowParseWriters.memory_invariant ->
r: LowParseWriters.LowParse.parser ->
f_read_spec: LowParseWriters.read_repr a pre post post_err inv
-> LowParseWriters.repr_... | Prims.Tot | [
"total"
] | [] | [
"Prims.pure_pre",
"LowParseWriters.pure_post'",
"LowParseWriters.pure_post_err",
"LowParseWriters.memory_invariant",
"LowParseWriters.LowParse.parser",
"LowParseWriters.read_repr",
"LowStar.Buffer.buffer",
"LowParseWriters.LowParse.u8",
"LowStar.Monotonic.Buffer.loc_includes",
"FStar.Ghost.reveal"... | [] | false | false | false | false | false | let lift_read_impl a pre post post_err inv r f_read_spec =
| fun b len pos ->
let h = HST.get () in
match ReadRepr?.impl f_read_spec () with
| Correct res ->
let h' = HST.get () in
valid_frame r h b 0ul pos B.loc_none h';
ICorrect res pos
| Error e -> IError e | false |
LowParseWriters.fst | LowParseWriters.wfailwith_impl | val wfailwith_impl
(a: Type)
(inv: memory_invariant)
(rin rout: parser)
(s: string)
: Tot (repr_impl a rin rout (fun _ -> True) (fun _ _ _ -> False) (fun _ -> True) inv (wfailwith_spec a rin rout s)) | val wfailwith_impl
(a: Type)
(inv: memory_invariant)
(rin rout: parser)
(s: string)
: Tot (repr_impl a rin rout (fun _ -> True) (fun _ _ _ -> False) (fun _ -> True) inv (wfailwith_spec a rin rout s)) | let wfailwith_impl
a inv rin rout s
=
fun b len pos ->
IError s | {
"file_name": "examples/layeredeffects/LowParseWriters.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 10,
"end_line": 275,
"start_col": 0,
"start_line": 271
} | (*
Copyright 2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.StrongExcludedMiddle.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure... | [
{
"abbrev": false,
"full_module": "FStar.Monotonic.Pure",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"... | {
"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: Type ->
inv: LowParseWriters.memory_invariant ->
rin: LowParseWriters.LowParse.parser ->
rout: LowParseWriters.LowParse.parser ->
s: Prims.string
-> LowParseWriters.repr_impl a
rin
rout
(fun _ -> Prims.l_True)
(fun _ _ _ -> Prims.l_False)
(fun _ -> Prims.l_True)
... | Prims.Tot | [
"total"
] | [] | [
"LowParseWriters.memory_invariant",
"LowParseWriters.LowParse.parser",
"Prims.string",
"LowStar.Buffer.buffer",
"LowParseWriters.LowParse.u8",
"LowStar.Monotonic.Buffer.loc_includes",
"FStar.Ghost.reveal",
"LowStar.Monotonic.Buffer.loc",
"LowParseWriters.__proj__Mkmemory_invariant__item__lwrite",
... | [] | false | false | false | false | false | let wfailwith_impl a inv rin rout s =
| fun b len pos -> IError s | false |
LowParseWriters.fst | LowParseWriters.subcomp_impl | val subcomp_impl (a:Type)
(r_in:parser) (r_out: parser)
(pre: pre_t r_in) (post: post_t a r_in r_out pre) (post_err: post_err_t r_in pre)
(l:memory_invariant)
(r_in':parser) (r_out': parser)
(pre': pre_t r_in) (post': post_t a r_in r_out pre') (post_err': post_err_t r_in pre')
(l' : memory_invariant)
(f... | val subcomp_impl (a:Type)
(r_in:parser) (r_out: parser)
(pre: pre_t r_in) (post: post_t a r_in r_out pre) (post_err: post_err_t r_in pre)
(l:memory_invariant)
(r_in':parser) (r_out': parser)
(pre': pre_t r_in) (post': post_t a r_in r_out pre') (post_err': post_err_t r_in pre')
(l' : memory_invariant)
(f... | let subcomp_impl
a r_in r_out pre post post_err l r_in' r_out' pre' post' post_err' l' f_subcomp_spec f_subcomp sq
: Tot (repr_impl a r_in r_out pre' post' post_err' l' (subcomp_spec a r_in r_out pre post post_err pre' post' post_err' f_subcomp_spec))
= (fun b len pos -> f_subcomp b len pos) | {
"file_name": "examples/layeredeffects/LowParseWriters.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 40,
"end_line": 247,
"start_col": 0,
"start_line": 244
} | (*
Copyright 2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.StrongExcludedMiddle.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure... | [
{
"abbrev": false,
"full_module": "FStar.Monotonic.Pure",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"... | {
"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: Type ->
r_in: LowParseWriters.LowParse.parser ->
r_out: LowParseWriters.LowParse.parser ->
pre: LowParseWriters.pre_t r_in ->
post: LowParseWriters.post_t a r_in r_out pre ->
post_err: LowParseWriters.post_err_t r_in pre ->
l: LowParseWriters.memory_invariant ->
r_in': LowParseWriter... | Prims.Tot | [
"total"
] | [] | [
"LowParseWriters.LowParse.parser",
"LowParseWriters.pre_t",
"LowParseWriters.post_t",
"LowParseWriters.post_err_t",
"LowParseWriters.memory_invariant",
"LowParseWriters.repr_spec",
"LowParseWriters.repr_impl",
"Prims.squash",
"LowParseWriters.subcomp_cond",
"LowStar.Buffer.buffer",
"LowParseWrit... | [] | false | false | false | false | false | let subcomp_impl
a
r_in
r_out
pre
post
post_err
l
r_in'
r_out'
pre'
post'
post_err'
l'
f_subcomp_spec
f_subcomp
sq
: Tot
(repr_impl a
r_in
r_out
pre'
post'
post_err'
l'... | (fun b len pos -> f_subcomp b len pos) | false |
LowParseWriters.fst | LowParseWriters.get_state_impl | val get_state_impl
(inv: memory_invariant)
(p: parser)
: Tot (repr_impl _ _ _ _ _ _ inv (get_state_spec p)) | val get_state_impl
(inv: memory_invariant)
(p: parser)
: Tot (repr_impl _ _ _ _ _ _ inv (get_state_spec p)) | let get_state_impl
inv p
=
fun b len pos ->
let h = HST.get () in
ICorrect (Ghost.hide (contents p h b 0ul pos)) pos | {
"file_name": "examples/layeredeffects/LowParseWriters.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 54,
"end_line": 282,
"start_col": 0,
"start_line": 277
} | (*
Copyright 2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.StrongExcludedMiddle.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure... | [
{
"abbrev": false,
"full_module": "FStar.Monotonic.Pure",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"... | {
"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 | inv: LowParseWriters.memory_invariant -> p: LowParseWriters.LowParse.parser
-> LowParseWriters.repr_impl (FStar.Ghost.erased (Parser?.t p))
p
p
(fun _ -> Prims.l_True)
(fun x y z -> x == FStar.Ghost.reveal y /\ x == z)
(fun _ -> Prims.l_False)
inv
(LowParseWriters.get_state_s... | Prims.Tot | [
"total"
] | [] | [
"LowParseWriters.memory_invariant",
"LowParseWriters.LowParse.parser",
"LowStar.Buffer.buffer",
"LowParseWriters.LowParse.u8",
"LowStar.Monotonic.Buffer.loc_includes",
"FStar.Ghost.reveal",
"LowStar.Monotonic.Buffer.loc",
"LowParseWriters.__proj__Mkmemory_invariant__item__lwrite",
"LowStar.Monotonic... | [] | false | false | false | false | false | let get_state_impl inv p =
| fun b len pos ->
let h = HST.get () in
ICorrect (Ghost.hide (contents p h b 0ul pos)) pos | false |
LowParseWriters.fst | LowParseWriters.valid_rewrite_impl | val valid_rewrite_impl
(p1: parser)
(p2: parser)
(precond: pre_t p1)
(f: (x: Parser?.t p1 { precond x }) -> GTot (Parser?.t p2))
(v: valid_rewrite_t p1 p2 precond f)
(inv: memory_invariant)
: Tot (repr_impl unit p1 (p2) precond (fun vin _ vout -> precond vin /\ f vin == vout) (fun _ -> False) inv (valid_rew... | val valid_rewrite_impl
(p1: parser)
(p2: parser)
(precond: pre_t p1)
(f: (x: Parser?.t p1 { precond x }) -> GTot (Parser?.t p2))
(v: valid_rewrite_t p1 p2 precond f)
(inv: memory_invariant)
: Tot (repr_impl unit p1 (p2) precond (fun vin _ vout -> precond vin /\ f vin == vout) (fun _ -> False) inv (valid_rew... | let valid_rewrite_impl
p1 p2 precond f v inv
=
fun buf len pos ->
let h = HST.get () in
v.valid_rewrite_valid h buf 0ul pos;
ICorrect () pos | {
"file_name": "examples/layeredeffects/LowParseWriters.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 19,
"end_line": 370,
"start_col": 0,
"start_line": 364
} | (*
Copyright 2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.StrongExcludedMiddle.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure... | [
{
"abbrev": false,
"full_module": "FStar.Monotonic.Pure",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"... | {
"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 |
p1: LowParseWriters.LowParse.parser ->
p2: LowParseWriters.LowParse.parser ->
precond: LowParseWriters.pre_t p1 ->
f: (x: Parser?.t p1 {precond x} -> Prims.GTot (Parser?.t p2)) ->
v: LowParseWriters.valid_rewrite_t p1 p2 precond f ->
inv: LowParseWriters.memory_invariant
-> LowParseWriters.re... | Prims.Tot | [
"total"
] | [] | [
"LowParseWriters.LowParse.parser",
"LowParseWriters.pre_t",
"LowParseWriters.LowParse.__proj__Parser__item__t",
"LowParseWriters.valid_rewrite_t",
"LowParseWriters.memory_invariant",
"LowStar.Buffer.buffer",
"LowParseWriters.LowParse.u8",
"LowStar.Monotonic.Buffer.loc_includes",
"FStar.Ghost.reveal"... | [] | false | false | false | false | false | let valid_rewrite_impl p1 p2 precond f v inv =
| fun buf len pos ->
let h = HST.get () in
v.valid_rewrite_valid h buf 0ul pos;
ICorrect () pos | false |
LowParseWriters.fst | LowParseWriters.check_precond_spec | val check_precond_spec (p1: parser) (precond: pre_t p1)
: Tot
(repr_spec unit
p1
(p1)
precond
(fun vin _ vout -> vin == vout /\ precond vin)
(fun vin -> ~(precond vin))) | val check_precond_spec (p1: parser) (precond: pre_t p1)
: Tot
(repr_spec unit
p1
(p1)
precond
(fun vin _ vout -> vin == vout /\ precond vin)
(fun vin -> ~(precond vin))) | let check_precond_spec
(p1: parser)
(precond: pre_t p1)
: Tot (repr_spec unit p1 (p1) precond (fun vin _ vout -> vin == vout /\ precond vin) (fun vin -> ~ (precond vin)))
= fun vin ->
if FStar.StrongExcludedMiddle.strong_excluded_middle (precond vin)
then Correct ((), vin)
else Error "check_precond failed" | {
"file_name": "examples/layeredeffects/LowParseWriters.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 35,
"end_line": 385,
"start_col": 0,
"start_line": 378
} | (*
Copyright 2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.StrongExcludedMiddle.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure... | [
{
"abbrev": false,
"full_module": "FStar.Monotonic.Pure",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full... | {
"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 | p1: LowParseWriters.LowParse.parser -> precond: LowParseWriters.pre_t p1
-> LowParseWriters.repr_spec Prims.unit
p1
p1
precond
(fun vin _ vout -> vin == vout /\ precond vin)
(fun vin -> ~(precond vin)) | Prims.Tot | [
"total"
] | [] | [
"LowParseWriters.LowParse.parser",
"LowParseWriters.pre_t",
"LowParseWriters.LowParse.__proj__Parser__item__t",
"FStar.StrongExcludedMiddle.strong_excluded_middle",
"LowParseWriters.Correct",
"FStar.Pervasives.Native.tuple2",
"Prims.unit",
"FStar.Pervasives.Native.Mktuple2",
"Prims.bool",
"LowPars... | [] | false | false | false | false | false | let check_precond_spec (p1: parser) (precond: pre_t p1)
: Tot
(repr_spec unit
p1
(p1)
precond
(fun vin _ vout -> vin == vout /\ precond vin)
(fun vin -> ~(precond vin))) =
| fun vin ->
if FStar.StrongExcludedMiddle.strong_excluded_middle (precond vin)
then Correct ((), vin)
else Error "check_precond failed" | false |
LowParseWriters.fst | LowParseWriters.cast | val cast
(p1: parser)
(p2: parser)
(precond: pre_t p1)
(f: (x: Parser?.t p1 { precond x }) -> GTot (Parser?.t p2))
(v: valid_rewrite_t p1 p2 precond f)
(inv: memory_invariant)
(x1: ptr p1 inv { precond (deref_spec x1) })
: Tot (x2: ptr p2 inv {
deref_spec x2 == f (deref_spec x1)
}) | val cast
(p1: parser)
(p2: parser)
(precond: pre_t p1)
(f: (x: Parser?.t p1 { precond x }) -> GTot (Parser?.t p2))
(v: valid_rewrite_t p1 p2 precond f)
(inv: memory_invariant)
(x1: ptr p1 inv { precond (deref_spec x1) })
: Tot (x2: ptr p2 inv {
deref_spec x2 == f (deref_spec x1)
}) | let cast
p1 p2 precond f v inv x1
=
v.valid_rewrite_valid inv.h0 x1.rptr_base 0ul x1.rptr_len;
x1 | {
"file_name": "examples/layeredeffects/LowParseWriters.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 4,
"end_line": 376,
"start_col": 0,
"start_line": 372
} | (*
Copyright 2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.StrongExcludedMiddle.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure... | [
{
"abbrev": false,
"full_module": "FStar.Monotonic.Pure",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"... | {
"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 |
p1: LowParseWriters.LowParse.parser ->
p2: LowParseWriters.LowParse.parser ->
precond: LowParseWriters.pre_t p1 ->
f: (x: Parser?.t p1 {precond x} -> Prims.GTot (Parser?.t p2)) ->
v: LowParseWriters.valid_rewrite_t p1 p2 precond f ->
inv: LowParseWriters.memory_invariant ->
x1: LowParseWrit... | Prims.Tot | [
"total"
] | [] | [
"LowParseWriters.LowParse.parser",
"LowParseWriters.pre_t",
"LowParseWriters.LowParse.__proj__Parser__item__t",
"LowParseWriters.valid_rewrite_t",
"LowParseWriters.memory_invariant",
"LowParseWriters.ptr",
"LowParseWriters.deref_spec",
"Prims.unit",
"LowParseWriters.__proj__Mkvalid_rewrite_t__item__... | [] | false | false | false | false | false | let cast p1 p2 precond f v inv x1 =
| v.valid_rewrite_valid inv.h0 x1.rptr_base 0ul x1.rptr_len;
x1 | false |
LowParseWriters.fst | LowParseWriters.elem_writer_impl | val elem_writer_impl
(#p: parser)
(w: leaf_writer p)
(l: memory_invariant)
(x: Parser?.t p)
: Tot (repr_impl unit parse_empty (p) (fun _ -> True) (fun _ _ y -> y == x) (fun _ -> False) l (elem_writer_spec p x)) | val elem_writer_impl
(#p: parser)
(w: leaf_writer p)
(l: memory_invariant)
(x: Parser?.t p)
: Tot (repr_impl unit parse_empty (p) (fun _ -> True) (fun _ _ y -> y == x) (fun _ -> False) l (elem_writer_spec p x)) | let elem_writer_impl
#p w l x
=
fun b len pos ->
let b' = B.offset b pos in
match w b' (len `U32.sub` pos) x with
| None -> IOverflow
| Some xlen -> ICorrect () (pos `U32.add` xlen) | {
"file_name": "examples/layeredeffects/LowParseWriters.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 49,
"end_line": 318,
"start_col": 0,
"start_line": 311
} | (*
Copyright 2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.StrongExcludedMiddle.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure... | [
{
"abbrev": false,
"full_module": "FStar.Monotonic.Pure",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"... | {
"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 | w: LowParseWriters.LowParse.leaf_writer p -> l: LowParseWriters.memory_invariant -> x: Parser?.t p
-> LowParseWriters.repr_impl Prims.unit
LowParseWriters.LowParse.parse_empty
p
(fun _ -> Prims.l_True)
(fun _ _ y -> y == x)
(fun _ -> Prims.l_False)
l
(LowParseWriters.elem_wri... | Prims.Tot | [
"total"
] | [] | [
"LowParseWriters.LowParse.parser",
"LowParseWriters.LowParse.leaf_writer",
"LowParseWriters.memory_invariant",
"LowParseWriters.LowParse.__proj__Parser__item__t",
"LowStar.Buffer.buffer",
"LowParseWriters.LowParse.u8",
"LowStar.Monotonic.Buffer.loc_includes",
"FStar.Ghost.reveal",
"LowStar.Monotonic... | [] | false | false | false | false | false | let elem_writer_impl #p w l x =
| fun b len pos ->
let b' = B.offset b pos in
match w b' (len `U32.sub` pos) x with
| None -> IOverflow
| Some xlen -> ICorrect () (pos `U32.add` xlen) | false |
LowParseWriters.fst | LowParseWriters.check_precond_impl | val check_precond_impl
(p1: parser)
(precond: pre_t p1)
(c: check_precond_t p1 precond)
(inv: memory_invariant)
: Tot
(repr_impl unit
p1
(p1)
precond
(fun vin _ vout -> vin == vout /\ precond vin)
(fun vin -> ~(precond vin))
inv
(ch... | val check_precond_impl
(p1: parser)
(precond: pre_t p1)
(c: check_precond_t p1 precond)
(inv: memory_invariant)
: Tot
(repr_impl unit
p1
(p1)
precond
(fun vin _ vout -> vin == vout /\ precond vin)
(fun vin -> ~(precond vin))
inv
(ch... | let check_precond_impl
(p1: parser)
(precond: pre_t p1)
(c: check_precond_t p1 precond)
(inv: memory_invariant)
: Tot (repr_impl unit p1 (p1) precond (fun vin _ vout -> vin == vout /\ precond vin) (fun vin -> ~ (precond vin)) inv (check_precond_spec p1 precond))
= fun b len pos ->
let h = HST.get () in
if c... | {
"file_name": "examples/layeredeffects/LowParseWriters.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 36,
"end_line": 401,
"start_col": 0,
"start_line": 388
} | (*
Copyright 2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.StrongExcludedMiddle.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure... | [
{
"abbrev": false,
"full_module": "FStar.Monotonic.Pure",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full... | {
"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 |
p1: LowParseWriters.LowParse.parser ->
precond: LowParseWriters.pre_t p1 ->
c: LowParseWriters.check_precond_t p1 precond ->
inv: LowParseWriters.memory_invariant
-> LowParseWriters.repr_impl Prims.unit
p1
p1
precond
(fun vin _ vout -> vin == vout /\ precond vin)
(fun vi... | Prims.Tot | [
"total"
] | [] | [
"LowParseWriters.LowParse.parser",
"LowParseWriters.pre_t",
"LowParseWriters.check_precond_t",
"LowParseWriters.memory_invariant",
"LowStar.Buffer.buffer",
"LowParseWriters.LowParse.u8",
"LowStar.Monotonic.Buffer.loc_includes",
"FStar.Ghost.reveal",
"LowStar.Monotonic.Buffer.loc",
"LowParseWriters... | [] | false | false | false | false | false | let check_precond_impl
(p1: parser)
(precond: pre_t p1)
(c: check_precond_t p1 precond)
(inv: memory_invariant)
: Tot
(repr_impl unit
p1
(p1)
precond
(fun vin _ vout -> vin == vout /\ precond vin)
(fun vin -> ~(precond vin))
inv
(ch... | fun b len pos ->
let h = HST.get () in
if c b len 0ul pos
then
let h' = HST.get () in
let _ = valid_frame p1 h b 0ul pos B.loc_none h' in
ICorrect () pos
else IError "check_precond failed" | false |
LowParseWriters.fst | LowParseWriters.cat_impl | val cat_impl
(#inv: memory_invariant)
(#p: parser)
(x: ptr p inv)
: Tot (repr_impl _ _ _ _ _ _ inv (cat_spec x)) | val cat_impl
(#inv: memory_invariant)
(#p: parser)
(x: ptr p inv)
: Tot (repr_impl _ _ _ _ _ _ inv (cat_spec x)) | let cat_impl
#inv #p x
=
fun b len _ ->
if len `U32.lt` x.rptr_len
then
IOverflow
else begin
B.blit x.rptr_base 0ul b 0ul x.rptr_len;
let h' = HST.get () in
valid_ext p inv.h0 x.rptr_base 0ul x.rptr_len h' b 0ul x.rptr_len;
ICorrect () x.rptr_len
end | {
"file_name": "examples/layeredeffects/LowParseWriters.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 5,
"end_line": 419,
"start_col": 0,
"start_line": 407
} | (*
Copyright 2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.StrongExcludedMiddle.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure... | [
{
"abbrev": false,
"full_module": "FStar.Monotonic.Pure",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"... | {
"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 | x: LowParseWriters.ptr p inv
-> LowParseWriters.repr_impl Prims.unit
LowParseWriters.LowParse.parse_empty
p
(fun _ -> Prims.l_True)
(fun _ _ vout -> vout == LowParseWriters.deref_spec x)
(fun _ -> Prims.l_False)
inv
(LowParseWriters.cat_spec x) | Prims.Tot | [
"total"
] | [] | [
"LowParseWriters.memory_invariant",
"LowParseWriters.LowParse.parser",
"LowParseWriters.ptr",
"LowStar.Buffer.buffer",
"LowParseWriters.LowParse.u8",
"LowStar.Monotonic.Buffer.loc_includes",
"FStar.Ghost.reveal",
"LowStar.Monotonic.Buffer.loc",
"LowParseWriters.__proj__Mkmemory_invariant__item__lwri... | [] | false | false | false | false | false | let cat_impl #inv #p x =
| fun b len _ ->
if len `U32.lt` x.rptr_len
then IOverflow
else
(B.blit x.rptr_base 0ul b 0ul x.rptr_len;
let h' = HST.get () in
valid_ext p inv.h0 x.rptr_base 0ul x.rptr_len h' b 0ul x.rptr_len;
ICorrect () x.rptr_len) | false |
LowParse.Spec.Bytes.fst | LowParse.Spec.Bytes.serialize_flbytes' | val serialize_flbytes' (sz: nat{sz < 4294967296}) : Tot (bare_serializer (B32.lbytes sz)) | val serialize_flbytes' (sz: nat{sz < 4294967296}) : Tot (bare_serializer (B32.lbytes sz)) | let serialize_flbytes'
(sz: nat { sz < 4294967296 } )
: Tot (bare_serializer (B32.lbytes sz))
= fun (x: B32.lbytes sz) -> (
lt_pow2_32 sz;
B32.reveal x
) | {
"file_name": "src/lowparse/LowParse.Spec.Bytes.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 3,
"end_line": 36,
"start_col": 0,
"start_line": 30
} | module LowParse.Spec.Bytes
include LowParse.Spec.VLGen
module B32 = LowParse.Bytes32
module Seq = FStar.Seq
module U32 = FStar.UInt32
#set-options "--z3rlimit 128 --max_fuel 64 --max_ifuel 64"
let lt_pow2_32
(x: nat)
: Lemma
(x < 4294967296 <==> x < pow2 32)
= ()
#reset-options
let parse_flbytes_gen
(sz: nat... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.VLGen.fst.checked",
"LowParse.Bytes32.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.fsti.checked... | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module": "LowParse.Bytes32",
"short_module": "B32"
},
{
"abbrev": false,
"full_module": "Lo... | {
"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 | sz: Prims.nat{sz < 4294967296} -> LowParse.Spec.Base.bare_serializer (FStar.Bytes.lbytes sz) | Prims.Tot | [
"total"
] | [] | [
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"FStar.Bytes.lbytes",
"FStar.Bytes.reveal",
"Prims.unit",
"LowParse.Spec.Bytes.lt_pow2_32",
"LowParse.Bytes.bytes",
"LowParse.Spec.Base.bare_serializer"
] | [] | false | false | false | false | false | let serialize_flbytes' (sz: nat{sz < 4294967296}) : Tot (bare_serializer (B32.lbytes sz)) =
| fun (x: B32.lbytes sz) ->
(lt_pow2_32 sz;
B32.reveal x) | false |
LowParseWriters.fst | LowParseWriters.recast_writer_impl | val recast_writer_impl
(a:Type u#x)
(r_in: parser)
(r_out: parser)
(pre: pre_t r_in)
(post: post_t a r_in r_out pre)
(post_err: post_err_t r_in pre)
(l: memory_invariant)
(f: unit -> EWrite a r_in r_out pre post post_err l)
: Tot (repr_impl a r_in r_out pre (recast_writer_post a r_in r_out pre post post... | val recast_writer_impl
(a:Type u#x)
(r_in: parser)
(r_out: parser)
(pre: pre_t r_in)
(post: post_t a r_in r_out pre)
(post_err: post_err_t r_in pre)
(l: memory_invariant)
(f: unit -> EWrite a r_in r_out pre post post_err l)
: Tot (repr_impl a r_in r_out pre (recast_writer_post a r_in r_out pre post post... | let recast_writer_impl
(a:Type u#x)
(r_in: parser)
(r_out: parser)
(pre: pre_t r_in)
(post: post_t a r_in r_out pre)
(post_err: post_err_t r_in pre)
(l: memory_invariant)
(f: unit -> EWrite a r_in r_out pre post post_err l)
: Tot (repr_impl a r_in r_out pre (recast_writer_post a r_in r_out pre post post... | {
"file_name": "examples/layeredeffects/LowParseWriters.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 79,
"end_line": 331,
"start_col": 0,
"start_line": 321
} | (*
Copyright 2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.StrongExcludedMiddle.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure... | [
{
"abbrev": false,
"full_module": "FStar.Monotonic.Pure",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"... | {
"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: Type ->
r_in: LowParseWriters.LowParse.parser ->
r_out: LowParseWriters.LowParse.parser ->
pre: LowParseWriters.pre_t r_in ->
post: LowParseWriters.post_t a r_in r_out pre ->
post_err: LowParseWriters.post_err_t r_in pre ->
l: LowParseWriters.memory_invariant ->
f: (_: Prims.unit -> ... | Prims.Tot | [
"total"
] | [] | [
"LowParseWriters.LowParse.parser",
"LowParseWriters.pre_t",
"LowParseWriters.post_t",
"LowParseWriters.post_err_t",
"LowParseWriters.memory_invariant",
"Prims.unit",
"LowStar.Buffer.buffer",
"LowParseWriters.LowParse.u8",
"LowStar.Monotonic.Buffer.loc_includes",
"FStar.Ghost.reveal",
"LowStar.Mo... | [] | false | false | false | false | false | let recast_writer_impl
(a: Type u#x)
(r_in r_out: parser)
(pre: pre_t r_in)
(post: post_t a r_in r_out pre)
(post_err: post_err_t r_in pre)
(l: memory_invariant)
(f: (unit -> EWrite a r_in r_out pre post post_err l))
: Tot
(repr_impl a
r_in
r_out
... | fun b len pos -> destr_repr_impl a r_in r_out pre post post_err l f b len pos | false |
LowParseWriters.fst | LowParseWriters.frame2_impl | val frame2_impl
(a: Type)
(frame: parser)
(ppre: parser)
(pre: pre_t ppre)
(p: parser)
(post: post_t a ppre p pre)
(post_err: post_err_t ppre pre)
(l: memory_invariant)
(inner: unit -> EWrite a ppre p pre post post_err l)
: Tot (repr_impl a (frame `parse_pair` ppre) (frame_out a frame p) (frame2_pre f... | val frame2_impl
(a: Type)
(frame: parser)
(ppre: parser)
(pre: pre_t ppre)
(p: parser)
(post: post_t a ppre p pre)
(post_err: post_err_t ppre pre)
(l: memory_invariant)
(inner: unit -> EWrite a ppre p pre post post_err l)
: Tot (repr_impl a (frame `parse_pair` ppre) (frame_out a frame p) (frame2_pre f... | let frame2_impl
a frame ppre pre p post post_err l inner
= fun buf len pos ->
let h = HST.get () in
let pos2 = valid_parse_pair_inv frame ppre buf len 0ul pos in
let buf' = B.offset buf pos2 in
assert (valid_pos ppre h buf pos2 pos);
assert (valid_pos ppre h buf' 0ul (pos `U32.sub` pos2));
let h1 = HST.ge... | {
"file_name": "examples/layeredeffects/LowParseWriters.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 19,
"end_line": 358,
"start_col": 0,
"start_line": 338
} | (*
Copyright 2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.StrongExcludedMiddle.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure... | [
{
"abbrev": false,
"full_module": "FStar.Monotonic.Pure",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 8,
"max_fuel": 8,
"max_ifuel": 8,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
a: Type ->
frame: LowParseWriters.LowParse.parser ->
ppre: LowParseWriters.LowParse.parser ->
pre: LowParseWriters.pre_t ppre ->
p: LowParseWriters.LowParse.parser ->
post: LowParseWriters.post_t a ppre p pre ->
post_err: LowParseWriters.post_err_t ppre pre ->
l: LowParseWriters.memory_... | Prims.Tot | [
"total"
] | [] | [
"LowParseWriters.LowParse.parser",
"LowParseWriters.pre_t",
"LowParseWriters.post_t",
"LowParseWriters.post_err_t",
"LowParseWriters.memory_invariant",
"Prims.unit",
"LowStar.Buffer.buffer",
"LowParseWriters.LowParse.u8",
"LowStar.Monotonic.Buffer.loc_includes",
"FStar.Ghost.reveal",
"LowStar.Mo... | [] | false | false | false | false | false | let frame2_impl a frame ppre pre p post post_err l inner =
| fun buf len pos ->
let h = HST.get () in
let pos2 = valid_parse_pair_inv frame ppre buf len 0ul pos in
let buf' = B.offset buf pos2 in
assert (valid_pos ppre h buf pos2 pos);
assert (valid_pos ppre h buf' 0ul (pos `U32.sub` pos2));
let h1 = HST.get () in
valid_frame ppre h buf' 0ul (pos `U32.sub` pos2) B.... | false |
Hacl.Impl.Frodo.Gen.fst | Hacl.Impl.Frodo.Gen.frodo_gen_matrix_shake0 | val frodo_gen_matrix_shake0:
n:size_t{v n * v n <= max_size_t /\ 2 * v n <= max_size_t}
-> i:size_t{v i < v n}
-> r:lbytes (size 2 *! n)
-> j:size_t{v j < v n}
-> res:matrix_t n n
-> Stack unit
(requires fun h -> live h r /\ live h res)
(ensures fun h0 _ h1 -> modifies1 res h0 h1 /\
as_matr... | val frodo_gen_matrix_shake0:
n:size_t{v n * v n <= max_size_t /\ 2 * v n <= max_size_t}
-> i:size_t{v i < v n}
-> r:lbytes (size 2 *! n)
-> j:size_t{v j < v n}
-> res:matrix_t n n
-> Stack unit
(requires fun h -> live h r /\ live h res)
(ensures fun h0 _ h1 -> modifies1 res h0 h1 /\
as_matr... | let frodo_gen_matrix_shake0 n i r j res =
let resij = sub r (size 2 *! j) (size 2) in
mset res i j (uint_from_bytes_le resij) | {
"file_name": "code/frodo/Hacl.Impl.Frodo.Gen.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 41,
"end_line": 41,
"start_col": 0,
"start_line": 39
} | module Hacl.Impl.Frodo.Gen
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open LowStar.Buffer
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
open Hacl.Impl.Matrix
module ST = FStar.HyperStack.ST
module B = LowStar.Buffer
module LSeq = Lib.Sequence
module BSeq = Lib.ByteSequence
module Loops =... | {
"checked_file": "/",
"dependencies": [
"Spec.Frodo.Lemmas.fst.checked",
"Spec.Frodo.Gen.fst.checked",
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.Loops.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.... | [
{
"abbrev": true,
"full_module": "Hacl.SHA3",
"short_module": "SHA3"
},
{
"abbrev": true,
"full_module": "Spec.Frodo.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Frodo.Gen",
"short_module": "S"
},
{
"abbrev": true,
"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 |
n:
Lib.IntTypes.size_t
{ Lib.IntTypes.v n * Lib.IntTypes.v n <= Lib.IntTypes.max_size_t /\
2 * Lib.IntTypes.v n <= Lib.IntTypes.max_size_t } ->
i: Lib.IntTypes.size_t{Lib.IntTypes.v i < Lib.IntTypes.v n} ->
r: Hacl.Impl.Matrix.lbytes (Lib.IntTypes.size 2 *! n) ->
j: Lib.IntTypes... | FStar.HyperStack.ST.Stack | [] | [] | [
"Lib.IntTypes.size_t",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"FStar.Mul.op_Star",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Lib.IntTypes.max_size_t",
"Prims.op_LessThan",
"Hacl.Impl.Matrix.lbytes",
"Lib.IntTypes.op_Star_Bang",
"Lib.IntTypes.size",
"Hacl.I... | [] | false | true | false | false | false | let frodo_gen_matrix_shake0 n i r j res =
| let resij = sub r (size 2 *! j) (size 2) in
mset res i j (uint_from_bytes_le resij) | false |
LowParseWriters.fst | LowParseWriters.frame_impl | val frame_impl
(a: Type)
(frame: parser)
(pre: pre_t parse_empty)
(p: parser)
(post: post_t a parse_empty p pre)
(post_err: post_err_t parse_empty pre)
(l: memory_invariant)
(inner: unit -> EWrite a parse_empty p pre post post_err l)
: Tot (repr_impl a frame (frame_out a frame p) (frame_pre frame pre) (... | val frame_impl
(a: Type)
(frame: parser)
(pre: pre_t parse_empty)
(p: parser)
(post: post_t a parse_empty p pre)
(post_err: post_err_t parse_empty pre)
(l: memory_invariant)
(inner: unit -> EWrite a parse_empty p pre post post_err l)
: Tot (repr_impl a frame (frame_out a frame p) (frame_pre frame pre) (... | let frame_impl
(a: Type)
(frame: parser)
(pre: pre_t parse_empty)
(p: parser)
(post: post_t a parse_empty p pre)
(post_err: post_err_t parse_empty pre)
(l: memory_invariant)
(inner: unit -> EWrite a parse_empty p pre post post_err l)
: Tot (repr_impl a frame (frame_out a frame p) (frame_pre frame pre) (... | {
"file_name": "examples/layeredeffects/LowParseWriters.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 19,
"end_line": 307,
"start_col": 0,
"start_line": 285
} | (*
Copyright 2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.StrongExcludedMiddle.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure... | [
{
"abbrev": false,
"full_module": "FStar.Monotonic.Pure",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"... | {
"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: Type ->
frame: LowParseWriters.LowParse.parser ->
pre: LowParseWriters.pre_t LowParseWriters.LowParse.parse_empty ->
p: LowParseWriters.LowParse.parser ->
post: LowParseWriters.post_t a LowParseWriters.LowParse.parse_empty p pre ->
post_err: LowParseWriters.post_err_t LowParseWriters.LowPars... | Prims.Tot | [
"total"
] | [] | [
"LowParseWriters.LowParse.parser",
"LowParseWriters.pre_t",
"LowParseWriters.LowParse.parse_empty",
"LowParseWriters.post_t",
"LowParseWriters.post_err_t",
"LowParseWriters.memory_invariant",
"Prims.unit",
"LowStar.Buffer.buffer",
"LowParseWriters.LowParse.u8",
"LowStar.Monotonic.Buffer.loc_includ... | [] | false | false | false | false | false | let frame_impl
(a: Type)
(frame: parser)
(pre: pre_t parse_empty)
(p: parser)
(post: post_t a parse_empty p pre)
(post_err: post_err_t parse_empty pre)
(l: memory_invariant)
(inner: (unit -> EWrite a parse_empty p pre post post_err l))
: Tot
(repr_impl a
f... | fun buf len pos ->
let h = HST.get () in
let buf' = B.offset buf pos in
match destr_repr_impl a parse_empty p pre post post_err l inner buf' (len `U32.sub` pos) 0ul with
| IError e -> IError e
| IOverflow -> IOverflow
| ICorrect x wlen ->
let h' = HST.get () in
let pos' = pos `U32.add` wlen in
B... | false |
LowParse.Spec.Bytes.fst | LowParse.Spec.Bytes.parse_all_bytes_kind | val parse_all_bytes_kind : LowParse.Spec.Base.parser_kind' | let parse_all_bytes_kind =
{
parser_kind_low = 0;
parser_kind_high = None;
parser_kind_metadata = None;
parser_kind_subkind = Some ParserConsumesAll;
} | {
"file_name": "src/lowparse/LowParse.Spec.Bytes.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 3,
"end_line": 74,
"start_col": 0,
"start_line": 68
} | module LowParse.Spec.Bytes
include LowParse.Spec.VLGen
module B32 = LowParse.Bytes32
module Seq = FStar.Seq
module U32 = FStar.UInt32
#set-options "--z3rlimit 128 --max_fuel 64 --max_ifuel 64"
let lt_pow2_32
(x: nat)
: Lemma
(x < 4294967296 <==> x < pow2 32)
= ()
#reset-options
let parse_flbytes_gen
(sz: nat... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.VLGen.fst.checked",
"LowParse.Bytes32.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.fsti.checked... | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module": "LowParse.Bytes32",
"short_module": "B32"
},
{
"abbrev": false,
"full_module": "Lo... | {
"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 | LowParse.Spec.Base.parser_kind' | Prims.Tot | [
"total"
] | [] | [
"LowParse.Spec.Base.Mkparser_kind'",
"FStar.Pervasives.Native.None",
"Prims.nat",
"FStar.Pervasives.Native.Some",
"LowParse.Spec.Base.parser_subkind",
"LowParse.Spec.Base.ParserConsumesAll",
"LowParse.Spec.Base.parser_kind_metadata_some"
] | [] | false | false | false | true | false | let parse_all_bytes_kind =
| {
parser_kind_low = 0;
parser_kind_high = None;
parser_kind_metadata = None;
parser_kind_subkind = Some ParserConsumesAll
} | false | |
Hacl.Impl.Frodo.Gen.fst | Hacl.Impl.Frodo.Gen.concat_ind_seed | val concat_ind_seed:
tmp_seed:lbytes 18ul
-> i:size_t{v i < maxint U16}
-> Stack unit
(requires fun h -> live h tmp_seed)
(ensures fun h0 _ h1 -> modifies (loc tmp_seed) h0 h1 /\
as_seq h1 tmp_seed == LSeq.concat (BSeq.uint_to_bytes_le (u16 (v i))) (LSeq.sub (as_seq h0 tmp_seed) 2 16) /\
LS... | val concat_ind_seed:
tmp_seed:lbytes 18ul
-> i:size_t{v i < maxint U16}
-> Stack unit
(requires fun h -> live h tmp_seed)
(ensures fun h0 _ h1 -> modifies (loc tmp_seed) h0 h1 /\
as_seq h1 tmp_seed == LSeq.concat (BSeq.uint_to_bytes_le (u16 (v i))) (LSeq.sub (as_seq h0 tmp_seed) 2 16) /\
LS... | let concat_ind_seed tmp_seed i =
let h0 = ST.get () in
update_sub_f h0 tmp_seed 0ul 2ul
(fun h -> BSeq.uint_to_bytes_le (to_u16 i))
(fun _ -> uint_to_bytes_le (sub tmp_seed 0ul 2ul) (to_u16 i));
let h1 = ST.get () in
LSeq.eq_intro
(as_seq h1 tmp_seed)
(LSeq.concat (BSeq.uint_to_bytes_le (to_u16 ... | {
"file_name": "code/frodo/Hacl.Impl.Frodo.Gen.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 89,
"end_line": 63,
"start_col": 0,
"start_line": 54
} | module Hacl.Impl.Frodo.Gen
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open LowStar.Buffer
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
open Hacl.Impl.Matrix
module ST = FStar.HyperStack.ST
module B = LowStar.Buffer
module LSeq = Lib.Sequence
module BSeq = Lib.ByteSequence
module Loops =... | {
"checked_file": "/",
"dependencies": [
"Spec.Frodo.Lemmas.fst.checked",
"Spec.Frodo.Gen.fst.checked",
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.Loops.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.... | [
{
"abbrev": true,
"full_module": "Hacl.SHA3",
"short_module": "SHA3"
},
{
"abbrev": true,
"full_module": "Spec.Frodo.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Frodo.Gen",
"short_module": "S"
},
{
"abbrev": true,
"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 |
tmp_seed: Hacl.Impl.Matrix.lbytes 18ul ->
i: Lib.IntTypes.size_t{Lib.IntTypes.v i < Lib.IntTypes.maxint Lib.IntTypes.U16}
-> FStar.HyperStack.ST.Stack Prims.unit | FStar.HyperStack.ST.Stack | [] | [] | [
"Hacl.Impl.Matrix.lbytes",
"FStar.UInt32.__uint_to_t",
"Lib.IntTypes.size_t",
"Prims.b2t",
"Prims.op_LessThan",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Lib.IntTypes.maxint",
"Lib.IntTypes.U16",
"Lib.Sequence.eq_intro",
"Lib.IntTypes.uint8",
"Lib.Sequence.sub",
"Lib.Buffe... | [] | false | true | false | false | false | let concat_ind_seed tmp_seed i =
| let h0 = ST.get () in
update_sub_f h0
tmp_seed
0ul
2ul
(fun h -> BSeq.uint_to_bytes_le (to_u16 i))
(fun _ -> uint_to_bytes_le (sub tmp_seed 0ul 2ul) (to_u16 i));
let h1 = ST.get () in
LSeq.eq_intro (as_seq h1 tmp_seed)
(LSeq.concat (BSeq.uint_to_bytes_le (to_u16 i)) (LSeq.sub (as_seq h0 tmp_seed) 2 16));
LS... | false |
LowParse.Spec.Bytes.fst | LowParse.Spec.Bytes.serialize_all_bytes' | val serialize_all_bytes' (input: B32.bytes) : GTot bytes | val serialize_all_bytes' (input: B32.bytes) : GTot bytes | let serialize_all_bytes'
(input: B32.bytes)
: GTot bytes
= B32.reveal input | {
"file_name": "src/lowparse/LowParse.Spec.Bytes.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 18,
"end_line": 122,
"start_col": 0,
"start_line": 119
} | module LowParse.Spec.Bytes
include LowParse.Spec.VLGen
module B32 = LowParse.Bytes32
module Seq = FStar.Seq
module U32 = FStar.UInt32
#set-options "--z3rlimit 128 --max_fuel 64 --max_ifuel 64"
let lt_pow2_32
(x: nat)
: Lemma
(x < 4294967296 <==> x < pow2 32)
= ()
#reset-options
let parse_flbytes_gen
(sz: nat... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.VLGen.fst.checked",
"LowParse.Bytes32.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.fsti.checked... | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module": "LowParse.Bytes32",
"short_module": "B32"
},
{
"abbrev": false,
"full_module": "Lo... | {
"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 | input: FStar.Bytes.bytes -> Prims.GTot LowParse.Bytes.bytes | Prims.GTot | [
"sometrivial"
] | [] | [
"FStar.Bytes.bytes",
"FStar.Bytes.reveal",
"LowParse.Bytes.bytes"
] | [] | false | false | false | false | false | let serialize_all_bytes' (input: B32.bytes) : GTot bytes =
| B32.reveal input | false |
Hacl.Impl.Frodo.Gen.fst | Hacl.Impl.Frodo.Gen.frodo_gen_matrix_shake1 | val frodo_gen_matrix_shake1:
n:size_t{v n * v n <= max_size_t /\ v n <= maxint U16}
-> tmp_seed:lbytes 18ul
-> r:lbytes (size 2 *! n)
-> i:size_t{v i < v n}
-> res:matrix_t n n
-> Stack unit
(requires fun h ->
live h tmp_seed /\ live h res /\ live h r /\
disjoint res tmp_seed /\ disjoint r... | val frodo_gen_matrix_shake1:
n:size_t{v n * v n <= max_size_t /\ v n <= maxint U16}
-> tmp_seed:lbytes 18ul
-> r:lbytes (size 2 *! n)
-> i:size_t{v i < v n}
-> res:matrix_t n n
-> Stack unit
(requires fun h ->
live h tmp_seed /\ live h res /\ live h r /\
disjoint res tmp_seed /\ disjoint r... | let frodo_gen_matrix_shake1 n tmp_seed r i res =
concat_ind_seed tmp_seed i;
SHA3.shake128_hacl 18ul tmp_seed (2ul *! n) r;
[@ inline_let]
let spec h0 = S.frodo_gen_matrix_shake0 (v n) (v i) (as_seq h0 r) in
let h0 = ST.get () in
loop1 h0 n res spec
(fun j ->
Loops.unfold_repeati (v n) (spec h0) (as_... | {
"file_name": "code/frodo/Hacl.Impl.Frodo.Gen.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 3,
"end_line": 92,
"start_col": 0,
"start_line": 81
} | module Hacl.Impl.Frodo.Gen
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open LowStar.Buffer
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
open Hacl.Impl.Matrix
module ST = FStar.HyperStack.ST
module B = LowStar.Buffer
module LSeq = Lib.Sequence
module BSeq = Lib.ByteSequence
module Loops =... | {
"checked_file": "/",
"dependencies": [
"Spec.Frodo.Lemmas.fst.checked",
"Spec.Frodo.Gen.fst.checked",
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.Loops.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.... | [
{
"abbrev": true,
"full_module": "Hacl.SHA3",
"short_module": "SHA3"
},
{
"abbrev": true,
"full_module": "Spec.Frodo.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Frodo.Gen",
"short_module": "S"
},
{
"abbrev": true,
"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 |
n:
Lib.IntTypes.size_t
{ Lib.IntTypes.v n * Lib.IntTypes.v n <= Lib.IntTypes.max_size_t /\
Lib.IntTypes.v n <= Lib.IntTypes.maxint Lib.IntTypes.U16 } ->
tmp_seed: Hacl.Impl.Matrix.lbytes 18ul ->
r: Hacl.Impl.Matrix.lbytes (Lib.IntTypes.size 2 *! n) ->
i: Lib.IntTypes.size_t{Lib.... | FStar.HyperStack.ST.Stack | [] | [] | [
"Lib.IntTypes.size_t",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"FStar.Mul.op_Star",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Lib.IntTypes.max_size_t",
"Lib.IntTypes.maxint",
"Lib.IntTypes.U16",
"Hacl.Impl.Matrix.lbytes",
"FStar.UInt32.__uint_to_t",
"Lib.In... | [] | false | true | false | false | false | let frodo_gen_matrix_shake1 n tmp_seed r i res =
| concat_ind_seed tmp_seed i;
SHA3.shake128_hacl 18ul tmp_seed (2ul *! n) r;
[@@ inline_let ]let spec h0 = S.frodo_gen_matrix_shake0 (v n) (v i) (as_seq h0 r) in
let h0 = ST.get () in
loop1 h0
n
res
spec
(fun j ->
Loops.unfold_repeati (v n) (spec h0) (as_matrix h0 res) (v j);
frodo_gen_matrix_shake0 n... | false |
LowParse.Spec.Bytes.fst | LowParse.Spec.Bytes.parse_bounded_vlbytes_pred | val parse_bounded_vlbytes_pred
(min: nat)
(max: nat{min <= max /\ max > 0 /\ max < 4294967296})
(x: B32.bytes)
: GTot Type0 | val parse_bounded_vlbytes_pred
(min: nat)
(max: nat{min <= max /\ max > 0 /\ max < 4294967296})
(x: B32.bytes)
: GTot Type0 | let parse_bounded_vlbytes_pred
(min: nat)
(max: nat { min <= max /\ max > 0 /\ max < 4294967296 } )
(x: B32.bytes)
: GTot Type0
= let reslen = B32.length x in
min <= reslen /\ reslen <= max | {
"file_name": "src/lowparse/LowParse.Spec.Bytes.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 32,
"end_line": 160,
"start_col": 0,
"start_line": 154
} | module LowParse.Spec.Bytes
include LowParse.Spec.VLGen
module B32 = LowParse.Bytes32
module Seq = FStar.Seq
module U32 = FStar.UInt32
#set-options "--z3rlimit 128 --max_fuel 64 --max_ifuel 64"
let lt_pow2_32
(x: nat)
: Lemma
(x < 4294967296 <==> x < pow2 32)
= ()
#reset-options
let parse_flbytes_gen
(sz: nat... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.VLGen.fst.checked",
"LowParse.Bytes32.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.fsti.checked... | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module": "LowParse.Bytes32",
"short_module": "B32"
},
{
"abbrev": false,
"full_module": "Lo... | {
"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 | min: Prims.nat -> max: Prims.nat{min <= max /\ max > 0 /\ max < 4294967296} -> x: FStar.Bytes.bytes
-> Prims.GTot Type0 | Prims.GTot | [
"sometrivial"
] | [] | [
"Prims.nat",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_GreaterThan",
"Prims.op_LessThan",
"FStar.Bytes.bytes",
"FStar.UInt.uint_t",
"FStar.Bytes.length"
] | [] | false | false | false | false | true | let parse_bounded_vlbytes_pred
(min: nat)
(max: nat{min <= max /\ max > 0 /\ max < 4294967296})
(x: B32.bytes)
: GTot Type0 =
| let reslen = B32.length x in
min <= reslen /\ reslen <= max | false |
LowParse.Spec.Bytes.fst | LowParse.Spec.Bytes.serialize_flbytes | val serialize_flbytes (sz: nat{sz < 4294967296}) : Tot (serializer (parse_flbytes sz)) | val serialize_flbytes (sz: nat{sz < 4294967296}) : Tot (serializer (parse_flbytes sz)) | let serialize_flbytes
(sz: nat { sz < 4294967296 } )
: Tot (serializer (parse_flbytes sz))
= serialize_flbytes_correct sz;
serialize_flbytes' sz | {
"file_name": "src/lowparse/LowParse.Spec.Bytes.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 23,
"end_line": 58,
"start_col": 0,
"start_line": 54
} | module LowParse.Spec.Bytes
include LowParse.Spec.VLGen
module B32 = LowParse.Bytes32
module Seq = FStar.Seq
module U32 = FStar.UInt32
#set-options "--z3rlimit 128 --max_fuel 64 --max_ifuel 64"
let lt_pow2_32
(x: nat)
: Lemma
(x < 4294967296 <==> x < pow2 32)
= ()
#reset-options
let parse_flbytes_gen
(sz: nat... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.VLGen.fst.checked",
"LowParse.Bytes32.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.fsti.checked... | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module": "LowParse.Bytes32",
"short_module": "B32"
},
{
"abbrev": false,
"full_module": "Lo... | {
"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 | sz: Prims.nat{sz < 4294967296}
-> LowParse.Spec.Base.serializer (LowParse.Spec.Bytes.parse_flbytes sz) | Prims.Tot | [
"total"
] | [] | [
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"LowParse.Spec.Bytes.serialize_flbytes'",
"Prims.unit",
"LowParse.Spec.Bytes.serialize_flbytes_correct",
"LowParse.Spec.Base.serializer",
"LowParse.Spec.Base.total_constant_size_parser_kind",
"FStar.Bytes.lbytes",
"LowParse.Spec.Bytes.parse_flbytes"
] | [] | false | false | false | false | false | let serialize_flbytes (sz: nat{sz < 4294967296}) : Tot (serializer (parse_flbytes sz)) =
| serialize_flbytes_correct sz;
serialize_flbytes' sz | false |
LowParse.Spec.Bytes.fst | LowParse.Spec.Bytes.parse_flbytes_gen | val parse_flbytes_gen (sz: nat{sz < 4294967296}) (s: bytes{Seq.length s == sz})
: GTot (B32.lbytes sz) | val parse_flbytes_gen (sz: nat{sz < 4294967296}) (s: bytes{Seq.length s == sz})
: GTot (B32.lbytes sz) | let parse_flbytes_gen
(sz: nat { sz < 4294967296 } )
(s: bytes { Seq.length s == sz } )
: GTot (B32.lbytes sz)
= lt_pow2_32 sz;
B32.hide s | {
"file_name": "src/lowparse/LowParse.Spec.Bytes.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 12,
"end_line": 23,
"start_col": 0,
"start_line": 18
} | module LowParse.Spec.Bytes
include LowParse.Spec.VLGen
module B32 = LowParse.Bytes32
module Seq = FStar.Seq
module U32 = FStar.UInt32
#set-options "--z3rlimit 128 --max_fuel 64 --max_ifuel 64"
let lt_pow2_32
(x: nat)
: Lemma
(x < 4294967296 <==> x < pow2 32)
= ()
#reset-options | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.VLGen.fst.checked",
"LowParse.Bytes32.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.fsti.checked... | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module": "LowParse.Bytes32",
"short_module": "B32"
},
{
"abbrev": false,
"full_module": "Lo... | {
"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 | sz: Prims.nat{sz < 4294967296} -> s: LowParse.Bytes.bytes{FStar.Seq.Base.length s == sz}
-> Prims.GTot (FStar.Bytes.lbytes sz) | Prims.GTot | [
"sometrivial"
] | [] | [
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"LowParse.Bytes.bytes",
"Prims.eq2",
"FStar.Seq.Base.length",
"LowParse.Bytes.byte",
"FStar.Bytes.hide",
"Prims.unit",
"LowParse.Spec.Bytes.lt_pow2_32",
"FStar.Bytes.lbytes"
] | [] | false | false | false | false | false | let parse_flbytes_gen (sz: nat{sz < 4294967296}) (s: bytes{Seq.length s == sz})
: GTot (B32.lbytes sz) =
| lt_pow2_32 sz;
B32.hide s | false |
LowParse.Spec.Bytes.fst | LowParse.Spec.Bytes.parse_flbytes | val parse_flbytes (sz: nat{sz < 4294967296})
: Tot (parser (total_constant_size_parser_kind sz) (B32.lbytes sz)) | val parse_flbytes (sz: nat{sz < 4294967296})
: Tot (parser (total_constant_size_parser_kind sz) (B32.lbytes sz)) | let parse_flbytes
(sz: nat { sz < 4294967296 } )
: Tot (parser (total_constant_size_parser_kind sz) (B32.lbytes sz))
= make_total_constant_size_parser sz (B32.lbytes sz) (parse_flbytes_gen sz) | {
"file_name": "src/lowparse/LowParse.Spec.Bytes.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 75,
"end_line": 28,
"start_col": 0,
"start_line": 25
} | module LowParse.Spec.Bytes
include LowParse.Spec.VLGen
module B32 = LowParse.Bytes32
module Seq = FStar.Seq
module U32 = FStar.UInt32
#set-options "--z3rlimit 128 --max_fuel 64 --max_ifuel 64"
let lt_pow2_32
(x: nat)
: Lemma
(x < 4294967296 <==> x < pow2 32)
= ()
#reset-options
let parse_flbytes_gen
(sz: nat... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.VLGen.fst.checked",
"LowParse.Bytes32.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.fsti.checked... | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module": "LowParse.Bytes32",
"short_module": "B32"
},
{
"abbrev": false,
"full_module": "Lo... | {
"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 | sz: Prims.nat{sz < 4294967296}
-> LowParse.Spec.Base.parser (LowParse.Spec.Base.total_constant_size_parser_kind sz)
(FStar.Bytes.lbytes sz) | Prims.Tot | [
"total"
] | [] | [
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"LowParse.Spec.Combinators.make_total_constant_size_parser",
"FStar.Bytes.lbytes",
"LowParse.Spec.Bytes.parse_flbytes_gen",
"LowParse.Spec.Base.parser",
"LowParse.Spec.Base.total_constant_size_parser_kind"
] | [] | false | false | false | false | false | let parse_flbytes (sz: nat{sz < 4294967296})
: Tot (parser (total_constant_size_parser_kind sz) (B32.lbytes sz)) =
| make_total_constant_size_parser sz (B32.lbytes sz) (parse_flbytes_gen sz) | false |
LowParse.Spec.Bytes.fst | LowParse.Spec.Bytes.serialize_flbytes_correct | val serialize_flbytes_correct (sz: nat{sz < 4294967296})
: Lemma (serializer_correct (parse_flbytes sz) (serialize_flbytes' sz)) | val serialize_flbytes_correct (sz: nat{sz < 4294967296})
: Lemma (serializer_correct (parse_flbytes sz) (serialize_flbytes' sz)) | let serialize_flbytes_correct
(sz: nat { sz < 4294967296 } )
: Lemma
(serializer_correct (parse_flbytes sz) (serialize_flbytes' sz))
= let prf
(input: B32.lbytes sz)
: Lemma
(
let ser = serialize_flbytes' sz input in
Seq.length ser == sz /\
parse (parse_flbytes sz) ser == Some (input, sz... | {
"file_name": "src/lowparse/LowParse.Spec.Bytes.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 28,
"end_line": 52,
"start_col": 0,
"start_line": 38
} | module LowParse.Spec.Bytes
include LowParse.Spec.VLGen
module B32 = LowParse.Bytes32
module Seq = FStar.Seq
module U32 = FStar.UInt32
#set-options "--z3rlimit 128 --max_fuel 64 --max_ifuel 64"
let lt_pow2_32
(x: nat)
: Lemma
(x < 4294967296 <==> x < pow2 32)
= ()
#reset-options
let parse_flbytes_gen
(sz: nat... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.VLGen.fst.checked",
"LowParse.Bytes32.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.fsti.checked... | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module": "LowParse.Bytes32",
"short_module": "B32"
},
{
"abbrev": false,
"full_module": "Lo... | {
"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 | sz: Prims.nat{sz < 4294967296}
-> FStar.Pervasives.Lemma
(ensures
LowParse.Spec.Base.serializer_correct (LowParse.Spec.Bytes.parse_flbytes sz)
(LowParse.Spec.Bytes.serialize_flbytes' sz)) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"FStar.Classical.forall_intro",
"FStar.Bytes.lbytes",
"Prims.l_and",
"Prims.eq2",
"FStar.Seq.Base.length",
"LowParse.Bytes.byte",
"LowParse.Spec.Bytes.serialize_flbytes'",
"FStar.Pervasives.Native.option",
"FStar.Pervasives.Native.tuple2",
"LowP... | [] | false | false | true | false | false | let serialize_flbytes_correct (sz: nat{sz < 4294967296})
: Lemma (serializer_correct (parse_flbytes sz) (serialize_flbytes' sz)) =
| let prf (input: B32.lbytes sz)
: Lemma
(let ser = serialize_flbytes' sz input in
Seq.length ser == sz /\ parse (parse_flbytes sz) ser == Some (input, sz)) =
()
in
Classical.forall_intro prf | false |
Bug.SpinLock.fst | Bug.SpinLock.test_fstar | val test_fstar : r: Pulse.Lib.Reference.ref Prims.int -> Prims.unit | let test_fstar (r:R.ref int) =
let my_lock = new_lock (exists* v. R.pts_to r v) in
() | {
"file_name": "share/steel/examples/pulse/bug-reports/Bug.SpinLock.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 4,
"end_line": 24,
"start_col": 0,
"start_line": 22
} | (*
Copyright 2023 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"Pulse.Lib.SpinLock.fsti.checked",
"Pulse.Lib.Reference.fsti.checked",
"Pulse.Lib.Pervasives.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": false,
"source_file": "Bug.SpinLock.fst"
} | [
{
"abbrev": false,
"full_module": "Pulse.Lib.SpinLock",
"short_module": null
},
{
"abbrev": true,
"full_module": "Pulse.Lib.Reference",
"short_module": "R"
},
{
"abbrev": false,
"full_module": "Pulse.Lib.Pervasives",
"short_module": null
},
{
"abbrev": false,
... | {
"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.Lib.Reference.ref Prims.int -> Prims.unit | Prims.Tot | [
"total"
] | [] | [
"Pulse.Lib.Reference.ref",
"Prims.int",
"Pulse.Lib.Core.stt",
"Pulse.Lib.SpinLock.lock",
"Pulse.Lib.Core.op_exists_Star",
"Pulse.Lib.Reference.pts_to",
"PulseCore.FractionalPermission.full_perm",
"Pulse.Lib.Core.vprop",
"Pulse.Lib.Core.emp",
"Pulse.Lib.SpinLock.new_lock",
"Prims.unit"
] | [] | false | false | false | true | false | let test_fstar (r: R.ref int) =
| let my_lock = new_lock (exists* v. R.pts_to r v) in
() | false | |
LowParse.Spec.Bytes.fst | LowParse.Spec.Bytes.parse_all_bytes_injective | val parse_all_bytes_injective: Prims.unit -> Lemma (injective parse_all_bytes') | val parse_all_bytes_injective: Prims.unit -> Lemma (injective parse_all_bytes') | let parse_all_bytes_injective () : Lemma
(injective parse_all_bytes')
= let prf
(b1 b2: bytes)
: Lemma
(requires (injective_precond parse_all_bytes' b1 b2))
(ensures (injective_postcond parse_all_bytes' b1 b2))
= assert (Seq.length b1 < 4294967296);
assert (Seq.length b2 < 4294967296);
lt_pow2... | {
"file_name": "src/lowparse/LowParse.Spec.Bytes.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 69,
"end_line": 103,
"start_col": 0,
"start_line": 89
} | module LowParse.Spec.Bytes
include LowParse.Spec.VLGen
module B32 = LowParse.Bytes32
module Seq = FStar.Seq
module U32 = FStar.UInt32
#set-options "--z3rlimit 128 --max_fuel 64 --max_ifuel 64"
let lt_pow2_32
(x: nat)
: Lemma
(x < 4294967296 <==> x < pow2 32)
= ()
#reset-options
let parse_flbytes_gen
(sz: nat... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.VLGen.fst.checked",
"LowParse.Bytes32.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.fsti.checked... | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module": "LowParse.Bytes32",
"short_module": "B32"
},
{
"abbrev": false,
"full_module": "Lo... | {
"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.Pervasives.Lemma
(ensures LowParse.Spec.Base.injective LowParse.Spec.Bytes.parse_all_bytes') | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.unit",
"FStar.Classical.forall_intro_2",
"LowParse.Bytes.bytes",
"Prims.l_imp",
"LowParse.Spec.Base.injective_precond",
"FStar.Bytes.bytes",
"LowParse.Spec.Bytes.parse_all_bytes'",
"LowParse.Spec.Base.injective_postcond",
"FStar.Classical.move_requires",
"Prims.l_True",
"Prims.squash",
... | [] | false | false | true | false | false | let parse_all_bytes_injective () : Lemma (injective parse_all_bytes') =
| let prf (b1 b2: bytes)
: Lemma (requires (injective_precond parse_all_bytes' b1 b2))
(ensures (injective_postcond parse_all_bytes' b1 b2)) =
assert (Seq.length b1 < 4294967296);
assert (Seq.length b2 < 4294967296);
lt_pow2_32 (Seq.length b1);
lt_pow2_32 (Seq.length b2);
B32.reveal_hide b1;
B32.rev... | false |
Hacl.Impl.Frodo.Gen.fst | Hacl.Impl.Frodo.Gen.frodo_gen_matrix_shake_4x0 | val frodo_gen_matrix_shake_4x0:
n:size_t{v n * v n <= max_size_t /\ v n <= maxint U16}
-> i:size_t{v i < v n / 4}
-> r0:lbytes (size 2 *! n)
-> r1:lbytes (size 2 *! n)
-> r2:lbytes (size 2 *! n)
-> r3:lbytes (size 2 *! n)
-> j:size_t{v j < v n}
-> res:matrix_t n n
-> Stack unit
(requires fun h -... | val frodo_gen_matrix_shake_4x0:
n:size_t{v n * v n <= max_size_t /\ v n <= maxint U16}
-> i:size_t{v i < v n / 4}
-> r0:lbytes (size 2 *! n)
-> r1:lbytes (size 2 *! n)
-> r2:lbytes (size 2 *! n)
-> r3:lbytes (size 2 *! n)
-> j:size_t{v j < v n}
-> res:matrix_t n n
-> Stack unit
(requires fun h -... | let frodo_gen_matrix_shake_4x0 n i r0 r1 r2 r3 j res =
let resij0 = sub r0 (j *! size 2) (size 2) in
let resij1 = sub r1 (j *! size 2) (size 2) in
let resij2 = sub r2 (j *! size 2) (size 2) in
let resij3 = sub r3 (j *! size 2) (size 2) in
mset res (size 4 *! i +! size 0) j (uint_from_bytes_le resij0);
mset ... | {
"file_name": "code/frodo/Hacl.Impl.Frodo.Gen.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 64,
"end_line": 161,
"start_col": 0,
"start_line": 153
} | module Hacl.Impl.Frodo.Gen
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open LowStar.Buffer
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
open Hacl.Impl.Matrix
module ST = FStar.HyperStack.ST
module B = LowStar.Buffer
module LSeq = Lib.Sequence
module BSeq = Lib.ByteSequence
module Loops =... | {
"checked_file": "/",
"dependencies": [
"Spec.Frodo.Lemmas.fst.checked",
"Spec.Frodo.Gen.fst.checked",
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.Loops.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.... | [
{
"abbrev": true,
"full_module": "Hacl.SHA3",
"short_module": "SHA3"
},
{
"abbrev": true,
"full_module": "Spec.Frodo.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Frodo.Gen",
"short_module": "S"
},
{
"abbrev": true,
"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 |
n:
Lib.IntTypes.size_t
{ Lib.IntTypes.v n * Lib.IntTypes.v n <= Lib.IntTypes.max_size_t /\
Lib.IntTypes.v n <= Lib.IntTypes.maxint Lib.IntTypes.U16 } ->
i: Lib.IntTypes.size_t{Lib.IntTypes.v i < Lib.IntTypes.v n / 4} ->
r0: Hacl.Impl.Matrix.lbytes (Lib.IntTypes.size 2 *! n) ->
r... | FStar.HyperStack.ST.Stack | [] | [] | [
"Lib.IntTypes.size_t",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"FStar.Mul.op_Star",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Lib.IntTypes.max_size_t",
"Lib.IntTypes.maxint",
"Lib.IntTypes.U16",
"Prims.op_LessThan",
"Prims.op_Division",
"Hacl.Impl.Matrix.lb... | [] | false | true | false | false | false | let frodo_gen_matrix_shake_4x0 n i r0 r1 r2 r3 j res =
| let resij0 = sub r0 (j *! size 2) (size 2) in
let resij1 = sub r1 (j *! size 2) (size 2) in
let resij2 = sub r2 (j *! size 2) (size 2) in
let resij3 = sub r3 (j *! size 2) (size 2) in
mset res (size 4 *! i +! size 0) j (uint_from_bytes_le resij0);
mset res (size 4 *! i +! size 1) j (uint_from_bytes_le resij1);
mset res... | false |
LowParse.Spec.Bytes.fst | LowParse.Spec.Bytes.parse_all_bytes' | val parse_all_bytes' (input: bytes) : Tot (option (B32.bytes * consumed_length input)) | val parse_all_bytes' (input: bytes) : Tot (option (B32.bytes * consumed_length input)) | let parse_all_bytes'
(input: bytes)
: Tot (option (B32.bytes * consumed_length input))
= let len = Seq.length input in
if len >= 4294967296
then None
else begin
lt_pow2_32 len;
Some (B32.b32_hide input, len)
end | {
"file_name": "src/lowparse/LowParse.Spec.Bytes.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 5,
"end_line": 85,
"start_col": 0,
"start_line": 76
} | module LowParse.Spec.Bytes
include LowParse.Spec.VLGen
module B32 = LowParse.Bytes32
module Seq = FStar.Seq
module U32 = FStar.UInt32
#set-options "--z3rlimit 128 --max_fuel 64 --max_ifuel 64"
let lt_pow2_32
(x: nat)
: Lemma
(x < 4294967296 <==> x < pow2 32)
= ()
#reset-options
let parse_flbytes_gen
(sz: nat... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.VLGen.fst.checked",
"LowParse.Bytes32.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.fsti.checked... | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module": "LowParse.Bytes32",
"short_module": "B32"
},
{
"abbrev": false,
"full_module": "Lo... | {
"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 | input: LowParse.Bytes.bytes
-> FStar.Pervasives.Native.option (FStar.Bytes.bytes * LowParse.Spec.Base.consumed_length input) | Prims.Tot | [
"total"
] | [] | [
"LowParse.Bytes.bytes",
"Prims.op_GreaterThanOrEqual",
"FStar.Pervasives.Native.None",
"FStar.Pervasives.Native.tuple2",
"FStar.Bytes.bytes",
"LowParse.Spec.Base.consumed_length",
"Prims.bool",
"FStar.Pervasives.Native.Some",
"FStar.Pervasives.Native.Mktuple2",
"LowParse.Bytes32.b32_hide",
"Prim... | [] | false | false | false | false | false | let parse_all_bytes' (input: bytes) : Tot (option (B32.bytes * consumed_length input)) =
| let len = Seq.length input in
if len >= 4294967296
then None
else
(lt_pow2_32 len;
Some (B32.b32_hide input, len)) | false |
LowParse.Spec.Bytes.fst | LowParse.Spec.Bytes.parse_all_bytes | val parse_all_bytes:parser parse_all_bytes_kind B32.bytes | val parse_all_bytes:parser parse_all_bytes_kind B32.bytes | let parse_all_bytes : parser parse_all_bytes_kind B32.bytes =
tot_parse_all_bytes | {
"file_name": "src/lowparse/LowParse.Spec.Bytes.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 21,
"end_line": 117,
"start_col": 0,
"start_line": 116
} | module LowParse.Spec.Bytes
include LowParse.Spec.VLGen
module B32 = LowParse.Bytes32
module Seq = FStar.Seq
module U32 = FStar.UInt32
#set-options "--z3rlimit 128 --max_fuel 64 --max_ifuel 64"
let lt_pow2_32
(x: nat)
: Lemma
(x < 4294967296 <==> x < pow2 32)
= ()
#reset-options
let parse_flbytes_gen
(sz: nat... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.VLGen.fst.checked",
"LowParse.Bytes32.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.fsti.checked... | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module": "LowParse.Bytes32",
"short_module": "B32"
},
{
"abbrev": false,
"full_module": "Lo... | {
"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 | LowParse.Spec.Base.parser LowParse.Spec.Bytes.parse_all_bytes_kind FStar.Bytes.bytes | Prims.Tot | [
"total"
] | [] | [
"LowParse.Spec.Bytes.tot_parse_all_bytes"
] | [] | false | false | false | true | false | let parse_all_bytes:parser parse_all_bytes_kind B32.bytes =
| tot_parse_all_bytes | false |
LowParse.Spec.Bytes.fst | LowParse.Spec.Bytes.tot_parse_all_bytes | val tot_parse_all_bytes:tot_parser parse_all_bytes_kind B32.bytes | val tot_parse_all_bytes:tot_parser parse_all_bytes_kind B32.bytes | let tot_parse_all_bytes : tot_parser parse_all_bytes_kind B32.bytes =
parse_all_bytes_correct ();
parse_all_bytes' | {
"file_name": "src/lowparse/LowParse.Spec.Bytes.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 18,
"end_line": 114,
"start_col": 0,
"start_line": 112
} | module LowParse.Spec.Bytes
include LowParse.Spec.VLGen
module B32 = LowParse.Bytes32
module Seq = FStar.Seq
module U32 = FStar.UInt32
#set-options "--z3rlimit 128 --max_fuel 64 --max_ifuel 64"
let lt_pow2_32
(x: nat)
: Lemma
(x < 4294967296 <==> x < pow2 32)
= ()
#reset-options
let parse_flbytes_gen
(sz: nat... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.VLGen.fst.checked",
"LowParse.Bytes32.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.fsti.checked... | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module": "LowParse.Bytes32",
"short_module": "B32"
},
{
"abbrev": false,
"full_module": "Lo... | {
"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 | LowParse.Spec.Base.tot_parser LowParse.Spec.Bytes.parse_all_bytes_kind FStar.Bytes.bytes | Prims.Tot | [
"total"
] | [] | [
"LowParse.Spec.Bytes.parse_all_bytes'",
"Prims.unit",
"LowParse.Spec.Bytes.parse_all_bytes_correct"
] | [] | false | false | false | true | false | let tot_parse_all_bytes:tot_parser parse_all_bytes_kind B32.bytes =
| parse_all_bytes_correct ();
parse_all_bytes' | false |
LowParse.Spec.Bytes.fst | LowParse.Spec.Bytes.parse_all_bytes_correct | val parse_all_bytes_correct: Prims.unit
-> Lemma (parser_kind_prop parse_all_bytes_kind parse_all_bytes') | val parse_all_bytes_correct: Prims.unit
-> Lemma (parser_kind_prop parse_all_bytes_kind parse_all_bytes') | let parse_all_bytes_correct () : Lemma
(parser_kind_prop parse_all_bytes_kind parse_all_bytes')
= parser_kind_prop_equiv parse_all_bytes_kind parse_all_bytes';
parse_all_bytes_injective () | {
"file_name": "src/lowparse/LowParse.Spec.Bytes.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 30,
"end_line": 110,
"start_col": 0,
"start_line": 107
} | module LowParse.Spec.Bytes
include LowParse.Spec.VLGen
module B32 = LowParse.Bytes32
module Seq = FStar.Seq
module U32 = FStar.UInt32
#set-options "--z3rlimit 128 --max_fuel 64 --max_ifuel 64"
let lt_pow2_32
(x: nat)
: Lemma
(x < 4294967296 <==> x < pow2 32)
= ()
#reset-options
let parse_flbytes_gen
(sz: nat... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.VLGen.fst.checked",
"LowParse.Bytes32.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.fsti.checked... | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module": "LowParse.Bytes32",
"short_module": "B32"
},
{
"abbrev": false,
"full_module": "Lo... | {
"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.Pervasives.Lemma
(ensures
LowParse.Spec.Base.parser_kind_prop LowParse.Spec.Bytes.parse_all_bytes_kind
LowParse.Spec.Bytes.parse_all_bytes') | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.unit",
"LowParse.Spec.Bytes.parse_all_bytes_injective",
"LowParse.Spec.Base.parser_kind_prop_equiv",
"FStar.Bytes.bytes",
"LowParse.Spec.Bytes.parse_all_bytes_kind",
"LowParse.Spec.Bytes.parse_all_bytes'",
"Prims.l_True",
"Prims.squash",
"LowParse.Spec.Base.parser_kind_prop",
"Prims.Nil",
... | [] | true | false | true | false | false | let parse_all_bytes_correct () : Lemma (parser_kind_prop parse_all_bytes_kind parse_all_bytes') =
| parser_kind_prop_equiv parse_all_bytes_kind parse_all_bytes';
parse_all_bytes_injective () | false |
LowParse.Spec.Bytes.fst | LowParse.Spec.Bytes.serialize_all_bytes_correct | val serialize_all_bytes_correct: Prims.unit
-> Lemma (serializer_correct parse_all_bytes serialize_all_bytes') | val serialize_all_bytes_correct: Prims.unit
-> Lemma (serializer_correct parse_all_bytes serialize_all_bytes') | let serialize_all_bytes_correct () : Lemma (serializer_correct parse_all_bytes serialize_all_bytes') =
let prf
(input: B32.bytes)
: Lemma
(
let ser = serialize_all_bytes' input in
let len : consumed_length ser = Seq.length ser in
parse parse_all_bytes ser == Some (input, len)
)
= ass... | {
"file_name": "src/lowparse/LowParse.Spec.Bytes.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 28,
"end_line": 139,
"start_col": 0,
"start_line": 126
} | module LowParse.Spec.Bytes
include LowParse.Spec.VLGen
module B32 = LowParse.Bytes32
module Seq = FStar.Seq
module U32 = FStar.UInt32
#set-options "--z3rlimit 128 --max_fuel 64 --max_ifuel 64"
let lt_pow2_32
(x: nat)
: Lemma
(x < 4294967296 <==> x < pow2 32)
= ()
#reset-options
let parse_flbytes_gen
(sz: nat... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.VLGen.fst.checked",
"LowParse.Bytes32.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.fsti.checked... | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module": "LowParse.Bytes32",
"short_module": "B32"
},
{
"abbrev": false,
"full_module": "Lo... | {
"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.Pervasives.Lemma
(ensures
LowParse.Spec.Base.serializer_correct LowParse.Spec.Bytes.parse_all_bytes
LowParse.Spec.Bytes.serialize_all_bytes') | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.unit",
"FStar.Classical.forall_intro",
"FStar.Bytes.bytes",
"Prims.eq2",
"FStar.Pervasives.Native.option",
"FStar.Pervasives.Native.tuple2",
"LowParse.Spec.Base.consumed_length",
"LowParse.Spec.Bytes.serialize_all_bytes'",
"LowParse.Spec.Base.parse",
"LowParse.Spec.Bytes.parse_all_bytes",
... | [] | false | false | true | false | false | let serialize_all_bytes_correct () : Lemma (serializer_correct parse_all_bytes serialize_all_bytes') =
| let prf (input: B32.bytes)
: Lemma
(let ser = serialize_all_bytes' input in
let len:consumed_length ser = Seq.length ser in
parse parse_all_bytes ser == Some (input, len)) =
assert (Seq.length (serialize_all_bytes' input) == B32.length input);
lt_pow2_32 (B32.length input);
B32.hide_reveal inp... | false |
LowParse.Spec.Bytes.fst | LowParse.Spec.Bytes.serialize_all_bytes | val serialize_all_bytes:serializer parse_all_bytes | val serialize_all_bytes:serializer parse_all_bytes | let serialize_all_bytes : serializer parse_all_bytes =
serialize_all_bytes_correct ();
serialize_all_bytes' | {
"file_name": "src/lowparse/LowParse.Spec.Bytes.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 22,
"end_line": 145,
"start_col": 0,
"start_line": 143
} | module LowParse.Spec.Bytes
include LowParse.Spec.VLGen
module B32 = LowParse.Bytes32
module Seq = FStar.Seq
module U32 = FStar.UInt32
#set-options "--z3rlimit 128 --max_fuel 64 --max_ifuel 64"
let lt_pow2_32
(x: nat)
: Lemma
(x < 4294967296 <==> x < pow2 32)
= ()
#reset-options
let parse_flbytes_gen
(sz: nat... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.VLGen.fst.checked",
"LowParse.Bytes32.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.fsti.checked... | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module": "LowParse.Bytes32",
"short_module": "B32"
},
{
"abbrev": false,
"full_module": "Lo... | {
"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 | LowParse.Spec.Base.serializer LowParse.Spec.Bytes.parse_all_bytes | Prims.Tot | [
"total"
] | [] | [
"LowParse.Spec.Bytes.serialize_all_bytes'",
"Prims.unit",
"LowParse.Spec.Bytes.serialize_all_bytes_correct"
] | [] | false | false | false | true | false | let serialize_all_bytes:serializer parse_all_bytes =
| serialize_all_bytes_correct ();
serialize_all_bytes' | false |
LowParse.Spec.Bytes.fst | LowParse.Spec.Bytes.parse_bounded_vlbytes_kind | val parse_bounded_vlbytes_kind (min: nat) (max: nat{min <= max /\ max > 0 /\ max < 4294967296})
: Tot parser_kind | val parse_bounded_vlbytes_kind (min: nat) (max: nat{min <= max /\ max > 0 /\ max < 4294967296})
: Tot parser_kind | let parse_bounded_vlbytes_kind
(min: nat)
(max: nat { min <= max /\ max > 0 /\ max < 4294967296 })
: Tot parser_kind
= parse_bounded_vldata_strong_kind min max (log256' max) parse_all_bytes_kind | {
"file_name": "src/lowparse/LowParse.Spec.Bytes.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 77,
"end_line": 172,
"start_col": 0,
"start_line": 168
} | module LowParse.Spec.Bytes
include LowParse.Spec.VLGen
module B32 = LowParse.Bytes32
module Seq = FStar.Seq
module U32 = FStar.UInt32
#set-options "--z3rlimit 128 --max_fuel 64 --max_ifuel 64"
let lt_pow2_32
(x: nat)
: Lemma
(x < 4294967296 <==> x < pow2 32)
= ()
#reset-options
let parse_flbytes_gen
(sz: nat... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.VLGen.fst.checked",
"LowParse.Bytes32.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.fsti.checked... | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module": "LowParse.Bytes32",
"short_module": "B32"
},
{
"abbrev": false,
"full_module": "Lo... | {
"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 | min: Prims.nat -> max: Prims.nat{min <= max /\ max > 0 /\ max < 4294967296}
-> LowParse.Spec.Base.parser_kind | Prims.Tot | [
"total"
] | [] | [
"Prims.nat",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_GreaterThan",
"Prims.op_LessThan",
"LowParse.Spec.VLData.parse_bounded_vldata_strong_kind",
"LowParse.Spec.BoundedInt.log256'",
"LowParse.Spec.Bytes.parse_all_bytes_kind",
"LowParse.Spec.Base.parser_kind"
] | [] | false | false | false | false | false | let parse_bounded_vlbytes_kind (min: nat) (max: nat{min <= max /\ max > 0 /\ max < 4294967296})
: Tot parser_kind =
| parse_bounded_vldata_strong_kind min max (log256' max) parse_all_bytes_kind | false |
LowParse.Spec.Bytes.fst | LowParse.Spec.Bytes.parse_bounded_vlbytes_aux | val parse_bounded_vlbytes_aux
(min: nat)
(max: nat{min <= max /\ max > 0 /\ max < 4294967296})
(l: nat{l >= log256' max /\ l <= 4})
: Tot
(parser (parse_bounded_vldata_strong_kind min max l parse_all_bytes_kind)
(parse_bounded_vldata_strong_t min max #_ #_ #parse_all_bytes serialize_al... | val parse_bounded_vlbytes_aux
(min: nat)
(max: nat{min <= max /\ max > 0 /\ max < 4294967296})
(l: nat{l >= log256' max /\ l <= 4})
: Tot
(parser (parse_bounded_vldata_strong_kind min max l parse_all_bytes_kind)
(parse_bounded_vldata_strong_t min max #_ #_ #parse_all_bytes serialize_al... | let parse_bounded_vlbytes_aux
(min: nat)
(max: nat { min <= max /\ max > 0 /\ max < 4294967296 })
(l: nat { l >= log256' max /\ l <= 4 } )
: Tot (parser (parse_bounded_vldata_strong_kind min max l parse_all_bytes_kind) (parse_bounded_vldata_strong_t min max #_ #_ #parse_all_bytes serialize_all_bytes))
= parse_bou... | {
"file_name": "src/lowparse/LowParse.Spec.Bytes.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 60,
"end_line": 152,
"start_col": 0,
"start_line": 147
} | module LowParse.Spec.Bytes
include LowParse.Spec.VLGen
module B32 = LowParse.Bytes32
module Seq = FStar.Seq
module U32 = FStar.UInt32
#set-options "--z3rlimit 128 --max_fuel 64 --max_ifuel 64"
let lt_pow2_32
(x: nat)
: Lemma
(x < 4294967296 <==> x < pow2 32)
= ()
#reset-options
let parse_flbytes_gen
(sz: nat... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.VLGen.fst.checked",
"LowParse.Bytes32.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.fsti.checked... | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module": "LowParse.Bytes32",
"short_module": "B32"
},
{
"abbrev": false,
"full_module": "Lo... | {
"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 |
min: Prims.nat ->
max: Prims.nat{min <= max /\ max > 0 /\ max < 4294967296} ->
l: Prims.nat{l >= LowParse.Spec.BoundedInt.log256' max /\ l <= 4}
-> LowParse.Spec.Base.parser (LowParse.Spec.VLData.parse_bounded_vldata_strong_kind min
max
l
LowParse.Spec.Bytes.parse_all_bytes_... | Prims.Tot | [
"total"
] | [] | [
"Prims.nat",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_GreaterThan",
"Prims.op_LessThan",
"Prims.op_GreaterThanOrEqual",
"LowParse.Spec.BoundedInt.log256'",
"LowParse.Spec.VLData.parse_bounded_vldata_strong'",
"LowParse.Spec.Bytes.parse_all_bytes_kind",
"FStar.Bytes.bytes... | [] | false | false | false | false | false | let parse_bounded_vlbytes_aux
(min: nat)
(max: nat{min <= max /\ max > 0 /\ max < 4294967296})
(l: nat{l >= log256' max /\ l <= 4})
: Tot
(parser (parse_bounded_vldata_strong_kind min max l parse_all_bytes_kind)
(parse_bounded_vldata_strong_t min max #_ #_ #parse_all_bytes serialize_al... | parse_bounded_vldata_strong' min max l serialize_all_bytes | false |
LowParse.Spec.Bytes.fst | LowParse.Spec.Bytes.parse_bounded_vlbytes | val parse_bounded_vlbytes (min: nat) (max: nat{min <= max /\ max > 0 /\ max < 4294967296})
: Tot
(parser (parse_bounded_vldata_strong_kind min max (log256' max) parse_all_bytes_kind)
(parse_bounded_vlbytes_t min max)) | val parse_bounded_vlbytes (min: nat) (max: nat{min <= max /\ max > 0 /\ max < 4294967296})
: Tot
(parser (parse_bounded_vldata_strong_kind min max (log256' max) parse_all_bytes_kind)
(parse_bounded_vlbytes_t min max)) | let parse_bounded_vlbytes
(min: nat)
(max: nat { min <= max /\ max > 0 /\ max < 4294967296 } )
: Tot (parser (parse_bounded_vldata_strong_kind min max (log256' max) parse_all_bytes_kind) (parse_bounded_vlbytes_t min max))
= parse_bounded_vlbytes' min max (log256' max) | {
"file_name": "src/lowparse/LowParse.Spec.Bytes.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 46,
"end_line": 193,
"start_col": 0,
"start_line": 189
} | module LowParse.Spec.Bytes
include LowParse.Spec.VLGen
module B32 = LowParse.Bytes32
module Seq = FStar.Seq
module U32 = FStar.UInt32
#set-options "--z3rlimit 128 --max_fuel 64 --max_ifuel 64"
let lt_pow2_32
(x: nat)
: Lemma
(x < 4294967296 <==> x < pow2 32)
= ()
#reset-options
let parse_flbytes_gen
(sz: nat... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.VLGen.fst.checked",
"LowParse.Bytes32.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.fsti.checked... | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module": "LowParse.Bytes32",
"short_module": "B32"
},
{
"abbrev": false,
"full_module": "Lo... | {
"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 | min: Prims.nat -> max: Prims.nat{min <= max /\ max > 0 /\ max < 4294967296}
-> LowParse.Spec.Base.parser (LowParse.Spec.VLData.parse_bounded_vldata_strong_kind min
max
(LowParse.Spec.BoundedInt.log256' max)
LowParse.Spec.Bytes.parse_all_bytes_kind)
(LowParse.Spec.Bytes.parse_bounde... | Prims.Tot | [
"total"
] | [] | [
"Prims.nat",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_GreaterThan",
"Prims.op_LessThan",
"LowParse.Spec.Bytes.parse_bounded_vlbytes'",
"LowParse.Spec.BoundedInt.log256'",
"LowParse.Spec.Base.parser",
"LowParse.Spec.VLData.parse_bounded_vldata_strong_kind",
"LowParse.Spec... | [] | false | false | false | false | false | let parse_bounded_vlbytes (min: nat) (max: nat{min <= max /\ max > 0 /\ max < 4294967296})
: Tot
(parser (parse_bounded_vldata_strong_kind min max (log256' max) parse_all_bytes_kind)
(parse_bounded_vlbytes_t min max)) =
| parse_bounded_vlbytes' min max (log256' max) | false |
LowParse.Spec.Bytes.fst | LowParse.Spec.Bytes.synth_bounded_vlbytes | val synth_bounded_vlbytes
(min: nat)
(max: nat{min <= max /\ max > 0 /\ max < 4294967296})
(x: parse_bounded_vldata_strong_t min max #_ #_ #parse_all_bytes serialize_all_bytes)
: Tot (parse_bounded_vlbytes_t min max) | val synth_bounded_vlbytes
(min: nat)
(max: nat{min <= max /\ max > 0 /\ max < 4294967296})
(x: parse_bounded_vldata_strong_t min max #_ #_ #parse_all_bytes serialize_all_bytes)
: Tot (parse_bounded_vlbytes_t min max) | let synth_bounded_vlbytes
(min: nat)
(max: nat { min <= max /\ max > 0 /\ max < 4294967296 })
(x: parse_bounded_vldata_strong_t min max #_ #_ #parse_all_bytes serialize_all_bytes)
: Tot (parse_bounded_vlbytes_t min max)
= x | {
"file_name": "src/lowparse/LowParse.Spec.Bytes.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 3,
"end_line": 180,
"start_col": 0,
"start_line": 175
} | module LowParse.Spec.Bytes
include LowParse.Spec.VLGen
module B32 = LowParse.Bytes32
module Seq = FStar.Seq
module U32 = FStar.UInt32
#set-options "--z3rlimit 128 --max_fuel 64 --max_ifuel 64"
let lt_pow2_32
(x: nat)
: Lemma
(x < 4294967296 <==> x < pow2 32)
= ()
#reset-options
let parse_flbytes_gen
(sz: nat... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.VLGen.fst.checked",
"LowParse.Bytes32.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.fsti.checked... | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module": "LowParse.Bytes32",
"short_module": "B32"
},
{
"abbrev": false,
"full_module": "Lo... | {
"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 |
min: Prims.nat ->
max: Prims.nat{min <= max /\ max > 0 /\ max < 4294967296} ->
x:
LowParse.Spec.VLData.parse_bounded_vldata_strong_t min
max
LowParse.Spec.Bytes.serialize_all_bytes
-> LowParse.Spec.Bytes.parse_bounded_vlbytes_t min max | Prims.Tot | [
"total"
] | [] | [
"Prims.nat",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_GreaterThan",
"Prims.op_LessThan",
"LowParse.Spec.VLData.parse_bounded_vldata_strong_t",
"LowParse.Spec.Bytes.parse_all_bytes_kind",
"FStar.Bytes.bytes",
"LowParse.Spec.Bytes.parse_all_bytes",
"LowParse.Spec.Bytes.ser... | [] | false | false | false | false | false | let synth_bounded_vlbytes
(min: nat)
(max: nat{min <= max /\ max > 0 /\ max < 4294967296})
(x: parse_bounded_vldata_strong_t min max #_ #_ #parse_all_bytes serialize_all_bytes)
: Tot (parse_bounded_vlbytes_t min max) =
| x | false |
Hacl.Impl.Frodo.Gen.fst | Hacl.Impl.Frodo.Gen.tmp_seed4_pre | val tmp_seed4_pre: h:mem -> tmp_seed:lbytes (18ul *! 4ul) -> Type0 | val tmp_seed4_pre: h:mem -> tmp_seed:lbytes (18ul *! 4ul) -> Type0 | let tmp_seed4_pre h tmp_seed =
let seed0 = LSeq.sub (as_seq h tmp_seed) 2 16 in
let seed1 = LSeq.sub (as_seq h tmp_seed) 20 16 in
let seed2 = LSeq.sub (as_seq h tmp_seed) 38 16 in
let seed3 = LSeq.sub (as_seq h tmp_seed) 56 16 in
seed0 == seed1 /\ seed0 == seed2 /\ seed0 == seed3 | {
"file_name": "code/frodo/Hacl.Impl.Frodo.Gen.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 52,
"end_line": 170,
"start_col": 0,
"start_line": 165
} | module Hacl.Impl.Frodo.Gen
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open LowStar.Buffer
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
open Hacl.Impl.Matrix
module ST = FStar.HyperStack.ST
module B = LowStar.Buffer
module LSeq = Lib.Sequence
module BSeq = Lib.ByteSequence
module Loops =... | {
"checked_file": "/",
"dependencies": [
"Spec.Frodo.Lemmas.fst.checked",
"Spec.Frodo.Gen.fst.checked",
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.Loops.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.... | [
{
"abbrev": true,
"full_module": "Hacl.SHA3",
"short_module": "SHA3"
},
{
"abbrev": true,
"full_module": "Spec.Frodo.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Frodo.Gen",
"short_module": "S"
},
{
"abbrev": true,
"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 | h: FStar.Monotonic.HyperStack.mem -> tmp_seed: Hacl.Impl.Matrix.lbytes (18ul *! 4ul) -> Type0 | Prims.Tot | [
"total"
] | [] | [
"FStar.Monotonic.HyperStack.mem",
"Hacl.Impl.Matrix.lbytes",
"Lib.IntTypes.op_Star_Bang",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"FStar.UInt32.__uint_to_t",
"Prims.l_and",
"Prims.eq2",
"Lib.Sequence.lseq",
"Lib.IntTypes.uint8",
"Prims.l_or",
"FStar.Seq.Base.seq",
"Lib.Sequence.to_seq",
"F... | [] | false | false | false | false | true | let tmp_seed4_pre h tmp_seed =
| let seed0 = LSeq.sub (as_seq h tmp_seed) 2 16 in
let seed1 = LSeq.sub (as_seq h tmp_seed) 20 16 in
let seed2 = LSeq.sub (as_seq h tmp_seed) 38 16 in
let seed3 = LSeq.sub (as_seq h tmp_seed) 56 16 in
seed0 == seed1 /\ seed0 == seed2 /\ seed0 == seed3 | false |
LowParse.Spec.Bytes.fst | LowParse.Spec.Bytes.parse_bounded_vlbytes' | val parse_bounded_vlbytes'
(min: nat)
(max: nat{min <= max /\ max > 0 /\ max < 4294967296})
(l: nat{l >= log256' max /\ l <= 4})
: Tot
(parser (parse_bounded_vldata_strong_kind min max l parse_all_bytes_kind)
(parse_bounded_vlbytes_t min max)) | val parse_bounded_vlbytes'
(min: nat)
(max: nat{min <= max /\ max > 0 /\ max < 4294967296})
(l: nat{l >= log256' max /\ l <= 4})
: Tot
(parser (parse_bounded_vldata_strong_kind min max l parse_all_bytes_kind)
(parse_bounded_vlbytes_t min max)) | let parse_bounded_vlbytes'
(min: nat)
(max: nat { min <= max /\ max > 0 /\ max < 4294967296 } )
(l: nat { l >= log256' max /\ l <= 4 } )
: Tot (parser (parse_bounded_vldata_strong_kind min max l parse_all_bytes_kind) (parse_bounded_vlbytes_t min max))
= parse_synth (parse_bounded_vlbytes_aux min max l) (synth_bou... | {
"file_name": "src/lowparse/LowParse.Spec.Bytes.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 83,
"end_line": 187,
"start_col": 0,
"start_line": 182
} | module LowParse.Spec.Bytes
include LowParse.Spec.VLGen
module B32 = LowParse.Bytes32
module Seq = FStar.Seq
module U32 = FStar.UInt32
#set-options "--z3rlimit 128 --max_fuel 64 --max_ifuel 64"
let lt_pow2_32
(x: nat)
: Lemma
(x < 4294967296 <==> x < pow2 32)
= ()
#reset-options
let parse_flbytes_gen
(sz: nat... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.VLGen.fst.checked",
"LowParse.Bytes32.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.fsti.checked... | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module": "LowParse.Bytes32",
"short_module": "B32"
},
{
"abbrev": false,
"full_module": "Lo... | {
"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 |
min: Prims.nat ->
max: Prims.nat{min <= max /\ max > 0 /\ max < 4294967296} ->
l: Prims.nat{l >= LowParse.Spec.BoundedInt.log256' max /\ l <= 4}
-> LowParse.Spec.Base.parser (LowParse.Spec.VLData.parse_bounded_vldata_strong_kind min
max
l
LowParse.Spec.Bytes.parse_all_bytes_... | Prims.Tot | [
"total"
] | [] | [
"Prims.nat",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_GreaterThan",
"Prims.op_LessThan",
"Prims.op_GreaterThanOrEqual",
"LowParse.Spec.BoundedInt.log256'",
"LowParse.Spec.Combinators.parse_synth",
"LowParse.Spec.VLData.parse_bounded_vldata_strong_kind",
"LowParse.Spec.By... | [] | false | false | false | false | false | let parse_bounded_vlbytes'
(min: nat)
(max: nat{min <= max /\ max > 0 /\ max < 4294967296})
(l: nat{l >= log256' max /\ l <= 4})
: Tot
(parser (parse_bounded_vldata_strong_kind min max l parse_all_bytes_kind)
(parse_bounded_vlbytes_t min max)) =
| parse_synth (parse_bounded_vlbytes_aux min max l) (synth_bounded_vlbytes min max) | false |
LowParse.Spec.Bytes.fst | LowParse.Spec.Bytes.synth_bounded_vlbytes_recip | val synth_bounded_vlbytes_recip
(min: nat)
(max: nat{min <= max /\ max > 0 /\ max < 4294967296})
(x: parse_bounded_vlbytes_t min max)
: Tot (parse_bounded_vldata_strong_t min max #_ #_ #parse_all_bytes serialize_all_bytes) | val synth_bounded_vlbytes_recip
(min: nat)
(max: nat{min <= max /\ max > 0 /\ max < 4294967296})
(x: parse_bounded_vlbytes_t min max)
: Tot (parse_bounded_vldata_strong_t min max #_ #_ #parse_all_bytes serialize_all_bytes) | let synth_bounded_vlbytes_recip
(min: nat)
(max: nat { min <= max /\ max > 0 /\ max < 4294967296 })
(x: parse_bounded_vlbytes_t min max)
: Tot (parse_bounded_vldata_strong_t min max #_ #_ #parse_all_bytes serialize_all_bytes)
= x | {
"file_name": "src/lowparse/LowParse.Spec.Bytes.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 3,
"end_line": 234,
"start_col": 0,
"start_line": 229
} | module LowParse.Spec.Bytes
include LowParse.Spec.VLGen
module B32 = LowParse.Bytes32
module Seq = FStar.Seq
module U32 = FStar.UInt32
#set-options "--z3rlimit 128 --max_fuel 64 --max_ifuel 64"
let lt_pow2_32
(x: nat)
: Lemma
(x < 4294967296 <==> x < pow2 32)
= ()
#reset-options
let parse_flbytes_gen
(sz: nat... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.VLGen.fst.checked",
"LowParse.Bytes32.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.fsti.checked... | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module": "LowParse.Bytes32",
"short_module": "B32"
},
{
"abbrev": false,
"full_module": "Lo... | {
"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 |
min: Prims.nat ->
max: Prims.nat{min <= max /\ max > 0 /\ max < 4294967296} ->
x: LowParse.Spec.Bytes.parse_bounded_vlbytes_t min max
-> LowParse.Spec.VLData.parse_bounded_vldata_strong_t min
max
LowParse.Spec.Bytes.serialize_all_bytes | Prims.Tot | [
"total"
] | [] | [
"Prims.nat",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_GreaterThan",
"Prims.op_LessThan",
"LowParse.Spec.Bytes.parse_bounded_vlbytes_t",
"LowParse.Spec.VLData.parse_bounded_vldata_strong_t",
"LowParse.Spec.Bytes.parse_all_bytes_kind",
"FStar.Bytes.bytes",
"LowParse.Spec.B... | [] | false | false | false | false | false | let synth_bounded_vlbytes_recip
(min: nat)
(max: nat{min <= max /\ max > 0 /\ max < 4294967296})
(x: parse_bounded_vlbytes_t min max)
: Tot (parse_bounded_vldata_strong_t min max #_ #_ #parse_all_bytes serialize_all_bytes) =
| x | false |
LowParse.Spec.Bytes.fst | LowParse.Spec.Bytes.serialize_bounded_vlbytes' | val serialize_bounded_vlbytes'
(min: nat)
(max: nat{min <= max /\ max > 0 /\ max < 4294967296})
(l: nat{l >= log256' max /\ l <= 4})
: Tot (serializer (parse_bounded_vlbytes' min max l)) | val serialize_bounded_vlbytes'
(min: nat)
(max: nat{min <= max /\ max > 0 /\ max < 4294967296})
(l: nat{l >= log256' max /\ l <= 4})
: Tot (serializer (parse_bounded_vlbytes' min max l)) | let serialize_bounded_vlbytes'
(min: nat)
(max: nat { min <= max /\ max > 0 /\ max < 4294967296 } )
(l: nat { l >= log256' max /\ l <= 4 } )
: Tot (serializer (parse_bounded_vlbytes' min max l))
= serialize_synth
(parse_bounded_vlbytes_aux min max l)
(synth_bounded_vlbytes min max)
(serialize_bounded_... | {
"file_name": "src/lowparse/LowParse.Spec.Bytes.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 6,
"end_line": 246,
"start_col": 0,
"start_line": 236
} | module LowParse.Spec.Bytes
include LowParse.Spec.VLGen
module B32 = LowParse.Bytes32
module Seq = FStar.Seq
module U32 = FStar.UInt32
#set-options "--z3rlimit 128 --max_fuel 64 --max_ifuel 64"
let lt_pow2_32
(x: nat)
: Lemma
(x < 4294967296 <==> x < pow2 32)
= ()
#reset-options
let parse_flbytes_gen
(sz: nat... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.VLGen.fst.checked",
"LowParse.Bytes32.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.fsti.checked... | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module": "LowParse.Bytes32",
"short_module": "B32"
},
{
"abbrev": false,
"full_module": "Lo... | {
"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 |
min: Prims.nat ->
max: Prims.nat{min <= max /\ max > 0 /\ max < 4294967296} ->
l: Prims.nat{l >= LowParse.Spec.BoundedInt.log256' max /\ l <= 4}
-> LowParse.Spec.Base.serializer (LowParse.Spec.Bytes.parse_bounded_vlbytes' min max l) | Prims.Tot | [
"total"
] | [] | [
"Prims.nat",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_GreaterThan",
"Prims.op_LessThan",
"Prims.op_GreaterThanOrEqual",
"LowParse.Spec.BoundedInt.log256'",
"LowParse.Spec.Combinators.serialize_synth",
"LowParse.Spec.VLData.parse_bounded_vldata_strong_kind",
"LowParse.Spe... | [] | false | false | false | false | false | let serialize_bounded_vlbytes'
(min: nat)
(max: nat{min <= max /\ max > 0 /\ max < 4294967296})
(l: nat{l >= log256' max /\ l <= 4})
: Tot (serializer (parse_bounded_vlbytes' min max l)) =
| serialize_synth (parse_bounded_vlbytes_aux min max l)
(synth_bounded_vlbytes min max)
(serialize_bounded_vlbytes_aux min max l)
(synth_bounded_vlbytes_recip min max)
() | false |
LowParse.Spec.Bytes.fst | LowParse.Spec.Bytes.serialize_bounded_vlbytes_aux | val serialize_bounded_vlbytes_aux
(min: nat)
(max: nat{min <= max /\ max > 0 /\ max < 4294967296})
(l: nat{l >= log256' max /\ l <= 4})
: Tot (serializer (parse_bounded_vlbytes_aux min max l)) | val serialize_bounded_vlbytes_aux
(min: nat)
(max: nat{min <= max /\ max > 0 /\ max < 4294967296})
(l: nat{l >= log256' max /\ l <= 4})
: Tot (serializer (parse_bounded_vlbytes_aux min max l)) | let serialize_bounded_vlbytes_aux
(min: nat)
(max: nat { min <= max /\ max > 0 /\ max < 4294967296 } )
(l: nat { l >= log256' max /\ l <= 4 } )
: Tot (serializer (parse_bounded_vlbytes_aux min max l))
= serialize_bounded_vldata_strong' min max l serialize_all_bytes | {
"file_name": "src/lowparse/LowParse.Spec.Bytes.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 64,
"end_line": 226,
"start_col": 0,
"start_line": 221
} | module LowParse.Spec.Bytes
include LowParse.Spec.VLGen
module B32 = LowParse.Bytes32
module Seq = FStar.Seq
module U32 = FStar.UInt32
#set-options "--z3rlimit 128 --max_fuel 64 --max_ifuel 64"
let lt_pow2_32
(x: nat)
: Lemma
(x < 4294967296 <==> x < pow2 32)
= ()
#reset-options
let parse_flbytes_gen
(sz: nat... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.VLGen.fst.checked",
"LowParse.Bytes32.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.fsti.checked... | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module": "LowParse.Bytes32",
"short_module": "B32"
},
{
"abbrev": false,
"full_module": "Lo... | {
"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 |
min: Prims.nat ->
max: Prims.nat{min <= max /\ max > 0 /\ max < 4294967296} ->
l: Prims.nat{l >= LowParse.Spec.BoundedInt.log256' max /\ l <= 4}
-> LowParse.Spec.Base.serializer (LowParse.Spec.Bytes.parse_bounded_vlbytes_aux min max l) | Prims.Tot | [
"total"
] | [] | [
"Prims.nat",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_GreaterThan",
"Prims.op_LessThan",
"Prims.op_GreaterThanOrEqual",
"LowParse.Spec.BoundedInt.log256'",
"LowParse.Spec.VLData.serialize_bounded_vldata_strong'",
"LowParse.Spec.Bytes.parse_all_bytes_kind",
"FStar.Bytes.b... | [] | false | false | false | false | false | let serialize_bounded_vlbytes_aux
(min: nat)
(max: nat{min <= max /\ max > 0 /\ max < 4294967296})
(l: nat{l >= log256' max /\ l <= 4})
: Tot (serializer (parse_bounded_vlbytes_aux min max l)) =
| serialize_bounded_vldata_strong' min max l serialize_all_bytes | false |
LowParse.Spec.Bytes.fst | LowParse.Spec.Bytes.length_serialize_bounded_vlbytes | val length_serialize_bounded_vlbytes
(min: nat)
(max: nat{min <= max /\ max > 0 /\ max < 4294967296})
(x: parse_bounded_vlbytes_t min max)
: Lemma
(Seq.length (serialize (serialize_bounded_vlbytes min max) x) == log256' max + B32.length x) | val length_serialize_bounded_vlbytes
(min: nat)
(max: nat{min <= max /\ max > 0 /\ max < 4294967296})
(x: parse_bounded_vlbytes_t min max)
: Lemma
(Seq.length (serialize (serialize_bounded_vlbytes min max) x) == log256' max + B32.length x) | let length_serialize_bounded_vlbytes
(min: nat)
(max: nat { min <= max /\ max > 0 /\ max < 4294967296 } )
(x: parse_bounded_vlbytes_t min max)
: Lemma
(Seq.length (serialize (serialize_bounded_vlbytes min max) x) == log256' max + B32.length x)
= length_serialize_bounded_vlbytes' min max (log256' max) x | {
"file_name": "src/lowparse/LowParse.Spec.Bytes.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 59,
"end_line": 275,
"start_col": 0,
"start_line": 269
} | module LowParse.Spec.Bytes
include LowParse.Spec.VLGen
module B32 = LowParse.Bytes32
module Seq = FStar.Seq
module U32 = FStar.UInt32
#set-options "--z3rlimit 128 --max_fuel 64 --max_ifuel 64"
let lt_pow2_32
(x: nat)
: Lemma
(x < 4294967296 <==> x < pow2 32)
= ()
#reset-options
let parse_flbytes_gen
(sz: nat... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.VLGen.fst.checked",
"LowParse.Bytes32.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.fsti.checked... | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module": "LowParse.Bytes32",
"short_module": "B32"
},
{
"abbrev": false,
"full_module": "Lo... | {
"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 |
min: Prims.nat ->
max: Prims.nat{min <= max /\ max > 0 /\ max < 4294967296} ->
x: LowParse.Spec.Bytes.parse_bounded_vlbytes_t min max
-> FStar.Pervasives.Lemma
(ensures
FStar.Seq.Base.length (LowParse.Spec.Base.serialize (LowParse.Spec.Bytes.serialize_bounded_vlbytes
min
... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.nat",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_GreaterThan",
"Prims.op_LessThan",
"LowParse.Spec.Bytes.parse_bounded_vlbytes_t",
"LowParse.Spec.Bytes.length_serialize_bounded_vlbytes'",
"LowParse.Spec.BoundedInt.log256'",
"Prims.unit",
"Prims.l_True",
"Prims.squ... | [] | true | false | true | false | false | let length_serialize_bounded_vlbytes
(min: nat)
(max: nat{min <= max /\ max > 0 /\ max < 4294967296})
(x: parse_bounded_vlbytes_t min max)
: Lemma
(Seq.length (serialize (serialize_bounded_vlbytes min max) x) == log256' max + B32.length x) =
| length_serialize_bounded_vlbytes' min max (log256' max) x | false |
Vale.Stdcalls.X64.Poly.fsti | Vale.Stdcalls.X64.Poly.uint64 | val uint64 : Prims.eqtype | let uint64 = UInt64.t | {
"file_name": "vale/code/arch/x64/interop/Vale.Stdcalls.X64.Poly.fsti",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 21,
"end_line": 29,
"start_col": 0,
"start_line": 29
} | module Vale.Stdcalls.X64.Poly
open FStar.Mul
val z3rlimit_hack (x:nat) : squash (x < x + x + 1)
#reset-options "--z3rlimit 50"
open FStar.HyperStack.ST
module HS = FStar.HyperStack
module B = LowStar.Buffer
module IB = LowStar.ImmutableBuffer
module DV = LowStar.BufferView.Down
open Vale.Def.Types_s
open Vale.Intero... | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.MemoryAdapters.fsti.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.Poly1305.X64.fsti.checked",
"Vale.Poly1305.Math.fsti.checked",
"Vale.... | [
{
"abbrev": false,
"full_module": "Vale.Poly1305.Math",
"short_module": null
},
{
"abbrev": true,
"full_module": "Vale.Poly1305.X64",
"short_module": "PO"
},
{
"abbrev": true,
"full_module": "Vale.X64.Machine_s",
"short_module": "MS"
},
{
"abbrev": true,
"full... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | Prims.eqtype | Prims.Tot | [
"total"
] | [] | [
"FStar.UInt64.t"
] | [] | false | false | false | true | false | let uint64 =
| UInt64.t | false | |
LowParse.Spec.Bytes.fst | LowParse.Spec.Bytes.serialize_bounded_vlbytes | val serialize_bounded_vlbytes (min: nat) (max: nat{min <= max /\ max > 0 /\ max < 4294967296})
: Tot (serializer (parse_bounded_vlbytes min max)) | val serialize_bounded_vlbytes (min: nat) (max: nat{min <= max /\ max > 0 /\ max < 4294967296})
: Tot (serializer (parse_bounded_vlbytes min max)) | let serialize_bounded_vlbytes
(min: nat)
(max: nat { min <= max /\ max > 0 /\ max < 4294967296 } )
: Tot (serializer (parse_bounded_vlbytes min max))
= serialize_bounded_vlbytes' min max (log256' max) | {
"file_name": "src/lowparse/LowParse.Spec.Bytes.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 50,
"end_line": 252,
"start_col": 0,
"start_line": 248
} | module LowParse.Spec.Bytes
include LowParse.Spec.VLGen
module B32 = LowParse.Bytes32
module Seq = FStar.Seq
module U32 = FStar.UInt32
#set-options "--z3rlimit 128 --max_fuel 64 --max_ifuel 64"
let lt_pow2_32
(x: nat)
: Lemma
(x < 4294967296 <==> x < pow2 32)
= ()
#reset-options
let parse_flbytes_gen
(sz: nat... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.VLGen.fst.checked",
"LowParse.Bytes32.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.fsti.checked... | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module": "LowParse.Bytes32",
"short_module": "B32"
},
{
"abbrev": false,
"full_module": "Lo... | {
"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 | min: Prims.nat -> max: Prims.nat{min <= max /\ max > 0 /\ max < 4294967296}
-> LowParse.Spec.Base.serializer (LowParse.Spec.Bytes.parse_bounded_vlbytes min max) | Prims.Tot | [
"total"
] | [] | [
"Prims.nat",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_GreaterThan",
"Prims.op_LessThan",
"LowParse.Spec.Bytes.serialize_bounded_vlbytes'",
"LowParse.Spec.BoundedInt.log256'",
"LowParse.Spec.Base.serializer",
"LowParse.Spec.VLData.parse_bounded_vldata_strong_kind",
"LowPa... | [] | false | false | false | false | false | let serialize_bounded_vlbytes (min: nat) (max: nat{min <= max /\ max > 0 /\ max < 4294967296})
: Tot (serializer (parse_bounded_vlbytes min max)) =
| serialize_bounded_vlbytes' min max (log256' max) | false |
LowParse.Spec.Bytes.fst | LowParse.Spec.Bytes.parse_bounded_vlgenbytes | val parse_bounded_vlgenbytes
(min: nat)
(max: nat{min <= max /\ max > 0 /\ max < 4294967296})
(#sk: parser_kind)
(pk: parser sk (bounded_int32 min max))
: Tot
(parser (parse_bounded_vlgen_kind sk min max parse_all_bytes_kind)
(parse_bounded_vlbytes_t min max)) | val parse_bounded_vlgenbytes
(min: nat)
(max: nat{min <= max /\ max > 0 /\ max < 4294967296})
(#sk: parser_kind)
(pk: parser sk (bounded_int32 min max))
: Tot
(parser (parse_bounded_vlgen_kind sk min max parse_all_bytes_kind)
(parse_bounded_vlbytes_t min max)) | let parse_bounded_vlgenbytes
(min: nat)
(max: nat { min <= max /\ max > 0 /\ max < 4294967296 })
(#sk: parser_kind)
(pk: parser sk (bounded_int32 min max))
: Tot (parser (parse_bounded_vlgen_kind sk min max parse_all_bytes_kind) (parse_bounded_vlbytes_t min max))
= parse_bounded_vlgen min max pk serialize_all_b... | {
"file_name": "src/lowparse/LowParse.Spec.Bytes.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 96,
"end_line": 283,
"start_col": 0,
"start_line": 277
} | module LowParse.Spec.Bytes
include LowParse.Spec.VLGen
module B32 = LowParse.Bytes32
module Seq = FStar.Seq
module U32 = FStar.UInt32
#set-options "--z3rlimit 128 --max_fuel 64 --max_ifuel 64"
let lt_pow2_32
(x: nat)
: Lemma
(x < 4294967296 <==> x < pow2 32)
= ()
#reset-options
let parse_flbytes_gen
(sz: nat... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.VLGen.fst.checked",
"LowParse.Bytes32.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.fsti.checked... | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module": "LowParse.Bytes32",
"short_module": "B32"
},
{
"abbrev": false,
"full_module": "Lo... | {
"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 |
min: Prims.nat ->
max: Prims.nat{min <= max /\ max > 0 /\ max < 4294967296} ->
pk: LowParse.Spec.Base.parser sk (LowParse.Spec.BoundedInt.bounded_int32 min max)
-> LowParse.Spec.Base.parser (LowParse.Spec.VLGen.parse_bounded_vlgen_kind sk
min
max
LowParse.Spec.Bytes.parse_al... | Prims.Tot | [
"total"
] | [] | [
"Prims.nat",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_GreaterThan",
"Prims.op_LessThan",
"LowParse.Spec.Base.parser_kind",
"LowParse.Spec.Base.parser",
"LowParse.Spec.BoundedInt.bounded_int32",
"LowParse.Spec.Combinators.parse_synth",
"LowParse.Spec.VLGen.parse_bounded_v... | [] | false | false | false | false | false | let parse_bounded_vlgenbytes
(min: nat)
(max: nat{min <= max /\ max > 0 /\ max < 4294967296})
(#sk: parser_kind)
(pk: parser sk (bounded_int32 min max))
: Tot
(parser (parse_bounded_vlgen_kind sk min max parse_all_bytes_kind)
(parse_bounded_vlbytes_t min max)) =
| (parse_bounded_vlgen min max pk serialize_all_bytes) `parse_synth` (synth_bounded_vlbytes min max) | false |
Hacl.Impl.Frodo.Gen.fst | Hacl.Impl.Frodo.Gen.frodo_gen_matrix_shake | val frodo_gen_matrix_shake:
n:size_t{0 < v n /\ v n * v n <= max_size_t /\ v n <= maxint U16}
-> seed:lbytes 16ul
-> res:matrix_t n n
-> Stack unit
(requires fun h ->
live h seed /\ live h res /\ disjoint seed res)
(ensures fun h0 _ h1 -> modifies1 res h0 h1 /\
as_matrix h1 res == S.frodo... | val frodo_gen_matrix_shake:
n:size_t{0 < v n /\ v n * v n <= max_size_t /\ v n <= maxint U16}
-> seed:lbytes 16ul
-> res:matrix_t n n
-> Stack unit
(requires fun h ->
live h seed /\ live h res /\ disjoint seed res)
(ensures fun h0 _ h1 -> modifies1 res h0 h1 /\
as_matrix h1 res == S.frodo... | let frodo_gen_matrix_shake n seed res =
push_frame ();
let r = create (size 2 *! n) (u8 0) in
let tmp_seed = create 18ul (u8 0) in
copy (sub tmp_seed 2ul 16ul) seed;
memset res (u16 0) (n *! n);
let h0 = ST.get () in
LSeq.eq_intro (LSeq.sub (as_seq h0 res) 0 (v n * v n)) (as_seq h0 res);
[@ inline_let... | {
"file_name": "code/frodo/Hacl.Impl.Frodo.Gen.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 14,
"end_line": 130,
"start_col": 0,
"start_line": 106
} | module Hacl.Impl.Frodo.Gen
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open LowStar.Buffer
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
open Hacl.Impl.Matrix
module ST = FStar.HyperStack.ST
module B = LowStar.Buffer
module LSeq = Lib.Sequence
module BSeq = Lib.ByteSequence
module Loops =... | {
"checked_file": "/",
"dependencies": [
"Spec.Frodo.Lemmas.fst.checked",
"Spec.Frodo.Gen.fst.checked",
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.Loops.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.... | [
{
"abbrev": true,
"full_module": "Hacl.SHA3",
"short_module": "SHA3"
},
{
"abbrev": true,
"full_module": "Spec.Frodo.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Frodo.Gen",
"short_module": "S"
},
{
"abbrev": true,
"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 |
n:
Lib.IntTypes.size_t
{ 0 < Lib.IntTypes.v n /\ Lib.IntTypes.v n * Lib.IntTypes.v n <= Lib.IntTypes.max_size_t /\
Lib.IntTypes.v n <= Lib.IntTypes.maxint Lib.IntTypes.U16 } ->
seed: Hacl.Impl.Matrix.lbytes 16ul ->
res: Hacl.Impl.Matrix.matrix_t n n
-> FStar.HyperStack.ST.Stack Pr... | FStar.HyperStack.ST.Stack | [] | [] | [
"Lib.IntTypes.size_t",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThan",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Prims.op_LessThanOrEqual",
"FStar.Mul.op_Star",
"Lib.IntTypes.max_size_t",
"Lib.IntTypes.maxint",
"Lib.IntTypes.U16",
"Hacl.Impl.Matrix.lbytes",
"FStar.UInt32.... | [] | false | true | false | false | false | let frodo_gen_matrix_shake n seed res =
| push_frame ();
let r = create (size 2 *! n) (u8 0) in
let tmp_seed = create 18ul (u8 0) in
copy (sub tmp_seed 2ul 16ul) seed;
memset res (u16 0) (n *! n);
let h0 = ST.get () in
LSeq.eq_intro (LSeq.sub (as_seq h0 res) 0 (v n * v n)) (as_seq h0 res);
[@@ inline_let ]let spec h0 = S.frodo_gen_matrix_shake1 (v n) (as_seq h... | false |
Vale.Stdcalls.X64.Poly.fsti | Vale.Stdcalls.X64.Poly.b64 | val b64 : Type0 | let b64 = buf_t TUInt8 TUInt64 | {
"file_name": "vale/code/arch/x64/interop/Vale.Stdcalls.X64.Poly.fsti",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 30,
"end_line": 38,
"start_col": 0,
"start_line": 38
} | module Vale.Stdcalls.X64.Poly
open FStar.Mul
val z3rlimit_hack (x:nat) : squash (x < x + x + 1)
#reset-options "--z3rlimit 50"
open FStar.HyperStack.ST
module HS = FStar.HyperStack
module B = LowStar.Buffer
module IB = LowStar.ImmutableBuffer
module DV = LowStar.BufferView.Down
open Vale.Def.Types_s
open Vale.Intero... | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.MemoryAdapters.fsti.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.Poly1305.X64.fsti.checked",
"Vale.Poly1305.Math.fsti.checked",
"Vale.... | [
{
"abbrev": false,
"full_module": "Vale.Poly1305.Math",
"short_module": null
},
{
"abbrev": true,
"full_module": "Vale.Poly1305.X64",
"short_module": "PO"
},
{
"abbrev": true,
"full_module": "Vale.X64.Machine_s",
"short_module": "MS"
},
{
"abbrev": true,
"full... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | Type0 | Prims.Tot | [
"total"
] | [] | [
"Vale.Interop.Base.buf_t",
"Vale.Arch.HeapTypes_s.TUInt8",
"Vale.Arch.HeapTypes_s.TUInt64"
] | [] | false | false | false | true | true | let b64 =
| buf_t TUInt8 TUInt64 | false | |
ElGamal.fst | ElGamal.elgamal | val elgamal (m: group) : Rand group | val elgamal (m: group) : Rand group | let elgamal (m:group)
: Rand group
= let z = sample () in
g^z | {
"file_name": "examples/rel/ElGamal.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 7,
"end_line": 32,
"start_col": 0,
"start_line": 29
} | (*
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": [
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.DM4F.Random.fst.checked",
"FStar.DM4F.Heap.Random.fsti.checked",
"ElGamal.Group.fst.checked"
],
"interface_file": false,
"source_file": "ElGamal.fst"
} | [
{
"abbrev": false,
"full_module": "ElGamal.Group",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.DM4F.Random",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.DM4F.Heap.Random",
"short_module": null
},
{
"abbrev": false,
"fu... | {
"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 | m: ElGamal.Group.group -> FStar.DM4F.Random.Rand ElGamal.Group.group | FStar.DM4F.Random.Rand | [] | [] | [
"ElGamal.Group.group",
"ElGamal.Group.op_Hat",
"ElGamal.Group.g",
"FStar.DM4F.Heap.Random.elem",
"FStar.DM4F.Random.sample"
] | [] | false | true | false | false | false | let elgamal (m: group) : Rand group =
| let z = sample () in
g ^ z | false |
Selectors.LList2.fst | Selectors.LList2.intro_llist_nil | val intro_llist_nil (#opened: _) (a:Type0)
: SteelGhost unit opened emp (fun _ -> llist (null_llist #a))
(requires fun _ -> True)
(ensures fun _ _ h1 -> v_llist #a null_llist h1 == []) | val intro_llist_nil (#opened: _) (a:Type0)
: SteelGhost unit opened emp (fun _ -> llist (null_llist #a))
(requires fun _ -> True)
(ensures fun _ _ h1 -> v_llist #a null_llist h1 == []) | let intro_llist_nil a =
intro_vrewrite emp (v_null_rewrite a);
change_equal_slprop
(emp `vrewrite` v_null_rewrite a)
(llist0 (null_llist #a));
llist_of_llist0 (null_llist #a) | {
"file_name": "share/steel/examples/steel/Selectors.LList2.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 33,
"end_line": 232,
"start_col": 0,
"start_line": 227
} | module Selectors.LList2
open Steel.FractionalPermission
module Mem = Steel.Memory
#push-options "--__no_positivity"
noeq
type cell (a: Type0) = {
tail_fuel: Ghost.erased nat;
next: ref (cell a);
data: a;
}
#pop-options
let next #a (c:cell a) : t a = c.next
let data #a (c:cell a) : a = c.data
let mk_cell #a (n:... | {
"checked_file": "/",
"dependencies": [
"Steel.Memory.fsti.checked",
"Steel.FractionalPermission.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Ghost.fsti.checked"
],
"interface_file": true,
"source_file": "Selectors.LList2.fst"
} | [
{
"abbrev": true,
"full_module": "Steel.Memory",
"short_module": "Mem"
},
{
"abbrev": false,
"full_module": "Steel.FractionalPermission",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "L"
},
{
"abbrev": false,
"full... | {
"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: Type0 -> Steel.Effect.Atomic.SteelGhost Prims.unit | Steel.Effect.Atomic.SteelGhost | [] | [] | [
"Steel.Memory.inames",
"Selectors.LList2.llist_of_llist0",
"Selectors.LList2.null_llist",
"Prims.unit",
"Steel.Effect.Atomic.change_equal_slprop",
"Steel.Effect.Common.vrewrite",
"Steel.Effect.Common.emp",
"Prims.list",
"Selectors.LList2.v_null_rewrite",
"Selectors.LList2.llist0",
"Steel.Effect.... | [] | false | true | false | false | false | let intro_llist_nil a =
| intro_vrewrite emp (v_null_rewrite a);
change_equal_slprop (emp `vrewrite` (v_null_rewrite a)) (llist0 (null_llist #a));
llist_of_llist0 (null_llist #a) | false |
Vale.Stdcalls.X64.Poly.fsti | Vale.Stdcalls.X64.Poly.t64_mod | val t64_mod : Vale.Interop.Base.td | let t64_mod = TD_Buffer TUInt8 TUInt64 ({modified=true; strict_disjointness=false; taint=MS.Public}) | {
"file_name": "vale/code/arch/x64/interop/Vale.Stdcalls.X64.Poly.fsti",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 100,
"end_line": 40,
"start_col": 0,
"start_line": 40
} | module Vale.Stdcalls.X64.Poly
open FStar.Mul
val z3rlimit_hack (x:nat) : squash (x < x + x + 1)
#reset-options "--z3rlimit 50"
open FStar.HyperStack.ST
module HS = FStar.HyperStack
module B = LowStar.Buffer
module IB = LowStar.ImmutableBuffer
module DV = LowStar.BufferView.Down
open Vale.Def.Types_s
open Vale.Intero... | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.MemoryAdapters.fsti.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.Poly1305.X64.fsti.checked",
"Vale.Poly1305.Math.fsti.checked",
"Vale.... | [
{
"abbrev": false,
"full_module": "Vale.Poly1305.Math",
"short_module": null
},
{
"abbrev": true,
"full_module": "Vale.Poly1305.X64",
"short_module": "PO"
},
{
"abbrev": true,
"full_module": "Vale.X64.Machine_s",
"short_module": "MS"
},
{
"abbrev": true,
"full... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | Vale.Interop.Base.td | Prims.Tot | [
"total"
] | [] | [
"Vale.Interop.Base.TD_Buffer",
"Vale.Arch.HeapTypes_s.TUInt8",
"Vale.Arch.HeapTypes_s.TUInt64",
"Vale.Interop.Base.Mkbuffer_qualifiers",
"Vale.Arch.HeapTypes_s.Public"
] | [] | false | false | false | true | false | let t64_mod =
| TD_Buffer TUInt8 TUInt64 ({ modified = true; strict_disjointness = false; taint = MS.Public }) | false | |
Vale.Stdcalls.X64.Poly.fsti | Vale.Stdcalls.X64.Poly.t64_no_mod | val t64_no_mod : Vale.Interop.Base.td | let t64_no_mod = TD_Buffer TUInt8 TUInt64 ({modified=false; strict_disjointness=false; taint=MS.Public}) | {
"file_name": "vale/code/arch/x64/interop/Vale.Stdcalls.X64.Poly.fsti",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 104,
"end_line": 42,
"start_col": 0,
"start_line": 42
} | module Vale.Stdcalls.X64.Poly
open FStar.Mul
val z3rlimit_hack (x:nat) : squash (x < x + x + 1)
#reset-options "--z3rlimit 50"
open FStar.HyperStack.ST
module HS = FStar.HyperStack
module B = LowStar.Buffer
module IB = LowStar.ImmutableBuffer
module DV = LowStar.BufferView.Down
open Vale.Def.Types_s
open Vale.Intero... | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.MemoryAdapters.fsti.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.Poly1305.X64.fsti.checked",
"Vale.Poly1305.Math.fsti.checked",
"Vale.... | [
{
"abbrev": false,
"full_module": "Vale.Poly1305.Math",
"short_module": null
},
{
"abbrev": true,
"full_module": "Vale.Poly1305.X64",
"short_module": "PO"
},
{
"abbrev": true,
"full_module": "Vale.X64.Machine_s",
"short_module": "MS"
},
{
"abbrev": true,
"full... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | Vale.Interop.Base.td | Prims.Tot | [
"total"
] | [] | [
"Vale.Interop.Base.TD_Buffer",
"Vale.Arch.HeapTypes_s.TUInt8",
"Vale.Arch.HeapTypes_s.TUInt64",
"Vale.Interop.Base.Mkbuffer_qualifiers",
"Vale.Arch.HeapTypes_s.Public"
] | [] | false | false | false | true | false | let t64_no_mod =
| TD_Buffer TUInt8 TUInt64 ({ modified = false; strict_disjointness = false; taint = MS.Public }) | false | |
ElGamal.fst | ElGamal.elgamal' | val elgamal' (m: group) : Rand group | val elgamal' (m: group) : Rand group | let elgamal' (m:group) : Rand group =
let z = sample () in
(g^z) * m | {
"file_name": "examples/rel/ElGamal.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 11,
"end_line": 36,
"start_col": 0,
"start_line": 34
} | (*
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": [
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.DM4F.Random.fst.checked",
"FStar.DM4F.Heap.Random.fsti.checked",
"ElGamal.Group.fst.checked"
],
"interface_file": false,
"source_file": "ElGamal.fst"
} | [
{
"abbrev": false,
"full_module": "ElGamal.Group",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.DM4F.Random",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.DM4F.Heap.Random",
"short_module": null
},
{
"abbrev": false,
"fu... | {
"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 | m: ElGamal.Group.group -> FStar.DM4F.Random.Rand ElGamal.Group.group | FStar.DM4F.Random.Rand | [] | [] | [
"ElGamal.Group.group",
"ElGamal.Group.op_Star",
"ElGamal.Group.op_Hat",
"ElGamal.Group.g",
"FStar.DM4F.Heap.Random.elem",
"FStar.DM4F.Random.sample"
] | [] | false | true | false | false | false | let elgamal' (m: group) : Rand group =
| let z = sample () in
(g ^ z) * m | false |
LowParse.Spec.Bytes.fst | LowParse.Spec.Bytes.length_serialize_bounded_vlgenbytes | val length_serialize_bounded_vlgenbytes
(min: nat)
(max: nat{min <= max /\ max > 0 /\ max < 4294967296})
(#kk: parser_kind)
(#pk: parser kk (bounded_int32 min max))
(sk: serializer pk {kk.parser_kind_subkind == Some ParserStrong})
(x: parse_bounded_vlbytes_t min max)
: Lemma
... | val length_serialize_bounded_vlgenbytes
(min: nat)
(max: nat{min <= max /\ max > 0 /\ max < 4294967296})
(#kk: parser_kind)
(#pk: parser kk (bounded_int32 min max))
(sk: serializer pk {kk.parser_kind_subkind == Some ParserStrong})
(x: parse_bounded_vlbytes_t min max)
: Lemma
... | let length_serialize_bounded_vlgenbytes
(min: nat)
(max: nat { min <= max /\ max > 0 /\ max < 4294967296 })
(#kk: parser_kind)
(#pk: parser kk (bounded_int32 min max))
(sk: serializer pk { kk.parser_kind_subkind == Some ParserStrong })
(x: parse_bounded_vlbytes_t min max)
: Lemma
(
Seq.length (seriali... | {
"file_name": "src/lowparse/LowParse.Spec.Bytes.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 5,
"end_line": 323,
"start_col": 0,
"start_line": 299
} | module LowParse.Spec.Bytes
include LowParse.Spec.VLGen
module B32 = LowParse.Bytes32
module Seq = FStar.Seq
module U32 = FStar.UInt32
#set-options "--z3rlimit 128 --max_fuel 64 --max_ifuel 64"
let lt_pow2_32
(x: nat)
: Lemma
(x < 4294967296 <==> x < pow2 32)
= ()
#reset-options
let parse_flbytes_gen
(sz: nat... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.VLGen.fst.checked",
"LowParse.Bytes32.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.fsti.checked... | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module": "LowParse.Bytes32",
"short_module": "B32"
},
{
"abbrev": false,
"full_module": "Lo... | {
"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 |
min: Prims.nat ->
max: Prims.nat{min <= max /\ max > 0 /\ max < 4294967296} ->
sk:
LowParse.Spec.Base.serializer pk
{ Mkparser_kind'?.parser_kind_subkind kk ==
FStar.Pervasives.Native.Some LowParse.Spec.Base.ParserStrong } ->
x: LowParse.Spec.Bytes.parse_bounded_vlbytes_t min ma... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.nat",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_GreaterThan",
"Prims.op_LessThan",
"LowParse.Spec.Base.parser_kind",
"LowParse.Spec.Base.parser",
"LowParse.Spec.BoundedInt.bounded_int32",
"LowParse.Spec.Base.serializer",
"Prims.eq2",
"FStar.Pervasives.Native.opti... | [] | true | false | true | false | false | let length_serialize_bounded_vlgenbytes
(min: nat)
(max: nat{min <= max /\ max > 0 /\ max < 4294967296})
(#kk: parser_kind)
(#pk: parser kk (bounded_int32 min max))
(sk: serializer pk {kk.parser_kind_subkind == Some ParserStrong})
(x: parse_bounded_vlbytes_t min max)
: Lemma
... | serialize_synth_eq (parse_bounded_vlgen min max pk serialize_all_bytes)
(synth_bounded_vlbytes min max)
(serialize_bounded_vlgen min max sk serialize_all_bytes)
(synth_bounded_vlbytes_recip min max)
()
x;
serialize_bounded_vlgen_unfold min max sk serialize_all_bytes x | false |
Spec.Frodo.Encode.fst | Spec.Frodo.Encode.decode_templong_t | val decode_templong_t : i:size_nat{i <= 8} -> Type0 | val decode_templong_t : i:size_nat{i <= 8} -> Type0 | let decode_templong_t i = uint64 | {
"file_name": "specs/frodo/Spec.Frodo.Encode.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 32,
"end_line": 194,
"start_col": 0,
"start_line": 194
} | module Spec.Frodo.Encode
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Spec.Matrix
open Spec.Frodo.Lemmas
module LSeq = Lib.Sequence
module Loops = Lib.LoopCombinators
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
(** The simplified version of the encode and decode functions when... | {
"checked_file": "/",
"dependencies": [
"Spec.Matrix.fst.checked",
"Spec.Frodo.Lemmas.fst.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"FStar.Pervasives.Native.fst.checke... | [
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": false,
"full_module": "Spec.Frodo.Lemmas",
"short_module": null
},
{
"abbrev": false,
"ful... | {
"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 | i: Lib.IntTypes.size_nat{i <= 8} -> Type0 | Prims.Tot | [
"total"
] | [] | [
"Lib.IntTypes.size_nat",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Lib.IntTypes.uint64"
] | [] | false | false | false | false | true | let decode_templong_t i =
| uint64 | false |
Vale.Lib.MapTree.fst | Vale.Lib.MapTree.rotate_r | val rotate_r (#a: eqtype) (#b: Type) (t: tree a b) : tree a b | val rotate_r (#a: eqtype) (#b: Type) (t: tree a b) : tree a b | let rotate_r (#a:eqtype) (#b:Type) (t:tree a b) : tree a b =
match t with
| Node kr vr _ (Node kl vl _ ll rl) r -> mkNode kl vl ll (mkNode kr vr rl r)
| _ -> t | {
"file_name": "vale/code/lib/collections/Vale.Lib.MapTree.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 10,
"end_line": 29,
"start_col": 0,
"start_line": 26
} | module Vale.Lib.MapTree
open FStar.Mul
(** Balanced tree implementation *)
type tree (a:eqtype) (b:Type) =
| Empty : tree a b
| Node : a -> b -> nat -> tree a b -> tree a b -> tree a b
let height (#a:eqtype) (#b:Type) (t:tree a b) : nat =
match t with
| Empty -> 0
| Node _ _ h _ _ -> h
let mkNode (#a:eqty... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": true,
"source_file": "Vale.Lib.MapTree.fst"
} | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib",
... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | t: Vale.Lib.MapTree.tree a b -> Vale.Lib.MapTree.tree a b | Prims.Tot | [
"total"
] | [] | [
"Prims.eqtype",
"Vale.Lib.MapTree.tree",
"Prims.nat",
"Vale.Lib.MapTree.mkNode"
] | [] | false | false | false | false | false | let rotate_r (#a: eqtype) (#b: Type) (t: tree a b) : tree a b =
| match t with
| Node kr vr _ (Node kl vl _ ll rl) r -> mkNode kl vl ll (mkNode kr vr rl r)
| _ -> t | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.