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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Sec2.HIFC.fst | Sec2.HIFC.triple | val triple : Type0 | let triple = label & label & flows | {
"file_name": "examples/layeredeffects/Sec2.HIFC.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 34,
"end_line": 439,
"start_col": 0,
"start_line": 439
} | module Sec2.HIFC
open FStar.List.Tot
open FStar.Map
let loc = int
type store = m:Map.t loc int{forall l. contains m l}
let upd (s:store) (l:loc) (x:int) : store = Map.upd s l x
let sel (s:store) (l:loc) : int = Map.sel s l
open FStar.Set
(*** A basic Hoare state monad ***)
let pre = store -> Type0
let post a = store -... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Set.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.Map.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.Classical.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "FStar.Set",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Map",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.Tot",
"short_module": null
},
{
"abbrev": false,
"full_module": "Sec2",
... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | Type0 | Prims.Tot | [
"total"
] | [] | [
"FStar.Pervasives.Native.tuple3",
"Sec2.HIFC.label",
"Sec2.HIFC.flows"
] | [] | false | false | false | true | true | let triple =
| label & label & flows | false | |
Hacl.FFDHE.fst | Hacl.FFDHE.ffdhe_shared_secret | val ffdhe_shared_secret: a:S.ffdhe_alg ->
DH.ffdhe_shared_secret_st t_limbs a (DH.ffdhe_len a) (ke a) | val ffdhe_shared_secret: a:S.ffdhe_alg ->
DH.ffdhe_shared_secret_st t_limbs a (DH.ffdhe_len a) (ke a) | let ffdhe_shared_secret a sk pk ss =
let len = DH.ffdhe_len a in
DH.ffdhe_shared_secret a len (ke a) (ffdhe_shared_secret_precomp a) (ffdhe_precomp_p a) sk pk ss | {
"file_name": "code/ffdhe/Hacl.FFDHE.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 98,
"end_line": 69,
"start_col": 0,
"start_line": 67
} | module Hacl.FFDHE
open Lib.IntTypes
module S = Spec.FFDHE
module DH = Hacl.Impl.FFDHE
module BD = Hacl.Bignum.Definitions
module BE = Hacl.Bignum.Exponentiation
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
inline_for_extraction noextract
let t_limbs = U64
inline_for_extraction noextract
let ke (a:S.ffdhe_alg) =... | {
"checked_file": "/",
"dependencies": [
"Spec.FFDHE.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Impl.FFDHE.fst.checked",
"Hacl.Bignum.Exponentiation.fsti.checked",
"Hacl.Bignum.Definitions.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": f... | [
{
"abbrev": true,
"full_module": "Hacl.Bignum.Exponentiation",
"short_module": "BE"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Definitions",
"short_module": "BD"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.FFDHE",
"short_module": "DH"
},
{
"abbrev": true,... | {
"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: Spec.FFDHE.ffdhe_alg
-> Hacl.Impl.FFDHE.ffdhe_shared_secret_st Hacl.FFDHE.t_limbs
a
(Hacl.Impl.FFDHE.ffdhe_len a)
(Hacl.FFDHE.ke a) | Prims.Tot | [
"total"
] | [] | [
"Spec.FFDHE.ffdhe_alg",
"Lib.Buffer.lbuffer",
"Lib.IntTypes.uint8",
"Hacl.Impl.FFDHE.ffdhe_len",
"Hacl.Impl.FFDHE.ffdhe_shared_secret",
"Hacl.FFDHE.t_limbs",
"Hacl.FFDHE.ke",
"Hacl.FFDHE.ffdhe_shared_secret_precomp",
"Hacl.FFDHE.ffdhe_precomp_p",
"Hacl.Bignum.Definitions.limb",
"Hacl.Impl.FFDHE.... | [] | false | false | false | false | false | let ffdhe_shared_secret a sk pk ss =
| let len = DH.ffdhe_len a in
DH.ffdhe_shared_secret a len (ke a) (ffdhe_shared_secret_precomp a) (ffdhe_precomp_p a) sk pk ss | false |
Sec2.HIFC.fst | Sec2.HIFC.unit_triple | val unit_triple : (Sec2.HIFC.label * Sec2.HIFC.label) * Prims.list _ | let unit_triple = bot, bot, [] | {
"file_name": "examples/layeredeffects/Sec2.HIFC.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 30,
"end_line": 440,
"start_col": 0,
"start_line": 440
} | module Sec2.HIFC
open FStar.List.Tot
open FStar.Map
let loc = int
type store = m:Map.t loc int{forall l. contains m l}
let upd (s:store) (l:loc) (x:int) : store = Map.upd s l x
let sel (s:store) (l:loc) : int = Map.sel s l
open FStar.Set
(*** A basic Hoare state monad ***)
let pre = store -> Type0
let post a = store -... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Set.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.Map.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.Classical.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "FStar.Set",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Map",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.Tot",
"short_module": null
},
{
"abbrev": false,
"full_module": "Sec2",
... | {
"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 | (Sec2.HIFC.label * Sec2.HIFC.label) * Prims.list _ | Prims.Tot | [
"total"
] | [] | [
"FStar.Pervasives.Native.Mktuple3",
"Sec2.HIFC.label",
"Prims.list",
"Sec2.HIFC.bot",
"Prims.Nil",
"FStar.Pervasives.Native.tuple3"
] | [] | false | false | false | true | false | let unit_triple =
| bot, bot, [] | false | |
Sec2.HIFC.fst | Sec2.HIFC.ifc_triple | val ifc_triple : _: ((Sec2.HIFC.label * Sec2.HIFC.label) * Prims.list Sec2.HIFC.flow) ->
_: ((Sec2.HIFC.label * Sec2.HIFC.label) * Prims.list Sec2.HIFC.flow)
-> (FStar.Set.set Sec2.HIFC.loc * FStar.Set.set Sec2.HIFC.loc) * Prims.list Sec2.HIFC.flow | let ifc_triple (w0, r0, fs0) (w1, r1, fs1) = (union w0 w1, union r0 r1, (fs0 @ add_source r0 ((bot, w1)::fs1))) | {
"file_name": "examples/layeredeffects/Sec2.HIFC.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 111,
"end_line": 441,
"start_col": 0,
"start_line": 441
} | module Sec2.HIFC
open FStar.List.Tot
open FStar.Map
let loc = int
type store = m:Map.t loc int{forall l. contains m l}
let upd (s:store) (l:loc) (x:int) : store = Map.upd s l x
let sel (s:store) (l:loc) : int = Map.sel s l
open FStar.Set
(*** A basic Hoare state monad ***)
let pre = store -> Type0
let post a = store -... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Set.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.Map.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.Classical.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "FStar.Set",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Map",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.Tot",
"short_module": null
},
{
"abbrev": false,
"full_module": "Sec2",
... | {
"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 |
_: ((Sec2.HIFC.label * Sec2.HIFC.label) * Prims.list Sec2.HIFC.flow) ->
_: ((Sec2.HIFC.label * Sec2.HIFC.label) * Prims.list Sec2.HIFC.flow)
-> (FStar.Set.set Sec2.HIFC.loc * FStar.Set.set Sec2.HIFC.loc) * Prims.list Sec2.HIFC.flow | Prims.Tot | [
"total"
] | [] | [
"FStar.Pervasives.Native.tuple3",
"Sec2.HIFC.label",
"Prims.list",
"Sec2.HIFC.flow",
"FStar.Pervasives.Native.Mktuple2",
"FStar.Pervasives.Native.Mktuple3",
"FStar.Set.set",
"Sec2.HIFC.loc",
"Sec2.HIFC.union",
"FStar.List.Tot.Base.op_At",
"Sec2.HIFC.add_source",
"Prims.Cons",
"Sec2.HIFC.bot"... | [] | false | false | false | true | false | let ifc_triple (w0, r0, fs0) (w1, r1, fs1) =
| (union w0 w1, union r0 r1, (fs0 @ add_source r0 ((bot, w1) :: fs1))) | false | |
Sec2.HIFC.fst | Sec2.HIFC.has_flow_append | val has_flow_append (from to: loc) (fs fs': flows)
: Lemma (has_flow from to fs ==> has_flow from to (fs @ fs') /\ has_flow from to (fs' @ fs)) | val has_flow_append (from to: loc) (fs fs': flows)
: Lemma (has_flow from to fs ==> has_flow from to (fs @ fs') /\ has_flow from to (fs' @ fs)) | let has_flow_append (from to:loc) (fs fs':flows)
: Lemma (has_flow from to fs ==>
has_flow from to (fs @ fs') /\
has_flow from to (fs' @ fs))
= let aux (rs:_)
: Lemma (requires
List.Tot.memP rs fs)
(ensures
List.Tot.memP rs (fs @ fs') /\
... | {
"file_name": "examples/layeredeffects/Sec2.HIFC.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 6,
"end_line": 266,
"start_col": 0,
"start_line": 252
} | module Sec2.HIFC
open FStar.List.Tot
open FStar.Map
let loc = int
type store = m:Map.t loc int{forall l. contains m l}
let upd (s:store) (l:loc) (x:int) : store = Map.upd s l x
let sel (s:store) (l:loc) : int = Map.sel s l
open FStar.Set
(*** A basic Hoare state monad ***)
let pre = store -> Type0
let post a = store -... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Set.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.Map.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.Classical.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "FStar.Set",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Map",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.Tot",
"short_module": null
},
{
"abbrev": false,
"full_module": "Sec2",
... | {
"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 | from: Sec2.HIFC.loc -> to: Sec2.HIFC.loc -> fs: Sec2.HIFC.flows -> fs': Sec2.HIFC.flows
-> FStar.Pervasives.Lemma
(ensures
Sec2.HIFC.has_flow from to fs ==>
Sec2.HIFC.has_flow from to (fs @ fs') /\ Sec2.HIFC.has_flow from to (fs' @ fs)) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Sec2.HIFC.loc",
"Sec2.HIFC.flows",
"Sec2.HIFC.flow",
"Prims.unit",
"FStar.List.Tot.Base.memP",
"Prims.squash",
"Prims.l_and",
"FStar.List.Tot.Base.op_At",
"Prims.Cons",
"FStar.Pervasives.pattern",
"FStar.Pervasives.smt_pat",
"Prims.Nil",
"Sec2.HIFC.memP_append_or",
"Prims.l_True",
"Prim... | [] | false | false | true | false | false | let has_flow_append (from to: loc) (fs fs': flows)
: Lemma (has_flow from to fs ==> has_flow from to (fs @ fs') /\ has_flow from to (fs' @ fs)) =
| let aux (rs: _)
: Lemma (requires List.Tot.memP rs fs)
(ensures List.Tot.memP rs (fs @ fs') /\ List.Tot.memP rs (fs' @ fs))
[SMTPat (List.Tot.memP rs fs)] =
memP_append_or rs fs fs';
memP_append_or rs fs' fs
in
() | false |
Sec2.HIFC.fst | Sec2.HIFC.label_equiv | val label_equiv : s0: Sec2.HIFC.label -> s1: Sec2.HIFC.label -> Type0 | let label_equiv (s0 s1:label) = Set.equal s0 s1 | {
"file_name": "examples/layeredeffects/Sec2.HIFC.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 47,
"end_line": 443,
"start_col": 0,
"start_line": 443
} | module Sec2.HIFC
open FStar.List.Tot
open FStar.Map
let loc = int
type store = m:Map.t loc int{forall l. contains m l}
let upd (s:store) (l:loc) (x:int) : store = Map.upd s l x
let sel (s:store) (l:loc) : int = Map.sel s l
open FStar.Set
(*** A basic Hoare state monad ***)
let pre = store -> Type0
let post a = store -... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Set.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.Map.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.Classical.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "FStar.Set",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Map",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.Tot",
"short_module": null
},
{
"abbrev": false,
"full_module": "Sec2",
... | {
"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 | s0: Sec2.HIFC.label -> s1: Sec2.HIFC.label -> Type0 | Prims.Tot | [
"total"
] | [] | [
"Sec2.HIFC.label",
"FStar.Set.equal",
"Sec2.HIFC.loc"
] | [] | false | false | false | true | true | let label_equiv (s0 s1: label) =
| Set.equal s0 s1 | false | |
Sec2.HIFC.fst | Sec2.HIFC.memP_append_or | val memP_append_or (#a: Type) (x: a) (l0 l1: list a)
: Lemma (ensures (List.Tot.memP x (l0 @ l1) <==> (List.Tot.memP x l0 \/ List.Tot.memP x l1)))
(decreases l0) | val memP_append_or (#a: Type) (x: a) (l0 l1: list a)
: Lemma (ensures (List.Tot.memP x (l0 @ l1) <==> (List.Tot.memP x l0 \/ List.Tot.memP x l1)))
(decreases l0) | let rec memP_append_or (#a:Type) (x:a) (l0 l1:list a)
: Lemma (ensures (List.Tot.memP x (l0 @ l1) <==>
(List.Tot.memP x l0 \/ List.Tot.memP x l1)))
(decreases l0)
= match l0 with
| [] -> ()
| _::tl -> memP_append_or x tl l1 | {
"file_name": "examples/layeredeffects/Sec2.HIFC.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 37,
"end_line": 250,
"start_col": 0,
"start_line": 244
} | module Sec2.HIFC
open FStar.List.Tot
open FStar.Map
let loc = int
type store = m:Map.t loc int{forall l. contains m l}
let upd (s:store) (l:loc) (x:int) : store = Map.upd s l x
let sel (s:store) (l:loc) : int = Map.sel s l
open FStar.Set
(*** A basic Hoare state monad ***)
let pre = store -> Type0
let post a = store -... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Set.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.Map.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.Classical.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "FStar.Set",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Map",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.Tot",
"short_module": null
},
{
"abbrev": false,
"full_module": "Sec2",
... | {
"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 -> l0: Prims.list a -> l1: Prims.list a
-> FStar.Pervasives.Lemma
(ensures
FStar.List.Tot.Base.memP x (l0 @ l1) <==>
FStar.List.Tot.Base.memP x l0 \/ FStar.List.Tot.Base.memP x l1) (decreases l0) | FStar.Pervasives.Lemma | [
"lemma",
""
] | [] | [
"Prims.list",
"Sec2.HIFC.memP_append_or",
"Prims.unit",
"Prims.l_True",
"Prims.squash",
"Prims.l_iff",
"FStar.List.Tot.Base.memP",
"FStar.List.Tot.Base.op_At",
"Prims.l_or",
"Prims.Nil",
"FStar.Pervasives.pattern"
] | [
"recursion"
] | false | false | true | false | false | let rec memP_append_or (#a: Type) (x: a) (l0 l1: list a)
: Lemma (ensures (List.Tot.memP x (l0 @ l1) <==> (List.Tot.memP x l0 \/ List.Tot.memP x l1)))
(decreases l0) =
| match l0 with
| [] -> ()
| _ :: tl -> memP_append_or x tl l1 | false |
Sec2.HIFC.fst | Sec2.HIFC.triple_equiv | val triple_equiv : _: ((Sec2.HIFC.label * Sec2.HIFC.label) * Sec2.HIFC.flows) ->
_: ((Sec2.HIFC.label * Sec2.HIFC.label) * Sec2.HIFC.flows)
-> Prims.logical | let triple_equiv (w0, r0, f0) (w1, r1, f1) = label_equiv w0 w1 /\ label_equiv r0 r1 /\ flows_equiv f0 f1 | {
"file_name": "examples/layeredeffects/Sec2.HIFC.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 104,
"end_line": 444,
"start_col": 0,
"start_line": 444
} | module Sec2.HIFC
open FStar.List.Tot
open FStar.Map
let loc = int
type store = m:Map.t loc int{forall l. contains m l}
let upd (s:store) (l:loc) (x:int) : store = Map.upd s l x
let sel (s:store) (l:loc) : int = Map.sel s l
open FStar.Set
(*** A basic Hoare state monad ***)
let pre = store -> Type0
let post a = store -... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Set.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.Map.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.Classical.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "FStar.Set",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Map",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.Tot",
"short_module": null
},
{
"abbrev": false,
"full_module": "Sec2",
... | {
"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 |
_: ((Sec2.HIFC.label * Sec2.HIFC.label) * Sec2.HIFC.flows) ->
_: ((Sec2.HIFC.label * Sec2.HIFC.label) * Sec2.HIFC.flows)
-> Prims.logical | Prims.Tot | [
"total"
] | [] | [
"FStar.Pervasives.Native.tuple3",
"Sec2.HIFC.label",
"Sec2.HIFC.flows",
"FStar.Pervasives.Native.Mktuple2",
"Prims.l_and",
"Sec2.HIFC.label_equiv",
"Sec2.HIFC.flows_equiv",
"Prims.logical"
] | [] | false | false | false | true | true | let triple_equiv (w0, r0, f0) (w1, r1, f1) =
| label_equiv w0 w1 /\ label_equiv r0 r1 /\ flows_equiv f0 f1 | false | |
ContextPollution.fst | ContextPollution.warmup1 | val warmup1 : x: Prims.bool{x == true} -> Prims.unit | let warmup1 (x:bool { x == true }) = assert x | {
"file_name": "share/steel/tests/ContextPollution.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 45,
"end_line": 12,
"start_col": 0,
"start_line": 12
} | module ContextPollution
let warmup (x:bool { x == true }) = assert x
//SNIPPET_START: context_test1$
module T = FStar.Tactics
module B = LowStar.Buffer
module SA = Steel.Array
open FStar.Seq | {
"checked_file": "/",
"dependencies": [
"Steel.Array.fsti.checked",
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.Tactics.fst.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": false,
"source_file": "ContextPollution.fst"
} | [
{
"abbrev": false,
"full_module": "FStar.Seq",
"short_module": null
},
{
"abbrev": true,
"full_module": "Steel.Array",
"short_module": "SA"
},
{
"abbrev": true,
"full_module": "LowStar.Buffer",
"short_module": "B"
},
{
"abbrev": true,
"full_module": "FStar.Tac... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | x: Prims.bool{x == true} -> Prims.unit | Prims.Tot | [
"total"
] | [] | [
"Prims.bool",
"Prims.eq2",
"Prims._assert",
"Prims.b2t",
"Prims.unit"
] | [] | false | false | false | false | false | let warmup1 (x: bool{x == true}) =
| assert x | false | |
Sec2.HIFC.fst | Sec2.HIFC.add_source_monotonic | val add_source_monotonic (from to: loc) (r: label) (fs: flows)
: Lemma (has_flow from to fs ==> has_flow from to (add_source r fs)) | val add_source_monotonic (from to: loc) (r: label) (fs: flows)
: Lemma (has_flow from to fs ==> has_flow from to (add_source r fs)) | let rec add_source_monotonic (from to:loc) (r:label) (fs:flows)
: Lemma (has_flow from to fs ==> has_flow from to (add_source r fs))
= match fs with
| [] -> ()
| _::tl -> add_source_monotonic from to r tl | {
"file_name": "examples/layeredeffects/Sec2.HIFC.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 48,
"end_line": 290,
"start_col": 0,
"start_line": 286
} | module Sec2.HIFC
open FStar.List.Tot
open FStar.Map
let loc = int
type store = m:Map.t loc int{forall l. contains m l}
let upd (s:store) (l:loc) (x:int) : store = Map.upd s l x
let sel (s:store) (l:loc) : int = Map.sel s l
open FStar.Set
(*** A basic Hoare state monad ***)
let pre = store -> Type0
let post a = store -... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Set.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.Map.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.Classical.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "FStar.Set",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Map",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.Tot",
"short_module": null
},
{
"abbrev": false,
"full_module": "Sec2",
... | {
"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 | from: Sec2.HIFC.loc -> to: Sec2.HIFC.loc -> r: Sec2.HIFC.label -> fs: Sec2.HIFC.flows
-> FStar.Pervasives.Lemma
(ensures
Sec2.HIFC.has_flow from to fs ==> Sec2.HIFC.has_flow from to (Sec2.HIFC.add_source r fs)) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Sec2.HIFC.loc",
"Sec2.HIFC.label",
"Sec2.HIFC.flows",
"Sec2.HIFC.flow",
"Prims.list",
"Sec2.HIFC.add_source_monotonic",
"Prims.unit",
"Prims.l_True",
"Prims.squash",
"Prims.l_imp",
"Sec2.HIFC.has_flow",
"Sec2.HIFC.add_source",
"Prims.Nil",
"FStar.Pervasives.pattern"
] | [
"recursion"
] | false | false | true | false | false | let rec add_source_monotonic (from to: loc) (r: label) (fs: flows)
: Lemma (has_flow from to fs ==> has_flow from to (add_source r fs)) =
| match fs with
| [] -> ()
| _ :: tl -> add_source_monotonic from to r tl | false |
Sec2.HIFC.fst | Sec2.HIFC.elim_has_flow_seq | val elim_has_flow_seq (from to: loc) (r0 r1 w1: label) (fs0 fs1: flows)
: Lemma (requires (~(has_flow from to (fs0 @ add_source r0 ((bot, w1) :: fs1)))))
(ensures
(~(has_flow from to fs0) /\ (~(Set.mem from r0) \/ ~(Set.mem to w1)) /\
~(has_flow from to (add_source r0 fs1)))) | val elim_has_flow_seq (from to: loc) (r0 r1 w1: label) (fs0 fs1: flows)
: Lemma (requires (~(has_flow from to (fs0 @ add_source r0 ((bot, w1) :: fs1)))))
(ensures
(~(has_flow from to fs0) /\ (~(Set.mem from r0) \/ ~(Set.mem to w1)) /\
~(has_flow from to (add_source r0 fs1)))) | let elim_has_flow_seq (from to:loc)
(r0 r1 w1:label)
(fs0 fs1:flows)
: Lemma (requires (~(has_flow from to (fs0 @ add_source r0 ((bot, w1)::fs1)))))
(ensures (~(has_flow from to fs0) /\
(~(Set.mem from r0) \/ ~(Set.mem to w1)) /\
... | {
"file_name": "examples/layeredeffects/Sec2.HIFC.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 58,
"end_line": 284,
"start_col": 0,
"start_line": 268
} | module Sec2.HIFC
open FStar.List.Tot
open FStar.Map
let loc = int
type store = m:Map.t loc int{forall l. contains m l}
let upd (s:store) (l:loc) (x:int) : store = Map.upd s l x
let sel (s:store) (l:loc) : int = Map.sel s l
open FStar.Set
(*** A basic Hoare state monad ***)
let pre = store -> Type0
let post a = store -... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Set.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.Map.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.Classical.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "FStar.Set",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Map",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.Tot",
"short_module": null
},
{
"abbrev": false,
"full_module": "Sec2",
... | {
"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 |
from: Sec2.HIFC.loc ->
to: Sec2.HIFC.loc ->
r0: Sec2.HIFC.label ->
r1: Sec2.HIFC.label ->
w1: Sec2.HIFC.label ->
fs0: Sec2.HIFC.flows ->
fs1: Sec2.HIFC.flows
-> FStar.Pervasives.Lemma
(requires
~(Sec2.HIFC.has_flow from to (fs0 @ Sec2.HIFC.add_source r0 ((Sec2.HIFC.bot, w1) ... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Sec2.HIFC.loc",
"Sec2.HIFC.label",
"Sec2.HIFC.flows",
"Sec2.HIFC.has_flow_append",
"Prims.Cons",
"Sec2.HIFC.flow",
"FStar.Pervasives.Native.Mktuple2",
"Prims.Nil",
"Sec2.HIFC.add_source",
"Prims.unit",
"Prims._assert",
"Prims.eq2",
"Prims.list",
"FStar.List.Tot.Base.op_At",
"Prims.l_not... | [] | true | false | true | false | false | let elim_has_flow_seq (from to: loc) (r0 r1 w1: label) (fs0 fs1: flows)
: Lemma (requires (~(has_flow from to (fs0 @ add_source r0 ((bot, w1) :: fs1)))))
(ensures
(~(has_flow from to fs0) /\ (~(Set.mem from r0) \/ ~(Set.mem to w1)) /\
~(has_flow from to (add_source r0 fs1)))) =
| assert (add_source r0 ((bot, w1) :: fs1) == (Set.union r0 bot, w1) :: add_source r0 fs1);
assert ((Set.union r0 bot) `Set.equal` r0);
has_flow_append from to fs0 ((r0, w1) :: add_source r0 fs1);
assert (~(has_flow from to fs0));
has_flow_append from to ((r0, w1) :: add_source r0 fs1) fs0;
assert (~(has_flow from to (((... | false |
Sec2.HIFC.fst | Sec2.HIFC.pre_bind | val pre_bind
(a b: Type)
(w0 r0 w1 r1: label)
(fs0 fs1: flows)
(#p #q #r #s: _)
(x: hifc a r0 w0 fs0 p q)
(y: (x: a -> hifc b r1 w1 fs1 (r x) (s x)))
: hifc b
(union r0 r1)
(union w0 w1)
(fs0 @ add_source r0 ((bot, w1) :: fs1))
(fun s0 -> p s0 /\ (forall x... | val pre_bind
(a b: Type)
(w0 r0 w1 r1: label)
(fs0 fs1: flows)
(#p #q #r #s: _)
(x: hifc a r0 w0 fs0 p q)
(y: (x: a -> hifc b r1 w1 fs1 (r x) (s x)))
: hifc b
(union r0 r1)
(union w0 w1)
(fs0 @ add_source r0 ((bot, w1) :: fs1))
(fun s0 -> p s0 /\ (forall x... | let pre_bind (a b:Type)
(w0 r0 w1 r1:label) (fs0 fs1:flows)
#p #q #r #s
(x:hifc a r0 w0 fs0 p q)
(y: (x:a -> hifc b r1 w1 fs1 (r x) (s x)))
: hifc b (union r0 r1) (union w0 w1) (fs0 @ add_source r0 ((bot, w1)::fs1))
(fun s0 -> p s0 /\ (forall x s1. q s0 x s1 ==> r x s1))
... | {
"file_name": "examples/layeredeffects/Sec2.HIFC.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 5,
"end_line": 433,
"start_col": 0,
"start_line": 421
} | module Sec2.HIFC
open FStar.List.Tot
open FStar.Map
let loc = int
type store = m:Map.t loc int{forall l. contains m l}
let upd (s:store) (l:loc) (x:int) : store = Map.upd s l x
let sel (s:store) (l:loc) : int = Map.sel s l
open FStar.Set
(*** A basic Hoare state monad ***)
let pre = store -> Type0
let post a = store -... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Set.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.Map.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.Classical.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "FStar.Set",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Map",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.Tot",
"short_module": null
},
{
"abbrev": false,
"full_module": "Sec2",
... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
a: Type ->
b: Type ->
w0: Sec2.HIFC.label ->
r0: Sec2.HIFC.label ->
w1: Sec2.HIFC.label ->
r1: Sec2.HIFC.label ->
fs0: Sec2.HIFC.flows ->
fs1: Sec2.HIFC.flows ->
x: Sec2.HIFC.hifc a r0 w0 fs0 p q ->
y: (x: a -> Sec2.HIFC.hifc b r1 w1 fs1 (r x) (s x))
-> Sec2.HIFC.hifc b
... | Prims.Tot | [
"total"
] | [] | [
"Sec2.HIFC.label",
"Sec2.HIFC.flows",
"Sec2.HIFC.pre",
"Sec2.HIFC.post",
"Sec2.HIFC.hifc",
"Prims.unit",
"Sec2.HIFC.bind_ifc_flows_ok",
"Sec2.HIFC.bind_ifc_writes_ok",
"Sec2.HIFC.bind_ifc_reads_ok",
"Sec2.HIFC.hst",
"Sec2.HIFC.store",
"Prims.l_and",
"Prims.l_Forall",
"Prims.l_imp",
"Prim... | [] | false | false | false | false | false | let pre_bind
(a: Type)
(b: Type)
(w0: label)
(r0: label)
(w1: label)
(r1: label)
(fs0: flows)
(fs1: flows)
#p
#q
#r
#s
(x: hifc a r0 w0 fs0 p q)
(y: (x: a -> hifc b r1 w1 fs1 (r x) (s x)))
: hifc b
(union r0 r1)
(union w... | let f = bind_ifc' x y in
bind_ifc_reads_ok x y;
bind_ifc_writes_ok x y;
bind_ifc_flows_ok x y;
f | false |
Sec2.HIFC.fst | Sec2.HIFC.bind_ifc_reads_ok | val bind_ifc_reads_ok
(#a #b: Type)
(#w0 #r0 #w1 #r1: label)
(#fs0 #fs1: flows)
(#p #q #r #s: _)
(x: hifc a r0 w0 fs0 p q)
(y: (x: a -> hifc b r1 w1 fs1 (r x) (s x)))
: Lemma (reads (bind_ifc' x y) (union r0 r1)) | val bind_ifc_reads_ok
(#a #b: Type)
(#w0 #r0 #w1 #r1: label)
(#fs0 #fs1: flows)
(#p #q #r #s: _)
(x: hifc a r0 w0 fs0 p q)
(y: (x: a -> hifc b r1 w1 fs1 (r x) (s x)))
: Lemma (reads (bind_ifc' x y) (union r0 r1)) | let bind_ifc_reads_ok (#a #b:Type)
(#w0 #r0 #w1 #r1:label)
(#fs0 #fs1:flows)
#p #q #r #s
(x:hifc a r0 w0 fs0 p q)
(y: (x:a -> hifc b r1 w1 fs1 (r x) (s x)))
: Lemma (reads (bind_ifc' x y) (union r0 r1))
= l... | {
"file_name": "examples/layeredeffects/Sec2.HIFC.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 6,
"end_line": 230,
"start_col": 0,
"start_line": 202
} | module Sec2.HIFC
open FStar.List.Tot
open FStar.Map
let loc = int
type store = m:Map.t loc int{forall l. contains m l}
let upd (s:store) (l:loc) (x:int) : store = Map.upd s l x
let sel (s:store) (l:loc) : int = Map.sel s l
open FStar.Set
(*** A basic Hoare state monad ***)
let pre = store -> Type0
let post a = store -... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Set.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.Map.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.Classical.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "FStar.Set",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Map",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.Tot",
"short_module": null
},
{
"abbrev": false,
"full_module": "Sec2",
... | {
"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: Sec2.HIFC.hifc a r0 w0 fs0 p q -> y: (x: a -> Sec2.HIFC.hifc b r1 w1 fs1 (r x) (s x))
-> FStar.Pervasives.Lemma
(ensures Sec2.HIFC.reads (Sec2.HIFC.bind_ifc' x y) (Sec2.HIFC.union r0 r1)) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Sec2.HIFC.label",
"Sec2.HIFC.flows",
"Sec2.HIFC.pre",
"Sec2.HIFC.post",
"Sec2.HIFC.hifc",
"Sec2.HIFC.store",
"Prims.unit",
"Sec2.HIFC.agree_on",
"Prims.squash",
"Sec2.HIFC.related_runs",
"Prims.l_and",
"Prims.l_Forall",
"Prims.l_imp",
"Prims.l_Exists",
"Prims.Cons",
"FStar.Pervasives.... | [] | false | false | true | false | false | let bind_ifc_reads_ok
(#a: Type)
(#b: Type)
(#w0: label)
(#r0: label)
(#w1: label)
(#r1: label)
(#fs0: flows)
(#fs1: flows)
#p
#q
#r
#s
(x: hifc a r0 w0 fs0 p q)
(y: (x: a -> hifc b r1 w1 fs1 (r x) (s x)))
: Lemma (reads (bind_ifc' ... | let f = bind_ifc' x y in
let p_f = (fun s0 -> p s0 /\ (forall x s1. q s0 x s1 ==> r x s1)) in
let reads = union r0 r1 in
let f_reads_ok (s0: store{p_f s0}) (s0': store{p_f s0'})
: Lemma (requires agree_on reads s0 s0')
(ensures related_runs f s0 s0')
[SMTPat (agree_on reads s0 s0')] =
let y1, s1 = x s... | false |
Sec2.HIFC.fst | Sec2.HIFC.bind | val bind
(a b: Type)
(r0 w0: label)
(fs0: flows)
(p: pre)
(q: post a)
(r1 w1: label)
(fs1: flows)
(r: (a -> pre))
(s: (a -> post b))
(x: hifc a r0 w0 fs0 p q)
(y: (x: a -> hifc b r1 w1 fs1 (r x) (s x)))
: hifc b
(union r0 r1)
(union w0 w1... | val bind
(a b: Type)
(r0 w0: label)
(fs0: flows)
(p: pre)
(q: post a)
(r1 w1: label)
(fs1: flows)
(r: (a -> pre))
(s: (a -> post b))
(x: hifc a r0 w0 fs0 p q)
(y: (x: a -> hifc b r1 w1 fs1 (r x) (s x)))
: hifc b
(union r0 r1)
(union w0 w1... | let bind (a b:Type)
(r0 w0:label)
(fs0:flows)
(p:pre) (q:post a)
(r1 w1:label) (fs1:flows)
(r:a -> pre) (s:a -> post b)
(x:hifc a r0 w0 fs0 p q)
(y: (x:a -> hifc b r1 w1 fs1 (r x) (s x)))
: hifc b (union r0 r1) (union w0 w1) (fs0 @ add_source r0 ((bot, w1... | {
"file_name": "examples/layeredeffects/Sec2.HIFC.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 79,
"end_line": 582,
"start_col": 0,
"start_line": 571
} | module Sec2.HIFC
open FStar.List.Tot
open FStar.Map
let loc = int
type store = m:Map.t loc int{forall l. contains m l}
let upd (s:store) (l:loc) (x:int) : store = Map.upd s l x
let sel (s:store) (l:loc) : int = Map.sel s l
open FStar.Set
(*** A basic Hoare state monad ***)
let pre = store -> Type0
let post a = store -... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Set.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.Map.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.Classical.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Set",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Map",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
a: Type ->
b: Type ->
r0: Sec2.HIFC.label ->
w0: Sec2.HIFC.label ->
fs0: Sec2.HIFC.flows ->
p: Sec2.HIFC.pre ->
q: Sec2.HIFC.post a ->
r1: Sec2.HIFC.label ->
w1: Sec2.HIFC.label ->
fs1: Sec2.HIFC.flows ->
r: (_: a -> Sec2.HIFC.pre) ->
s: (_: a -> Sec2.HIFC.post b) ->
... | Prims.Tot | [
"total"
] | [] | [
"Sec2.HIFC.label",
"Sec2.HIFC.flows",
"Sec2.HIFC.pre",
"Sec2.HIFC.post",
"Sec2.HIFC.hifc",
"Sec2.HIFC.pre_bind",
"Sec2.HIFC.store",
"Prims.l_and",
"Sec2.HIFC.modifies",
"Sec2.HIFC.frame",
"Sec2.HIFC.union",
"FStar.List.Tot.Base.op_At",
"Sec2.HIFC.flow",
"Sec2.HIFC.add_source",
"Prims.Con... | [] | false | false | false | false | false | let bind
(a b: Type)
(r0 w0: label)
(fs0: flows)
(p: pre)
(q: post a)
(r1 w1: label)
(fs1: flows)
(r: (a -> pre))
(s: (a -> post b))
(x: hifc a r0 w0 fs0 p q)
(y: (x: a -> hifc b r1 w1 fs1 (r x) (s x)))
: hifc b
(union r0 r1)
(union w0 w1... | (pre_bind _ _ _ _ _ _ _ _ (frame _ _ _ _ x) (fun a -> frame _ _ _ _ (y a))) | false |
Hacl.Impl.Frodo.KEM.Decaps.fst | Hacl.Impl.Frodo.KEM.Decaps.crypto_kem_dec_kp_s_cond | val crypto_kem_dec_kp_s_cond:
a:FP.frodo_alg
-> bp_matrix:matrix_t params_nbar (params_n a)
-> bpp_matrix:matrix_t params_nbar (params_n a)
-> c_matrix:matrix_t params_nbar params_nbar
-> cp_matrix:matrix_t params_nbar params_nbar
-> Stack uint16
(requires fun h ->
live h bp_matrix /\ live h bpp... | val crypto_kem_dec_kp_s_cond:
a:FP.frodo_alg
-> bp_matrix:matrix_t params_nbar (params_n a)
-> bpp_matrix:matrix_t params_nbar (params_n a)
-> c_matrix:matrix_t params_nbar params_nbar
-> cp_matrix:matrix_t params_nbar params_nbar
-> Stack uint16
(requires fun h ->
live h bp_matrix /\ live h bpp... | let crypto_kem_dec_kp_s_cond a bp_matrix bpp_matrix c_matrix cp_matrix =
let b1 = matrix_eq bp_matrix bpp_matrix in
let b2 = matrix_eq c_matrix cp_matrix in
b1 &. b2 | {
"file_name": "code/frodo/Hacl.Impl.Frodo.KEM.Decaps.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 10,
"end_line": 166,
"start_col": 0,
"start_line": 163
} | module Hacl.Impl.Frodo.KEM.Decaps
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open LowStar.Buffer
open Lib.IntTypes
open Lib.Buffer
open Hacl.Impl.Matrix
open Hacl.Impl.Frodo.Params
open Hacl.Impl.Frodo.KEM
open Hacl.Impl.Frodo.KEM.Encaps
open Hacl.Impl.Frodo.Encode
open Hacl.Impl.Frodo.Pack
open ... | {
"checked_file": "/",
"dependencies": [
"Spec.Matrix.fst.checked",
"Spec.Frodo.Params.fst.checked",
"Spec.Frodo.KEM.Decaps.fst.checked",
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteBuffer.fsti.checked",
"L... | [
{
"abbrev": true,
"full_module": "Spec.Matrix",
"short_module": "M"
},
{
"abbrev": true,
"full_module": "Spec.Frodo.KEM.Decaps",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.Frodo.KEM.KeyGen",
"short_module": "KG"
},
{
"abbrev": true,
"fu... | {
"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: Spec.Frodo.Params.frodo_alg ->
bp_matrix:
Hacl.Impl.Matrix.matrix_t Hacl.Impl.Frodo.Params.params_nbar
(Hacl.Impl.Frodo.Params.params_n a) ->
bpp_matrix:
Hacl.Impl.Matrix.matrix_t Hacl.Impl.Frodo.Params.params_nbar
(Hacl.Impl.Frodo.Params.params_n a) ->
c_matrix:
Ha... | FStar.HyperStack.ST.Stack | [] | [] | [
"Spec.Frodo.Params.frodo_alg",
"Hacl.Impl.Matrix.matrix_t",
"Hacl.Impl.Frodo.Params.params_nbar",
"Hacl.Impl.Frodo.Params.params_n",
"Lib.IntTypes.op_Amp_Dot",
"Lib.IntTypes.U16",
"Lib.IntTypes.SEC",
"Lib.IntTypes.uint16",
"Lib.IntTypes.int_t",
"Hacl.Impl.Matrix.matrix_eq"
] | [] | false | true | false | false | false | let crypto_kem_dec_kp_s_cond a bp_matrix bpp_matrix c_matrix cp_matrix =
| let b1 = matrix_eq bp_matrix bpp_matrix in
let b2 = matrix_eq c_matrix cp_matrix in
b1 &. b2 | false |
Sec2.HIFC.fst | Sec2.HIFC.bind_ifc_flows_ok | val bind_ifc_flows_ok
(#a #b: Type)
(#w0 #r0 #w1 #r1: label)
(#fs0 #fs1: flows)
(#p #q #r #s: _)
(x: hifc a r0 w0 fs0 p q)
(y: (x: a -> hifc b r1 w1 fs1 (r x) (s x)))
: Lemma (respects (bind_ifc' x y) (fs0 @ add_source r0 ((bot, w1) :: fs1))) | val bind_ifc_flows_ok
(#a #b: Type)
(#w0 #r0 #w1 #r1: label)
(#fs0 #fs1: flows)
(#p #q #r #s: _)
(x: hifc a r0 w0 fs0 p q)
(y: (x: a -> hifc b r1 w1 fs1 (r x) (s x)))
: Lemma (respects (bind_ifc' x y) (fs0 @ add_source r0 ((bot, w1) :: fs1))) | let bind_ifc_flows_ok (#a #b:Type)
(#w0 #r0 #w1 #r1:label)
(#fs0 #fs1:flows)
#p #q #r #s
(x:hifc a r0 w0 fs0 p q)
(y: (x:a -> hifc b r1 w1 fs1 (r x) (s x)))
: Lemma (respects (bind_ifc' x y) (fs0 @ add_s... | {
"file_name": "examples/layeredeffects/Sec2.HIFC.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 6,
"end_line": 417,
"start_col": 0,
"start_line": 393
} | module Sec2.HIFC
open FStar.List.Tot
open FStar.Map
let loc = int
type store = m:Map.t loc int{forall l. contains m l}
let upd (s:store) (l:loc) (x:int) : store = Map.upd s l x
let sel (s:store) (l:loc) : int = Map.sel s l
open FStar.Set
(*** A basic Hoare state monad ***)
let pre = store -> Type0
let post a = store -... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Set.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.Map.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.Classical.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "FStar.Set",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Map",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.Tot",
"short_module": null
},
{
"abbrev": false,
"full_module": "Sec2",
... | {
"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: Sec2.HIFC.hifc a r0 w0 fs0 p q -> y: (x: a -> Sec2.HIFC.hifc b r1 w1 fs1 (r x) (s x))
-> FStar.Pervasives.Lemma
(ensures
Sec2.HIFC.respects (Sec2.HIFC.bind_ifc' x y)
(fs0 @ Sec2.HIFC.add_source r0 ((Sec2.HIFC.bot, w1) :: fs1))) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Sec2.HIFC.label",
"Sec2.HIFC.flows",
"Sec2.HIFC.pre",
"Sec2.HIFC.post",
"Sec2.HIFC.hifc",
"Sec2.HIFC.loc",
"Prims.unit",
"Prims.l_and",
"Prims.b2t",
"Prims.op_disEquality",
"Prims.l_not",
"Sec2.HIFC.has_flow",
"Prims.squash",
"Sec2.HIFC.no_leakage",
"Sec2.HIFC.store",
"Prims.l_Forall"... | [] | false | false | true | false | false | let bind_ifc_flows_ok
(#a: Type)
(#b: Type)
(#w0: label)
(#r0: label)
(#w1: label)
(#r1: label)
(#fs0: flows)
(#fs1: flows)
#p
#q
#r
#s
(x: hifc a r0 w0 fs0 p q)
(y: (x: a -> hifc b r1 w1 fs1 (r x) (s x)))
: Lemma (respects (bind_if... | let f = bind_ifc' x y in
let p_f = (fun s0 -> p s0 /\ (forall x s1. q s0 x s1 ==> r x s1)) in
let flows = (fs0 @ add_source r0 ((bot, w1) :: fs1)) in
let respects_flows_lemma (from to: loc)
: Lemma (requires from <> to /\ ~(has_flow from to flows))
(ensures no_leakage f from to)
[SMTPat (has_flow from t... | false |
Sec2.HIFC.fst | Sec2.HIFC.if_then_else | val if_then_else : a: Type ->
r0: Sec2.HIFC.label ->
w0: Sec2.HIFC.label ->
f0: Sec2.HIFC.flows ->
p0: Sec2.HIFC.pre ->
q0: Sec2.HIFC.post a ->
r1: Sec2.HIFC.label ->
w1: Sec2.HIFC.label ->
f1: Sec2.HIFC.flows ->
p1: Sec2.HIFC.pre ->
q1: Sec2.HIFC.post a ->
c_then: Sec2.HIFC.... | let if_then_else (a:Type) r0 w0 f0 p0 q0
r1 w1 f1
p1 q1
(c_then:hifc a r0 w0 f0 p0 q0)
(c_else:hifc a r1 w1 f1 p1 q1)
(b:bool)
= hifc a (r0 `union` r1) (w0 `union` w1) (f0 @ f1)
... | {
"file_name": "examples/layeredeffects/Sec2.HIFC.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 65,
"end_line": 661,
"start_col": 0,
"start_line": 653
} | module Sec2.HIFC
open FStar.List.Tot
open FStar.Map
let loc = int
type store = m:Map.t loc int{forall l. contains m l}
let upd (s:store) (l:loc) (x:int) : store = Map.upd s l x
let sel (s:store) (l:loc) : int = Map.sel s l
open FStar.Set
(*** A basic Hoare state monad ***)
let pre = store -> Type0
let post a = store -... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Set.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.Map.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.Classical.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Set",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Map",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
a: Type ->
r0: Sec2.HIFC.label ->
w0: Sec2.HIFC.label ->
f0: Sec2.HIFC.flows ->
p0: Sec2.HIFC.pre ->
q0: Sec2.HIFC.post a ->
r1: Sec2.HIFC.label ->
w1: Sec2.HIFC.label ->
f1: Sec2.HIFC.flows ->
p1: Sec2.HIFC.pre ->
q1: Sec2.HIFC.post a ->
c_then: Sec2.HIFC.hifc a r0 w0 f... | Prims.Tot | [
"total"
] | [] | [
"Sec2.HIFC.label",
"Sec2.HIFC.flows",
"Sec2.HIFC.pre",
"Sec2.HIFC.post",
"Sec2.HIFC.hifc",
"Prims.bool",
"Sec2.HIFC.union",
"FStar.List.Tot.Base.op_At",
"Sec2.HIFC.flow",
"Sec2.HIFC.store"
] | [] | false | false | false | false | true | let if_then_else
(a: Type)
r0
w0
f0
p0
q0
r1
w1
f1
p1
q1
(c_then: hifc a r0 w0 f0 p0 q0)
(c_else: hifc a r1 w1 f1 p1 q1)
(b: bool)
=
| hifc a
(r0 `union` r1)
(w0 `union` w1)
(f0 @ f1)
(fun s -> if b then p0 s else p1 s)
(fun s0 x s1 -> if b then q0 s0 x s1 else q1 s0 x s1) | false | |
Sec2.HIFC.fst | Sec2.HIFC.add_source_bot | val add_source_bot (f: flows) : Lemma ((add_source bot f) `flows_equiv` f) | val add_source_bot (f: flows) : Lemma ((add_source bot f) `flows_equiv` f) | let rec add_source_bot (f:flows)
: Lemma (add_source bot f `flows_equiv` f)
= match f with
| [] -> ()
| _::tl -> add_source_bot tl | {
"file_name": "examples/layeredeffects/Sec2.HIFC.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 34,
"end_line": 453,
"start_col": 0,
"start_line": 449
} | module Sec2.HIFC
open FStar.List.Tot
open FStar.Map
let loc = int
type store = m:Map.t loc int{forall l. contains m l}
let upd (s:store) (l:loc) (x:int) : store = Map.upd s l x
let sel (s:store) (l:loc) : int = Map.sel s l
open FStar.Set
(*** A basic Hoare state monad ***)
let pre = store -> Type0
let post a = store -... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Set.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.Map.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.Classical.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "FStar.Set",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Map",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.Tot",
"short_module": null
},
{
"abbrev": false,
"full_module": "Sec2",
... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | f: Sec2.HIFC.flows
-> FStar.Pervasives.Lemma (ensures Sec2.HIFC.flows_equiv (Sec2.HIFC.add_source Sec2.HIFC.bot f) f) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Sec2.HIFC.flows",
"Sec2.HIFC.flow",
"Prims.list",
"Sec2.HIFC.add_source_bot",
"Prims.unit",
"Prims.l_True",
"Prims.squash",
"Sec2.HIFC.flows_equiv",
"Sec2.HIFC.add_source",
"Sec2.HIFC.bot",
"Prims.Nil",
"FStar.Pervasives.pattern"
] | [
"recursion"
] | false | false | true | false | false | let rec add_source_bot (f: flows) : Lemma ((add_source bot f) `flows_equiv` f) =
| match f with
| [] -> ()
| _ :: tl -> add_source_bot tl | false |
Sec2.HIFC.fst | Sec2.HIFC.has_flow_soundness | val has_flow_soundness
(#a #r #w #fs #p #q: _)
(f: hifc a r w fs p q)
(from to: loc)
(s: store{p s})
(k: int{p (upd s from k)})
: Lemma
(requires
(let x, s1 = f s in
let _, s1' = f (upd s from k) in
from <> to /\ sel s1 to <> sel s1' to)) (ensures has_... | val has_flow_soundness
(#a #r #w #fs #p #q: _)
(f: hifc a r w fs p q)
(from to: loc)
(s: store{p s})
(k: int{p (upd s from k)})
: Lemma
(requires
(let x, s1 = f s in
let _, s1' = f (upd s from k) in
from <> to /\ sel s1 to <> sel s1' to)) (ensures has_... | let has_flow_soundness #a #r #w #fs #p #q (f:hifc a r w fs p q)
(from to:loc) (s:store{p s}) (k:int{p (upd s from k)})
: Lemma (requires
(let x, s1 = f s in
let _, s1' = f (upd s from k) in
from <> to /\
sel s1 to <> sel s1' to))
... | {
"file_name": "examples/layeredeffects/Sec2.HIFC.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 8,
"end_line": 308,
"start_col": 0,
"start_line": 293
} | module Sec2.HIFC
open FStar.List.Tot
open FStar.Map
let loc = int
type store = m:Map.t loc int{forall l. contains m l}
let upd (s:store) (l:loc) (x:int) : store = Map.upd s l x
let sel (s:store) (l:loc) : int = Map.sel s l
open FStar.Set
(*** A basic Hoare state monad ***)
let pre = store -> Type0
let post a = store -... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Set.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.Map.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.Classical.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "FStar.Set",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Map",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.Tot",
"short_module": null
},
{
"abbrev": false,
"full_module": "Sec2",
... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
f: Sec2.HIFC.hifc a r w fs p q ->
from: Sec2.HIFC.loc ->
to: Sec2.HIFC.loc ->
s: Sec2.HIFC.store{p s} ->
k: Prims.int{p (Sec2.HIFC.upd s from k)}
-> FStar.Pervasives.Lemma
(requires
(let _ = f s in
(let FStar.Pervasives.Native.Mktuple2 #_ #_ _ s1 = _ in
let _ =... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Sec2.HIFC.label",
"Sec2.HIFC.flows",
"Sec2.HIFC.pre",
"Sec2.HIFC.post",
"Sec2.HIFC.hifc",
"Sec2.HIFC.loc",
"Sec2.HIFC.store",
"Prims.int",
"Sec2.HIFC.upd",
"Prims.unit",
"Prims.l_not",
"Sec2.HIFC.has_flow",
"Prims.squash",
"Prims.l_False",
"Prims.Cons",
"FStar.Pervasives.pattern",
"... | [] | false | false | true | false | false | let has_flow_soundness
#a
#r
#w
#fs
#p
#q
(f: hifc a r w fs p q)
(from: loc)
(to: loc)
(s: store{p s})
(k: int{p (upd s from k)})
: Lemma
(requires
(let x, s1 = f s in
let _, s1' = f (upd s from k) in
from <> to /\ s... | let aux () : Lemma (requires (~(has_flow from to fs))) (ensures False) [SMTPat ()] =
assert (respects f fs);
assert (no_leakage f from to)
in
() | false |
Sec2.HIFC.fst | Sec2.HIFC.flows_equiv_append | val flows_equiv_append (f0 f1 g0 g1: flows)
: Lemma (requires flows_equiv f0 g0 /\ flows_equiv f1 g1)
(ensures flows_equiv (f0 @ f1) (g0 @ g1)) | val flows_equiv_append (f0 f1 g0 g1: flows)
: Lemma (requires flows_equiv f0 g0 /\ flows_equiv f1 g1)
(ensures flows_equiv (f0 @ f1) (g0 @ g1)) | let flows_equiv_append (f0 f1 g0 g1:flows)
: Lemma (requires flows_equiv f0 g0 /\ flows_equiv f1 g1)
(ensures flows_equiv (f0@f1) (g0@g1))
= flows_included_append f0 f1 g0 g1;
flows_included_append g0 g1 f0 f1 | {
"file_name": "examples/layeredeffects/Sec2.HIFC.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 37,
"end_line": 473,
"start_col": 0,
"start_line": 469
} | module Sec2.HIFC
open FStar.List.Tot
open FStar.Map
let loc = int
type store = m:Map.t loc int{forall l. contains m l}
let upd (s:store) (l:loc) (x:int) : store = Map.upd s l x
let sel (s:store) (l:loc) : int = Map.sel s l
open FStar.Set
(*** A basic Hoare state monad ***)
let pre = store -> Type0
let post a = store -... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Set.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.Map.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.Classical.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "FStar.Set",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Map",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.Tot",
"short_module": null
},
{
"abbrev": false,
"full_module": "Sec2",
... | {
"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 | f0: Sec2.HIFC.flows -> f1: Sec2.HIFC.flows -> g0: Sec2.HIFC.flows -> g1: Sec2.HIFC.flows
-> FStar.Pervasives.Lemma (requires Sec2.HIFC.flows_equiv f0 g0 /\ Sec2.HIFC.flows_equiv f1 g1)
(ensures Sec2.HIFC.flows_equiv (f0 @ f1) (g0 @ g1)) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Sec2.HIFC.flows",
"Sec2.HIFC.flows_included_append",
"Prims.unit",
"Prims.l_and",
"Sec2.HIFC.flows_equiv",
"Prims.squash",
"FStar.List.Tot.Base.op_At",
"Sec2.HIFC.flow",
"Prims.Nil",
"FStar.Pervasives.pattern"
] | [] | true | false | true | false | false | let flows_equiv_append (f0 f1 g0 g1: flows)
: Lemma (requires flows_equiv f0 g0 /\ flows_equiv f1 g1)
(ensures flows_equiv (f0 @ f1) (g0 @ g1)) =
| flows_included_append f0 f1 g0 g1;
flows_included_append g0 g1 f0 f1 | false |
Sec2.HIFC.fst | Sec2.HIFC.left_unit | val left_unit : _: ((Sec2.HIFC.label * Sec2.HIFC.label) * Prims.list Sec2.HIFC.flow) -> Prims.unit | let left_unit (w, r, f) =
assert (Set.equal (union bot bot) bot);
add_source_bot f;
assert (ifc_triple unit_triple (w, r, f) `triple_equiv` (w, r, f)) | {
"file_name": "examples/layeredeffects/Sec2.HIFC.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 68,
"end_line": 484,
"start_col": 0,
"start_line": 481
} | module Sec2.HIFC
open FStar.List.Tot
open FStar.Map
let loc = int
type store = m:Map.t loc int{forall l. contains m l}
let upd (s:store) (l:loc) (x:int) : store = Map.upd s l x
let sel (s:store) (l:loc) : int = Map.sel s l
open FStar.Set
(*** A basic Hoare state monad ***)
let pre = store -> Type0
let post a = store -... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Set.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.Map.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.Classical.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "FStar.Set",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Map",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.Tot",
"short_module": null
},
{
"abbrev": false,
"full_module": "Sec2",
... | {
"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 | _: ((Sec2.HIFC.label * Sec2.HIFC.label) * Prims.list Sec2.HIFC.flow) -> Prims.unit | Prims.Tot | [
"total"
] | [] | [
"FStar.Pervasives.Native.tuple3",
"Sec2.HIFC.label",
"Prims.list",
"Sec2.HIFC.flow",
"Prims._assert",
"Sec2.HIFC.triple_equiv",
"Sec2.HIFC.ifc_triple",
"Sec2.HIFC.unit_triple",
"FStar.Pervasives.Native.Mktuple3",
"Sec2.HIFC.flows",
"Prims.unit",
"Sec2.HIFC.add_source_bot",
"FStar.Set.equal",... | [] | false | false | false | true | false | let left_unit (w, r, f) =
| assert (Set.equal (union bot bot) bot);
add_source_bot f;
assert ((ifc_triple unit_triple (w, r, f)) `triple_equiv` (w, r, f)) | false | |
Sec2.HIFC.fst | Sec2.HIFC.right_unit | val right_unit : _: ((Sec2.HIFC.label * Sec2.HIFC.label) * Prims.list Sec2.HIFC.flow) -> Prims.unit | let right_unit (w, r, f) =
calc (==) {
ifc_triple (w, r, f) unit_triple;
(==) { }
(w `union` bot, r `union` bot, f @ add_source r ((bot, bot)::[]));
};
assert (flows_equiv (add_source r [(bot, bot)]) []);
flows_equiv_append f (add_source r [(bot, bot)]) f [];
append_nil_r f;
assert (ifc_triple (... | {
"file_name": "examples/layeredeffects/Sec2.HIFC.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 69,
"end_line": 494,
"start_col": 0,
"start_line": 485
} | module Sec2.HIFC
open FStar.List.Tot
open FStar.Map
let loc = int
type store = m:Map.t loc int{forall l. contains m l}
let upd (s:store) (l:loc) (x:int) : store = Map.upd s l x
let sel (s:store) (l:loc) : int = Map.sel s l
open FStar.Set
(*** A basic Hoare state monad ***)
let pre = store -> Type0
let post a = store -... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Set.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.Map.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.Classical.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "FStar.Set",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Map",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.Tot",
"short_module": null
},
{
"abbrev": false,
"full_module": "Sec2",
... | {
"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 | _: ((Sec2.HIFC.label * Sec2.HIFC.label) * Prims.list Sec2.HIFC.flow) -> Prims.unit | Prims.Tot | [
"total"
] | [] | [
"FStar.Pervasives.Native.tuple3",
"Sec2.HIFC.label",
"Prims.list",
"Sec2.HIFC.flow",
"Prims._assert",
"Sec2.HIFC.triple_equiv",
"Sec2.HIFC.ifc_triple",
"FStar.Pervasives.Native.Mktuple3",
"Sec2.HIFC.unit_triple",
"Sec2.HIFC.flows",
"Prims.unit",
"Sec2.HIFC.append_nil_r",
"Sec2.HIFC.flows_equ... | [] | false | false | false | true | false | let right_unit (w, r, f) =
| calc ( == ) {
ifc_triple (w, r, f) unit_triple;
( == ) { () }
(w `union` bot, r `union` bot, f @ add_source r ([(bot, bot)]));
};
assert (flows_equiv (add_source r [(bot, bot)]) []);
flows_equiv_append f (add_source r [(bot, bot)]) f [];
append_nil_r f;
assert ((ifc_triple (w, r, f) unit_triple) `triple_equiv` (w... | false | |
Sec2.HIFC.fst | Sec2.HIFC.bind_hst_no_leakage | val bind_hst_no_leakage
(#a #b: Type)
(#w0 #r0 #w1 #r1: label)
(#fs0 #fs1: flows)
(#p #q #r #s: _)
(x: hifc a r0 w0 fs0 p q)
(y: (x: a -> hifc b r1 w1 fs1 (r x) (s x)))
(from to: loc)
(s0: store)
(k: _)
: Lemma
(requires
(let p_f = (fun s0 -> p s0 ... | val bind_hst_no_leakage
(#a #b: Type)
(#w0 #r0 #w1 #r1: label)
(#fs0 #fs1: flows)
(#p #q #r #s: _)
(x: hifc a r0 w0 fs0 p q)
(y: (x: a -> hifc b r1 w1 fs1 (r x) (s x)))
(from to: loc)
(s0: store)
(k: _)
: Lemma
(requires
(let p_f = (fun s0 -> p s0 ... | let bind_hst_no_leakage (#a #b:Type)
(#w0 #r0 #w1 #r1:label)
(#fs0 #fs1:flows)
#p #q #r #s
(x:hifc a r0 w0 fs0 p q)
(y: (x:a -> hifc b r1 w1 fs1 (r x) (s x)))
(from to:lo... | {
"file_name": "examples/layeredeffects/Sec2.HIFC.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 10,
"end_line": 386,
"start_col": 0,
"start_line": 311
} | module Sec2.HIFC
open FStar.List.Tot
open FStar.Map
let loc = int
type store = m:Map.t loc int{forall l. contains m l}
let upd (s:store) (l:loc) (x:int) : store = Map.upd s l x
let sel (s:store) (l:loc) : int = Map.sel s l
open FStar.Set
(*** A basic Hoare state monad ***)
let pre = store -> Type0
let post a = store -... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Set.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.Map.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.Classical.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "FStar.Set",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Map",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.Tot",
"short_module": null
},
{
"abbrev": false,
"full_module": "Sec2",
... | {
"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: Sec2.HIFC.hifc a r0 w0 fs0 p q ->
y: (x: a -> Sec2.HIFC.hifc b r1 w1 fs1 (r x) (s x)) ->
from: Sec2.HIFC.loc ->
to: Sec2.HIFC.loc ->
s0: Sec2.HIFC.store ->
k: Prims.int
-> FStar.Pervasives.Lemma
(requires
(let p_f s0 = p s0 /\ (forall (x: a) (s1: Sec2.HIFC.store). q s0 x s1 =... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Sec2.HIFC.label",
"Sec2.HIFC.flows",
"Sec2.HIFC.pre",
"Sec2.HIFC.post",
"Sec2.HIFC.hifc",
"Sec2.HIFC.loc",
"Sec2.HIFC.store",
"Prims.int",
"FStar.Set.mem",
"Prims.op_Equality",
"Sec2.HIFC.sel",
"Prims._assert",
"FStar.Map.equal",
"Prims.bool",
"Sec2.HIFC.add_source_monotonic",
"Prims.... | [] | false | false | true | false | false | let bind_hst_no_leakage
(#a: Type)
(#b: Type)
(#w0: label)
(#r0: label)
(#w1: label)
(#r1: label)
(#fs0: flows)
(#fs1: flows)
#p
#q
#r
#s
(x: hifc a r0 w0 fs0 p q)
(y: (x: a -> hifc b r1 w1 fs1 (r x) (s x)))
(from: loc)
(to:... | let f = bind_ifc' x y in
assert (reads x r0);
let s0' = upd s0 from k in
let _, s2f = f s0 in
let _, s2f' = f s0' in
let flows = (fs0 @ add_source r0 ((r1, w1) :: fs1)) in
let v0, s1 = x s0 in
let v0', s1' = x s0' in
elim_has_flow_seq from to r0 r1 w1 fs0 fs1;
assert (~(has_flow from to fs0));
assert (respects x fs0);
... | false |
Sec2.HIFC.fst | Sec2.HIFC.ref | val ref : l: Sec2.HIFC.label -> Type0 | let ref (l:label) = r:loc {r `Set.mem` l} | {
"file_name": "examples/layeredeffects/Sec2.HIFC.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 41,
"end_line": 754,
"start_col": 0,
"start_line": 754
} | module Sec2.HIFC
open FStar.List.Tot
open FStar.Map
let loc = int
type store = m:Map.t loc int{forall l. contains m l}
let upd (s:store) (l:loc) (x:int) : store = Map.upd s l x
let sel (s:store) (l:loc) : int = Map.sel s l
open FStar.Set
(*** A basic Hoare state monad ***)
let pre = store -> Type0
let post a = store -... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Set.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.Map.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.Classical.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Set",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Map",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.... | {
"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 | l: Sec2.HIFC.label -> Type0 | Prims.Tot | [
"total"
] | [] | [
"Sec2.HIFC.label",
"Sec2.HIFC.loc",
"Prims.b2t",
"FStar.Set.mem"
] | [] | false | false | false | true | true | let ref (l: label) =
| r: loc{r `Set.mem` l} | false | |
Sec2.HIFC.fst | Sec2.HIFC.append_nil_r | val append_nil_r (#a: _) (l: list a) : Lemma (l @ [] == l) | val append_nil_r (#a: _) (l: list a) : Lemma (l @ [] == l) | let rec append_nil_r #a (l:list a)
: Lemma (l @ [] == l)
= match l with
| [] -> ()
| _::tl -> append_nil_r tl | {
"file_name": "examples/layeredeffects/Sec2.HIFC.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 30,
"end_line": 478,
"start_col": 0,
"start_line": 474
} | module Sec2.HIFC
open FStar.List.Tot
open FStar.Map
let loc = int
type store = m:Map.t loc int{forall l. contains m l}
let upd (s:store) (l:loc) (x:int) : store = Map.upd s l x
let sel (s:store) (l:loc) : int = Map.sel s l
open FStar.Set
(*** A basic Hoare state monad ***)
let pre = store -> Type0
let post a = store -... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Set.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.Map.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.Classical.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "FStar.Set",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Map",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.Tot",
"short_module": null
},
{
"abbrev": false,
"full_module": "Sec2",
... | {
"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 | l: Prims.list a -> FStar.Pervasives.Lemma (ensures l @ [] == l) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.list",
"Sec2.HIFC.append_nil_r",
"Prims.unit",
"Prims.l_True",
"Prims.squash",
"Prims.eq2",
"FStar.List.Tot.Base.op_At",
"Prims.Nil",
"FStar.Pervasives.pattern"
] | [
"recursion"
] | false | false | true | false | false | let rec append_nil_r #a (l: list a) : Lemma (l @ [] == l) =
| match l with
| [] -> ()
| _ :: tl -> append_nil_r tl | false |
Sec2.HIFC.fst | Sec2.HIFC.flows_included_append | val flows_included_append (f0 f1 g0 g1: flows)
: Lemma (requires flows_included_in f0 g0 /\ flows_included_in f1 g1)
(ensures flows_included_in (f0 @ f1) (g0 @ g1)) | val flows_included_append (f0 f1 g0 g1: flows)
: Lemma (requires flows_included_in f0 g0 /\ flows_included_in f1 g1)
(ensures flows_included_in (f0 @ f1) (g0 @ g1)) | let flows_included_append (f0 f1 g0 g1:flows)
: Lemma (requires flows_included_in f0 g0 /\
flows_included_in f1 g1)
(ensures flows_included_in (f0@f1) (g0@g1))
= let aux (f:_) (from to:_)
: Lemma (requires List.Tot.memP f (f0@f1) /\
from <> to /\
... | {
"file_name": "examples/layeredeffects/Sec2.HIFC.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 6,
"end_line": 468,
"start_col": 0,
"start_line": 454
} | module Sec2.HIFC
open FStar.List.Tot
open FStar.Map
let loc = int
type store = m:Map.t loc int{forall l. contains m l}
let upd (s:store) (l:loc) (x:int) : store = Map.upd s l x
let sel (s:store) (l:loc) : int = Map.sel s l
open FStar.Set
(*** A basic Hoare state monad ***)
let pre = store -> Type0
let post a = store -... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Set.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.Map.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.Classical.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "FStar.Set",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Map",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.Tot",
"short_module": null
},
{
"abbrev": false,
"full_module": "Sec2",
... | {
"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 | f0: Sec2.HIFC.flows -> f1: Sec2.HIFC.flows -> g0: Sec2.HIFC.flows -> g1: Sec2.HIFC.flows
-> FStar.Pervasives.Lemma
(requires Sec2.HIFC.flows_included_in f0 g0 /\ Sec2.HIFC.flows_included_in f1 g1)
(ensures Sec2.HIFC.flows_included_in (f0 @ f1) (g0 @ g1)) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Sec2.HIFC.flows",
"Sec2.HIFC.flow",
"Sec2.HIFC.loc",
"Prims.unit",
"Prims.l_and",
"FStar.List.Tot.Base.memP",
"FStar.List.Tot.Base.op_At",
"Prims.b2t",
"Prims.op_disEquality",
"Sec2.HIFC.has_flow_1",
"Prims.squash",
"Prims.l_Exists",
"Prims.Cons",
"FStar.Pervasives.pattern",
"FStar.Perv... | [] | false | false | true | false | false | let flows_included_append (f0 f1 g0 g1: flows)
: Lemma (requires flows_included_in f0 g0 /\ flows_included_in f1 g1)
(ensures flows_included_in (f0 @ f1) (g0 @ g1)) =
| let aux (f from to: _)
: Lemma (requires List.Tot.memP f (f0 @ f1) /\ from <> to /\ has_flow_1 from to f)
(ensures (exists g. g `List.Tot.memP` (g0 @ g1) /\ has_flow_1 from to g))
[SMTPat (has_flow_1 from to f)] =
memP_append_or f f0 f1;
assert (exists g. g `List.Tot.memP` g0 \/ g `List.Tot.memP` g1... | false |
Sec2.HIFC.fst | Sec2.HIFC.lref | val lref : Type0 | let lref = ref low | {
"file_name": "examples/layeredeffects/Sec2.HIFC.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 18,
"end_line": 757,
"start_col": 0,
"start_line": 757
} | module Sec2.HIFC
open FStar.List.Tot
open FStar.Map
let loc = int
type store = m:Map.t loc int{forall l. contains m l}
let upd (s:store) (l:loc) (x:int) : store = Map.upd s l x
let sel (s:store) (l:loc) : int = Map.sel s l
open FStar.Set
(*** A basic Hoare state monad ***)
let pre = store -> Type0
let post a = store -... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Set.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.Map.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.Classical.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Set",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Map",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | Type0 | Prims.Tot | [
"total"
] | [] | [
"Sec2.HIFC.ref",
"Sec2.HIFC.low"
] | [] | false | false | false | true | true | let lref =
| ref low | false | |
Sec2.HIFC.fst | Sec2.HIFC.low | val low:label | val low:label | let low : label = Set.complement high | {
"file_name": "examples/layeredeffects/Sec2.HIFC.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 37,
"end_line": 756,
"start_col": 0,
"start_line": 756
} | module Sec2.HIFC
open FStar.List.Tot
open FStar.Map
let loc = int
type store = m:Map.t loc int{forall l. contains m l}
let upd (s:store) (l:loc) (x:int) : store = Map.upd s l x
let sel (s:store) (l:loc) : int = Map.sel s l
open FStar.Set
(*** A basic Hoare state monad ***)
let pre = store -> Type0
let post a = store -... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Set.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.Map.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.Classical.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Set",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Map",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.... | {
"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 | Sec2.HIFC.label | Prims.Tot | [
"total"
] | [] | [
"FStar.Set.complement",
"Sec2.HIFC.loc",
"Sec2.HIFC.high"
] | [] | false | false | false | true | false | let low:label =
| Set.complement high | false |
Sec2.HIFC.fst | Sec2.HIFC.href | val href : Type0 | let href = ref high | {
"file_name": "examples/layeredeffects/Sec2.HIFC.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 19,
"end_line": 758,
"start_col": 0,
"start_line": 758
} | module Sec2.HIFC
open FStar.List.Tot
open FStar.Map
let loc = int
type store = m:Map.t loc int{forall l. contains m l}
let upd (s:store) (l:loc) (x:int) : store = Map.upd s l x
let sel (s:store) (l:loc) : int = Map.sel s l
open FStar.Set
(*** A basic Hoare state monad ***)
let pre = store -> Type0
let post a = store -... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Set.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.Map.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.Classical.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Set",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Map",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | Type0 | Prims.Tot | [
"total"
] | [] | [
"Sec2.HIFC.ref",
"Sec2.HIFC.high"
] | [] | false | false | false | true | true | let href =
| ref high | false | |
Sec2.HIFC.fst | Sec2.HIFC.frame | val frame (a: Type) (r w: label) (fs: flows) (#p #q: _) (f: hifc a r w fs p q)
: hifc a r w fs p (fun s0 x s1 -> q s0 x s1 /\ modifies w s0 s1) | val frame (a: Type) (r w: label) (fs: flows) (#p #q: _) (f: hifc a r w fs p q)
: hifc a r w fs p (fun s0 x s1 -> q s0 x s1 /\ modifies w s0 s1) | let frame (a:Type) (r w:label) (fs:flows) #p #q (f:hifc a r w fs p q)
: hifc a r w fs p (fun s0 x s1 -> q s0 x s1 /\ modifies w s0 s1)
= let aux (s0:store{p s0}) (l:loc{~(Set.mem l w)})
: Lemma (let x, s1 = f s0 in
sel s0 l == sel s1 l)
[SMTPat()]
= ()
in
let g : h... | {
"file_name": "examples/layeredeffects/Sec2.HIFC.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 5,
"end_line": 565,
"start_col": 0,
"start_line": 537
} | module Sec2.HIFC
open FStar.List.Tot
open FStar.Map
let loc = int
type store = m:Map.t loc int{forall l. contains m l}
let upd (s:store) (l:loc) (x:int) : store = Map.upd s l x
let sel (s:store) (l:loc) : int = Map.sel s l
open FStar.Set
(*** A basic Hoare state monad ***)
let pre = store -> Type0
let post a = store -... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Set.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.Map.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.Classical.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Set",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Map",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
a: Type ->
r: Sec2.HIFC.label ->
w: Sec2.HIFC.label ->
fs: Sec2.HIFC.flows ->
f: Sec2.HIFC.hifc a r w fs p q
-> Sec2.HIFC.hifc a r w fs p (fun s0 x s1 -> q s0 x s1 /\ Sec2.HIFC.modifies w s0 s1) | Prims.Tot | [
"total"
] | [] | [
"Sec2.HIFC.label",
"Sec2.HIFC.flows",
"Sec2.HIFC.pre",
"Sec2.HIFC.post",
"Sec2.HIFC.hifc",
"Prims.unit",
"Prims._assert",
"Sec2.HIFC.respects",
"Sec2.HIFC.store",
"Prims.l_and",
"Sec2.HIFC.modifies",
"Sec2.HIFC.loc",
"Prims.l_not",
"Sec2.HIFC.has_flow",
"Prims.b2t",
"Prims.op_disEquali... | [] | false | false | false | false | false | let frame (a: Type) (r: label) (w: label) (fs: flows) #p #q (f: hifc a r w fs p q)
: hifc a r w fs p (fun s0 x s1 -> q s0 x s1 /\ modifies w s0 s1) =
| let aux (s0: store{p s0}) (l: loc{~(Set.mem l w)})
: Lemma
(let x, s1 = f s0 in
sel s0 l == sel s1 l) [SMTPat ()] =
()
in
let g:hst a p (fun s0 x s1 -> q s0 x s1 /\ modifies w s0 s1) = fun s0 -> f s0 in
assert (reads f r);
let read_ok_lem (l: loc) (s: store{p s})
: Lemma (requires (~(Set.mem l r... | false |
Sec2.HIFC.fst | Sec2.HIFC.consequence | val consequence (a: Type) (r0 w0: label) (p q p' q': _) (fs0: flows) (f: hifc a r0 w0 fs0 p q)
: Pure (hst a p' q')
(requires (forall s. p' s ==> p s) /\ (forall s0 x s1. p' s0 /\ q s0 x s1 ==> q' s0 x s1))
(fun _ -> True) | val consequence (a: Type) (r0 w0: label) (p q p' q': _) (fs0: flows) (f: hifc a r0 w0 fs0 p q)
: Pure (hst a p' q')
(requires (forall s. p' s ==> p s) /\ (forall s0 x s1. p' s0 /\ q s0 x s1 ==> q' s0 x s1))
(fun _ -> True) | let consequence (a:Type) (r0 w0:label) p q p' q' (fs0:flows) (f:hifc a r0 w0 fs0 p q)
: Pure (hst a p' q')
(requires (forall s. p' s ==> p s) /\
(forall s0 x s1. p' s0 /\ q s0 x s1 ==> q' s0 x s1))
(fun _ -> True)
= let g : hst a p' q' = fun s -> f s in
g | {
"file_name": "examples/layeredeffects/Sec2.HIFC.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 5,
"end_line": 612,
"start_col": 0,
"start_line": 606
} | module Sec2.HIFC
open FStar.List.Tot
open FStar.Map
let loc = int
type store = m:Map.t loc int{forall l. contains m l}
let upd (s:store) (l:loc) (x:int) : store = Map.upd s l x
let sel (s:store) (l:loc) : int = Map.sel s l
open FStar.Set
(*** A basic Hoare state monad ***)
let pre = store -> Type0
let post a = store -... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Set.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.Map.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.Classical.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Set",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Map",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
a: Type ->
r0: Sec2.HIFC.label ->
w0: Sec2.HIFC.label ->
p: Sec2.HIFC.pre ->
q: Sec2.HIFC.post a ->
p': (_: Sec2.HIFC.store -> Prims.logical) ->
q': (_: Sec2.HIFC.store -> _: a -> _: Sec2.HIFC.store -> Prims.logical) ->
fs0: Sec2.HIFC.flows ->
f: Sec2.HIFC.hifc a r0 w0 fs0 p q
-> ... | Prims.Pure | [] | [] | [
"Sec2.HIFC.label",
"Sec2.HIFC.pre",
"Sec2.HIFC.post",
"Sec2.HIFC.store",
"Prims.logical",
"Sec2.HIFC.flows",
"Sec2.HIFC.hifc",
"Sec2.HIFC.hst",
"FStar.Pervasives.Native.tuple2",
"FStar.Pervasives.Native.fst",
"FStar.Pervasives.Native.snd",
"Prims.l_and",
"Prims.l_Forall",
"Prims.l_imp",
... | [] | false | false | false | false | false | let consequence (a: Type) (r0: label) (w0: label) p q p' q' (fs0: flows) (f: hifc a r0 w0 fs0 p q)
: Pure (hst a p' q')
(requires (forall s. p' s ==> p s) /\ (forall s0 x s1. p' s0 /\ q s0 x s1 ==> q' s0 x s1))
(fun _ -> True) =
| let g:hst a p' q' = fun s -> f s in
g | false |
Sec2.HIFC.fst | Sec2.HIFC.append_memP | val append_memP (#a: _) (x: a) (l0 l1: list a)
: Lemma (List.Tot.memP x (l0 @ l1) <==> (List.Tot.memP x l0 \/ List.Tot.memP x l1)) | val append_memP (#a: _) (x: a) (l0 l1: list a)
: Lemma (List.Tot.memP x (l0 @ l1) <==> (List.Tot.memP x l0 \/ List.Tot.memP x l1)) | let rec append_memP #a (x:a) (l0 l1:list a)
: Lemma (List.Tot.memP x (l0 @ l1) <==> (List.Tot.memP x l0 \/ List.Tot.memP x l1))
= match l0 with
| [] -> ()
| hd::tl -> append_memP x tl l1 | {
"file_name": "examples/layeredeffects/Sec2.HIFC.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 39,
"end_line": 667,
"start_col": 0,
"start_line": 663
} | module Sec2.HIFC
open FStar.List.Tot
open FStar.Map
let loc = int
type store = m:Map.t loc int{forall l. contains m l}
let upd (s:store) (l:loc) (x:int) : store = Map.upd s l x
let sel (s:store) (l:loc) : int = Map.sel s l
open FStar.Set
(*** A basic Hoare state monad ***)
let pre = store -> Type0
let post a = store -... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Set.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.Map.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.Classical.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Set",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Map",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.... | {
"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 -> l0: Prims.list a -> l1: Prims.list a
-> FStar.Pervasives.Lemma
(ensures
FStar.List.Tot.Base.memP x (l0 @ l1) <==>
FStar.List.Tot.Base.memP x l0 \/ FStar.List.Tot.Base.memP x l1) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.list",
"Sec2.HIFC.append_memP",
"Prims.unit",
"Prims.l_True",
"Prims.squash",
"Prims.l_iff",
"FStar.List.Tot.Base.memP",
"FStar.List.Tot.Base.op_At",
"Prims.l_or",
"Prims.Nil",
"FStar.Pervasives.pattern"
] | [
"recursion"
] | false | false | true | false | false | let rec append_memP #a (x: a) (l0: list a) (l1: list a)
: Lemma (List.Tot.memP x (l0 @ l1) <==> (List.Tot.memP x l0 \/ List.Tot.memP x l1)) =
| match l0 with
| [] -> ()
| hd :: tl -> append_memP x tl l1 | false |
Sec2.HIFC.fst | Sec2.HIFC.weaken_flows_append | val weaken_flows_append (fs fs': flows)
: Lemma
(ensures
(norm [delta; iota; zeta] (fs `flows_included_in` (fs @ fs')) /\
(norm [delta; iota; zeta] (fs' `flows_included_in` (fs @ fs'))))) [SMTPat ()] | val weaken_flows_append (fs fs': flows)
: Lemma
(ensures
(norm [delta; iota; zeta] (fs `flows_included_in` (fs @ fs')) /\
(norm [delta; iota; zeta] (fs' `flows_included_in` (fs @ fs'))))) [SMTPat ()] | let weaken_flows_append (fs fs':flows)
: Lemma (ensures (norm [delta;iota;zeta] (fs `flows_included_in` (fs @ fs')) /\
(norm [delta;iota;zeta] (fs' `flows_included_in` (fs @ fs')))))
[SMTPat ()]
= let aux (f0:flow)
: Lemma
(requires f0 `List.Tot.memP` fs)
(ensures... | {
"file_name": "examples/layeredeffects/Sec2.HIFC.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 54,
"end_line": 691,
"start_col": 0,
"start_line": 672
} | module Sec2.HIFC
open FStar.List.Tot
open FStar.Map
let loc = int
type store = m:Map.t loc int{forall l. contains m l}
let upd (s:store) (l:loc) (x:int) : store = Map.upd s l x
let sel (s:store) (l:loc) : int = Map.sel s l
open FStar.Set
(*** A basic Hoare state monad ***)
let pre = store -> Type0
let post a = store -... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Set.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.Map.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.Classical.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Set",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Map",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.... | {
"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 | fs: Sec2.HIFC.flows -> fs': Sec2.HIFC.flows
-> FStar.Pervasives.Lemma
(ensures
FStar.Pervasives.norm [FStar.Pervasives.delta; FStar.Pervasives.iota; FStar.Pervasives.zeta]
(Sec2.HIFC.flows_included_in fs (fs @ fs')) /\
FStar.Pervasives.norm [FStar.Pervasives.delta; FStar.Pervasives.iot... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Sec2.HIFC.flows",
"Sec2.HIFC.norm_spec_inv",
"Sec2.HIFC.flows_included_in",
"FStar.List.Tot.Base.op_At",
"Sec2.HIFC.flow",
"Prims.unit",
"FStar.List.Tot.Base.memP",
"Prims.squash",
"Prims.Cons",
"FStar.Pervasives.pattern",
"FStar.Pervasives.smt_pat",
"Prims.Nil",
"Sec2.HIFC.append_memP",
... | [] | false | false | true | false | false | let weaken_flows_append (fs fs': flows)
: Lemma
(ensures
(norm [delta; iota; zeta] (fs `flows_included_in` (fs @ fs')) /\
(norm [delta; iota; zeta] (fs' `flows_included_in` (fs @ fs'))))) [SMTPat ()] =
| let aux (f0: flow)
: Lemma (requires f0 `List.Tot.memP` fs)
(ensures f0 `List.Tot.memP` (fs @ fs'))
[SMTPat (f0 `List.Tot.memP` (fs @ fs'))] =
append_memP f0 fs fs'
in
let aux (f0: flow)
: Lemma (requires f0 `List.Tot.memP` fs')
(ensures f0 `List.Tot.memP` (fs @ fs'))
[SMTPat (f0 `List... | false |
Sec2.HIFC.fst | Sec2.HIFC.sub_hifc | val sub_hifc
(a: Type)
(r0 w0: label)
(fs0: flows)
(p q: _)
(r1 w1: label)
(fs1: flows)
(#p' #q': _)
(f: hifc a r0 w0 fs0 p q)
: Pure (hifc a r1 w1 fs1 p' q')
(requires
label_inclusion r0 r1 /\ label_inclusion w0 w1 /\
(norm [delta; iota; zeta] (... | val sub_hifc
(a: Type)
(r0 w0: label)
(fs0: flows)
(p q: _)
(r1 w1: label)
(fs1: flows)
(#p' #q': _)
(f: hifc a r0 w0 fs0 p q)
: Pure (hifc a r1 w1 fs1 p' q')
(requires
label_inclusion r0 r1 /\ label_inclusion w0 w1 /\
(norm [delta; iota; zeta] (... | let sub_hifc (a:Type) (r0 w0:label) (fs0:flows) p q (r1 w1:label) (fs1:flows) #p' #q'
(f:hifc a r0 w0 fs0 p q)
: Pure (hifc a r1 w1 fs1 p' q')
(requires
label_inclusion r0 r1 /\
label_inclusion w0 w1 /\
(norm [delta;iota;zeta] (fs0 `flows_included_in`... | {
"file_name": "examples/layeredeffects/Sec2.HIFC.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 5,
"end_line": 650,
"start_col": 0,
"start_line": 625
} | module Sec2.HIFC
open FStar.List.Tot
open FStar.Map
let loc = int
type store = m:Map.t loc int{forall l. contains m l}
let upd (s:store) (l:loc) (x:int) : store = Map.upd s l x
let sel (s:store) (l:loc) : int = Map.sel s l
open FStar.Set
(*** A basic Hoare state monad ***)
let pre = store -> Type0
let post a = store -... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Set.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.Map.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.Classical.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Set",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Map",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
a: Type ->
r0: Sec2.HIFC.label ->
w0: Sec2.HIFC.label ->
fs0: Sec2.HIFC.flows ->
p: Sec2.HIFC.pre ->
q: Sec2.HIFC.post a ->
r1: Sec2.HIFC.label ->
w1: Sec2.HIFC.label ->
fs1: Sec2.HIFC.flows ->
f: Sec2.HIFC.hifc a r0 w0 fs0 p q
-> Prims.Pure (Sec2.HIFC.hifc a r1 w1 fs1 p' q') | Prims.Pure | [] | [] | [
"Sec2.HIFC.label",
"Sec2.HIFC.flows",
"Sec2.HIFC.pre",
"Sec2.HIFC.post",
"Sec2.HIFC.store",
"Prims.logical",
"Sec2.HIFC.hifc",
"Prims.unit",
"Prims._assert",
"Sec2.HIFC.respects",
"Sec2.HIFC.loc",
"Prims.l_and",
"Prims.l_not",
"Sec2.HIFC.has_flow",
"Prims.b2t",
"Prims.op_disEquality",
... | [] | false | false | false | false | false | let sub_hifc
(a: Type)
(r0: label)
(w0: label)
(fs0: flows)
p
q
(r1: label)
(w1: label)
(fs1: flows)
#p'
#q'
(f: hifc a r0 w0 fs0 p q)
: Pure (hifc a r1 w1 fs1 p' q')
(requires
label_inclusion r0 r1 /\ label_inclusion w0 w1 /\
... | let forig = f in
norm_spec (fs0 `flows_included_in` fs1);
assert ((fs0 `flows_included_in` fs1));
let f:hst a p' q' = consequence a r0 w0 p q p' q' fs0 f in
weaken_reads_ok f r0 r1;
assert (reads f r1);
assert (writes f w1);
let respects_flows_lemma (from to: _)
: Lemma (requires ~(has_flow from to fs1) /\ from <> ... | false |
Sec2.HIFC.fst | Sec2.HIFC.refine_flow_hifc | val refine_flow_hifc (#a #w #r #f #fs #p #q: _) (c: hifc a r w (f :: fs) p q)
: Pure (hifc a r w fs p q)
(requires
(forall from to v.
has_flow_1 from to f /\ from <> to ==>
(forall s0 x x' s1 s1'.
p s0 /\ p (upd s0 from v) /\ q s0 x s1 /\ modifies w s0 s1 /\
... | val refine_flow_hifc (#a #w #r #f #fs #p #q: _) (c: hifc a r w (f :: fs) p q)
: Pure (hifc a r w fs p q)
(requires
(forall from to v.
has_flow_1 from to f /\ from <> to ==>
(forall s0 x x' s1 s1'.
p s0 /\ p (upd s0 from v) /\ q s0 x s1 /\ modifies w s0 s1 /\
... | let refine_flow_hifc #a #w #r #f #fs #p #q
(c: hifc a r w (f::fs) p q)
: Pure (hifc a r w fs p q)
(requires
(forall from to v.
has_flow_1 from to f /\
from <> to ==>
(forall s0 x x' s1 s1'.
p s0 /\
p (upd s0 from ... | {
"file_name": "examples/layeredeffects/Sec2.HIFC.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 5,
"end_line": 603,
"start_col": 0,
"start_line": 587
} | module Sec2.HIFC
open FStar.List.Tot
open FStar.Map
let loc = int
type store = m:Map.t loc int{forall l. contains m l}
let upd (s:store) (l:loc) (x:int) : store = Map.upd s l x
let sel (s:store) (l:loc) : int = Map.sel s l
open FStar.Set
(*** A basic Hoare state monad ***)
let pre = store -> Type0
let post a = store -... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Set.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.Map.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.Classical.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Set",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Map",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | c: Sec2.HIFC.hifc a r w (f :: fs) p q -> Prims.Pure (Sec2.HIFC.hifc a r w fs p q) | Prims.Pure | [] | [] | [
"Sec2.HIFC.label",
"Sec2.HIFC.flow",
"Prims.list",
"Sec2.HIFC.pre",
"Sec2.HIFC.post",
"Sec2.HIFC.hifc",
"Prims.Cons",
"Prims.l_Forall",
"Sec2.HIFC.loc",
"Prims.int",
"Prims.l_imp",
"Prims.l_and",
"Sec2.HIFC.has_flow_1",
"Prims.b2t",
"Prims.op_disEquality",
"Sec2.HIFC.store",
"Sec2.HI... | [] | false | false | false | false | false | let refine_flow_hifc #a #w #r #f #fs #p #q (c: hifc a r w (f :: fs) p q)
: Pure (hifc a r w fs p q)
(requires
(forall from to v.
has_flow_1 from to f /\ from <> to ==>
(forall s0 x x' s1 s1'.
p s0 /\ p (upd s0 from v) /\ q s0 x s1 /\ modifies w s0 s1 /\
... | c | false |
Sec2.HIFC.fst | Sec2.HIFC.write | val write (l: loc) (x: int)
: HIFC unit bot (single l) [] (requires fun _ -> True) (ensures fun _ _ s1 -> sel s1 l == x) | val write (l: loc) (x: int)
: HIFC unit bot (single l) [] (requires fun _ -> True) (ensures fun _ _ s1 -> sel s1 l == x) | let write (l:loc) (x:int)
: HIFC unit bot (single l) []
(requires fun _ -> True)
(ensures fun _ _ s1 -> sel s1 l == x)
= HIFC?.reflect (iwrite l x) | {
"file_name": "examples/layeredeffects/Sec2.HIFC.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 30,
"end_line": 720,
"start_col": 0,
"start_line": 716
} | module Sec2.HIFC
open FStar.List.Tot
open FStar.Map
let loc = int
type store = m:Map.t loc int{forall l. contains m l}
let upd (s:store) (l:loc) (x:int) : store = Map.upd s l x
let sel (s:store) (l:loc) : int = Map.sel s l
open FStar.Set
(*** A basic Hoare state monad ***)
let pre = store -> Type0
let post a = store -... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Set.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.Map.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.Classical.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Set",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Map",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.... | {
"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 | l: Sec2.HIFC.loc -> x: Prims.int -> Sec2.HIFC.HIFC Prims.unit | Sec2.HIFC.HIFC | [] | [] | [
"Sec2.HIFC.loc",
"Prims.int",
"Sec2.HIFC.iwrite",
"Prims.unit",
"Sec2.HIFC.bot",
"Sec2.HIFC.single",
"Prims.Nil",
"Sec2.HIFC.flow",
"Sec2.HIFC.store",
"Prims.l_True",
"Prims.eq2",
"Sec2.HIFC.sel"
] | [] | false | true | false | false | false | let write (l: loc) (x: int)
: HIFC unit bot (single l) [] (requires fun _ -> True) (ensures fun _ _ s1 -> sel s1 l == x) =
| HIFC?.reflect (iwrite l x) | false |
Sec2.HIFC.fst | Sec2.HIFC.refine_flow | val refine_flow (#a #w #r #f #fs #p #q: _) ($c: (unit -> HIFC a r w (f :: fs) p q))
: Pure (unit -> HIFC a r w fs p q)
(requires
(forall from to v.
has_flow_1 from to f /\ from <> to ==>
(forall s0 x x' s1 s1'.
p s0 /\ p (upd s0 from v) /\ q s0 x s1 /\ modifies ... | val refine_flow (#a #w #r #f #fs #p #q: _) ($c: (unit -> HIFC a r w (f :: fs) p q))
: Pure (unit -> HIFC a r w fs p q)
(requires
(forall from to v.
has_flow_1 from to f /\ from <> to ==>
(forall s0 x x' s1 s1'.
p s0 /\ p (upd s0 from v) /\ q s0 x s1 /\ modifies ... | let refine_flow #a #w #r #f #fs #p #q
($c: unit -> HIFC a r w (f::fs) p q)
: Pure (unit -> HIFC a r w fs p q)
(requires
(forall from to v.
has_flow_1 from to f /\
from <> to ==>
(forall s0 x x' s1 s1'.
p s0 /\
p (... | {
"file_name": "examples/layeredeffects/Sec2.HIFC.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 63,
"end_line": 750,
"start_col": 0,
"start_line": 734
} | module Sec2.HIFC
open FStar.List.Tot
open FStar.Map
let loc = int
type store = m:Map.t loc int{forall l. contains m l}
let upd (s:store) (l:loc) (x:int) : store = Map.upd s l x
let sel (s:store) (l:loc) : int = Map.sel s l
open FStar.Set
(*** A basic Hoare state monad ***)
let pre = store -> Type0
let post a = store -... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Set.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.Map.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.Classical.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Set",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Map",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | $c: (_: Prims.unit -> Sec2.HIFC.HIFC a) -> Prims.Pure (_: Prims.unit -> Sec2.HIFC.HIFC a) | Prims.Pure | [] | [] | [
"Sec2.HIFC.label",
"Sec2.HIFC.flow",
"Prims.list",
"Sec2.HIFC.pre",
"Sec2.HIFC.post",
"Prims.unit",
"Prims.Cons",
"Sec2.HIFC.refine_flow_hifc",
"Prims.l_Forall",
"Sec2.HIFC.loc",
"Prims.int",
"Prims.l_imp",
"Prims.l_and",
"Sec2.HIFC.has_flow_1",
"Prims.b2t",
"Prims.op_disEquality",
"... | [] | false | false | false | false | false | let refine_flow #a #w #r #f #fs #p #q ($c: (unit -> HIFC a r w (f :: fs) p q))
: Pure (unit -> HIFC a r w fs p q)
(requires
(forall from to v.
has_flow_1 from to f /\ from <> to ==>
(forall s0 x x' s1 s1'.
p s0 /\ p (upd s0 from v) /\ q s0 x s1 /\ modifies w s0 ... | (fun () -> HIFC?.reflect (refine_flow_hifc (reify (c ())))) | false |
Sec2.HIFC.fst | Sec2.HIFC.read | val read (l: loc)
: HIFC int (single l) bot [] (requires fun _ -> True) (ensures fun s0 x s1 -> x == sel s0 l) | val read (l: loc)
: HIFC int (single l) bot [] (requires fun _ -> True) (ensures fun s0 x s1 -> x == sel s0 l) | let read (l:loc)
: HIFC int (single l) bot []
(requires fun _ -> True)
(ensures fun s0 x s1 -> x == sel s0 l)
= HIFC?.reflect (iread l) | {
"file_name": "examples/layeredeffects/Sec2.HIFC.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 27,
"end_line": 715,
"start_col": 0,
"start_line": 711
} | module Sec2.HIFC
open FStar.List.Tot
open FStar.Map
let loc = int
type store = m:Map.t loc int{forall l. contains m l}
let upd (s:store) (l:loc) (x:int) : store = Map.upd s l x
let sel (s:store) (l:loc) : int = Map.sel s l
open FStar.Set
(*** A basic Hoare state monad ***)
let pre = store -> Type0
let post a = store -... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Set.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.Map.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.Classical.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Set",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Map",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.... | {
"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 | l: Sec2.HIFC.loc -> Sec2.HIFC.HIFC Prims.int | Sec2.HIFC.HIFC | [] | [] | [
"Sec2.HIFC.loc",
"Sec2.HIFC.iread",
"Prims.int",
"Sec2.HIFC.single",
"Sec2.HIFC.bot",
"Prims.Nil",
"Sec2.HIFC.flow",
"Sec2.HIFC.store",
"Prims.l_True",
"Prims.eq2",
"Sec2.HIFC.sel"
] | [] | false | true | false | false | false | let read (l: loc)
: HIFC int (single l) bot [] (requires fun _ -> True) (ensures fun s0 x s1 -> x == sel s0 l) =
| HIFC?.reflect (iread l) | false |
Sec2.HIFC.fst | Sec2.HIFC.lift_PURE_HIFC | val lift_PURE_HIFC (a: Type) (wp: pure_wp a) (f: (unit -> PURE a wp))
: Pure (hifc a bot bot [] (fun _ -> True) (fun s0 _ s1 -> s0 == s1))
(requires wp (fun _ -> True))
(ensures fun _ -> True) | val lift_PURE_HIFC (a: Type) (wp: pure_wp a) (f: (unit -> PURE a wp))
: Pure (hifc a bot bot [] (fun _ -> True) (fun s0 _ s1 -> s0 == s1))
(requires wp (fun _ -> True))
(ensures fun _ -> True) | let lift_PURE_HIFC (a:Type) (wp:pure_wp a) (f:unit -> PURE a wp)
: Pure (hifc a bot bot [] (fun _ -> True) (fun s0 _ s1 -> s0 == s1))
(requires wp (fun _ -> True))
(ensures fun _ -> True)
= FStar.Monotonic.Pure.elim_pure_wp_monotonicity_forall ();
return a (f ()) | {
"file_name": "examples/layeredeffects/Sec2.HIFC.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 19,
"end_line": 729,
"start_col": 0,
"start_line": 724
} | module Sec2.HIFC
open FStar.List.Tot
open FStar.Map
let loc = int
type store = m:Map.t loc int{forall l. contains m l}
let upd (s:store) (l:loc) (x:int) : store = Map.upd s l x
let sel (s:store) (l:loc) : int = Map.sel s l
open FStar.Set
(*** A basic Hoare state monad ***)
let pre = store -> Type0
let post a = store -... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Set.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.Map.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.Classical.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Set",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Map",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: Type -> wp: Prims.pure_wp a -> f: (_: Prims.unit -> Prims.PURE a)
-> Prims.Pure
(Sec2.HIFC.hifc a
Sec2.HIFC.bot
Sec2.HIFC.bot
[]
(fun _ -> Prims.l_True)
(fun s0 _ s1 -> s0 == s1)) | Prims.Pure | [] | [] | [
"Prims.pure_wp",
"Prims.unit",
"Sec2.HIFC.return",
"FStar.Monotonic.Pure.elim_pure_wp_monotonicity_forall",
"Sec2.HIFC.hifc",
"Sec2.HIFC.bot",
"Prims.Nil",
"Sec2.HIFC.flow",
"Sec2.HIFC.store",
"Prims.l_True",
"Prims.eq2"
] | [] | false | false | false | false | false | let lift_PURE_HIFC (a: Type) (wp: pure_wp a) (f: (unit -> PURE a wp))
: Pure (hifc a bot bot [] (fun _ -> True) (fun s0 _ s1 -> s0 == s1))
(requires wp (fun _ -> True))
(ensures fun _ -> True) =
| FStar.Monotonic.Pure.elim_pure_wp_monotonicity_forall ();
return a (f ()) | false |
LowParse.Low.Writers.Instances.fst | LowParse.Low.Writers.Instances.swrite_bounded_vlgenbytes | val swrite_bounded_vlgenbytes
(h0: HS.mem)
(sout:
slice (srel_of_buffer_srel (B.trivial_preorder _))
(srel_of_buffer_srel (B.trivial_preorder _)))
(pout_from0: U32.t)
(min: nat)
(max: nat{min <= max /\ max > 0 /\ max < 4294967296})
(#kk: parser_kind)
(#pk:... | val swrite_bounded_vlgenbytes
(h0: HS.mem)
(sout:
slice (srel_of_buffer_srel (B.trivial_preorder _))
(srel_of_buffer_srel (B.trivial_preorder _)))
(pout_from0: U32.t)
(min: nat)
(max: nat{min <= max /\ max > 0 /\ max < 4294967296})
(#kk: parser_kind)
(#pk:... | let swrite_bounded_vlgenbytes
(h0: HS.mem)
(sout: slice (srel_of_buffer_srel (B.trivial_preorder _)) (srel_of_buffer_srel (B.trivial_preorder _)))
(pout_from0: U32.t)
(min: nat)
(max: nat { min <= max /\ max > 0 /\ max < 4294967296 })
(#kk: parser_kind)
(#pk: parser kk (bounded_int32 min max))
(#sk: ser... | {
"file_name": "src/lowparse/LowParse.Low.Writers.Instances.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 3,
"end_line": 246,
"start_col": 0,
"start_line": 217
} | module LowParse.Low.Writers.Instances
include LowParse.Low.Writers
include LowParse.Low.Combinators
include LowParse.Low.Bytes
include LowParse.Low.BitSum
module HS = FStar.HyperStack
module B = LowStar.Buffer
module U32 = FStar.UInt32
module HST = FStar.HyperStack.ST
inline_for_extraction
noextract
let swrite_weaken... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Endianness.fst.checked",
"LowStar.Buffer.fst.checked",
"LowParse.Low.Writers.fst.checked",
"LowParse.Low.Combinators.fsti.checked",
"LowParse.Low.Bytes.fst.checked",
"LowParse.Low.BitSum.fst.checked",
"LowParse.En... | [
{
"abbrev": true,
"full_module": "FStar.Bytes",
"short_module": "FB"
},
{
"abbrev": true,
"full_module": "FStar.UInt8",
"short_module": "U8"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"full_module": "F... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
h0: FStar.Monotonic.HyperStack.mem ->
sout:
LowParse.Slice.slice (LowParse.Slice.srel_of_buffer_srel (LowStar.Buffer.trivial_preorder LowParse.Bytes.byte
))
(LowParse.Slice.srel_of_buffer_srel (LowStar.Buffer.trivial_preorder LowParse.Bytes.byte)) ->
pout_from0: FStar.UInt32.t -... | Prims.Tot | [
"total"
] | [] | [
"FStar.Monotonic.HyperStack.mem",
"LowParse.Slice.slice",
"LowParse.Slice.srel_of_buffer_srel",
"LowParse.Bytes.byte",
"LowStar.Buffer.trivial_preorder",
"FStar.UInt32.t",
"Prims.nat",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_GreaterThan",
"Prims.op_LessThan",
"LowPa... | [] | false | false | false | false | false | let swrite_bounded_vlgenbytes
(h0: HS.mem)
(sout:
slice (srel_of_buffer_srel (B.trivial_preorder _))
(srel_of_buffer_srel (B.trivial_preorder _)))
(pout_from0: U32.t)
(min: nat)
(max: nat{min <= max /\ max > 0 /\ max < 4294967296})
(#kk: parser_kind)
(#pk:... | SWriter (Ghost.hide (FB.hide (B.as_seq h0 b)))
(fun pout_from ->
serialized_length_eq (serialize_bounded_vlgenbytes min max sk) (FB.hide (B.as_seq h0 b));
length_serialize_bounded_vlgenbytes min max sk (FB.hide (B.as_seq h0 b));
serialized_length_eq sk len;
let pout_payload = swrite (swrite_le... | false |
Sec2.HIFC.fst | Sec2.HIFC.test | val test (l: lref) (h: href)
: HIFC unit
(union (single l) bot)
(union bot (single h))
(add_source (single l) [bot, single h])
(requires fun _ -> True)
(ensures fun s0 _ s1 -> sel s1 h == sel s0 l) | val test (l: lref) (h: href)
: HIFC unit
(union (single l) bot)
(union bot (single h))
(add_source (single l) [bot, single h])
(requires fun _ -> True)
(ensures fun s0 _ s1 -> sel s1 h == sel s0 l) | let test (l:lref) (h:href)
: HIFC unit (union (single l) bot)
(union bot (single h))
(add_source (single l) [bot, single h])
(requires fun _ -> True)
(ensures fun s0 _ s1 -> sel s1 h == sel s0 l)
= let x = read l in
write h x | {
"file_name": "examples/layeredeffects/Sec2.HIFC.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 13,
"end_line": 767,
"start_col": 0,
"start_line": 760
} | module Sec2.HIFC
open FStar.List.Tot
open FStar.Map
let loc = int
type store = m:Map.t loc int{forall l. contains m l}
let upd (s:store) (l:loc) (x:int) : store = Map.upd s l x
let sel (s:store) (l:loc) : int = Map.sel s l
open FStar.Set
(*** A basic Hoare state monad ***)
let pre = store -> Type0
let post a = store -... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Set.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.Map.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.Classical.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Set",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Map",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.... | {
"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 | l: Sec2.HIFC.lref -> h: Sec2.HIFC.href -> Sec2.HIFC.HIFC Prims.unit | Sec2.HIFC.HIFC | [] | [] | [
"Sec2.HIFC.lref",
"Sec2.HIFC.href",
"Sec2.HIFC.write",
"Prims.unit",
"Prims.int",
"Sec2.HIFC.read",
"Sec2.HIFC.union",
"Sec2.HIFC.single",
"Sec2.HIFC.bot",
"Sec2.HIFC.add_source",
"Prims.Cons",
"Sec2.HIFC.flow",
"FStar.Pervasives.Native.Mktuple2",
"Sec2.HIFC.label",
"Prims.Nil",
"Sec2.... | [] | false | true | false | false | false | let test (l: lref) (h: href)
: HIFC unit
(union (single l) bot)
(union bot (single h))
(add_source (single l) [bot, single h])
(requires fun _ -> True)
(ensures fun s0 _ s1 -> sel s1 h == sel s0 l) =
| let x = read l in
write h x | false |
Hacl.Impl.Frodo.KEM.Decaps.fst | Hacl.Impl.Frodo.KEM.Decaps.get_bp_c_matrices | val get_bp_c_matrices:
a:FP.frodo_alg
-> ct:lbytes (crypto_ciphertextbytes a)
-> bp_matrix:matrix_t params_nbar (params_n a)
-> c_matrix:matrix_t params_nbar params_nbar
-> Stack unit
(requires fun h ->
live h ct /\ live h bp_matrix /\ live h c_matrix /\
disjoint bp_matrix ct /\ disjoint c_... | val get_bp_c_matrices:
a:FP.frodo_alg
-> ct:lbytes (crypto_ciphertextbytes a)
-> bp_matrix:matrix_t params_nbar (params_n a)
-> c_matrix:matrix_t params_nbar params_nbar
-> Stack unit
(requires fun h ->
live h ct /\ live h bp_matrix /\ live h c_matrix /\
disjoint bp_matrix ct /\ disjoint c_... | let get_bp_c_matrices a ct bp_matrix c_matrix =
let c1 = sub ct 0ul (ct1bytes_len a) in
let c2 = sub ct (ct1bytes_len a) (ct2bytes_len a) in
frodo_unpack params_nbar (params_n a) (params_logq a) c1 bp_matrix;
frodo_unpack params_nbar params_nbar (params_logq a) c2 c_matrix | {
"file_name": "code/frodo/Hacl.Impl.Frodo.KEM.Decaps.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 66,
"end_line": 48,
"start_col": 0,
"start_line": 44
} | module Hacl.Impl.Frodo.KEM.Decaps
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open LowStar.Buffer
open Lib.IntTypes
open Lib.Buffer
open Hacl.Impl.Matrix
open Hacl.Impl.Frodo.Params
open Hacl.Impl.Frodo.KEM
open Hacl.Impl.Frodo.KEM.Encaps
open Hacl.Impl.Frodo.Encode
open Hacl.Impl.Frodo.Pack
open ... | {
"checked_file": "/",
"dependencies": [
"Spec.Matrix.fst.checked",
"Spec.Frodo.Params.fst.checked",
"Spec.Frodo.KEM.Decaps.fst.checked",
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteBuffer.fsti.checked",
"L... | [
{
"abbrev": true,
"full_module": "Spec.Matrix",
"short_module": "M"
},
{
"abbrev": true,
"full_module": "Spec.Frodo.KEM.Decaps",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.Frodo.KEM.KeyGen",
"short_module": "KG"
},
{
"abbrev": true,
"fu... | {
"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: Spec.Frodo.Params.frodo_alg ->
ct: Hacl.Impl.Matrix.lbytes (Hacl.Impl.Frodo.Params.crypto_ciphertextbytes a) ->
bp_matrix:
Hacl.Impl.Matrix.matrix_t Hacl.Impl.Frodo.Params.params_nbar
(Hacl.Impl.Frodo.Params.params_n a) ->
c_matrix:
Hacl.Impl.Matrix.matrix_t Hacl.Impl.Frodo.Param... | FStar.HyperStack.ST.Stack | [] | [] | [
"Spec.Frodo.Params.frodo_alg",
"Hacl.Impl.Matrix.lbytes",
"Hacl.Impl.Frodo.Params.crypto_ciphertextbytes",
"Hacl.Impl.Matrix.matrix_t",
"Hacl.Impl.Frodo.Params.params_nbar",
"Hacl.Impl.Frodo.Params.params_n",
"Hacl.Impl.Frodo.Pack.frodo_unpack",
"Hacl.Impl.Frodo.Params.params_logq",
"Prims.unit",
... | [] | false | true | false | false | false | let get_bp_c_matrices a ct bp_matrix c_matrix =
| let c1 = sub ct 0ul (ct1bytes_len a) in
let c2 = sub ct (ct1bytes_len a) (ct2bytes_len a) in
frodo_unpack params_nbar (params_n a) (params_logq a) c1 bp_matrix;
frodo_unpack params_nbar params_nbar (params_logq a) c2 c_matrix | false |
Sec2.HIFC.fst | Sec2.HIFC.test3_1 | val test3_1 (l: lref) (h: href) (x: int)
: HIFC int
(single l)
(single h)
[]
(requires fun _ -> True)
(ensures fun s0 r s1 -> sel s1 h == 0 /\ r == sel s1 l) | val test3_1 (l: lref) (h: href) (x: int)
: HIFC int
(single l)
(single h)
[]
(requires fun _ -> True)
(ensures fun s0 r s1 -> sel s1 h == 0 /\ r == sel s1 l) | let test3_1 (l:lref) (h:href) (x:int)
: HIFC int (single l) (single h) []
(requires fun _ -> True)
(ensures fun s0 r s1 -> sel s1 h == 0 /\ r == sel s1 l)
= write h 0;
read l | {
"file_name": "examples/layeredeffects/Sec2.HIFC.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 10,
"end_line": 797,
"start_col": 0,
"start_line": 792
} | module Sec2.HIFC
open FStar.List.Tot
open FStar.Map
let loc = int
type store = m:Map.t loc int{forall l. contains m l}
let upd (s:store) (l:loc) (x:int) : store = Map.upd s l x
let sel (s:store) (l:loc) : int = Map.sel s l
open FStar.Set
(*** A basic Hoare state monad ***)
let pre = store -> Type0
let post a = store -... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Set.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.Map.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.Classical.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Set",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Map",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.... | {
"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 | l: Sec2.HIFC.lref -> h: Sec2.HIFC.href -> x: Prims.int -> Sec2.HIFC.HIFC Prims.int | Sec2.HIFC.HIFC | [] | [] | [
"Sec2.HIFC.lref",
"Sec2.HIFC.href",
"Prims.int",
"Sec2.HIFC.read",
"Prims.unit",
"Sec2.HIFC.write",
"Sec2.HIFC.single",
"Prims.Nil",
"Sec2.HIFC.flow",
"Sec2.HIFC.store",
"Prims.l_True",
"Prims.l_and",
"Prims.eq2",
"Sec2.HIFC.sel"
] | [] | false | true | false | false | false | let test3_1 (l: lref) (h: href) (x: int)
: HIFC int
(single l)
(single h)
[]
(requires fun _ -> True)
(ensures fun s0 r s1 -> sel s1 h == 0 /\ r == sel s1 l) =
| write h 0;
read l | false |
Sec2.HIFC.fst | Sec2.HIFC.lift_ist_hst | val lift_ist_hst (a r w fs p q: _) (x: hifc a r w fs p q)
: hst a p (fun s0 x s1 -> q s0 x s1 /\ modifies w s0 s1) | val lift_ist_hst (a r w fs p q: _) (x: hifc a r w fs p q)
: hst a p (fun s0 x s1 -> q s0 x s1 /\ modifies w s0 s1) | let lift_ist_hst a r w fs p q (x:hifc a r w fs p q)
: hst a p (fun s0 x s1 -> q s0 x s1 /\ modifies w s0 s1)
= frame _ _ _ _ x | {
"file_name": "examples/layeredeffects/Sec2.HIFC.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 19,
"end_line": 948,
"start_col": 0,
"start_line": 946
} | module Sec2.HIFC
open FStar.List.Tot
open FStar.Map
let loc = int
type store = m:Map.t loc int{forall l. contains m l}
let upd (s:store) (l:loc) (x:int) : store = Map.upd s l x
let sel (s:store) (l:loc) : int = Map.sel s l
open FStar.Set
(*** A basic Hoare state monad ***)
let pre = store -> Type0
let post a = store -... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Set.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.Map.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.Classical.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Set",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Map",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
a: Type ->
r: Sec2.HIFC.label ->
w: Sec2.HIFC.label ->
fs: Sec2.HIFC.flows ->
p: Sec2.HIFC.pre ->
q: Sec2.HIFC.post a ->
x: Sec2.HIFC.hifc a r w fs p q
-> Sec2.HIFC.hst a p (fun s0 x s1 -> q s0 x s1 /\ Sec2.HIFC.modifies w s0 s1) | Prims.Tot | [
"total"
] | [] | [
"Sec2.HIFC.label",
"Sec2.HIFC.flows",
"Sec2.HIFC.pre",
"Sec2.HIFC.post",
"Sec2.HIFC.hifc",
"Sec2.HIFC.frame",
"Sec2.HIFC.hst",
"Sec2.HIFC.store",
"Prims.l_and",
"Sec2.HIFC.modifies"
] | [] | false | false | false | false | false | let lift_ist_hst a r w fs p q (x: hifc a r w fs p q)
: hst a p (fun s0 x s1 -> q s0 x s1 /\ modifies w s0 s1) =
| frame _ _ _ _ x | false |
Sec2.HIFC.fst | Sec2.HIFC.test4 | val test4 (l: lref) (h: href) (x: int)
: HIFC int
(single h)
(single l)
[single h, bot]
(requires fun _ -> True)
(ensures fun s0 r s1 -> sel s1 l == x /\ r == sel s1 h) | val test4 (l: lref) (h: href) (x: int)
: HIFC int
(single h)
(single l)
[single h, bot]
(requires fun _ -> True)
(ensures fun s0 r s1 -> sel s1 l == x /\ r == sel s1 h) | let test4 (l:lref) (h:href) (x:int)
: HIFC int (single h) (single l) [single h, bot]
(requires fun _ -> True)
(ensures fun s0 r s1 -> sel s1 l == x /\ r == sel s1 h)
= write l x;
read h | {
"file_name": "examples/layeredeffects/Sec2.HIFC.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 10,
"end_line": 805,
"start_col": 0,
"start_line": 800
} | module Sec2.HIFC
open FStar.List.Tot
open FStar.Map
let loc = int
type store = m:Map.t loc int{forall l. contains m l}
let upd (s:store) (l:loc) (x:int) : store = Map.upd s l x
let sel (s:store) (l:loc) : int = Map.sel s l
open FStar.Set
(*** A basic Hoare state monad ***)
let pre = store -> Type0
let post a = store -... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Set.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.Map.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.Classical.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Set",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Map",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.... | {
"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 | l: Sec2.HIFC.lref -> h: Sec2.HIFC.href -> x: Prims.int -> Sec2.HIFC.HIFC Prims.int | Sec2.HIFC.HIFC | [] | [] | [
"Sec2.HIFC.lref",
"Sec2.HIFC.href",
"Prims.int",
"Sec2.HIFC.read",
"Prims.unit",
"Sec2.HIFC.write",
"Sec2.HIFC.single",
"Prims.Cons",
"Sec2.HIFC.flow",
"FStar.Pervasives.Native.Mktuple2",
"Sec2.HIFC.label",
"Sec2.HIFC.bot",
"Prims.Nil",
"Sec2.HIFC.store",
"Prims.l_True",
"Prims.l_and",... | [] | false | true | false | false | false | let test4 (l: lref) (h: href) (x: int)
: HIFC int
(single h)
(single l)
[single h, bot]
(requires fun _ -> True)
(ensures fun s0 r s1 -> sel s1 l == x /\ r == sel s1 h) =
| write l x;
read h | false |
Sec2.HIFC.fst | Sec2.HIFC.test5 | val test5 (l: lref) (h: href) (x: int)
: HIFC int
(single h)
(single l)
[]
(requires fun _ -> True)
(ensures fun s0 r s1 -> sel s1 l == x /\ r == sel s1 h) | val test5 (l: lref) (h: href) (x: int)
: HIFC int
(single h)
(single l)
[]
(requires fun _ -> True)
(ensures fun s0 r s1 -> sel s1 l == x /\ r == sel s1 h) | let test5 (l:lref) (h:href) (x:int)
: HIFC int (single h) (single l) []
(requires fun _ -> True)
(ensures fun s0 r s1 -> sel s1 l == x /\ r == sel s1 h)
= write l x;
read h | {
"file_name": "examples/layeredeffects/Sec2.HIFC.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 10,
"end_line": 812,
"start_col": 0,
"start_line": 807
} | module Sec2.HIFC
open FStar.List.Tot
open FStar.Map
let loc = int
type store = m:Map.t loc int{forall l. contains m l}
let upd (s:store) (l:loc) (x:int) : store = Map.upd s l x
let sel (s:store) (l:loc) : int = Map.sel s l
open FStar.Set
(*** A basic Hoare state monad ***)
let pre = store -> Type0
let post a = store -... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Set.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.Map.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.Classical.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Set",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Map",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.... | {
"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 | l: Sec2.HIFC.lref -> h: Sec2.HIFC.href -> x: Prims.int -> Sec2.HIFC.HIFC Prims.int | Sec2.HIFC.HIFC | [] | [] | [
"Sec2.HIFC.lref",
"Sec2.HIFC.href",
"Prims.int",
"Sec2.HIFC.read",
"Prims.unit",
"Sec2.HIFC.write",
"Sec2.HIFC.single",
"Prims.Nil",
"Sec2.HIFC.flow",
"Sec2.HIFC.store",
"Prims.l_True",
"Prims.l_and",
"Prims.eq2",
"Sec2.HIFC.sel"
] | [] | false | true | false | false | false | let test5 (l: lref) (h: href) (x: int)
: HIFC int
(single h)
(single l)
[]
(requires fun _ -> True)
(ensures fun s0 r s1 -> sel s1 l == x /\ r == sel s1 h) =
| write l x;
read h | false |
Sec2.HIFC.fst | Sec2.HIFC.test3 | val test3 (l: lref) (h: href)
: HIFC unit
(single l)
(single h)
[single l, single h]
(requires fun _ -> True)
(ensures fun s0 _ s1 -> sel s1 h == sel s0 l) | val test3 (l: lref) (h: href)
: HIFC unit
(single l)
(single h)
[single l, single h]
(requires fun _ -> True)
(ensures fun s0 _ s1 -> sel s1 h == sel s0 l) | let test3 (l:lref) (h:href)
: HIFC unit (single l)
(single h)
[single l, single h]
(requires fun _ -> True)
(ensures fun s0 _ s1 -> sel s1 h == sel s0 l)
= write h (read l) | {
"file_name": "examples/layeredeffects/Sec2.HIFC.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 20,
"end_line": 784,
"start_col": 0,
"start_line": 778
} | module Sec2.HIFC
open FStar.List.Tot
open FStar.Map
let loc = int
type store = m:Map.t loc int{forall l. contains m l}
let upd (s:store) (l:loc) (x:int) : store = Map.upd s l x
let sel (s:store) (l:loc) : int = Map.sel s l
open FStar.Set
(*** A basic Hoare state monad ***)
let pre = store -> Type0
let post a = store -... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Set.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.Map.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.Classical.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Set",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Map",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.... | {
"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 | l: Sec2.HIFC.lref -> h: Sec2.HIFC.href -> Sec2.HIFC.HIFC Prims.unit | Sec2.HIFC.HIFC | [] | [] | [
"Sec2.HIFC.lref",
"Sec2.HIFC.href",
"Sec2.HIFC.write",
"Prims.unit",
"Prims.int",
"Sec2.HIFC.read",
"Sec2.HIFC.single",
"Prims.Cons",
"Sec2.HIFC.flow",
"FStar.Pervasives.Native.Mktuple2",
"Sec2.HIFC.label",
"Prims.Nil",
"Sec2.HIFC.store",
"Prims.l_True",
"Prims.eq2",
"Sec2.HIFC.sel"
] | [] | false | true | false | false | false | let test3 (l: lref) (h: href)
: HIFC unit
(single l)
(single h)
[single l, single h]
(requires fun _ -> True)
(ensures fun s0 _ s1 -> sel s1 h == sel s0 l) =
| write h (read l) | false |
Sec2.HIFC.fst | Sec2.HIFC.assoc_hst | val assoc_hst : _: ((Sec2.HIFC.label * Sec2.HIFC.label) * Prims.list Sec2.HIFC.flow) ->
_: ((Sec2.HIFC.label * Sec2.HIFC.label) * Prims.list Sec2.HIFC.flow) ->
_: ((Sec2.HIFC.label * Sec2.HIFC.label) * Prims.list Sec2.HIFC.flow)
-> Prims.unit | let assoc_hst (w0, r0, fs0) (w1, r1, fs1) (w2, r2, fs2) =
calc (==) {
ifc_triple (w0, r0, fs0) (ifc_triple (w1, r1, fs1) (w2, r2, fs2)) ;
(==) { }
ifc_triple (w0, r0, fs0) (union w1 w2, union r1 r2, (fs1 @ add_source r1 ((bot, w2)::fs2)));
(==) { }
(union w0 (union w1 w2), union r0 (union r1 r2), ... | {
"file_name": "examples/layeredeffects/Sec2.HIFC.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 3,
"end_line": 532,
"start_col": 0,
"start_line": 496
} | module Sec2.HIFC
open FStar.List.Tot
open FStar.Map
let loc = int
type store = m:Map.t loc int{forall l. contains m l}
let upd (s:store) (l:loc) (x:int) : store = Map.upd s l x
let sel (s:store) (l:loc) : int = Map.sel s l
open FStar.Set
(*** A basic Hoare state monad ***)
let pre = store -> Type0
let post a = store -... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Set.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.Map.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.Classical.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Set",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Map",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.... | {
"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 |
_: ((Sec2.HIFC.label * Sec2.HIFC.label) * Prims.list Sec2.HIFC.flow) ->
_: ((Sec2.HIFC.label * Sec2.HIFC.label) * Prims.list Sec2.HIFC.flow) ->
_: ((Sec2.HIFC.label * Sec2.HIFC.label) * Prims.list Sec2.HIFC.flow)
-> Prims.unit | Prims.Tot | [
"total"
] | [] | [
"FStar.Pervasives.Native.tuple3",
"Sec2.HIFC.label",
"Prims.list",
"Sec2.HIFC.flow",
"FStar.Pervasives.Native.Mktuple3",
"FStar.Calc.calc_finish",
"FStar.Set.set",
"Sec2.HIFC.loc",
"Prims.eq2",
"Sec2.HIFC.ifc_triple",
"Sec2.HIFC.union",
"FStar.List.Tot.Base.op_At",
"Prims.Cons",
"FStar.Per... | [] | false | false | false | true | false | let assoc_hst (w0, r0, fs0) (w1, r1, fs1) (w2, r2, fs2) =
| calc ( == ) {
ifc_triple (w0, r0, fs0) (ifc_triple (w1, r1, fs1) (w2, r2, fs2));
( == ) { () }
ifc_triple (w0, r0, fs0) (union w1 w2, union r1 r2, (fs1 @ add_source r1 ((bot, w2) :: fs2)));
( == ) { () }
(union w0 (union w1 w2),
union r0 (union r1 r2),
fs0 @ (add_source r0 ((bot, union w1 w2) :: (fs1 ... | false | |
Sec2.HIFC.fst | Sec2.HIFC.test6 | val test6 (l: lref) (h: href)
: HIFC unit
low
high
[low, high]
(requires fun _ -> True)
(ensures fun s0 r s1 -> sel s1 h == sel s0 l) | val test6 (l: lref) (h: href)
: HIFC unit
low
high
[low, high]
(requires fun _ -> True)
(ensures fun s0 r s1 -> sel s1 h == sel s0 l) | let test6 (l:lref) (h:href)
: HIFC unit low high [low, high]
(requires fun _ -> True)
(ensures fun s0 r s1 -> sel s1 h == sel s0 l)
= let x = read l in
write h x | {
"file_name": "examples/layeredeffects/Sec2.HIFC.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 13,
"end_line": 819,
"start_col": 0,
"start_line": 814
} | module Sec2.HIFC
open FStar.List.Tot
open FStar.Map
let loc = int
type store = m:Map.t loc int{forall l. contains m l}
let upd (s:store) (l:loc) (x:int) : store = Map.upd s l x
let sel (s:store) (l:loc) : int = Map.sel s l
open FStar.Set
(*** A basic Hoare state monad ***)
let pre = store -> Type0
let post a = store -... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Set.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.Map.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.Classical.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Set",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Map",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.... | {
"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 | l: Sec2.HIFC.lref -> h: Sec2.HIFC.href -> Sec2.HIFC.HIFC Prims.unit | Sec2.HIFC.HIFC | [] | [] | [
"Sec2.HIFC.lref",
"Sec2.HIFC.href",
"Sec2.HIFC.write",
"Prims.unit",
"Prims.int",
"Sec2.HIFC.read",
"Sec2.HIFC.low",
"Sec2.HIFC.high",
"Prims.Cons",
"Sec2.HIFC.flow",
"FStar.Pervasives.Native.Mktuple2",
"Sec2.HIFC.label",
"Prims.Nil",
"Sec2.HIFC.store",
"Prims.l_True",
"Prims.eq2",
"... | [] | false | true | false | false | false | let test6 (l: lref) (h: href)
: HIFC unit
low
high
[low, high]
(requires fun _ -> True)
(ensures fun s0 r s1 -> sel s1 h == sel s0 l) =
| let x = read l in
write h x | false |
Sec2.HIFC.fst | Sec2.HIFC.refine_test8 | val refine_test8: l: lref -> h: href -> unit
-> HIFC unit
(union (single h) (single l))
(single l)
[]
(requires fun _ -> True)
(ensures fun s0 _ s1 -> sel s1 l == sel s0 l + 1) | val refine_test8: l: lref -> h: href -> unit
-> HIFC unit
(union (single h) (single l))
(single l)
[]
(requires fun _ -> True)
(ensures fun s0 _ s1 -> sel s1 l == sel s0 l + 1) | let refine_test8 (l:lref) (h:href)
: unit -> HIFC unit (union (single h) (single l)) (single l) []
(requires fun _ -> True)
(ensures fun s0 _ s1 -> sel s1 l == sel s0 l + 1)
= refine_flow (fun () -> test8 l h) | {
"file_name": "examples/layeredeffects/Sec2.HIFC.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 37,
"end_line": 850,
"start_col": 0,
"start_line": 846
} | module Sec2.HIFC
open FStar.List.Tot
open FStar.Map
let loc = int
type store = m:Map.t loc int{forall l. contains m l}
let upd (s:store) (l:loc) (x:int) : store = Map.upd s l x
let sel (s:store) (l:loc) : int = Map.sel s l
open FStar.Set
(*** A basic Hoare state monad ***)
let pre = store -> Type0
let post a = store -... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Set.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.Map.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.Classical.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Set",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Map",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.... | {
"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 | l: Sec2.HIFC.lref -> h: Sec2.HIFC.href -> _: Prims.unit -> Sec2.HIFC.HIFC Prims.unit | Sec2.HIFC.HIFC | [] | [] | [
"Sec2.HIFC.lref",
"Sec2.HIFC.href",
"Sec2.HIFC.refine_flow",
"Prims.unit",
"Sec2.HIFC.single",
"Sec2.HIFC.union",
"FStar.Pervasives.Native.Mktuple2",
"Sec2.HIFC.label",
"Prims.Nil",
"Sec2.HIFC.flow",
"Sec2.HIFC.store",
"Prims.l_True",
"Prims.eq2",
"Prims.int",
"Sec2.HIFC.sel",
"Prims.o... | [] | false | true | false | false | false | let refine_test8 (l: lref) (h: href)
: unit
-> HIFC unit
(union (single h) (single l))
(single l)
[]
(requires fun _ -> True)
(ensures fun s0 _ s1 -> sel s1 l == sel s0 l + 1) =
| refine_flow (fun () -> test8 l h) | false |
Sec2.HIFC.fst | Sec2.HIFC.test2 | val test2 (l: lref) (h: href)
: HIFC unit
(single l)
(single h)
[single l, single h]
(requires fun _ -> True)
(ensures fun s0 _ s1 -> sel s1 h == sel s0 l) | val test2 (l: lref) (h: href)
: HIFC unit
(single l)
(single h)
[single l, single h]
(requires fun _ -> True)
(ensures fun s0 _ s1 -> sel s1 h == sel s0 l) | let test2 (l:lref) (h:href)
: HIFC unit (single l)
(single h)
[single l, single h]
(requires fun _ -> True)
(ensures fun s0 _ s1 -> sel s1 h == sel s0 l)
= let x = read l in
write h x | {
"file_name": "examples/layeredeffects/Sec2.HIFC.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 13,
"end_line": 776,
"start_col": 0,
"start_line": 769
} | module Sec2.HIFC
open FStar.List.Tot
open FStar.Map
let loc = int
type store = m:Map.t loc int{forall l. contains m l}
let upd (s:store) (l:loc) (x:int) : store = Map.upd s l x
let sel (s:store) (l:loc) : int = Map.sel s l
open FStar.Set
(*** A basic Hoare state monad ***)
let pre = store -> Type0
let post a = store -... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Set.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.Map.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.Classical.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Set",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Map",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.... | {
"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 | l: Sec2.HIFC.lref -> h: Sec2.HIFC.href -> Sec2.HIFC.HIFC Prims.unit | Sec2.HIFC.HIFC | [] | [] | [
"Sec2.HIFC.lref",
"Sec2.HIFC.href",
"Sec2.HIFC.write",
"Prims.unit",
"Prims.int",
"Sec2.HIFC.read",
"Sec2.HIFC.single",
"Prims.Cons",
"Sec2.HIFC.flow",
"FStar.Pervasives.Native.Mktuple2",
"Sec2.HIFC.label",
"Prims.Nil",
"Sec2.HIFC.store",
"Prims.l_True",
"Prims.eq2",
"Sec2.HIFC.sel"
] | [] | false | true | false | false | false | let test2 (l: lref) (h: href)
: HIFC unit
(single l)
(single h)
[single l, single h]
(requires fun _ -> True)
(ensures fun s0 _ s1 -> sel s1 h == sel s0 l) =
| let x = read l in
write h x | false |
Sec2.HIFC.fst | Sec2.HIFC.test3_lab | val test3_lab (l: lref) (h: href)
: HIFC unit
low
high
[low, high]
(requires fun _ -> True)
(ensures fun s0 _ s1 -> sel s1 h == sel s0 l) | val test3_lab (l: lref) (h: href)
: HIFC unit
low
high
[low, high]
(requires fun _ -> True)
(ensures fun s0 _ s1 -> sel s1 h == sel s0 l) | let test3_lab (l:lref) (h:href)
: HIFC unit low high [low, high]
(requires fun _ -> True)
(ensures fun s0 _ s1 -> sel s1 h == sel s0 l)
= write h (read l) | {
"file_name": "examples/layeredeffects/Sec2.HIFC.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 20,
"end_line": 790,
"start_col": 0,
"start_line": 786
} | module Sec2.HIFC
open FStar.List.Tot
open FStar.Map
let loc = int
type store = m:Map.t loc int{forall l. contains m l}
let upd (s:store) (l:loc) (x:int) : store = Map.upd s l x
let sel (s:store) (l:loc) : int = Map.sel s l
open FStar.Set
(*** A basic Hoare state monad ***)
let pre = store -> Type0
let post a = store -... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Set.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.Map.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.Classical.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Set",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Map",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.... | {
"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 | l: Sec2.HIFC.lref -> h: Sec2.HIFC.href -> Sec2.HIFC.HIFC Prims.unit | Sec2.HIFC.HIFC | [] | [] | [
"Sec2.HIFC.lref",
"Sec2.HIFC.href",
"Sec2.HIFC.write",
"Prims.unit",
"Prims.int",
"Sec2.HIFC.read",
"Sec2.HIFC.low",
"Sec2.HIFC.high",
"Prims.Cons",
"Sec2.HIFC.flow",
"FStar.Pervasives.Native.Mktuple2",
"Sec2.HIFC.label",
"Prims.Nil",
"Sec2.HIFC.store",
"Prims.l_True",
"Prims.eq2",
"... | [] | false | true | false | false | false | let test3_lab (l: lref) (h: href)
: HIFC unit
low
high
[low, high]
(requires fun _ -> True)
(ensures fun s0 _ s1 -> sel s1 h == sel s0 l) =
| write h (read l) | false |
Sec2.HIFC.fst | Sec2.HIFC.refine_test9 | val refine_test9 (l: lref) (h: href)
: (unit
-> HIFC unit
(union (single h) (single l))
(single l)
[]
(requires fun _ -> True)
(ensures fun s0 _ s1 -> sel s1 l == sel s0 l)) | val refine_test9 (l: lref) (h: href)
: (unit
-> HIFC unit
(union (single h) (single l))
(single l)
[]
(requires fun _ -> True)
(ensures fun s0 _ s1 -> sel s1 l == sel s0 l)) | let refine_test9 (l:lref) (h:href)
: (unit -> HIFC unit (union (single h) (single l))
(single l)
[]
(requires fun _ -> True)
(ensures fun s0 _ s1 -> sel s1 l == sel s0 l))
= refine_flow (fun () -> test9 l h) | {
"file_name": "examples/layeredeffects/Sec2.HIFC.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 37,
"end_line": 870,
"start_col": 0,
"start_line": 864
} | module Sec2.HIFC
open FStar.List.Tot
open FStar.Map
let loc = int
type store = m:Map.t loc int{forall l. contains m l}
let upd (s:store) (l:loc) (x:int) : store = Map.upd s l x
let sel (s:store) (l:loc) : int = Map.sel s l
open FStar.Set
(*** A basic Hoare state monad ***)
let pre = store -> Type0
let post a = store -... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Set.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.Map.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.Classical.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Set",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Map",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.... | {
"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 | l: Sec2.HIFC.lref -> h: Sec2.HIFC.href -> _: Prims.unit -> Sec2.HIFC.HIFC Prims.unit | Sec2.HIFC.HIFC | [] | [] | [
"Sec2.HIFC.lref",
"Sec2.HIFC.href",
"Sec2.HIFC.refine_flow",
"Prims.unit",
"Sec2.HIFC.single",
"Sec2.HIFC.union",
"FStar.Pervasives.Native.Mktuple2",
"Sec2.HIFC.label",
"Prims.Nil",
"Sec2.HIFC.flow",
"Sec2.HIFC.store",
"Prims.l_True",
"Prims.eq2",
"Prims.int",
"Sec2.HIFC.sel",
"Sec2.HI... | [] | false | true | false | false | false | let refine_test9 (l: lref) (h: href)
: (unit
-> HIFC unit
(union (single h) (single l))
(single l)
[]
(requires fun _ -> True)
(ensures fun s0 _ s1 -> sel s1 l == sel s0 l)) =
| refine_flow (fun () -> test9 l h) | false |
Sec2.HIFC.fst | Sec2.HIFC.test15 | val test15 (l: lref)
: HIFC unit
(single l)
(single l)
[]
(requires fun _ -> True)
(ensures fun s0 _ s1 -> sel s0 l == sel s1 l) | val test15 (l: lref)
: HIFC unit
(single l)
(single l)
[]
(requires fun _ -> True)
(ensures fun s0 _ s1 -> sel s0 l == sel s1 l) | let test15 (l:lref)
: HIFC unit (single l) (single l) []
(requires fun _ -> True)
(ensures fun s0 _ s1 -> sel s0 l == sel s1 l)
= write l (read l) | {
"file_name": "examples/layeredeffects/Sec2.HIFC.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 20,
"end_line": 936,
"start_col": 0,
"start_line": 932
} | module Sec2.HIFC
open FStar.List.Tot
open FStar.Map
let loc = int
type store = m:Map.t loc int{forall l. contains m l}
let upd (s:store) (l:loc) (x:int) : store = Map.upd s l x
let sel (s:store) (l:loc) : int = Map.sel s l
open FStar.Set
(*** A basic Hoare state monad ***)
let pre = store -> Type0
let post a = store -... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Set.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.Map.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.Classical.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Set",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Map",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.... | {
"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 | l: Sec2.HIFC.lref -> Sec2.HIFC.HIFC Prims.unit | Sec2.HIFC.HIFC | [] | [] | [
"Sec2.HIFC.lref",
"Sec2.HIFC.write",
"Prims.unit",
"Prims.int",
"Sec2.HIFC.read",
"Sec2.HIFC.single",
"Prims.Nil",
"Sec2.HIFC.flow",
"Sec2.HIFC.store",
"Prims.l_True",
"Prims.eq2",
"Sec2.HIFC.sel"
] | [] | false | true | false | false | false | let test15 (l: lref)
: HIFC unit
(single l)
(single l)
[]
(requires fun _ -> True)
(ensures fun s0 _ s1 -> sel s0 l == sel s1 l) =
| write l (read l) | false |
Sec2.HIFC.fst | Sec2.HIFC.ist_exn | val ist_exn : a: Type ->
w: Sec2.HIFC.label ->
r: Sec2.HIFC.label ->
fs: Sec2.HIFC.flows ->
p: Sec2.HIFC.pre ->
q: Sec2.HIFC.post a
-> Type | let ist_exn a w r fs (p:pre) (q:post a) =
unit -> HIFC (option a) w r fs p
(fun s0 x s1 ->
match x with
| None -> True
| Some x -> q s0 x s1) | {
"file_name": "examples/layeredeffects/Sec2.HIFC.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 39,
"end_line": 943,
"start_col": 0,
"start_line": 938
} | module Sec2.HIFC
open FStar.List.Tot
open FStar.Map
let loc = int
type store = m:Map.t loc int{forall l. contains m l}
let upd (s:store) (l:loc) (x:int) : store = Map.upd s l x
let sel (s:store) (l:loc) : int = Map.sel s l
open FStar.Set
(*** A basic Hoare state monad ***)
let pre = store -> Type0
let post a = store -... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Set.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.Map.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.Classical.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Set",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Map",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
a: Type ->
w: Sec2.HIFC.label ->
r: Sec2.HIFC.label ->
fs: Sec2.HIFC.flows ->
p: Sec2.HIFC.pre ->
q: Sec2.HIFC.post a
-> Type | Prims.Tot | [
"total"
] | [] | [
"Sec2.HIFC.label",
"Sec2.HIFC.flows",
"Sec2.HIFC.pre",
"Sec2.HIFC.post",
"Prims.unit",
"FStar.Pervasives.Native.option",
"Sec2.HIFC.store",
"Prims.l_True"
] | [] | false | false | false | true | true | let ist_exn a w r fs (p: pre) (q: post a) =
| unit
-> HIFC (option a)
w
r
fs
p
(fun s0 x s1 ->
match x with
| None -> True
| Some x -> q s0 x s1) | false | |
Sec2.HIFC.fst | Sec2.HIFC.test10 | val test10: Prims.unit
-> IFC unit
(union cr0 (union cr1 cr2))
(union cw0 (union cw1 cw2))
(add_source cr0 ((bot, union cw1 cw2) :: (add_source cr1 [bot, cw2]))) | val test10: Prims.unit
-> IFC unit
(union cr0 (union cr1 cr2))
(union cw0 (union cw1 cw2))
(add_source cr0 ((bot, union cw1 cw2) :: (add_source cr1 [bot, cw2]))) | let test10 ()
: IFC unit (union cr0 (union cr1 cr2))
(union cw0 (union cw1 cw2))
(add_source cr0
((bot, union cw1 cw2)::
(add_source cr1 [bot, cw2])))
= c0 (); (c1();c2()) | {
"file_name": "examples/layeredeffects/Sec2.HIFC.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 22,
"end_line": 901,
"start_col": 0,
"start_line": 895
} | module Sec2.HIFC
open FStar.List.Tot
open FStar.Map
let loc = int
type store = m:Map.t loc int{forall l. contains m l}
let upd (s:store) (l:loc) (x:int) : store = Map.upd s l x
let sel (s:store) (l:loc) : int = Map.sel s l
open FStar.Set
(*** A basic Hoare state monad ***)
let pre = store -> Type0
let post a = store -... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Set.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.Map.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.Classical.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Set",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Map",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.... | {
"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 -> Sec2.HIFC.IFC Prims.unit | Sec2.HIFC.IFC | [] | [] | [
"Prims.unit",
"Sec2.HIFC.c2",
"Sec2.HIFC.c1",
"Sec2.HIFC.c0",
"Sec2.HIFC.union",
"Sec2.HIFC.cr0",
"Sec2.HIFC.cr1",
"Sec2.HIFC.cr2",
"Sec2.HIFC.cw0",
"Sec2.HIFC.cw1",
"Sec2.HIFC.cw2",
"Sec2.HIFC.add_source",
"Prims.Cons",
"Sec2.HIFC.flow",
"FStar.Pervasives.Native.Mktuple2",
"Sec2.HIFC.... | [] | false | true | false | false | false | let test10 ()
: IFC unit
(union cr0 (union cr1 cr2))
(union cw0 (union cw1 cw2))
(add_source cr0 ((bot, union cw1 cw2) :: (add_source cr1 [bot, cw2]))) =
| c0 ();
(c1 ();
c2 ()) | false |
Sec2.HIFC.fst | Sec2.HIFC.test13 | val test13: Prims.unit
-> IFC unit
(union (union cr0 cr1) cr2)
(union (union cw0 cw1) cw2)
(add_source cr0 [bot, cw1] @ add_source (union cr0 cr1) [bot, cw2]) | val test13: Prims.unit
-> IFC unit
(union (union cr0 cr1) cr2)
(union (union cw0 cw1) cw2)
(add_source cr0 [bot, cw1] @ add_source (union cr0 cr1) [bot, cw2]) | let test13 ()
: IFC unit (union (union cr0 cr1) cr2)
(union (union cw0 cw1) cw2)
(add_source cr0 [bot, cw1] @
add_source (union cr0 cr1) [bot, cw2])
= (c0 (); c1());c2() | {
"file_name": "examples/layeredeffects/Sec2.HIFC.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 22,
"end_line": 923,
"start_col": 0,
"start_line": 918
} | module Sec2.HIFC
open FStar.List.Tot
open FStar.Map
let loc = int
type store = m:Map.t loc int{forall l. contains m l}
let upd (s:store) (l:loc) (x:int) : store = Map.upd s l x
let sel (s:store) (l:loc) : int = Map.sel s l
open FStar.Set
(*** A basic Hoare state monad ***)
let pre = store -> Type0
let post a = store -... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Set.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.Map.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.Classical.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Set",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Map",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.... | {
"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 -> Sec2.HIFC.IFC Prims.unit | Sec2.HIFC.IFC | [] | [] | [
"Prims.unit",
"Sec2.HIFC.c2",
"Sec2.HIFC.c1",
"Sec2.HIFC.c0",
"Sec2.HIFC.union",
"Sec2.HIFC.cr0",
"Sec2.HIFC.cr1",
"Sec2.HIFC.cr2",
"Sec2.HIFC.cw0",
"Sec2.HIFC.cw1",
"Sec2.HIFC.cw2",
"FStar.List.Tot.Base.op_At",
"Sec2.HIFC.flow",
"Sec2.HIFC.add_source",
"Prims.Cons",
"FStar.Pervasives.... | [] | false | true | false | false | false | let test13 ()
: IFC unit
(union (union cr0 cr1) cr2)
(union (union cw0 cw1) cw2)
(add_source cr0 [bot, cw1] @ add_source (union cr0 cr1) [bot, cw2]) =
| (c0 ();
c1 ());
c2 () | false |
Sec2.HIFC.fst | Sec2.HIFC.test7 | val test7 (l: lref) (h: href)
: HIFC unit
(single h)
(single l)
[high, low]
(requires fun _ -> True)
(ensures fun s0 r s1 -> sel s1 l == sel s0 h) | val test7 (l: lref) (h: href)
: HIFC unit
(single h)
(single l)
[high, low]
(requires fun _ -> True)
(ensures fun s0 r s1 -> sel s1 l == sel s0 h) | let test7 (l:lref) (h:href)
: HIFC unit (single h) (single l) [high, low]
(requires fun _ -> True)
(ensures fun s0 r s1 -> sel s1 l == sel s0 h)
= let x = read h in
write l x | {
"file_name": "examples/layeredeffects/Sec2.HIFC.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 13,
"end_line": 827,
"start_col": 0,
"start_line": 822
} | module Sec2.HIFC
open FStar.List.Tot
open FStar.Map
let loc = int
type store = m:Map.t loc int{forall l. contains m l}
let upd (s:store) (l:loc) (x:int) : store = Map.upd s l x
let sel (s:store) (l:loc) : int = Map.sel s l
open FStar.Set
(*** A basic Hoare state monad ***)
let pre = store -> Type0
let post a = store -... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Set.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.Map.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.Classical.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Set",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Map",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.... | {
"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 | l: Sec2.HIFC.lref -> h: Sec2.HIFC.href -> Sec2.HIFC.HIFC Prims.unit | Sec2.HIFC.HIFC | [] | [] | [
"Sec2.HIFC.lref",
"Sec2.HIFC.href",
"Sec2.HIFC.write",
"Prims.unit",
"Prims.int",
"Sec2.HIFC.read",
"Sec2.HIFC.single",
"Prims.Cons",
"Sec2.HIFC.flow",
"FStar.Pervasives.Native.Mktuple2",
"Sec2.HIFC.label",
"Sec2.HIFC.high",
"Sec2.HIFC.low",
"Prims.Nil",
"Sec2.HIFC.store",
"Prims.l_Tru... | [] | false | true | false | false | false | let test7 (l: lref) (h: href)
: HIFC unit
(single h)
(single l)
[high, low]
(requires fun _ -> True)
(ensures fun s0 r s1 -> sel s1 l == sel s0 h) =
| let x = read h in
write l x | false |
Sec2.HIFC.fst | Sec2.HIFC.test8 | val test8 (l: lref) (h: href)
: HIFC unit
(union (single h) (single l))
(single l)
[(single h, single l)]
(requires fun _ -> True)
(ensures fun s0 _ s1 -> sel s1 l == sel s0 l + 1) | val test8 (l: lref) (h: href)
: HIFC unit
(union (single h) (single l))
(single l)
[(single h, single l)]
(requires fun _ -> True)
(ensures fun s0 _ s1 -> sel s1 l == sel s0 l + 1) | let test8 (l:lref) (h:href)
: HIFC unit (union (single h) (single l)) (single l) [(single h, single l)]
(requires fun _ -> True)
(ensures fun s0 _ s1 -> sel s1 l == sel s0 l + 1)
= let x0 = read h in
let x = read l in
write l (x + 1) | {
"file_name": "examples/layeredeffects/Sec2.HIFC.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 19,
"end_line": 837,
"start_col": 0,
"start_line": 831
} | module Sec2.HIFC
open FStar.List.Tot
open FStar.Map
let loc = int
type store = m:Map.t loc int{forall l. contains m l}
let upd (s:store) (l:loc) (x:int) : store = Map.upd s l x
let sel (s:store) (l:loc) : int = Map.sel s l
open FStar.Set
(*** A basic Hoare state monad ***)
let pre = store -> Type0
let post a = store -... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Set.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.Map.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.Classical.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Set",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Map",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.... | {
"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 | l: Sec2.HIFC.lref -> h: Sec2.HIFC.href -> Sec2.HIFC.HIFC Prims.unit | Sec2.HIFC.HIFC | [] | [] | [
"Sec2.HIFC.lref",
"Sec2.HIFC.href",
"Sec2.HIFC.write",
"Prims.op_Addition",
"Prims.unit",
"Prims.int",
"Sec2.HIFC.read",
"Sec2.HIFC.union",
"Sec2.HIFC.single",
"Prims.Cons",
"Sec2.HIFC.flow",
"FStar.Pervasives.Native.Mktuple2",
"Sec2.HIFC.label",
"Prims.Nil",
"Sec2.HIFC.store",
"Prims.... | [] | false | true | false | false | false | let test8 (l: lref) (h: href)
: HIFC unit
(union (single h) (single l))
(single l)
[(single h, single l)]
(requires fun _ -> True)
(ensures fun s0 _ s1 -> sel s1 l == sel s0 l + 1) =
| let x0 = read h in
let x = read l in
write l (x + 1) | false |
Sec2.HIFC.fst | Sec2.HIFC.test14 | val test14: Prims.unit
-> IFC unit
(union (union cr0 cr1) cr2)
(union (union cw0 cw1) cw2)
([cr0, cw1; union cr0 cr1, cw2]) | val test14: Prims.unit
-> IFC unit
(union (union cr0 cr1) cr2)
(union (union cw0 cw1) cw2)
([cr0, cw1; union cr0 cr1, cw2]) | let test14 ()
: IFC unit (union (union cr0 cr1) cr2)
(union (union cw0 cw1) cw2)
([cr0, cw1;
union cr0 cr1, cw2])
= (c0 (); c1()); c2() | {
"file_name": "examples/layeredeffects/Sec2.HIFC.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 23,
"end_line": 930,
"start_col": 0,
"start_line": 925
} | module Sec2.HIFC
open FStar.List.Tot
open FStar.Map
let loc = int
type store = m:Map.t loc int{forall l. contains m l}
let upd (s:store) (l:loc) (x:int) : store = Map.upd s l x
let sel (s:store) (l:loc) : int = Map.sel s l
open FStar.Set
(*** A basic Hoare state monad ***)
let pre = store -> Type0
let post a = store -... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Set.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.Map.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.Classical.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Set",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Map",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.... | {
"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 -> Sec2.HIFC.IFC Prims.unit | Sec2.HIFC.IFC | [] | [] | [
"Prims.unit",
"Sec2.HIFC.c2",
"Sec2.HIFC.c1",
"Sec2.HIFC.c0",
"Sec2.HIFC.union",
"Sec2.HIFC.cr0",
"Sec2.HIFC.cr1",
"Sec2.HIFC.cr2",
"Sec2.HIFC.cw0",
"Sec2.HIFC.cw1",
"Sec2.HIFC.cw2",
"Prims.Cons",
"Sec2.HIFC.flow",
"FStar.Pervasives.Native.Mktuple2",
"Sec2.HIFC.label",
"Prims.Nil"
] | [] | false | true | false | false | false | let test14 ()
: IFC unit
(union (union cr0 cr1) cr2)
(union (union cw0 cw1) cw2)
([cr0, cw1; union cr0 cr1, cw2]) =
| (c0 ();
c1 ());
c2 () | false |
Hacl.Impl.Frodo.KEM.Decaps.fst | Hacl.Impl.Frodo.KEM.Decaps.crypto_kem_dec_mu | val crypto_kem_dec_mu:
a:FP.frodo_alg
-> sk:lbytes (crypto_secretkeybytes a)
-> bp_matrix:matrix_t params_nbar (params_n a)
-> c_matrix:matrix_t params_nbar params_nbar
-> mu_decode:lbytes (bytes_mu a)
-> Stack unit
(requires fun h ->
live h sk /\ live h mu_decode /\
live h bp_matrix /\ l... | val crypto_kem_dec_mu:
a:FP.frodo_alg
-> sk:lbytes (crypto_secretkeybytes a)
-> bp_matrix:matrix_t params_nbar (params_n a)
-> c_matrix:matrix_t params_nbar params_nbar
-> mu_decode:lbytes (bytes_mu a)
-> Stack unit
(requires fun h ->
live h sk /\ live h mu_decode /\
live h bp_matrix /\ l... | let crypto_kem_dec_mu a sk bp_matrix c_matrix mu_decode =
FP.expand_crypto_secretkeybytes a;
let s_bytes = sub sk (crypto_bytes a +! crypto_publickeybytes a) (secretmatrixbytes_len a) in
frodo_mu_decode a s_bytes bp_matrix c_matrix mu_decode | {
"file_name": "code/frodo/Hacl.Impl.Frodo.KEM.Decaps.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 56,
"end_line": 330,
"start_col": 0,
"start_line": 327
} | module Hacl.Impl.Frodo.KEM.Decaps
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open LowStar.Buffer
open Lib.IntTypes
open Lib.Buffer
open Hacl.Impl.Matrix
open Hacl.Impl.Frodo.Params
open Hacl.Impl.Frodo.KEM
open Hacl.Impl.Frodo.KEM.Encaps
open Hacl.Impl.Frodo.Encode
open Hacl.Impl.Frodo.Pack
open ... | {
"checked_file": "/",
"dependencies": [
"Spec.Matrix.fst.checked",
"Spec.Frodo.Params.fst.checked",
"Spec.Frodo.KEM.Decaps.fst.checked",
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteBuffer.fsti.checked",
"L... | [
{
"abbrev": true,
"full_module": "Spec.Matrix",
"short_module": "M"
},
{
"abbrev": true,
"full_module": "Spec.Frodo.KEM.Decaps",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.Frodo.KEM.KeyGen",
"short_module": "KG"
},
{
"abbrev": true,
"fu... | {
"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: Spec.Frodo.Params.frodo_alg ->
sk: Hacl.Impl.Matrix.lbytes (Hacl.Impl.Frodo.Params.crypto_secretkeybytes a) ->
bp_matrix:
Hacl.Impl.Matrix.matrix_t Hacl.Impl.Frodo.Params.params_nbar
(Hacl.Impl.Frodo.Params.params_n a) ->
c_matrix:
Hacl.Impl.Matrix.matrix_t Hacl.Impl.Frodo.Params... | FStar.HyperStack.ST.Stack | [] | [] | [
"Spec.Frodo.Params.frodo_alg",
"Hacl.Impl.Matrix.lbytes",
"Hacl.Impl.Frodo.Params.crypto_secretkeybytes",
"Hacl.Impl.Matrix.matrix_t",
"Hacl.Impl.Frodo.Params.params_nbar",
"Hacl.Impl.Frodo.Params.params_n",
"Hacl.Impl.Frodo.Params.bytes_mu",
"Hacl.Impl.Frodo.KEM.Decaps.frodo_mu_decode",
"Prims.unit... | [] | false | true | false | false | false | let crypto_kem_dec_mu a sk bp_matrix c_matrix mu_decode =
| FP.expand_crypto_secretkeybytes a;
let s_bytes = sub sk (crypto_bytes a +! crypto_publickeybytes a) (secretmatrixbytes_len a) in
frodo_mu_decode a s_bytes bp_matrix c_matrix mu_decode | false |
Sec2.HIFC.fst | Sec2.HIFC.test9 | val test9 (l: lref) (h: href)
: HIFC unit
(union (single h) (single l))
(single l)
[((single l) `union` (single h), single l)]
(requires fun _ -> True)
(ensures fun s0 _ s1 -> sel s1 l == sel s0 l) | val test9 (l: lref) (h: href)
: HIFC unit
(union (single h) (single l))
(single l)
[((single l) `union` (single h), single l)]
(requires fun _ -> True)
(ensures fun s0 _ s1 -> sel s1 l == sel s0 l) | let test9 (l:lref) (h:href)
: HIFC unit (union (single h) (single l)) (single l)
[(single l `union` single h, single l)]
(requires fun _ -> True)
(ensures fun s0 _ s1 -> sel s1 l == sel s0 l)
= let x= (let x0 = read h in
read l)
in
write l x | {
"file_name": "examples/layeredeffects/Sec2.HIFC.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 13,
"end_line": 862,
"start_col": 0,
"start_line": 854
} | module Sec2.HIFC
open FStar.List.Tot
open FStar.Map
let loc = int
type store = m:Map.t loc int{forall l. contains m l}
let upd (s:store) (l:loc) (x:int) : store = Map.upd s l x
let sel (s:store) (l:loc) : int = Map.sel s l
open FStar.Set
(*** A basic Hoare state monad ***)
let pre = store -> Type0
let post a = store -... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Set.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.Map.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.Classical.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Set",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Map",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.... | {
"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 | l: Sec2.HIFC.lref -> h: Sec2.HIFC.href -> Sec2.HIFC.HIFC Prims.unit | Sec2.HIFC.HIFC | [] | [] | [
"Sec2.HIFC.lref",
"Sec2.HIFC.href",
"Sec2.HIFC.write",
"Prims.unit",
"Prims.int",
"Sec2.HIFC.read",
"Sec2.HIFC.union",
"Sec2.HIFC.single",
"Prims.Cons",
"Sec2.HIFC.flow",
"FStar.Pervasives.Native.Mktuple2",
"Sec2.HIFC.label",
"Prims.Nil",
"Sec2.HIFC.store",
"Prims.l_True",
"Prims.eq2",... | [] | false | true | false | false | false | let test9 (l: lref) (h: href)
: HIFC unit
(union (single h) (single l))
(single l)
[((single l) `union` (single h), single l)]
(requires fun _ -> True)
(ensures fun s0 _ s1 -> sel s1 l == sel s0 l) =
| let x =
(let x0 = read h in
read l)
in
write l x | false |
Sec2.HIFC.fst | Sec2.HIFC.test12 | val test12: Prims.unit
-> IFC unit
(union cr0 (union cr1 cr2))
(union cw0 (union cw1 cw2))
[(cr0, union cw1 cw2); (union cr0 cr1, cw2)] | val test12: Prims.unit
-> IFC unit
(union cr0 (union cr1 cr2))
(union cw0 (union cw1 cw2))
[(cr0, union cw1 cw2); (union cr0 cr1, cw2)] | let test12 ()
: IFC unit (union cr0 (union cr1 cr2))
(union cw0 (union cw1 cw2))
[(cr0, union cw1 cw2);
(union cr0 cr1, cw2)]
= c0 (); (c1();c2()) | {
"file_name": "examples/layeredeffects/Sec2.HIFC.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 22,
"end_line": 909,
"start_col": 0,
"start_line": 904
} | module Sec2.HIFC
open FStar.List.Tot
open FStar.Map
let loc = int
type store = m:Map.t loc int{forall l. contains m l}
let upd (s:store) (l:loc) (x:int) : store = Map.upd s l x
let sel (s:store) (l:loc) : int = Map.sel s l
open FStar.Set
(*** A basic Hoare state monad ***)
let pre = store -> Type0
let post a = store -... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Set.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.Map.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.Classical.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Set",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Map",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.... | {
"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 -> Sec2.HIFC.IFC Prims.unit | Sec2.HIFC.IFC | [] | [] | [
"Prims.unit",
"Sec2.HIFC.c2",
"Sec2.HIFC.c1",
"Sec2.HIFC.c0",
"Sec2.HIFC.union",
"Sec2.HIFC.cr0",
"Sec2.HIFC.cr1",
"Sec2.HIFC.cr2",
"Sec2.HIFC.cw0",
"Sec2.HIFC.cw1",
"Sec2.HIFC.cw2",
"Prims.Cons",
"Sec2.HIFC.flow",
"FStar.Pervasives.Native.Mktuple2",
"Sec2.HIFC.label",
"Prims.Nil"
] | [] | false | true | false | false | false | let test12 ()
: IFC unit
(union cr0 (union cr1 cr2))
(union cw0 (union cw1 cw2))
[(cr0, union cw1 cw2); (union cr0 cr1, cw2)] =
| c0 ();
(c1 ();
c2 ()) | false |
Hacl.Spec.K256.Qinv.fst | Hacl.Spec.K256.Qinv.qinv_lemma | val qinv_lemma: f:S.qelem -> Lemma (qinv f == M.pow f (S.q - 2) % S.q) | val qinv_lemma: f:S.qelem -> Lemma (qinv f == M.pow f (S.q - 2) % S.q) | let qinv_lemma f =
let x_1 = f in
let x_10 = qsquare_times f 1 in
qsquare_times_lemma f 1;
assert_norm (pow2 1 = 0x2);
assert (x_10 == M.pow f 0x2 % S.q);
let x_11 = S.qmul x_10 x_1 in
lemma_pow_mod_1 f;
lemma_pow_mod_mul f 0x2 0x1;
assert (x_11 == M.pow f 0x3 % S.q);
let x_101 = S.qmul x_10 x_11... | {
"file_name": "code/k256/Hacl.Spec.K256.Qinv.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 98,
"end_line": 371,
"start_col": 0,
"start_line": 174
} | module Hacl.Spec.K256.Qinv
open FStar.Mul
module SE = Spec.Exponentiation
module LE = Lib.Exponentiation
module M = Lib.NatMod
module S = Spec.K256
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
let nat_mod_comm_monoid = M.mk_nat_mod_comm_monoid S.q
let mk_to_nat_mod_comm_monoid : SE.to_comm_monoid S.qelem = {
... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"Spec.Exponentiation.fsti.checked",
"prims.fst.checked",
"Lib.NatMod.fsti.checked",
"Lib.Exponentiation.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FSt... | [
{
"abbrev": true,
"full_module": "Spec.K256",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Lib.NatMod",
"short_module": "M"
},
{
"abbrev": true,
"full_module": "Lib.Exponentiation",
"short_module": "LE"
},
{
"abbrev": true,
"full_module": "Spec.Exp... | {
"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: Spec.K256.PointOps.qelem
-> FStar.Pervasives.Lemma
(ensures
Hacl.Spec.K256.Qinv.qinv f ==
Lib.NatMod.pow f (Spec.K256.PointOps.q - 2) % Spec.K256.PointOps.q) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Spec.K256.PointOps.qelem",
"Prims._assert",
"Prims.eq2",
"Prims.int",
"Prims.op_Modulus",
"Lib.NatMod.pow",
"Spec.K256.PointOps.q",
"Prims.unit",
"Hacl.Spec.K256.Qinv.lemma_pow_pow_mod_mul",
"FStar.Pervasives.assert_norm",
"Prims.b2t",
"Prims.op_Equality",
"Prims.pow2",
"Hacl.Spec.K256.Qi... | [] | true | false | true | false | false | let qinv_lemma f =
| let x_1 = f in
let x_10 = qsquare_times f 1 in
qsquare_times_lemma f 1;
assert_norm (pow2 1 = 0x2);
assert (x_10 == M.pow f 0x2 % S.q);
let x_11 = S.qmul x_10 x_1 in
lemma_pow_mod_1 f;
lemma_pow_mod_mul f 0x2 0x1;
assert (x_11 == M.pow f 0x3 % S.q);
let x_101 = S.qmul x_10 x_11 in
lemma_pow_mod_mul f 0x2 0x3;
assert (x... | false |
Sec2.HIFC.fst | Sec2.HIFC.test12_1 | val test12_1: Prims.unit
-> IFC unit
(union cr0 (union cr1 cr2))
(union cw0 (union cw1 cw2))
[(cr0, cw1); (union cr0 cr1, cw2)] | val test12_1: Prims.unit
-> IFC unit
(union cr0 (union cr1 cr2))
(union cw0 (union cw1 cw2))
[(cr0, cw1); (union cr0 cr1, cw2)] | let test12_1 ()
: IFC unit (union cr0 (union cr1 cr2))
(union cw0 (union cw1 cw2))
[(cr0, cw1); (union cr0 cr1, cw2)]
= c0 (); (c1();c2()) | {
"file_name": "examples/layeredeffects/Sec2.HIFC.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 22,
"end_line": 915,
"start_col": 0,
"start_line": 911
} | module Sec2.HIFC
open FStar.List.Tot
open FStar.Map
let loc = int
type store = m:Map.t loc int{forall l. contains m l}
let upd (s:store) (l:loc) (x:int) : store = Map.upd s l x
let sel (s:store) (l:loc) : int = Map.sel s l
open FStar.Set
(*** A basic Hoare state monad ***)
let pre = store -> Type0
let post a = store -... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Set.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.Map.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.Classical.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Set",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Map",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.... | {
"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 -> Sec2.HIFC.IFC Prims.unit | Sec2.HIFC.IFC | [] | [] | [
"Prims.unit",
"Sec2.HIFC.c2",
"Sec2.HIFC.c1",
"Sec2.HIFC.c0",
"Sec2.HIFC.union",
"Sec2.HIFC.cr0",
"Sec2.HIFC.cr1",
"Sec2.HIFC.cr2",
"Sec2.HIFC.cw0",
"Sec2.HIFC.cw1",
"Sec2.HIFC.cw2",
"Prims.Cons",
"Sec2.HIFC.flow",
"FStar.Pervasives.Native.Mktuple2",
"Sec2.HIFC.label",
"Prims.Nil"
] | [] | false | true | false | false | false | let test12_1 ()
: IFC unit
(union cr0 (union cr1 cr2))
(union cw0 (union cw1 cw2))
[(cr0, cw1); (union cr0 cr1, cw2)] =
| c0 ();
(c1 ();
c2 ()) | false |
Hacl.Impl.Frodo.KEM.Decaps.fst | Hacl.Impl.Frodo.KEM.Decaps.crypto_kem_dec_ss0 | val crypto_kem_dec_ss0:
a:FP.frodo_alg
-> ct:lbytes (crypto_ciphertextbytes a)
-> mask:uint16{v mask == 0 \/ v mask == v (ones U16 SEC)}
-> kp:lbytes (crypto_bytes a)
-> s:lbytes (crypto_bytes a)
-> ss:lbytes (crypto_bytes a)
-> Stack unit
(requires fun h ->
live h ct /\ live h kp /\ live h s ... | val crypto_kem_dec_ss0:
a:FP.frodo_alg
-> ct:lbytes (crypto_ciphertextbytes a)
-> mask:uint16{v mask == 0 \/ v mask == v (ones U16 SEC)}
-> kp:lbytes (crypto_bytes a)
-> s:lbytes (crypto_bytes a)
-> ss:lbytes (crypto_bytes a)
-> Stack unit
(requires fun h ->
live h ct /\ live h kp /\ live h s ... | let crypto_kem_dec_ss0 a ct mask kp s ss =
push_frame ();
let kp_s = create (crypto_bytes a) (u8 0) in
Lib.ByteBuffer.buf_mask_select kp s (to_u8 mask) kp_s;
let ss_init_len = crypto_ciphertextbytes a +! crypto_bytes a in
let ss_init = create ss_init_len (u8 0) in
concat2 (crypto_ciphertextbytes a) ct (cry... | {
"file_name": "code/frodo/Hacl.Impl.Frodo.KEM.Decaps.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 14,
"end_line": 224,
"start_col": 0,
"start_line": 213
} | module Hacl.Impl.Frodo.KEM.Decaps
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open LowStar.Buffer
open Lib.IntTypes
open Lib.Buffer
open Hacl.Impl.Matrix
open Hacl.Impl.Frodo.Params
open Hacl.Impl.Frodo.KEM
open Hacl.Impl.Frodo.KEM.Encaps
open Hacl.Impl.Frodo.Encode
open Hacl.Impl.Frodo.Pack
open ... | {
"checked_file": "/",
"dependencies": [
"Spec.Matrix.fst.checked",
"Spec.Frodo.Params.fst.checked",
"Spec.Frodo.KEM.Decaps.fst.checked",
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteBuffer.fsti.checked",
"L... | [
{
"abbrev": true,
"full_module": "Spec.Matrix",
"short_module": "M"
},
{
"abbrev": true,
"full_module": "Spec.Frodo.KEM.Decaps",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.Frodo.KEM.KeyGen",
"short_module": "KG"
},
{
"abbrev": true,
"fu... | {
"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: Spec.Frodo.Params.frodo_alg ->
ct: Hacl.Impl.Matrix.lbytes (Hacl.Impl.Frodo.Params.crypto_ciphertextbytes a) ->
mask:
Lib.IntTypes.uint16
{ Lib.IntTypes.v mask == 0 \/
Lib.IntTypes.v mask ==
Lib.IntTypes.v (Lib.IntTypes.ones Lib.IntTypes.U16 Lib.IntTypes.SEC) } ->
k... | FStar.HyperStack.ST.Stack | [] | [] | [
"Spec.Frodo.Params.frodo_alg",
"Hacl.Impl.Matrix.lbytes",
"Hacl.Impl.Frodo.Params.crypto_ciphertextbytes",
"Lib.IntTypes.uint16",
"Prims.l_or",
"Prims.eq2",
"Prims.int",
"Lib.IntTypes.v",
"Lib.IntTypes.U16",
"Lib.IntTypes.SEC",
"Lib.IntTypes.range_t",
"Lib.IntTypes.ones",
"Hacl.Impl.Frodo.Pa... | [] | false | true | false | false | false | let crypto_kem_dec_ss0 a ct mask kp s ss =
| push_frame ();
let kp_s = create (crypto_bytes a) (u8 0) in
Lib.ByteBuffer.buf_mask_select kp s (to_u8 mask) kp_s;
let ss_init_len = crypto_ciphertextbytes a +! crypto_bytes a in
let ss_init = create ss_init_len (u8 0) in
concat2 (crypto_ciphertextbytes a) ct (crypto_bytes a) kp_s ss_init;
frodo_shake a ss_init_len ss_... | false |
FStar.InteractiveHelpers.Tutorial.fst | FStar.InteractiveHelpers.Tutorial.ci_ex1_ | val ci_ex1_ (x: nat) : unit | val ci_ex1_ (x: nat) : unit | let ci_ex1_ (x : nat) : unit =
let y = x in
assert(x == y); (* <- Use C-c C-e C-e here *)
() | {
"file_name": "examples/interactive/FStar.InteractiveHelpers.Tutorial.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 4,
"end_line": 139,
"start_col": 0,
"start_line": 136
} | module FStar.InteractiveHelpers.Tutorial
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module B = LowStar.Buffer
open FStar.List
open FStar.Tactics.V2
open FStar.Mul
open FStar.InteractiveHelpers.Tutorial.Definitions
/// WARNING: if a command fails, it is very likely because of the below issue
/// The... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.List.fst.checked",
"FStar.InteractiveHelpers.Tutorial.Definitions.fst.... | [
{
"abbrev": true,
"full_module": "FStar.InteractiveHelpers",
"short_module": "FI"
},
{
"abbrev": false,
"full_module": "FStar.InteractiveHelpers.Tutorial.Definitions",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
... | {
"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 | x: Prims.nat -> Prims.unit | Prims.Tot | [
"total"
] | [] | [
"Prims.nat",
"Prims.unit",
"Prims._assert",
"Prims.eq2"
] | [] | false | false | false | true | false | let ci_ex1_ (x: nat) : unit =
| let y = x in
assert (x == y);
() | false |
FStar.InteractiveHelpers.Tutorial.fst | FStar.InteractiveHelpers.Tutorial.invariant1 | val invariant1 : h: FStar.Monotonic.HyperStack.mem ->
r1: LowStar.Buffer.buffer Prims.int ->
r2: LowStar.Buffer.buffer Prims.int ->
r3: LowStar.Buffer.buffer Prims.int
-> Prims.GTot Prims.logical | let invariant1 (h : HS.mem) (r1 r2 r3 : B.buffer int) =
let l1 = B.as_seq h r1 in
let l2 = B.as_seq h r2 in
let l3 = B.as_seq h r3 in
invariant1_s l1 l2 l3 /\
B.live h r1 /\ B.live h r2 /\ B.live h r3 /\
B.disjoint r1 r2 /\ B.disjoint r2 r3 /\ B.disjoint r1 r3 | {
"file_name": "examples/interactive/FStar.InteractiveHelpers.Tutorial.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 58,
"end_line": 289,
"start_col": 0,
"start_line": 283
} | module FStar.InteractiveHelpers.Tutorial
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module B = LowStar.Buffer
open FStar.List
open FStar.Tactics.V2
open FStar.Mul
open FStar.InteractiveHelpers.Tutorial.Definitions
/// WARNING: if a command fails, it is very likely because of the below issue
/// The... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.List.fst.checked",
"FStar.InteractiveHelpers.Tutorial.Definitions.fst.... | [
{
"abbrev": true,
"full_module": "FStar.InteractiveHelpers",
"short_module": "FI"
},
{
"abbrev": false,
"full_module": "FStar.InteractiveHelpers.Tutorial.Definitions",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
... | {
"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 ->
r1: LowStar.Buffer.buffer Prims.int ->
r2: LowStar.Buffer.buffer Prims.int ->
r3: LowStar.Buffer.buffer Prims.int
-> Prims.GTot Prims.logical | Prims.GTot | [
"sometrivial"
] | [] | [
"FStar.Monotonic.HyperStack.mem",
"LowStar.Buffer.buffer",
"Prims.int",
"Prims.l_and",
"FStar.InteractiveHelpers.Tutorial.invariant1_s",
"LowStar.Monotonic.Buffer.live",
"LowStar.Buffer.trivial_preorder",
"LowStar.Monotonic.Buffer.disjoint",
"FStar.Seq.Base.seq",
"LowStar.Monotonic.Buffer.as_seq",... | [] | false | false | false | false | true | let invariant1 (h: HS.mem) (r1 r2 r3: B.buffer int) =
| let l1 = B.as_seq h r1 in
let l2 = B.as_seq h r2 in
let l3 = B.as_seq h r3 in
invariant1_s l1 l2 l3 /\ B.live h r1 /\ B.live h r2 /\ B.live h r3 /\ B.disjoint r1 r2 /\
B.disjoint r2 r3 /\ B.disjoint r1 r3 | false | |
FStar.InteractiveHelpers.Tutorial.fst | FStar.InteractiveHelpers.Tutorial.invariant1_s | val invariant1_s : l1: FStar.Seq.Base.seq Prims.int ->
l2: FStar.Seq.Base.seq Prims.int ->
l3: FStar.Seq.Base.seq Prims.int
-> Prims.logical | let invariant1_s (l1 l2 l3 : Seq.seq int) =
lpred1 l1 l2 /\
lpred2 l2 l3 /\
lpred3 l3 l1 | {
"file_name": "examples/interactive/FStar.InteractiveHelpers.Tutorial.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 14,
"end_line": 281,
"start_col": 0,
"start_line": 278
} | module FStar.InteractiveHelpers.Tutorial
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module B = LowStar.Buffer
open FStar.List
open FStar.Tactics.V2
open FStar.Mul
open FStar.InteractiveHelpers.Tutorial.Definitions
/// WARNING: if a command fails, it is very likely because of the below issue
/// The... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.List.fst.checked",
"FStar.InteractiveHelpers.Tutorial.Definitions.fst.... | [
{
"abbrev": true,
"full_module": "FStar.InteractiveHelpers",
"short_module": "FI"
},
{
"abbrev": false,
"full_module": "FStar.InteractiveHelpers.Tutorial.Definitions",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
... | {
"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 |
l1: FStar.Seq.Base.seq Prims.int ->
l2: FStar.Seq.Base.seq Prims.int ->
l3: FStar.Seq.Base.seq Prims.int
-> Prims.logical | Prims.Tot | [
"total"
] | [] | [
"FStar.Seq.Base.seq",
"Prims.int",
"Prims.l_and",
"FStar.InteractiveHelpers.Tutorial.Definitions.lpred1",
"FStar.InteractiveHelpers.Tutorial.Definitions.lpred2",
"FStar.InteractiveHelpers.Tutorial.Definitions.lpred3",
"Prims.logical"
] | [] | false | false | false | true | true | let invariant1_s (l1 l2 l3: Seq.seq int) =
| lpred1 l1 l2 /\ lpred2 l2 l3 /\ lpred3 l3 l1 | false | |
Hacl.EC.K256.fst | Hacl.EC.K256.mk_point_at_inf | val mk_point_at_inf: p:P.point -> Stack unit
(requires fun h -> live h p)
(ensures fun h0 _ h1 -> modifies (loc p) h0 h1 /\
P.point_inv h1 p /\ S.to_aff_point (P.point_eval h1 p) == S.aff_point_at_inf) | val mk_point_at_inf: p:P.point -> Stack unit
(requires fun h -> live h p)
(ensures fun h0 _ h1 -> modifies (loc p) h0 h1 /\
P.point_inv h1 p /\ S.to_aff_point (P.point_eval h1 p) == S.aff_point_at_inf) | let mk_point_at_inf p =
P.make_point_at_inf p | {
"file_name": "code/k256/Hacl.EC.K256.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 23,
"end_line": 234,
"start_col": 0,
"start_line": 233
} | module Hacl.EC.K256
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
module ST = FStar.HyperStack.ST
module BSeq = Lib.ByteSequence
module S = Spec.K256
module F = Hacl.K256.Field
module Q = Hacl.K256.Scalar
module FI = Hacl.Impl.K256.Finv
module P = Hacl.Impl.K256.P... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.K256.Field52.Lemmas.fsti.checked",
"Hacl.K256.Scalar.fsti.checked",
"Hacl.K256.Field.fsti.checked... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Field52.Lemmas",
"short_module": "BL"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.K256.PointMul",
"short_module": "PM"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.K256.PointDouble",
"short_module": "PD"
},
{
"... | {
"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 | p: Hacl.Impl.K256.Point.point -> FStar.HyperStack.ST.Stack Prims.unit | FStar.HyperStack.ST.Stack | [] | [] | [
"Hacl.Impl.K256.Point.point",
"Hacl.Impl.K256.Point.make_point_at_inf",
"Prims.unit"
] | [] | false | true | false | false | false | let mk_point_at_inf p =
| P.make_point_at_inf p | false |
Hacl.EC.K256.fst | Hacl.EC.K256.mk_base_point | val mk_base_point: p:P.point -> Stack unit
(requires fun h -> live h p)
(ensures fun h0 _ h1 -> modifies (loc p) h0 h1 /\
P.point_inv h1 p /\ P.point_eval h1 p == S.g) | val mk_base_point: p:P.point -> Stack unit
(requires fun h -> live h p)
(ensures fun h0 _ h1 -> modifies (loc p) h0 h1 /\
P.point_inv h1 p /\ P.point_eval h1 p == S.g) | let mk_base_point p =
P.make_g p | {
"file_name": "code/k256/Hacl.EC.K256.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 12,
"end_line": 246,
"start_col": 0,
"start_line": 245
} | module Hacl.EC.K256
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
module ST = FStar.HyperStack.ST
module BSeq = Lib.ByteSequence
module S = Spec.K256
module F = Hacl.K256.Field
module Q = Hacl.K256.Scalar
module FI = Hacl.Impl.K256.Finv
module P = Hacl.Impl.K256.P... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.K256.Field52.Lemmas.fsti.checked",
"Hacl.K256.Scalar.fsti.checked",
"Hacl.K256.Field.fsti.checked... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Field52.Lemmas",
"short_module": "BL"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.K256.PointMul",
"short_module": "PM"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.K256.PointDouble",
"short_module": "PD"
},
{
"... | {
"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 | p: Hacl.Impl.K256.Point.point -> FStar.HyperStack.ST.Stack Prims.unit | FStar.HyperStack.ST.Stack | [] | [] | [
"Hacl.Impl.K256.Point.point",
"Hacl.Impl.K256.Point.make_g",
"Prims.unit"
] | [] | false | true | false | false | false | let mk_base_point p =
| P.make_g p | false |
FStar.InteractiveHelpers.Tutorial.fst | FStar.InteractiveHelpers.Tutorial.dbg_ex1 | val dbg_ex1: Prims.unit -> Tot nat | val dbg_ex1: Prims.unit -> Tot nat | let dbg_ex1 () : Tot nat =
let x = 4 in
let y = 2 in
f1 x y | {
"file_name": "examples/interactive/FStar.InteractiveHelpers.Tutorial.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 8,
"end_line": 369,
"start_col": 0,
"start_line": 366
} | module FStar.InteractiveHelpers.Tutorial
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module B = LowStar.Buffer
open FStar.List
open FStar.Tactics.V2
open FStar.Mul
open FStar.InteractiveHelpers.Tutorial.Definitions
/// WARNING: if a command fails, it is very likely because of the below issue
/// The... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.List.fst.checked",
"FStar.InteractiveHelpers.Tutorial.Definitions.fst.... | [
{
"abbrev": true,
"full_module": "FStar.InteractiveHelpers",
"short_module": "FI"
},
{
"abbrev": false,
"full_module": "FStar.InteractiveHelpers.Tutorial.Definitions",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
... | {
"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 | _: Prims.unit -> Prims.nat | Prims.Tot | [
"total"
] | [] | [
"Prims.unit",
"FStar.InteractiveHelpers.Tutorial.Definitions.f1",
"Prims.int",
"Prims.nat"
] | [] | false | false | false | true | false | let dbg_ex1 () : Tot nat =
| let x = 4 in
let y = 2 in
f1 x y | false |
Hacl.Spec.P256.Qinv.fst | Hacl.Spec.P256.Qinv.qinv_lemma | val qinv_lemma: f:S.qelem -> Lemma (qinv f == M.pow f (S.order - 2) % S.order) | val qinv_lemma: f:S.qelem -> Lemma (qinv f == M.pow f (S.order - 2) % S.order) | let qinv_lemma f =
let x_10 = qsquare_times f 1 in
qsquare_times_lemma f 1;
assert_norm (pow2 1 = 0x2);
assert (x_10 == M.pow f 0x2 % S.order);
let x_11 = S.qmul x_10 f in
lemma_pow_mod_1 f;
lemma_pow_mod_mul f 0x2 0x1;
assert (x_11 == M.pow f 0x3 % S.order);
let x_101 = S.qmul x_10 x_11 in
lemma_... | {
"file_name": "code/ecdsap256/Hacl.Spec.P256.Qinv.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 96,
"end_line": 398,
"start_col": 0,
"start_line": 184
} | module Hacl.Spec.P256.Qinv
open FStar.Mul
module SE = Spec.Exponentiation
module LE = Lib.Exponentiation
module M = Lib.NatMod
module S = Spec.P256
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
let nat_mod_comm_monoid = M.mk_nat_mod_comm_monoid S.order
let mk_to_nat_mod_comm_monoid : SE.to_comm_monoid S.qelem = ... | {
"checked_file": "/",
"dependencies": [
"Spec.P256.fst.checked",
"Spec.Exponentiation.fsti.checked",
"prims.fst.checked",
"Lib.NatMod.fsti.checked",
"Lib.Exponentiation.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FSt... | [
{
"abbrev": true,
"full_module": "Spec.P256",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Lib.NatMod",
"short_module": "M"
},
{
"abbrev": true,
"full_module": "Lib.Exponentiation",
"short_module": "LE"
},
{
"abbrev": true,
"full_module": "Spec.Exp... | {
"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: Spec.P256.PointOps.qelem
-> FStar.Pervasives.Lemma
(ensures
Hacl.Spec.P256.Qinv.qinv f ==
Lib.NatMod.pow f (Spec.P256.PointOps.order - 2) % Spec.P256.PointOps.order) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Spec.P256.PointOps.qelem",
"FStar.Pervasives.assert_norm",
"Prims.b2t",
"Prims.op_Equality",
"Prims.int",
"Prims.op_Subtraction",
"Spec.P256.PointOps.order",
"Prims.unit",
"Prims._assert",
"Prims.eq2",
"Prims.op_Modulus",
"Lib.NatMod.pow",
"Hacl.Spec.P256.Qinv.lemma_pow_pow_mod_mul",
"Hac... | [] | true | false | true | false | false | let qinv_lemma f =
| let x_10 = qsquare_times f 1 in
qsquare_times_lemma f 1;
assert_norm (pow2 1 = 0x2);
assert (x_10 == M.pow f 0x2 % S.order);
let x_11 = S.qmul x_10 f in
lemma_pow_mod_1 f;
lemma_pow_mod_mul f 0x2 0x1;
assert (x_11 == M.pow f 0x3 % S.order);
let x_101 = S.qmul x_10 x_11 in
lemma_pow_mod_mul f 0x2 0x3;
assert (x_101 == M... | false |
Hacl.Impl.Frodo.KEM.Decaps.fst | Hacl.Impl.Frodo.KEM.Decaps.crypto_kem_dec_seed_se_k | val crypto_kem_dec_seed_se_k:
a:FP.frodo_alg
-> mu_decode:lbytes (bytes_mu a)
-> sk:lbytes (crypto_secretkeybytes a)
-> seed_se_k:lbytes (2ul *! crypto_bytes a)
-> Stack unit
(requires fun h ->
live h mu_decode /\ live h sk /\ live h seed_se_k /\
disjoint mu_decode seed_se_k /\ disjoint sk s... | val crypto_kem_dec_seed_se_k:
a:FP.frodo_alg
-> mu_decode:lbytes (bytes_mu a)
-> sk:lbytes (crypto_secretkeybytes a)
-> seed_se_k:lbytes (2ul *! crypto_bytes a)
-> Stack unit
(requires fun h ->
live h mu_decode /\ live h sk /\ live h seed_se_k /\
disjoint mu_decode seed_se_k /\ disjoint sk s... | let crypto_kem_dec_seed_se_k a mu_decode sk seed_se_k =
push_frame ();
let pkh_mu_decode_len = bytes_pkhash a +! bytes_mu a in
let pkh_mu_decode = create pkh_mu_decode_len (u8 0) in
let pkh = sub sk (crypto_secretkeybytes a -! bytes_pkhash a) (bytes_pkhash a) in
concat2 (bytes_pkhash a) pkh (bytes_mu a) mu_d... | {
"file_name": "code/frodo/Hacl.Impl.Frodo.KEM.Decaps.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 14,
"end_line": 248,
"start_col": 0,
"start_line": 240
} | module Hacl.Impl.Frodo.KEM.Decaps
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open LowStar.Buffer
open Lib.IntTypes
open Lib.Buffer
open Hacl.Impl.Matrix
open Hacl.Impl.Frodo.Params
open Hacl.Impl.Frodo.KEM
open Hacl.Impl.Frodo.KEM.Encaps
open Hacl.Impl.Frodo.Encode
open Hacl.Impl.Frodo.Pack
open ... | {
"checked_file": "/",
"dependencies": [
"Spec.Matrix.fst.checked",
"Spec.Frodo.Params.fst.checked",
"Spec.Frodo.KEM.Decaps.fst.checked",
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteBuffer.fsti.checked",
"L... | [
{
"abbrev": true,
"full_module": "Spec.Matrix",
"short_module": "M"
},
{
"abbrev": true,
"full_module": "Spec.Frodo.KEM.Decaps",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.Frodo.KEM.KeyGen",
"short_module": "KG"
},
{
"abbrev": true,
"fu... | {
"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: Spec.Frodo.Params.frodo_alg ->
mu_decode: Hacl.Impl.Matrix.lbytes (Hacl.Impl.Frodo.Params.bytes_mu a) ->
sk: Hacl.Impl.Matrix.lbytes (Hacl.Impl.Frodo.Params.crypto_secretkeybytes a) ->
seed_se_k: Hacl.Impl.Matrix.lbytes (2ul *! Hacl.Impl.Frodo.Params.crypto_bytes a)
-> FStar.HyperStack.ST.Stack Pr... | FStar.HyperStack.ST.Stack | [] | [] | [
"Spec.Frodo.Params.frodo_alg",
"Hacl.Impl.Matrix.lbytes",
"Hacl.Impl.Frodo.Params.bytes_mu",
"Hacl.Impl.Frodo.Params.crypto_secretkeybytes",
"Lib.IntTypes.op_Star_Bang",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"FStar.UInt32.__uint_to_t",
"Hacl.Impl.Frodo.Params.crypto_bytes",
"FStar.HyperStack.ST.... | [] | false | true | false | false | false | let crypto_kem_dec_seed_se_k a mu_decode sk seed_se_k =
| push_frame ();
let pkh_mu_decode_len = bytes_pkhash a +! bytes_mu a in
let pkh_mu_decode = create pkh_mu_decode_len (u8 0) in
let pkh = sub sk (crypto_secretkeybytes a -! bytes_pkhash a) (bytes_pkhash a) in
concat2 (bytes_pkhash a) pkh (bytes_mu a) mu_decode pkh_mu_decode;
frodo_shake a pkh_mu_decode_len pkh_mu_decode ... | false |
Hacl.EC.K256.fst | Hacl.EC.K256.mk_felem_zero | val mk_felem_zero: f:F.felem -> Stack unit
(requires fun h -> live h f)
(ensures fun h0 _ h1 -> modifies (loc f) h0 h1 /\
F.inv_lazy_reduced2 h1 f /\ F.feval h1 f == S.zero) | val mk_felem_zero: f:F.felem -> Stack unit
(requires fun h -> live h f)
(ensures fun h0 _ h1 -> modifies (loc f) h0 h1 /\
F.inv_lazy_reduced2 h1 f /\ F.feval h1 f == S.zero) | let mk_felem_zero f =
Math.Lemmas.small_mod S.zero S.prime;
F.set_zero f | {
"file_name": "code/k256/Hacl.EC.K256.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 14,
"end_line": 46,
"start_col": 0,
"start_line": 44
} | module Hacl.EC.K256
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
module ST = FStar.HyperStack.ST
module BSeq = Lib.ByteSequence
module S = Spec.K256
module F = Hacl.K256.Field
module Q = Hacl.K256.Scalar
module FI = Hacl.Impl.K256.Finv
module P = Hacl.Impl.K256.P... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.K256.Field52.Lemmas.fsti.checked",
"Hacl.K256.Scalar.fsti.checked",
"Hacl.K256.Field.fsti.checked... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Field52.Lemmas",
"short_module": "BL"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.K256.PointMul",
"short_module": "PM"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.K256.PointDouble",
"short_module": "PD"
},
{
"... | {
"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: Hacl.K256.Field.felem -> FStar.HyperStack.ST.Stack Prims.unit | FStar.HyperStack.ST.Stack | [] | [] | [
"Hacl.K256.Field.felem",
"Hacl.K256.Field.set_zero",
"Prims.unit",
"FStar.Math.Lemmas.small_mod",
"Spec.K256.PointOps.zero",
"Spec.K256.PointOps.prime"
] | [] | false | true | false | false | false | let mk_felem_zero f =
| Math.Lemmas.small_mod S.zero S.prime;
F.set_zero f | false |
EtM.Ideal.fsti | EtM.Ideal.ind_cpa_rest_adv | val ind_cpa_rest_adv : b: Prims.bool{EtM.Ideal.ind_cpa ==> b} | let ind_cpa_rest_adv = uf_cma | {
"file_name": "examples/crypto/EtM.Ideal.fsti",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 29,
"end_line": 23,
"start_col": 0,
"start_line": 23
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": false,
"source_file": "EtM.Ideal.fsti"
} | [
{
"abbrev": false,
"full_module": "EtM",
"short_module": null
},
{
"abbrev": false,
"full_module": "EtM",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"shor... | {
"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: Prims.bool{EtM.Ideal.ind_cpa ==> b} | Prims.Tot | [
"total"
] | [] | [
"EtM.Ideal.uf_cma"
] | [] | false | false | false | false | false | let ind_cpa_rest_adv =
| uf_cma | false | |
Hacl.EC.K256.fst | Hacl.EC.K256.mk_felem_one | val mk_felem_one: f:F.felem -> Stack unit
(requires fun h -> live h f)
(ensures fun h0 _ h1 -> modifies (loc f) h0 h1 /\
F.inv_lazy_reduced2 h1 f /\ F.feval h1 f == S.one) | val mk_felem_one: f:F.felem -> Stack unit
(requires fun h -> live h f)
(ensures fun h0 _ h1 -> modifies (loc f) h0 h1 /\
F.inv_lazy_reduced2 h1 f /\ F.feval h1 f == S.one) | let mk_felem_one f =
Math.Lemmas.small_mod S.one S.prime;
F.set_one f | {
"file_name": "code/k256/Hacl.EC.K256.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 13,
"end_line": 59,
"start_col": 0,
"start_line": 57
} | module Hacl.EC.K256
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
module ST = FStar.HyperStack.ST
module BSeq = Lib.ByteSequence
module S = Spec.K256
module F = Hacl.K256.Field
module Q = Hacl.K256.Scalar
module FI = Hacl.Impl.K256.Finv
module P = Hacl.Impl.K256.P... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.K256.Field52.Lemmas.fsti.checked",
"Hacl.K256.Scalar.fsti.checked",
"Hacl.K256.Field.fsti.checked... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Field52.Lemmas",
"short_module": "BL"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.K256.PointMul",
"short_module": "PM"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.K256.PointDouble",
"short_module": "PD"
},
{
"... | {
"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: Hacl.K256.Field.felem -> FStar.HyperStack.ST.Stack Prims.unit | FStar.HyperStack.ST.Stack | [] | [] | [
"Hacl.K256.Field.felem",
"Hacl.K256.Field.set_one",
"Prims.unit",
"FStar.Math.Lemmas.small_mod",
"Spec.K256.PointOps.one",
"Spec.K256.PointOps.prime"
] | [] | false | true | false | false | false | let mk_felem_one f =
| Math.Lemmas.small_mod S.one S.prime;
F.set_one f | false |
Hacl.EC.K256.fst | Hacl.EC.K256.felem_add | val felem_add (a b out:F.felem) : Stack unit
(requires fun h ->
live h a /\ live h b /\ live h out /\
eq_or_disjoint out a /\ eq_or_disjoint out b /\ eq_or_disjoint a b /\
F.inv_lazy_reduced2 h a /\ F.inv_lazy_reduced2 h b)
(ensures fun h0 _ h1 -> modifies (loc out) h0 h1 /\
F.inv_lazy_reduced2 h1 ... | val felem_add (a b out:F.felem) : Stack unit
(requires fun h ->
live h a /\ live h b /\ live h out /\
eq_or_disjoint out a /\ eq_or_disjoint out b /\ eq_or_disjoint a b /\
F.inv_lazy_reduced2 h a /\ F.inv_lazy_reduced2 h b)
(ensures fun h0 _ h1 -> modifies (loc out) h0 h1 /\
F.inv_lazy_reduced2 h1 ... | let felem_add a b out =
let h0 = ST.get () in
BL.fadd5_lemma (1,1,1,1,2) (1,1,1,1,2) (F.as_felem5 h0 a) (F.as_felem5 h0 b);
F.fadd out a b;
let h1 = ST.get () in
assert (F.felem_fits5 (F.as_felem5 h1 out) (2,2,2,2,4));
BL.normalize_weak5_lemma (2,2,2,2,4) (F.as_felem5 h1 out);
F.fnormalize_weak out out | {
"file_name": "code/k256/Hacl.EC.K256.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 27,
"end_line": 85,
"start_col": 0,
"start_line": 78
} | module Hacl.EC.K256
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
module ST = FStar.HyperStack.ST
module BSeq = Lib.ByteSequence
module S = Spec.K256
module F = Hacl.K256.Field
module Q = Hacl.K256.Scalar
module FI = Hacl.Impl.K256.Finv
module P = Hacl.Impl.K256.P... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.K256.Field52.Lemmas.fsti.checked",
"Hacl.K256.Scalar.fsti.checked",
"Hacl.K256.Field.fsti.checked... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Field52.Lemmas",
"short_module": "BL"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.K256.PointMul",
"short_module": "PM"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.K256.PointDouble",
"short_module": "PD"
},
{
"... | {
"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.K256.Field.felem -> b: Hacl.K256.Field.felem -> out: Hacl.K256.Field.felem
-> FStar.HyperStack.ST.Stack Prims.unit | FStar.HyperStack.ST.Stack | [] | [] | [
"Hacl.K256.Field.felem",
"Hacl.K256.Field.fnormalize_weak",
"Prims.unit",
"Hacl.Spec.K256.Field52.Lemmas.normalize_weak5_lemma",
"FStar.Pervasives.Native.Mktuple5",
"Prims.nat",
"Hacl.K256.Field.as_felem5",
"Prims._assert",
"Hacl.Spec.K256.Field52.Definitions.felem_fits5",
"FStar.Monotonic.HyperSt... | [] | false | true | false | false | false | let felem_add a b out =
| let h0 = ST.get () in
BL.fadd5_lemma (1, 1, 1, 1, 2) (1, 1, 1, 1, 2) (F.as_felem5 h0 a) (F.as_felem5 h0 b);
F.fadd out a b;
let h1 = ST.get () in
assert (F.felem_fits5 (F.as_felem5 h1 out) (2, 2, 2, 2, 4));
BL.normalize_weak5_lemma (2, 2, 2, 2, 4) (F.as_felem5 h1 out);
F.fnormalize_weak out out | false |
Hacl.Impl.Frodo.KEM.Decaps.fst | Hacl.Impl.Frodo.KEM.Decaps.crypto_kem_dec0 | val crypto_kem_dec0:
a:FP.frodo_alg
-> gen_a:FP.frodo_gen_a{is_supported gen_a}
-> ss:lbytes (crypto_bytes a)
-> ct:lbytes (crypto_ciphertextbytes a)
-> sk:lbytes (crypto_secretkeybytes a)
-> bp_matrix:matrix_t params_nbar (params_n a)
-> c_matrix:matrix_t params_nbar params_nbar
-> mu_decode:lbytes ... | val crypto_kem_dec0:
a:FP.frodo_alg
-> gen_a:FP.frodo_gen_a{is_supported gen_a}
-> ss:lbytes (crypto_bytes a)
-> ct:lbytes (crypto_ciphertextbytes a)
-> sk:lbytes (crypto_secretkeybytes a)
-> bp_matrix:matrix_t params_nbar (params_n a)
-> c_matrix:matrix_t params_nbar params_nbar
-> mu_decode:lbytes ... | let crypto_kem_dec0 a gen_a ss ct sk bp_matrix c_matrix mu_decode =
crypto_kem_dec_mu a sk bp_matrix c_matrix mu_decode;
crypto_kem_dec_ss2 a gen_a ct sk mu_decode bp_matrix c_matrix ss | {
"file_name": "code/frodo/Hacl.Impl.Frodo.KEM.Decaps.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 66,
"end_line": 356,
"start_col": 0,
"start_line": 354
} | module Hacl.Impl.Frodo.KEM.Decaps
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open LowStar.Buffer
open Lib.IntTypes
open Lib.Buffer
open Hacl.Impl.Matrix
open Hacl.Impl.Frodo.Params
open Hacl.Impl.Frodo.KEM
open Hacl.Impl.Frodo.KEM.Encaps
open Hacl.Impl.Frodo.Encode
open Hacl.Impl.Frodo.Pack
open ... | {
"checked_file": "/",
"dependencies": [
"Spec.Matrix.fst.checked",
"Spec.Frodo.Params.fst.checked",
"Spec.Frodo.KEM.Decaps.fst.checked",
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteBuffer.fsti.checked",
"L... | [
{
"abbrev": true,
"full_module": "Spec.Matrix",
"short_module": "M"
},
{
"abbrev": true,
"full_module": "Spec.Frodo.KEM.Decaps",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.Frodo.KEM.KeyGen",
"short_module": "KG"
},
{
"abbrev": true,
"fu... | {
"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: Spec.Frodo.Params.frodo_alg ->
gen_a: Spec.Frodo.Params.frodo_gen_a{Hacl.Impl.Frodo.Params.is_supported gen_a} ->
ss: Hacl.Impl.Matrix.lbytes (Hacl.Impl.Frodo.Params.crypto_bytes a) ->
ct: Hacl.Impl.Matrix.lbytes (Hacl.Impl.Frodo.Params.crypto_ciphertextbytes a) ->
sk: Hacl.Impl.Matrix.lbytes (H... | FStar.HyperStack.ST.Stack | [] | [] | [
"Spec.Frodo.Params.frodo_alg",
"Spec.Frodo.Params.frodo_gen_a",
"Prims.b2t",
"Hacl.Impl.Frodo.Params.is_supported",
"Hacl.Impl.Matrix.lbytes",
"Hacl.Impl.Frodo.Params.crypto_bytes",
"Hacl.Impl.Frodo.Params.crypto_ciphertextbytes",
"Hacl.Impl.Frodo.Params.crypto_secretkeybytes",
"Hacl.Impl.Matrix.mat... | [] | false | true | false | false | false | let crypto_kem_dec0 a gen_a ss ct sk bp_matrix c_matrix mu_decode =
| crypto_kem_dec_mu a sk bp_matrix c_matrix mu_decode;
crypto_kem_dec_ss2 a gen_a ct sk mu_decode bp_matrix c_matrix ss | false |
EtM.Ideal.fsti | EtM.Ideal.conf | val conf : Prims.bool | let conf = ind_cpa && uf_cma | {
"file_name": "examples/crypto/EtM.Ideal.fsti",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 28,
"end_line": 26,
"start_col": 0,
"start_line": 26
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": false,
"source_file": "EtM.Ideal.fsti"
} | [
{
"abbrev": false,
"full_module": "EtM",
"short_module": null
},
{
"abbrev": false,
"full_module": "EtM",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"shor... | {
"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.bool | Prims.Tot | [
"total"
] | [] | [
"Prims.op_AmpAmp",
"EtM.Ideal.ind_cpa",
"EtM.Ideal.uf_cma"
] | [] | false | false | false | true | false | let conf =
| ind_cpa && uf_cma | false | |
FStar.InteractiveHelpers.Tutorial.fst | FStar.InteractiveHelpers.Tutorial.ci_ex2 | val ci_ex2 (x: nat{x % 2 = 0}) (y: int{y % 3 = 0 /\ x + y % 5 = 0})
: Pure int (requires (x + y >= 0)) (ensures (fun z -> z >= 0)) | val ci_ex2 (x: nat{x % 2 = 0}) (y: int{y % 3 = 0 /\ x + y % 5 = 0})
: Pure int (requires (x + y >= 0)) (ensures (fun z -> z >= 0)) | let ci_ex2 (x : nat{x % 2 = 0}) (y : int{y % 3 = 0 /\ x + y % 5 = 0}) :
Pure int
(requires (x + y >= 0))
(ensures (fun z -> z >= 0)) =
(* [> assert(Prims.has_type x Prims.nat); *)
(* [> assert(x % 2 = 0); *)
(* [> assert(Prims.has_type y Prims.int); *)
(* [> assert(y % 3 = 0 /\ x + y % 5 = 0); *)
(* [> ... | {
"file_name": "examples/interactive/FStar.InteractiveHelpers.Tutorial.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 3,
"end_line": 154,
"start_col": 0,
"start_line": 144
} | module FStar.InteractiveHelpers.Tutorial
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module B = LowStar.Buffer
open FStar.List
open FStar.Tactics.V2
open FStar.Mul
open FStar.InteractiveHelpers.Tutorial.Definitions
/// WARNING: if a command fails, it is very likely because of the below issue
/// The... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.List.fst.checked",
"FStar.InteractiveHelpers.Tutorial.Definitions.fst.... | [
{
"abbrev": true,
"full_module": "FStar.InteractiveHelpers",
"short_module": "FI"
},
{
"abbrev": false,
"full_module": "FStar.InteractiveHelpers.Tutorial.Definitions",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
... | {
"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 | x: Prims.nat{x % 2 = 0} -> y: Prims.int{y % 3 = 0 /\ x + y % 5 = 0} -> Prims.Pure Prims.int | Prims.Pure | [] | [] | [
"Prims.nat",
"Prims.b2t",
"Prims.op_Equality",
"Prims.int",
"Prims.op_Modulus",
"Prims.l_and",
"Prims.op_Addition",
"Prims.op_GreaterThanOrEqual"
] | [] | false | false | false | false | false | let ci_ex2 (x: nat{x % 2 = 0}) (y: int{y % 3 = 0 /\ x + y % 5 = 0})
: Pure int (requires (x + y >= 0)) (ensures (fun z -> z >= 0)) =
| let z = x + y in
z | false |
EtM.Ideal.fsti | EtM.Ideal.auth | val auth : b: Prims.bool{EtM.Ideal.ind_cpa ==> b} | let auth = uf_cma | {
"file_name": "examples/crypto/EtM.Ideal.fsti",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 18,
"end_line": 28,
"start_col": 0,
"start_line": 28
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": false,
"source_file": "EtM.Ideal.fsti"
} | [
{
"abbrev": false,
"full_module": "EtM",
"short_module": null
},
{
"abbrev": false,
"full_module": "EtM",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"shor... | {
"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: Prims.bool{EtM.Ideal.ind_cpa ==> b} | Prims.Tot | [
"total"
] | [] | [
"EtM.Ideal.uf_cma"
] | [] | false | false | false | false | false | let auth =
| uf_cma | false | |
FStar.InteractiveHelpers.Tutorial.fst | FStar.InteractiveHelpers.Tutorial.ci_ex1 | val ci_ex1 (x y: nat) : z: int{z % 3 = 0} | val ci_ex1 (x y: nat) : z: int{z % 3 = 0} | let ci_ex1 (x y : nat) : z:int{z % 3 = 0} =
(* Preconditions:
* Type C-c C-e C-e below to insert:
* [> assert(x + 4 > 3); *)
let x1 = f1 (x + 4) y in (* <- Put your pointer after the 'in' and type C-c C-e C-e *)
(* Postconditions: *)
let x2 = f2 x1 y in (* <- Put your pointer after the 'in' and type C-c ... | {
"file_name": "examples/interactive/FStar.InteractiveHelpers.Tutorial.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 20,
"end_line": 128,
"start_col": 0,
"start_line": 96
} | module FStar.InteractiveHelpers.Tutorial
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module B = LowStar.Buffer
open FStar.List
open FStar.Tactics.V2
open FStar.Mul
open FStar.InteractiveHelpers.Tutorial.Definitions
/// WARNING: if a command fails, it is very likely because of the below issue
/// The... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.List.fst.checked",
"FStar.InteractiveHelpers.Tutorial.Definitions.fst.... | [
{
"abbrev": true,
"full_module": "FStar.InteractiveHelpers",
"short_module": "FI"
},
{
"abbrev": false,
"full_module": "FStar.InteractiveHelpers.Tutorial.Definitions",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
... | {
"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 | x: Prims.nat -> y: Prims.nat -> z: Prims.int{z % 3 = 0} | Prims.Tot | [
"total"
] | [] | [
"Prims.nat",
"FStar.Mul.op_Star",
"Prims.op_Addition",
"Prims.int",
"Prims.b2t",
"Prims.op_Equality",
"Prims.op_Modulus",
"FStar.InteractiveHelpers.Tutorial.Definitions.f4",
"Prims.op_GreaterThanOrEqual",
"FStar.InteractiveHelpers.Tutorial.Definitions.f2",
"FStar.InteractiveHelpers.Tutorial.Defi... | [] | false | false | false | false | false | let ci_ex1 (x y: nat) : z: int{z % 3 = 0} =
| let x1 = f1 (x + 4) y in
let x2 = f2 x1 y in
let x3 = f4 x2 in
3 * (x1 + x2 + x3) | false |
Hacl.EC.K256.fst | Hacl.EC.K256.felem_inv | val felem_inv (a out:F.felem) : Stack unit
(requires fun h ->
live h a /\ live h out /\ disjoint a out /\
F.inv_lazy_reduced2 h a)
(ensures fun h0 _ h1 -> modifies (loc out) h0 h1 /\
F.inv_lazy_reduced2 h1 out /\
F.feval h1 out == S.finv (F.feval h0 a)) | val felem_inv (a out:F.felem) : Stack unit
(requires fun h ->
live h a /\ live h out /\ disjoint a out /\
F.inv_lazy_reduced2 h a)
(ensures fun h0 _ h1 -> modifies (loc out) h0 h1 /\
F.inv_lazy_reduced2 h1 out /\
F.feval h1 out == S.finv (F.feval h0 a)) | let felem_inv a out =
FI.finv out a | {
"file_name": "code/k256/Hacl.EC.K256.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 15,
"end_line": 171,
"start_col": 0,
"start_line": 170
} | module Hacl.EC.K256
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
module ST = FStar.HyperStack.ST
module BSeq = Lib.ByteSequence
module S = Spec.K256
module F = Hacl.K256.Field
module Q = Hacl.K256.Scalar
module FI = Hacl.Impl.K256.Finv
module P = Hacl.Impl.K256.P... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.K256.Field52.Lemmas.fsti.checked",
"Hacl.K256.Scalar.fsti.checked",
"Hacl.K256.Field.fsti.checked... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Field52.Lemmas",
"short_module": "BL"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.K256.PointMul",
"short_module": "PM"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.K256.PointDouble",
"short_module": "PD"
},
{
"... | {
"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.K256.Field.felem -> out: Hacl.K256.Field.felem -> FStar.HyperStack.ST.Stack Prims.unit | FStar.HyperStack.ST.Stack | [] | [] | [
"Hacl.K256.Field.felem",
"Hacl.Impl.K256.Finv.finv",
"Prims.unit"
] | [] | false | true | false | false | false | let felem_inv a out =
| FI.finv out a | false |
FStar.InteractiveHelpers.Tutorial.fst | FStar.InteractiveHelpers.Tutorial.simpl_ex1 | val simpl_ex1 : x: Prims.nat -> Prims.int | let simpl_ex1 (x : nat) =
let y = 4 in
let z = 3 in
let w : w:nat{w >= 10} =
if x > 3 then
begin
assert(y + x > 7);
let x' = x + 1 in
assert(y + x' > 8);
let x'' = 2 * (y + x') in
assert(x'' > 16);
assert(x'' >= 10);
2 * x'
end
else 12
in
assert(
... | {
"file_name": "examples/interactive/FStar.InteractiveHelpers.Tutorial.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 4,
"end_line": 54,
"start_col": 0,
"start_line": 34
} | module FStar.InteractiveHelpers.Tutorial
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module B = LowStar.Buffer
open FStar.List
open FStar.Tactics.V2
open FStar.Mul
open FStar.InteractiveHelpers.Tutorial.Definitions
/// WARNING: if a command fails, it is very likely because of the below issue
/// The... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.List.fst.checked",
"FStar.InteractiveHelpers.Tutorial.Definitions.fst.... | [
{
"abbrev": true,
"full_module": "FStar.InteractiveHelpers",
"short_module": "FI"
},
{
"abbrev": false,
"full_module": "FStar.InteractiveHelpers.Tutorial.Definitions",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
... | {
"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 | x: Prims.nat -> Prims.int | Prims.Tot | [
"total"
] | [] | [
"Prims.nat",
"Prims.int",
"Prims.op_Addition",
"FStar.Mul.op_Star",
"Prims.unit",
"Prims._assert",
"Prims.l_and",
"Prims.b2t",
"Prims.op_GreaterThanOrEqual",
"Prims.op_GreaterThan",
"Prims.bool"
] | [] | false | false | false | true | false | let simpl_ex1 (x: nat) =
| let y = 4 in
let z = 3 in
let w:w: nat{w >= 10} =
if x > 3
then
(assert (y + x > 7);
let x' = x + 1 in
assert (y + x' > 8);
let x'' = 2 * (y + x') in
assert (x'' > 16);
assert (x'' >= 10);
2 * x')
else 12
in
assert (x >= 0 /\ y >= 0);
let w' = 2 * w + z in
w' | false | |
FStar.InteractiveHelpers.Tutorial.fst | FStar.InteractiveHelpers.Tutorial.ci_ex3 | val ci_ex3 (r1 r2: B.buffer int)
: ST.Stack int (requires (fun _ -> True)) (ensures (fun _ _ _ -> True)) | val ci_ex3 (r1 r2: B.buffer int)
: ST.Stack int (requires (fun _ -> True)) (ensures (fun _ _ _ -> True)) | let ci_ex3 (r1 r2 : B.buffer int) :
ST.Stack int (requires (fun _ -> True)) (ensures (fun _ _ _ -> True)) =
(**) let h0 = ST.get () in
let n1 = sf1 r1 in (* <- Try C-c C-e C-e here *)
(* [> assert(
[> (fun __h1_0 ->
[> LowStar.Monotonic.Buffer.live h0 r1 /\
[> LowStar.Monotonic.Buffer.as_... | {
"file_name": "examples/interactive/FStar.InteractiveHelpers.Tutorial.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 9,
"end_line": 192,
"start_col": 0,
"start_line": 177
} | module FStar.InteractiveHelpers.Tutorial
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module B = LowStar.Buffer
open FStar.List
open FStar.Tactics.V2
open FStar.Mul
open FStar.InteractiveHelpers.Tutorial.Definitions
/// WARNING: if a command fails, it is very likely because of the below issue
/// The... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.List.fst.checked",
"FStar.InteractiveHelpers.Tutorial.Definitions.fst.... | [
{
"abbrev": true,
"full_module": "FStar.InteractiveHelpers",
"short_module": "FI"
},
{
"abbrev": false,
"full_module": "FStar.InteractiveHelpers.Tutorial.Definitions",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | r1: LowStar.Buffer.buffer Prims.int -> r2: LowStar.Buffer.buffer Prims.int
-> FStar.HyperStack.ST.Stack Prims.int | FStar.HyperStack.ST.Stack | [] | [] | [
"LowStar.Buffer.buffer",
"Prims.int",
"Prims.op_Addition",
"FStar.Monotonic.HyperStack.mem",
"FStar.HyperStack.ST.get",
"FStar.InteractiveHelpers.Tutorial.Definitions.sf1",
"Prims.l_True"
] | [] | false | true | false | false | false | let ci_ex3 (r1 r2: B.buffer int)
: ST.Stack int (requires (fun _ -> True)) (ensures (fun _ _ _ -> True)) =
| let h0 = ST.get () in
let n1 = sf1 r1 in
let h1 = ST.get () in
let n2 = sf1 r2 in
let h2 = ST.get () in
n1 + n2 | false |
FStar.InteractiveHelpers.Tutorial.fst | FStar.InteractiveHelpers.Tutorial.simpl_ex2 | val simpl_ex2 : x: Prims.nat -> Prims.int | let simpl_ex2 (x : nat) =
let x1 = x + 1 in
assert(x1 = x + 1);
let x2 = 3 * (x1 + 1) in
assert_norm(237 * 486 = 115182);
assert(x2 = 3 * (x + 2));
assert(x2 % 3 = 0);
assert_norm(8 * 4 < 40);
let x3 = 2 * x2 + 6 in
assert(x3 = 6 * (x + 2) + 6);
let assertion = True in
assert(x3 = 6 * (x + 3));
... | {
"file_name": "examples/interactive/FStar.InteractiveHelpers.Tutorial.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 4,
"end_line": 82,
"start_col": 0,
"start_line": 69
} | module FStar.InteractiveHelpers.Tutorial
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module B = LowStar.Buffer
open FStar.List
open FStar.Tactics.V2
open FStar.Mul
open FStar.InteractiveHelpers.Tutorial.Definitions
/// WARNING: if a command fails, it is very likely because of the below issue
/// The... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.List.fst.checked",
"FStar.InteractiveHelpers.Tutorial.Definitions.fst.... | [
{
"abbrev": true,
"full_module": "FStar.InteractiveHelpers",
"short_module": "FI"
},
{
"abbrev": false,
"full_module": "FStar.InteractiveHelpers.Tutorial.Definitions",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
... | {
"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 | x: Prims.nat -> Prims.int | Prims.Tot | [
"total"
] | [] | [
"Prims.nat",
"Prims.unit",
"Prims._assert",
"Prims.b2t",
"Prims.op_Equality",
"Prims.int",
"Prims.op_Modulus",
"FStar.Mul.op_Star",
"Prims.op_Addition",
"Prims.logical",
"Prims.l_True",
"FStar.Pervasives.assert_norm",
"Prims.op_LessThan"
] | [] | false | false | false | true | false | let simpl_ex2 (x: nat) =
| let x1 = x + 1 in
assert (x1 = x + 1);
let x2 = 3 * (x1 + 1) in
assert_norm (237 * 486 = 115182);
assert (x2 = 3 * (x + 2));
assert (x2 % 3 = 0);
assert_norm (8 * 4 < 40);
let x3 = 2 * x2 + 6 in
assert (x3 = 6 * (x + 2) + 6);
let assertion = True in
assert (x3 = 6 * (x + 3));
assert (x3 % 3 = 0);
x3 | false | |
FStar.InteractiveHelpers.Tutorial.fst | FStar.InteractiveHelpers.Tutorial.ci_ex4 | val ci_ex4 (x: int{x % 2 = 0})
: Pure int (requires True) (ensures (fun x' -> x' % 2 = 0 /\ x' >= x)) | val ci_ex4 (x: int{x % 2 = 0})
: Pure int (requires True) (ensures (fun x' -> x' % 2 = 0 /\ x' >= x)) | let ci_ex4 (x : int{x % 2 = 0}) :
Pure int
(requires True)
(ensures (fun x' -> x' % 2 = 0 /\ x' >= x)) =
let x = x + 4 in (* We shadow the original ``x`` here *)
x | {
"file_name": "examples/interactive/FStar.InteractiveHelpers.Tutorial.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 3,
"end_line": 204,
"start_col": 0,
"start_line": 199
} | module FStar.InteractiveHelpers.Tutorial
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module B = LowStar.Buffer
open FStar.List
open FStar.Tactics.V2
open FStar.Mul
open FStar.InteractiveHelpers.Tutorial.Definitions
/// WARNING: if a command fails, it is very likely because of the below issue
/// The... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.List.fst.checked",
"FStar.InteractiveHelpers.Tutorial.Definitions.fst.... | [
{
"abbrev": true,
"full_module": "FStar.InteractiveHelpers",
"short_module": "FI"
},
{
"abbrev": false,
"full_module": "FStar.InteractiveHelpers.Tutorial.Definitions",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
... | {
"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 | x: Prims.int{x % 2 = 0} -> Prims.Pure Prims.int | Prims.Pure | [] | [] | [
"Prims.int",
"Prims.b2t",
"Prims.op_Equality",
"Prims.op_Modulus",
"Prims.op_Addition",
"Prims.l_True",
"Prims.l_and",
"Prims.op_GreaterThanOrEqual"
] | [] | false | false | false | false | false | let ci_ex4 (x: int{x % 2 = 0})
: Pure int (requires True) (ensures (fun x' -> x' % 2 = 0 /\ x' >= x)) =
| let x = x + 4 in
x | false |
FStar.InteractiveHelpers.Tutorial.fst | FStar.InteractiveHelpers.Tutorial.ts_ex1 | val ts_ex1 : x: Prims.int -> z: Prims.nat{z >= 8} | let ts_ex1 (x : int) =
let y : nat =
if x >= 0 then
begin
let z1 = x + 4 in
let z2 : int = f1 z1 x in (* <- Say you want to use C-c C-e here: first use C-c C-s C-i *)
z2
end
else -x
in
let z = f2 y 3 in
z | {
"file_name": "examples/interactive/FStar.InteractiveHelpers.Tutorial.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 3,
"end_line": 338,
"start_col": 0,
"start_line": 327
} | module FStar.InteractiveHelpers.Tutorial
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module B = LowStar.Buffer
open FStar.List
open FStar.Tactics.V2
open FStar.Mul
open FStar.InteractiveHelpers.Tutorial.Definitions
/// WARNING: if a command fails, it is very likely because of the below issue
/// The... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.List.fst.checked",
"FStar.InteractiveHelpers.Tutorial.Definitions.fst.... | [
{
"abbrev": true,
"full_module": "FStar.InteractiveHelpers",
"short_module": "FI"
},
{
"abbrev": false,
"full_module": "FStar.InteractiveHelpers.Tutorial.Definitions",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
... | {
"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 | x: Prims.int -> z: Prims.nat{z >= 8} | Prims.Tot | [
"total"
] | [] | [
"Prims.int",
"Prims.nat",
"Prims.b2t",
"Prims.op_GreaterThanOrEqual",
"FStar.InteractiveHelpers.Tutorial.Definitions.f2",
"FStar.InteractiveHelpers.Tutorial.Definitions.f1",
"Prims.op_Addition",
"Prims.bool",
"Prims.op_Minus"
] | [] | false | false | false | false | false | let ts_ex1 (x: int) =
| let y:nat =
if x >= 0
then
let z1 = x + 4 in
let z2:int = f1 z1 x in
z2
else - x
in
let z = f2 y 3 in
z | false | |
Hacl.EC.K256.fst | Hacl.EC.K256.point_negate | val point_negate (p out:P.point) : Stack unit
(requires fun h ->
live h out /\ live h p /\ eq_or_disjoint out p /\
P.point_inv h p)
(ensures fun h0 _ h1 -> modifies (loc out) h0 h1 /\
P.point_inv h1 out /\
P.point_eval h1 out == S.point_negate (P.point_eval h0 p)) | val point_negate (p out:P.point) : Stack unit
(requires fun h ->
live h out /\ live h p /\ eq_or_disjoint out p /\
P.point_inv h p)
(ensures fun h0 _ h1 -> modifies (loc out) h0 h1 /\
P.point_inv h1 out /\
P.point_eval h1 out == S.point_negate (P.point_eval h0 p)) | let point_negate p out =
P.point_negate out p | {
"file_name": "code/k256/Hacl.EC.K256.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 22,
"end_line": 265,
"start_col": 0,
"start_line": 264
} | module Hacl.EC.K256
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
module ST = FStar.HyperStack.ST
module BSeq = Lib.ByteSequence
module S = Spec.K256
module F = Hacl.K256.Field
module Q = Hacl.K256.Scalar
module FI = Hacl.Impl.K256.Finv
module P = Hacl.Impl.K256.P... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.K256.Field52.Lemmas.fsti.checked",
"Hacl.K256.Scalar.fsti.checked",
"Hacl.K256.Field.fsti.checked... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Field52.Lemmas",
"short_module": "BL"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.K256.PointMul",
"short_module": "PM"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.K256.PointDouble",
"short_module": "PD"
},
{
"... | {
"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 | p: Hacl.Impl.K256.Point.point -> out: Hacl.Impl.K256.Point.point
-> FStar.HyperStack.ST.Stack Prims.unit | FStar.HyperStack.ST.Stack | [] | [] | [
"Hacl.Impl.K256.Point.point",
"Hacl.Impl.K256.Point.point_negate",
"Prims.unit"
] | [] | false | true | false | false | false | let point_negate p out =
| P.point_negate out p | false |
Hacl.EC.K256.fst | Hacl.EC.K256.point_double | val point_double (p out:P.point) : Stack unit
(requires fun h ->
live h out /\ live h p /\ eq_or_disjoint p out /\
P.point_inv h p)
(ensures fun h0 _ h1 -> modifies (loc out) h0 h1 /\
P.point_inv h1 out /\ P.point_eval h1 out == S.point_double (P.point_eval h0 p)) | val point_double (p out:P.point) : Stack unit
(requires fun h ->
live h out /\ live h p /\ eq_or_disjoint p out /\
P.point_inv h p)
(ensures fun h0 _ h1 -> modifies (loc out) h0 h1 /\
P.point_inv h1 out /\ P.point_eval h1 out == S.point_double (P.point_eval h0 p)) | let point_double p out =
PD.point_double out p | {
"file_name": "code/k256/Hacl.EC.K256.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 23,
"end_line": 303,
"start_col": 0,
"start_line": 302
} | module Hacl.EC.K256
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
module ST = FStar.HyperStack.ST
module BSeq = Lib.ByteSequence
module S = Spec.K256
module F = Hacl.K256.Field
module Q = Hacl.K256.Scalar
module FI = Hacl.Impl.K256.Finv
module P = Hacl.Impl.K256.P... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.K256.Field52.Lemmas.fsti.checked",
"Hacl.K256.Scalar.fsti.checked",
"Hacl.K256.Field.fsti.checked... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Field52.Lemmas",
"short_module": "BL"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.K256.PointMul",
"short_module": "PM"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.K256.PointDouble",
"short_module": "PD"
},
{
"... | {
"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 | p: Hacl.Impl.K256.Point.point -> out: Hacl.Impl.K256.Point.point
-> FStar.HyperStack.ST.Stack Prims.unit | FStar.HyperStack.ST.Stack | [] | [] | [
"Hacl.Impl.K256.Point.point",
"Hacl.Impl.K256.PointDouble.point_double",
"Prims.unit"
] | [] | false | true | false | false | false | let point_double p out =
| PD.point_double out p | false |
FStar.InteractiveHelpers.Tutorial.fst | FStar.InteractiveHelpers.Tutorial.ut_ex1 | val ut_ex1 (x y: nat) : unit | val ut_ex1 (x y: nat) : unit | let ut_ex1 (x y : nat) : unit =
let z1 = f3 (x + y) in
(* Unfold definitions: *)
assert(z1 = f3 (x + y)); (* <- Move the pointer EXACTLY over ``f3`` and use C-c C-e C-u *)
(* Unfold arbitrary identifiers:
* In case the term to unfold is not a top-level definition but a local
* variable, the command will... | {
"file_name": "examples/interactive/FStar.InteractiveHelpers.Tutorial.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 34,
"end_line": 258,
"start_col": 0,
"start_line": 234
} | module FStar.InteractiveHelpers.Tutorial
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module B = LowStar.Buffer
open FStar.List
open FStar.Tactics.V2
open FStar.Mul
open FStar.InteractiveHelpers.Tutorial.Definitions
/// WARNING: if a command fails, it is very likely because of the below issue
/// The... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.List.fst.checked",
"FStar.InteractiveHelpers.Tutorial.Definitions.fst.... | [
{
"abbrev": true,
"full_module": "FStar.InteractiveHelpers",
"short_module": "FI"
},
{
"abbrev": false,
"full_module": "FStar.InteractiveHelpers.Tutorial.Definitions",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
... | {
"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 | x: Prims.nat -> y: Prims.nat -> Prims.unit | Prims.Tot | [
"total"
] | [] | [
"Prims.nat",
"Prims._assert",
"Prims.b2t",
"Prims.op_Equality",
"Prims.int",
"FStar.InteractiveHelpers.Tutorial.Definitions.f3",
"Prims.op_Addition",
"FStar.Mul.op_Star",
"Prims.unit"
] | [] | false | false | false | true | false | let ut_ex1 (x y: nat) : unit =
| let z1 = f3 (x + y) in
assert (z1 = f3 (x + y));
assert (z1 = 2 * (x + y));
assert (z1 = z1);
assert (f3 (f3 (x + y)) = 4 * (x + y));
assert (2 * z1 = z1 + z1);
assert (f3 (f3 (x + y)) = 2 * z1) | false |
FStar.InteractiveHelpers.Tutorial.fst | FStar.InteractiveHelpers.Tutorial.cc_ex1 | val cc_ex1 (r1 r2 r3: B.buffer int)
: ST.Stack nat
(requires (fun h0 -> invariant1 h0 r1 r2 r3))
(ensures (fun h0 x h1 -> invariant1 h1 r1 r2 r3 /\ x >= 3)) | val cc_ex1 (r1 r2 r3: B.buffer int)
: ST.Stack nat
(requires (fun h0 -> invariant1 h0 r1 r2 r3))
(ensures (fun h0 x h1 -> invariant1 h1 r1 r2 r3 /\ x >= 3)) | let cc_ex1 (r1 r2 r3 : B.buffer int) :
ST.Stack nat
(requires (fun h0 -> invariant1 h0 r1 r2 r3))
(ensures (fun h0 x h1 -> invariant1 h1 r1 r2 r3 /\ x >= 3)) =
(**) let h0 = ST.get () in
let x = 3 in
(*
* ...
* In practice there would be some (a lot of) code here
* ...
*)
(**) let h1 = ST.get ... | {
"file_name": "examples/interactive/FStar.InteractiveHelpers.Tutorial.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 3,
"end_line": 308,
"start_col": 0,
"start_line": 296
} | module FStar.InteractiveHelpers.Tutorial
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module B = LowStar.Buffer
open FStar.List
open FStar.Tactics.V2
open FStar.Mul
open FStar.InteractiveHelpers.Tutorial.Definitions
/// WARNING: if a command fails, it is very likely because of the below issue
/// The... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.List.fst.checked",
"FStar.InteractiveHelpers.Tutorial.Definitions.fst.... | [
{
"abbrev": true,
"full_module": "FStar.InteractiveHelpers",
"short_module": "FI"
},
{
"abbrev": false,
"full_module": "FStar.InteractiveHelpers.Tutorial.Definitions",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
r1: LowStar.Buffer.buffer Prims.int ->
r2: LowStar.Buffer.buffer Prims.int ->
r3: LowStar.Buffer.buffer Prims.int
-> FStar.HyperStack.ST.Stack Prims.nat | FStar.HyperStack.ST.Stack | [] | [] | [
"LowStar.Buffer.buffer",
"Prims.int",
"Prims.nat",
"FStar.Monotonic.HyperStack.mem",
"FStar.HyperStack.ST.get",
"FStar.InteractiveHelpers.Tutorial.invariant1",
"Prims.l_and",
"Prims.b2t",
"Prims.op_GreaterThanOrEqual"
] | [] | false | true | false | false | false | let cc_ex1 (r1 r2 r3: B.buffer int)
: ST.Stack nat
(requires (fun h0 -> invariant1 h0 r1 r2 r3))
(ensures (fun h0 x h1 -> invariant1 h1 r1 r2 r3 /\ x >= 3)) =
| let h0 = ST.get () in
let x = 3 in
let h1 = ST.get () in
x | false |
FStar.InteractiveHelpers.Tutorial.fst | FStar.InteractiveHelpers.Tutorial.ut_ex2 | val ut_ex2: Prims.unit -> ST.ST unit (requires (fun _ -> True)) (ensures (fun _ _ _ -> True)) | val ut_ex2: Prims.unit -> ST.ST unit (requires (fun _ -> True)) (ensures (fun _ _ _ -> True)) | let ut_ex2 () : ST.ST unit (requires (fun _ -> True)) (ensures (fun _ _ _ -> True)) =
let l : list int = [1; 2; 3; 4; 5; 6] in
let h0 = ST.get () in
let r = sf2 l in (* This dummy function introduces some equalities in the context *)
let h1 = ST.get () in
assert(B.as_seq h1 r == B.as_seq h1 r); (* <- Try here... | {
"file_name": "examples/interactive/FStar.InteractiveHelpers.Tutorial.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 4,
"end_line": 268,
"start_col": 0,
"start_line": 262
} | module FStar.InteractiveHelpers.Tutorial
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module B = LowStar.Buffer
open FStar.List
open FStar.Tactics.V2
open FStar.Mul
open FStar.InteractiveHelpers.Tutorial.Definitions
/// WARNING: if a command fails, it is very likely because of the below issue
/// The... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.List.fst.checked",
"FStar.InteractiveHelpers.Tutorial.Definitions.fst.... | [
{
"abbrev": true,
"full_module": "FStar.InteractiveHelpers",
"short_module": "FI"
},
{
"abbrev": false,
"full_module": "FStar.InteractiveHelpers.Tutorial.Definitions",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
... | {
"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 | _: Prims.unit -> FStar.HyperStack.ST.ST Prims.unit | FStar.HyperStack.ST.ST | [] | [] | [
"Prims.unit",
"Prims._assert",
"Prims.eq2",
"FStar.Seq.Base.seq",
"Prims.int",
"LowStar.Monotonic.Buffer.as_seq",
"LowStar.Buffer.trivial_preorder",
"FStar.Monotonic.HyperStack.mem",
"FStar.HyperStack.ST.get",
"LowStar.Buffer.buffer",
"FStar.InteractiveHelpers.Tutorial.Definitions.sf2",
"Prims... | [] | false | true | false | false | false | let ut_ex2 () : ST.ST unit (requires (fun _ -> True)) (ensures (fun _ _ _ -> True)) =
| let l:list int = [1; 2; 3; 4; 5; 6] in
let h0 = ST.get () in
let r = sf2 l in
let h1 = ST.get () in
assert (B.as_seq h1 r == B.as_seq h1 r);
() | false |
Hacl.EC.K256.fst | Hacl.EC.K256.felem_load | val felem_load: b:lbuffer uint8 32ul -> out:F.felem -> Stack unit
(requires fun h -> live h b /\ live h out /\ disjoint b out)
(ensures fun h0 _ h1 -> modifies (loc out) h0 h1 /\
F.inv_lazy_reduced2 h1 out /\
F.feval h1 out == BSeq.nat_from_bytes_be (as_seq h0 b) % S.prime) | val felem_load: b:lbuffer uint8 32ul -> out:F.felem -> Stack unit
(requires fun h -> live h b /\ live h out /\ disjoint b out)
(ensures fun h0 _ h1 -> modifies (loc out) h0 h1 /\
F.inv_lazy_reduced2 h1 out /\
F.feval h1 out == BSeq.nat_from_bytes_be (as_seq h0 b) % S.prime) | let felem_load b out =
F.load_felem out b | {
"file_name": "code/k256/Hacl.EC.K256.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 20,
"end_line": 189,
"start_col": 0,
"start_line": 188
} | module Hacl.EC.K256
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
module ST = FStar.HyperStack.ST
module BSeq = Lib.ByteSequence
module S = Spec.K256
module F = Hacl.K256.Field
module Q = Hacl.K256.Scalar
module FI = Hacl.Impl.K256.Finv
module P = Hacl.Impl.K256.P... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.K256.Field52.Lemmas.fsti.checked",
"Hacl.K256.Scalar.fsti.checked",
"Hacl.K256.Field.fsti.checked... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Field52.Lemmas",
"short_module": "BL"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.K256.PointMul",
"short_module": "PM"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.K256.PointDouble",
"short_module": "PD"
},
{
"... | {
"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: Lib.Buffer.lbuffer Lib.IntTypes.uint8 32ul -> out: Hacl.K256.Field.felem
-> FStar.HyperStack.ST.Stack Prims.unit | FStar.HyperStack.ST.Stack | [] | [] | [
"Lib.Buffer.lbuffer",
"Lib.IntTypes.uint8",
"FStar.UInt32.__uint_to_t",
"Hacl.K256.Field.felem",
"Hacl.K256.Field.load_felem",
"Prims.unit"
] | [] | false | true | false | false | false | let felem_load b out =
| F.load_felem out b | false |
Hacl.EC.K256.fst | Hacl.EC.K256.point_store | val point_store: p:P.point -> out:lbuffer uint8 64ul -> Stack unit
(requires fun h ->
live h out /\ live h p /\ disjoint p out /\
P.point_inv h p)
(ensures fun h0 _ h1 -> modifies (loc out) h0 h1 /\
as_seq h1 out == S.point_store (P.point_eval h0 p)) | val point_store: p:P.point -> out:lbuffer uint8 64ul -> Stack unit
(requires fun h ->
live h out /\ live h p /\ disjoint p out /\
P.point_inv h p)
(ensures fun h0 _ h1 -> modifies (loc out) h0 h1 /\
as_seq h1 out == S.point_store (P.point_eval h0 p)) | let point_store p out =
P.point_store out p | {
"file_name": "code/k256/Hacl.EC.K256.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 21,
"end_line": 355,
"start_col": 0,
"start_line": 354
} | module Hacl.EC.K256
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
module ST = FStar.HyperStack.ST
module BSeq = Lib.ByteSequence
module S = Spec.K256
module F = Hacl.K256.Field
module Q = Hacl.K256.Scalar
module FI = Hacl.Impl.K256.Finv
module P = Hacl.Impl.K256.P... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.K256.Field52.Lemmas.fsti.checked",
"Hacl.K256.Scalar.fsti.checked",
"Hacl.K256.Field.fsti.checked... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Field52.Lemmas",
"short_module": "BL"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.K256.PointMul",
"short_module": "PM"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.K256.PointDouble",
"short_module": "PD"
},
{
"... | {
"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 | p: Hacl.Impl.K256.Point.point -> out: Lib.Buffer.lbuffer Lib.IntTypes.uint8 64ul
-> FStar.HyperStack.ST.Stack Prims.unit | FStar.HyperStack.ST.Stack | [] | [] | [
"Hacl.Impl.K256.Point.point",
"Lib.Buffer.lbuffer",
"Lib.IntTypes.uint8",
"FStar.UInt32.__uint_to_t",
"Hacl.Impl.K256.Point.point_store",
"Prims.unit"
] | [] | false | true | false | false | false | let point_store p out =
| P.point_store out p | false |
Hacl.EC.K256.fst | Hacl.EC.K256.felem_mul | val felem_mul (a b out:F.felem) : Stack unit
(requires fun h ->
live h a /\ live h b /\ live h out /\
eq_or_disjoint out a /\ eq_or_disjoint out b /\ eq_or_disjoint a b /\
F.inv_lazy_reduced2 h a /\ F.inv_lazy_reduced2 h b)
(ensures fun h0 _ h1 -> modifies (loc out) h0 h1 /\
F.inv_lazy_reduced2 h1 ... | val felem_mul (a b out:F.felem) : Stack unit
(requires fun h ->
live h a /\ live h b /\ live h out /\
eq_or_disjoint out a /\ eq_or_disjoint out b /\ eq_or_disjoint a b /\
F.inv_lazy_reduced2 h a /\ F.inv_lazy_reduced2 h b)
(ensures fun h0 _ h1 -> modifies (loc out) h0 h1 /\
F.inv_lazy_reduced2 h1 ... | let felem_mul a b out =
F.fmul out a b | {
"file_name": "code/k256/Hacl.EC.K256.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 16,
"end_line": 131,
"start_col": 0,
"start_line": 130
} | module Hacl.EC.K256
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
module ST = FStar.HyperStack.ST
module BSeq = Lib.ByteSequence
module S = Spec.K256
module F = Hacl.K256.Field
module Q = Hacl.K256.Scalar
module FI = Hacl.Impl.K256.Finv
module P = Hacl.Impl.K256.P... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.K256.Field52.Lemmas.fsti.checked",
"Hacl.K256.Scalar.fsti.checked",
"Hacl.K256.Field.fsti.checked... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Field52.Lemmas",
"short_module": "BL"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.K256.PointMul",
"short_module": "PM"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.K256.PointDouble",
"short_module": "PD"
},
{
"... | {
"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.K256.Field.felem -> b: Hacl.K256.Field.felem -> out: Hacl.K256.Field.felem
-> FStar.HyperStack.ST.Stack Prims.unit | FStar.HyperStack.ST.Stack | [] | [] | [
"Hacl.K256.Field.felem",
"Hacl.K256.Field.fmul",
"Prims.unit"
] | [] | false | true | false | false | false | let felem_mul a b out =
| F.fmul out a b | false |
Hacl.EC.K256.fst | Hacl.EC.K256.point_load | val point_load: b:lbuffer uint8 64ul -> out:P.point -> Stack unit
(requires fun h ->
live h out /\ live h b /\ disjoint b out /\
S.point_inv_bytes (as_seq h b))
(ensures fun h0 _ h1 -> modifies (loc out) h0 h1 /\
P.point_inv h1 out /\
P.point_eval h1 out == S.load_point_nocheck (as_seq h0 b)) | val point_load: b:lbuffer uint8 64ul -> out:P.point -> Stack unit
(requires fun h ->
live h out /\ live h b /\ disjoint b out /\
S.point_inv_bytes (as_seq h b))
(ensures fun h0 _ h1 -> modifies (loc out) h0 h1 /\
P.point_inv h1 out /\
P.point_eval h1 out == S.load_point_nocheck (as_seq h0 b)) | let point_load b out =
P.load_point_nocheck out b | {
"file_name": "code/k256/Hacl.EC.K256.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 28,
"end_line": 376,
"start_col": 0,
"start_line": 375
} | module Hacl.EC.K256
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
module ST = FStar.HyperStack.ST
module BSeq = Lib.ByteSequence
module S = Spec.K256
module F = Hacl.K256.Field
module Q = Hacl.K256.Scalar
module FI = Hacl.Impl.K256.Finv
module P = Hacl.Impl.K256.P... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.K256.Field52.Lemmas.fsti.checked",
"Hacl.K256.Scalar.fsti.checked",
"Hacl.K256.Field.fsti.checked... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Field52.Lemmas",
"short_module": "BL"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.K256.PointMul",
"short_module": "PM"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.K256.PointDouble",
"short_module": "PD"
},
{
"... | {
"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: Lib.Buffer.lbuffer Lib.IntTypes.uint8 64ul -> out: Hacl.Impl.K256.Point.point
-> FStar.HyperStack.ST.Stack Prims.unit | FStar.HyperStack.ST.Stack | [] | [] | [
"Lib.Buffer.lbuffer",
"Lib.IntTypes.uint8",
"FStar.UInt32.__uint_to_t",
"Hacl.Impl.K256.Point.point",
"Hacl.Impl.K256.Point.load_point_nocheck",
"Prims.unit"
] | [] | false | true | false | false | false | let point_load b out =
| P.load_point_nocheck out b | false |
Hacl.EC.K256.fst | Hacl.EC.K256.felem_sub | val felem_sub (a b out:F.felem) : Stack unit
(requires fun h ->
live h a /\ live h b /\ live h out /\
eq_or_disjoint out a /\ eq_or_disjoint out b /\ eq_or_disjoint a b /\
F.inv_lazy_reduced2 h a /\ F.inv_lazy_reduced2 h b)
(ensures fun h0 _ h1 -> modifies (loc out) h0 h1 /\
F.inv_lazy_reduced2 h1 ... | val felem_sub (a b out:F.felem) : Stack unit
(requires fun h ->
live h a /\ live h b /\ live h out /\
eq_or_disjoint out a /\ eq_or_disjoint out b /\ eq_or_disjoint a b /\
F.inv_lazy_reduced2 h a /\ F.inv_lazy_reduced2 h b)
(ensures fun h0 _ h1 -> modifies (loc out) h0 h1 /\
F.inv_lazy_reduced2 h1 ... | let felem_sub a b out =
let h0 = ST.get () in
BL.fsub5_lemma (1,1,1,1,2) (1,1,1,1,2) (F.as_felem5 h0 a) (F.as_felem5 h0 b) (u64 2);
F.fsub out a b (u64 2);
let h1 = ST.get () in
assert (F.felem_fits5 (F.as_felem5 h1 out) (5,5,5,5,6));
BL.normalize_weak5_lemma (5,5,5,5,6) (F.as_felem5 h1 out);
F.fnormalize... | {
"file_name": "code/k256/Hacl.EC.K256.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 27,
"end_line": 111,
"start_col": 0,
"start_line": 104
} | module Hacl.EC.K256
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
module ST = FStar.HyperStack.ST
module BSeq = Lib.ByteSequence
module S = Spec.K256
module F = Hacl.K256.Field
module Q = Hacl.K256.Scalar
module FI = Hacl.Impl.K256.Finv
module P = Hacl.Impl.K256.P... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.K256.Field52.Lemmas.fsti.checked",
"Hacl.K256.Scalar.fsti.checked",
"Hacl.K256.Field.fsti.checked... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Field52.Lemmas",
"short_module": "BL"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.K256.PointMul",
"short_module": "PM"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.K256.PointDouble",
"short_module": "PD"
},
{
"... | {
"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.K256.Field.felem -> b: Hacl.K256.Field.felem -> out: Hacl.K256.Field.felem
-> FStar.HyperStack.ST.Stack Prims.unit | FStar.HyperStack.ST.Stack | [] | [] | [
"Hacl.K256.Field.felem",
"Hacl.K256.Field.fnormalize_weak",
"Prims.unit",
"Hacl.Spec.K256.Field52.Lemmas.normalize_weak5_lemma",
"FStar.Pervasives.Native.Mktuple5",
"Prims.nat",
"Hacl.K256.Field.as_felem5",
"Prims._assert",
"Hacl.Spec.K256.Field52.Definitions.felem_fits5",
"FStar.Monotonic.HyperSt... | [] | false | true | false | false | false | let felem_sub a b out =
| let h0 = ST.get () in
BL.fsub5_lemma (1, 1, 1, 1, 2) (1, 1, 1, 1, 2) (F.as_felem5 h0 a) (F.as_felem5 h0 b) (u64 2);
F.fsub out a b (u64 2);
let h1 = ST.get () in
assert (F.felem_fits5 (F.as_felem5 h1 out) (5, 5, 5, 5, 6));
BL.normalize_weak5_lemma (5, 5, 5, 5, 6) (F.as_felem5 h1 out);
F.fnormalize_weak out out | false |
Hacl.EC.K256.fst | Hacl.EC.K256.felem_sqr | val felem_sqr (a out:F.felem) : Stack unit
(requires fun h ->
live h a /\ live h out /\ eq_or_disjoint out a /\
F.inv_lazy_reduced2 h a)
(ensures fun h0 _ h1 -> modifies (loc out) h0 h1 /\
F.inv_lazy_reduced2 h1 out /\
F.feval h1 out == S.fmul (F.feval h0 a) (F.feval h0 a)) | val felem_sqr (a out:F.felem) : Stack unit
(requires fun h ->
live h a /\ live h out /\ eq_or_disjoint out a /\
F.inv_lazy_reduced2 h a)
(ensures fun h0 _ h1 -> modifies (loc out) h0 h1 /\
F.inv_lazy_reduced2 h1 out /\
F.feval h1 out == S.fmul (F.feval h0 a) (F.feval h0 a)) | let felem_sqr a out =
F.fsqr out a | {
"file_name": "code/k256/Hacl.EC.K256.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 14,
"end_line": 150,
"start_col": 0,
"start_line": 149
} | module Hacl.EC.K256
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
module ST = FStar.HyperStack.ST
module BSeq = Lib.ByteSequence
module S = Spec.K256
module F = Hacl.K256.Field
module Q = Hacl.K256.Scalar
module FI = Hacl.Impl.K256.Finv
module P = Hacl.Impl.K256.P... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.K256.Field52.Lemmas.fsti.checked",
"Hacl.K256.Scalar.fsti.checked",
"Hacl.K256.Field.fsti.checked... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Field52.Lemmas",
"short_module": "BL"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.K256.PointMul",
"short_module": "PM"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.K256.PointDouble",
"short_module": "PD"
},
{
"... | {
"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.K256.Field.felem -> out: Hacl.K256.Field.felem -> FStar.HyperStack.ST.Stack Prims.unit | FStar.HyperStack.ST.Stack | [] | [] | [
"Hacl.K256.Field.felem",
"Hacl.K256.Field.fsqr",
"Prims.unit"
] | [] | false | true | false | false | false | let felem_sqr a out =
| F.fsqr out a | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.