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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
FStar.FiniteMap.Base.fsti | FStar.FiniteMap.Base.glue_elements_fact | val glue_elements_fact : Prims.logical | let glue_elements_fact =
forall (a: eqtype) (b: Type u#b) (keys: FSet.set a) (f: setfun_t a b keys).{:pattern elements (glue keys f)}
domain (glue keys f) == keys
/\ elements (glue keys f) == f | {
"file_name": "ulib/FStar.FiniteMap.Base.fsti",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 34,
"end_line": 311,
"start_col": 0,
"start_line": 308
} | (*
Copyright 2008-2021 John Li, Jay Lorch, Rustan Leino, Alex Summers,
Dan Rosen, Nikhil Swamy, Microsoft Research, and contributors to
the Dafny Project
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 c... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.FunctionalExtensionality.fsti.checked",
"FStar.FiniteSet.Base.fsti.checked"
],
"interface_file": false,
"source_file": "FStar.FiniteMap.Base.fsti"
} | [
{
"abbrev": true,
"full_module": "FStar.FiniteSet.Base",
"short_module": "FSet"
},
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "FLT"
},
{
"abbrev": false,
"full_module": "FStar.FunctionalExtensionality",
"short_module": null
},
{
"abbrev": f... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | Prims.logical | Prims.Tot | [
"total"
] | [] | [
"Prims.l_Forall",
"Prims.eqtype",
"FStar.FiniteSet.Base.set",
"FStar.FiniteMap.Base.setfun_t",
"Prims.l_and",
"Prims.eq2",
"FStar.FiniteMap.Base.domain",
"FStar.FiniteMap.Base.glue",
"FStar.FunctionalExtensionality.op_Hat_Subtraction_Greater",
"FStar.Pervasives.Native.option",
"Prims.l_or",
"P... | [] | false | false | false | true | true | let glue_elements_fact =
| forall (a: eqtype) (b: Type u#b) (keys: FSet.set a) (f: setfun_t a b keys).
{:pattern elements (glue keys f)}
domain (glue keys f) == keys /\ elements (glue keys f) == f | false | |
FStar.FiniteMap.Base.fsti | FStar.FiniteMap.Base.all_finite_map_facts | val all_finite_map_facts : Prims.logical | let all_finite_map_facts =
cardinality_zero_iff_empty_fact u#b
/\ empty_or_domain_occupied_fact u#b
/\ empty_or_values_occupied_fact u#b
/\ empty_or_items_occupied_fact u#b
/\ map_cardinality_matches_domain_fact u#b
/\ values_contains_fact u#b
/\ items_contains_fact u#b
/\ empty_domain_empty_fact u#b
... | {
"file_name": "ulib/FStar.FiniteMap.Base.fsti",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 22,
"end_line": 460,
"start_col": 0,
"start_line": 440
} | (*
Copyright 2008-2021 John Li, Jay Lorch, Rustan Leino, Alex Summers,
Dan Rosen, Nikhil Swamy, Microsoft Research, and contributors to
the Dafny Project
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 c... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.FunctionalExtensionality.fsti.checked",
"FStar.FiniteSet.Base.fsti.checked"
],
"interface_file": false,
"source_file": "FStar.FiniteMap.Base.fsti"
} | [
{
"abbrev": true,
"full_module": "FStar.FiniteSet.Base",
"short_module": "FSet"
},
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "FLT"
},
{
"abbrev": false,
"full_module": "FStar.FunctionalExtensionality",
"short_module": null
},
{
"abbrev": f... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | Prims.logical | Prims.Tot | [
"total"
] | [] | [
"Prims.l_and",
"FStar.FiniteMap.Base.cardinality_zero_iff_empty_fact",
"FStar.FiniteMap.Base.empty_or_domain_occupied_fact",
"FStar.FiniteMap.Base.empty_or_values_occupied_fact",
"FStar.FiniteMap.Base.empty_or_items_occupied_fact",
"FStar.FiniteMap.Base.map_cardinality_matches_domain_fact",
"FStar.Finit... | [] | false | false | false | true | true | let all_finite_map_facts =
| cardinality_zero_iff_empty_fact u#b /\ empty_or_domain_occupied_fact u#b /\
empty_or_values_occupied_fact u#b /\ empty_or_items_occupied_fact u#b /\
map_cardinality_matches_domain_fact u#b /\ values_contains_fact u#b /\ items_contains_fact u#b /\
empty_domain_empty_fact u#b /\ glue_domain_fact u#b /\ glue_elements_fact... | false | |
STLC.Core.fst | STLC.Core.close_exp_ln | val close_exp_ln (e: stlc_exp) (v: var) (n: nat)
: Lemma (requires ln' e (n - 1))
(ensures ln' (close_exp' e v n) n)
[SMTPat (ln' (close_exp' e v n) n)] | val close_exp_ln (e: stlc_exp) (v: var) (n: nat)
: Lemma (requires ln' e (n - 1))
(ensures ln' (close_exp' e v n) n)
[SMTPat (ln' (close_exp' e v n) n)] | let rec close_exp_ln (e:stlc_exp) (v:var) (n:nat)
: Lemma
(requires ln' e (n - 1))
(ensures ln' (close_exp' e v n) n)
[SMTPat (ln' (close_exp' e v n) n)]
= match e with
| EUnit -> ()
| EVar _ -> ()
| EBVar m -> ()
| ELam _ e -> close_exp_ln e v (n + 1)
| EApp e1 e2 -> close_exp_ln e... | {
"file_name": "examples/dsls/stlc/STLC.Core.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 60,
"end_line": 105,
"start_col": 0,
"start_line": 95
} | module STLC.Core
module T = FStar.Tactics.V2
module R = FStar.Reflection.V2
module L = FStar.List.Tot
module RT = FStar.Reflection.Typing
type stlc_ty =
| TUnit
| TArrow : stlc_ty -> stlc_ty -> stlc_ty
let var = nat
let index = nat
noeq
type stlc_exp =
| EUnit : stlc_exp
| EBVar : index -> stlc_exp
| EVar ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Squash.fsti.checked",
"FStar.Set.fsti.checked",
"FStar.Reflection.V2.fst.checked",
"FStar.Reflection.Typing.fsti.checked",
"FStar.Printf.fst.check... | [
{
"abbrev": true,
"full_module": "FStar.Reflection.Typing",
"short_module": "RT"
},
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "L"
},
{
"abbrev": true,
"full_module": "FStar.Reflection.V2",
"short_module": "R"
},
{
"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 | e: STLC.Core.stlc_exp -> v: STLC.Core.var -> n: Prims.nat
-> FStar.Pervasives.Lemma (requires STLC.Core.ln' e (n - 1))
(ensures STLC.Core.ln' (STLC.Core.close_exp' e v n) n)
[SMTPat (STLC.Core.ln' (STLC.Core.close_exp' e v n) n)] | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"STLC.Core.stlc_exp",
"STLC.Core.var",
"Prims.nat",
"STLC.Core.index",
"STLC.Core.stlc_ty",
"STLC.Core.close_exp_ln",
"Prims.op_Addition",
"Prims.unit",
"Prims.b2t",
"STLC.Core.ln'",
"Prims.op_Subtraction",
"Prims.squash",
"STLC.Core.close_exp'",
"Prims.Cons",
"FStar.Pervasives.pattern",... | [
"recursion"
] | false | false | true | false | false | let rec close_exp_ln (e: stlc_exp) (v: var) (n: nat)
: Lemma (requires ln' e (n - 1))
(ensures ln' (close_exp' e v n) n)
[SMTPat (ln' (close_exp' e v n) n)] =
| match e with
| EUnit -> ()
| EVar _ -> ()
| EBVar m -> ()
| ELam _ e -> close_exp_ln e v (n + 1)
| EApp e1 e2 ->
close_exp_ln e1 v n;
close_exp_ln e2 v n | false |
FStar.FiniteMap.Base.fsti | FStar.FiniteMap.Base.map_extensionality_fact | val map_extensionality_fact : Prims.logical | let map_extensionality_fact =
forall (a: eqtype) (b: Type u#b) (m1: map a b) (m2: map a b).{:pattern equal m1 m2}
equal m1 m2 ==> m1 == m2 | {
"file_name": "ulib/FStar.FiniteMap.Base.fsti",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 28,
"end_line": 422,
"start_col": 0,
"start_line": 420
} | (*
Copyright 2008-2021 John Li, Jay Lorch, Rustan Leino, Alex Summers,
Dan Rosen, Nikhil Swamy, Microsoft Research, and contributors to
the Dafny Project
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 c... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.FunctionalExtensionality.fsti.checked",
"FStar.FiniteSet.Base.fsti.checked"
],
"interface_file": false,
"source_file": "FStar.FiniteMap.Base.fsti"
} | [
{
"abbrev": true,
"full_module": "FStar.FiniteSet.Base",
"short_module": "FSet"
},
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "FLT"
},
{
"abbrev": false,
"full_module": "FStar.FunctionalExtensionality",
"short_module": null
},
{
"abbrev": f... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | Prims.logical | Prims.Tot | [
"total"
] | [] | [
"Prims.l_Forall",
"Prims.eqtype",
"FStar.FiniteMap.Base.map",
"Prims.l_imp",
"FStar.FiniteMap.Base.equal",
"Prims.eq2"
] | [] | false | false | false | true | true | let map_extensionality_fact =
| forall (a: eqtype) (b: Type u#b) (m1: map a b) (m2: map a b). {:pattern equal m1 m2}
equal m1 m2 ==> m1 == m2 | false | |
FStar.FiniteMap.Base.fsti | FStar.FiniteMap.Base.subtract_domain_fact | val subtract_domain_fact : Prims.logical | let subtract_domain_fact =
forall (a: eqtype) (b: Type u#b) (m: map a b) (s: FSet.set a).{:pattern domain (subtract m s)}
domain (subtract m s) == FSet.difference (domain m) s | {
"file_name": "ulib/FStar.FiniteMap.Base.fsti",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 57,
"end_line": 389,
"start_col": 0,
"start_line": 387
} | (*
Copyright 2008-2021 John Li, Jay Lorch, Rustan Leino, Alex Summers,
Dan Rosen, Nikhil Swamy, Microsoft Research, and contributors to
the Dafny Project
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 c... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.FunctionalExtensionality.fsti.checked",
"FStar.FiniteSet.Base.fsti.checked"
],
"interface_file": false,
"source_file": "FStar.FiniteMap.Base.fsti"
} | [
{
"abbrev": true,
"full_module": "FStar.FiniteSet.Base",
"short_module": "FSet"
},
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "FLT"
},
{
"abbrev": false,
"full_module": "FStar.FunctionalExtensionality",
"short_module": null
},
{
"abbrev": f... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | Prims.logical | Prims.Tot | [
"total"
] | [] | [
"Prims.l_Forall",
"Prims.eqtype",
"FStar.FiniteMap.Base.map",
"FStar.FiniteSet.Base.set",
"Prims.eq2",
"FStar.FiniteMap.Base.domain",
"FStar.FiniteMap.Base.subtract",
"FStar.FiniteSet.Base.difference"
] | [] | false | false | false | true | true | let subtract_domain_fact =
| forall (a: eqtype) (b: Type u#b) (m: map a b) (s: FSet.set a). {:pattern domain (subtract m s)}
domain (subtract m s) == FSet.difference (domain m) s | false | |
FStar.FiniteMap.Base.fsti | FStar.FiniteMap.Base.disjoint_fact | val disjoint_fact : Prims.logical | let disjoint_fact =
forall (a: eqtype) (b: Type u#b) (m1: map a b) (m2: map a b).{:pattern disjoint m1 m2}
disjoint m1 m2 <==> (forall key.{:pattern FSet.mem key (domain m1) \/ FSet.mem key (domain m2)}
not (FSet.mem key (domain m1)) || not (FSet.mem key (domain m2))) | {
"file_name": "ulib/FStar.FiniteMap.Base.fsti",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 91,
"end_line": 433,
"start_col": 0,
"start_line": 430
} | (*
Copyright 2008-2021 John Li, Jay Lorch, Rustan Leino, Alex Summers,
Dan Rosen, Nikhil Swamy, Microsoft Research, and contributors to
the Dafny Project
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 c... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.FunctionalExtensionality.fsti.checked",
"FStar.FiniteSet.Base.fsti.checked"
],
"interface_file": false,
"source_file": "FStar.FiniteMap.Base.fsti"
} | [
{
"abbrev": true,
"full_module": "FStar.FiniteSet.Base",
"short_module": "FSet"
},
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "FLT"
},
{
"abbrev": false,
"full_module": "FStar.FunctionalExtensionality",
"short_module": null
},
{
"abbrev": f... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | Prims.logical | Prims.Tot | [
"total"
] | [] | [
"Prims.l_Forall",
"Prims.eqtype",
"FStar.FiniteMap.Base.map",
"Prims.l_iff",
"FStar.FiniteMap.Base.disjoint",
"Prims.b2t",
"Prims.op_BarBar",
"Prims.op_Negation",
"FStar.FiniteSet.Base.mem",
"FStar.FiniteMap.Base.domain"
] | [] | false | false | false | true | true | let disjoint_fact =
| forall (a: eqtype) (b: Type u#b) (m1: map a b) (m2: map a b). {:pattern disjoint m1 m2}
disjoint m1 m2 <==>
(forall key. {:pattern FSet.mem key (domain m1)\/FSet.mem key (domain m2)}
not (FSet.mem key (domain m1)) || not (FSet.mem key (domain m2))) | false | |
EverParse3d.Prelude.fst | EverParse3d.Prelude.parse_nlist_total_fixed_size_aux | val parse_nlist_total_fixed_size_aux
(n: U32.t)
(#wk: _)
(#k: parser_kind true wk)
(#t: _)
(p: parser k t)
(x: LP.bytes)
: Lemma
(requires
(let open LP in
k.parser_kind_subkind == Some ParserStrong /\ k.parser_kind_high == Some k.parser_kind_low /\
... | val parse_nlist_total_fixed_size_aux
(n: U32.t)
(#wk: _)
(#k: parser_kind true wk)
(#t: _)
(p: parser k t)
(x: LP.bytes)
: Lemma
(requires
(let open LP in
k.parser_kind_subkind == Some ParserStrong /\ k.parser_kind_high == Some k.parser_kind_low /\
... | let parse_nlist_total_fixed_size_aux
(n:U32.t) (#wk: _) (#k:parser_kind true wk) #t (p:parser k t)
(x: LP.bytes)
: Lemma
(requires (
let open LP in
k.parser_kind_subkind == Some ParserStrong /\
k.parser_kind_high == Some k.parser_kind_low /\
U32.v n % k.parser_kind_low == 0 /\
k.parse... | {
"file_name": "src/3d/prelude/EverParse3d.Prelude.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 96,
"end_line": 202,
"start_col": 0,
"start_line": 182
} | (*
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",
"LowParse.Spec.ListUpTo.fsti.checked",
"LowParse.Spec.List.fsti.checked",
"LowParse.Spec.Int.fsti.checked",
"LowParse.Spec.FLData.fst.checked",
"LowParse.Spec.Combinators.fsti.checked",
"LowParse.Spec.BoundedInt.fsti.checked",... | [
{
"abbrev": true,
"full_module": "FStar.Bytes",
"short_module": "B32"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "FStar... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 2,
"max_fuel": 0,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | n: FStar.UInt32.t -> p: EverParse3d.Prelude.parser k t -> x: LowParse.Bytes.bytes
-> FStar.Pervasives.Lemma
(requires
Mkparser_kind'?.parser_kind_subkind k ==
FStar.Pervasives.Native.Some LowParse.Spec.Base.ParserStrong /\
Mkparser_kind'?.parser_kind_high k ==
FStar.Pervasives.Na... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"FStar.UInt32.t",
"EverParse3d.Kinds.weak_kind",
"EverParse3d.Kinds.parser_kind",
"EverParse3d.Prelude.parser",
"LowParse.Bytes.bytes",
"LowParse.Spec.Base.parser_kind_prop_equiv",
"Prims.list",
"LowParse.Spec.List.parse_list_kind",
"LowParse.Spec.List.parse_list",
"Prims.unit",
"LowParse.Spec.L... | [] | true | false | true | false | false | let parse_nlist_total_fixed_size_aux
(n: U32.t)
(#wk: _)
(#k: parser_kind true wk)
#t
(p: parser k t)
(x: LP.bytes)
: Lemma
(requires
(let open LP in
k.parser_kind_subkind == Some ParserStrong /\ k.parser_kind_high == Some k.parser_kind_low /\
U3... | let x' = Seq.slice x 0 (U32.v n) in
let cnt = (U32.v n / k.LP.parser_kind_low) in
FStar.Math.Lemmas.lemma_div_exact (U32.v n) k.LP.parser_kind_low;
FStar.Math.Lemmas.nat_over_pos_is_nat (U32.v n) k.LP.parser_kind_low;
LowParse.Spec.List.parse_list_total_constant_size p cnt x';
LP.parser_kind_prop_equiv LowParse.Spec.Li... | false |
STLC.Core.fst | STLC.Core.open_exp' | val open_exp' (e: stlc_exp) (v: var) (n: index) : e': stlc_exp{size e == size e'} | val open_exp' (e: stlc_exp) (v: var) (n: index) : e': stlc_exp{size e == size e'} | let rec open_exp' (e:stlc_exp) (v:var) (n:index)
: e':stlc_exp { size e == size e'}
= match e with
| EUnit -> EUnit
| EVar m -> EVar m
| EBVar m -> if m = n then EVar v else EBVar m
| ELam t e -> ELam t (open_exp' e v (n + 1))
| EApp e1 e2 -> EApp (open_exp' e1 v n) (open_exp' e2 v n) | {
"file_name": "examples/dsls/stlc/STLC.Core.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 62,
"end_line": 49,
"start_col": 0,
"start_line": 42
} | module STLC.Core
module T = FStar.Tactics.V2
module R = FStar.Reflection.V2
module L = FStar.List.Tot
module RT = FStar.Reflection.Typing
type stlc_ty =
| TUnit
| TArrow : stlc_ty -> stlc_ty -> stlc_ty
let var = nat
let index = nat
noeq
type stlc_exp =
| EUnit : stlc_exp
| EBVar : index -> stlc_exp
| EVar ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Squash.fsti.checked",
"FStar.Set.fsti.checked",
"FStar.Reflection.V2.fst.checked",
"FStar.Reflection.Typing.fsti.checked",
"FStar.Printf.fst.check... | [
{
"abbrev": true,
"full_module": "FStar.Reflection.Typing",
"short_module": "RT"
},
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "L"
},
{
"abbrev": true,
"full_module": "FStar.Reflection.V2",
"short_module": "R"
},
{
"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 | e: STLC.Core.stlc_exp -> v: STLC.Core.var -> n: STLC.Core.index
-> e': STLC.Core.stlc_exp{STLC.Core.size e == STLC.Core.size e'} | Prims.Tot | [
"total"
] | [] | [
"STLC.Core.stlc_exp",
"STLC.Core.var",
"STLC.Core.index",
"STLC.Core.EUnit",
"STLC.Core.EVar",
"Prims.op_Equality",
"Prims.bool",
"STLC.Core.EBVar",
"Prims.eq2",
"Prims.nat",
"STLC.Core.size",
"STLC.Core.stlc_ty",
"STLC.Core.ELam",
"STLC.Core.open_exp'",
"Prims.op_Addition",
"STLC.Core... | [
"recursion"
] | false | false | false | false | false | let rec open_exp' (e: stlc_exp) (v: var) (n: index) : e': stlc_exp{size e == size e'} =
| match e with
| EUnit -> EUnit
| EVar m -> EVar m
| EBVar m -> if m = n then EVar v else EBVar m
| ELam t e -> ELam t (open_exp' e v (n + 1))
| EApp e1 e2 -> EApp (open_exp' e1 v n) (open_exp' e2 v n) | false |
STLC.Core.fst | STLC.Core.lookup | val lookup (e: list (var & 'a)) (x: var) : option 'a | val lookup (e: list (var & 'a)) (x: var) : option 'a | let lookup (e:list (var & 'a)) (x:var)
: option 'a
= L.assoc x e | {
"file_name": "examples/dsls/stlc/STLC.Core.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 15,
"end_line": 143,
"start_col": 0,
"start_line": 141
} | module STLC.Core
module T = FStar.Tactics.V2
module R = FStar.Reflection.V2
module L = FStar.List.Tot
module RT = FStar.Reflection.Typing
type stlc_ty =
| TUnit
| TArrow : stlc_ty -> stlc_ty -> stlc_ty
let var = nat
let index = nat
noeq
type stlc_exp =
| EUnit : stlc_exp
| EBVar : index -> stlc_exp
| EVar ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Squash.fsti.checked",
"FStar.Set.fsti.checked",
"FStar.Reflection.V2.fst.checked",
"FStar.Reflection.Typing.fsti.checked",
"FStar.Printf.fst.check... | [
{
"abbrev": true,
"full_module": "FStar.Reflection.Typing",
"short_module": "RT"
},
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "L"
},
{
"abbrev": true,
"full_module": "FStar.Reflection.V2",
"short_module": "R"
},
{
"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 | e: Prims.list (STLC.Core.var * 'a) -> x: STLC.Core.var -> FStar.Pervasives.Native.option 'a | Prims.Tot | [
"total"
] | [] | [
"Prims.list",
"FStar.Pervasives.Native.tuple2",
"STLC.Core.var",
"FStar.List.Tot.Base.assoc",
"FStar.Pervasives.Native.option"
] | [] | false | false | false | true | false | let lookup (e: list (var & 'a)) (x: var) : option 'a =
| L.assoc x e | false |
EverParse3d.Prelude.fst | EverParse3d.Prelude.parse_nlist_total_fixed_size_kind_correct | val parse_nlist_total_fixed_size_kind_correct
(n: U32.t)
(#wk: _)
(#k: parser_kind true wk)
(#t: _)
(p: parser k t)
: Lemma
(requires
(let open LP in
k.parser_kind_subkind == Some ParserStrong /\ k.parser_kind_high == Some k.parser_kind_low /\
U32.v n ... | val parse_nlist_total_fixed_size_kind_correct
(n: U32.t)
(#wk: _)
(#k: parser_kind true wk)
(#t: _)
(p: parser k t)
: Lemma
(requires
(let open LP in
k.parser_kind_subkind == Some ParserStrong /\ k.parser_kind_high == Some k.parser_kind_low /\
U32.v n ... | let parse_nlist_total_fixed_size_kind_correct
(n:U32.t) (#wk: _) (#k:parser_kind true wk) #t (p:parser k t)
: Lemma
(requires (
let open LP in
k.parser_kind_subkind == Some ParserStrong /\
k.parser_kind_high == Some k.parser_kind_low /\
U32.v n % k.parser_kind_low == 0 /\
k.parser_kind_m... | {
"file_name": "src/3d/prelude/EverParse3d.Prelude.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 89,
"end_line": 219,
"start_col": 0,
"start_line": 204
} | (*
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",
"LowParse.Spec.ListUpTo.fsti.checked",
"LowParse.Spec.List.fsti.checked",
"LowParse.Spec.Int.fsti.checked",
"LowParse.Spec.FLData.fst.checked",
"LowParse.Spec.Combinators.fsti.checked",
"LowParse.Spec.BoundedInt.fsti.checked",... | [
{
"abbrev": true,
"full_module": "FStar.Bytes",
"short_module": "B32"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "FStar... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 2,
"max_fuel": 0,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | n: FStar.UInt32.t -> p: EverParse3d.Prelude.parser k t
-> FStar.Pervasives.Lemma
(requires
Mkparser_kind'?.parser_kind_subkind k ==
FStar.Pervasives.Native.Some LowParse.Spec.Base.ParserStrong /\
Mkparser_kind'?.parser_kind_high k ==
FStar.Pervasives.Native.Some (Mkparser_kind'?.... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"FStar.UInt32.t",
"EverParse3d.Kinds.weak_kind",
"EverParse3d.Kinds.parser_kind",
"EverParse3d.Prelude.parser",
"FStar.Classical.forall_intro",
"LowParse.Bytes.bytes",
"Prims.l_imp",
"Prims.l_and",
"Prims.eq2",
"FStar.Pervasives.Native.option",
"LowParse.Spec.Base.parser_subkind",
"LowParse.Sp... | [] | false | false | true | false | false | let parse_nlist_total_fixed_size_kind_correct
(n: U32.t)
(#wk: _)
(#k: parser_kind true wk)
#t
(p: parser k t)
: Lemma
(requires
(let open LP in
k.parser_kind_subkind == Some ParserStrong /\ k.parser_kind_high == Some k.parser_kind_low /\
U32.v n % k.p... | LP.parser_kind_prop_equiv (LowParse.Spec.FLData.parse_fldata_kind (U32.v n)
LowParse.Spec.List.parse_list_kind)
(parse_nlist n p);
LP.parser_kind_prop_equiv (LP.total_constant_size_parser_kind (U32.v n)) (parse_nlist n p);
Classical.forall_intro (Classical.move_requires (parse_nlist_total_fixed_size_aux n p)) | false |
STLC.Core.fst | STLC.Core.fresh | val fresh (e: list (var & 'a)) : var | val fresh (e: list (var & 'a)) : var | let rec fresh (e:list (var & 'a))
: var
= match e with
| [] -> 0
| hd :: tl ->
max (fresh tl) (fst hd) + 1 | {
"file_name": "examples/dsls/stlc/STLC.Core.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 33,
"end_line": 152,
"start_col": 0,
"start_line": 147
} | module STLC.Core
module T = FStar.Tactics.V2
module R = FStar.Reflection.V2
module L = FStar.List.Tot
module RT = FStar.Reflection.Typing
type stlc_ty =
| TUnit
| TArrow : stlc_ty -> stlc_ty -> stlc_ty
let var = nat
let index = nat
noeq
type stlc_exp =
| EUnit : stlc_exp
| EBVar : index -> stlc_exp
| EVar ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Squash.fsti.checked",
"FStar.Set.fsti.checked",
"FStar.Reflection.V2.fst.checked",
"FStar.Reflection.Typing.fsti.checked",
"FStar.Printf.fst.check... | [
{
"abbrev": true,
"full_module": "FStar.Reflection.Typing",
"short_module": "RT"
},
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "L"
},
{
"abbrev": true,
"full_module": "FStar.Reflection.V2",
"short_module": "R"
},
{
"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 | e: Prims.list (STLC.Core.var * 'a) -> STLC.Core.var | Prims.Tot | [
"total"
] | [] | [
"Prims.list",
"FStar.Pervasives.Native.tuple2",
"STLC.Core.var",
"Prims.op_Addition",
"STLC.Core.max",
"STLC.Core.fresh",
"FStar.Pervasives.Native.fst"
] | [
"recursion"
] | false | false | false | true | false | let rec fresh (e: list (var & 'a)) : var =
| match e with
| [] -> 0
| hd :: tl -> max (fresh tl) (fst hd) + 1 | false |
STLC.Core.fst | STLC.Core.fresh_is_fresh | val fresh_is_fresh (e: list (var & 'a)) : Lemma (None? (lookup e (fresh e))) | val fresh_is_fresh (e: list (var & 'a)) : Lemma (None? (lookup e (fresh e))) | let fresh_is_fresh (e:list (var & 'a))
: Lemma (None? (lookup e (fresh e)))
= match lookup e (fresh e) with
| None -> ()
| Some _ ->
lookup_mem e (fresh e);
FStar.Classical.forall_intro (fresh_not_mem e) | {
"file_name": "examples/dsls/stlc/STLC.Core.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 53,
"end_line": 175,
"start_col": 0,
"start_line": 169
} | module STLC.Core
module T = FStar.Tactics.V2
module R = FStar.Reflection.V2
module L = FStar.List.Tot
module RT = FStar.Reflection.Typing
type stlc_ty =
| TUnit
| TArrow : stlc_ty -> stlc_ty -> stlc_ty
let var = nat
let index = nat
noeq
type stlc_exp =
| EUnit : stlc_exp
| EBVar : index -> stlc_exp
| EVar ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Squash.fsti.checked",
"FStar.Set.fsti.checked",
"FStar.Reflection.V2.fst.checked",
"FStar.Reflection.Typing.fsti.checked",
"FStar.Printf.fst.check... | [
{
"abbrev": true,
"full_module": "FStar.Reflection.Typing",
"short_module": "RT"
},
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "L"
},
{
"abbrev": true,
"full_module": "FStar.Reflection.V2",
"short_module": "R"
},
{
"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 | e: Prims.list (STLC.Core.var * 'a)
-> FStar.Pervasives.Lemma (ensures None? (STLC.Core.lookup e (STLC.Core.fresh e))) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.list",
"FStar.Pervasives.Native.tuple2",
"STLC.Core.var",
"STLC.Core.lookup",
"STLC.Core.fresh",
"FStar.Classical.forall_intro",
"Prims.l_imp",
"FStar.List.Tot.Base.memP",
"Prims.b2t",
"Prims.op_GreaterThan",
"FStar.Pervasives.Native.fst",
"STLC.Core.fresh_not_mem",
"Prims.unit",
"S... | [] | false | false | true | false | false | let fresh_is_fresh (e: list (var & 'a)) : Lemma (None? (lookup e (fresh e))) =
| match lookup e (fresh e) with
| None -> ()
| Some _ ->
lookup_mem e (fresh e);
FStar.Classical.forall_intro (fresh_not_mem e) | false |
STLC.Core.fst | STLC.Core.freevars_open | val freevars_open (e: stlc_exp) (x: var) (n: nat)
: Lemma ((freevars (open_exp' e x n)) `Set.subset` ((freevars e) `Set.union` (Set.singleton x))) | val freevars_open (e: stlc_exp) (x: var) (n: nat)
: Lemma ((freevars (open_exp' e x n)) `Set.subset` ((freevars e) `Set.union` (Set.singleton x))) | let rec freevars_open (e:stlc_exp) (x:var) (n:nat)
: Lemma (freevars (open_exp' e x n) `Set.subset`
(freevars e `Set.union` Set.singleton x))
= match e with
| EUnit
| EBVar _
| EVar _ -> ()
| ELam _ e -> freevars_open e x (n + 1)
| EApp e1 e2 ->
freevars_open e1 x n;
freev... | {
"file_name": "examples/dsls/stlc/STLC.Core.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 26,
"end_line": 137,
"start_col": 0,
"start_line": 127
} | module STLC.Core
module T = FStar.Tactics.V2
module R = FStar.Reflection.V2
module L = FStar.List.Tot
module RT = FStar.Reflection.Typing
type stlc_ty =
| TUnit
| TArrow : stlc_ty -> stlc_ty -> stlc_ty
let var = nat
let index = nat
noeq
type stlc_exp =
| EUnit : stlc_exp
| EBVar : index -> stlc_exp
| EVar ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Squash.fsti.checked",
"FStar.Set.fsti.checked",
"FStar.Reflection.V2.fst.checked",
"FStar.Reflection.Typing.fsti.checked",
"FStar.Printf.fst.check... | [
{
"abbrev": true,
"full_module": "FStar.Reflection.Typing",
"short_module": "RT"
},
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "L"
},
{
"abbrev": true,
"full_module": "FStar.Reflection.V2",
"short_module": "R"
},
{
"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 | e: STLC.Core.stlc_exp -> x: STLC.Core.var -> n: Prims.nat
-> FStar.Pervasives.Lemma
(ensures
FStar.Set.subset (STLC.Core.freevars (STLC.Core.open_exp' e x n))
(FStar.Set.union (STLC.Core.freevars e) (FStar.Set.singleton x))) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"STLC.Core.stlc_exp",
"STLC.Core.var",
"Prims.nat",
"STLC.Core.index",
"STLC.Core.stlc_ty",
"STLC.Core.freevars_open",
"Prims.op_Addition",
"Prims.unit",
"Prims.l_True",
"Prims.squash",
"FStar.Set.subset",
"STLC.Core.freevars",
"STLC.Core.open_exp'",
"FStar.Set.union",
"FStar.Set.singlet... | [
"recursion"
] | false | false | true | false | false | let rec freevars_open (e: stlc_exp) (x: var) (n: nat)
: Lemma ((freevars (open_exp' e x n)) `Set.subset` ((freevars e) `Set.union` (Set.singleton x))) =
| match e with
| EUnit | EBVar _ | EVar _ -> ()
| ELam _ e -> freevars_open e x (n + 1)
| EApp e1 e2 ->
freevars_open e1 x n;
freevars_open e2 x n | false |
STLC.Core.fst | STLC.Core.elab_exp | val elab_exp (e: stlc_exp) : Tot R.term (decreases (size e)) | val elab_exp (e: stlc_exp) : Tot R.term (decreases (size e)) | let rec elab_exp (e:stlc_exp)
: Tot R.term (decreases (size e))
= let open R in
match e with
| EUnit ->
pack_ln (Tv_Const C_Unit)
| EBVar n ->
let bv = R.pack_bv (RT.make_bv n) in
R.pack_ln (Tv_BVar bv)
| EVar n ->
let bv = R.pack_namedv (RT.make_namedv n) in
... | {
"file_name": "examples/dsls/stlc/STLC.Core.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 44,
"end_line": 320,
"start_col": 0,
"start_line": 297
} | module STLC.Core
module T = FStar.Tactics.V2
module R = FStar.Reflection.V2
module L = FStar.List.Tot
module RT = FStar.Reflection.Typing
type stlc_ty =
| TUnit
| TArrow : stlc_ty -> stlc_ty -> stlc_ty
let var = nat
let index = nat
noeq
type stlc_exp =
| EUnit : stlc_exp
| EBVar : index -> stlc_exp
| EVar ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Squash.fsti.checked",
"FStar.Set.fsti.checked",
"FStar.Reflection.V2.fst.checked",
"FStar.Reflection.Typing.fsti.checked",
"FStar.Printf.fst.check... | [
{
"abbrev": true,
"full_module": "FStar.Reflection.Typing",
"short_module": "RT"
},
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "L"
},
{
"abbrev": true,
"full_module": "FStar.Reflection.V2",
"short_module": "R"
},
{
"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 | e: STLC.Core.stlc_exp -> Prims.Tot FStar.Stubs.Reflection.Types.term | Prims.Tot | [
"total",
""
] | [] | [
"STLC.Core.stlc_exp",
"FStar.Stubs.Reflection.V2.Builtins.pack_ln",
"FStar.Stubs.Reflection.V2.Data.Tv_Const",
"FStar.Stubs.Reflection.V2.Data.C_Unit",
"STLC.Core.index",
"FStar.Stubs.Reflection.V2.Data.Tv_BVar",
"FStar.Stubs.Reflection.Types.bv",
"FStar.Stubs.Reflection.V2.Builtins.pack_bv",
"FStar... | [
"recursion"
] | false | false | false | true | false | let rec elab_exp (e: stlc_exp) : Tot R.term (decreases (size e)) =
| let open R in
match e with
| EUnit -> pack_ln (Tv_Const C_Unit)
| EBVar n ->
let bv = R.pack_bv (RT.make_bv n) in
R.pack_ln (Tv_BVar bv)
| EVar n ->
let bv = R.pack_namedv (RT.make_namedv n) in
R.pack_ln (Tv_Var bv)
| ELam t e ->
let t = elab_ty t in
let e = elab_exp e in
R.pack_ln (Tv_Abs (RT.mk_simple_b... | false |
STLC.Core.fst | STLC.Core.freevars | val freevars (e: stlc_exp) : Set.set var | val freevars (e: stlc_exp) : Set.set var | let rec freevars (e:stlc_exp)
: Set.set var
= match e with
| EUnit
| EBVar _ -> Set.empty
| EVar x -> Set.singleton x
| ELam _ e -> freevars e
| EApp e1 e2 -> freevars e1 `Set.union` freevars e2 | {
"file_name": "examples/dsls/stlc/STLC.Core.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 55,
"end_line": 114,
"start_col": 0,
"start_line": 107
} | module STLC.Core
module T = FStar.Tactics.V2
module R = FStar.Reflection.V2
module L = FStar.List.Tot
module RT = FStar.Reflection.Typing
type stlc_ty =
| TUnit
| TArrow : stlc_ty -> stlc_ty -> stlc_ty
let var = nat
let index = nat
noeq
type stlc_exp =
| EUnit : stlc_exp
| EBVar : index -> stlc_exp
| EVar ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Squash.fsti.checked",
"FStar.Set.fsti.checked",
"FStar.Reflection.V2.fst.checked",
"FStar.Reflection.Typing.fsti.checked",
"FStar.Printf.fst.check... | [
{
"abbrev": true,
"full_module": "FStar.Reflection.Typing",
"short_module": "RT"
},
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "L"
},
{
"abbrev": true,
"full_module": "FStar.Reflection.V2",
"short_module": "R"
},
{
"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 | e: STLC.Core.stlc_exp -> FStar.Set.set STLC.Core.var | Prims.Tot | [
"total"
] | [] | [
"STLC.Core.stlc_exp",
"FStar.Set.empty",
"STLC.Core.var",
"STLC.Core.index",
"FStar.Set.singleton",
"STLC.Core.stlc_ty",
"STLC.Core.freevars",
"FStar.Set.union",
"FStar.Set.set"
] | [
"recursion"
] | false | false | false | true | false | let rec freevars (e: stlc_exp) : Set.set var =
| match e with
| EUnit | EBVar _ -> Set.empty
| EVar x -> Set.singleton x
| ELam _ e -> freevars e
| EApp e1 e2 -> (freevars e1) `Set.union` (freevars e2) | false |
STLC.Core.fst | STLC.Core.stlc_types_are_closed1 | val stlc_types_are_closed1 (ty: stlc_ty) (v: R.term)
: Lemma (RT.open_with (elab_ty ty) v == elab_ty ty) [SMTPat (RT.open_with (elab_ty ty) v)] | val stlc_types_are_closed1 (ty: stlc_ty) (v: R.term)
: Lemma (RT.open_with (elab_ty ty) v == elab_ty ty) [SMTPat (RT.open_with (elab_ty ty) v)] | let stlc_types_are_closed1 (ty:stlc_ty) (v:R.term)
: Lemma (RT.open_with (elab_ty ty) v == elab_ty ty)
[SMTPat (RT.open_with (elab_ty ty) v)]
= stlc_types_are_closed_core ty [ RT.DT 0 v ];
RT.open_with_spec (elab_ty ty) v | {
"file_name": "examples/dsls/stlc/STLC.Core.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 36,
"end_line": 357,
"start_col": 0,
"start_line": 353
} | module STLC.Core
module T = FStar.Tactics.V2
module R = FStar.Reflection.V2
module L = FStar.List.Tot
module RT = FStar.Reflection.Typing
type stlc_ty =
| TUnit
| TArrow : stlc_ty -> stlc_ty -> stlc_ty
let var = nat
let index = nat
noeq
type stlc_exp =
| EUnit : stlc_exp
| EBVar : index -> stlc_exp
| EVar ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Squash.fsti.checked",
"FStar.Set.fsti.checked",
"FStar.Reflection.V2.fst.checked",
"FStar.Reflection.Typing.fsti.checked",
"FStar.Printf.fst.check... | [
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.Reflection.Typing",
"short_module": "RT"
},
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "L"
},
{
"abbrev": true,
"full_module... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | ty: STLC.Core.stlc_ty -> v: FStar.Stubs.Reflection.Types.term
-> FStar.Pervasives.Lemma
(ensures FStar.Reflection.Typing.open_with (STLC.Core.elab_ty ty) v == STLC.Core.elab_ty ty)
[SMTPat (FStar.Reflection.Typing.open_with (STLC.Core.elab_ty ty) v)] | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"STLC.Core.stlc_ty",
"FStar.Stubs.Reflection.Types.term",
"FStar.Reflection.Typing.open_with_spec",
"STLC.Core.elab_ty",
"Prims.unit",
"STLC.Core.stlc_types_are_closed_core",
"Prims.Cons",
"FStar.Reflection.Typing.subst_elt",
"FStar.Reflection.Typing.DT",
"Prims.Nil",
"Prims.l_True",
"Prims.sq... | [] | true | false | true | false | false | let stlc_types_are_closed1 (ty: stlc_ty) (v: R.term)
: Lemma (RT.open_with (elab_ty ty) v == elab_ty ty) [SMTPat (RT.open_with (elab_ty ty) v)] =
| stlc_types_are_closed_core ty [RT.DT 0 v];
RT.open_with_spec (elab_ty ty) v | false |
STLC.Core.fst | STLC.Core.lookup_mem | val lookup_mem (e: list (var & 'a)) (x: var)
: Lemma (requires Some? (lookup e x)) (ensures exists elt. L.memP elt e /\ fst elt == x) | val lookup_mem (e: list (var & 'a)) (x: var)
: Lemma (requires Some? (lookup e x)) (ensures exists elt. L.memP elt e /\ fst elt == x) | let lookup_mem (e:list (var & 'a)) (x:var)
: Lemma
(requires Some? (lookup e x))
(ensures exists elt. L.memP elt e /\ fst elt == x)
= let Some y = lookup e x in
List.Tot.Properties.assoc_memP_some x y e | {
"file_name": "examples/dsls/stlc/STLC.Core.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 45,
"end_line": 167,
"start_col": 0,
"start_line": 162
} | module STLC.Core
module T = FStar.Tactics.V2
module R = FStar.Reflection.V2
module L = FStar.List.Tot
module RT = FStar.Reflection.Typing
type stlc_ty =
| TUnit
| TArrow : stlc_ty -> stlc_ty -> stlc_ty
let var = nat
let index = nat
noeq
type stlc_exp =
| EUnit : stlc_exp
| EBVar : index -> stlc_exp
| EVar ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Squash.fsti.checked",
"FStar.Set.fsti.checked",
"FStar.Reflection.V2.fst.checked",
"FStar.Reflection.Typing.fsti.checked",
"FStar.Printf.fst.check... | [
{
"abbrev": true,
"full_module": "FStar.Reflection.Typing",
"short_module": "RT"
},
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "L"
},
{
"abbrev": true,
"full_module": "FStar.Reflection.V2",
"short_module": "R"
},
{
"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 | e: Prims.list (STLC.Core.var * 'a) -> x: STLC.Core.var
-> FStar.Pervasives.Lemma (requires Some? (STLC.Core.lookup e x))
(ensures
exists (elt: (STLC.Core.var * 'a)).
FStar.List.Tot.Base.memP elt e /\ FStar.Pervasives.Native.fst elt == x) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.list",
"FStar.Pervasives.Native.tuple2",
"STLC.Core.var",
"FStar.List.Tot.Properties.assoc_memP_some",
"Prims.unit",
"FStar.Pervasives.Native.option",
"STLC.Core.lookup",
"Prims.b2t",
"FStar.Pervasives.Native.uu___is_Some",
"Prims.squash",
"Prims.l_Exists",
"Prims.l_and",
"FStar.List.... | [] | false | false | true | false | false | let lookup_mem (e: list (var & 'a)) (x: var)
: Lemma (requires Some? (lookup e x)) (ensures exists elt. L.memP elt e /\ fst elt == x) =
| let Some y = lookup e x in
List.Tot.Properties.assoc_memP_some x y e | false |
LowParse.Spec.BCVLI.fst | LowParse.Spec.BCVLI.parse_bcvli_payload_kind | val parse_bcvli_payload_kind : LowParse.Spec.Base.parser_kind' | let parse_bcvli_payload_kind = {
parser_kind_low = 0;
parser_kind_high = Some 4;
parser_kind_subkind = Some ParserStrong;
parser_kind_metadata = None;
} | {
"file_name": "src/lowparse/LowParse.Spec.BCVLI.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 1,
"end_line": 13,
"start_col": 0,
"start_line": 8
} | module LowParse.Spec.BCVLI
open LowParse.Spec.Combinators // for parse_ret
module U32 = FStar.UInt32
module Seq = FStar.Seq | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Combinators.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.fsti.checked"
],
"interface_file": tr... | [
{
"abbrev": false,
"full_module": "LowParse.Spec.Combinators // for parse_ret",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": fal... | {
"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.Some",
"Prims.nat",
"LowParse.Spec.Base.parser_subkind",
"LowParse.Spec.Base.ParserStrong",
"FStar.Pervasives.Native.None",
"LowParse.Spec.Base.parser_kind_metadata_some"
] | [] | false | false | false | true | false | let parse_bcvli_payload_kind =
| {
parser_kind_low = 0;
parser_kind_high = Some 4;
parser_kind_subkind = Some ParserStrong;
parser_kind_metadata = None
} | false | |
STLC.Core.fst | STLC.Core.vars_of_env | val vars_of_env (sg: list (var & stlc_ty)) : GTot (Set.set var) | val vars_of_env (sg: list (var & stlc_ty)) : GTot (Set.set var) | let vars_of_env (sg:list (var & stlc_ty))
: GTot (Set.set var)
= Set.intension (contains sg) | {
"file_name": "examples/dsls/stlc/STLC.Core.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 31,
"end_line": 236,
"start_col": 0,
"start_line": 234
} | module STLC.Core
module T = FStar.Tactics.V2
module R = FStar.Reflection.V2
module L = FStar.List.Tot
module RT = FStar.Reflection.Typing
type stlc_ty =
| TUnit
| TArrow : stlc_ty -> stlc_ty -> stlc_ty
let var = nat
let index = nat
noeq
type stlc_exp =
| EUnit : stlc_exp
| EBVar : index -> stlc_exp
| EVar ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Squash.fsti.checked",
"FStar.Set.fsti.checked",
"FStar.Reflection.V2.fst.checked",
"FStar.Reflection.Typing.fsti.checked",
"FStar.Printf.fst.check... | [
{
"abbrev": true,
"full_module": "FStar.Reflection.Typing",
"short_module": "RT"
},
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "L"
},
{
"abbrev": true,
"full_module": "FStar.Reflection.V2",
"short_module": "R"
},
{
"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 | sg: Prims.list (STLC.Core.var * STLC.Core.stlc_ty) -> Prims.GTot (FStar.Set.set STLC.Core.var) | Prims.GTot | [
"sometrivial"
] | [] | [
"Prims.list",
"FStar.Pervasives.Native.tuple2",
"STLC.Core.var",
"STLC.Core.stlc_ty",
"FStar.Set.intension",
"STLC.Core.contains",
"FStar.Set.set"
] | [] | false | false | false | false | false | let vars_of_env (sg: list (var & stlc_ty)) : GTot (Set.set var) =
| Set.intension (contains sg) | false |
STLC.Core.fst | STLC.Core.close_exp' | val close_exp' (e: stlc_exp) (v: var) (n: nat) : e': stlc_exp{size e == size e'} | val close_exp' (e: stlc_exp) (v: var) (n: nat) : e': stlc_exp{size e == size e'} | let rec close_exp' (e:stlc_exp) (v:var) (n:nat)
: e':stlc_exp { size e == size e'}
= match e with
| EUnit -> EUnit
| EVar m -> if m = v then EBVar n else EVar m
| EBVar m -> EBVar m
| ELam t e -> ELam t (close_exp' e v (n + 1))
| EApp e1 e2 -> EApp (close_exp' e1 v n) (close_exp' e2 v n) | {
"file_name": "examples/dsls/stlc/STLC.Core.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 64,
"end_line": 58,
"start_col": 0,
"start_line": 51
} | module STLC.Core
module T = FStar.Tactics.V2
module R = FStar.Reflection.V2
module L = FStar.List.Tot
module RT = FStar.Reflection.Typing
type stlc_ty =
| TUnit
| TArrow : stlc_ty -> stlc_ty -> stlc_ty
let var = nat
let index = nat
noeq
type stlc_exp =
| EUnit : stlc_exp
| EBVar : index -> stlc_exp
| EVar ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Squash.fsti.checked",
"FStar.Set.fsti.checked",
"FStar.Reflection.V2.fst.checked",
"FStar.Reflection.Typing.fsti.checked",
"FStar.Printf.fst.check... | [
{
"abbrev": true,
"full_module": "FStar.Reflection.Typing",
"short_module": "RT"
},
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "L"
},
{
"abbrev": true,
"full_module": "FStar.Reflection.V2",
"short_module": "R"
},
{
"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 | e: STLC.Core.stlc_exp -> v: STLC.Core.var -> n: Prims.nat
-> e': STLC.Core.stlc_exp{STLC.Core.size e == STLC.Core.size e'} | Prims.Tot | [
"total"
] | [] | [
"STLC.Core.stlc_exp",
"STLC.Core.var",
"Prims.nat",
"STLC.Core.EUnit",
"Prims.op_Equality",
"STLC.Core.EBVar",
"Prims.bool",
"STLC.Core.EVar",
"Prims.eq2",
"STLC.Core.size",
"STLC.Core.index",
"STLC.Core.stlc_ty",
"STLC.Core.ELam",
"STLC.Core.close_exp'",
"Prims.op_Addition",
"STLC.Cor... | [
"recursion"
] | false | false | false | false | false | let rec close_exp' (e: stlc_exp) (v: var) (n: nat) : e': stlc_exp{size e == size e'} =
| match e with
| EUnit -> EUnit
| EVar m -> if m = v then EBVar n else EVar m
| EBVar m -> EBVar m
| ELam t e -> ELam t (close_exp' e v (n + 1))
| EApp e1 e2 -> EApp (close_exp' e1 v n) (close_exp' e2 v n) | false |
STLC.Core.fst | STLC.Core.stlc_types_are_closed_core | val stlc_types_are_closed_core (ty: stlc_ty) (ss: RT.subst)
: Lemma (ensures RT.subst_term (elab_ty ty) ss == elab_ty ty)
(decreases ty)
[SMTPat (RT.subst_term (elab_ty ty) ss)] | val stlc_types_are_closed_core (ty: stlc_ty) (ss: RT.subst)
: Lemma (ensures RT.subst_term (elab_ty ty) ss == elab_ty ty)
(decreases ty)
[SMTPat (RT.subst_term (elab_ty ty) ss)] | let rec stlc_types_are_closed_core (ty:stlc_ty) (ss:RT.subst)
: Lemma (ensures RT.subst_term (elab_ty ty) ss == elab_ty ty)
(decreases ty)
[SMTPat (RT.subst_term (elab_ty ty) ss)]
= match ty with
| TUnit -> ()
| TArrow t1 t2 ->
stlc_types_are_closed_core t1 ss;
stlc_types_ar... | {
"file_name": "examples/dsls/stlc/STLC.Core.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 55,
"end_line": 351,
"start_col": 0,
"start_line": 342
} | module STLC.Core
module T = FStar.Tactics.V2
module R = FStar.Reflection.V2
module L = FStar.List.Tot
module RT = FStar.Reflection.Typing
type stlc_ty =
| TUnit
| TArrow : stlc_ty -> stlc_ty -> stlc_ty
let var = nat
let index = nat
noeq
type stlc_exp =
| EUnit : stlc_exp
| EBVar : index -> stlc_exp
| EVar ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Squash.fsti.checked",
"FStar.Set.fsti.checked",
"FStar.Reflection.V2.fst.checked",
"FStar.Reflection.Typing.fsti.checked",
"FStar.Printf.fst.check... | [
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.Reflection.Typing",
"short_module": "RT"
},
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "L"
},
{
"abbrev": true,
"full_module... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | ty: STLC.Core.stlc_ty -> ss: FStar.Reflection.Typing.subst
-> FStar.Pervasives.Lemma
(ensures FStar.Reflection.Typing.subst_term (STLC.Core.elab_ty ty) ss == STLC.Core.elab_ty ty)
(decreases ty)
[SMTPat (FStar.Reflection.Typing.subst_term (STLC.Core.elab_ty ty) ss)] | FStar.Pervasives.Lemma | [
"lemma",
""
] | [] | [
"STLC.Core.stlc_ty",
"FStar.Reflection.Typing.subst",
"STLC.Core.stlc_types_are_closed_core",
"FStar.Reflection.Typing.shift_subst",
"Prims.unit",
"Prims.l_True",
"Prims.squash",
"Prims.eq2",
"FStar.Stubs.Reflection.Types.term",
"FStar.Reflection.Typing.subst_term",
"STLC.Core.elab_ty",
"Prims... | [
"recursion"
] | false | false | true | false | false | let rec stlc_types_are_closed_core (ty: stlc_ty) (ss: RT.subst)
: Lemma (ensures RT.subst_term (elab_ty ty) ss == elab_ty ty)
(decreases ty)
[SMTPat (RT.subst_term (elab_ty ty) ss)] =
| match ty with
| TUnit -> ()
| TArrow t1 t2 ->
stlc_types_are_closed_core t1 ss;
stlc_types_are_closed_core t2 (RT.shift_subst ss) | false |
STLC.Core.fst | STLC.Core.stlc_types_are_closed2 | val stlc_types_are_closed2 (ty: stlc_ty) (x: R.var)
: Lemma (RT.close_term (elab_ty ty) x == elab_ty ty) [SMTPat (RT.close_term (elab_ty ty) x)] | val stlc_types_are_closed2 (ty: stlc_ty) (x: R.var)
: Lemma (RT.close_term (elab_ty ty) x == elab_ty ty) [SMTPat (RT.close_term (elab_ty ty) x)] | let stlc_types_are_closed2 (ty:stlc_ty) (x:R.var)
: Lemma (RT.close_term (elab_ty ty) x == elab_ty ty)
[SMTPat (RT.close_term (elab_ty ty) x)]
= stlc_types_are_closed_core ty [ RT.ND x 0 ];
RT.close_term_spec (elab_ty ty) x | {
"file_name": "examples/dsls/stlc/STLC.Core.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 37,
"end_line": 363,
"start_col": 0,
"start_line": 359
} | module STLC.Core
module T = FStar.Tactics.V2
module R = FStar.Reflection.V2
module L = FStar.List.Tot
module RT = FStar.Reflection.Typing
type stlc_ty =
| TUnit
| TArrow : stlc_ty -> stlc_ty -> stlc_ty
let var = nat
let index = nat
noeq
type stlc_exp =
| EUnit : stlc_exp
| EBVar : index -> stlc_exp
| EVar ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Squash.fsti.checked",
"FStar.Set.fsti.checked",
"FStar.Reflection.V2.fst.checked",
"FStar.Reflection.Typing.fsti.checked",
"FStar.Printf.fst.check... | [
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.Reflection.Typing",
"short_module": "RT"
},
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "L"
},
{
"abbrev": true,
"full_module... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | ty: STLC.Core.stlc_ty -> x: FStar.Stubs.Reflection.V2.Data.var
-> FStar.Pervasives.Lemma
(ensures FStar.Reflection.Typing.close_term (STLC.Core.elab_ty ty) x == STLC.Core.elab_ty ty)
[SMTPat (FStar.Reflection.Typing.close_term (STLC.Core.elab_ty ty) x)] | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"STLC.Core.stlc_ty",
"FStar.Stubs.Reflection.V2.Data.var",
"FStar.Reflection.Typing.close_term_spec",
"STLC.Core.elab_ty",
"Prims.unit",
"STLC.Core.stlc_types_are_closed_core",
"Prims.Cons",
"FStar.Reflection.Typing.subst_elt",
"FStar.Reflection.Typing.ND",
"Prims.Nil",
"Prims.l_True",
"Prims.... | [] | true | false | true | false | false | let stlc_types_are_closed2 (ty: stlc_ty) (x: R.var)
: Lemma (RT.close_term (elab_ty ty) x == elab_ty ty) [SMTPat (RT.close_term (elab_ty ty) x)] =
| stlc_types_are_closed_core ty [RT.ND x 0];
RT.close_term_spec (elab_ty ty) x | false |
STLC.Core.fst | STLC.Core.closed | val closed (e: stlc_exp) : b: bool{b <==> ((freevars e) `Set.equal` Set.empty)} | val closed (e: stlc_exp) : b: bool{b <==> ((freevars e) `Set.equal` Set.empty)} | let rec closed (e:stlc_exp)
: b:bool { b <==> (freevars e `Set.equal` Set.empty) }
= match e with
| EUnit
| EBVar _ -> true
| EVar x ->
assert (x `Set.mem` freevars e);
false
| ELam _ e -> closed e
| EApp e1 e2 -> closed e1 && closed e2 | {
"file_name": "examples/dsls/stlc/STLC.Core.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 42,
"end_line": 125,
"start_col": 0,
"start_line": 116
} | module STLC.Core
module T = FStar.Tactics.V2
module R = FStar.Reflection.V2
module L = FStar.List.Tot
module RT = FStar.Reflection.Typing
type stlc_ty =
| TUnit
| TArrow : stlc_ty -> stlc_ty -> stlc_ty
let var = nat
let index = nat
noeq
type stlc_exp =
| EUnit : stlc_exp
| EBVar : index -> stlc_exp
| EVar ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Squash.fsti.checked",
"FStar.Set.fsti.checked",
"FStar.Reflection.V2.fst.checked",
"FStar.Reflection.Typing.fsti.checked",
"FStar.Printf.fst.check... | [
{
"abbrev": true,
"full_module": "FStar.Reflection.Typing",
"short_module": "RT"
},
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "L"
},
{
"abbrev": true,
"full_module": "FStar.Reflection.V2",
"short_module": "R"
},
{
"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 | e: STLC.Core.stlc_exp
-> b: Prims.bool{b <==> FStar.Set.equal (STLC.Core.freevars e) FStar.Set.empty} | Prims.Tot | [
"total"
] | [] | [
"STLC.Core.stlc_exp",
"STLC.Core.index",
"STLC.Core.var",
"Prims.unit",
"Prims._assert",
"Prims.b2t",
"FStar.Set.mem",
"STLC.Core.freevars",
"STLC.Core.stlc_ty",
"STLC.Core.closed",
"Prims.op_AmpAmp",
"Prims.bool",
"Prims.l_iff",
"FStar.Set.equal",
"FStar.Set.empty"
] | [
"recursion"
] | false | false | false | false | false | let rec closed (e: stlc_exp) : b: bool{b <==> ((freevars e) `Set.equal` Set.empty)} =
| match e with
| EUnit | EBVar _ -> true
| EVar x ->
assert (x `Set.mem` (freevars e));
false
| ELam _ e -> closed e
| EApp e1 e2 -> closed e1 && closed e2 | false |
LowParse.Spec.BCVLI.fst | LowParse.Spec.BCVLI.parse_bounded_bcvli | val parse_bounded_bcvli
(min: nat)
(max: nat { min <= max })
: Tot (parser (parse_bounded_bcvli_kind min max) (bounded_int32 min max)) | val parse_bounded_bcvli
(min: nat)
(max: nat { min <= max })
: Tot (parser (parse_bounded_bcvli_kind min max) (bounded_int32 min max)) | let parse_bounded_bcvli
min max
= parse_bounded_bcvli_kind_correct min max;
strengthen (parse_bounded_bcvli_kind min max) (parse_bounded_bcvli' min max) | {
"file_name": "src/lowparse/LowParse.Spec.BCVLI.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 78,
"end_line": 132,
"start_col": 0,
"start_line": 129
} | module LowParse.Spec.BCVLI
open LowParse.Spec.Combinators // for parse_ret
module U32 = FStar.UInt32
module Seq = FStar.Seq
inline_for_extraction
let parse_bcvli_payload_kind = {
parser_kind_low = 0;
parser_kind_high = Some 4;
parser_kind_subkind = Some ParserStrong;
parser_kind_metadata = None;
}
let parse_... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Combinators.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.fsti.checked"
],
"interface_file": tr... | [
{
"abbrev": false,
"full_module": "LowParse.Spec.Combinators // for parse_ret",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": fal... | {
"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}
-> LowParse.Spec.Base.parser (LowParse.Spec.BCVLI.parse_bounded_bcvli_kind min max)
(LowParse.Spec.BoundedInt.bounded_int32 min max) | Prims.Tot | [
"total"
] | [] | [
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"LowParse.Spec.Base.strengthen",
"LowParse.Spec.BCVLI.parse_bounded_bcvli_kind",
"LowParse.Spec.BoundedInt.bounded_int32",
"LowParse.Spec.BCVLI.parse_bounded_bcvli'",
"Prims.unit",
"LowParse.Spec.BCVLI.parse_bounded_bcvli_kind_correct",
"LowPar... | [] | false | false | false | false | false | let parse_bounded_bcvli min max =
| parse_bounded_bcvli_kind_correct min max;
strengthen (parse_bounded_bcvli_kind min max) (parse_bounded_bcvli' min max) | false |
STLC.Core.fst | STLC.Core.elab_open_commute | val elab_open_commute (e: stlc_exp) (x: var)
: Lemma (RT.open_term (elab_exp e) x == elab_exp (open_exp e x))
[SMTPat (RT.open_term (elab_exp e) x)] | val elab_open_commute (e: stlc_exp) (x: var)
: Lemma (RT.open_term (elab_exp e) x == elab_exp (open_exp e x))
[SMTPat (RT.open_term (elab_exp e) x)] | let elab_open_commute (e:stlc_exp) (x:var)
: Lemma (RT.open_term (elab_exp e) x == elab_exp (open_exp e x))
[SMTPat (RT.open_term (elab_exp e) x)]
= elab_open_commute' e x 0;
RT.open_term_spec (elab_exp e) x | {
"file_name": "examples/dsls/stlc/STLC.Core.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 36,
"end_line": 411,
"start_col": 0,
"start_line": 407
} | module STLC.Core
module T = FStar.Tactics.V2
module R = FStar.Reflection.V2
module L = FStar.List.Tot
module RT = FStar.Reflection.Typing
type stlc_ty =
| TUnit
| TArrow : stlc_ty -> stlc_ty -> stlc_ty
let var = nat
let index = nat
noeq
type stlc_exp =
| EUnit : stlc_exp
| EBVar : index -> stlc_exp
| EVar ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Squash.fsti.checked",
"FStar.Set.fsti.checked",
"FStar.Reflection.V2.fst.checked",
"FStar.Reflection.Typing.fsti.checked",
"FStar.Printf.fst.check... | [
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.Reflection.Typing",
"short_module": "RT"
},
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "L"
},
{
"abbrev": true,
"full_module... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | e: STLC.Core.stlc_exp -> x: STLC.Core.var
-> FStar.Pervasives.Lemma
(ensures
FStar.Reflection.Typing.open_term (STLC.Core.elab_exp e) x ==
STLC.Core.elab_exp (STLC.Core.open_exp e x))
[SMTPat (FStar.Reflection.Typing.open_term (STLC.Core.elab_exp e) x)] | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"STLC.Core.stlc_exp",
"STLC.Core.var",
"FStar.Reflection.Typing.open_term_spec",
"STLC.Core.elab_exp",
"Prims.unit",
"STLC.Core.elab_open_commute'",
"Prims.l_True",
"Prims.squash",
"Prims.eq2",
"FStar.Stubs.Reflection.Types.term",
"FStar.Reflection.Typing.open_term",
"STLC.Core.open_exp",
"P... | [] | true | false | true | false | false | let elab_open_commute (e: stlc_exp) (x: var)
: Lemma (RT.open_term (elab_exp e) x == elab_exp (open_exp e x))
[SMTPat (RT.open_term (elab_exp e) x)] =
| elab_open_commute' e x 0;
RT.open_term_spec (elab_exp e) x | false |
STLC.Core.fst | STLC.Core.elab_ty | val elab_ty (t: stlc_ty) : R.term | val elab_ty (t: stlc_ty) : R.term | let rec elab_ty (t:stlc_ty)
: R.term
= let open R in
match t with
| TUnit ->
R.pack_ln (R.Tv_FVar (R.pack_fv unit_lid))
| TArrow t1 t2 ->
let t1 = elab_ty t1 in
let t2 = elab_ty t2 in
R.pack_ln
(R.Tv_Arrow
(RT.mk_simple_binder RT.pp_name_default t1)
... | {
"file_name": "examples/dsls/stlc/STLC.Core.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 37,
"end_line": 295,
"start_col": 0,
"start_line": 281
} | module STLC.Core
module T = FStar.Tactics.V2
module R = FStar.Reflection.V2
module L = FStar.List.Tot
module RT = FStar.Reflection.Typing
type stlc_ty =
| TUnit
| TArrow : stlc_ty -> stlc_ty -> stlc_ty
let var = nat
let index = nat
noeq
type stlc_exp =
| EUnit : stlc_exp
| EBVar : index -> stlc_exp
| EVar ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Squash.fsti.checked",
"FStar.Set.fsti.checked",
"FStar.Reflection.V2.fst.checked",
"FStar.Reflection.Typing.fsti.checked",
"FStar.Printf.fst.check... | [
{
"abbrev": true,
"full_module": "FStar.Reflection.Typing",
"short_module": "RT"
},
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "L"
},
{
"abbrev": true,
"full_module": "FStar.Reflection.V2",
"short_module": "R"
},
{
"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 | t: STLC.Core.stlc_ty -> FStar.Stubs.Reflection.Types.term | Prims.Tot | [
"total"
] | [] | [
"STLC.Core.stlc_ty",
"FStar.Stubs.Reflection.V2.Builtins.pack_ln",
"FStar.Stubs.Reflection.V2.Data.Tv_FVar",
"FStar.Stubs.Reflection.V2.Builtins.pack_fv",
"FStar.Reflection.Const.unit_lid",
"FStar.Stubs.Reflection.V2.Data.Tv_Arrow",
"FStar.Reflection.Typing.mk_simple_binder",
"FStar.Reflection.Typing.... | [
"recursion"
] | false | false | false | true | false | let rec elab_ty (t: stlc_ty) : R.term =
| let open R in
match t with
| TUnit -> R.pack_ln (R.Tv_FVar (R.pack_fv unit_lid))
| TArrow t1 t2 ->
let t1 = elab_ty t1 in
let t2 = elab_ty t2 in
R.pack_ln (R.Tv_Arrow (RT.mk_simple_binder RT.pp_name_default t1) (R.pack_comp (C_Total t2))) | false |
STLC.Core.fst | STLC.Core.stlc_types_are_closed3 | val stlc_types_are_closed3 (ty: stlc_ty) (x: R.var)
: Lemma (RT.open_term (elab_ty ty) x == elab_ty ty) [SMTPat (RT.open_term (elab_ty ty) x)] | val stlc_types_are_closed3 (ty: stlc_ty) (x: R.var)
: Lemma (RT.open_term (elab_ty ty) x == elab_ty ty) [SMTPat (RT.open_term (elab_ty ty) x)] | let stlc_types_are_closed3 (ty:stlc_ty) (x:R.var)
: Lemma (RT.open_term (elab_ty ty) x == elab_ty ty)
[SMTPat (RT.open_term (elab_ty ty) x)]
= stlc_types_are_closed_core ty [ RT.DT 0 (RT.var_as_term x) ];
RT.open_term_spec (elab_ty ty) x | {
"file_name": "examples/dsls/stlc/STLC.Core.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 36,
"end_line": 369,
"start_col": 0,
"start_line": 365
} | module STLC.Core
module T = FStar.Tactics.V2
module R = FStar.Reflection.V2
module L = FStar.List.Tot
module RT = FStar.Reflection.Typing
type stlc_ty =
| TUnit
| TArrow : stlc_ty -> stlc_ty -> stlc_ty
let var = nat
let index = nat
noeq
type stlc_exp =
| EUnit : stlc_exp
| EBVar : index -> stlc_exp
| EVar ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Squash.fsti.checked",
"FStar.Set.fsti.checked",
"FStar.Reflection.V2.fst.checked",
"FStar.Reflection.Typing.fsti.checked",
"FStar.Printf.fst.check... | [
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.Reflection.Typing",
"short_module": "RT"
},
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "L"
},
{
"abbrev": true,
"full_module... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | ty: STLC.Core.stlc_ty -> x: FStar.Stubs.Reflection.V2.Data.var
-> FStar.Pervasives.Lemma
(ensures FStar.Reflection.Typing.open_term (STLC.Core.elab_ty ty) x == STLC.Core.elab_ty ty)
[SMTPat (FStar.Reflection.Typing.open_term (STLC.Core.elab_ty ty) x)] | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"STLC.Core.stlc_ty",
"FStar.Stubs.Reflection.V2.Data.var",
"FStar.Reflection.Typing.open_term_spec",
"STLC.Core.elab_ty",
"Prims.unit",
"STLC.Core.stlc_types_are_closed_core",
"Prims.Cons",
"FStar.Reflection.Typing.subst_elt",
"FStar.Reflection.Typing.DT",
"FStar.Reflection.Typing.var_as_term",
... | [] | true | false | true | false | false | let stlc_types_are_closed3 (ty: stlc_ty) (x: R.var)
: Lemma (RT.open_term (elab_ty ty) x == elab_ty ty) [SMTPat (RT.open_term (elab_ty ty) x)] =
| stlc_types_are_closed_core ty [RT.DT 0 (RT.var_as_term x)];
RT.open_term_spec (elab_ty ty) x | false |
EverParse3d.Prelude.fst | EverParse3d.Prelude.validate_nlist_total_constant_size_mod_ok | val validate_nlist_total_constant_size_mod_ok
(n: U32.t)
(#wk: _)
(#k: parser_kind true wk)
(#t: Type)
(p: parser k t)
: Pure (validator_no_read (parse_nlist n p))
(requires
(let open LP in
k.parser_kind_subkind == Some ParserStrong /\ k.parser_kind_high == Some... | val validate_nlist_total_constant_size_mod_ok
(n: U32.t)
(#wk: _)
(#k: parser_kind true wk)
(#t: Type)
(p: parser k t)
: Pure (validator_no_read (parse_nlist n p))
(requires
(let open LP in
k.parser_kind_subkind == Some ParserStrong /\ k.parser_kind_high == Some... | let validate_nlist_total_constant_size_mod_ok (n:U32.t) #wk (#k:parser_kind true wk) (#t: Type) (p:parser k t)
: Pure (validator_no_read (parse_nlist n p))
(requires (
let open LP in
k.parser_kind_subkind == Some ParserStrong /\
k.parser_kind_high == Some k.parser_kind_low /\
k.parser_kind_met... | {
"file_name": "src/3d/prelude/EverParse3d.Prelude.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 7,
"end_line": 243,
"start_col": 0,
"start_line": 222
} | (*
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",
"LowParse.Spec.ListUpTo.fsti.checked",
"LowParse.Spec.List.fsti.checked",
"LowParse.Spec.Int.fsti.checked",
"LowParse.Spec.FLData.fst.checked",
"LowParse.Spec.Combinators.fsti.checked",
"LowParse.Spec.BoundedInt.fsti.checked",... | [
{
"abbrev": true,
"full_module": "FStar.Bytes",
"short_module": "B32"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "FStar... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 2,
"max_fuel": 0,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | n: FStar.UInt32.t -> p: EverParse3d.Prelude.parser k t
-> Prims.Pure (EverParse3d.Prelude.validator_no_read (EverParse3d.Prelude.parse_nlist n p)) | Prims.Pure | [] | [] | [
"FStar.UInt32.t",
"EverParse3d.Kinds.weak_kind",
"EverParse3d.Kinds.parser_kind",
"EverParse3d.Prelude.parser",
"LowParse.Slice.srel",
"LowParse.Bytes.byte",
"FStar.Ghost.erased",
"LowParse.Slice.slice",
"Prims.eq2",
"LowParse.Slice.__proj__Mkslice__item__len",
"FStar.Ghost.reveal",
"FStar.UIn... | [] | false | false | false | false | false | let validate_nlist_total_constant_size_mod_ok
(n: U32.t)
#wk
(#k: parser_kind true wk)
(#t: Type)
(p: parser k t)
: Pure (validator_no_read (parse_nlist n p))
(requires
(let open LP in
k.parser_kind_subkind == Some ParserStrong /\ k.parser_kind_high == Some k.pa... | (fun #rrel #rel sl len pos ->
let h = FStar.HyperStack.ST.get () in
[@@ inline_let ]let _ =
parse_nlist_total_fixed_size_kind_correct n p;
LPL.valid_facts (parse_nlist n p) h sl (LPL.uint64_to_uint32 pos);
LPL.valid_facts (LP.strengthen (LP.total_constant_size_parser_kind (U32.v n))
... | false |
STLC.Core.fst | STLC.Core.soundness_lemma | val soundness_lemma (sg: stlc_env) (se: stlc_exp) (st: stlc_ty) (g: RT.fstar_top_env)
: Lemma (requires stlc_typing sg se st)
(ensures RT.tot_typing (extend_env_l g sg) (elab_exp se) (elab_ty st)) | val soundness_lemma (sg: stlc_env) (se: stlc_exp) (st: stlc_ty) (g: RT.fstar_top_env)
: Lemma (requires stlc_typing sg se st)
(ensures RT.tot_typing (extend_env_l g sg) (elab_exp se) (elab_ty st)) | let soundness_lemma (sg:stlc_env)
(se:stlc_exp)
(st:stlc_ty)
(g:RT.fstar_top_env)
: Lemma
(requires stlc_typing sg se st)
(ensures RT.tot_typing (extend_env_l g sg)
(elab_exp se)
(elab_ty st))... | {
"file_name": "examples/dsls/stlc/STLC.Core.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 61,
"end_line": 537,
"start_col": 0,
"start_line": 525
} | module STLC.Core
module T = FStar.Tactics.V2
module R = FStar.Reflection.V2
module L = FStar.List.Tot
module RT = FStar.Reflection.Typing
type stlc_ty =
| TUnit
| TArrow : stlc_ty -> stlc_ty -> stlc_ty
let var = nat
let index = nat
noeq
type stlc_exp =
| EUnit : stlc_exp
| EBVar : index -> stlc_exp
| EVar ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Squash.fsti.checked",
"FStar.Set.fsti.checked",
"FStar.Reflection.V2.fst.checked",
"FStar.Reflection.Typing.fsti.checked",
"FStar.Printf.fst.check... | [
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.Reflection.Typing",
"short_module": "RT"
},
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "L"
},
{
"abbrev": true,
"full_module... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
sg: STLC.Core.stlc_env ->
se: STLC.Core.stlc_exp ->
st: STLC.Core.stlc_ty ->
g: FStar.Reflection.Typing.fstar_top_env
-> FStar.Pervasives.Lemma (requires STLC.Core.stlc_typing sg se st)
(ensures
FStar.Reflection.Typing.tot_typing (STLC.Core.extend_env_l g sg)
(STLC.Core.elab_e... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"STLC.Core.stlc_env",
"STLC.Core.stlc_exp",
"STLC.Core.stlc_ty",
"FStar.Reflection.Typing.fstar_top_env",
"FStar.Squash.bind_squash",
"STLC.Core.stlc_typing",
"FStar.Reflection.Typing.tot_typing",
"STLC.Core.extend_env_l",
"STLC.Core.elab_exp",
"STLC.Core.elab_ty",
"FStar.Squash.return_squash",
... | [] | false | false | true | false | false | let soundness_lemma (sg: stlc_env) (se: stlc_exp) (st: stlc_ty) (g: RT.fstar_top_env)
: Lemma (requires stlc_typing sg se st)
(ensures RT.tot_typing (extend_env_l g sg) (elab_exp se) (elab_ty st)) =
| FStar.Squash.bind_squash #(stlc_typing sg se st)
()
(fun dd -> FStar.Squash.return_squash (soundness dd g)) | false |
STLC.Core.fst | STLC.Core.fresh_not_mem | val fresh_not_mem (e: list (var & 'a)) (elt: (var & 'a))
: Lemma (ensures L.memP elt e ==> fresh e > fst elt) | val fresh_not_mem (e: list (var & 'a)) (elt: (var & 'a))
: Lemma (ensures L.memP elt e ==> fresh e > fst elt) | let rec fresh_not_mem (e:list (var & 'a)) (elt: (var & 'a))
: Lemma (ensures L.memP elt e ==> fresh e > fst elt)
= match e with
| [] -> ()
| hd :: tl -> fresh_not_mem tl elt | {
"file_name": "examples/dsls/stlc/STLC.Core.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 38,
"end_line": 160,
"start_col": 0,
"start_line": 156
} | module STLC.Core
module T = FStar.Tactics.V2
module R = FStar.Reflection.V2
module L = FStar.List.Tot
module RT = FStar.Reflection.Typing
type stlc_ty =
| TUnit
| TArrow : stlc_ty -> stlc_ty -> stlc_ty
let var = nat
let index = nat
noeq
type stlc_exp =
| EUnit : stlc_exp
| EBVar : index -> stlc_exp
| EVar ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Squash.fsti.checked",
"FStar.Set.fsti.checked",
"FStar.Reflection.V2.fst.checked",
"FStar.Reflection.Typing.fsti.checked",
"FStar.Printf.fst.check... | [
{
"abbrev": true,
"full_module": "FStar.Reflection.Typing",
"short_module": "RT"
},
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "L"
},
{
"abbrev": true,
"full_module": "FStar.Reflection.V2",
"short_module": "R"
},
{
"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 | e: Prims.list (STLC.Core.var * 'a) -> elt: (STLC.Core.var * 'a)
-> FStar.Pervasives.Lemma
(ensures FStar.List.Tot.Base.memP elt e ==> STLC.Core.fresh e > FStar.Pervasives.Native.fst elt) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.list",
"FStar.Pervasives.Native.tuple2",
"STLC.Core.var",
"STLC.Core.fresh_not_mem",
"Prims.unit",
"Prims.l_True",
"Prims.squash",
"Prims.l_imp",
"FStar.List.Tot.Base.memP",
"Prims.b2t",
"Prims.op_GreaterThan",
"STLC.Core.fresh",
"FStar.Pervasives.Native.fst",
"Prims.Nil",
"FStar.... | [
"recursion"
] | false | false | true | false | false | let rec fresh_not_mem (e: list (var & 'a)) (elt: (var & 'a))
: Lemma (ensures L.memP elt e ==> fresh e > fst elt) =
| match e with
| [] -> ()
| hd :: tl -> fresh_not_mem tl elt | false |
STLC.Core.fst | STLC.Core.elab_ty_soundness | val elab_ty_soundness (g: RT.fstar_top_env) (sg: stlc_env) (t: stlc_ty)
: GTot (RT.tot_typing (extend_env_l g sg) (elab_ty t) (RT.tm_type RT.u_zero)) (decreases t) | val elab_ty_soundness (g: RT.fstar_top_env) (sg: stlc_env) (t: stlc_ty)
: GTot (RT.tot_typing (extend_env_l g sg) (elab_ty t) (RT.tm_type RT.u_zero)) (decreases t) | let rec elab_ty_soundness (g:RT.fstar_top_env)
(sg:stlc_env)
(t:stlc_ty)
: GTot (RT.tot_typing (extend_env_l g sg) (elab_ty t) (RT.tm_type RT.u_zero))
(decreases t)
= match t with
| TUnit ->
RT.T_FVar _ RT.unit_fv
| TArrow t1 t2 ->
... | {
"file_name": "examples/dsls/stlc/STLC.Core.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 30,
"end_line": 446,
"start_col": 0,
"start_line": 423
} | module STLC.Core
module T = FStar.Tactics.V2
module R = FStar.Reflection.V2
module L = FStar.List.Tot
module RT = FStar.Reflection.Typing
type stlc_ty =
| TUnit
| TArrow : stlc_ty -> stlc_ty -> stlc_ty
let var = nat
let index = nat
noeq
type stlc_exp =
| EUnit : stlc_exp
| EBVar : index -> stlc_exp
| EVar ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Squash.fsti.checked",
"FStar.Set.fsti.checked",
"FStar.Reflection.V2.fst.checked",
"FStar.Reflection.Typing.fsti.checked",
"FStar.Printf.fst.check... | [
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.Reflection.Typing",
"short_module": "RT"
},
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "L"
},
{
"abbrev": true,
"full_module... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | g: FStar.Reflection.Typing.fstar_top_env -> sg: STLC.Core.stlc_env -> t: STLC.Core.stlc_ty
-> Prims.GTot
(FStar.Reflection.Typing.tot_typing (STLC.Core.extend_env_l g sg)
(STLC.Core.elab_ty t)
(FStar.Reflection.Typing.tm_type FStar.Reflection.Typing.u_zero)) | Prims.GTot | [
"sometrivial",
""
] | [] | [
"FStar.Reflection.Typing.fstar_top_env",
"STLC.Core.stlc_env",
"STLC.Core.stlc_ty",
"FStar.Reflection.Typing.T_FVar",
"STLC.Core.extend_env_l",
"FStar.Reflection.Typing.unit_fv",
"FStar.Reflection.Typing.simplify_umax",
"STLC.Core.elab_ty",
"FStar.Reflection.Typing.u_zero",
"FStar.Reflection.Typin... | [
"recursion"
] | false | false | false | false | false | let rec elab_ty_soundness (g: RT.fstar_top_env) (sg: stlc_env) (t: stlc_ty)
: GTot (RT.tot_typing (extend_env_l g sg) (elab_ty t) (RT.tm_type RT.u_zero)) (decreases t) =
| match t with
| TUnit -> RT.T_FVar _ RT.unit_fv
| TArrow t1 t2 ->
let t1_ok = elab_ty_soundness g sg t1 in
let x = fresh sg in
fresh_is_fresh sg;
elab_ty_freevars t2;
let t2_ok = elab_ty_soundness g ((x, t1) :: sg) t2 in
let arr_max:RT.tot_typing (extend_env_l g sg) (elab_ty t) (RT.tm_type RT.(u_max u_zero u... | false |
STLC.Core.fst | STLC.Core.extend_env_l_lookup_bvar | val extend_env_l_lookup_bvar (g: R.env) (sg: stlc_env) (x: var)
: Lemma (requires (forall x. RT.lookup_bvar g x == None))
(ensures
(match lookup sg x with
| Some t -> RT.lookup_bvar (extend_env_l g sg) x == Some (elab_ty t)
| None -> RT.lookup_bvar (extend_env_l g sg) x == None))
... | val extend_env_l_lookup_bvar (g: R.env) (sg: stlc_env) (x: var)
: Lemma (requires (forall x. RT.lookup_bvar g x == None))
(ensures
(match lookup sg x with
| Some t -> RT.lookup_bvar (extend_env_l g sg) x == Some (elab_ty t)
| None -> RT.lookup_bvar (extend_env_l g sg) x == None))
... | let rec extend_env_l_lookup_bvar (g:R.env) (sg:stlc_env) (x:var)
: Lemma
(requires (forall x. RT.lookup_bvar g x == None))
(ensures (
match lookup sg x with
| Some t -> RT.lookup_bvar (extend_env_l g sg) x == Some (elab_ty t)
| None -> RT.lookup_bvar (extend_env_l g sg) x == None))
(dec... | {
"file_name": "examples/dsls/stlc/STLC.Core.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 49,
"end_line": 336,
"start_col": 0,
"start_line": 325
} | module STLC.Core
module T = FStar.Tactics.V2
module R = FStar.Reflection.V2
module L = FStar.List.Tot
module RT = FStar.Reflection.Typing
type stlc_ty =
| TUnit
| TArrow : stlc_ty -> stlc_ty -> stlc_ty
let var = nat
let index = nat
noeq
type stlc_exp =
| EUnit : stlc_exp
| EBVar : index -> stlc_exp
| EVar ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Squash.fsti.checked",
"FStar.Set.fsti.checked",
"FStar.Reflection.V2.fst.checked",
"FStar.Reflection.Typing.fsti.checked",
"FStar.Printf.fst.check... | [
{
"abbrev": true,
"full_module": "FStar.Reflection.Typing",
"short_module": "RT"
},
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "L"
},
{
"abbrev": true,
"full_module": "FStar.Reflection.V2",
"short_module": "R"
},
{
"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 | g: FStar.Stubs.Reflection.Types.env -> sg: STLC.Core.stlc_env -> x: STLC.Core.var
-> FStar.Pervasives.Lemma
(requires
forall (x: Prims.int).
FStar.Reflection.Typing.lookup_bvar g x == FStar.Pervasives.Native.None)
(ensures
((match STLC.Core.lookup sg x with
| FStar.Pe... | FStar.Pervasives.Lemma | [
"lemma",
""
] | [] | [
"FStar.Stubs.Reflection.Types.env",
"STLC.Core.stlc_env",
"STLC.Core.var",
"FStar.Pervasives.Native.tuple2",
"STLC.Core.stlc_ty",
"Prims.list",
"STLC.Core.extend_env_l_lookup_bvar",
"Prims.unit",
"Prims.l_Forall",
"Prims.int",
"Prims.eq2",
"FStar.Pervasives.Native.option",
"FStar.Stubs.Refle... | [
"recursion"
] | false | false | true | false | false | let rec extend_env_l_lookup_bvar (g: R.env) (sg: stlc_env) (x: var)
: Lemma (requires (forall x. RT.lookup_bvar g x == None))
(ensures
(match lookup sg x with
| Some t -> RT.lookup_bvar (extend_env_l g sg) x == Some (elab_ty t)
| None -> RT.lookup_bvar (extend_env_l g sg) x == None... | match sg with
| [] -> ()
| hd :: tl -> extend_env_l_lookup_bvar g tl x | false |
STLC.Core.fst | STLC.Core.extend_env_l_lookup_fvar | val extend_env_l_lookup_fvar (g: R.env) (sg: stlc_env) (fv: R.fv)
: Lemma (ensures RT.lookup_fvar (extend_env_l g sg) fv == RT.lookup_fvar g fv)
[SMTPat (RT.lookup_fvar (extend_env_l g sg) fv)] | val extend_env_l_lookup_fvar (g: R.env) (sg: stlc_env) (fv: R.fv)
: Lemma (ensures RT.lookup_fvar (extend_env_l g sg) fv == RT.lookup_fvar g fv)
[SMTPat (RT.lookup_fvar (extend_env_l g sg) fv)] | let rec extend_env_l_lookup_fvar (g:R.env) (sg:stlc_env) (fv:R.fv)
: Lemma
(ensures
RT.lookup_fvar (extend_env_l g sg) fv ==
RT.lookup_fvar g fv)
[SMTPat (RT.lookup_fvar (extend_env_l g sg) fv)]
= match sg with
| [] -> ()
| hd::tl -> extend_env_l_lookup_fvar g tl fv | {
"file_name": "examples/dsls/stlc/STLC.Core.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 48,
"end_line": 421,
"start_col": 0,
"start_line": 413
} | module STLC.Core
module T = FStar.Tactics.V2
module R = FStar.Reflection.V2
module L = FStar.List.Tot
module RT = FStar.Reflection.Typing
type stlc_ty =
| TUnit
| TArrow : stlc_ty -> stlc_ty -> stlc_ty
let var = nat
let index = nat
noeq
type stlc_exp =
| EUnit : stlc_exp
| EBVar : index -> stlc_exp
| EVar ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Squash.fsti.checked",
"FStar.Set.fsti.checked",
"FStar.Reflection.V2.fst.checked",
"FStar.Reflection.Typing.fsti.checked",
"FStar.Printf.fst.check... | [
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.Reflection.Typing",
"short_module": "RT"
},
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "L"
},
{
"abbrev": true,
"full_module... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | g: FStar.Stubs.Reflection.Types.env -> sg: STLC.Core.stlc_env -> fv: FStar.Stubs.Reflection.Types.fv
-> FStar.Pervasives.Lemma
(ensures
FStar.Reflection.Typing.lookup_fvar (STLC.Core.extend_env_l g sg) fv ==
FStar.Reflection.Typing.lookup_fvar g fv)
[SMTPat (FStar.Reflection.Typing.lookup_... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"FStar.Stubs.Reflection.Types.env",
"STLC.Core.stlc_env",
"FStar.Stubs.Reflection.Types.fv",
"FStar.Pervasives.Native.tuple2",
"STLC.Core.var",
"STLC.Core.stlc_ty",
"Prims.list",
"STLC.Core.extend_env_l_lookup_fvar",
"Prims.unit",
"Prims.l_True",
"Prims.squash",
"Prims.eq2",
"FStar.Pervasive... | [
"recursion"
] | false | false | true | false | false | let rec extend_env_l_lookup_fvar (g: R.env) (sg: stlc_env) (fv: R.fv)
: Lemma (ensures RT.lookup_fvar (extend_env_l g sg) fv == RT.lookup_fvar g fv)
[SMTPat (RT.lookup_fvar (extend_env_l g sg) fv)] =
| match sg with
| [] -> ()
| hd :: tl -> extend_env_l_lookup_fvar g tl fv | false |
Hacl.Impl.Matrix.fst | Hacl.Impl.Matrix.lbytes | val lbytes : len: Lib.IntTypes.size_t -> Type0 | let lbytes len = lbuffer uint8 len | {
"file_name": "code/frodo/Hacl.Impl.Matrix.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 34,
"end_line": 28,
"start_col": 0,
"start_line": 28
} | module Hacl.Impl.Matrix
open FStar.HyperStack.ST
open FStar.Mul
open LowStar.BufferOps
open LowStar.Buffer
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module BSeq = Lib.ByteSequence
module Loops = Lib.LoopCombinators... | {
"checked_file": "/",
"dependencies": [
"Spec.Matrix.fst.checked",
"Spec.Frodo.Lemmas.fst.checked",
"prims.fst.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.Loops.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib... | [
{
"abbrev": true,
"full_module": "Spec.Frodo.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Matrix",
"short_module": "M"
},
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_... | {
"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 | len: Lib.IntTypes.size_t -> Type0 | Prims.Tot | [
"total"
] | [] | [
"Lib.IntTypes.size_t",
"Lib.Buffer.lbuffer",
"Lib.IntTypes.uint8"
] | [] | false | false | false | true | true | let lbytes len =
| lbuffer uint8 len | false | |
STLC.Core.fst | STLC.Core.main | val main (nm: string) (src: stlc_exp) : RT.dsl_tac_t | val main (nm: string) (src: stlc_exp) : RT.dsl_tac_t | let main (nm:string) (src:stlc_exp) : RT.dsl_tac_t =
fun g ->
if ln src && closed src
then
let (| src_ty, d |) = check g [] src in
soundness_lemma [] src src_ty g;
[RT.mk_checked_let g nm (elab_exp src) (elab_ty src_ty)]
else T.fail "Not locally nameless" | {
"file_name": "examples/dsls/stlc/STLC.Core.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 36,
"end_line": 546,
"start_col": 0,
"start_line": 539
} | module STLC.Core
module T = FStar.Tactics.V2
module R = FStar.Reflection.V2
module L = FStar.List.Tot
module RT = FStar.Reflection.Typing
type stlc_ty =
| TUnit
| TArrow : stlc_ty -> stlc_ty -> stlc_ty
let var = nat
let index = nat
noeq
type stlc_exp =
| EUnit : stlc_exp
| EBVar : index -> stlc_exp
| EVar ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Squash.fsti.checked",
"FStar.Set.fsti.checked",
"FStar.Reflection.V2.fst.checked",
"FStar.Reflection.Typing.fsti.checked",
"FStar.Printf.fst.check... | [
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.Reflection.Typing",
"short_module": "RT"
},
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "L"
},
{
"abbrev": true,
"full_module... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | nm: Prims.string -> src: STLC.Core.stlc_exp -> FStar.Reflection.Typing.dsl_tac_t | Prims.Tot | [
"total"
] | [] | [
"Prims.string",
"STLC.Core.stlc_exp",
"FStar.Reflection.Typing.fstar_top_env",
"Prims.op_AmpAmp",
"STLC.Core.ln",
"STLC.Core.closed",
"STLC.Core.stlc_ty",
"STLC.Core.stlc_typing",
"Prims.Nil",
"FStar.Pervasives.Native.tuple2",
"STLC.Core.var",
"Prims.Cons",
"FStar.Reflection.Typing.sigelt_fo... | [] | false | false | false | true | false | let main (nm: string) (src: stlc_exp) : RT.dsl_tac_t =
| fun g ->
if ln src && closed src
then
let (| src_ty , d |) = check g [] src in
soundness_lemma [] src src_ty g;
[RT.mk_checked_let g nm (elab_exp src) (elab_ty src_ty)]
else T.fail "Not locally nameless" | false |
Hacl.Impl.Matrix.fst | Hacl.Impl.Matrix.elem | val elem : Type0 | let elem = uint16 | {
"file_name": "code/frodo/Hacl.Impl.Matrix.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 17,
"end_line": 25,
"start_col": 0,
"start_line": 25
} | module Hacl.Impl.Matrix
open FStar.HyperStack.ST
open FStar.Mul
open LowStar.BufferOps
open LowStar.Buffer
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module BSeq = Lib.ByteSequence
module Loops = Lib.LoopCombinators... | {
"checked_file": "/",
"dependencies": [
"Spec.Matrix.fst.checked",
"Spec.Frodo.Lemmas.fst.checked",
"prims.fst.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.Loops.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib... | [
{
"abbrev": true,
"full_module": "Spec.Frodo.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Matrix",
"short_module": "M"
},
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_... | {
"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 | Type0 | Prims.Tot | [
"total"
] | [] | [
"Lib.IntTypes.uint16"
] | [] | false | false | false | true | true | let elem =
| uint16 | false | |
STLC.Core.fst | STLC.Core.elab_ty_freevars | val elab_ty_freevars (ty: stlc_ty) : Lemma ((RT.freevars (elab_ty ty)) `Set.equal` Set.empty) | val elab_ty_freevars (ty: stlc_ty) : Lemma ((RT.freevars (elab_ty ty)) `Set.equal` Set.empty) | let rec elab_ty_freevars (ty:stlc_ty)
: Lemma (RT.freevars (elab_ty ty) `Set.equal` Set.empty)
= match ty with
| TUnit -> ()
| TArrow t1 t2 ->
elab_ty_freevars t1;
elab_ty_freevars t2 | {
"file_name": "examples/dsls/stlc/STLC.Core.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 25,
"end_line": 377,
"start_col": 0,
"start_line": 371
} | module STLC.Core
module T = FStar.Tactics.V2
module R = FStar.Reflection.V2
module L = FStar.List.Tot
module RT = FStar.Reflection.Typing
type stlc_ty =
| TUnit
| TArrow : stlc_ty -> stlc_ty -> stlc_ty
let var = nat
let index = nat
noeq
type stlc_exp =
| EUnit : stlc_exp
| EBVar : index -> stlc_exp
| EVar ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Squash.fsti.checked",
"FStar.Set.fsti.checked",
"FStar.Reflection.V2.fst.checked",
"FStar.Reflection.Typing.fsti.checked",
"FStar.Printf.fst.check... | [
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.Reflection.Typing",
"short_module": "RT"
},
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "L"
},
{
"abbrev": true,
"full_module... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | ty: STLC.Core.stlc_ty
-> FStar.Pervasives.Lemma
(ensures
FStar.Set.equal (FStar.Reflection.Typing.freevars (STLC.Core.elab_ty ty)) FStar.Set.empty) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"STLC.Core.stlc_ty",
"STLC.Core.elab_ty_freevars",
"Prims.unit",
"Prims.l_True",
"Prims.squash",
"FStar.Set.equal",
"FStar.Stubs.Reflection.V2.Data.var",
"FStar.Reflection.Typing.freevars",
"STLC.Core.elab_ty",
"FStar.Set.empty",
"Prims.Nil",
"FStar.Pervasives.pattern"
] | [
"recursion"
] | false | false | true | false | false | let rec elab_ty_freevars (ty: stlc_ty) : Lemma ((RT.freevars (elab_ty ty)) `Set.equal` Set.empty) =
| match ty with
| TUnit -> ()
| TArrow t1 t2 ->
elab_ty_freevars t1;
elab_ty_freevars t2 | false |
STLC.Core.fst | STLC.Core.soundness | val soundness
(#sg: stlc_env)
(#se: stlc_exp)
(#st: stlc_ty)
(dd: stlc_typing sg se st)
(g: RT.fstar_top_env)
: GTot (RT.tot_typing (extend_env_l g sg) (elab_exp se) (elab_ty st)) (decreases dd) | val soundness
(#sg: stlc_env)
(#se: stlc_exp)
(#st: stlc_ty)
(dd: stlc_typing sg se st)
(g: RT.fstar_top_env)
: GTot (RT.tot_typing (extend_env_l g sg) (elab_exp se) (elab_ty st)) (decreases dd) | let rec soundness (#sg:stlc_env)
(#se:stlc_exp)
(#st:stlc_ty)
(dd:stlc_typing sg se st)
(g:RT.fstar_top_env)
: GTot (RT.tot_typing (extend_env_l g sg)
(elab_exp se)
(elab_ty st))
(decrease... | {
"file_name": "examples/dsls/stlc/STLC.Core.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 8,
"end_line": 523,
"start_col": 0,
"start_line": 461
} | module STLC.Core
module T = FStar.Tactics.V2
module R = FStar.Reflection.V2
module L = FStar.List.Tot
module RT = FStar.Reflection.Typing
type stlc_ty =
| TUnit
| TArrow : stlc_ty -> stlc_ty -> stlc_ty
let var = nat
let index = nat
noeq
type stlc_exp =
| EUnit : stlc_exp
| EBVar : index -> stlc_exp
| EVar ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Squash.fsti.checked",
"FStar.Set.fsti.checked",
"FStar.Reflection.V2.fst.checked",
"FStar.Reflection.Typing.fsti.checked",
"FStar.Printf.fst.check... | [
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.Reflection.Typing",
"short_module": "RT"
},
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "L"
},
{
"abbrev": true,
"full_module... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | dd: STLC.Core.stlc_typing sg se st -> g: FStar.Reflection.Typing.fstar_top_env
-> Prims.GTot
(FStar.Reflection.Typing.tot_typing (STLC.Core.extend_env_l g sg)
(STLC.Core.elab_exp se)
(STLC.Core.elab_ty st)) | Prims.GTot | [
"sometrivial",
""
] | [] | [
"STLC.Core.stlc_env",
"STLC.Core.stlc_exp",
"STLC.Core.stlc_ty",
"STLC.Core.stlc_typing",
"FStar.Reflection.Typing.fstar_top_env",
"FStar.Reflection.Typing.T_Const",
"STLC.Core.extend_env_l",
"FStar.Stubs.Reflection.V2.Data.C_Unit",
"FStar.Reflection.Typing.unit_ty",
"FStar.Reflection.Typing.CT_Un... | [
"recursion"
] | false | false | false | false | false | let rec soundness
(#sg: stlc_env)
(#se: stlc_exp)
(#st: stlc_ty)
(dd: stlc_typing sg se st)
(g: RT.fstar_top_env)
: GTot (RT.tot_typing (extend_env_l g sg) (elab_exp se) (elab_ty st)) (decreases dd) =
| match dd with
| T_Unit _ -> RT.T_Const _ _ _ RT.CT_Unit
| T_Var _ x -> RT.T_Var _ (R.pack_namedv (RT.make_namedv x))
| T_Lam _ t e t' x de ->
let de:RT.tot_typing (extend_env_l g ((x, t) :: sg)) (elab_exp (open_exp e x)) (elab_ty t') =
soundness de g
in
let de:RT.tot_typing (RT.extend_env (extend_env_l g sg) ... | false |
LowParse.Spec.BCVLI.fst | LowParse.Spec.BCVLI.parse_bcvli | val parse_bcvli : parser parse_bcvli_kind U32.t | val parse_bcvli : parser parse_bcvli_kind U32.t | let parse_bcvli : parser parse_bcvli_kind U32.t =
parse_bounded_integer_le 1 `and_then` parse_bcvli_payload | {
"file_name": "src/lowparse/LowParse.Spec.BCVLI.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 59,
"end_line": 34,
"start_col": 0,
"start_line": 33
} | module LowParse.Spec.BCVLI
open LowParse.Spec.Combinators // for parse_ret
module U32 = FStar.UInt32
module Seq = FStar.Seq
inline_for_extraction
let parse_bcvli_payload_kind = {
parser_kind_low = 0;
parser_kind_high = Some 4;
parser_kind_subkind = Some ParserStrong;
parser_kind_metadata = None;
}
let parse_... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Combinators.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.fsti.checked"
],
"interface_file": tr... | [
{
"abbrev": false,
"full_module": "LowParse.Spec.Combinators // for parse_ret",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": fal... | {
"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.BCVLI.parse_bcvli_kind FStar.UInt32.t | Prims.Tot | [
"total"
] | [] | [
"LowParse.Spec.Combinators.and_then",
"LowParse.Spec.BoundedInt.parse_bounded_integer_kind",
"LowParse.Spec.BoundedInt.bounded_integer",
"LowParse.Spec.BoundedInt.parse_bounded_integer_le",
"LowParse.Spec.BCVLI.parse_bcvli_payload_kind",
"FStar.UInt32.t",
"LowParse.Spec.BCVLI.parse_bcvli_payload",
"Lo... | [] | false | false | false | true | false | let parse_bcvli:parser parse_bcvli_kind U32.t =
| (parse_bounded_integer_le 1) `and_then` parse_bcvli_payload | false |
LowParse.Spec.BCVLI.fst | LowParse.Spec.BCVLI.parse_bounded_bcvli' | val parse_bounded_bcvli' (min: nat) (max: nat{min <= max})
: Tot (parser (parse_filter_kind parse_bcvli_kind) (bounded_int32 min max)) | val parse_bounded_bcvli' (min: nat) (max: nat{min <= max})
: Tot (parser (parse_filter_kind parse_bcvli_kind) (bounded_int32 min max)) | let parse_bounded_bcvli'
(min: nat)
(max: nat { min <= max })
: Tot (parser (parse_filter_kind parse_bcvli_kind) (bounded_int32 min max))
= parse_filter parse_bcvli (in_bounds min max) | {
"file_name": "src/lowparse/LowParse.Spec.BCVLI.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 46,
"end_line": 106,
"start_col": 0,
"start_line": 102
} | module LowParse.Spec.BCVLI
open LowParse.Spec.Combinators // for parse_ret
module U32 = FStar.UInt32
module Seq = FStar.Seq
inline_for_extraction
let parse_bcvli_payload_kind = {
parser_kind_low = 0;
parser_kind_high = Some 4;
parser_kind_subkind = Some ParserStrong;
parser_kind_metadata = None;
}
let parse_... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Combinators.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.fsti.checked"
],
"interface_file": tr... | [
{
"abbrev": false,
"full_module": "LowParse.Spec.Combinators // for parse_ret",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": fal... | {
"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}
-> LowParse.Spec.Base.parser (LowParse.Spec.Combinators.parse_filter_kind LowParse.Spec.BCVLI.parse_bcvli_kind
)
(LowParse.Spec.BoundedInt.bounded_int32 min max) | Prims.Tot | [
"total"
] | [] | [
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"LowParse.Spec.Combinators.parse_filter",
"LowParse.Spec.BCVLI.parse_bcvli_kind",
"FStar.UInt32.t",
"LowParse.Spec.BCVLI.parse_bcvli",
"LowParse.Spec.BoundedInt.in_bounds",
"LowParse.Spec.Base.parser",
"LowParse.Spec.Combinators.parse_filter_ki... | [] | false | false | false | false | false | let parse_bounded_bcvli' (min: nat) (max: nat{min <= max})
: Tot (parser (parse_filter_kind parse_bcvli_kind) (bounded_int32 min max)) =
| parse_filter parse_bcvli (in_bounds min max) | false |
LowParse.Spec.BCVLI.fst | LowParse.Spec.BCVLI.parse_bcvli_payload | val parse_bcvli_payload (x: bounded_integer 1) : Tot (parser parse_bcvli_payload_kind U32.t) | val parse_bcvli_payload (x: bounded_integer 1) : Tot (parser parse_bcvli_payload_kind U32.t) | let parse_bcvli_payload (x: bounded_integer 1) : Tot (parser parse_bcvli_payload_kind U32.t) =
if U32.v x <= 252 then weaken parse_bcvli_payload_kind (parse_ret (x <: U32.t)) else
if U32.v x = 253 then weaken parse_bcvli_payload_kind ((parse_bounded_integer_le 2 `parse_filter` (fun x -> U32.v x >= 253)) `parse_synt... | {
"file_name": "src/lowparse/LowParse.Spec.BCVLI.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 44,
"end_line": 19,
"start_col": 0,
"start_line": 15
} | module LowParse.Spec.BCVLI
open LowParse.Spec.Combinators // for parse_ret
module U32 = FStar.UInt32
module Seq = FStar.Seq
inline_for_extraction
let parse_bcvli_payload_kind = {
parser_kind_low = 0;
parser_kind_high = Some 4;
parser_kind_subkind = Some ParserStrong;
parser_kind_metadata = None;
} | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Combinators.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.fsti.checked"
],
"interface_file": tr... | [
{
"abbrev": false,
"full_module": "LowParse.Spec.Combinators // for parse_ret",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": fal... | {
"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: LowParse.Spec.BoundedInt.bounded_integer 1
-> LowParse.Spec.Base.parser LowParse.Spec.BCVLI.parse_bcvli_payload_kind FStar.UInt32.t | Prims.Tot | [
"total"
] | [] | [
"LowParse.Spec.BoundedInt.bounded_integer",
"Prims.op_LessThanOrEqual",
"FStar.UInt32.v",
"LowParse.Spec.Base.weaken",
"LowParse.Spec.BCVLI.parse_bcvli_payload_kind",
"LowParse.Spec.Combinators.parse_ret_kind",
"FStar.UInt32.t",
"LowParse.Spec.Combinators.parse_ret",
"Prims.bool",
"Prims.op_Equali... | [] | false | false | false | false | false | let parse_bcvli_payload (x: bounded_integer 1) : Tot (parser parse_bcvli_payload_kind U32.t) =
| if U32.v x <= 252
then weaken parse_bcvli_payload_kind (parse_ret (x <: U32.t))
else
if U32.v x = 253
then
weaken parse_bcvli_payload_kind
(((parse_bounded_integer_le 2) `parse_filter` (fun x -> U32.v x >= 253))
`parse_synth`
(fun x -> (x <: U32.t)))
else
if U32.v x = 254
then
... | false |
STLC.Core.fst | STLC.Core.elab_open_commute' | val elab_open_commute' (e: stlc_exp) (x: var) (n: nat)
: Lemma
(ensures RT.subst_term (elab_exp e) (RT.open_with_var x n) == elab_exp (open_exp' e x n))
(decreases e) | val elab_open_commute' (e: stlc_exp) (x: var) (n: nat)
: Lemma
(ensures RT.subst_term (elab_exp e) (RT.open_with_var x n) == elab_exp (open_exp' e x n))
(decreases e) | let rec elab_open_commute' (e:stlc_exp) (x:var) (n:nat)
: Lemma (ensures
RT.subst_term (elab_exp e) (RT.open_with_var x n) ==
elab_exp (open_exp' e x n))
(decreases e)
= match e with
| EUnit -> ()
| EBVar _ -> ()
| EVar _ -> ()
| EApp e1 e2 ->
elab_open_c... | {
"file_name": "examples/dsls/stlc/STLC.Core.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 7,
"end_line": 405,
"start_col": 0,
"start_line": 379
} | module STLC.Core
module T = FStar.Tactics.V2
module R = FStar.Reflection.V2
module L = FStar.List.Tot
module RT = FStar.Reflection.Typing
type stlc_ty =
| TUnit
| TArrow : stlc_ty -> stlc_ty -> stlc_ty
let var = nat
let index = nat
noeq
type stlc_exp =
| EUnit : stlc_exp
| EBVar : index -> stlc_exp
| EVar ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Squash.fsti.checked",
"FStar.Set.fsti.checked",
"FStar.Reflection.V2.fst.checked",
"FStar.Reflection.Typing.fsti.checked",
"FStar.Printf.fst.check... | [
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.Reflection.Typing",
"short_module": "RT"
},
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "L"
},
{
"abbrev": true,
"full_module... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | e: STLC.Core.stlc_exp -> x: STLC.Core.var -> n: Prims.nat
-> FStar.Pervasives.Lemma
(ensures
FStar.Reflection.Typing.subst_term (STLC.Core.elab_exp e)
(FStar.Reflection.Typing.open_with_var x n) ==
STLC.Core.elab_exp (STLC.Core.open_exp' e x n)) (decreases e) | FStar.Pervasives.Lemma | [
"lemma",
""
] | [] | [
"STLC.Core.stlc_exp",
"STLC.Core.var",
"Prims.nat",
"STLC.Core.index",
"STLC.Core.elab_open_commute'",
"Prims.unit",
"STLC.Core.stlc_ty",
"FStar.Calc.calc_finish",
"FStar.Stubs.Reflection.Types.term",
"Prims.eq2",
"STLC.Core.elab_exp",
"STLC.Core.open_exp'",
"STLC.Core.ELam",
"FStar.Reflec... | [
"recursion"
] | false | false | true | false | false | let rec elab_open_commute' (e: stlc_exp) (x: var) (n: nat)
: Lemma
(ensures RT.subst_term (elab_exp e) (RT.open_with_var x n) == elab_exp (open_exp' e x n))
(decreases e) =
| match e with
| EUnit -> ()
| EBVar _ -> ()
| EVar _ -> ()
| EApp e1 e2 ->
elab_open_commute' e1 x n;
elab_open_commute' e2 x n
| ELam t e ->
calc ( == ) {
elab_exp (open_exp' (ELam t e) x n);
( == ) { () }
elab_exp (ELam t (open_exp' e x (n + 1)));
( == ) { () }
let open R in
pack_ln (Tv_A... | false |
LowParse.Spec.BCVLI.fst | LowParse.Spec.BCVLI.serialize_bounded_bcvli | val serialize_bounded_bcvli
(min: nat)
(max: nat { min <= max })
: Tot (serializer (parse_bounded_bcvli min max)) | val serialize_bounded_bcvli
(min: nat)
(max: nat { min <= max })
: Tot (serializer (parse_bounded_bcvli min max)) | let serialize_bounded_bcvli
min max
= assert_norm (parse_filter_refine (in_bounds min max) == bounded_int32 min max);
serialize_ext
_
(serialize_filter serialize_bcvli (in_bounds min max))
(parse_bounded_bcvli min max) | {
"file_name": "src/lowparse/LowParse.Spec.BCVLI.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 33,
"end_line": 145,
"start_col": 0,
"start_line": 139
} | module LowParse.Spec.BCVLI
open LowParse.Spec.Combinators // for parse_ret
module U32 = FStar.UInt32
module Seq = FStar.Seq
inline_for_extraction
let parse_bcvli_payload_kind = {
parser_kind_low = 0;
parser_kind_high = Some 4;
parser_kind_subkind = Some ParserStrong;
parser_kind_metadata = None;
}
let parse_... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Combinators.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.fsti.checked"
],
"interface_file": tr... | [
{
"abbrev": false,
"full_module": "LowParse.Spec.Combinators // for parse_ret",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": fal... | {
"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}
-> LowParse.Spec.Base.serializer (LowParse.Spec.BCVLI.parse_bounded_bcvli min max) | Prims.Tot | [
"total"
] | [] | [
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"LowParse.Spec.Base.serialize_ext",
"LowParse.Spec.Combinators.parse_filter_kind",
"LowParse.Spec.BCVLI.parse_bcvli_kind",
"LowParse.Spec.Combinators.parse_filter_refine",
"FStar.UInt32.t",
"LowParse.Spec.BoundedInt.in_bounds",
"LowParse.Spec.C... | [] | false | false | false | false | false | let serialize_bounded_bcvli min max =
| assert_norm (parse_filter_refine (in_bounds min max) == bounded_int32 min max);
serialize_ext _ (serialize_filter serialize_bcvli (in_bounds min max)) (parse_bounded_bcvli min max) | false |
LowParse.Spec.BCVLI.fst | LowParse.Spec.BCVLI.serialize_bcvli | val serialize_bcvli : serializer parse_bcvli | val serialize_bcvli : serializer parse_bcvli | let serialize_bcvli : serializer parse_bcvli = bare_serialize_bcvli | {
"file_name": "src/lowparse/LowParse.Spec.BCVLI.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 67,
"end_line": 98,
"start_col": 0,
"start_line": 98
} | module LowParse.Spec.BCVLI
open LowParse.Spec.Combinators // for parse_ret
module U32 = FStar.UInt32
module Seq = FStar.Seq
inline_for_extraction
let parse_bcvli_payload_kind = {
parser_kind_low = 0;
parser_kind_high = Some 4;
parser_kind_subkind = Some ParserStrong;
parser_kind_metadata = None;
}
let parse_... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Combinators.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.fsti.checked"
],
"interface_file": tr... | [
{
"abbrev": false,
"full_module": "LowParse.Spec.Combinators // for parse_ret",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": fal... | {
"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.BCVLI.parse_bcvli | Prims.Tot | [
"total"
] | [] | [
"LowParse.Spec.BCVLI.bare_serialize_bcvli",
"LowParse.Spec.Base.serializer",
"LowParse.Spec.BCVLI.parse_bcvli_kind",
"FStar.UInt32.t",
"LowParse.Spec.BCVLI.parse_bcvli"
] | [] | false | false | false | true | false | let serialize_bcvli:serializer parse_bcvli =
| bare_serialize_bcvli | false |
LowParse.Spec.BCVLI.fst | LowParse.Spec.BCVLI.bare_serialize_bcvli | val bare_serialize_bcvli (x: U32.t) : GTot bytes | val bare_serialize_bcvli (x: U32.t) : GTot bytes | let bare_serialize_bcvli (x: U32.t) : GTot bytes =
let c1 : bounded_integer 1 =
if U32.v x <= 252 then
x
else if U32.v x <= 65535 then
253ul
else
254ul
in
Seq.append
(serialize (serialize_bounded_integer_le 1) c1)
(
if U32.v c1 <= 252 then Seq.empty else
if U32.v ... | {
"file_name": "src/lowparse/LowParse.Spec.BCVLI.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 5,
"end_line": 63,
"start_col": 0,
"start_line": 48
} | module LowParse.Spec.BCVLI
open LowParse.Spec.Combinators // for parse_ret
module U32 = FStar.UInt32
module Seq = FStar.Seq
inline_for_extraction
let parse_bcvli_payload_kind = {
parser_kind_low = 0;
parser_kind_high = Some 4;
parser_kind_subkind = Some ParserStrong;
parser_kind_metadata = None;
}
let parse_... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Combinators.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.fsti.checked"
],
"interface_file": tr... | [
{
"abbrev": false,
"full_module": "LowParse.Spec.Combinators // for parse_ret",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": fal... | {
"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: FStar.UInt32.t -> Prims.GTot LowParse.Bytes.bytes | Prims.GTot | [
"sometrivial"
] | [] | [
"FStar.UInt32.t",
"FStar.Seq.Base.append",
"LowParse.Bytes.byte",
"LowParse.Spec.Base.serialize",
"LowParse.Spec.BoundedInt.parse_bounded_integer_kind",
"LowParse.Spec.BoundedInt.bounded_integer",
"LowParse.Spec.BoundedInt.parse_bounded_integer_le",
"LowParse.Spec.BoundedInt.serialize_bounded_integer_... | [] | false | false | false | false | false | let bare_serialize_bcvli (x: U32.t) : GTot bytes =
| let c1:bounded_integer 1 =
if U32.v x <= 252 then x else if U32.v x <= 65535 then 253ul else 254ul
in
Seq.append (serialize (serialize_bounded_integer_le 1) c1)
(if U32.v c1 <= 252
then Seq.empty
else
if U32.v c1 = 253
then serialize (serialize_bounded_integer_le 2) x
else serialize (seria... | false |
LowParse.Spec.BCVLI.fst | LowParse.Spec.BCVLI.parse_bounded_bcvli_eq | val parse_bounded_bcvli_eq
(min: nat)
(max: nat { min <= max })
(input: bytes)
: Lemma
(parse (parse_bounded_bcvli min max) input == (
match parse parse_bcvli input with
| Some (n, consumed) ->
if in_bounds min max n
then Some (n, consumed)
else None
| _ -> None
)) | val parse_bounded_bcvli_eq
(min: nat)
(max: nat { min <= max })
(input: bytes)
: Lemma
(parse (parse_bounded_bcvli min max) input == (
match parse parse_bcvli input with
| Some (n, consumed) ->
if in_bounds min max n
then Some (n, consumed)
else None
| _ -> None
)) | let parse_bounded_bcvli_eq
min max input
= parse_filter_eq parse_bcvli (in_bounds min max) input;
parse_bcvli_eq input | {
"file_name": "src/lowparse/LowParse.Spec.BCVLI.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 22,
"end_line": 137,
"start_col": 0,
"start_line": 134
} | module LowParse.Spec.BCVLI
open LowParse.Spec.Combinators // for parse_ret
module U32 = FStar.UInt32
module Seq = FStar.Seq
inline_for_extraction
let parse_bcvli_payload_kind = {
parser_kind_low = 0;
parser_kind_high = Some 4;
parser_kind_subkind = Some ParserStrong;
parser_kind_metadata = None;
}
let parse_... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Combinators.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.fsti.checked"
],
"interface_file": tr... | [
{
"abbrev": false,
"full_module": "LowParse.Spec.Combinators // for parse_ret",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": fal... | {
"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} -> input: LowParse.Bytes.bytes
-> FStar.Pervasives.Lemma
(ensures
LowParse.Spec.Base.parse (LowParse.Spec.BCVLI.parse_bounded_bcvli min max) input ==
(match LowParse.Spec.Base.parse LowParse.Spec.BCVLI.parse_bcvli input with
| FStar.Pervasives.Nativ... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"LowParse.Bytes.bytes",
"LowParse.Spec.BCVLI.parse_bcvli_eq",
"Prims.unit",
"LowParse.Spec.Combinators.parse_filter_eq",
"LowParse.Spec.BCVLI.parse_bcvli_kind",
"FStar.UInt32.t",
"LowParse.Spec.BCVLI.parse_bcvli",
"LowParse.Spec.BoundedInt.in... | [] | true | false | true | false | false | let parse_bounded_bcvli_eq min max input =
| parse_filter_eq parse_bcvli (in_bounds min max) input;
parse_bcvli_eq input | false |
LowParse.Spec.BCVLI.fst | LowParse.Spec.BCVLI.parse_bounded_bcvli_kind_correct | val parse_bounded_bcvli_kind_correct (min: nat) (max: nat{min <= max})
: Lemma (parser_kind_prop (parse_bounded_bcvli_kind min max) (parse_bounded_bcvli' min max)) | val parse_bounded_bcvli_kind_correct (min: nat) (max: nat{min <= max})
: Lemma (parser_kind_prop (parse_bounded_bcvli_kind min max) (parse_bounded_bcvli' min max)) | let parse_bounded_bcvli_kind_correct
(min: nat)
(max: nat { min <= max })
: Lemma
(parser_kind_prop (parse_bounded_bcvli_kind min max) (parse_bounded_bcvli' min max))
= parse_bounded_bcvli_size_correct min max;
parser_kind_prop_equiv (parse_filter_kind parse_bcvli_kind) (parse_bounded_bcvli' min max);
parser_... | {
"file_name": "src/lowparse/LowParse.Spec.BCVLI.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 90,
"end_line": 127,
"start_col": 0,
"start_line": 120
} | module LowParse.Spec.BCVLI
open LowParse.Spec.Combinators // for parse_ret
module U32 = FStar.UInt32
module Seq = FStar.Seq
inline_for_extraction
let parse_bcvli_payload_kind = {
parser_kind_low = 0;
parser_kind_high = Some 4;
parser_kind_subkind = Some ParserStrong;
parser_kind_metadata = None;
}
let parse_... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Combinators.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.fsti.checked"
],
"interface_file": tr... | [
{
"abbrev": false,
"full_module": "LowParse.Spec.Combinators // for parse_ret",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": fal... | {
"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}
-> FStar.Pervasives.Lemma
(ensures
LowParse.Spec.Base.parser_kind_prop (LowParse.Spec.BCVLI.parse_bounded_bcvli_kind min max)
(LowParse.Spec.BCVLI.parse_bounded_bcvli' min max)) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"LowParse.Spec.Base.parser_kind_prop_equiv",
"LowParse.Spec.BoundedInt.bounded_int32",
"LowParse.Spec.BCVLI.parse_bounded_bcvli_kind",
"LowParse.Spec.BCVLI.parse_bounded_bcvli'",
"Prims.unit",
"LowParse.Spec.Combinators.parse_filter_kind",
"Low... | [] | true | false | true | false | false | let parse_bounded_bcvli_kind_correct (min: nat) (max: nat{min <= max})
: Lemma (parser_kind_prop (parse_bounded_bcvli_kind min max) (parse_bounded_bcvli' min max)) =
| parse_bounded_bcvli_size_correct min max;
parser_kind_prop_equiv (parse_filter_kind parse_bcvli_kind) (parse_bounded_bcvli' min max);
parser_kind_prop_equiv (parse_bounded_bcvli_kind min max) (parse_bounded_bcvli' min max) | false |
Steel.Utils.fst | Steel.Utils.emp_unit | val emp_unit (p: vprop)
: Lemma (((p `star` emp) `equiv` p) /\ ((emp `star` p) `equiv` p))
[SMTPatOr [[SMTPat (p `star` emp)]; [SMTPat (emp `star` p)]]] | val emp_unit (p: vprop)
: Lemma (((p `star` emp) `equiv` p) /\ ((emp `star` p) `equiv` p))
[SMTPatOr [[SMTPat (p `star` emp)]; [SMTPat (emp `star` p)]]] | let emp_unit (p:vprop)
: Lemma (((p `star` emp) `equiv` p) /\
((emp `star` p) `equiv` p))
[SMTPatOr [[SMTPat (p `star` emp)];
[SMTPat (emp `star` p)]]]
= reveal_equiv (p `star` emp) p;
reveal_equiv (emp `star` p) p;
reveal_emp ();
Steel.Memory.emp_unit (hp_of p)... | {
"file_name": "lib/steel/Steel.Utils.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 60,
"end_line": 75,
"start_col": 0,
"start_line": 66
} | (*
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.Memory.fsti.checked",
"Steel.FractionalPermission.fst.checked",
"Steel.Effect.Atomic.fsti.checked",
"Steel.Effect.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Ghost.fsti.che... | [
{
"abbrev": false,
"full_module": "Steel.Reference",
"short_module": null
},
{
"abbrev": false,
"full_module": "Steel.FractionalPermission",
"short_module": null
},
{
"abbrev": false,
"full_module": "Steel.Effect",
"short_module": null
},
{
"abbrev": false,
"f... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | p: Steel.Effect.Common.vprop
-> FStar.Pervasives.Lemma
(ensures
Steel.Effect.Common.equiv (Steel.Effect.Common.star p Steel.Effect.Common.emp) p /\
Steel.Effect.Common.equiv (Steel.Effect.Common.star Steel.Effect.Common.emp p) p)
[
SMTPatOr [
[SMTPat (Steel.Effect.Commo... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Steel.Effect.Common.vprop",
"Steel.Memory.star_commutative",
"Steel.Memory.emp",
"Steel.Effect.Common.hp_of",
"Prims.unit",
"Steel.Memory.emp_unit",
"Steel.Effect.Common.reveal_emp",
"Steel.Effect.Common.reveal_equiv",
"Steel.Effect.Common.star",
"Steel.Effect.Common.emp",
"Prims.l_True",
"Pr... | [] | true | false | true | false | false | let emp_unit (p: vprop)
: Lemma (((p `star` emp) `equiv` p) /\ ((emp `star` p) `equiv` p))
[SMTPatOr [[SMTPat (p `star` emp)]; [SMTPat (emp `star` p)]]] =
| reveal_equiv (p `star` emp) p;
reveal_equiv (emp `star` p) p;
reveal_emp ();
Steel.Memory.emp_unit (hp_of p);
Steel.Memory.star_commutative Steel.Memory.emp (hp_of p) | false |
LowParse.Spec.BCVLI.fst | LowParse.Spec.BCVLI.bare_serialize_bcvli_correct | val bare_serialize_bcvli_correct:squash (serializer_correct parse_bcvli bare_serialize_bcvli) | val bare_serialize_bcvli_correct:squash (serializer_correct parse_bcvli bare_serialize_bcvli) | let bare_serialize_bcvli_correct : squash
(serializer_correct parse_bcvli bare_serialize_bcvli)
= let prf (x: U32.t) : Lemma
(let y = bare_serialize_bcvli x in
parse parse_bcvli y == Some (x, Seq.length y))
= let y = bare_serialize_bcvli x in
let c1 : bounded_integer 1 =
if U32.v x <= 252 then
... | {
"file_name": "src/lowparse/LowParse.Spec.BCVLI.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 54,
"end_line": 94,
"start_col": 0,
"start_line": 67
} | module LowParse.Spec.BCVLI
open LowParse.Spec.Combinators // for parse_ret
module U32 = FStar.UInt32
module Seq = FStar.Seq
inline_for_extraction
let parse_bcvli_payload_kind = {
parser_kind_low = 0;
parser_kind_high = Some 4;
parser_kind_subkind = Some ParserStrong;
parser_kind_metadata = None;
}
let parse_... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Combinators.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.fsti.checked"
],
"interface_file": tr... | [
{
"abbrev": false,
"full_module": "LowParse.Spec.Combinators // for parse_ret",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": fal... | {
"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.squash (LowParse.Spec.Base.serializer_correct LowParse.Spec.BCVLI.parse_bcvli
LowParse.Spec.BCVLI.bare_serialize_bcvli) | Prims.Tot | [
"total"
] | [] | [
"FStar.Classical.forall_intro",
"FStar.UInt32.t",
"Prims.l_imp",
"Prims.l_True",
"Prims.eq2",
"FStar.Pervasives.Native.option",
"FStar.Pervasives.Native.tuple2",
"LowParse.Spec.Base.consumed_length",
"LowParse.Spec.BCVLI.bare_serialize_bcvli",
"LowParse.Spec.Base.parse",
"LowParse.Spec.BCVLI.par... | [] | false | false | true | true | false | let bare_serialize_bcvli_correct:squash (serializer_correct parse_bcvli bare_serialize_bcvli) =
| let prf (x: U32.t)
: Lemma
(let y = bare_serialize_bcvli x in
parse parse_bcvli y == Some (x, Seq.length y)) =
let y = bare_serialize_bcvli x in
let c1:bounded_integer 1 =
if U32.v x <= 252 then x else if U32.v x <= 65535 then 253ul else 254ul
in
let sc1 = serialize (serialize_bounded_integer_... | false |
LowParse.Spec.BCVLI.fst | LowParse.Spec.BCVLI.parse_bounded_bcvli_size_correct | val parse_bounded_bcvli_size_correct (min: nat) (max: nat{min <= max})
: Lemma
((parse_bounded_bcvli_size min) `parses_at_least` (parse_bounded_bcvli' min max) /\
(parse_bounded_bcvli_size max) `parses_at_most` (parse_bounded_bcvli' min max)) | val parse_bounded_bcvli_size_correct (min: nat) (max: nat{min <= max})
: Lemma
((parse_bounded_bcvli_size min) `parses_at_least` (parse_bounded_bcvli' min max) /\
(parse_bounded_bcvli_size max) `parses_at_most` (parse_bounded_bcvli' min max)) | let parse_bounded_bcvli_size_correct
(min: nat)
(max: nat { min <= max })
: Lemma
(parse_bounded_bcvli_size min `parses_at_least` parse_bounded_bcvli' min max /\
parse_bounded_bcvli_size max `parses_at_most` parse_bounded_bcvli' min max)
= Classical.forall_intro (parse_filter_eq parse_bcvli (in_bounds min max... | {
"file_name": "src/lowparse/LowParse.Spec.BCVLI.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 84,
"end_line": 118,
"start_col": 0,
"start_line": 108
} | module LowParse.Spec.BCVLI
open LowParse.Spec.Combinators // for parse_ret
module U32 = FStar.UInt32
module Seq = FStar.Seq
inline_for_extraction
let parse_bcvli_payload_kind = {
parser_kind_low = 0;
parser_kind_high = Some 4;
parser_kind_subkind = Some ParserStrong;
parser_kind_metadata = None;
}
let parse_... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Combinators.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.fsti.checked"
],
"interface_file": tr... | [
{
"abbrev": false,
"full_module": "LowParse.Spec.Combinators // for parse_ret",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": fal... | {
"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}
-> FStar.Pervasives.Lemma
(ensures
LowParse.Spec.Base.parses_at_least (LowParse.Spec.BCVLI.parse_bounded_bcvli_size min)
(LowParse.Spec.BCVLI.parse_bounded_bcvli' min max) /\
LowParse.Spec.Base.parses_at_most (LowParse.Spec.BCVLI.parse_bounded_bcvli... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"LowParse.Spec.Base.parser_kind_prop_equiv",
"LowParse.Spec.BoundedInt.bounded_integer",
"LowParse.Spec.BoundedInt.parse_bounded_integer_kind",
"LowParse.Spec.BoundedInt.parse_bounded_integer_le",
"Prims.unit",
"FStar.Classical.forall_intro",
"... | [] | false | false | true | false | false | let parse_bounded_bcvli_size_correct (min: nat) (max: nat{min <= max})
: Lemma
((parse_bounded_bcvli_size min) `parses_at_least` (parse_bounded_bcvli' min max) /\
(parse_bounded_bcvli_size max) `parses_at_most` (parse_bounded_bcvli' min max)) =
| Classical.forall_intro (parse_filter_eq parse_bcvli (in_bounds min max));
Classical.forall_intro parse_bcvli_eq;
parser_kind_prop_equiv (parse_bounded_integer_kind 1) (parse_bounded_integer_le 1);
parser_kind_prop_equiv (parse_bounded_integer_kind 2) (parse_bounded_integer_le 2);
parser_kind_prop_equiv (parse_bounded_i... | false |
LowParse.Spec.BCVLI.fst | LowParse.Spec.BCVLI.parse_bcvli_eq | val parse_bcvli_eq (b: bytes) : Lemma
(parse parse_bcvli b == (match parse (parse_bounded_integer_le 1) b with
| None -> None
| Some (x32, consumed_x) ->
let x = U32.v x32 in
if x <= 252 then Some (x32, consumed_x) else
let b' = Seq.slice b consumed_x (Seq.length b) in
if x = 253 then
match ... | val parse_bcvli_eq (b: bytes) : Lemma
(parse parse_bcvli b == (match parse (parse_bounded_integer_le 1) b with
| None -> None
| Some (x32, consumed_x) ->
let x = U32.v x32 in
if x <= 252 then Some (x32, consumed_x) else
let b' = Seq.slice b consumed_x (Seq.length b) in
if x = 253 then
match ... | let parse_bcvli_eq
b
= and_then_eq (parse_bounded_integer_le 1) parse_bcvli_payload b;
match parse (parse_bounded_integer_le 1) b with
| None -> ()
| Some (x32, consumed_x) ->
let b' = Seq.slice b consumed_x (Seq.length b) in
parse_synth_eq (parse_bounded_integer_le 2 `parse_filter` (fun x -> U32.v x >= 2... | {
"file_name": "src/lowparse/LowParse.Spec.BCVLI.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 79,
"end_line": 46,
"start_col": 0,
"start_line": 36
} | module LowParse.Spec.BCVLI
open LowParse.Spec.Combinators // for parse_ret
module U32 = FStar.UInt32
module Seq = FStar.Seq
inline_for_extraction
let parse_bcvli_payload_kind = {
parser_kind_low = 0;
parser_kind_high = Some 4;
parser_kind_subkind = Some ParserStrong;
parser_kind_metadata = None;
}
let parse_... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Combinators.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.fsti.checked"
],
"interface_file": tr... | [
{
"abbrev": false,
"full_module": "LowParse.Spec.Combinators // for parse_ret",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": fal... | {
"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 | b: LowParse.Bytes.bytes
-> FStar.Pervasives.Lemma
(ensures
LowParse.Spec.Base.parse LowParse.Spec.BCVLI.parse_bcvli b ==
(match LowParse.Spec.Base.parse (LowParse.Spec.BoundedInt.parse_bounded_integer_le 1) b with
| FStar.Pervasives.Native.None #_ -> FStar.Pervasives.Native.None
| FSta... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"LowParse.Bytes.bytes",
"LowParse.Spec.Base.parse",
"LowParse.Spec.BoundedInt.bounded_integer",
"LowParse.Spec.BoundedInt.parse_bounded_integer_le",
"LowParse.Spec.Base.consumed_length",
"LowParse.Spec.Combinators.parse_filter_eq",
"LowParse.Spec.BoundedInt.parse_bounded_integer_kind",
"Prims.op_Great... | [] | false | false | true | false | false | let parse_bcvli_eq b =
| and_then_eq (parse_bounded_integer_le 1) parse_bcvli_payload b;
match parse (parse_bounded_integer_le 1) b with
| None -> ()
| Some (x32, consumed_x) ->
let b' = Seq.slice b consumed_x (Seq.length b) in
parse_synth_eq ((parse_bounded_integer_le 2) `parse_filter` (fun x -> U32.v x >= 253))
(fun x -> (x <: U32.t)... | false |
STLC.Core.fst | STLC.Core.check | val check
(g: R.env)
(sg: list (var & stlc_ty))
(e: stlc_exp{ln e /\ ((freevars e) `Set.subset` (vars_of_env sg))})
: T.Tac (t: stlc_ty & stlc_typing sg e t) | val check
(g: R.env)
(sg: list (var & stlc_ty))
(e: stlc_exp{ln e /\ ((freevars e) `Set.subset` (vars_of_env sg))})
: T.Tac (t: stlc_ty & stlc_typing sg e t) | let rec check (g:R.env)
(sg:list (var & stlc_ty))
(e:stlc_exp { ln e /\ (freevars e `Set.subset` vars_of_env sg)})
: T.Tac (t:stlc_ty &
stlc_typing sg e t)
= match e with
| EUnit ->
let d = T_Unit sg in
(| TUnit, d |)
| EVar n ->
begin
ma... | {
"file_name": "examples/dsls/stlc/STLC.Core.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 49,
"end_line": 279,
"start_col": 0,
"start_line": 238
} | module STLC.Core
module T = FStar.Tactics.V2
module R = FStar.Reflection.V2
module L = FStar.List.Tot
module RT = FStar.Reflection.Typing
type stlc_ty =
| TUnit
| TArrow : stlc_ty -> stlc_ty -> stlc_ty
let var = nat
let index = nat
noeq
type stlc_exp =
| EUnit : stlc_exp
| EBVar : index -> stlc_exp
| EVar ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Squash.fsti.checked",
"FStar.Set.fsti.checked",
"FStar.Reflection.V2.fst.checked",
"FStar.Reflection.Typing.fsti.checked",
"FStar.Printf.fst.check... | [
{
"abbrev": true,
"full_module": "FStar.Reflection.Typing",
"short_module": "RT"
},
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "L"
},
{
"abbrev": true,
"full_module": "FStar.Reflection.V2",
"short_module": "R"
},
{
"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 |
g: FStar.Stubs.Reflection.Types.env ->
sg: Prims.list (STLC.Core.var * STLC.Core.stlc_ty) ->
e:
STLC.Core.stlc_exp
{STLC.Core.ln e /\ FStar.Set.subset (STLC.Core.freevars e) (STLC.Core.vars_of_env sg)}
-> FStar.Tactics.Effect.Tac
(Prims.dtuple2 STLC.Core.stlc_ty (fun t -> STLC.Core.stlc... | FStar.Tactics.Effect.Tac | [] | [] | [
"FStar.Stubs.Reflection.Types.env",
"Prims.list",
"FStar.Pervasives.Native.tuple2",
"STLC.Core.var",
"STLC.Core.stlc_ty",
"STLC.Core.stlc_exp",
"Prims.l_and",
"Prims.b2t",
"STLC.Core.ln",
"FStar.Set.subset",
"STLC.Core.freevars",
"STLC.Core.vars_of_env",
"Prims.Mkdtuple2",
"STLC.Core.stlc_... | [
"recursion"
] | false | true | false | false | false | let rec check
(g: R.env)
(sg: list (var & stlc_ty))
(e: stlc_exp{ln e /\ ((freevars e) `Set.subset` (vars_of_env sg))})
: T.Tac (t: stlc_ty & stlc_typing sg e t) =
| match e with
| EUnit ->
let d = T_Unit sg in
(| TUnit, d |)
| EVar n ->
(match lookup sg n with
| None -> T.fail "Ill-typed"
| Some t ->
let d = T_Var sg n in
(| t, d |))
| ELam t e ->
let x = fresh sg in
fresh_is_fresh sg;
freevars_open e x 0;
let (| tbody , dbody |) = check g ((x, t)... | false |
STLC.Core.fst | STLC.Core.elab_exp_freevars | val elab_exp_freevars (e: stlc_exp) : Lemma ((freevars e) `Set.equal` (RT.freevars (elab_exp e))) | val elab_exp_freevars (e: stlc_exp) : Lemma ((freevars e) `Set.equal` (RT.freevars (elab_exp e))) | let rec elab_exp_freevars (e:stlc_exp)
: Lemma (freevars e `Set.equal` RT.freevars (elab_exp e))
= match e with
| EUnit
| EBVar _
| EVar _ -> ()
| ELam t e ->
elab_ty_freevars t;
elab_exp_freevars e
| EApp e1 e2 ->
elab_exp_freevars e1;
elab_exp_freevars e2 | {
"file_name": "examples/dsls/stlc/STLC.Core.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 26,
"end_line": 459,
"start_col": 0,
"start_line": 448
} | module STLC.Core
module T = FStar.Tactics.V2
module R = FStar.Reflection.V2
module L = FStar.List.Tot
module RT = FStar.Reflection.Typing
type stlc_ty =
| TUnit
| TArrow : stlc_ty -> stlc_ty -> stlc_ty
let var = nat
let index = nat
noeq
type stlc_exp =
| EUnit : stlc_exp
| EBVar : index -> stlc_exp
| EVar ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Squash.fsti.checked",
"FStar.Set.fsti.checked",
"FStar.Reflection.V2.fst.checked",
"FStar.Reflection.Typing.fsti.checked",
"FStar.Printf.fst.check... | [
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.Reflection.Typing",
"short_module": "RT"
},
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "L"
},
{
"abbrev": true,
"full_module... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | e: STLC.Core.stlc_exp
-> FStar.Pervasives.Lemma
(ensures
FStar.Set.equal (STLC.Core.freevars e)
(FStar.Reflection.Typing.freevars (STLC.Core.elab_exp e))) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"STLC.Core.stlc_exp",
"STLC.Core.index",
"STLC.Core.var",
"STLC.Core.stlc_ty",
"STLC.Core.elab_exp_freevars",
"Prims.unit",
"STLC.Core.elab_ty_freevars",
"Prims.l_True",
"Prims.squash",
"FStar.Set.equal",
"STLC.Core.freevars",
"FStar.Reflection.Typing.freevars",
"STLC.Core.elab_exp",
"Prim... | [
"recursion"
] | false | false | true | false | false | let rec elab_exp_freevars (e: stlc_exp)
: Lemma ((freevars e) `Set.equal` (RT.freevars (elab_exp e))) =
| match e with
| EUnit | EBVar _ | EVar _ -> ()
| ELam t e ->
elab_ty_freevars t;
elab_exp_freevars e
| EApp e1 e2 ->
elab_exp_freevars e1;
elab_exp_freevars e2 | false |
Hacl.Impl.Matrix.fst | Hacl.Impl.Matrix.matrix_t | val matrix_t : n1: Lib.IntTypes.size_t ->
n2: Lib.IntTypes.size_t{Lib.IntTypes.v n1 * Lib.IntTypes.v n2 <= Lib.IntTypes.max_size_t}
-> Type0 | let matrix_t (n1:size_t) (n2:size_t{v n1 * v n2 <= max_size_t}) =
lbuffer elem (n1 *! n2) | {
"file_name": "code/frodo/Hacl.Impl.Matrix.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 25,
"end_line": 32,
"start_col": 0,
"start_line": 31
} | module Hacl.Impl.Matrix
open FStar.HyperStack.ST
open FStar.Mul
open LowStar.BufferOps
open LowStar.Buffer
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module BSeq = Lib.ByteSequence
module Loops = Lib.LoopCombinators... | {
"checked_file": "/",
"dependencies": [
"Spec.Matrix.fst.checked",
"Spec.Frodo.Lemmas.fst.checked",
"prims.fst.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.Loops.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib... | [
{
"abbrev": true,
"full_module": "Spec.Frodo.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Matrix",
"short_module": "M"
},
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_... | {
"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 |
n1: Lib.IntTypes.size_t ->
n2: Lib.IntTypes.size_t{Lib.IntTypes.v n1 * Lib.IntTypes.v n2 <= Lib.IntTypes.max_size_t}
-> Type0 | Prims.Tot | [
"total"
] | [] | [
"Lib.IntTypes.size_t",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"FStar.Mul.op_Star",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Lib.IntTypes.max_size_t",
"Lib.Buffer.lbuffer",
"Hacl.Impl.Matrix.elem",
"Lib.IntTypes.op_Star_Bang"
] | [] | false | false | false | false | true | let matrix_t (n1: size_t) (n2: size_t{v n1 * v n2 <= max_size_t}) =
| lbuffer elem (n1 *! n2) | false | |
LowParse.Spec.BCVLI.fst | LowParse.Spec.BCVLI.parse_bcvli_payload_and_then_cases_injective | val parse_bcvli_payload_and_then_cases_injective:squash (and_then_cases_injective parse_bcvli_payload
) | val parse_bcvli_payload_and_then_cases_injective:squash (and_then_cases_injective parse_bcvli_payload
) | let parse_bcvli_payload_and_then_cases_injective : squash (and_then_cases_injective parse_bcvli_payload) =
and_then_cases_injective_intro parse_bcvli_payload (fun x1 x2 b1 b2 ->
parse_synth_eq (parse_bounded_integer_le 2 `parse_filter` (fun x -> U32.v x >= 253)) (fun x -> (x <: U32.t)) b1;
parse_synth_eq (par... | {
"file_name": "src/lowparse/LowParse.Spec.BCVLI.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 3,
"end_line": 29,
"start_col": 0,
"start_line": 23
} | module LowParse.Spec.BCVLI
open LowParse.Spec.Combinators // for parse_ret
module U32 = FStar.UInt32
module Seq = FStar.Seq
inline_for_extraction
let parse_bcvli_payload_kind = {
parser_kind_low = 0;
parser_kind_high = Some 4;
parser_kind_subkind = Some ParserStrong;
parser_kind_metadata = None;
}
let parse_... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Combinators.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Classical.fsti.checked"
],
"interface_file": tr... | [
{
"abbrev": false,
"full_module": "LowParse.Spec.Combinators // for parse_ret",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": fal... | {
"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.squash (LowParse.Spec.Combinators.and_then_cases_injective LowParse.Spec.BCVLI.parse_bcvli_payload
) | Prims.Tot | [
"total"
] | [] | [
"LowParse.Spec.Combinators.and_then_cases_injective_intro",
"LowParse.Spec.BoundedInt.bounded_integer",
"FStar.UInt32.t",
"LowParse.Spec.BCVLI.parse_bcvli_payload",
"LowParse.Bytes.bytes",
"LowParse.Spec.Combinators.parse_synth_eq",
"LowParse.Spec.Combinators.parse_filter_kind",
"LowParse.Spec.Bounded... | [] | false | false | true | false | false | let parse_bcvli_payload_and_then_cases_injective:squash (and_then_cases_injective parse_bcvli_payload
) =
| and_then_cases_injective_intro parse_bcvli_payload
(fun x1 x2 b1 b2 ->
parse_synth_eq ((parse_bounded_integer_le 2) `parse_filter` (fun x -> U32.v x >= 253))
(fun x -> (x <: U32.t))
b1;
parse_synth_eq ((parse_bounded_integer_le 2) `parse_filter` (fun x -> U32.v x >= 253))
(fun x ->... | false |
Hacl.Impl.Matrix.fst | Hacl.Impl.Matrix.matrix_create | val matrix_create:
n1:size_t
-> n2:size_t{0 < v n1 * v n2 /\ v n1 * v n2 <= max_size_t}
-> StackInline (matrix_t n1 n2)
(requires fun h0 -> True)
(ensures fun h0 a h1 ->
stack_allocated a h0 h1 (as_matrix h1 a) /\
as_matrix h1 a == M.create (v n1) (v n2)) | val matrix_create:
n1:size_t
-> n2:size_t{0 < v n1 * v n2 /\ v n1 * v n2 <= max_size_t}
-> StackInline (matrix_t n1 n2)
(requires fun h0 -> True)
(ensures fun h0 a h1 ->
stack_allocated a h0 h1 (as_matrix h1 a) /\
as_matrix h1 a == M.create (v n1) (v n2)) | let matrix_create n1 n2 =
[@inline_let]
let len = size (normalize_term (v n1 * v n2)) in
create len (u16 0) | {
"file_name": "code/frodo/Hacl.Impl.Matrix.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 20,
"end_line": 52,
"start_col": 0,
"start_line": 49
} | module Hacl.Impl.Matrix
open FStar.HyperStack.ST
open FStar.Mul
open LowStar.BufferOps
open LowStar.Buffer
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module BSeq = Lib.ByteSequence
module Loops = Lib.LoopCombinators... | {
"checked_file": "/",
"dependencies": [
"Spec.Matrix.fst.checked",
"Spec.Frodo.Lemmas.fst.checked",
"prims.fst.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.Loops.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib... | [
{
"abbrev": true,
"full_module": "Spec.Frodo.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Matrix",
"short_module": "M"
},
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_... | {
"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 |
n1: Lib.IntTypes.size_t ->
n2:
Lib.IntTypes.size_t
{ 0 < Lib.IntTypes.v n1 * Lib.IntTypes.v n2 /\
Lib.IntTypes.v n1 * Lib.IntTypes.v n2 <= Lib.IntTypes.max_size_t }
-> FStar.HyperStack.ST.StackInline (Hacl.Impl.Matrix.matrix_t n1 n2) | FStar.HyperStack.ST.StackInline | [] | [] | [
"Lib.IntTypes.size_t",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThan",
"FStar.Mul.op_Star",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Prims.op_LessThanOrEqual",
"Lib.IntTypes.max_size_t",
"Lib.Buffer.create",
"Hacl.Impl.Matrix.elem",
"Lib.IntTypes.u16",
"Lib.Buffer.lbuffe... | [] | false | true | false | false | false | let matrix_create n1 n2 =
| [@@ inline_let ]let len = size (normalize_term (v n1 * v n2)) in
create len (u16 0) | false |
Hacl.Impl.Matrix.fst | Hacl.Impl.Matrix.op_String_Assignment | val op_String_Assignment (#n1:size_t) (#n2:size_t{v n1 * v n2 <= max_size_t}) (m:matrix_t n1 n2) (ij:(size_t & size_t){let i, j = ij in v i < v n1 /\ v j < v n2}) (x:elem)
: Stack unit
(requires fun h0 -> live h0 m)
(ensures fun h0 _ h1 -> let i, j = ij in modifies1 m h0 h1 /\ live h1 m /\ as_matrix h1 m == ... | val op_String_Assignment (#n1:size_t) (#n2:size_t{v n1 * v n2 <= max_size_t}) (m:matrix_t n1 n2) (ij:(size_t & size_t){let i, j = ij in v i < v n1 /\ v j < v n2}) (x:elem)
: Stack unit
(requires fun h0 -> live h0 m)
(ensures fun h0 _ h1 -> let i, j = ij in modifies1 m h0 h1 /\ live h1 m /\ as_matrix h1 m == ... | let op_String_Assignment #n1 #n2 m (i,j) x = mset m i j x | {
"file_name": "code/frodo/Hacl.Impl.Matrix.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 57,
"end_line": 103,
"start_col": 0,
"start_line": 103
} | module Hacl.Impl.Matrix
open FStar.HyperStack.ST
open FStar.Mul
open LowStar.BufferOps
open LowStar.Buffer
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module BSeq = Lib.ByteSequence
module Loops = Lib.LoopCombinators... | {
"checked_file": "/",
"dependencies": [
"Spec.Matrix.fst.checked",
"Spec.Frodo.Lemmas.fst.checked",
"prims.fst.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.Loops.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib... | [
{
"abbrev": true,
"full_module": "Spec.Frodo.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Matrix",
"short_module": "M"
},
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_... | {
"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 |
m: Hacl.Impl.Matrix.matrix_t n1 n2 ->
ij:
(Lib.IntTypes.size_t * Lib.IntTypes.size_t)
{ let _ = ij in
(let FStar.Pervasives.Native.Mktuple2 #_ #_ i j = _ in
Lib.IntTypes.v i < Lib.IntTypes.v n1 /\ Lib.IntTypes.v j < Lib.IntTypes.v n2)
<:
Type0 } ->
x:... | FStar.HyperStack.ST.Stack | [] | [] | [
"Lib.IntTypes.size_t",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"FStar.Mul.op_Star",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Lib.IntTypes.max_size_t",
"Hacl.Impl.Matrix.matrix_t",
"FStar.Pervasives.Native.tuple2",
"Prims.l_and",
"Prims.op_LessThan",
"Lib.IntTypes.int_t",
... | [] | false | true | false | false | false | let ( .[]<- ) #n1 #n2 m (i, j) x =
| mset m i j x | false |
Hacl.Impl.Matrix.fst | Hacl.Impl.Matrix.op_String_Access | val op_String_Access (#n1:size_t) (#n2:size_t{v n1 * v n2 <= max_size_t}) (m:matrix_t n1 n2) (ij:(size_t & size_t){let i, j = ij in v i < v n1 /\ v j < v n2})
: Stack elem
(requires fun h0 -> live h0 m)
(ensures fun h0 x h1 -> let i, j = ij in modifies loc_none h0 h1 /\ x == M.mget (as_matrix h0 m) (v i) (v ... | val op_String_Access (#n1:size_t) (#n2:size_t{v n1 * v n2 <= max_size_t}) (m:matrix_t n1 n2) (ij:(size_t & size_t){let i, j = ij in v i < v n1 /\ v j < v n2})
: Stack elem
(requires fun h0 -> live h0 m)
(ensures fun h0 x h1 -> let i, j = ij in modifies loc_none h0 h1 /\ x == M.mget (as_matrix h0 m) (v i) (v ... | let op_String_Access #n1 #n2 m (i,j) = mget m i j | {
"file_name": "code/frodo/Hacl.Impl.Matrix.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 49,
"end_line": 95,
"start_col": 0,
"start_line": 95
} | module Hacl.Impl.Matrix
open FStar.HyperStack.ST
open FStar.Mul
open LowStar.BufferOps
open LowStar.Buffer
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module BSeq = Lib.ByteSequence
module Loops = Lib.LoopCombinators... | {
"checked_file": "/",
"dependencies": [
"Spec.Matrix.fst.checked",
"Spec.Frodo.Lemmas.fst.checked",
"prims.fst.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.Loops.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib... | [
{
"abbrev": true,
"full_module": "Spec.Frodo.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Matrix",
"short_module": "M"
},
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_... | {
"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 |
m: Hacl.Impl.Matrix.matrix_t n1 n2 ->
ij:
(Lib.IntTypes.size_t * Lib.IntTypes.size_t)
{ let _ = ij in
(let FStar.Pervasives.Native.Mktuple2 #_ #_ i j = _ in
Lib.IntTypes.v i < Lib.IntTypes.v n1 /\ Lib.IntTypes.v j < Lib.IntTypes.v n2)
<:
Type0 }
-> FSta... | FStar.HyperStack.ST.Stack | [] | [] | [
"Lib.IntTypes.size_t",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"FStar.Mul.op_Star",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Lib.IntTypes.max_size_t",
"Hacl.Impl.Matrix.matrix_t",
"FStar.Pervasives.Native.tuple2",
"Prims.l_and",
"Prims.op_LessThan",
"Lib.IntTypes.int_t",
... | [] | false | true | false | false | false | let ( .[] ) #n1 #n2 m (i, j) =
| mget m i j | false |
Hacl.Impl.Matrix.fst | Hacl.Impl.Matrix.mset | val mset:
#n1:size_t
-> #n2:size_t{v n1 * v n2 <= max_size_t}
-> a:matrix_t n1 n2
-> i:size_t{v i < v n1}
-> j:size_t{v j < v n2}
-> x:elem
-> Stack unit
(requires fun h0 -> live h0 a)
(ensures fun h0 _ h1 -> modifies1 a h0 h1 /\
as_matrix h1 a == M.mset (as_matrix h0 a) (v i) (v j) x) | val mset:
#n1:size_t
-> #n2:size_t{v n1 * v n2 <= max_size_t}
-> a:matrix_t n1 n2
-> i:size_t{v i < v n1}
-> j:size_t{v j < v n2}
-> x:elem
-> Stack unit
(requires fun h0 -> live h0 a)
(ensures fun h0 _ h1 -> modifies1 a h0 h1 /\
as_matrix h1 a == M.mset (as_matrix h0 a) (v i) (v j) x) | let mset #n1 #n2 a i j x =
M.index_lt (v n1) (v n2) (v i) (v j);
a.(i *! n2 +! j) <- x | {
"file_name": "code/frodo/Hacl.Impl.Matrix.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 23,
"end_line": 87,
"start_col": 0,
"start_line": 85
} | module Hacl.Impl.Matrix
open FStar.HyperStack.ST
open FStar.Mul
open LowStar.BufferOps
open LowStar.Buffer
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module BSeq = Lib.ByteSequence
module Loops = Lib.LoopCombinators... | {
"checked_file": "/",
"dependencies": [
"Spec.Matrix.fst.checked",
"Spec.Frodo.Lemmas.fst.checked",
"prims.fst.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.Loops.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib... | [
{
"abbrev": true,
"full_module": "Spec.Frodo.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Matrix",
"short_module": "M"
},
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_... | {
"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 |
a: Hacl.Impl.Matrix.matrix_t n1 n2 ->
i: Lib.IntTypes.size_t{Lib.IntTypes.v i < Lib.IntTypes.v n1} ->
j: Lib.IntTypes.size_t{Lib.IntTypes.v j < Lib.IntTypes.v n2} ->
x: Hacl.Impl.Matrix.elem
-> FStar.HyperStack.ST.Stack Prims.unit | FStar.HyperStack.ST.Stack | [] | [] | [
"Lib.IntTypes.size_t",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"FStar.Mul.op_Star",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Lib.IntTypes.max_size_t",
"Hacl.Impl.Matrix.matrix_t",
"Prims.op_LessThan",
"Hacl.Impl.Matrix.elem",
"Lib.Buffer.op_Array_Assignment",
"Lib.IntTypes... | [] | false | true | false | false | false | let mset #n1 #n2 a i j x =
| M.index_lt (v n1) (v n2) (v i) (v j);
a.(i *! n2 +! j) <- x | false |
Hacl.Impl.Matrix.fst | Hacl.Impl.Matrix.get | val get : h: FStar.Monotonic.HyperStack.mem ->
m: Hacl.Impl.Matrix.matrix_t n1 n2 ->
i: Lib.IntTypes.size_nat{i < Lib.IntTypes.v n1} ->
j: Lib.IntTypes.size_nat{j < Lib.IntTypes.v n2}
-> Prims.GTot Spec.Matrix.elem | let get #n1 #n2 h (m:matrix_t n1 n2) i j = M.mget (as_matrix h m) i j | {
"file_name": "code/frodo/Hacl.Impl.Matrix.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 69,
"end_line": 107,
"start_col": 0,
"start_line": 107
} | module Hacl.Impl.Matrix
open FStar.HyperStack.ST
open FStar.Mul
open LowStar.BufferOps
open LowStar.Buffer
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module BSeq = Lib.ByteSequence
module Loops = Lib.LoopCombinators... | {
"checked_file": "/",
"dependencies": [
"Spec.Matrix.fst.checked",
"Spec.Frodo.Lemmas.fst.checked",
"prims.fst.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.Loops.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib... | [
{
"abbrev": true,
"full_module": "Spec.Frodo.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Matrix",
"short_module": "M"
},
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_... | {
"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 ->
m: Hacl.Impl.Matrix.matrix_t n1 n2 ->
i: Lib.IntTypes.size_nat{i < Lib.IntTypes.v n1} ->
j: Lib.IntTypes.size_nat{j < Lib.IntTypes.v n2}
-> Prims.GTot Spec.Matrix.elem | Prims.GTot | [
"sometrivial"
] | [] | [
"Lib.IntTypes.size_t",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"FStar.Mul.op_Star",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Lib.IntTypes.max_size_t",
"FStar.Monotonic.HyperStack.mem",
"Hacl.Impl.Matrix.matrix_t",
"Lib.IntTypes.size_nat",
"Prims.op_LessThan",
"Spec.Matrix.... | [] | false | false | false | false | false | let get #n1 #n2 h (m: matrix_t n1 n2) i j =
| M.mget (as_matrix h m) i j | false | |
Hacl.Impl.Matrix.fst | Hacl.Impl.Matrix.mget | val mget:
#n1:size_t
-> #n2:size_t{v n1 * v n2 <= max_size_t}
-> a:matrix_t n1 n2
-> i:size_t{v i < v n1}
-> j:size_t{v j < v n2}
-> Stack elem
(requires fun h0 -> live h0 a)
(ensures fun h0 x h1 -> modifies loc_none h0 h1 /\
x == M.mget (as_matrix h0 a) (v i) (v j)) | val mget:
#n1:size_t
-> #n2:size_t{v n1 * v n2 <= max_size_t}
-> a:matrix_t n1 n2
-> i:size_t{v i < v n1}
-> j:size_t{v j < v n2}
-> Stack elem
(requires fun h0 -> live h0 a)
(ensures fun h0 x h1 -> modifies loc_none h0 h1 /\
x == M.mget (as_matrix h0 a) (v i) (v j)) | let mget #n1 #n2 a i j =
M.index_lt (v n1) (v n2) (v i) (v j);
a.(i *! n2 +! j) | {
"file_name": "code/frodo/Hacl.Impl.Matrix.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 18,
"end_line": 69,
"start_col": 0,
"start_line": 67
} | module Hacl.Impl.Matrix
open FStar.HyperStack.ST
open FStar.Mul
open LowStar.BufferOps
open LowStar.Buffer
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module BSeq = Lib.ByteSequence
module Loops = Lib.LoopCombinators... | {
"checked_file": "/",
"dependencies": [
"Spec.Matrix.fst.checked",
"Spec.Frodo.Lemmas.fst.checked",
"prims.fst.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.Loops.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib... | [
{
"abbrev": true,
"full_module": "Spec.Frodo.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Matrix",
"short_module": "M"
},
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_... | {
"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 |
a: Hacl.Impl.Matrix.matrix_t n1 n2 ->
i: Lib.IntTypes.size_t{Lib.IntTypes.v i < Lib.IntTypes.v n1} ->
j: Lib.IntTypes.size_t{Lib.IntTypes.v j < Lib.IntTypes.v n2}
-> FStar.HyperStack.ST.Stack Hacl.Impl.Matrix.elem | FStar.HyperStack.ST.Stack | [] | [] | [
"Lib.IntTypes.size_t",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"FStar.Mul.op_Star",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Lib.IntTypes.max_size_t",
"Hacl.Impl.Matrix.matrix_t",
"Prims.op_LessThan",
"Lib.Buffer.op_Array_Access",
"Lib.Buffer.MUT",
"Hacl.Impl.Matrix.elem",... | [] | false | true | false | false | false | let mget #n1 #n2 a i j =
| M.index_lt (v n1) (v n2) (v i) (v j);
a.(i *! n2 +! j) | false |
Hacl.Impl.Matrix.fst | Hacl.Impl.Matrix.map_inner_inv | val map_inner_inv:
#n1:size_t
-> #n2:size_t{v n1 * v n2 <= max_size_t}
-> h0:HS.mem
-> h1:HS.mem
-> h2:HS.mem
-> f:(elem -> elem)
-> a:matrix_t n1 n2
-> b:matrix_t n1 n2
-> i:size_t{v i < v n1}
-> j:size_nat
-> Type0 | val map_inner_inv:
#n1:size_t
-> #n2:size_t{v n1 * v n2 <= max_size_t}
-> h0:HS.mem
-> h1:HS.mem
-> h2:HS.mem
-> f:(elem -> elem)
-> a:matrix_t n1 n2
-> b:matrix_t n1 n2
-> i:size_t{v i < v n1}
-> j:size_nat
-> Type0 | let map_inner_inv #n1 #n2 h0 h1 h2 f a c i j =
live h2 a /\ live h2 c /\
modifies1 c h1 h2 /\
j <= v n2 /\
(forall (i0:nat{i0 < v i}) (j:nat{j < v n2}). get h2 c i0 j == get h1 c i0 j) /\
(forall (j0:nat{j0 < j}). get h2 c (v i) j0 == f (get h0 a (v i) j0)) /\
(forall (j0:nat{j <= j0 /\ j0 < v n2}). get h2 ... | {
"file_name": "code/frodo/Hacl.Impl.Matrix.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 92,
"end_line": 130,
"start_col": 0,
"start_line": 123
} | module Hacl.Impl.Matrix
open FStar.HyperStack.ST
open FStar.Mul
open LowStar.BufferOps
open LowStar.Buffer
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module BSeq = Lib.ByteSequence
module Loops = Lib.LoopCombinators... | {
"checked_file": "/",
"dependencies": [
"Spec.Matrix.fst.checked",
"Spec.Frodo.Lemmas.fst.checked",
"prims.fst.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.Loops.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib... | [
{
"abbrev": true,
"full_module": "Spec.Frodo.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Matrix",
"short_module": "M"
},
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_... | {
"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 |
h0: FStar.Monotonic.HyperStack.mem ->
h1: FStar.Monotonic.HyperStack.mem ->
h2: FStar.Monotonic.HyperStack.mem ->
f: (_: Hacl.Impl.Matrix.elem -> Hacl.Impl.Matrix.elem) ->
a: Hacl.Impl.Matrix.matrix_t n1 n2 ->
b: Hacl.Impl.Matrix.matrix_t n1 n2 ->
i: Lib.IntTypes.size_t{Lib.IntTypes.v i < L... | Prims.Tot | [
"total"
] | [] | [
"Lib.IntTypes.size_t",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"FStar.Mul.op_Star",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Lib.IntTypes.max_size_t",
"FStar.Monotonic.HyperStack.mem",
"Hacl.Impl.Matrix.elem",
"Hacl.Impl.Matrix.matrix_t",
"Prims.op_LessThan",
"Lib.IntTypes... | [] | false | false | false | false | true | let map_inner_inv #n1 #n2 h0 h1 h2 f a c i j =
| live h2 a /\ live h2 c /\ modifies1 c h1 h2 /\ j <= v n2 /\
(forall (i0: nat{i0 < v i}) (j: nat{j < v n2}). get h2 c i0 j == get h1 c i0 j) /\
(forall (j0: nat{j0 < j}). get h2 c (v i) j0 == f (get h0 a (v i) j0)) /\
(forall (j0: nat{j <= j0 /\ j0 < v n2}). get h2 c (v i) j0 == get h0 c (v i) j0) /\
(forall (i0: nat{v ... | false |
Hacl.Impl.Matrix.fst | Hacl.Impl.Matrix.mod_pow2_felem | val mod_pow2_felem:
logq:size_t{0 < v logq /\ v logq < 16}
-> a:uint16
-> Pure uint16
(requires True)
(ensures fun r -> r == M.mod_pow2_felem (v logq) a) | val mod_pow2_felem:
logq:size_t{0 < v logq /\ v logq < 16}
-> a:uint16
-> Pure uint16
(requires True)
(ensures fun r -> r == M.mod_pow2_felem (v logq) a) | let mod_pow2_felem logq a =
a &. ((u16 1 <<. logq) -. u16 1) | {
"file_name": "code/frodo/Hacl.Impl.Matrix.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 34,
"end_line": 193,
"start_col": 0,
"start_line": 192
} | module Hacl.Impl.Matrix
open FStar.HyperStack.ST
open FStar.Mul
open LowStar.BufferOps
open LowStar.Buffer
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module BSeq = Lib.ByteSequence
module Loops = Lib.LoopCombinators... | {
"checked_file": "/",
"dependencies": [
"Spec.Matrix.fst.checked",
"Spec.Frodo.Lemmas.fst.checked",
"prims.fst.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.Loops.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib... | [
{
"abbrev": true,
"full_module": "Spec.Frodo.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Matrix",
"short_module": "M"
},
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_... | {
"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 |
logq: Lib.IntTypes.size_t{0 < Lib.IntTypes.v logq /\ Lib.IntTypes.v logq < 16} ->
a: Lib.IntTypes.uint16
-> Prims.Pure Lib.IntTypes.uint16 | Prims.Pure | [] | [] | [
"Lib.IntTypes.size_t",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThan",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Lib.IntTypes.uint16",
"Lib.IntTypes.op_Amp_Dot",
"Lib.IntTypes.U16",
"Lib.IntTypes.SEC",
"Lib.IntTypes.op_Subtraction_Dot",
"Lib.IntTypes.op_Less_Less_Dot",
"L... | [] | false | false | false | false | false | let mod_pow2_felem logq a =
| a &. ((u16 1 <<. logq) -. u16 1) | false |
Hacl.Impl.Matrix.fst | Hacl.Impl.Matrix.map2_inner_inv | val map2_inner_inv:
#n1:size_t
-> #n2:size_t{v n1 * v n2 <= max_size_t}
-> h0:HS.mem
-> h1:HS.mem
-> h2:HS.mem
-> f:(elem -> elem -> elem)
-> a:matrix_t n1 n2
-> b:matrix_t n1 n2
-> c:matrix_t n1 n2
-> i:size_t{v i < v n1}
-> j:size_nat
-> Type0 | val map2_inner_inv:
#n1:size_t
-> #n2:size_t{v n1 * v n2 <= max_size_t}
-> h0:HS.mem
-> h1:HS.mem
-> h2:HS.mem
-> f:(elem -> elem -> elem)
-> a:matrix_t n1 n2
-> b:matrix_t n1 n2
-> c:matrix_t n1 n2
-> i:size_t{v i < v n1}
-> j:size_nat
-> Type0 | let map2_inner_inv #n1 #n2 h0 h1 h2 f a b c i j =
live h2 a /\ live h2 b /\ live h2 c /\
modifies1 c h1 h2 /\
j <= v n2 /\
(forall (i0:nat{i0 < v i}) (j:nat{j < v n2}). get h2 c i0 j == get h1 c i0 j) /\
(forall (j0:nat{j0 < j}). get h2 c (v i) j0 == f (get h0 a (v i) j0) (get h2 b (v i) j0)) /\
(forall (j0... | {
"file_name": "code/frodo/Hacl.Impl.Matrix.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 92,
"end_line": 238,
"start_col": 0,
"start_line": 231
} | module Hacl.Impl.Matrix
open FStar.HyperStack.ST
open FStar.Mul
open LowStar.BufferOps
open LowStar.Buffer
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module BSeq = Lib.ByteSequence
module Loops = Lib.LoopCombinators... | {
"checked_file": "/",
"dependencies": [
"Spec.Matrix.fst.checked",
"Spec.Frodo.Lemmas.fst.checked",
"prims.fst.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.Loops.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib... | [
{
"abbrev": true,
"full_module": "Spec.Frodo.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Matrix",
"short_module": "M"
},
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_... | {
"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 |
h0: FStar.Monotonic.HyperStack.mem ->
h1: FStar.Monotonic.HyperStack.mem ->
h2: FStar.Monotonic.HyperStack.mem ->
f: (_: Hacl.Impl.Matrix.elem -> _: Hacl.Impl.Matrix.elem -> Hacl.Impl.Matrix.elem) ->
a: Hacl.Impl.Matrix.matrix_t n1 n2 ->
b: Hacl.Impl.Matrix.matrix_t n1 n2 ->
c: Hacl.Impl.Ma... | Prims.Tot | [
"total"
] | [] | [
"Lib.IntTypes.size_t",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"FStar.Mul.op_Star",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Lib.IntTypes.max_size_t",
"FStar.Monotonic.HyperStack.mem",
"Hacl.Impl.Matrix.elem",
"Hacl.Impl.Matrix.matrix_t",
"Prims.op_LessThan",
"Lib.IntTypes... | [] | false | false | false | false | true | let map2_inner_inv #n1 #n2 h0 h1 h2 f a b c i j =
| live h2 a /\ live h2 b /\ live h2 c /\ modifies1 c h1 h2 /\ j <= v n2 /\
(forall (i0: nat{i0 < v i}) (j: nat{j < v n2}). get h2 c i0 j == get h1 c i0 j) /\
(forall (j0: nat{j0 < j}). get h2 c (v i) j0 == f (get h0 a (v i) j0) (get h2 b (v i) j0)) /\
(forall (j0: nat{j <= j0 /\ j0 < v n2}). get h2 c (v i) j0 == get h0 c... | false |
Hacl.Impl.Matrix.fst | Hacl.Impl.Matrix.matrix_add | val matrix_add:
#n1:size_t
-> #n2:size_t{v n1 * v n2 <= max_size_t}
-> a:matrix_t n1 n2
-> b:matrix_t n1 n2
-> Stack unit
(requires fun h -> live h a /\ live h b /\ disjoint a b)
(ensures fun h0 r h1 -> modifies1 a h0 h1 /\
as_matrix h1 a == M.add (as_matrix h0 a) (as_matrix h0 b)) | val matrix_add:
#n1:size_t
-> #n2:size_t{v n1 * v n2 <= max_size_t}
-> a:matrix_t n1 n2
-> b:matrix_t n1 n2
-> Stack unit
(requires fun h -> live h a /\ live h b /\ disjoint a b)
(ensures fun h0 r h1 -> modifies1 a h0 h1 /\
as_matrix h1 a == M.add (as_matrix h0 a) (as_matrix h0 b)) | let matrix_add #n1 #n2 a b =
map2 add_mod a b a | {
"file_name": "code/frodo/Hacl.Impl.Matrix.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 20,
"end_line": 312,
"start_col": 0,
"start_line": 311
} | module Hacl.Impl.Matrix
open FStar.HyperStack.ST
open FStar.Mul
open LowStar.BufferOps
open LowStar.Buffer
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module BSeq = Lib.ByteSequence
module Loops = Lib.LoopCombinators... | {
"checked_file": "/",
"dependencies": [
"Spec.Matrix.fst.checked",
"Spec.Frodo.Lemmas.fst.checked",
"prims.fst.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.Loops.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib... | [
{
"abbrev": true,
"full_module": "Spec.Frodo.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Matrix",
"short_module": "M"
},
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_... | {
"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 | a: Hacl.Impl.Matrix.matrix_t n1 n2 -> b: Hacl.Impl.Matrix.matrix_t n1 n2
-> FStar.HyperStack.ST.Stack Prims.unit | FStar.HyperStack.ST.Stack | [] | [] | [
"Lib.IntTypes.size_t",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"FStar.Mul.op_Star",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Lib.IntTypes.max_size_t",
"Hacl.Impl.Matrix.matrix_t",
"Hacl.Impl.Matrix.map2",
"Lib.IntTypes.add_mod",
"Lib.IntTypes.U16",
"Lib.IntTypes.SEC",
"P... | [] | false | true | false | false | false | let matrix_add #n1 #n2 a b =
| map2 add_mod a b a | false |
Hacl.Impl.Matrix.fst | Hacl.Impl.Matrix.mod_pow2 | val mod_pow2:
#n1:size_t
-> #n2:size_t{v n1 * v n2 <= max_size_t}
-> logq:size_t{0 < v logq /\ v logq <= 16}
-> a:matrix_t n1 n2
-> Stack unit
(requires fun h -> live h a)
(ensures fun h0 _ h1 -> modifies1 a h0 h1 /\
as_matrix h1 a == M.mod_pow2 (v logq) (as_matrix h0 a)) | val mod_pow2:
#n1:size_t
-> #n2:size_t{v n1 * v n2 <= max_size_t}
-> logq:size_t{0 < v logq /\ v logq <= 16}
-> a:matrix_t n1 n2
-> Stack unit
(requires fun h -> live h a)
(ensures fun h0 _ h1 -> modifies1 a h0 h1 /\
as_matrix h1 a == M.mod_pow2 (v logq) (as_matrix h0 a)) | let mod_pow2 #n1 #n2 logq a =
if logq <. 16ul then begin
let h0 = ST.get () in
map (mod_pow2_felem logq) a a;
M.extensionality
(M.map #(v n1) #(v n2) (mod_pow2_felem logq) (as_matrix h0 a))
(M.map #(v n1) #(v n2) (M.mod_pow2_felem (v logq)) (as_matrix h0 a)) end | {
"file_name": "code/frodo/Hacl.Impl.Matrix.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 78,
"end_line": 213,
"start_col": 0,
"start_line": 207
} | module Hacl.Impl.Matrix
open FStar.HyperStack.ST
open FStar.Mul
open LowStar.BufferOps
open LowStar.Buffer
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module BSeq = Lib.ByteSequence
module Loops = Lib.LoopCombinators... | {
"checked_file": "/",
"dependencies": [
"Spec.Matrix.fst.checked",
"Spec.Frodo.Lemmas.fst.checked",
"prims.fst.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.Loops.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib... | [
{
"abbrev": true,
"full_module": "Spec.Frodo.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Matrix",
"short_module": "M"
},
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_... | {
"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 |
logq: Lib.IntTypes.size_t{0 < Lib.IntTypes.v logq /\ Lib.IntTypes.v logq <= 16} ->
a: Hacl.Impl.Matrix.matrix_t n1 n2
-> FStar.HyperStack.ST.Stack Prims.unit | FStar.HyperStack.ST.Stack | [] | [] | [
"Lib.IntTypes.size_t",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"FStar.Mul.op_Star",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Lib.IntTypes.max_size_t",
"Prims.l_and",
"Prims.op_LessThan",
"Hacl.Impl.Matrix.matrix_t",
"Lib.IntTypes.op_Less_Dot",
"FStar.UInt32.__uint_to_t",
... | [] | false | true | false | false | false | let mod_pow2 #n1 #n2 logq a =
| if logq <. 16ul
then
let h0 = ST.get () in
map (mod_pow2_felem logq) a a;
M.extensionality (M.map #(v n1) #(v n2) (mod_pow2_felem logq) (as_matrix h0 a))
(M.map #(v n1) #(v n2) (M.mod_pow2_felem (v logq)) (as_matrix h0 a)) | false |
Hacl.Impl.Matrix.fst | Hacl.Impl.Matrix.map_inner | val map_inner:
#n1:size_t
-> #n2:size_t{v n1 * v n2 <= max_size_t}
-> h0:HS.mem
-> h1:HS.mem
-> f:(elem -> elem)
-> a:matrix_t n1 n2
-> c:matrix_t n1 n2{a == c}
-> i:size_t{v i < v n1}
-> j:size_t{v j < v n2}
-> Stack unit
(requires fun h2 -> map_inner_inv h0 h1 h2 f a c i (v j))
(ensures ... | val map_inner:
#n1:size_t
-> #n2:size_t{v n1 * v n2 <= max_size_t}
-> h0:HS.mem
-> h1:HS.mem
-> f:(elem -> elem)
-> a:matrix_t n1 n2
-> c:matrix_t n1 n2{a == c}
-> i:size_t{v i < v n1}
-> j:size_t{v j < v n2}
-> Stack unit
(requires fun h2 -> map_inner_inv h0 h1 h2 f a c i (v j))
(ensures ... | let map_inner #n1 #n2 h0 h1 f a c i j =
c.[i,j] <- f a.[i,j] | {
"file_name": "code/frodo/Hacl.Impl.Matrix.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 22,
"end_line": 149,
"start_col": 0,
"start_line": 148
} | module Hacl.Impl.Matrix
open FStar.HyperStack.ST
open FStar.Mul
open LowStar.BufferOps
open LowStar.Buffer
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module BSeq = Lib.ByteSequence
module Loops = Lib.LoopCombinators... | {
"checked_file": "/",
"dependencies": [
"Spec.Matrix.fst.checked",
"Spec.Frodo.Lemmas.fst.checked",
"prims.fst.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.Loops.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib... | [
{
"abbrev": true,
"full_module": "Spec.Frodo.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Matrix",
"short_module": "M"
},
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_... | {
"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 |
h0: FStar.Monotonic.HyperStack.mem ->
h1: FStar.Monotonic.HyperStack.mem ->
f: (_: Hacl.Impl.Matrix.elem -> Hacl.Impl.Matrix.elem) ->
a: Hacl.Impl.Matrix.matrix_t n1 n2 ->
c: Hacl.Impl.Matrix.matrix_t n1 n2 {a == c} ->
i: Lib.IntTypes.size_t{Lib.IntTypes.v i < Lib.IntTypes.v n1} ->
j: Lib.I... | FStar.HyperStack.ST.Stack | [] | [] | [
"Lib.IntTypes.size_t",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"FStar.Mul.op_Star",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Lib.IntTypes.max_size_t",
"FStar.Monotonic.HyperStack.mem",
"Hacl.Impl.Matrix.elem",
"Hacl.Impl.Matrix.matrix_t",
"Prims.eq2",
"Prims.op_LessThan",
... | [] | false | true | false | false | false | let map_inner #n1 #n2 h0 h1 f a c i j =
| c.[ i, j ] <- f a.[ i, j ] | false |
Hacl.Impl.Matrix.fst | Hacl.Impl.Matrix.get_s | val get_s : h: FStar.Monotonic.HyperStack.mem ->
m: Hacl.Impl.Matrix.matrix_t n1 n2 ->
i: Lib.IntTypes.size_nat{i < Lib.IntTypes.v n1} ->
j: Lib.IntTypes.size_nat{j < Lib.IntTypes.v n2}
-> Prims.GTot Spec.Matrix.elem | let get_s #n1 #n2 h (m:matrix_t n1 n2) i j = M.mget_s (as_matrix h m) i j | {
"file_name": "code/frodo/Hacl.Impl.Matrix.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 73,
"end_line": 511,
"start_col": 0,
"start_line": 511
} | module Hacl.Impl.Matrix
open FStar.HyperStack.ST
open FStar.Mul
open LowStar.BufferOps
open LowStar.Buffer
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module BSeq = Lib.ByteSequence
module Loops = Lib.LoopCombinators... | {
"checked_file": "/",
"dependencies": [
"Spec.Matrix.fst.checked",
"Spec.Frodo.Lemmas.fst.checked",
"prims.fst.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.Loops.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib... | [
{
"abbrev": true,
"full_module": "Spec.Frodo.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Matrix",
"short_module": "M"
},
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_... | {
"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 ->
m: Hacl.Impl.Matrix.matrix_t n1 n2 ->
i: Lib.IntTypes.size_nat{i < Lib.IntTypes.v n1} ->
j: Lib.IntTypes.size_nat{j < Lib.IntTypes.v n2}
-> Prims.GTot Spec.Matrix.elem | Prims.GTot | [
"sometrivial"
] | [] | [
"Lib.IntTypes.size_t",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"FStar.Mul.op_Star",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Lib.IntTypes.max_size_t",
"FStar.Monotonic.HyperStack.mem",
"Hacl.Impl.Matrix.matrix_t",
"Lib.IntTypes.size_nat",
"Prims.op_LessThan",
"Spec.Matrix.... | [] | false | false | false | false | false | let get_s #n1 #n2 h (m: matrix_t n1 n2) i j =
| M.mget_s (as_matrix h m) i j | false | |
Hacl.Impl.Matrix.fst | Hacl.Impl.Matrix.map | val map:
#n1:size_t
-> #n2:size_t{v n1 * v n2 <= max_size_t}
-> f:(uint16 -> uint16)
-> a:matrix_t n1 n2
-> c:matrix_t n1 n2
-> Stack unit
(requires fun h0 ->
live h0 a /\ live h0 c /\ a == c)
(ensures fun h0 _ h1 -> modifies1 c h0 h1 /\
as_matrix h1 c == M.map #(v n1) #(v n2) f (as_m... | val map:
#n1:size_t
-> #n2:size_t{v n1 * v n2 <= max_size_t}
-> f:(uint16 -> uint16)
-> a:matrix_t n1 n2
-> c:matrix_t n1 n2
-> Stack unit
(requires fun h0 ->
live h0 a /\ live h0 c /\ a == c)
(ensures fun h0 _ h1 -> modifies1 c h0 h1 /\
as_matrix h1 c == M.map #(v n1) #(v n2) f (as_m... | let map #n1 #n2 f a c =
let h0 = ST.get () in
Lib.Loops.for (size 0) n1
(fun h1 i -> live h1 a /\ live h1 c /\
modifies1 c h0 h1 /\ i <= v n1 /\
(forall (i0:nat{i0 < i}) (j:nat{j < v n2}).
get h1 c i0 j == f (get h0 a i0 j)) /\
(forall (i0:nat{i <= i0 /\ i0 < v n1}) (j:nat{j < v n2}).
... | {
"file_name": "code/frodo/Hacl.Impl.Matrix.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 64,
"end_line": 181,
"start_col": 0,
"start_line": 165
} | module Hacl.Impl.Matrix
open FStar.HyperStack.ST
open FStar.Mul
open LowStar.BufferOps
open LowStar.Buffer
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module BSeq = Lib.ByteSequence
module Loops = Lib.LoopCombinators... | {
"checked_file": "/",
"dependencies": [
"Spec.Matrix.fst.checked",
"Spec.Frodo.Lemmas.fst.checked",
"prims.fst.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.Loops.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib... | [
{
"abbrev": true,
"full_module": "Spec.Frodo.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Matrix",
"short_module": "M"
},
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_... | {
"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 |
f: (_: Lib.IntTypes.uint16 -> Lib.IntTypes.uint16) ->
a: Hacl.Impl.Matrix.matrix_t n1 n2 ->
c: Hacl.Impl.Matrix.matrix_t n1 n2
-> FStar.HyperStack.ST.Stack Prims.unit | FStar.HyperStack.ST.Stack | [] | [] | [
"Lib.IntTypes.size_t",
"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.uint16",
"Hacl.Impl.Matrix.matrix_t",
"Spec.Matrix.extensionality",
"Hacl.Impl.Matrix.as_matrix",
"Spec.Matr... | [] | false | true | false | false | false | let map #n1 #n2 f a c =
| let h0 = ST.get () in
Lib.Loops.for (size 0)
n1
(fun h1 i ->
live h1 a /\ live h1 c /\ modifies1 c h0 h1 /\ i <= v n1 /\
(forall (i0: nat{i0 < i}) (j: nat{j < v n2}). get h1 c i0 j == f (get h0 a i0 j)) /\
(forall (i0: nat{i <= i0 /\ i0 < v n1}) (j: nat{j < v n2}). get h1 c i0 j == get h0 c i0 j))... | false |
Hacl.Impl.Matrix.fst | Hacl.Impl.Matrix.matrix_sub | val matrix_sub:
#n1:size_t
-> #n2:size_t{v n1 * v n2 <= max_size_t}
-> a:matrix_t n1 n2
-> b:matrix_t n1 n2
-> Stack unit
(requires fun h -> live h a /\ live h b /\ disjoint a b)
(ensures fun h0 r h1 -> modifies1 b h0 h1 /\
as_matrix h1 b == M.sub (as_matrix h0 a) (as_matrix h0 b)) | val matrix_sub:
#n1:size_t
-> #n2:size_t{v n1 * v n2 <= max_size_t}
-> a:matrix_t n1 n2
-> b:matrix_t n1 n2
-> Stack unit
(requires fun h -> live h a /\ live h b /\ disjoint a b)
(ensures fun h0 r h1 -> modifies1 b h0 h1 /\
as_matrix h1 b == M.sub (as_matrix h0 a) (as_matrix h0 b)) | let matrix_sub #n1 #n2 a b =
(* Use the in-place variant above by flipping the arguments of [sub_mod] *)
(* Requires appplying extensionality *)
let h0 = ST.get() in
[@ inline_let ]
let sub_mod_flipped x y = sub_mod y x in
map2 sub_mod_flipped b a b;
let h1 = ST.get() in
M.extensionality (as_matrix h1 b... | {
"file_name": "code/frodo/Hacl.Impl.Matrix.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 77,
"end_line": 334,
"start_col": 0,
"start_line": 326
} | module Hacl.Impl.Matrix
open FStar.HyperStack.ST
open FStar.Mul
open LowStar.BufferOps
open LowStar.Buffer
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module BSeq = Lib.ByteSequence
module Loops = Lib.LoopCombinators... | {
"checked_file": "/",
"dependencies": [
"Spec.Matrix.fst.checked",
"Spec.Frodo.Lemmas.fst.checked",
"prims.fst.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.Loops.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib... | [
{
"abbrev": true,
"full_module": "Spec.Frodo.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Matrix",
"short_module": "M"
},
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_... | {
"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 | a: Hacl.Impl.Matrix.matrix_t n1 n2 -> b: Hacl.Impl.Matrix.matrix_t n1 n2
-> FStar.HyperStack.ST.Stack Prims.unit | FStar.HyperStack.ST.Stack | [] | [] | [
"Lib.IntTypes.size_t",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"FStar.Mul.op_Star",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Lib.IntTypes.max_size_t",
"Hacl.Impl.Matrix.matrix_t",
"Spec.Matrix.extensionality",
"Hacl.Impl.Matrix.as_matrix",
"Spec.Matrix.sub",
"Prims.unit",
... | [] | false | true | false | false | false | let matrix_sub #n1 #n2 a b =
| let h0 = ST.get () in
[@@ inline_let ]let sub_mod_flipped x y = sub_mod y x in
map2 sub_mod_flipped b a b;
let h1 = ST.get () in
M.extensionality (as_matrix h1 b) (M.sub (as_matrix h0 a) (as_matrix h0 b)) | false |
Hacl.Impl.Matrix.fst | Hacl.Impl.Matrix.mul_inner_inv | val mul_inner_inv:
#n1:size_t
-> #n2:size_t{v n1 * v n2 <= max_size_t}
-> #n3:size_t{v n2 * v n3 <= max_size_t /\ v n1 * v n3 <= max_size_t}
-> h0:HS.mem
-> h1:HS.mem
-> h2:HS.mem
-> a:matrix_t n1 n2
-> b:matrix_t n2 n3
-> c:matrix_t n1 n3
-> f:(k:nat{k < v n3} -> GTot uint16)
-> i:size_t{v i < ... | val mul_inner_inv:
#n1:size_t
-> #n2:size_t{v n1 * v n2 <= max_size_t}
-> #n3:size_t{v n2 * v n3 <= max_size_t /\ v n1 * v n3 <= max_size_t}
-> h0:HS.mem
-> h1:HS.mem
-> h2:HS.mem
-> a:matrix_t n1 n2
-> b:matrix_t n2 n3
-> c:matrix_t n1 n3
-> f:(k:nat{k < v n3} -> GTot uint16)
-> i:size_t{v i < ... | let mul_inner_inv #n1 #n2 #n3 h0 h1 h2 a b c f i k =
live h2 a /\ live h2 b /\ live h2 c /\
modifies1 c h1 h2 /\
k <= v n3 /\
(forall (i1:nat{i1 < v i}) (k:nat{k < v n3}). get h2 c i1 k == get h1 c i1 k) /\
(forall (k1:nat{k1 < k}). get h2 c (v i) k1 == f k1) /\
(forall (k1:nat{k <= k1 /\ k1 < v n3}). get h... | {
"file_name": "code/frodo/Hacl.Impl.Matrix.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 34,
"end_line": 403,
"start_col": 0,
"start_line": 394
} | module Hacl.Impl.Matrix
open FStar.HyperStack.ST
open FStar.Mul
open LowStar.BufferOps
open LowStar.Buffer
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module BSeq = Lib.ByteSequence
module Loops = Lib.LoopCombinators... | {
"checked_file": "/",
"dependencies": [
"Spec.Matrix.fst.checked",
"Spec.Frodo.Lemmas.fst.checked",
"prims.fst.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.Loops.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib... | [
{
"abbrev": true,
"full_module": "Spec.Frodo.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Matrix",
"short_module": "M"
},
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_... | {
"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 |
h0: FStar.Monotonic.HyperStack.mem ->
h1: FStar.Monotonic.HyperStack.mem ->
h2: FStar.Monotonic.HyperStack.mem ->
a: Hacl.Impl.Matrix.matrix_t n1 n2 ->
b: Hacl.Impl.Matrix.matrix_t n2 n3 ->
c: Hacl.Impl.Matrix.matrix_t n1 n3 ->
f: (k: Prims.nat{k < Lib.IntTypes.v n3} -> Prims.GTot Lib.IntTy... | Prims.Tot | [
"total"
] | [] | [
"Lib.IntTypes.size_t",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"FStar.Mul.op_Star",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Lib.IntTypes.max_size_t",
"Prims.l_and",
"FStar.Monotonic.HyperStack.mem",
"Hacl.Impl.Matrix.matrix_t",
"Prims.nat",
"Prims.op_LessThan",
"Lib.Int... | [] | false | false | false | false | true | let mul_inner_inv #n1 #n2 #n3 h0 h1 h2 a b c f i k =
| live h2 a /\ live h2 b /\ live h2 c /\ modifies1 c h1 h2 /\ k <= v n3 /\
(forall (i1: nat{i1 < v i}) (k: nat{k < v n3}). get h2 c i1 k == get h1 c i1 k) /\
(forall (k1: nat{k1 < k}). get h2 c (v i) k1 == f k1) /\
(forall (k1: nat{k <= k1 /\ k1 < v n3}). get h2 c (v i) k1 == get h0 c (v i) k1) /\
(forall (i1: nat{v i < ... | false |
Hacl.Impl.Matrix.fst | Hacl.Impl.Matrix.mget_s | val mget_s:
#n1:size_t
-> #n2:size_t{v n1 * v n2 <= max_size_t}
-> a:matrix_t n1 n2
-> i:size_t{v i < v n1}
-> j:size_t{v j < v n2}
-> Stack elem
(requires fun h0 -> live h0 a)
(ensures fun h0 x h1 -> modifies0 h0 h1 /\
x == M.mget_s (as_matrix h0 a) (v i) (v j)) | val mget_s:
#n1:size_t
-> #n2:size_t{v n1 * v n2 <= max_size_t}
-> a:matrix_t n1 n2
-> i:size_t{v i < v n1}
-> j:size_t{v j < v n2}
-> Stack elem
(requires fun h0 -> live h0 a)
(ensures fun h0 x h1 -> modifies0 h0 h1 /\
x == M.mget_s (as_matrix h0 a) (v i) (v j)) | let mget_s #n1 #n2 a i j =
M.index_lt (v n2) (v n1) (v j) (v i);
a.(j *! n1 +! i) | {
"file_name": "code/frodo/Hacl.Impl.Matrix.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 18,
"end_line": 508,
"start_col": 0,
"start_line": 506
} | module Hacl.Impl.Matrix
open FStar.HyperStack.ST
open FStar.Mul
open LowStar.BufferOps
open LowStar.Buffer
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module BSeq = Lib.ByteSequence
module Loops = Lib.LoopCombinators... | {
"checked_file": "/",
"dependencies": [
"Spec.Matrix.fst.checked",
"Spec.Frodo.Lemmas.fst.checked",
"prims.fst.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.Loops.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib... | [
{
"abbrev": true,
"full_module": "Spec.Frodo.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Matrix",
"short_module": "M"
},
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_... | {
"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 |
a: Hacl.Impl.Matrix.matrix_t n1 n2 ->
i: Lib.IntTypes.size_t{Lib.IntTypes.v i < Lib.IntTypes.v n1} ->
j: Lib.IntTypes.size_t{Lib.IntTypes.v j < Lib.IntTypes.v n2}
-> FStar.HyperStack.ST.Stack Hacl.Impl.Matrix.elem | FStar.HyperStack.ST.Stack | [] | [] | [
"Lib.IntTypes.size_t",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"FStar.Mul.op_Star",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Lib.IntTypes.max_size_t",
"Hacl.Impl.Matrix.matrix_t",
"Prims.op_LessThan",
"Lib.Buffer.op_Array_Access",
"Lib.Buffer.MUT",
"Hacl.Impl.Matrix.elem",... | [] | false | true | false | false | false | let mget_s #n1 #n2 a i j =
| M.index_lt (v n2) (v n1) (v j) (v i);
a.(j *! n1 +! i) | false |
Hacl.Impl.Matrix.fst | Hacl.Impl.Matrix.map2_inner | val map2_inner:
#n1:size_t
-> #n2:size_t{v n1 * v n2 <= max_size_t}
-> h0:HS.mem
-> h1:HS.mem
-> f:(elem -> elem -> elem)
-> a:matrix_t n1 n2
-> b:matrix_t n1 n2
-> c:matrix_t n1 n2{a == c /\ disjoint b c}
-> i:size_t{v i < v n1}
-> j:size_t{v j < v n2}
-> Stack unit
(requires fun h2 -> map2... | val map2_inner:
#n1:size_t
-> #n2:size_t{v n1 * v n2 <= max_size_t}
-> h0:HS.mem
-> h1:HS.mem
-> f:(elem -> elem -> elem)
-> a:matrix_t n1 n2
-> b:matrix_t n1 n2
-> c:matrix_t n1 n2{a == c /\ disjoint b c}
-> i:size_t{v i < v n1}
-> j:size_t{v j < v n2}
-> Stack unit
(requires fun h2 -> map2... | let map2_inner #n1 #n2 h0 h1 f a b c i j =
c.[i,j] <- f a.[i,j] b.[i,j] | {
"file_name": "code/frodo/Hacl.Impl.Matrix.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 30,
"end_line": 258,
"start_col": 0,
"start_line": 257
} | module Hacl.Impl.Matrix
open FStar.HyperStack.ST
open FStar.Mul
open LowStar.BufferOps
open LowStar.Buffer
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module BSeq = Lib.ByteSequence
module Loops = Lib.LoopCombinators... | {
"checked_file": "/",
"dependencies": [
"Spec.Matrix.fst.checked",
"Spec.Frodo.Lemmas.fst.checked",
"prims.fst.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.Loops.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib... | [
{
"abbrev": true,
"full_module": "Spec.Frodo.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Matrix",
"short_module": "M"
},
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_... | {
"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 |
h0: FStar.Monotonic.HyperStack.mem ->
h1: FStar.Monotonic.HyperStack.mem ->
f: (_: Hacl.Impl.Matrix.elem -> _: Hacl.Impl.Matrix.elem -> Hacl.Impl.Matrix.elem) ->
a: Hacl.Impl.Matrix.matrix_t n1 n2 ->
b: Hacl.Impl.Matrix.matrix_t n1 n2 ->
c: Hacl.Impl.Matrix.matrix_t n1 n2 {a == c /\ Lib.Buffer.... | FStar.HyperStack.ST.Stack | [] | [] | [
"Lib.IntTypes.size_t",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"FStar.Mul.op_Star",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Lib.IntTypes.max_size_t",
"FStar.Monotonic.HyperStack.mem",
"Hacl.Impl.Matrix.elem",
"Hacl.Impl.Matrix.matrix_t",
"Prims.l_and",
"Prims.eq2",
"Lib... | [] | false | true | false | false | false | let map2_inner #n1 #n2 h0 h1 f a b c i j =
| c.[ i, j ] <- f a.[ i, j ] b.[ i, j ] | false |
Hacl.Impl.Matrix.fst | Hacl.Impl.Matrix.map2 | val map2:
#n1:size_t
-> #n2:size_t{v n1 * v n2 <= max_size_t}
-> f:(uint16 -> uint16 -> uint16)
-> a:matrix_t n1 n2
-> b:matrix_t n1 n2
-> c:matrix_t n1 n2
-> Stack unit
(requires fun h0 ->
live h0 a /\ live h0 b /\ live h0 c /\
a == c /\ disjoint b c)
(ensures fun h0 _ h1 -> modifi... | val map2:
#n1:size_t
-> #n2:size_t{v n1 * v n2 <= max_size_t}
-> f:(uint16 -> uint16 -> uint16)
-> a:matrix_t n1 n2
-> b:matrix_t n1 n2
-> c:matrix_t n1 n2
-> Stack unit
(requires fun h0 ->
live h0 a /\ live h0 b /\ live h0 c /\
a == c /\ disjoint b c)
(ensures fun h0 _ h1 -> modifi... | let map2 #n1 #n2 f a b c =
let h0 = ST.get () in
Lib.Loops.for (size 0) n1
(fun h1 i -> live h1 a /\ live h1 b /\ live h1 c /\
modifies1 c h0 h1 /\ i <= v n1 /\
(forall (i0:nat{i0 < i}) (j:nat{j < v n2}).
get h1 c i0 j == f (get h0 a i0 j) (get h0 b i0 j)) /\
(forall (i0:nat{i <= i0 /\... | {
"file_name": "code/frodo/Hacl.Impl.Matrix.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 82,
"end_line": 297,
"start_col": 0,
"start_line": 281
} | module Hacl.Impl.Matrix
open FStar.HyperStack.ST
open FStar.Mul
open LowStar.BufferOps
open LowStar.Buffer
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module BSeq = Lib.ByteSequence
module Loops = Lib.LoopCombinators... | {
"checked_file": "/",
"dependencies": [
"Spec.Matrix.fst.checked",
"Spec.Frodo.Lemmas.fst.checked",
"prims.fst.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.Loops.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib... | [
{
"abbrev": true,
"full_module": "Spec.Frodo.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Matrix",
"short_module": "M"
},
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_... | {
"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 |
f: (_: Lib.IntTypes.uint16 -> _: Lib.IntTypes.uint16 -> Lib.IntTypes.uint16) ->
a: Hacl.Impl.Matrix.matrix_t n1 n2 ->
b: Hacl.Impl.Matrix.matrix_t n1 n2 ->
c: Hacl.Impl.Matrix.matrix_t n1 n2
-> FStar.HyperStack.ST.Stack Prims.unit | FStar.HyperStack.ST.Stack | [] | [] | [
"Lib.IntTypes.size_t",
"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.uint16",
"Hacl.Impl.Matrix.matrix_t",
"Spec.Matrix.extensionality",
"Hacl.Impl.Matrix.as_matrix",
"Spec.Matr... | [] | false | true | false | false | false | let map2 #n1 #n2 f a b c =
| let h0 = ST.get () in
Lib.Loops.for (size 0)
n1
(fun h1 i ->
live h1 a /\ live h1 b /\ live h1 c /\ modifies1 c h0 h1 /\ i <= v n1 /\
(forall (i0: nat{i0 < i}) (j: nat{j < v n2}).
get h1 c i0 j == f (get h0 a i0 j) (get h0 b i0 j)) /\
(forall (i0: nat{i <= i0 /\ i0 < v n1}) (j: nat{j < v... | false |
Hacl.Impl.Matrix.fst | Hacl.Impl.Matrix.mul_inner1 | val mul_inner1:
#n1:size_t
-> #n2:size_t{v n1 * v n2 <= max_size_t}
-> #n3:size_t{v n2 * v n3 <= max_size_t /\ v n1 * v n3 <= max_size_t}
-> h0:HS.mem
-> h1:HS.mem
-> a:matrix_t n1 n2
-> b:matrix_t n2 n3
-> c:matrix_t n1 n3{disjoint a c /\ disjoint b c}
-> i:size_t{v i < v n1}
-> k:size_t{v k < v ... | val mul_inner1:
#n1:size_t
-> #n2:size_t{v n1 * v n2 <= max_size_t}
-> #n3:size_t{v n2 * v n3 <= max_size_t /\ v n1 * v n3 <= max_size_t}
-> h0:HS.mem
-> h1:HS.mem
-> a:matrix_t n1 n2
-> b:matrix_t n2 n3
-> c:matrix_t n1 n3{disjoint a c /\ disjoint b c}
-> i:size_t{v i < v n1}
-> k:size_t{v k < v ... | let mul_inner1 #n1 #n2 #n3 h0 h1 a b c i k f =
assert (M.mul_inner (as_matrix h0 a) (as_matrix h0 b) (v i) (v k) ==
M.sum #(v n2) (fun l -> get h0 a (v i) l *. get h0 b l (v k)));
c.[i,k] <- mul_inner a b i k;
let h2 = ST.get () in
assert (get h2 c (v i) (v k) == f (v k)) | {
"file_name": "code/frodo/Hacl.Impl.Matrix.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 42,
"end_line": 429,
"start_col": 0,
"start_line": 424
} | module Hacl.Impl.Matrix
open FStar.HyperStack.ST
open FStar.Mul
open LowStar.BufferOps
open LowStar.Buffer
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module BSeq = Lib.ByteSequence
module Loops = Lib.LoopCombinators... | {
"checked_file": "/",
"dependencies": [
"Spec.Matrix.fst.checked",
"Spec.Frodo.Lemmas.fst.checked",
"prims.fst.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.Loops.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib... | [
{
"abbrev": true,
"full_module": "Spec.Frodo.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Matrix",
"short_module": "M"
},
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_... | {
"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 |
h0: FStar.Monotonic.HyperStack.mem ->
h1: FStar.Monotonic.HyperStack.mem ->
a: Hacl.Impl.Matrix.matrix_t n1 n2 ->
b: Hacl.Impl.Matrix.matrix_t n2 n3 ->
c: Hacl.Impl.Matrix.matrix_t n1 n3 {Lib.Buffer.disjoint a c /\ Lib.Buffer.disjoint b c} ->
i: Lib.IntTypes.size_t{Lib.IntTypes.v i < Lib.IntTyp... | FStar.HyperStack.ST.Stack | [] | [] | [
"Lib.IntTypes.size_t",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"FStar.Mul.op_Star",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Lib.IntTypes.max_size_t",
"Prims.l_and",
"FStar.Monotonic.HyperStack.mem",
"Hacl.Impl.Matrix.matrix_t",
"Lib.Buffer.disjoint",
"Lib.Buffer.MUT",
"... | [] | false | true | false | false | false | let mul_inner1 #n1 #n2 #n3 h0 h1 a b c i k f =
| assert (M.mul_inner (as_matrix h0 a) (as_matrix h0 b) (v i) (v k) ==
M.sum #(v n2) (fun l -> get h0 a (v i) l *. get h0 b l (v k)));
c.[ i, k ] <- mul_inner a b i k;
let h2 = ST.get () in
assert (get h2 c (v i) (v k) == f (v k)) | false |
Hacl.Impl.Matrix.fst | Hacl.Impl.Matrix.mul_inner1_s | val mul_inner1_s:
#n1:size_t
-> #n2:size_t{v n1 * v n2 <= max_size_t}
-> #n3:size_t{v n2 * v n3 <= max_size_t /\ v n1 * v n3 <= max_size_t}
-> h0:HS.mem
-> h1:HS.mem
-> a:matrix_t n1 n2
-> b:matrix_t n2 n3
-> c:matrix_t n1 n3{disjoint a c /\ disjoint b c}
-> i:size_t{v i < v n1}
-> k:size_t{v k < ... | val mul_inner1_s:
#n1:size_t
-> #n2:size_t{v n1 * v n2 <= max_size_t}
-> #n3:size_t{v n2 * v n3 <= max_size_t /\ v n1 * v n3 <= max_size_t}
-> h0:HS.mem
-> h1:HS.mem
-> a:matrix_t n1 n2
-> b:matrix_t n2 n3
-> c:matrix_t n1 n3{disjoint a c /\ disjoint b c}
-> i:size_t{v i < v n1}
-> k:size_t{v k < ... | let mul_inner1_s #n1 #n2 #n3 h0 h1 a b c i k f =
assert (M.mul_inner_s (as_matrix h0 a) (as_matrix h0 b) (v i) (v k) ==
M.sum #(v n2) (fun l -> get h0 a (v i) l *. get_s h0 b l (v k)));
mset c i k (mul_inner_s a b i k);
let h2 = ST.get () in
assert (get h2 c (v i) (v k) == f (v k)) | {
"file_name": "code/frodo/Hacl.Impl.Matrix.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 42,
"end_line": 577,
"start_col": 0,
"start_line": 572
} | module Hacl.Impl.Matrix
open FStar.HyperStack.ST
open FStar.Mul
open LowStar.BufferOps
open LowStar.Buffer
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module BSeq = Lib.ByteSequence
module Loops = Lib.LoopCombinators... | {
"checked_file": "/",
"dependencies": [
"Spec.Matrix.fst.checked",
"Spec.Frodo.Lemmas.fst.checked",
"prims.fst.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.Loops.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib... | [
{
"abbrev": true,
"full_module": "Spec.Frodo.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Matrix",
"short_module": "M"
},
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_... | {
"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 |
h0: FStar.Monotonic.HyperStack.mem ->
h1: FStar.Monotonic.HyperStack.mem ->
a: Hacl.Impl.Matrix.matrix_t n1 n2 ->
b: Hacl.Impl.Matrix.matrix_t n2 n3 ->
c: Hacl.Impl.Matrix.matrix_t n1 n3 {Lib.Buffer.disjoint a c /\ Lib.Buffer.disjoint b c} ->
i: Lib.IntTypes.size_t{Lib.IntTypes.v i < Lib.IntTyp... | FStar.HyperStack.ST.Stack | [] | [] | [
"Lib.IntTypes.size_t",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"FStar.Mul.op_Star",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Lib.IntTypes.max_size_t",
"Prims.l_and",
"FStar.Monotonic.HyperStack.mem",
"Hacl.Impl.Matrix.matrix_t",
"Lib.Buffer.disjoint",
"Lib.Buffer.MUT",
"... | [] | false | true | false | false | false | let mul_inner1_s #n1 #n2 #n3 h0 h1 a b c i k f =
| assert (M.mul_inner_s (as_matrix h0 a) (as_matrix h0 b) (v i) (v k) ==
M.sum #(v n2) (fun l -> get h0 a (v i) l *. get_s h0 b l (v k)));
mset c i k (mul_inner_s a b i k);
let h2 = ST.get () in
assert (get h2 c (v i) (v k) == f (v k)) | false |
Hacl.Impl.Matrix.fst | Hacl.Impl.Matrix.matrix_eq | val matrix_eq:
#n1:size_t
-> #n2:size_t{v n1 * v n2 <= max_size_t}
-> a:matrix_t n1 n2
-> b:matrix_t n1 n2
-> Stack uint16
(requires fun h -> live h a /\ live h b)
(ensures fun h0 r h1 -> modifies0 h0 h1 /\
r == M.matrix_eq #(v n1) #(v n2) (as_matrix h0 a) (as_matrix h0 b)) | val matrix_eq:
#n1:size_t
-> #n2:size_t{v n1 * v n2 <= max_size_t}
-> a:matrix_t n1 n2
-> b:matrix_t n1 n2
-> Stack uint16
(requires fun h -> live h a /\ live h b)
(ensures fun h0 r h1 -> modifies0 h0 h1 /\
r == M.matrix_eq #(v n1) #(v n2) (as_matrix h0 a) (as_matrix h0 b)) | let matrix_eq #n1 #n2 a b =
push_frame();
let res = create 1ul (ones U16 SEC) in
let r = buf_eq_mask a b (n1 *! n2) res in
pop_frame ();
r | {
"file_name": "code/frodo/Hacl.Impl.Matrix.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 3,
"end_line": 638,
"start_col": 0,
"start_line": 633
} | module Hacl.Impl.Matrix
open FStar.HyperStack.ST
open FStar.Mul
open LowStar.BufferOps
open LowStar.Buffer
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module BSeq = Lib.ByteSequence
module Loops = Lib.LoopCombinators... | {
"checked_file": "/",
"dependencies": [
"Spec.Matrix.fst.checked",
"Spec.Frodo.Lemmas.fst.checked",
"prims.fst.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.Loops.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib... | [
{
"abbrev": true,
"full_module": "Spec.Frodo.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Matrix",
"short_module": "M"
},
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_... | {
"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 | a: Hacl.Impl.Matrix.matrix_t n1 n2 -> b: Hacl.Impl.Matrix.matrix_t n1 n2
-> FStar.HyperStack.ST.Stack Lib.IntTypes.uint16 | FStar.HyperStack.ST.Stack | [] | [] | [
"Lib.IntTypes.size_t",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"FStar.Mul.op_Star",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Lib.IntTypes.max_size_t",
"Hacl.Impl.Matrix.matrix_t",
"Lib.IntTypes.uint16",
"Prims.unit",
"FStar.HyperStack.ST.pop_frame",
"Lib.IntTypes.int_t",
... | [] | false | true | false | false | false | let matrix_eq #n1 #n2 a b =
| push_frame ();
let res = create 1ul (ones U16 SEC) in
let r = buf_eq_mask a b (n1 *! n2) res in
pop_frame ();
r | false |
Hacl.Impl.Matrix.fst | Hacl.Impl.Matrix.matrix_from_lbytes | val matrix_from_lbytes:
#n1:size_t
-> #n2:size_t{2 * v n1 <= max_size_t /\ 2 * v n1 * v n2 <= max_size_t}
-> b:lbytes (size 2 *! n1 *! n2)
-> res:matrix_t n1 n2
-> Stack unit
(requires fun h -> live h b /\ live h res /\ disjoint b res)
(ensures fun h0 _ h1 -> modifies1 res h0 h1 /\
as_matrix ... | val matrix_from_lbytes:
#n1:size_t
-> #n2:size_t{2 * v n1 <= max_size_t /\ 2 * v n1 * v n2 <= max_size_t}
-> b:lbytes (size 2 *! n1 *! n2)
-> res:matrix_t n1 n2
-> Stack unit
(requires fun h -> live h b /\ live h res /\ disjoint b res)
(ensures fun h0 _ h1 -> modifies1 res h0 h1 /\
as_matrix ... | let matrix_from_lbytes #n1 #n2 b res =
let h0 = ST.get () in
assert (v n1 * v n2 <= max_size_t);
fill h0 (n1 *! n2) res
(fun h -> M.matrix_from_lbytes_f (v n1) (v n2) (as_seq h0 b))
(fun i ->
assert (2 * v i + 2 <= 2 * v n1 * v n2);
uint_from_bytes_le #U16 (sub b (2ul *! i) 2ul));
let h1 = ST.get ()... | {
"file_name": "code/frodo/Hacl.Impl.Matrix.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 88,
"end_line": 679,
"start_col": 0,
"start_line": 670
} | module Hacl.Impl.Matrix
open FStar.HyperStack.ST
open FStar.Mul
open LowStar.BufferOps
open LowStar.Buffer
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module BSeq = Lib.ByteSequence
module Loops = Lib.LoopCombinators... | {
"checked_file": "/",
"dependencies": [
"Spec.Matrix.fst.checked",
"Spec.Frodo.Lemmas.fst.checked",
"prims.fst.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.Loops.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib... | [
{
"abbrev": true,
"full_module": "Spec.Frodo.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Matrix",
"short_module": "M"
},
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_... | {
"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 | b: Hacl.Impl.Matrix.lbytes (Lib.IntTypes.size 2 *! n1 *! n2) -> res: Hacl.Impl.Matrix.matrix_t n1 n2
-> FStar.HyperStack.ST.Stack Prims.unit | 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",
"Hacl.Impl.Matrix.lbytes",
"Lib.IntTypes.op_Star_Bang",
"Lib.IntTypes.size",
"Hacl.Impl.Matrix.matrix_t",
... | [] | false | true | false | false | false | let matrix_from_lbytes #n1 #n2 b res =
| let h0 = ST.get () in
assert (v n1 * v n2 <= max_size_t);
fill h0
(n1 *! n2)
res
(fun h -> M.matrix_from_lbytes_f (v n1) (v n2) (as_seq h0 b))
(fun i ->
assert (2 * v i + 2 <= (2 * v n1) * v n2);
uint_from_bytes_le #U16 (sub b (2ul *! i) 2ul));
let h1 = ST.get () in
M.extensionality (as_matrix h1 re... | false |
Hacl.Impl.Matrix.fst | Hacl.Impl.Matrix.mul_inner | val mul_inner:
#n1:size_t
-> #n2:size_t{v n1 * v n2 <= max_size_t}
-> #n3:size_t{v n2 * v n3 <= max_size_t /\ v n1 * v n3 <= max_size_t}
-> a:matrix_t n1 n2
-> b:matrix_t n2 n3
-> i:size_t{v i < v n1}
-> k:size_t{v k < v n3}
-> Stack uint16
(requires fun h -> live h a /\ live h b)
(ensures fu... | val mul_inner:
#n1:size_t
-> #n2:size_t{v n1 * v n2 <= max_size_t}
-> #n3:size_t{v n2 * v n3 <= max_size_t /\ v n1 * v n3 <= max_size_t}
-> a:matrix_t n1 n2
-> b:matrix_t n2 n3
-> i:size_t{v i < v n1}
-> k:size_t{v k < v n3}
-> Stack uint16
(requires fun h -> live h a /\ live h b)
(ensures fu... | let mul_inner #n1 #n2 #n3 a b i k =
push_frame();
let h0 = ST.get() in
[@ inline_let ]
let f l = get h0 a (v i) l *. get h0 b l (v k) in
let res = create #uint16 (size 1) (u16 0) in
let h1 = ST.get() in
Lib.Loops.for (size 0) n2
(fun h2 j -> live h1 res /\ live h2 res /\
modifies1 res h1 h2 /\
... | {
"file_name": "code/frodo/Hacl.Impl.Matrix.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 5,
"end_line": 374,
"start_col": 0,
"start_line": 352
} | module Hacl.Impl.Matrix
open FStar.HyperStack.ST
open FStar.Mul
open LowStar.BufferOps
open LowStar.Buffer
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module BSeq = Lib.ByteSequence
module Loops = Lib.LoopCombinators... | {
"checked_file": "/",
"dependencies": [
"Spec.Matrix.fst.checked",
"Spec.Frodo.Lemmas.fst.checked",
"prims.fst.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.Loops.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib... | [
{
"abbrev": true,
"full_module": "Spec.Frodo.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Matrix",
"short_module": "M"
},
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 1,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
a: Hacl.Impl.Matrix.matrix_t n1 n2 ->
b: Hacl.Impl.Matrix.matrix_t n2 n3 ->
i: Lib.IntTypes.size_t{Lib.IntTypes.v i < Lib.IntTypes.v n1} ->
k: Lib.IntTypes.size_t{Lib.IntTypes.v k < Lib.IntTypes.v n3}
-> FStar.HyperStack.ST.Stack Lib.IntTypes.uint16 | FStar.HyperStack.ST.Stack | [] | [] | [
"Lib.IntTypes.size_t",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"FStar.Mul.op_Star",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Lib.IntTypes.max_size_t",
"Prims.l_and",
"Hacl.Impl.Matrix.matrix_t",
"Prims.op_LessThan",
"Lib.IntTypes.uint16",
"Prims.unit",
"FStar.HyperStack.... | [] | false | true | false | false | false | let mul_inner #n1 #n2 #n3 a b i k =
| push_frame ();
let h0 = ST.get () in
[@@ inline_let ]let f l = get h0 a (v i) l *. get h0 b l (v k) in
let res = create #uint16 (size 1) (u16 0) in
let h1 = ST.get () in
Lib.Loops.for (size 0)
n2
(fun h2 j ->
live h1 res /\ live h2 res /\ modifies1 res h1 h2 /\ bget h2 res 0 == M.sum_ #(v n2) f j)
(fun j ->... | false |
Hacl.Impl.Matrix.fst | Hacl.Impl.Matrix.matrix_to_lbytes | val matrix_to_lbytes:
#n1:size_t
-> #n2:size_t{2 * v n1 <= max_size_t /\ 2 * v n1 * v n2 <= max_size_t}
-> m:matrix_t n1 n2
-> res:lbytes (2ul *! n1 *! n2)
-> Stack unit
(requires fun h -> live h m /\ live h res /\ disjoint m res)
(ensures fun h0 r h1 -> modifies1 res h0 h1 /\
as_seq h1 res =... | val matrix_to_lbytes:
#n1:size_t
-> #n2:size_t{2 * v n1 <= max_size_t /\ 2 * v n1 * v n2 <= max_size_t}
-> m:matrix_t n1 n2
-> res:lbytes (2ul *! n1 *! n2)
-> Stack unit
(requires fun h -> live h m /\ live h res /\ disjoint m res)
(ensures fun h0 r h1 -> modifies1 res h0 h1 /\
as_seq h1 res =... | let matrix_to_lbytes #n1 #n2 m res =
let h0 = ST.get () in
fill_blocks_simple h0 2ul (n1 *! n2) res
(fun h -> M.matrix_to_lbytes_f #(v n1) #(v n2) (as_matrix h0 m))
(fun i -> uint_to_bytes_le (sub res (2ul *! i) 2ul) m.(i)) | {
"file_name": "code/frodo/Hacl.Impl.Matrix.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 60,
"end_line": 656,
"start_col": 0,
"start_line": 652
} | module Hacl.Impl.Matrix
open FStar.HyperStack.ST
open FStar.Mul
open LowStar.BufferOps
open LowStar.Buffer
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module BSeq = Lib.ByteSequence
module Loops = Lib.LoopCombinators... | {
"checked_file": "/",
"dependencies": [
"Spec.Matrix.fst.checked",
"Spec.Frodo.Lemmas.fst.checked",
"prims.fst.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.Loops.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib... | [
{
"abbrev": true,
"full_module": "Spec.Frodo.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Matrix",
"short_module": "M"
},
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_... | {
"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 | m: Hacl.Impl.Matrix.matrix_t n1 n2 -> res: Hacl.Impl.Matrix.lbytes (2ul *! n1 *! n2)
-> FStar.HyperStack.ST.Stack Prims.unit | 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",
"Hacl.Impl.Matrix.matrix_t",
"Hacl.Impl.Matrix.lbytes",
"Lib.IntTypes.op_Star_Bang",
"FStar.UInt32.__uint_t... | [] | false | true | false | false | false | let matrix_to_lbytes #n1 #n2 m res =
| let h0 = ST.get () in
fill_blocks_simple h0
2ul
(n1 *! n2)
res
(fun h -> M.matrix_to_lbytes_f #(v n1) #(v n2) (as_matrix h0 m))
(fun i -> uint_to_bytes_le (sub res (2ul *! i) 2ul) m.(i)) | false |
Hacl.Impl.Matrix.fst | Hacl.Impl.Matrix.matrix_mul_s | val matrix_mul_s:
#n1:size_t
-> #n2:size_t{v n1 * v n2 <= max_size_t}
-> #n3:size_t{v n2 * v n3 <= max_size_t /\ v n1 * v n3 <= max_size_t}
-> a:matrix_t n1 n2
-> b:matrix_t n2 n3
-> c:matrix_t n1 n3
-> Stack unit
(requires fun h ->
live h a /\ live h b /\ live h c /\
disjoint a c /\ dis... | val matrix_mul_s:
#n1:size_t
-> #n2:size_t{v n1 * v n2 <= max_size_t}
-> #n3:size_t{v n2 * v n3 <= max_size_t /\ v n1 * v n3 <= max_size_t}
-> a:matrix_t n1 n2
-> b:matrix_t n2 n3
-> c:matrix_t n1 n3
-> Stack unit
(requires fun h ->
live h a /\ live h b /\ live h c /\
disjoint a c /\ dis... | let matrix_mul_s #n1 #n2 #n3 a b c =
let h0 = ST.get () in
let f (i:nat{i < v n1}) (k:nat{k < v n3}) :
GTot (res:uint16{res == M.sum #(v n2) (fun l -> get h0 a i l *. get_s h0 b l k)})
= M.sum #(v n2) (fun l -> get h0 a i l *. get_s h0 b l k)
in
Lib.Loops.for (size 0) n1
(fun h1 i ->
live h1 a /... | {
"file_name": "code/frodo/Hacl.Impl.Matrix.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 79,
"end_line": 618,
"start_col": 0,
"start_line": 595
} | module Hacl.Impl.Matrix
open FStar.HyperStack.ST
open FStar.Mul
open LowStar.BufferOps
open LowStar.Buffer
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module BSeq = Lib.ByteSequence
module Loops = Lib.LoopCombinators... | {
"checked_file": "/",
"dependencies": [
"Spec.Matrix.fst.checked",
"Spec.Frodo.Lemmas.fst.checked",
"prims.fst.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.Loops.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib... | [
{
"abbrev": true,
"full_module": "Spec.Frodo.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Matrix",
"short_module": "M"
},
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_... | {
"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 |
a: Hacl.Impl.Matrix.matrix_t n1 n2 ->
b: Hacl.Impl.Matrix.matrix_t n2 n3 ->
c: Hacl.Impl.Matrix.matrix_t n1 n3
-> FStar.HyperStack.ST.Stack Prims.unit | FStar.HyperStack.ST.Stack | [] | [] | [
"Lib.IntTypes.size_t",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"FStar.Mul.op_Star",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Lib.IntTypes.max_size_t",
"Prims.l_and",
"Hacl.Impl.Matrix.matrix_t",
"Spec.Matrix.extensionality",
"Hacl.Impl.Matrix.as_matrix",
"Spec.Matrix.mul_s... | [] | false | true | false | false | false | let matrix_mul_s #n1 #n2 #n3 a b c =
| let h0 = ST.get () in
let f (i: nat{i < v n1}) (k: nat{k < v n3})
: GTot (res: uint16{res == M.sum #(v n2) (fun l -> get h0 a i l *. get_s h0 b l k)}) =
M.sum #(v n2) (fun l -> get h0 a i l *. get_s h0 b l k)
in
Lib.Loops.for (size 0)
n1
(fun h1 i ->
live h1 a /\ live h1 b /\ live h1 c /\ modifies1 c h0... | false |
Hacl.Impl.Matrix.fst | Hacl.Impl.Matrix.matrix_mul | val matrix_mul:
#n1:size_t
-> #n2:size_t{v n1 * v n2 <= max_size_t}
-> #n3:size_t{v n2 * v n3 <= max_size_t /\ v n1 * v n3 <= max_size_t}
-> a:matrix_t n1 n2
-> b:matrix_t n2 n3
-> c:matrix_t n1 n3
-> Stack unit
(requires fun h ->
live h a /\ live h b /\ live h c /\
disjoint a c /\ disjo... | val matrix_mul:
#n1:size_t
-> #n2:size_t{v n1 * v n2 <= max_size_t}
-> #n3:size_t{v n2 * v n3 <= max_size_t /\ v n1 * v n3 <= max_size_t}
-> a:matrix_t n1 n2
-> b:matrix_t n2 n3
-> c:matrix_t n1 n3
-> Stack unit
(requires fun h ->
live h a /\ live h b /\ live h c /\
disjoint a c /\ disjo... | let matrix_mul #n1 #n2 #n3 a b c =
let h0 = ST.get () in
let f (i:nat{i < v n1}) (k:nat{k < v n3}) :
GTot (res:uint16{res == M.sum #(v n2) (fun l -> get h0 a i l *. get h0 b l k)})
= M.sum #(v n2) (fun l -> get h0 a i l *. get h0 b l k)
in
Lib.Loops.for (size 0) n1
(fun h1 i ->
live h1 a /\ live... | {
"file_name": "code/frodo/Hacl.Impl.Matrix.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 77,
"end_line": 489,
"start_col": 0,
"start_line": 466
} | module Hacl.Impl.Matrix
open FStar.HyperStack.ST
open FStar.Mul
open LowStar.BufferOps
open LowStar.Buffer
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module BSeq = Lib.ByteSequence
module Loops = Lib.LoopCombinators... | {
"checked_file": "/",
"dependencies": [
"Spec.Matrix.fst.checked",
"Spec.Frodo.Lemmas.fst.checked",
"prims.fst.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.Loops.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib... | [
{
"abbrev": true,
"full_module": "Spec.Frodo.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Matrix",
"short_module": "M"
},
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_... | {
"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 |
a: Hacl.Impl.Matrix.matrix_t n1 n2 ->
b: Hacl.Impl.Matrix.matrix_t n2 n3 ->
c: Hacl.Impl.Matrix.matrix_t n1 n3
-> FStar.HyperStack.ST.Stack Prims.unit | FStar.HyperStack.ST.Stack | [] | [] | [
"Lib.IntTypes.size_t",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"FStar.Mul.op_Star",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Lib.IntTypes.max_size_t",
"Prims.l_and",
"Hacl.Impl.Matrix.matrix_t",
"Spec.Matrix.extensionality",
"Hacl.Impl.Matrix.as_matrix",
"Spec.Matrix.mul",... | [] | false | true | false | false | false | let matrix_mul #n1 #n2 #n3 a b c =
| let h0 = ST.get () in
let f (i: nat{i < v n1}) (k: nat{k < v n3})
: GTot (res: uint16{res == M.sum #(v n2) (fun l -> get h0 a i l *. get h0 b l k)}) =
M.sum #(v n2) (fun l -> get h0 a i l *. get h0 b l k)
in
Lib.Loops.for (size 0)
n1
(fun h1 i ->
live h1 a /\ live h1 b /\ live h1 c /\ modifies1 c h0 h1 ... | false |
Hacl.Impl.Matrix.fst | Hacl.Impl.Matrix.mul_inner_s | val mul_inner_s:
#n1:size_t
-> #n2:size_t{v n1 * v n2 <= max_size_t}
-> #n3:size_t{v n2 * v n3 <= max_size_t /\ v n1 * v n3 <= max_size_t}
-> a:matrix_t n1 n2
-> b:matrix_t n2 n3
-> i:size_t{v i < v n1}
-> k:size_t{v k < v n3}
-> Stack uint16
(requires fun h -> live h a /\ live h b)
(ensures ... | val mul_inner_s:
#n1:size_t
-> #n2:size_t{v n1 * v n2 <= max_size_t}
-> #n3:size_t{v n2 * v n3 <= max_size_t /\ v n1 * v n3 <= max_size_t}
-> a:matrix_t n1 n2
-> b:matrix_t n2 n3
-> i:size_t{v i < v n1}
-> k:size_t{v k < v n3}
-> Stack uint16
(requires fun h -> live h a /\ live h b)
(ensures ... | let mul_inner_s #n1 #n2 #n3 a b i k =
push_frame();
let h0 = ST.get() in
[@ inline_let ]
let f l = get h0 a (v i) l *. get_s h0 b l (v k) in
let res = create #uint16 (size 1) (u16 0) in
let h1 = ST.get() in
Lib.Loops.for (size 0) n2
(fun h2 j -> live h1 res /\ live h2 res /\
modifies1 res h1 h2 ... | {
"file_name": "code/frodo/Hacl.Impl.Matrix.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 5,
"end_line": 550,
"start_col": 0,
"start_line": 529
} | module Hacl.Impl.Matrix
open FStar.HyperStack.ST
open FStar.Mul
open LowStar.BufferOps
open LowStar.Buffer
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module BSeq = Lib.ByteSequence
module Loops = Lib.LoopCombinators... | {
"checked_file": "/",
"dependencies": [
"Spec.Matrix.fst.checked",
"Spec.Frodo.Lemmas.fst.checked",
"prims.fst.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.Loops.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib... | [
{
"abbrev": true,
"full_module": "Spec.Frodo.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Matrix",
"short_module": "M"
},
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 1,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
a: Hacl.Impl.Matrix.matrix_t n1 n2 ->
b: Hacl.Impl.Matrix.matrix_t n2 n3 ->
i: Lib.IntTypes.size_t{Lib.IntTypes.v i < Lib.IntTypes.v n1} ->
k: Lib.IntTypes.size_t{Lib.IntTypes.v k < Lib.IntTypes.v n3}
-> FStar.HyperStack.ST.Stack Lib.IntTypes.uint16 | FStar.HyperStack.ST.Stack | [] | [] | [
"Lib.IntTypes.size_t",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"FStar.Mul.op_Star",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Lib.IntTypes.max_size_t",
"Prims.l_and",
"Hacl.Impl.Matrix.matrix_t",
"Prims.op_LessThan",
"Lib.IntTypes.uint16",
"Prims.unit",
"FStar.HyperStack.... | [] | false | true | false | false | false | let mul_inner_s #n1 #n2 #n3 a b i k =
| push_frame ();
let h0 = ST.get () in
[@@ inline_let ]let f l = get h0 a (v i) l *. get_s h0 b l (v k) in
let res = create #uint16 (size 1) (u16 0) in
let h1 = ST.get () in
Lib.Loops.for (size 0)
n2
(fun h2 j ->
live h1 res /\ live h2 res /\ modifies1 res h1 h2 /\ bget h2 res 0 == M.sum_ #(v n2) f j)
(fun j ... | false |
Steel.Utils.fst | Steel.Utils.pure_as_ens | val pure_as_ens: #p: prop -> Prims.unit
-> Steel unit (pure p) (fun _ -> pure p) (fun _ -> True) (fun _ _ _ -> p) | val pure_as_ens: #p: prop -> Prims.unit
-> Steel unit (pure p) (fun _ -> pure p) (fun _ -> True) (fun _ _ _ -> p) | let pure_as_ens (#p:prop) ()
: Steel unit (pure p) (fun _ -> pure p) (fun _ -> True) (fun _ _ _ -> p)
= change_slprop_ens (pure p) (pure p) p (Steel.Memory.pure_interp p) | {
"file_name": "lib/steel/Steel.Utils.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 70,
"end_line": 48,
"start_col": 0,
"start_line": 46
} | (*
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.Memory.fsti.checked",
"Steel.FractionalPermission.fst.checked",
"Steel.Effect.Atomic.fsti.checked",
"Steel.Effect.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Ghost.fsti.che... | [
{
"abbrev": false,
"full_module": "Steel.Reference",
"short_module": null
},
{
"abbrev": false,
"full_module": "Steel.FractionalPermission",
"short_module": null
},
{
"abbrev": false,
"full_module": "Steel.Effect",
"short_module": null
},
{
"abbrev": false,
"f... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | _: Prims.unit -> Steel.Effect.Steel Prims.unit | Steel.Effect.Steel | [] | [] | [
"Prims.prop",
"Prims.unit",
"Steel.Utils.change_slprop_ens",
"Steel.Effect.Common.pure",
"Steel.Memory.pure_interp",
"Steel.Effect.Common.vprop",
"Steel.Effect.Common.rmem",
"Prims.l_True"
] | [] | false | true | false | false | false | let pure_as_ens (#p: prop) ()
: Steel unit (pure p) (fun _ -> pure p) (fun _ -> True) (fun _ _ _ -> p) =
| change_slprop_ens (pure p) (pure p) p (Steel.Memory.pure_interp p) | false |
Steel.Utils.fst | Steel.Utils.rewrite | val rewrite (#a: _) (#p: (a -> vprop)) (x y: a)
: Steel unit (p x) (fun _ -> p y) (requires fun _ -> x == y) (ensures fun _ _ _ -> True) | val rewrite (#a: _) (#p: (a -> vprop)) (x y: a)
: Steel unit (p x) (fun _ -> p y) (requires fun _ -> x == y) (ensures fun _ _ _ -> True) | let rewrite #a (#p:a -> vprop) (x y:a)
: Steel unit (p x) (fun _ -> p y)
(requires fun _ -> x == y)
(ensures fun _ _ _ -> True)
= rewrite_slprop (p x) (p y) (fun _ -> ()) | {
"file_name": "lib/steel/Steel.Utils.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 44,
"end_line": 54,
"start_col": 0,
"start_line": 50
} | (*
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.Memory.fsti.checked",
"Steel.FractionalPermission.fst.checked",
"Steel.Effect.Atomic.fsti.checked",
"Steel.Effect.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Ghost.fsti.che... | [
{
"abbrev": false,
"full_module": "Steel.Reference",
"short_module": null
},
{
"abbrev": false,
"full_module": "Steel.FractionalPermission",
"short_module": null
},
{
"abbrev": false,
"full_module": "Steel.Effect",
"short_module": null
},
{
"abbrev": false,
"f... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | x: a -> y: a -> Steel.Effect.Steel Prims.unit | Steel.Effect.Steel | [] | [] | [
"Steel.Effect.Common.vprop",
"Steel.Effect.Atomic.rewrite_slprop",
"FStar.Ghost.hide",
"FStar.Set.set",
"Steel.Memory.iname",
"FStar.Set.empty",
"Steel.Memory.mem",
"Prims.unit",
"Steel.Effect.Common.rmem",
"Prims.eq2",
"Prims.l_True"
] | [] | false | true | false | false | false | let rewrite #a (#p: (a -> vprop)) (x: a) (y: a)
: Steel unit (p x) (fun _ -> p y) (requires fun _ -> x == y) (ensures fun _ _ _ -> True) =
| rewrite_slprop (p x) (p y) (fun _ -> ()) | false |
Steel.Utils.fst | Steel.Utils.pts_to_not_null | val pts_to_not_null (#a: Type) (#opened: inames) (#p: perm) (#v: FStar.Ghost.erased a) (r: ref a)
: SteelGhost unit
opened
(pts_to r p v)
(fun _ -> pts_to r p v)
(fun _ -> True)
(fun _ _ _ -> r =!= null) | val pts_to_not_null (#a: Type) (#opened: inames) (#p: perm) (#v: FStar.Ghost.erased a) (r: ref a)
: SteelGhost unit
opened
(pts_to r p v)
(fun _ -> pts_to r p v)
(fun _ -> True)
(fun _ _ _ -> r =!= null) | let pts_to_not_null (#a:Type)
(#opened:inames)
(#p:perm)
(#v:FStar.Ghost.erased a)
(r:ref a)
: SteelGhost unit opened
(pts_to r p v)
(fun _ -> pts_to r p v)
(fun _ -> True)
(fun _ _ _ -> r =!= null)
= extract_info_raw (p... | {
"file_name": "lib/steel/Steel.Utils.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 40,
"end_line": 35,
"start_col": 0,
"start_line": 24
} | (*
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.Memory.fsti.checked",
"Steel.FractionalPermission.fst.checked",
"Steel.Effect.Atomic.fsti.checked",
"Steel.Effect.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Ghost.fsti.che... | [
{
"abbrev": false,
"full_module": "Steel.Reference",
"short_module": null
},
{
"abbrev": false,
"full_module": "Steel.FractionalPermission",
"short_module": null
},
{
"abbrev": false,
"full_module": "Steel.Effect",
"short_module": null
},
{
"abbrev": false,
"f... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | r: Steel.Reference.ref a -> Steel.Effect.Atomic.SteelGhost Prims.unit | Steel.Effect.Atomic.SteelGhost | [] | [] | [
"Steel.Memory.inames",
"Steel.FractionalPermission.perm",
"FStar.Ghost.erased",
"Steel.Reference.ref",
"Steel.Effect.Atomic.extract_info_raw",
"Steel.Reference.pts_to",
"FStar.Ghost.reveal",
"Prims.l_not",
"Prims.eq2",
"Steel.Reference.null",
"Steel.Memory.mem",
"Steel.Reference.pts_to_not_nul... | [] | false | true | false | false | false | let pts_to_not_null (#a: Type) (#opened: inames) (#p: perm) (#v: FStar.Ghost.erased a) (r: ref a)
: SteelGhost unit
opened
(pts_to r p v)
(fun _ -> pts_to r p v)
(fun _ -> True)
(fun _ _ _ -> r =!= null) =
| extract_info_raw (pts_to r p v) (r =!= null) (fun m -> pts_to_not_null r p v m) | false |
LowParse.Spec.BitVector.fst | LowParse.Spec.BitVector.synth_bv8_recip | val synth_bv8_recip (x: BV.bv_t 8) : Tot U8.t | val synth_bv8_recip (x: BV.bv_t 8) : Tot U8.t | let synth_bv8_recip (x: BV.bv_t 8) : Tot U8.t =
to_uint8 x | {
"file_name": "src/lowparse/LowParse.Spec.BitVector.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 12,
"end_line": 75,
"start_col": 0,
"start_line": 74
} | module LowParse.Spec.BitVector
open FStar.Mul
module BV = FStar.BitVector
module U8 = FStar.UInt8
module Seq = FStar.Seq
(* Big-endian conversion of a bit vector to a UInt8 *)
let rec to_uint8
(#n: nat { n <= 8 })
(x: BV.bv_t n)
: Tot (y: U8.t { U8.v y < pow2 n })
= if n = 0
then 0uy
else
let hi = to_uin... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Int.fsti.checked",
"LowParse.Spec.Combinators.fsti.checked",
"LowParse.Spec.BoundedInt.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Nativ... | [
{
"abbrev": false,
"full_module": "LowParse.Spec.Int",
"short_module": null
},
{
"abbrev": false,
"full_module": "LowParse.Spec.Combinators",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"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 | x: FStar.BitVector.bv_t 8 -> FStar.UInt8.t | Prims.Tot | [
"total"
] | [] | [
"FStar.BitVector.bv_t",
"LowParse.Spec.BitVector.to_uint8",
"FStar.UInt8.t"
] | [] | false | false | false | false | false | let synth_bv8_recip (x: BV.bv_t 8) : Tot U8.t =
| to_uint8 x | false |
LowParse.Spec.BitVector.fst | LowParse.Spec.BitVector.parse_bv8_kind | val parse_bv8_kind : LowParse.Spec.Base.parser_kind | let parse_bv8_kind = parse_u8_kind | {
"file_name": "src/lowparse/LowParse.Spec.BitVector.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 34,
"end_line": 87,
"start_col": 0,
"start_line": 87
} | module LowParse.Spec.BitVector
open FStar.Mul
module BV = FStar.BitVector
module U8 = FStar.UInt8
module Seq = FStar.Seq
(* Big-endian conversion of a bit vector to a UInt8 *)
let rec to_uint8
(#n: nat { n <= 8 })
(x: BV.bv_t n)
: Tot (y: U8.t { U8.v y < pow2 n })
= if n = 0
then 0uy
else
let hi = to_uin... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Int.fsti.checked",
"LowParse.Spec.Combinators.fsti.checked",
"LowParse.Spec.BoundedInt.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Nativ... | [
{
"abbrev": false,
"full_module": "LowParse.Spec.Int",
"short_module": null
},
{
"abbrev": false,
"full_module": "LowParse.Spec.Combinators",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"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 | LowParse.Spec.Base.parser_kind | Prims.Tot | [
"total"
] | [] | [
"LowParse.Spec.Int.parse_u8_kind"
] | [] | false | false | false | true | false | let parse_bv8_kind =
| parse_u8_kind | false | |
LowParse.Spec.BitVector.fst | LowParse.Spec.BitVector.parse_extra_bv8_kind | val parse_extra_bv8_kind (n: nat) : Tot parser_kind | val parse_extra_bv8_kind (n: nat) : Tot parser_kind | let parse_extra_bv8_kind (n: nat) : Tot parser_kind =
parse_filter_kind parse_u8_kind | {
"file_name": "src/lowparse/LowParse.Spec.BitVector.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 33,
"end_line": 187,
"start_col": 0,
"start_line": 186
} | module LowParse.Spec.BitVector
open FStar.Mul
module BV = FStar.BitVector
module U8 = FStar.UInt8
module Seq = FStar.Seq
(* Big-endian conversion of a bit vector to a UInt8 *)
let rec to_uint8
(#n: nat { n <= 8 })
(x: BV.bv_t n)
: Tot (y: U8.t { U8.v y < pow2 n })
= if n = 0
then 0uy
else
let hi = to_uin... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Int.fsti.checked",
"LowParse.Spec.Combinators.fsti.checked",
"LowParse.Spec.BoundedInt.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Nativ... | [
{
"abbrev": false,
"full_module": "LowParse.Spec.Int",
"short_module": null
},
{
"abbrev": false,
"full_module": "LowParse.Spec.Combinators",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"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 | n: Prims.nat -> LowParse.Spec.Base.parser_kind | Prims.Tot | [
"total"
] | [] | [
"Prims.nat",
"LowParse.Spec.Combinators.parse_filter_kind",
"LowParse.Spec.Int.parse_u8_kind",
"LowParse.Spec.Base.parser_kind"
] | [] | false | false | false | true | false | let parse_extra_bv8_kind (n: nat) : Tot parser_kind =
| parse_filter_kind parse_u8_kind | false |
LowParse.Spec.BitVector.fst | LowParse.Spec.BitVector.of_uint8 | val of_uint8 (n: nat{n <= 8}) (x: U8.t{U8.v x < pow2 n}) : Tot (BV.bv_t n) | val of_uint8 (n: nat{n <= 8}) (x: U8.t{U8.v x < pow2 n}) : Tot (BV.bv_t n) | let rec of_uint8
(n: nat { n <= 8 })
(x: U8.t { U8.v x < pow2 n })
: Tot (BV.bv_t n)
= if n = 0
then Seq.empty
else
let hi = of_uint8 (n - 1) (x `U8.div` 2uy) in
Seq.snoc hi (x `U8.rem` 2uy = 1uy) | {
"file_name": "src/lowparse/LowParse.Spec.BitVector.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 38,
"end_line": 30,
"start_col": 0,
"start_line": 22
} | module LowParse.Spec.BitVector
open FStar.Mul
module BV = FStar.BitVector
module U8 = FStar.UInt8
module Seq = FStar.Seq
(* Big-endian conversion of a bit vector to a UInt8 *)
let rec to_uint8
(#n: nat { n <= 8 })
(x: BV.bv_t n)
: Tot (y: U8.t { U8.v y < pow2 n })
= if n = 0
then 0uy
else
let hi = to_uin... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Int.fsti.checked",
"LowParse.Spec.Combinators.fsti.checked",
"LowParse.Spec.BoundedInt.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Nativ... | [
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module": "FStar.UInt8",
"short_module": "U8"
},
{
"abbrev": true,
"full_module": "FStar.BitVector",
"short_module": "BV"
},
{
"abbrev": false,
"full_module": "FStar.... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | n: Prims.nat{n <= 8} -> x: FStar.UInt8.t{FStar.UInt8.v x < Prims.pow2 n} -> FStar.BitVector.bv_t n | Prims.Tot | [
"total"
] | [] | [
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"FStar.UInt8.t",
"Prims.op_LessThan",
"FStar.UInt8.v",
"Prims.pow2",
"Prims.op_Equality",
"Prims.int",
"FStar.Seq.Base.empty",
"Prims.bool",
"FStar.Seq.Properties.snoc",
"FStar.UInt8.rem",
"FStar.UInt8.__uint_to_t",
"FStar.BitVector.b... | [
"recursion"
] | false | false | false | false | false | let rec of_uint8 (n: nat{n <= 8}) (x: U8.t{U8.v x < pow2 n}) : Tot (BV.bv_t n) =
| if n = 0
then Seq.empty
else
let hi = of_uint8 (n - 1) (x `U8.div` 2uy) in
Seq.snoc hi (x `U8.rem` 2uy = 1uy) | false |
LowParse.Spec.BitVector.fst | LowParse.Spec.BitVector.synth_bv8 | val synth_bv8 (x: U8.t) : Tot (BV.bv_t 8) | val synth_bv8 (x: U8.t) : Tot (BV.bv_t 8) | let synth_bv8 (x: U8.t) : Tot (BV.bv_t 8) =
of_uint8 8 x | {
"file_name": "src/lowparse/LowParse.Spec.BitVector.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 14,
"end_line": 72,
"start_col": 0,
"start_line": 71
} | module LowParse.Spec.BitVector
open FStar.Mul
module BV = FStar.BitVector
module U8 = FStar.UInt8
module Seq = FStar.Seq
(* Big-endian conversion of a bit vector to a UInt8 *)
let rec to_uint8
(#n: nat { n <= 8 })
(x: BV.bv_t n)
: Tot (y: U8.t { U8.v y < pow2 n })
= if n = 0
then 0uy
else
let hi = to_uin... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Int.fsti.checked",
"LowParse.Spec.Combinators.fsti.checked",
"LowParse.Spec.BoundedInt.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Nativ... | [
{
"abbrev": false,
"full_module": "LowParse.Spec.Int",
"short_module": null
},
{
"abbrev": false,
"full_module": "LowParse.Spec.Combinators",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"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 | x: FStar.UInt8.t -> FStar.BitVector.bv_t 8 | Prims.Tot | [
"total"
] | [] | [
"FStar.UInt8.t",
"LowParse.Spec.BitVector.of_uint8",
"FStar.BitVector.bv_t"
] | [] | false | false | false | false | false | let synth_bv8 (x: U8.t) : Tot (BV.bv_t 8) =
| of_uint8 8 x | false |
LowParse.Spec.BitVector.fst | LowParse.Spec.BitVector.synth_bv8_inverse | val synth_bv8_inverse:squash (synth_inverse synth_bv8 synth_bv8_recip) | val synth_bv8_inverse:squash (synth_inverse synth_bv8 synth_bv8_recip) | let synth_bv8_inverse : squash (synth_inverse synth_bv8 synth_bv8_recip) =
synth_inverse_intro' synth_bv8 synth_bv8_recip (fun x ->
of_uint8_to_uint8 x
) | {
"file_name": "src/lowparse/LowParse.Spec.BitVector.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 3,
"end_line": 85,
"start_col": 0,
"start_line": 82
} | module LowParse.Spec.BitVector
open FStar.Mul
module BV = FStar.BitVector
module U8 = FStar.UInt8
module Seq = FStar.Seq
(* Big-endian conversion of a bit vector to a UInt8 *)
let rec to_uint8
(#n: nat { n <= 8 })
(x: BV.bv_t n)
: Tot (y: U8.t { U8.v y < pow2 n })
= if n = 0
then 0uy
else
let hi = to_uin... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Int.fsti.checked",
"LowParse.Spec.Combinators.fsti.checked",
"LowParse.Spec.BoundedInt.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Nativ... | [
{
"abbrev": false,
"full_module": "LowParse.Spec.Int",
"short_module": null
},
{
"abbrev": false,
"full_module": "LowParse.Spec.Combinators",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"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 | Prims.squash (LowParse.Spec.Combinators.synth_inverse LowParse.Spec.BitVector.synth_bv8
LowParse.Spec.BitVector.synth_bv8_recip) | Prims.Tot | [
"total"
] | [] | [
"LowParse.Spec.Combinators.synth_inverse_intro'",
"FStar.UInt8.t",
"FStar.BitVector.bv_t",
"LowParse.Spec.BitVector.synth_bv8",
"LowParse.Spec.BitVector.synth_bv8_recip",
"LowParse.Spec.BitVector.of_uint8_to_uint8",
"Prims.unit"
] | [] | false | false | true | false | false | let synth_bv8_inverse:squash (synth_inverse synth_bv8 synth_bv8_recip) =
| synth_inverse_intro' synth_bv8 synth_bv8_recip (fun x -> of_uint8_to_uint8 x) | false |
LowParse.Spec.BitVector.fst | LowParse.Spec.BitVector.parse_bv8 | val parse_bv8:parser parse_bv8_kind (BV.bv_t 8) | val parse_bv8:parser parse_bv8_kind (BV.bv_t 8) | let parse_bv8 : parser parse_bv8_kind (BV.bv_t 8) =
parse_u8 `parse_synth` synth_bv8 | {
"file_name": "src/lowparse/LowParse.Spec.BitVector.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 34,
"end_line": 90,
"start_col": 0,
"start_line": 89
} | module LowParse.Spec.BitVector
open FStar.Mul
module BV = FStar.BitVector
module U8 = FStar.UInt8
module Seq = FStar.Seq
(* Big-endian conversion of a bit vector to a UInt8 *)
let rec to_uint8
(#n: nat { n <= 8 })
(x: BV.bv_t n)
: Tot (y: U8.t { U8.v y < pow2 n })
= if n = 0
then 0uy
else
let hi = to_uin... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Int.fsti.checked",
"LowParse.Spec.Combinators.fsti.checked",
"LowParse.Spec.BoundedInt.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Nativ... | [
{
"abbrev": false,
"full_module": "LowParse.Spec.Int",
"short_module": null
},
{
"abbrev": false,
"full_module": "LowParse.Spec.Combinators",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"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 | LowParse.Spec.Base.parser LowParse.Spec.BitVector.parse_bv8_kind (FStar.BitVector.bv_t 8) | Prims.Tot | [
"total"
] | [] | [
"LowParse.Spec.Combinators.parse_synth",
"LowParse.Spec.Int.parse_u8_kind",
"FStar.UInt8.t",
"FStar.BitVector.bv_t",
"LowParse.Spec.Int.parse_u8",
"LowParse.Spec.BitVector.synth_bv8"
] | [] | false | false | false | false | false | let parse_bv8:parser parse_bv8_kind (BV.bv_t 8) =
| parse_u8 `parse_synth` synth_bv8 | false |
LowParse.Spec.BitVector.fst | LowParse.Spec.BitVector.serialize_bv8 | val serialize_bv8:serializer parse_bv8 | val serialize_bv8:serializer parse_bv8 | let serialize_bv8 : serializer parse_bv8 =
serialize_synth
parse_u8
synth_bv8
serialize_u8
synth_bv8_recip
() | {
"file_name": "src/lowparse/LowParse.Spec.BitVector.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 6,
"end_line": 98,
"start_col": 0,
"start_line": 92
} | module LowParse.Spec.BitVector
open FStar.Mul
module BV = FStar.BitVector
module U8 = FStar.UInt8
module Seq = FStar.Seq
(* Big-endian conversion of a bit vector to a UInt8 *)
let rec to_uint8
(#n: nat { n <= 8 })
(x: BV.bv_t n)
: Tot (y: U8.t { U8.v y < pow2 n })
= if n = 0
then 0uy
else
let hi = to_uin... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Int.fsti.checked",
"LowParse.Spec.Combinators.fsti.checked",
"LowParse.Spec.BoundedInt.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Nativ... | [
{
"abbrev": false,
"full_module": "LowParse.Spec.Int",
"short_module": null
},
{
"abbrev": false,
"full_module": "LowParse.Spec.Combinators",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"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 | LowParse.Spec.Base.serializer LowParse.Spec.BitVector.parse_bv8 | Prims.Tot | [
"total"
] | [] | [
"LowParse.Spec.Combinators.serialize_synth",
"LowParse.Spec.Int.parse_u8_kind",
"FStar.UInt8.t",
"FStar.BitVector.bv_t",
"LowParse.Spec.Int.parse_u8",
"LowParse.Spec.BitVector.synth_bv8",
"LowParse.Spec.Int.serialize_u8",
"LowParse.Spec.BitVector.synth_bv8_recip"
] | [] | false | false | false | false | false | let serialize_bv8:serializer parse_bv8 =
| serialize_synth parse_u8 synth_bv8 serialize_u8 synth_bv8_recip () | false |
LowParse.Spec.BitVector.fst | LowParse.Spec.BitVector.parse_bounded_bv_kind | val parse_bounded_bv_kind (min: nat) (max: nat{min <= max}) (hk: parser_kind) : Tot parser_kind | val parse_bounded_bv_kind (min: nat) (max: nat{min <= max}) (hk: parser_kind) : Tot parser_kind | let parse_bounded_bv_kind
(min: nat)
(max: nat { min <= max })
(hk: parser_kind)
: Tot parser_kind
= hk `and_then_kind` parse_bounded_bv_payload_kind min max | {
"file_name": "src/lowparse/LowParse.Spec.BitVector.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 58,
"end_line": 285,
"start_col": 0,
"start_line": 280
} | module LowParse.Spec.BitVector
open FStar.Mul
module BV = FStar.BitVector
module U8 = FStar.UInt8
module Seq = FStar.Seq
(* Big-endian conversion of a bit vector to a UInt8 *)
let rec to_uint8
(#n: nat { n <= 8 })
(x: BV.bv_t n)
: Tot (y: U8.t { U8.v y < pow2 n })
= if n = 0
then 0uy
else
let hi = to_uin... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Int.fsti.checked",
"LowParse.Spec.Combinators.fsti.checked",
"LowParse.Spec.BoundedInt.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Nativ... | [
{
"abbrev": false,
"full_module": "LowParse.Spec.BoundedInt",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": false,
"full_module": "LowParse.Spec.Int",
"short_module": null
},
{
"abbrev": false,
"f... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | min: Prims.nat -> max: Prims.nat{min <= max} -> hk: LowParse.Spec.Base.parser_kind
-> LowParse.Spec.Base.parser_kind | Prims.Tot | [
"total"
] | [] | [
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"LowParse.Spec.Base.parser_kind",
"LowParse.Spec.Combinators.and_then_kind",
"LowParse.Spec.BitVector.parse_bounded_bv_payload_kind"
] | [] | false | false | false | false | false | let parse_bounded_bv_kind (min: nat) (max: nat{min <= max}) (hk: parser_kind) : Tot parser_kind =
| hk `and_then_kind` (parse_bounded_bv_payload_kind min max) | false |
LowParse.Spec.BitVector.fst | LowParse.Spec.BitVector.parse_byte_bv_kind' | val parse_byte_bv_kind' (n: nat) : Tot parser_kind | val parse_byte_bv_kind' (n: nat) : Tot parser_kind | let rec parse_byte_bv_kind' (n: nat) : Tot parser_kind =
if n = 0
then parse_ret_kind
else parse_bv8_kind `and_then_kind` parse_byte_bv_kind' (n - 1) | {
"file_name": "src/lowparse/LowParse.Spec.BitVector.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 65,
"end_line": 129,
"start_col": 0,
"start_line": 126
} | module LowParse.Spec.BitVector
open FStar.Mul
module BV = FStar.BitVector
module U8 = FStar.UInt8
module Seq = FStar.Seq
(* Big-endian conversion of a bit vector to a UInt8 *)
let rec to_uint8
(#n: nat { n <= 8 })
(x: BV.bv_t n)
: Tot (y: U8.t { U8.v y < pow2 n })
= if n = 0
then 0uy
else
let hi = to_uin... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Int.fsti.checked",
"LowParse.Spec.Combinators.fsti.checked",
"LowParse.Spec.BoundedInt.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Nativ... | [
{
"abbrev": false,
"full_module": "LowParse.Spec.Int",
"short_module": null
},
{
"abbrev": false,
"full_module": "LowParse.Spec.Combinators",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"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 | n: Prims.nat -> LowParse.Spec.Base.parser_kind | Prims.Tot | [
"total"
] | [] | [
"Prims.nat",
"Prims.op_Equality",
"Prims.int",
"LowParse.Spec.Combinators.parse_ret_kind",
"Prims.bool",
"LowParse.Spec.Combinators.and_then_kind",
"LowParse.Spec.BitVector.parse_bv8_kind",
"LowParse.Spec.BitVector.parse_byte_bv_kind'",
"Prims.op_Subtraction",
"LowParse.Spec.Base.parser_kind"
] | [
"recursion"
] | false | false | false | true | false | let rec parse_byte_bv_kind' (n: nat) : Tot parser_kind =
| if n = 0 then parse_ret_kind else parse_bv8_kind `and_then_kind` (parse_byte_bv_kind' (n - 1)) | false |
LowParse.Spec.BitVector.fst | LowParse.Spec.BitVector.synth_byte_bv_inverse | val synth_byte_bv_inverse (n: nat)
: Lemma (synth_inverse (synth_byte_bv n) (synth_byte_bv_recip n))
[SMTPat (synth_inverse (synth_byte_bv n) (synth_byte_bv_recip n))] | val synth_byte_bv_inverse (n: nat)
: Lemma (synth_inverse (synth_byte_bv n) (synth_byte_bv_recip n))
[SMTPat (synth_inverse (synth_byte_bv n) (synth_byte_bv_recip n))] | let synth_byte_bv_inverse (n: nat) : Lemma
(synth_inverse (synth_byte_bv n) (synth_byte_bv_recip n))
[SMTPat (synth_inverse (synth_byte_bv n) (synth_byte_bv_recip n))]
= synth_inverse_intro' (synth_byte_bv n) (synth_byte_bv_recip n) (fun x ->
assert (synth_byte_bv n (synth_byte_bv_recip n x) `Seq.equal` x)
) | {
"file_name": "src/lowparse/LowParse.Spec.BitVector.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 3,
"end_line": 124,
"start_col": 0,
"start_line": 119
} | module LowParse.Spec.BitVector
open FStar.Mul
module BV = FStar.BitVector
module U8 = FStar.UInt8
module Seq = FStar.Seq
(* Big-endian conversion of a bit vector to a UInt8 *)
let rec to_uint8
(#n: nat { n <= 8 })
(x: BV.bv_t n)
: Tot (y: U8.t { U8.v y < pow2 n })
= if n = 0
then 0uy
else
let hi = to_uin... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Int.fsti.checked",
"LowParse.Spec.Combinators.fsti.checked",
"LowParse.Spec.BoundedInt.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Nativ... | [
{
"abbrev": false,
"full_module": "LowParse.Spec.Int",
"short_module": null
},
{
"abbrev": false,
"full_module": "LowParse.Spec.Combinators",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"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 | n: Prims.nat
-> FStar.Pervasives.Lemma
(ensures
LowParse.Spec.Combinators.synth_inverse (LowParse.Spec.BitVector.synth_byte_bv n)
(LowParse.Spec.BitVector.synth_byte_bv_recip n))
[
SMTPat (LowParse.Spec.Combinators.synth_inverse (LowParse.Spec.BitVector.synth_byte_bv n)
... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.nat",
"LowParse.Spec.Combinators.synth_inverse_intro'",
"FStar.Pervasives.Native.tuple2",
"FStar.BitVector.bv_t",
"FStar.Mul.op_Star",
"FStar.Seq.Base.seq",
"Prims.bool",
"Prims.b2t",
"Prims.op_Equality",
"FStar.Seq.Base.length",
"Prims.op_Addition",
"LowParse.Spec.BitVector.synth_byte_... | [] | false | false | true | false | false | let synth_byte_bv_inverse (n: nat)
: Lemma (synth_inverse (synth_byte_bv n) (synth_byte_bv_recip n))
[SMTPat (synth_inverse (synth_byte_bv n) (synth_byte_bv_recip n))] =
| synth_inverse_intro' (synth_byte_bv n)
(synth_byte_bv_recip n)
(fun x -> assert ((synth_byte_bv n (synth_byte_bv_recip n x)) `Seq.equal` x)) | false |
LowParse.Spec.BitVector.fst | LowParse.Spec.BitVector.parse_byte_bv_kind_eq | val parse_byte_bv_kind_eq (n: nat) : Lemma (parse_byte_bv_kind n == parse_byte_bv_kind' n) | val parse_byte_bv_kind_eq (n: nat) : Lemma (parse_byte_bv_kind n == parse_byte_bv_kind' n) | let rec parse_byte_bv_kind_eq (n: nat) : Lemma
(parse_byte_bv_kind n == parse_byte_bv_kind' n)
= if n = 0
then ()
else parse_byte_bv_kind_eq (n - 1) | {
"file_name": "src/lowparse/LowParse.Spec.BitVector.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 36,
"end_line": 138,
"start_col": 0,
"start_line": 134
} | module LowParse.Spec.BitVector
open FStar.Mul
module BV = FStar.BitVector
module U8 = FStar.UInt8
module Seq = FStar.Seq
(* Big-endian conversion of a bit vector to a UInt8 *)
let rec to_uint8
(#n: nat { n <= 8 })
(x: BV.bv_t n)
: Tot (y: U8.t { U8.v y < pow2 n })
= if n = 0
then 0uy
else
let hi = to_uin... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Int.fsti.checked",
"LowParse.Spec.Combinators.fsti.checked",
"LowParse.Spec.BoundedInt.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Nativ... | [
{
"abbrev": false,
"full_module": "LowParse.Spec.Int",
"short_module": null
},
{
"abbrev": false,
"full_module": "LowParse.Spec.Combinators",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"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 | n: Prims.nat
-> FStar.Pervasives.Lemma
(ensures
LowParse.Spec.BitVector.parse_byte_bv_kind n == LowParse.Spec.BitVector.parse_byte_bv_kind' n) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.nat",
"Prims.op_Equality",
"Prims.int",
"Prims.bool",
"LowParse.Spec.BitVector.parse_byte_bv_kind_eq",
"Prims.op_Subtraction",
"Prims.unit",
"Prims.l_True",
"Prims.squash",
"Prims.eq2",
"LowParse.Spec.Base.parser_kind",
"LowParse.Spec.BitVector.parse_byte_bv_kind",
"LowParse.Spec.BitV... | [
"recursion"
] | false | false | true | false | false | let rec parse_byte_bv_kind_eq (n: nat) : Lemma (parse_byte_bv_kind n == parse_byte_bv_kind' n) =
| if n = 0 then () else parse_byte_bv_kind_eq (n - 1) | false |
LowParse.Spec.BitVector.fst | LowParse.Spec.BitVector.synth_bv8_injective | val synth_bv8_injective:squash (synth_injective synth_bv8) | val synth_bv8_injective:squash (synth_injective synth_bv8) | let synth_bv8_injective : squash (synth_injective synth_bv8) =
synth_inverse_intro' synth_bv8_recip synth_bv8 (fun x ->
to_uint8_of_uint8 8 x
) | {
"file_name": "src/lowparse/LowParse.Spec.BitVector.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 3,
"end_line": 80,
"start_col": 0,
"start_line": 77
} | module LowParse.Spec.BitVector
open FStar.Mul
module BV = FStar.BitVector
module U8 = FStar.UInt8
module Seq = FStar.Seq
(* Big-endian conversion of a bit vector to a UInt8 *)
let rec to_uint8
(#n: nat { n <= 8 })
(x: BV.bv_t n)
: Tot (y: U8.t { U8.v y < pow2 n })
= if n = 0
then 0uy
else
let hi = to_uin... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Int.fsti.checked",
"LowParse.Spec.Combinators.fsti.checked",
"LowParse.Spec.BoundedInt.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Nativ... | [
{
"abbrev": false,
"full_module": "LowParse.Spec.Int",
"short_module": null
},
{
"abbrev": false,
"full_module": "LowParse.Spec.Combinators",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"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 | Prims.squash (LowParse.Spec.Combinators.synth_injective LowParse.Spec.BitVector.synth_bv8) | Prims.Tot | [
"total"
] | [] | [
"LowParse.Spec.Combinators.synth_inverse_intro'",
"FStar.BitVector.bv_t",
"FStar.UInt8.t",
"Prims.b2t",
"Prims.op_LessThan",
"FStar.UInt8.v",
"Prims.pow2",
"LowParse.Spec.BitVector.synth_bv8_recip",
"LowParse.Spec.BitVector.synth_bv8",
"LowParse.Spec.BitVector.to_uint8_of_uint8",
"Prims.unit"
] | [] | false | false | true | false | false | let synth_bv8_injective:squash (synth_injective synth_bv8) =
| synth_inverse_intro' synth_bv8_recip synth_bv8 (fun x -> to_uint8_of_uint8 8 x) | false |
LowParse.Spec.BitVector.fst | LowParse.Spec.BitVector.synth_byte_bv_recip | val synth_byte_bv_recip (n: nat) (x: BV.bv_t (8 * (1 + n))) : Tot (BV.bv_t 8 & BV.bv_t (8 * n)) | val synth_byte_bv_recip (n: nat) (x: BV.bv_t (8 * (1 + n))) : Tot (BV.bv_t 8 & BV.bv_t (8 * n)) | let synth_byte_bv_recip (n: nat) (x: BV.bv_t (8 * (1 + n))) : Tot (BV.bv_t 8 & BV.bv_t (8 * n)) =
Seq.slice x 0 8, Seq.slice x 8 (Seq.length x) | {
"file_name": "src/lowparse/LowParse.Spec.BitVector.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 47,
"end_line": 107,
"start_col": 0,
"start_line": 106
} | module LowParse.Spec.BitVector
open FStar.Mul
module BV = FStar.BitVector
module U8 = FStar.UInt8
module Seq = FStar.Seq
(* Big-endian conversion of a bit vector to a UInt8 *)
let rec to_uint8
(#n: nat { n <= 8 })
(x: BV.bv_t n)
: Tot (y: U8.t { U8.v y < pow2 n })
= if n = 0
then 0uy
else
let hi = to_uin... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Int.fsti.checked",
"LowParse.Spec.Combinators.fsti.checked",
"LowParse.Spec.BoundedInt.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Nativ... | [
{
"abbrev": false,
"full_module": "LowParse.Spec.Int",
"short_module": null
},
{
"abbrev": false,
"full_module": "LowParse.Spec.Combinators",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"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 | n: Prims.nat -> x: FStar.BitVector.bv_t (8 * (1 + n))
-> FStar.BitVector.bv_t 8 * FStar.BitVector.bv_t (8 * n) | Prims.Tot | [
"total"
] | [] | [
"Prims.nat",
"FStar.BitVector.bv_t",
"FStar.Mul.op_Star",
"Prims.op_Addition",
"FStar.Pervasives.Native.Mktuple2",
"FStar.Seq.Base.slice",
"Prims.bool",
"FStar.Seq.Base.length",
"FStar.Pervasives.Native.tuple2"
] | [] | false | false | false | false | false | let synth_byte_bv_recip (n: nat) (x: BV.bv_t (8 * (1 + n))) : Tot (BV.bv_t 8 & BV.bv_t (8 * n)) =
| Seq.slice x 0 8, Seq.slice x 8 (Seq.length x) | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.