file_name stringlengths 5 52 | name stringlengths 4 95 | original_source_type stringlengths 0 23k | source_type stringlengths 9 23k | source_definition stringlengths 9 57.9k | source dict | source_range dict | file_context stringlengths 0 721k | dependencies dict | opens_and_abbrevs listlengths 2 94 | vconfig dict | interleaved bool 1
class | verbose_type stringlengths 1 7.42k | effect stringclasses 118
values | effect_flags listlengths 0 2 | mutual_with listlengths 0 11 | ideal_premises listlengths 0 236 | proof_features listlengths 0 1 | is_simple_lemma bool 2
classes | is_div bool 2
classes | is_proof bool 2
classes | is_simply_typed bool 2
classes | is_type bool 2
classes | partial_definition stringlengths 5 3.99k | completed_definiton stringlengths 1 1.63M | isa_cross_project_example bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
FStar.Krml.Endianness.fst | FStar.Krml.Endianness.n_to_le_le_to_n | val n_to_le_le_to_n (len: U32.t) (s: Seq.seq U8.t)
: Lemma (requires (Seq.length s == U32.v len))
(ensures
(le_to_n s < pow2 (8 `Prims.op_Multiply` (U32.v len)) /\ n_to_le len (le_to_n s) == s))
[SMTPat (n_to_le len (le_to_n s))] | val n_to_le_le_to_n (len: U32.t) (s: Seq.seq U8.t)
: Lemma (requires (Seq.length s == U32.v len))
(ensures
(le_to_n s < pow2 (8 `Prims.op_Multiply` (U32.v len)) /\ n_to_le len (le_to_n s) == s))
[SMTPat (n_to_le len (le_to_n s))] | let n_to_le_le_to_n (len: U32.t) (s: Seq.seq U8.t) : Lemma
(requires (Seq.length s == U32.v len))
(ensures (
le_to_n s < pow2 (8 `Prims.op_Multiply` U32.v len) /\
n_to_le len (le_to_n s) == s
))
[SMTPat (n_to_le len (le_to_n s))]
= lemma_le_to_n_is_bounded s;
le_to_n_inj s (n_to_le len (le_to_n s)) | {
"file_name": "krmllib/FStar.Krml.Endianness.fst",
"git_rev": "da1e941b2fcb196aa5d1e34941aa00b4c67ac321",
"git_url": "https://github.com/FStarLang/karamel.git",
"project_name": "karamel"
} | {
"end_col": 41,
"end_line": 192,
"start_col": 0,
"start_line": 184
} | module FStar.Krml.Endianness
open FStar.Mul
open FStar.HyperStack.All
module U8 = FStar.UInt8
module U32 = FStar.UInt32
module U64 = FStar.UInt64
module Math = FStar.Math.Lemmas
module S = FStar.Seq
(* Selectively imported from Hacl*'s FStar.Endianness.fst library, with several
name changes *)
inline_for_extraction... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.HyperStac... | [
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "FStar.Math.Lemmas",
"short_module": "Math"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": "FSt... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | len: FStar.UInt32.t -> s: FStar.Seq.Base.seq FStar.UInt8.t
-> FStar.Pervasives.Lemma (requires FStar.Seq.Base.length s == FStar.UInt32.v len)
(ensures
FStar.Krml.Endianness.le_to_n s < Prims.pow2 (8 * FStar.UInt32.v len) /\
FStar.Krml.Endianness.n_to_le len (FStar.Krml.Endianness.le_to_n s) == s... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"FStar.UInt32.t",
"FStar.Seq.Base.seq",
"FStar.UInt8.t",
"FStar.Krml.Endianness.le_to_n_inj",
"FStar.Krml.Endianness.n_to_le",
"FStar.Krml.Endianness.le_to_n",
"Prims.unit",
"FStar.Krml.Endianness.lemma_le_to_n_is_bounded",
"Prims.eq2",
"Prims.int",
"Prims.l_or",
"Prims.b2t",
"Prims.op_Great... | [] | true | false | true | false | false | let n_to_le_le_to_n (len: U32.t) (s: Seq.seq U8.t)
: Lemma (requires (Seq.length s == U32.v len))
(ensures
(le_to_n s < pow2 (8 `Prims.op_Multiply` (U32.v len)) /\ n_to_le len (le_to_n s) == s))
[SMTPat (n_to_le len (le_to_n s))] =
| lemma_le_to_n_is_bounded s;
le_to_n_inj s (n_to_le len (le_to_n s)) | false |
FStar.Krml.Endianness.fst | FStar.Krml.Endianness.n_to_be_be_to_n | val n_to_be_be_to_n (len: U32.t) (s: Seq.seq U8.t)
: Lemma (requires (Seq.length s == U32.v len))
(ensures
(be_to_n s < pow2 (8 `Prims.op_Multiply` (U32.v len)) /\ n_to_be len (be_to_n s) == s))
[SMTPat (n_to_be len (be_to_n s))] | val n_to_be_be_to_n (len: U32.t) (s: Seq.seq U8.t)
: Lemma (requires (Seq.length s == U32.v len))
(ensures
(be_to_n s < pow2 (8 `Prims.op_Multiply` (U32.v len)) /\ n_to_be len (be_to_n s) == s))
[SMTPat (n_to_be len (be_to_n s))] | let n_to_be_be_to_n (len: U32.t) (s: Seq.seq U8.t) : Lemma
(requires (Seq.length s == U32.v len))
(ensures (
be_to_n s < pow2 (8 `Prims.op_Multiply` U32.v len) /\
n_to_be len (be_to_n s) == s
))
[SMTPat (n_to_be len (be_to_n s))]
= lemma_be_to_n_is_bounded s;
be_to_n_inj s (n_to_be len (be_to_n s)) | {
"file_name": "krmllib/FStar.Krml.Endianness.fst",
"git_rev": "da1e941b2fcb196aa5d1e34941aa00b4c67ac321",
"git_url": "https://github.com/FStarLang/karamel.git",
"project_name": "karamel"
} | {
"end_col": 41,
"end_line": 181,
"start_col": 0,
"start_line": 173
} | module FStar.Krml.Endianness
open FStar.Mul
open FStar.HyperStack.All
module U8 = FStar.UInt8
module U32 = FStar.UInt32
module U64 = FStar.UInt64
module Math = FStar.Math.Lemmas
module S = FStar.Seq
(* Selectively imported from Hacl*'s FStar.Endianness.fst library, with several
name changes *)
inline_for_extraction... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.HyperStac... | [
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "FStar.Math.Lemmas",
"short_module": "Math"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": "FSt... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | len: FStar.UInt32.t -> s: FStar.Seq.Base.seq FStar.UInt8.t
-> FStar.Pervasives.Lemma (requires FStar.Seq.Base.length s == FStar.UInt32.v len)
(ensures
FStar.Krml.Endianness.be_to_n s < Prims.pow2 (8 * FStar.UInt32.v len) /\
FStar.Krml.Endianness.n_to_be len (FStar.Krml.Endianness.be_to_n s) == s... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"FStar.UInt32.t",
"FStar.Seq.Base.seq",
"FStar.UInt8.t",
"FStar.Krml.Endianness.be_to_n_inj",
"FStar.Krml.Endianness.n_to_be",
"FStar.Krml.Endianness.be_to_n",
"Prims.unit",
"FStar.Krml.Endianness.lemma_be_to_n_is_bounded",
"Prims.eq2",
"Prims.int",
"Prims.l_or",
"Prims.b2t",
"Prims.op_Great... | [] | true | false | true | false | false | let n_to_be_be_to_n (len: U32.t) (s: Seq.seq U8.t)
: Lemma (requires (Seq.length s == U32.v len))
(ensures
(be_to_n s < pow2 (8 `Prims.op_Multiply` (U32.v len)) /\ n_to_be len (be_to_n s) == s))
[SMTPat (n_to_be len (be_to_n s))] =
| lemma_be_to_n_is_bounded s;
be_to_n_inj s (n_to_be len (be_to_n s)) | false |
Hacl.Spec.Bignum.Multiplication.fst | Hacl.Spec.Bignum.Multiplication.bn_mul1_add_in_place_lemma | val bn_mul1_add_in_place_lemma:
#t:limb_t
-> #aLen:size_nat
-> a:lbignum t aLen
-> l:limb t
-> acc:lbignum t aLen ->
Lemma (let (c, res) = bn_mul1_add_in_place a l acc in
v c * pow2 (bits t * aLen) + bn_v res == bn_v acc + bn_v a * v l) | val bn_mul1_add_in_place_lemma:
#t:limb_t
-> #aLen:size_nat
-> a:lbignum t aLen
-> l:limb t
-> acc:lbignum t aLen ->
Lemma (let (c, res) = bn_mul1_add_in_place a l acc in
v c * pow2 (bits t * aLen) + bn_v res == bn_v acc + bn_v a * v l) | let bn_mul1_add_in_place_lemma #t #aLen a l acc =
let (c, res) = bn_mul1_add_in_place a l acc in
bn_mul1_add_in_place_lemma_loop a l acc aLen | {
"file_name": "code/bignum/Hacl.Spec.Bignum.Multiplication.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 46,
"end_line": 307,
"start_col": 0,
"start_line": 305
} | module Hacl.Spec.Bignum.Multiplication
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.LoopCombinators
open Hacl.Spec.Bignum.Definitions
open Hacl.Spec.Bignum.Base
open Hacl.Spec.Lib
#reset-options "--z3rlimit 50 --fuel 0 --ifuel 0"
val bn_mul1_f:
#t:limb_t
-> #aLen:size_nat
-> a:lbignum t aLe... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.Lib.fst.checked",
"Hacl.Spec.Bignum.Definitions.fst.checked",
"Hacl.Spec.Bignum.Base.fst.checked",
"FStar.Seq.fst.che... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Lib",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Spec.Bignum.Base",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Spec.Bignum.Definitions",
"short_module": null
},
{
"abbrev": fals... | {
"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.Spec.Bignum.Definitions.lbignum t aLen ->
l: Hacl.Spec.Bignum.Definitions.limb t ->
acc: Hacl.Spec.Bignum.Definitions.lbignum t aLen
-> FStar.Pervasives.Lemma
(ensures
(let _ = Hacl.Spec.Bignum.Multiplication.bn_mul1_add_in_place a l acc in
(let FStar.Pervasives.Native.Mktuple2 ... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Hacl.Spec.Bignum.Definitions.limb_t",
"Lib.IntTypes.size_nat",
"Hacl.Spec.Bignum.Definitions.lbignum",
"Hacl.Spec.Bignum.Definitions.limb",
"Hacl.Spec.Bignum.Multiplication.bn_mul1_add_in_place_lemma_loop",
"Prims.unit",
"FStar.Pervasives.Native.tuple2",
"Hacl.Spec.Bignum.Multiplication.bn_mul1_add_i... | [] | false | false | true | false | false | let bn_mul1_add_in_place_lemma #t #aLen a l acc =
| let c, res = bn_mul1_add_in_place a l acc in
bn_mul1_add_in_place_lemma_loop a l acc aLen | false |
FStar.Krml.Endianness.fst | FStar.Krml.Endianness.uint64_of_le | val uint64_of_le : b: FStar.Krml.Endianness.bytes{FStar.Seq.Base.length b = 8} -> FStar.UInt64.t | let uint64_of_le (b: bytes { S.length b = 8 }) =
let n = le_to_n b in
lemma_le_to_n_is_bounded b;
UInt64.uint_to_t n | {
"file_name": "krmllib/FStar.Krml.Endianness.fst",
"git_rev": "da1e941b2fcb196aa5d1e34941aa00b4c67ac321",
"git_url": "https://github.com/FStarLang/karamel.git",
"project_name": "karamel"
} | {
"end_col": 20,
"end_line": 220,
"start_col": 0,
"start_line": 217
} | module FStar.Krml.Endianness
open FStar.Mul
open FStar.HyperStack.All
module U8 = FStar.UInt8
module U32 = FStar.UInt32
module U64 = FStar.UInt64
module Math = FStar.Math.Lemmas
module S = FStar.Seq
(* Selectively imported from Hacl*'s FStar.Endianness.fst library, with several
name changes *)
inline_for_extraction... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.HyperStac... | [
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "FStar.Math.Lemmas",
"short_module": "Math"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": "FSt... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | b: FStar.Krml.Endianness.bytes{FStar.Seq.Base.length b = 8} -> FStar.UInt64.t | Prims.Tot | [
"total"
] | [] | [
"FStar.Krml.Endianness.bytes",
"Prims.b2t",
"Prims.op_Equality",
"Prims.int",
"FStar.Seq.Base.length",
"FStar.UInt8.t",
"FStar.UInt64.uint_to_t",
"Prims.unit",
"FStar.Krml.Endianness.lemma_le_to_n_is_bounded",
"Prims.nat",
"FStar.Krml.Endianness.le_to_n",
"FStar.UInt64.t"
] | [] | false | false | false | false | false | let uint64_of_le (b: bytes{S.length b = 8}) =
| let n = le_to_n b in
lemma_le_to_n_is_bounded b;
UInt64.uint_to_t n | false | |
FStar.Krml.Endianness.fst | FStar.Krml.Endianness.le_of_uint64 | val le_of_uint64 (x: UInt64.t) : b: bytes{S.length b = 8} | val le_of_uint64 (x: UInt64.t) : b: bytes{S.length b = 8} | let le_of_uint64 (x: UInt64.t): b:bytes{ S.length b = 8 } =
n_to_le 8ul (UInt64.v x) | {
"file_name": "krmllib/FStar.Krml.Endianness.fst",
"git_rev": "da1e941b2fcb196aa5d1e34941aa00b4c67ac321",
"git_url": "https://github.com/FStarLang/karamel.git",
"project_name": "karamel"
} | {
"end_col": 26,
"end_line": 224,
"start_col": 0,
"start_line": 223
} | module FStar.Krml.Endianness
open FStar.Mul
open FStar.HyperStack.All
module U8 = FStar.UInt8
module U32 = FStar.UInt32
module U64 = FStar.UInt64
module Math = FStar.Math.Lemmas
module S = FStar.Seq
(* Selectively imported from Hacl*'s FStar.Endianness.fst library, with several
name changes *)
inline_for_extraction... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.HyperStac... | [
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "FStar.Math.Lemmas",
"short_module": "Math"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": "FSt... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | x: FStar.UInt64.t -> b: FStar.Krml.Endianness.bytes{FStar.Seq.Base.length b = 8} | Prims.Tot | [
"total"
] | [] | [
"FStar.UInt64.t",
"FStar.Krml.Endianness.n_to_le",
"FStar.UInt32.__uint_to_t",
"FStar.UInt64.v",
"FStar.Krml.Endianness.bytes",
"Prims.b2t",
"Prims.op_Equality",
"Prims.int",
"FStar.Seq.Base.length",
"FStar.UInt8.t"
] | [] | false | false | false | false | false | let le_of_uint64 (x: UInt64.t) : b: bytes{S.length b = 8} =
| n_to_le 8ul (UInt64.v x) | false |
Steel.ST.HigherArray.fst | Steel.ST.HigherArray.intro_pts_to | val intro_pts_to (#opened: _) (#elt: Type u#1) (a: array elt) (#v: _) (p: P.perm) (s: Seq.seq elt)
: STGhost unit
opened
(R.pts_to (ptr_of a).base v)
(fun _ -> pts_to a p s)
(v == mk_carrier (US.v (ptr_of a).base_len) (ptr_of a).offset s p /\
valid_perm (US.v (ptr_of a).base_len) (pt... | val intro_pts_to (#opened: _) (#elt: Type u#1) (a: array elt) (#v: _) (p: P.perm) (s: Seq.seq elt)
: STGhost unit
opened
(R.pts_to (ptr_of a).base v)
(fun _ -> pts_to a p s)
(v == mk_carrier (US.v (ptr_of a).base_len) (ptr_of a).offset s p /\
valid_perm (US.v (ptr_of a).base_len) (pt... | let intro_pts_to (#opened: _) (#elt: Type u#1) (a: array elt) (#v: _) (p: P.perm) (s: Seq.seq elt) : STGhost unit opened
(R.pts_to (ptr_of a).base v)
(fun _ -> pts_to a p s)
(
v == mk_carrier (US.v (ptr_of a).base_len) (ptr_of a).offset s p /\
valid_perm (US.v (ptr_of a).base_len) (ptr_of a).offset (Seq.l... | {
"file_name": "lib/steel/Steel.ST.HigherArray.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 18,
"end_line": 165,
"start_col": 0,
"start_line": 152
} | (*
Copyright 2022 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"Steel.ST.PCMReference.fsti.checked",
"Steel.ST.Loops.fsti.checked",
"Steel.PCMMap.fst.checked",
"Steel.PCMFrac.fst.checked",
"Steel.Memory.fsti.checked",
"prims.fst.checked",
"FStar.SizeT.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Rea... | [
{
"abbrev": true,
"full_module": "Steel.PCMMap",
"short_module": "PM"
},
{
"abbrev": true,
"full_module": "FStar.Map",
"short_module": "M"
},
{
"abbrev": true,
"full_module": "Steel.ST.PCMReference",
"short_module": "R"
},
{
"abbrev": true,
"full_module": "Ste... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"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: Steel.ST.HigherArray.array elt -> p: Steel.FractionalPermission.perm -> s: FStar.Seq.Base.seq elt
-> Steel.ST.Effect.Ghost.STGhost Prims.unit | Steel.ST.Effect.Ghost.STGhost | [] | [] | [
"Steel.Memory.inames",
"Steel.ST.HigherArray.array",
"Steel.ST.HigherArray.carrier",
"FStar.Ghost.hide",
"Prims.nat",
"FStar.SizeT.v",
"FStar.Ghost.reveal",
"FStar.SizeT.t",
"Steel.ST.HigherArray.__proj__Mkptr__item__base_len",
"Steel.ST.HigherArray.ptr_of",
"Steel.FractionalPermission.perm",
... | [] | false | true | false | false | false | let intro_pts_to (#opened: _) (#elt: Type u#1) (a: array elt) (#v: _) (p: P.perm) (s: Seq.seq elt)
: STGhost unit
opened
(R.pts_to (ptr_of a).base v)
(fun _ -> pts_to a p s)
(v == mk_carrier (US.v (ptr_of a).base_len) (ptr_of a).offset s p /\
valid_perm (US.v (ptr_of a).base_len) (pt... | change_r_pts_to (ptr_of a).base
v
(ptr_of a).base
(mk_carrier (US.v (ptr_of a).base_len) (ptr_of a).offset s p);
intro_pure _;
rewrite (pts_to0 a p s) (pts_to a p s) | false |
Vale.AES.X64.GF128_Init.fsti | Vale.AES.X64.GF128_Init.va_req_Keyhash_init | val va_req_Keyhash_init
(va_b0: va_code)
(va_s0: va_state)
(win: bool)
(alg: algorithm)
(key: (seq nat32))
(roundkeys_b hkeys_b: buffer128)
: prop | val va_req_Keyhash_init
(va_b0: va_code)
(va_s0: va_state)
(win: bool)
(alg: algorithm)
(key: (seq nat32))
(roundkeys_b hkeys_b: buffer128)
: prop | let va_req_Keyhash_init (va_b0:va_code) (va_s0:va_state) (win:bool) (alg:algorithm) (key:(seq
nat32)) (roundkeys_b:buffer128) (hkeys_b:buffer128) : prop =
(va_require_total va_b0 (va_code_Keyhash_init win alg) va_s0 /\ va_get_ok va_s0 /\ (let
(round_ptr:(va_int_range 0 18446744073709551615)) = (if win then va_g... | {
"file_name": "obj/Vale.AES.X64.GF128_Init.fsti",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 38,
"end_line": 52,
"start_col": 0,
"start_line": 39
} | module Vale.AES.X64.GF128_Init
open Vale.Def.Words_s
open Vale.Def.Words.Four_s
open Vale.Def.Types_s
open FStar.Seq
open Vale.Arch.Types
open Vale.Arch.HeapImpl
open Vale.Math.Poly2_s
open Vale.Math.Poly2
open Vale.Math.Poly2.Bits_s
open Vale.Math.Poly2.Bits
open Vale.Math.Poly2.Lemmas
open Vale.AES.GF128_s
open Vale.... | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsVector.fsti.checked",
"Vale.X64.InsMem.fsti.checked",
"Vale.X64... | [
{
"abbrev": false,
"full_module": "Vale.AES.OptPublic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.AES.GHash",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.AES.X64.GF128_Mul",
"short_module": null
},
{
"abbrev": false,
"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
va_b0: Vale.X64.Decls.va_code ->
va_s0: Vale.X64.Decls.va_state ->
win: Prims.bool ->
alg: Vale.AES.AES_common_s.algorithm ->
key: FStar.Seq.Base.seq Vale.X64.Memory.nat32 ->
roundkeys_b: Vale.X64.Memory.buffer128 ->
hkeys_b: Vale.X64.Memory.buffer128
-> Prims.prop | Prims.Tot | [
"total"
] | [] | [
"Vale.X64.Decls.va_code",
"Vale.X64.Decls.va_state",
"Prims.bool",
"Vale.AES.AES_common_s.algorithm",
"FStar.Seq.Base.seq",
"Vale.X64.Memory.nat32",
"Vale.X64.Memory.buffer128",
"Prims.l_and",
"Vale.X64.Decls.va_require_total",
"Vale.AES.X64.GF128_Init.va_code_Keyhash_init",
"Prims.b2t",
"Vale... | [] | false | false | false | true | true | let va_req_Keyhash_init
(va_b0: va_code)
(va_s0: va_state)
(win: bool)
(alg: algorithm)
(key: (seq nat32))
(roundkeys_b hkeys_b: buffer128)
: prop =
| (va_require_total va_b0 (va_code_Keyhash_init win alg) va_s0 /\ va_get_ok va_s0 /\
(let round_ptr:(va_int_range 0 18446744073709551615) =
(if win then va_get_reg64 rRcx va_s0 else va_get_reg64 rRdi va_s0)
in
let hkey_ptr:(va_int_range 0 18446744073709551615) =
(if win then va_get_reg64 rRdx va_s0 ... | false |
FStar.Krml.Endianness.fst | FStar.Krml.Endianness.n_to_le | val n_to_le : len:U32.t -> n:nat{n < pow2 (8 * U32.v len)} ->
Tot (b:bytes{S.length b == U32.v len /\ n == le_to_n b})
(decreases (U32.v len)) | val n_to_le : len:U32.t -> n:nat{n < pow2 (8 * U32.v len)} ->
Tot (b:bytes{S.length b == U32.v len /\ n == le_to_n b})
(decreases (U32.v len)) | let rec n_to_le len n =
if len = 0ul then
S.empty
else
let len = U32.(len -^ 1ul) in
let byte = U8.uint_to_t (n % 256) in
let n' = n / 256 in
Math.pow2_plus 8 (8 * U32.v len);
assert(n' < pow2 (8 * U32.v len ));
let b' = n_to_le len n' in
let b = S.cons byte b' in
S.lemma_eq_intr... | {
"file_name": "krmllib/FStar.Krml.Endianness.fst",
"git_rev": "da1e941b2fcb196aa5d1e34941aa00b4c67ac321",
"git_url": "https://github.com/FStarLang/karamel.git",
"project_name": "karamel"
} | {
"end_col": 5,
"end_line": 104,
"start_col": 0,
"start_line": 92
} | module FStar.Krml.Endianness
open FStar.Mul
open FStar.HyperStack.All
module U8 = FStar.UInt8
module U32 = FStar.UInt32
module U64 = FStar.UInt64
module Math = FStar.Math.Lemmas
module S = FStar.Seq
(* Selectively imported from Hacl*'s FStar.Endianness.fst library, with several
name changes *)
inline_for_extraction... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.HyperStac... | [
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "FStar.Math.Lemmas",
"short_module": "Math"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": "FSt... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | len: FStar.UInt32.t -> n: Prims.nat{n < Prims.pow2 (8 * FStar.UInt32.v len)}
-> Prims.Tot
(b:
FStar.Krml.Endianness.bytes
{FStar.Seq.Base.length b == FStar.UInt32.v len /\ n == FStar.Krml.Endianness.le_to_n b}) | Prims.Tot | [
"total",
""
] | [] | [
"FStar.UInt32.t",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.pow2",
"FStar.Mul.op_Star",
"FStar.UInt32.v",
"Prims.op_Equality",
"FStar.UInt32.__uint_to_t",
"FStar.Seq.Base.empty",
"FStar.UInt8.t",
"Prims.bool",
"Prims.unit",
"FStar.Seq.Base.lemma_eq_intro",
"FStar.Seq.Properti... | [
"recursion"
] | false | false | false | false | false | let rec n_to_le len n =
| if len = 0ul
then S.empty
else
let len = let open U32 in len -^ 1ul in
let byte = U8.uint_to_t (n % 256) in
let n' = n / 256 in
Math.pow2_plus 8 (8 * U32.v len);
assert (n' < pow2 (8 * U32.v len));
let b' = n_to_le len n' in
let b = S.cons byte b' in
S.lemma_eq_intro b' (S.tail b);
b | false |
FStar.Krml.Endianness.fst | FStar.Krml.Endianness.uint64_of_be | val uint64_of_be : b: FStar.Krml.Endianness.bytes{FStar.Seq.Base.length b = 8} -> FStar.UInt64.t | let uint64_of_be (b: bytes { S.length b = 8 }) =
let n = be_to_n b in
lemma_be_to_n_is_bounded b;
UInt64.uint_to_t n | {
"file_name": "krmllib/FStar.Krml.Endianness.fst",
"git_rev": "da1e941b2fcb196aa5d1e34941aa00b4c67ac321",
"git_url": "https://github.com/FStarLang/karamel.git",
"project_name": "karamel"
} | {
"end_col": 20,
"end_line": 230,
"start_col": 0,
"start_line": 227
} | module FStar.Krml.Endianness
open FStar.Mul
open FStar.HyperStack.All
module U8 = FStar.UInt8
module U32 = FStar.UInt32
module U64 = FStar.UInt64
module Math = FStar.Math.Lemmas
module S = FStar.Seq
(* Selectively imported from Hacl*'s FStar.Endianness.fst library, with several
name changes *)
inline_for_extraction... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.HyperStac... | [
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "FStar.Math.Lemmas",
"short_module": "Math"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": "FSt... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | b: FStar.Krml.Endianness.bytes{FStar.Seq.Base.length b = 8} -> FStar.UInt64.t | Prims.Tot | [
"total"
] | [] | [
"FStar.Krml.Endianness.bytes",
"Prims.b2t",
"Prims.op_Equality",
"Prims.int",
"FStar.Seq.Base.length",
"FStar.UInt8.t",
"FStar.UInt64.uint_to_t",
"Prims.unit",
"FStar.Krml.Endianness.lemma_be_to_n_is_bounded",
"Prims.nat",
"FStar.Krml.Endianness.be_to_n",
"FStar.UInt64.t"
] | [] | false | false | false | false | false | let uint64_of_be (b: bytes{S.length b = 8}) =
| let n = be_to_n b in
lemma_be_to_n_is_bounded b;
UInt64.uint_to_t n | false | |
Hacl.Spec.Bignum.Multiplication.fst | Hacl.Spec.Bignum.Multiplication.bn_mul_lemma_ | val bn_mul_lemma_:
#t:limb_t
-> #aLen:size_nat
-> #bLen:size_nat{aLen + bLen <= max_size_t}
-> a:lbignum t aLen
-> b:lbignum t bLen
-> j:size_nat{j < bLen}
-> acc:lbignum t (aLen + bLen) ->
Lemma (let res = bn_mul_ a b j acc in
v res.[aLen + j] * pow2 (bits t * (aLen + j)) + eval_ (aLen + bLen) res... | val bn_mul_lemma_:
#t:limb_t
-> #aLen:size_nat
-> #bLen:size_nat{aLen + bLen <= max_size_t}
-> a:lbignum t aLen
-> b:lbignum t bLen
-> j:size_nat{j < bLen}
-> acc:lbignum t (aLen + bLen) ->
Lemma (let res = bn_mul_ a b j acc in
v res.[aLen + j] * pow2 (bits t * (aLen + j)) + eval_ (aLen + bLen) res... | let bn_mul_lemma_ #t #aLen #bLen a b j acc =
let c, res = bn_mul1_lshift_add a b.[j] j acc in
bn_mul1_lshift_add_lemma a b.[j] j acc;
let res1 = res.[aLen + j] <- c in
bn_eval_extensionality_j res res1 (aLen + j) | {
"file_name": "code/bignum/Hacl.Spec.Bignum.Multiplication.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 46,
"end_line": 376,
"start_col": 0,
"start_line": 371
} | module Hacl.Spec.Bignum.Multiplication
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.LoopCombinators
open Hacl.Spec.Bignum.Definitions
open Hacl.Spec.Bignum.Base
open Hacl.Spec.Lib
#reset-options "--z3rlimit 50 --fuel 0 --ifuel 0"
val bn_mul1_f:
#t:limb_t
-> #aLen:size_nat
-> a:lbignum t aLe... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.Lib.fst.checked",
"Hacl.Spec.Bignum.Definitions.fst.checked",
"Hacl.Spec.Bignum.Base.fst.checked",
"FStar.Seq.fst.che... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Lib",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Spec.Bignum.Base",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Spec.Bignum.Definitions",
"short_module": null
},
{
"abbrev": fals... | {
"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.Spec.Bignum.Definitions.lbignum t aLen ->
b: Hacl.Spec.Bignum.Definitions.lbignum t bLen ->
j: Lib.IntTypes.size_nat{j < bLen} ->
acc: Hacl.Spec.Bignum.Definitions.lbignum t (aLen + bLen)
-> FStar.Pervasives.Lemma
(ensures
(let res = Hacl.Spec.Bignum.Multiplication.bn_mul_ a b j acc... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Hacl.Spec.Bignum.Definitions.limb_t",
"Lib.IntTypes.size_nat",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_Addition",
"Lib.IntTypes.max_size_t",
"Hacl.Spec.Bignum.Definitions.lbignum",
"Prims.op_LessThan",
"Hacl.Spec.Bignum.Definitions.limb",
"Hacl.Spec.Bignum.Definitions.bn_eval_extension... | [] | false | false | true | false | false | let bn_mul_lemma_ #t #aLen #bLen a b j acc =
| let c, res = bn_mul1_lshift_add a b.[ j ] j acc in
bn_mul1_lshift_add_lemma a b.[ j ] j acc;
let res1 = res.[ aLen + j ] <- c in
bn_eval_extensionality_j res res1 (aLen + j) | false |
Vale.AES.X64.GF128_Init.fsti | Vale.AES.X64.GF128_Init.va_wp_Keyhash_init | val va_wp_Keyhash_init
(win: bool)
(alg: algorithm)
(key: (seq nat32))
(roundkeys_b hkeys_b: buffer128)
(va_s0: va_state)
(va_k: (va_state -> unit -> Type0))
: Type0 | val va_wp_Keyhash_init
(win: bool)
(alg: algorithm)
(key: (seq nat32))
(roundkeys_b hkeys_b: buffer128)
(va_s0: va_state)
(va_k: (va_state -> unit -> Type0))
: Type0 | let va_wp_Keyhash_init (win:bool) (alg:algorithm) (key:(seq nat32)) (roundkeys_b:buffer128)
(hkeys_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 =
(va_get_ok va_s0 /\ (let (round_ptr:(va_int_range 0 18446744073709551615)) = va_if win (fun _ ->
va_get_reg64 rRcx va_s0) (fun _ -> va_get... | {
"file_name": "obj/Vale.AES.X64.GF128_Init.fsti",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 88,
"end_line": 129,
"start_col": 0,
"start_line": 100
} | module Vale.AES.X64.GF128_Init
open Vale.Def.Words_s
open Vale.Def.Words.Four_s
open Vale.Def.Types_s
open FStar.Seq
open Vale.Arch.Types
open Vale.Arch.HeapImpl
open Vale.Math.Poly2_s
open Vale.Math.Poly2
open Vale.Math.Poly2.Bits_s
open Vale.Math.Poly2.Bits
open Vale.Math.Poly2.Lemmas
open Vale.AES.GF128_s
open Vale.... | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsVector.fsti.checked",
"Vale.X64.InsMem.fsti.checked",
"Vale.X64... | [
{
"abbrev": false,
"full_module": "Vale.AES.OptPublic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.AES.GHash",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.AES.X64.GF128_Mul",
"short_module": null
},
{
"abbrev": false,
"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
win: Prims.bool ->
alg: Vale.AES.AES_common_s.algorithm ->
key: FStar.Seq.Base.seq Vale.X64.Memory.nat32 ->
roundkeys_b: Vale.X64.Memory.buffer128 ->
hkeys_b: Vale.X64.Memory.buffer128 ->
va_s0: Vale.X64.Decls.va_state ->
va_k: (_: Vale.X64.Decls.va_state -> _: Prims.unit -> Type0)
-> Typ... | Prims.Tot | [
"total"
] | [] | [
"Prims.bool",
"Vale.AES.AES_common_s.algorithm",
"FStar.Seq.Base.seq",
"Vale.X64.Memory.nat32",
"Vale.X64.Memory.buffer128",
"Vale.X64.Decls.va_state",
"Prims.unit",
"Prims.l_and",
"Prims.b2t",
"Vale.X64.Decls.va_get_ok",
"Vale.X64.Memory.is_initial_heap",
"Vale.X64.Decls.va_get_mem_layout",
... | [] | false | false | false | true | true | let va_wp_Keyhash_init
(win: bool)
(alg: algorithm)
(key: (seq nat32))
(roundkeys_b hkeys_b: buffer128)
(va_s0: va_state)
(va_k: (va_state -> unit -> Type0))
: Type0 =
| (va_get_ok va_s0 /\
(let round_ptr:(va_int_range 0 18446744073709551615) =
va_if win (fun _ -> va_get_reg64 rRcx va_s0) (fun _ -> va_get_reg64 rRdi va_s0)
in
let hkey_ptr:(va_int_range 0 18446744073709551615) =
va_if win (fun _ -> va_get_reg64 rRdx va_s0) (fun _ -> va_get_reg64 rRsi va_s0)
in
... | false |
FStar.Krml.Endianness.fst | FStar.Krml.Endianness.be_of_uint64 | val be_of_uint64 (x: UInt64.t) : b: bytes{S.length b = 8} | val be_of_uint64 (x: UInt64.t) : b: bytes{S.length b = 8} | let be_of_uint64 (x: UInt64.t): b:bytes{ S.length b = 8 } =
n_to_be 8ul (UInt64.v x) | {
"file_name": "krmllib/FStar.Krml.Endianness.fst",
"git_rev": "da1e941b2fcb196aa5d1e34941aa00b4c67ac321",
"git_url": "https://github.com/FStarLang/karamel.git",
"project_name": "karamel"
} | {
"end_col": 26,
"end_line": 234,
"start_col": 0,
"start_line": 233
} | module FStar.Krml.Endianness
open FStar.Mul
open FStar.HyperStack.All
module U8 = FStar.UInt8
module U32 = FStar.UInt32
module U64 = FStar.UInt64
module Math = FStar.Math.Lemmas
module S = FStar.Seq
(* Selectively imported from Hacl*'s FStar.Endianness.fst library, with several
name changes *)
inline_for_extraction... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.HyperStac... | [
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "FStar.Math.Lemmas",
"short_module": "Math"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": "FSt... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | x: FStar.UInt64.t -> b: FStar.Krml.Endianness.bytes{FStar.Seq.Base.length b = 8} | Prims.Tot | [
"total"
] | [] | [
"FStar.UInt64.t",
"FStar.Krml.Endianness.n_to_be",
"FStar.UInt32.__uint_to_t",
"FStar.UInt64.v",
"FStar.Krml.Endianness.bytes",
"Prims.b2t",
"Prims.op_Equality",
"Prims.int",
"FStar.Seq.Base.length",
"FStar.UInt8.t"
] | [] | false | false | false | false | false | let be_of_uint64 (x: UInt64.t) : b: bytes{S.length b = 8} =
| n_to_be 8ul (UInt64.v x) | false |
FStar.Krml.Endianness.fst | FStar.Krml.Endianness.le_of_seq_uint32 | val le_of_seq_uint32 (s: S.seq UInt32.t)
: Tot (b: bytes{S.length b = 4 * S.length s}) (decreases (S.length s)) | val le_of_seq_uint32 (s: S.seq UInt32.t)
: Tot (b: bytes{S.length b = 4 * S.length s}) (decreases (S.length s)) | let rec le_of_seq_uint32 (s: S.seq UInt32.t):
Tot (b:bytes { S.length b = 4 * S.length s })
(decreases (S.length s))
=
if S.length s = 0 then
S.empty
else
S.append (le_of_uint32 (S.head s)) (le_of_seq_uint32 (S.tail s)) | {
"file_name": "krmllib/FStar.Krml.Endianness.fst",
"git_rev": "da1e941b2fcb196aa5d1e34941aa00b4c67ac321",
"git_url": "https://github.com/FStarLang/karamel.git",
"project_name": "karamel"
} | {
"end_col": 68,
"end_line": 254,
"start_col": 0,
"start_line": 247
} | module FStar.Krml.Endianness
open FStar.Mul
open FStar.HyperStack.All
module U8 = FStar.UInt8
module U32 = FStar.UInt32
module U64 = FStar.UInt64
module Math = FStar.Math.Lemmas
module S = FStar.Seq
(* Selectively imported from Hacl*'s FStar.Endianness.fst library, with several
name changes *)
inline_for_extraction... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.HyperStac... | [
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "FStar.Math.Lemmas",
"short_module": "Math"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": "FSt... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | s: FStar.Seq.Base.seq FStar.UInt32.t
-> Prims.Tot
(b: FStar.Krml.Endianness.bytes{FStar.Seq.Base.length b = 4 * FStar.Seq.Base.length s}) | Prims.Tot | [
"total",
""
] | [] | [
"FStar.Seq.Base.seq",
"FStar.UInt32.t",
"Prims.op_Equality",
"Prims.int",
"FStar.Seq.Base.length",
"FStar.Seq.Base.empty",
"FStar.UInt8.t",
"Prims.bool",
"FStar.Seq.Base.append",
"FStar.Krml.Endianness.le_of_uint32",
"FStar.Seq.Properties.head",
"FStar.Krml.Endianness.le_of_seq_uint32",
"FSt... | [
"recursion"
] | false | false | false | false | false | let rec le_of_seq_uint32 (s: S.seq UInt32.t)
: Tot (b: bytes{S.length b = 4 * S.length s}) (decreases (S.length s)) =
| if S.length s = 0 then S.empty else S.append (le_of_uint32 (S.head s)) (le_of_seq_uint32 (S.tail s)) | false |
FStar.Krml.Endianness.fst | FStar.Krml.Endianness.be_of_uint32 | val be_of_uint32 (x: UInt32.t) : b: bytes{S.length b = 4} | val be_of_uint32 (x: UInt32.t) : b: bytes{S.length b = 4} | let be_of_uint32 (x: UInt32.t): b:bytes{ S.length b = 4 } =
n_to_be 4ul (UInt32.v x) | {
"file_name": "krmllib/FStar.Krml.Endianness.fst",
"git_rev": "da1e941b2fcb196aa5d1e34941aa00b4c67ac321",
"git_url": "https://github.com/FStarLang/karamel.git",
"project_name": "karamel"
} | {
"end_col": 26,
"end_line": 214,
"start_col": 0,
"start_line": 213
} | module FStar.Krml.Endianness
open FStar.Mul
open FStar.HyperStack.All
module U8 = FStar.UInt8
module U32 = FStar.UInt32
module U64 = FStar.UInt64
module Math = FStar.Math.Lemmas
module S = FStar.Seq
(* Selectively imported from Hacl*'s FStar.Endianness.fst library, with several
name changes *)
inline_for_extraction... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.HyperStac... | [
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "FStar.Math.Lemmas",
"short_module": "Math"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": "FSt... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | x: FStar.UInt32.t -> b: FStar.Krml.Endianness.bytes{FStar.Seq.Base.length b = 4} | Prims.Tot | [
"total"
] | [] | [
"FStar.UInt32.t",
"FStar.Krml.Endianness.n_to_be",
"FStar.UInt32.__uint_to_t",
"FStar.UInt32.v",
"FStar.Krml.Endianness.bytes",
"Prims.b2t",
"Prims.op_Equality",
"Prims.int",
"FStar.Seq.Base.length",
"FStar.UInt8.t"
] | [] | false | false | false | false | false | let be_of_uint32 (x: UInt32.t) : b: bytes{S.length b = 4} =
| n_to_be 4ul (UInt32.v x) | false |
FStar.Krml.Endianness.fst | FStar.Krml.Endianness.le_of_seq_uint64 | val le_of_seq_uint64 (s: S.seq UInt64.t)
: Tot (b: bytes{S.length b = 8 * S.length s}) (decreases (S.length s)) | val le_of_seq_uint64 (s: S.seq UInt64.t)
: Tot (b: bytes{S.length b = 8 * S.length s}) (decreases (S.length s)) | let rec le_of_seq_uint64 (s: S.seq UInt64.t):
Tot (b:bytes { S.length b = 8 * S.length s })
(decreases (S.length s))
=
if S.length s = 0 then
S.empty
else
S.append (le_of_uint64 (S.head s)) (le_of_seq_uint64 (S.tail s)) | {
"file_name": "krmllib/FStar.Krml.Endianness.fst",
"git_rev": "da1e941b2fcb196aa5d1e34941aa00b4c67ac321",
"git_url": "https://github.com/FStarLang/karamel.git",
"project_name": "karamel"
} | {
"end_col": 68,
"end_line": 294,
"start_col": 0,
"start_line": 287
} | module FStar.Krml.Endianness
open FStar.Mul
open FStar.HyperStack.All
module U8 = FStar.UInt8
module U32 = FStar.UInt32
module U64 = FStar.UInt64
module Math = FStar.Math.Lemmas
module S = FStar.Seq
(* Selectively imported from Hacl*'s FStar.Endianness.fst library, with several
name changes *)
inline_for_extraction... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.HyperStac... | [
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "FStar.Math.Lemmas",
"short_module": "Math"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": "FSt... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | s: FStar.Seq.Base.seq FStar.UInt64.t
-> Prims.Tot
(b: FStar.Krml.Endianness.bytes{FStar.Seq.Base.length b = 8 * FStar.Seq.Base.length s}) | Prims.Tot | [
"total",
""
] | [] | [
"FStar.Seq.Base.seq",
"FStar.UInt64.t",
"Prims.op_Equality",
"Prims.int",
"FStar.Seq.Base.length",
"FStar.Seq.Base.empty",
"FStar.UInt8.t",
"Prims.bool",
"FStar.Seq.Base.append",
"FStar.Krml.Endianness.le_of_uint64",
"FStar.Seq.Properties.head",
"FStar.Krml.Endianness.le_of_seq_uint64",
"FSt... | [
"recursion"
] | false | false | false | false | false | let rec le_of_seq_uint64 (s: S.seq UInt64.t)
: Tot (b: bytes{S.length b = 8 * S.length s}) (decreases (S.length s)) =
| if S.length s = 0 then S.empty else S.append (le_of_uint64 (S.head s)) (le_of_seq_uint64 (S.tail s)) | false |
FStar.Krml.Endianness.fst | FStar.Krml.Endianness.be_of_seq_uint32 | val be_of_seq_uint32 (s: S.seq UInt32.t)
: Tot (b: bytes{S.length b = 4 * S.length s}) (decreases (S.length s)) | val be_of_seq_uint32 (s: S.seq UInt32.t)
: Tot (b: bytes{S.length b = 4 * S.length s}) (decreases (S.length s)) | let rec be_of_seq_uint32 (s: S.seq UInt32.t):
Tot (b:bytes { S.length b = 4 * S.length s })
(decreases (S.length s))
=
if S.length s = 0 then
S.empty
else
S.append (be_of_uint32 (S.head s)) (be_of_seq_uint32 (S.tail s)) | {
"file_name": "krmllib/FStar.Krml.Endianness.fst",
"git_rev": "da1e941b2fcb196aa5d1e34941aa00b4c67ac321",
"git_url": "https://github.com/FStarLang/karamel.git",
"project_name": "karamel"
} | {
"end_col": 68,
"end_line": 274,
"start_col": 0,
"start_line": 267
} | module FStar.Krml.Endianness
open FStar.Mul
open FStar.HyperStack.All
module U8 = FStar.UInt8
module U32 = FStar.UInt32
module U64 = FStar.UInt64
module Math = FStar.Math.Lemmas
module S = FStar.Seq
(* Selectively imported from Hacl*'s FStar.Endianness.fst library, with several
name changes *)
inline_for_extraction... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.HyperStac... | [
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "FStar.Math.Lemmas",
"short_module": "Math"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": "FSt... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | s: FStar.Seq.Base.seq FStar.UInt32.t
-> Prims.Tot
(b: FStar.Krml.Endianness.bytes{FStar.Seq.Base.length b = 4 * FStar.Seq.Base.length s}) | Prims.Tot | [
"total",
""
] | [] | [
"FStar.Seq.Base.seq",
"FStar.UInt32.t",
"Prims.op_Equality",
"Prims.int",
"FStar.Seq.Base.length",
"FStar.Seq.Base.empty",
"FStar.UInt8.t",
"Prims.bool",
"FStar.Seq.Base.append",
"FStar.Krml.Endianness.be_of_uint32",
"FStar.Seq.Properties.head",
"FStar.Krml.Endianness.be_of_seq_uint32",
"FSt... | [
"recursion"
] | false | false | false | false | false | let rec be_of_seq_uint32 (s: S.seq UInt32.t)
: Tot (b: bytes{S.length b = 4 * S.length s}) (decreases (S.length s)) =
| if S.length s = 0 then S.empty else S.append (be_of_uint32 (S.head s)) (be_of_seq_uint32 (S.tail s)) | false |
Vale.AES.X64.GF128_Init.fsti | Vale.AES.X64.GF128_Init.va_quick_Keyhash_init | val va_quick_Keyhash_init
(win: bool)
(alg: algorithm)
(key: (seq nat32))
(roundkeys_b hkeys_b: buffer128)
: (va_quickCode unit (va_code_Keyhash_init win alg)) | val va_quick_Keyhash_init
(win: bool)
(alg: algorithm)
(key: (seq nat32))
(roundkeys_b hkeys_b: buffer128)
: (va_quickCode unit (va_code_Keyhash_init win alg)) | let va_quick_Keyhash_init (win:bool) (alg:algorithm) (key:(seq nat32)) (roundkeys_b:buffer128)
(hkeys_b:buffer128) : (va_quickCode unit (va_code_Keyhash_init win alg)) =
(va_QProc (va_code_Keyhash_init win alg) ([va_Mod_flags; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm
4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; v... | {
"file_name": "obj/Vale.AES.X64.GF128_Init.fsti",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 62,
"end_line": 146,
"start_col": 0,
"start_line": 140
} | module Vale.AES.X64.GF128_Init
open Vale.Def.Words_s
open Vale.Def.Words.Four_s
open Vale.Def.Types_s
open FStar.Seq
open Vale.Arch.Types
open Vale.Arch.HeapImpl
open Vale.Math.Poly2_s
open Vale.Math.Poly2
open Vale.Math.Poly2.Bits_s
open Vale.Math.Poly2.Bits
open Vale.Math.Poly2.Lemmas
open Vale.AES.GF128_s
open Vale.... | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsVector.fsti.checked",
"Vale.X64.InsMem.fsti.checked",
"Vale.X64... | [
{
"abbrev": false,
"full_module": "Vale.AES.OptPublic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.AES.GHash",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.AES.X64.GF128_Mul",
"short_module": null
},
{
"abbrev": false,
"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
win: Prims.bool ->
alg: Vale.AES.AES_common_s.algorithm ->
key: FStar.Seq.Base.seq Vale.X64.Memory.nat32 ->
roundkeys_b: Vale.X64.Memory.buffer128 ->
hkeys_b: Vale.X64.Memory.buffer128
-> Vale.X64.QuickCode.va_quickCode Prims.unit
(Vale.AES.X64.GF128_Init.va_code_Keyhash_init win alg) | Prims.Tot | [
"total"
] | [] | [
"Prims.bool",
"Vale.AES.AES_common_s.algorithm",
"FStar.Seq.Base.seq",
"Vale.X64.Memory.nat32",
"Vale.X64.Memory.buffer128",
"Vale.X64.QuickCode.va_QProc",
"Prims.unit",
"Vale.AES.X64.GF128_Init.va_code_Keyhash_init",
"Prims.Cons",
"Vale.X64.QuickCode.mod_t",
"Vale.X64.QuickCode.va_Mod_flags",
... | [] | false | false | false | false | false | let va_quick_Keyhash_init
(win: bool)
(alg: algorithm)
(key: (seq nat32))
(roundkeys_b hkeys_b: buffer128)
: (va_quickCode unit (va_code_Keyhash_init win alg)) =
| (va_QProc (va_code_Keyhash_init win alg)
([
va_Mod_flags; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2;
va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_mem_layout; va_Mod_mem_heaplet 1; va_Mod_reg64 rR12;
va_Mod_reg64 rR8; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRax; v... | false |
FStar.Krml.Endianness.fst | FStar.Krml.Endianness.seq_uint32_of_le | val seq_uint32_of_le (l: nat) (b: bytes{S.length b = 4 * l}) : s: S.seq UInt32.t {S.length s = l} | val seq_uint32_of_le (l: nat) (b: bytes{S.length b = 4 * l}) : s: S.seq UInt32.t {S.length s = l} | let rec seq_uint32_of_le (l: nat) (b: bytes{ S.length b = 4 * l }):
s:S.seq UInt32.t { S.length s = l }
=
if S.length b = 0 then
S.empty
else
let hd, tl = Seq.split b 4 in
S.cons (uint32_of_le hd) (seq_uint32_of_le (l - 1) tl) | {
"file_name": "krmllib/FStar.Krml.Endianness.fst",
"git_rev": "da1e941b2fcb196aa5d1e34941aa00b4c67ac321",
"git_url": "https://github.com/FStarLang/karamel.git",
"project_name": "karamel"
} | {
"end_col": 58,
"end_line": 244,
"start_col": 0,
"start_line": 237
} | module FStar.Krml.Endianness
open FStar.Mul
open FStar.HyperStack.All
module U8 = FStar.UInt8
module U32 = FStar.UInt32
module U64 = FStar.UInt64
module Math = FStar.Math.Lemmas
module S = FStar.Seq
(* Selectively imported from Hacl*'s FStar.Endianness.fst library, with several
name changes *)
inline_for_extraction... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.HyperStac... | [
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "FStar.Math.Lemmas",
"short_module": "Math"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": "FSt... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | l: Prims.nat -> b: FStar.Krml.Endianness.bytes{FStar.Seq.Base.length b = 4 * l}
-> s: FStar.Seq.Base.seq FStar.UInt32.t {FStar.Seq.Base.length s = l} | Prims.Tot | [
"total"
] | [] | [
"Prims.nat",
"FStar.Krml.Endianness.bytes",
"Prims.b2t",
"Prims.op_Equality",
"Prims.int",
"FStar.Seq.Base.length",
"FStar.UInt8.t",
"FStar.Mul.op_Star",
"FStar.Seq.Base.empty",
"FStar.UInt32.t",
"Prims.bool",
"FStar.Seq.Base.seq",
"FStar.Seq.Base.cons",
"FStar.Krml.Endianness.uint32_of_le... | [
"recursion"
] | false | false | false | false | false | let rec seq_uint32_of_le (l: nat) (b: bytes{S.length b = 4 * l})
: s: S.seq UInt32.t {S.length s = l} =
| if S.length b = 0
then S.empty
else
let hd, tl = Seq.split b 4 in
S.cons (uint32_of_le hd) (seq_uint32_of_le (l - 1) tl) | false |
FStar.Krml.Endianness.fst | FStar.Krml.Endianness.seq_uint64_of_le | val seq_uint64_of_le (l: nat) (b: bytes{S.length b = 8 * l}) : s: S.seq UInt64.t {S.length s = l} | val seq_uint64_of_le (l: nat) (b: bytes{S.length b = 8 * l}) : s: S.seq UInt64.t {S.length s = l} | let rec seq_uint64_of_le (l: nat) (b: bytes{ S.length b = 8 * l }):
s:S.seq UInt64.t { S.length s = l }
=
if S.length b = 0 then
S.empty
else
let hd, tl = Seq.split b 8 in
S.cons (uint64_of_le hd) (seq_uint64_of_le (l - 1) tl) | {
"file_name": "krmllib/FStar.Krml.Endianness.fst",
"git_rev": "da1e941b2fcb196aa5d1e34941aa00b4c67ac321",
"git_url": "https://github.com/FStarLang/karamel.git",
"project_name": "karamel"
} | {
"end_col": 58,
"end_line": 284,
"start_col": 0,
"start_line": 277
} | module FStar.Krml.Endianness
open FStar.Mul
open FStar.HyperStack.All
module U8 = FStar.UInt8
module U32 = FStar.UInt32
module U64 = FStar.UInt64
module Math = FStar.Math.Lemmas
module S = FStar.Seq
(* Selectively imported from Hacl*'s FStar.Endianness.fst library, with several
name changes *)
inline_for_extraction... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.HyperStac... | [
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "FStar.Math.Lemmas",
"short_module": "Math"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": "FSt... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | l: Prims.nat -> b: FStar.Krml.Endianness.bytes{FStar.Seq.Base.length b = 8 * l}
-> s: FStar.Seq.Base.seq FStar.UInt64.t {FStar.Seq.Base.length s = l} | Prims.Tot | [
"total"
] | [] | [
"Prims.nat",
"FStar.Krml.Endianness.bytes",
"Prims.b2t",
"Prims.op_Equality",
"Prims.int",
"FStar.Seq.Base.length",
"FStar.UInt8.t",
"FStar.Mul.op_Star",
"FStar.Seq.Base.empty",
"FStar.UInt64.t",
"Prims.bool",
"FStar.Seq.Base.seq",
"FStar.Seq.Base.cons",
"FStar.Krml.Endianness.uint64_of_le... | [
"recursion"
] | false | false | false | false | false | let rec seq_uint64_of_le (l: nat) (b: bytes{S.length b = 8 * l})
: s: S.seq UInt64.t {S.length s = l} =
| if S.length b = 0
then S.empty
else
let hd, tl = Seq.split b 8 in
S.cons (uint64_of_le hd) (seq_uint64_of_le (l - 1) tl) | false |
FStar.Krml.Endianness.fst | FStar.Krml.Endianness.seq_uint32_of_be | val seq_uint32_of_be (l: nat) (b: bytes{S.length b = 4 * l}) : s: S.seq UInt32.t {S.length s = l} | val seq_uint32_of_be (l: nat) (b: bytes{S.length b = 4 * l}) : s: S.seq UInt32.t {S.length s = l} | let rec seq_uint32_of_be (l: nat) (b: bytes{ S.length b = 4 * l }):
s:S.seq UInt32.t { S.length s = l }
=
if S.length b = 0 then
S.empty
else
let hd, tl = Seq.split b 4 in
S.cons (uint32_of_be hd) (seq_uint32_of_be (l - 1) tl) | {
"file_name": "krmllib/FStar.Krml.Endianness.fst",
"git_rev": "da1e941b2fcb196aa5d1e34941aa00b4c67ac321",
"git_url": "https://github.com/FStarLang/karamel.git",
"project_name": "karamel"
} | {
"end_col": 58,
"end_line": 264,
"start_col": 0,
"start_line": 257
} | module FStar.Krml.Endianness
open FStar.Mul
open FStar.HyperStack.All
module U8 = FStar.UInt8
module U32 = FStar.UInt32
module U64 = FStar.UInt64
module Math = FStar.Math.Lemmas
module S = FStar.Seq
(* Selectively imported from Hacl*'s FStar.Endianness.fst library, with several
name changes *)
inline_for_extraction... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.HyperStac... | [
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "FStar.Math.Lemmas",
"short_module": "Math"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": "FSt... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | l: Prims.nat -> b: FStar.Krml.Endianness.bytes{FStar.Seq.Base.length b = 4 * l}
-> s: FStar.Seq.Base.seq FStar.UInt32.t {FStar.Seq.Base.length s = l} | Prims.Tot | [
"total"
] | [] | [
"Prims.nat",
"FStar.Krml.Endianness.bytes",
"Prims.b2t",
"Prims.op_Equality",
"Prims.int",
"FStar.Seq.Base.length",
"FStar.UInt8.t",
"FStar.Mul.op_Star",
"FStar.Seq.Base.empty",
"FStar.UInt32.t",
"Prims.bool",
"FStar.Seq.Base.seq",
"FStar.Seq.Base.cons",
"FStar.Krml.Endianness.uint32_of_be... | [
"recursion"
] | false | false | false | false | false | let rec seq_uint32_of_be (l: nat) (b: bytes{S.length b = 4 * l})
: s: S.seq UInt32.t {S.length s = l} =
| if S.length b = 0
then S.empty
else
let hd, tl = Seq.split b 4 in
S.cons (uint32_of_be hd) (seq_uint32_of_be (l - 1) tl) | false |
Hacl.Spec.Bignum.Multiplication.fst | Hacl.Spec.Bignum.Multiplication.bn_mul_loop_lemma | val bn_mul_loop_lemma:
#t:limb_t
-> #aLen:size_nat
-> #bLen:size_nat{aLen + bLen <= max_size_t}
-> a:lbignum t aLen
-> b:lbignum t bLen
-> i:nat{i <= bLen} ->
Lemma (let res = create (aLen + bLen) (uint #t 0) in
let resi = repeati i (bn_mul_ a b) res in
eval_ (aLen + bLen) resi (aLen + i) == bn_v ... | val bn_mul_loop_lemma:
#t:limb_t
-> #aLen:size_nat
-> #bLen:size_nat{aLen + bLen <= max_size_t}
-> a:lbignum t aLen
-> b:lbignum t bLen
-> i:nat{i <= bLen} ->
Lemma (let res = create (aLen + bLen) (uint #t 0) in
let resi = repeati i (bn_mul_ a b) res in
eval_ (aLen + bLen) resi (aLen + i) == bn_v ... | let rec bn_mul_loop_lemma #t #aLen #bLen a b i =
let res = create (aLen + bLen) (uint #t 0) in
let resi = repeati i (bn_mul_ a b) res in
if i = 0 then begin
eq_repeati0 i (bn_mul_ a b) res;
bn_eval0 b;
bn_eval_zeroes #t (aLen + bLen) (aLen + i);
() end
else begin
unfold_repeati i (bn_mul_ a ... | {
"file_name": "code/bignum/Hacl.Spec.Bignum.Multiplication.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 10,
"end_line": 445,
"start_col": 0,
"start_line": 429
} | module Hacl.Spec.Bignum.Multiplication
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.LoopCombinators
open Hacl.Spec.Bignum.Definitions
open Hacl.Spec.Bignum.Base
open Hacl.Spec.Lib
#reset-options "--z3rlimit 50 --fuel 0 --ifuel 0"
val bn_mul1_f:
#t:limb_t
-> #aLen:size_nat
-> a:lbignum t aLe... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.Lib.fst.checked",
"Hacl.Spec.Bignum.Definitions.fst.checked",
"Hacl.Spec.Bignum.Base.fst.checked",
"FStar.Seq.fst.che... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Lib",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Spec.Bignum.Base",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Spec.Bignum.Definitions",
"short_module": null
},
{
"abbrev": fals... | {
"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.Spec.Bignum.Definitions.lbignum t aLen ->
b: Hacl.Spec.Bignum.Definitions.lbignum t bLen ->
i: Prims.nat{i <= bLen}
-> FStar.Pervasives.Lemma
(ensures
(let res = Lib.Sequence.create (aLen + bLen) (Lib.IntTypes.uint 0) in
let resi =
Lib.LoopCombinators.repeati i (Hacl.S... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Hacl.Spec.Bignum.Definitions.limb_t",
"Lib.IntTypes.size_nat",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_Addition",
"Lib.IntTypes.max_size_t",
"Hacl.Spec.Bignum.Definitions.lbignum",
"Prims.nat",
"Prims.op_Equality",
"Prims.int",
"Prims.unit",
"Hacl.Spec.Bignum.Definitions.bn_eval_ze... | [
"recursion"
] | false | false | true | false | false | let rec bn_mul_loop_lemma #t #aLen #bLen a b i =
| let res = create (aLen + bLen) (uint #t 0) in
let resi = repeati i (bn_mul_ a b) res in
if i = 0
then
(eq_repeati0 i (bn_mul_ a b) res;
bn_eval0 b;
bn_eval_zeroes #t (aLen + bLen) (aLen + i);
())
else
(unfold_repeati i (bn_mul_ a b) res (i - 1);
let resi1 = repeati (i - 1) (bn_mul_ a b) res in
a... | false |
FStar.Krml.Endianness.fst | FStar.Krml.Endianness.be_of_seq_uint64 | val be_of_seq_uint64 (s: S.seq UInt64.t)
: Tot (b: bytes{S.length b = 8 * S.length s}) (decreases (S.length s)) | val be_of_seq_uint64 (s: S.seq UInt64.t)
: Tot (b: bytes{S.length b = 8 * S.length s}) (decreases (S.length s)) | let rec be_of_seq_uint64 (s: S.seq UInt64.t):
Tot (b:bytes { S.length b = 8 * S.length s })
(decreases (S.length s))
=
if S.length s = 0 then
S.empty
else
S.append (be_of_uint64 (S.head s)) (be_of_seq_uint64 (S.tail s)) | {
"file_name": "krmllib/FStar.Krml.Endianness.fst",
"git_rev": "da1e941b2fcb196aa5d1e34941aa00b4c67ac321",
"git_url": "https://github.com/FStarLang/karamel.git",
"project_name": "karamel"
} | {
"end_col": 68,
"end_line": 314,
"start_col": 0,
"start_line": 307
} | module FStar.Krml.Endianness
open FStar.Mul
open FStar.HyperStack.All
module U8 = FStar.UInt8
module U32 = FStar.UInt32
module U64 = FStar.UInt64
module Math = FStar.Math.Lemmas
module S = FStar.Seq
(* Selectively imported from Hacl*'s FStar.Endianness.fst library, with several
name changes *)
inline_for_extraction... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.HyperStac... | [
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "FStar.Math.Lemmas",
"short_module": "Math"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": "FSt... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | s: FStar.Seq.Base.seq FStar.UInt64.t
-> Prims.Tot
(b: FStar.Krml.Endianness.bytes{FStar.Seq.Base.length b = 8 * FStar.Seq.Base.length s}) | Prims.Tot | [
"total",
""
] | [] | [
"FStar.Seq.Base.seq",
"FStar.UInt64.t",
"Prims.op_Equality",
"Prims.int",
"FStar.Seq.Base.length",
"FStar.Seq.Base.empty",
"FStar.UInt8.t",
"Prims.bool",
"FStar.Seq.Base.append",
"FStar.Krml.Endianness.be_of_uint64",
"FStar.Seq.Properties.head",
"FStar.Krml.Endianness.be_of_seq_uint64",
"FSt... | [
"recursion"
] | false | false | false | false | false | let rec be_of_seq_uint64 (s: S.seq UInt64.t)
: Tot (b: bytes{S.length b = 8 * S.length s}) (decreases (S.length s)) =
| if S.length s = 0 then S.empty else S.append (be_of_uint64 (S.head s)) (be_of_seq_uint64 (S.tail s)) | false |
Hacl.Spec.Bignum.Multiplication.fst | Hacl.Spec.Bignum.Multiplication.bn_mul1_add_in_place_lemma_loop | val bn_mul1_add_in_place_lemma_loop:
#t:limb_t
-> #aLen:size_nat
-> a:lbignum t aLen
-> l:limb t
-> acc:lbignum t aLen
-> i:nat{i <= aLen} ->
Lemma (let (c, res) : generate_elem_a (limb t) (limb t) aLen i = generate_elems aLen i (bn_mul1_add_in_place_f a l acc) (uint #t 0) in
v c * pow2 (bits t * i)... | val bn_mul1_add_in_place_lemma_loop:
#t:limb_t
-> #aLen:size_nat
-> a:lbignum t aLen
-> l:limb t
-> acc:lbignum t aLen
-> i:nat{i <= aLen} ->
Lemma (let (c, res) : generate_elem_a (limb t) (limb t) aLen i = generate_elems aLen i (bn_mul1_add_in_place_f a l acc) (uint #t 0) in
v c * pow2 (bits t * i)... | let rec bn_mul1_add_in_place_lemma_loop #t #aLen a l acc i =
let pbits = bits t in
let (c, res) : generate_elem_a (limb t) (limb t) aLen i = generate_elems aLen i (bn_mul1_add_in_place_f a l acc) (uint #t 0) in
if i = 0 then begin
eq_generate_elems0 aLen i (bn_mul1_add_in_place_f a l acc) (uint #t 0);
ass... | {
"file_name": "code/bignum/Hacl.Spec.Bignum.Multiplication.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 10,
"end_line": 293,
"start_col": 0,
"start_line": 272
} | module Hacl.Spec.Bignum.Multiplication
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.LoopCombinators
open Hacl.Spec.Bignum.Definitions
open Hacl.Spec.Bignum.Base
open Hacl.Spec.Lib
#reset-options "--z3rlimit 50 --fuel 0 --ifuel 0"
val bn_mul1_f:
#t:limb_t
-> #aLen:size_nat
-> a:lbignum t aLe... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.Lib.fst.checked",
"Hacl.Spec.Bignum.Definitions.fst.checked",
"Hacl.Spec.Bignum.Base.fst.checked",
"FStar.Seq.fst.che... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Lib",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Spec.Bignum.Base",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Spec.Bignum.Definitions",
"short_module": null
},
{
"abbrev": fals... | {
"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.Spec.Bignum.Definitions.lbignum t aLen ->
l: Hacl.Spec.Bignum.Definitions.limb t ->
acc: Hacl.Spec.Bignum.Definitions.lbignum t aLen ->
i: Prims.nat{i <= aLen}
-> FStar.Pervasives.Lemma
(ensures
(let _ =
Hacl.Spec.Lib.generate_elems aLen
i
(Hacl.Spe... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Hacl.Spec.Bignum.Definitions.limb_t",
"Lib.IntTypes.size_nat",
"Hacl.Spec.Bignum.Definitions.lbignum",
"Hacl.Spec.Bignum.Definitions.limb",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Lib.Sequence.seq",
"Prims.eq2",
"Lib.Sequence.length",
"Prims.op_Equality",
"Prims.int",
"Prims.... | [
"recursion"
] | false | false | true | false | false | let rec bn_mul1_add_in_place_lemma_loop #t #aLen a l acc i =
| let pbits = bits t in
let c, res:generate_elem_a (limb t) (limb t) aLen i =
generate_elems aLen i (bn_mul1_add_in_place_f a l acc) (uint #t 0)
in
if i = 0
then
(eq_generate_elems0 aLen i (bn_mul1_add_in_place_f a l acc) (uint #t 0);
assert (c == uint #t 0 /\ res == Seq.empty);
bn_eval0 #t #0 res;
assert... | false |
Hacl.Spec.Bignum.Multiplication.fst | Hacl.Spec.Bignum.Multiplication.bn_mul1_lemma_loop | val bn_mul1_lemma_loop:
#t:limb_t
-> #aLen:size_nat
-> a:lbignum t aLen
-> l:limb t
-> i:nat{i <= aLen} ->
Lemma (let (c, res) : generate_elem_a (limb t) (limb t) aLen i = generate_elems aLen i (bn_mul1_f a l) (uint #t 0) in
v c * pow2 (bits t * i) + bn_v #t #i res == eval_ aLen a i * v l) | val bn_mul1_lemma_loop:
#t:limb_t
-> #aLen:size_nat
-> a:lbignum t aLen
-> l:limb t
-> i:nat{i <= aLen} ->
Lemma (let (c, res) : generate_elem_a (limb t) (limb t) aLen i = generate_elems aLen i (bn_mul1_f a l) (uint #t 0) in
v c * pow2 (bits t * i) + bn_v #t #i res == eval_ aLen a i * v l) | let rec bn_mul1_lemma_loop #t #aLen a l i =
let pbits = bits t in
let (c, res) : generate_elem_a (limb t) (limb t) aLen i = generate_elems aLen i (bn_mul1_f a l) (uint #t 0) in
if i = 0 then begin
eq_generate_elems0 aLen i (bn_mul1_f a l) (uint #t 0);
assert (c == uint #t 0 /\ res == Seq.empty);
bn_ev... | {
"file_name": "code/bignum/Hacl.Spec.Bignum.Multiplication.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 10,
"end_line": 189,
"start_col": 0,
"start_line": 169
} | module Hacl.Spec.Bignum.Multiplication
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.LoopCombinators
open Hacl.Spec.Bignum.Definitions
open Hacl.Spec.Bignum.Base
open Hacl.Spec.Lib
#reset-options "--z3rlimit 50 --fuel 0 --ifuel 0"
val bn_mul1_f:
#t:limb_t
-> #aLen:size_nat
-> a:lbignum t aLe... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.Lib.fst.checked",
"Hacl.Spec.Bignum.Definitions.fst.checked",
"Hacl.Spec.Bignum.Base.fst.checked",
"FStar.Seq.fst.che... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Lib",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Spec.Bignum.Base",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Spec.Bignum.Definitions",
"short_module": null
},
{
"abbrev": fals... | {
"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.Spec.Bignum.Definitions.lbignum t aLen ->
l: Hacl.Spec.Bignum.Definitions.limb t ->
i: Prims.nat{i <= aLen}
-> FStar.Pervasives.Lemma
(ensures
(let _ =
Hacl.Spec.Lib.generate_elems aLen
i
(Hacl.Spec.Bignum.Multiplication.bn_mul1_f a l)
(Lib.... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Hacl.Spec.Bignum.Definitions.limb_t",
"Lib.IntTypes.size_nat",
"Hacl.Spec.Bignum.Definitions.lbignum",
"Hacl.Spec.Bignum.Definitions.limb",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Lib.Sequence.seq",
"Prims.eq2",
"Lib.Sequence.length",
"Prims.op_Equality",
"Prims.int",
"Prims.... | [
"recursion"
] | false | false | true | false | false | let rec bn_mul1_lemma_loop #t #aLen a l i =
| let pbits = bits t in
let c, res:generate_elem_a (limb t) (limb t) aLen i =
generate_elems aLen i (bn_mul1_f a l) (uint #t 0)
in
if i = 0
then
(eq_generate_elems0 aLen i (bn_mul1_f a l) (uint #t 0);
assert (c == uint #t 0 /\ res == Seq.empty);
bn_eval0 #t #0 res;
assert_norm (pow2 0 = 1);
bn_eval0 a... | false |
FStar.Krml.Endianness.fst | FStar.Krml.Endianness.seq_uint64_of_be | val seq_uint64_of_be (l: nat) (b: bytes{S.length b = 8 * l}) : s: S.seq UInt64.t {S.length s = l} | val seq_uint64_of_be (l: nat) (b: bytes{S.length b = 8 * l}) : s: S.seq UInt64.t {S.length s = l} | let rec seq_uint64_of_be (l: nat) (b: bytes{ S.length b = 8 * l }):
s:S.seq UInt64.t { S.length s = l }
=
if S.length b = 0 then
S.empty
else
let hd, tl = Seq.split b 8 in
S.cons (uint64_of_be hd) (seq_uint64_of_be (l - 1) tl) | {
"file_name": "krmllib/FStar.Krml.Endianness.fst",
"git_rev": "da1e941b2fcb196aa5d1e34941aa00b4c67ac321",
"git_url": "https://github.com/FStarLang/karamel.git",
"project_name": "karamel"
} | {
"end_col": 58,
"end_line": 304,
"start_col": 0,
"start_line": 297
} | module FStar.Krml.Endianness
open FStar.Mul
open FStar.HyperStack.All
module U8 = FStar.UInt8
module U32 = FStar.UInt32
module U64 = FStar.UInt64
module Math = FStar.Math.Lemmas
module S = FStar.Seq
(* Selectively imported from Hacl*'s FStar.Endianness.fst library, with several
name changes *)
inline_for_extraction... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.HyperStac... | [
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "FStar.Math.Lemmas",
"short_module": "Math"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": "FSt... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | l: Prims.nat -> b: FStar.Krml.Endianness.bytes{FStar.Seq.Base.length b = 8 * l}
-> s: FStar.Seq.Base.seq FStar.UInt64.t {FStar.Seq.Base.length s = l} | Prims.Tot | [
"total"
] | [] | [
"Prims.nat",
"FStar.Krml.Endianness.bytes",
"Prims.b2t",
"Prims.op_Equality",
"Prims.int",
"FStar.Seq.Base.length",
"FStar.UInt8.t",
"FStar.Mul.op_Star",
"FStar.Seq.Base.empty",
"FStar.UInt64.t",
"Prims.bool",
"FStar.Seq.Base.seq",
"FStar.Seq.Base.cons",
"FStar.Krml.Endianness.uint64_of_be... | [
"recursion"
] | false | false | false | false | false | let rec seq_uint64_of_be (l: nat) (b: bytes{S.length b = 8 * l})
: s: S.seq UInt64.t {S.length s = l} =
| if S.length b = 0
then S.empty
else
let hd, tl = Seq.split b 8 in
S.cons (uint64_of_be hd) (seq_uint64_of_be (l - 1) tl) | false |
FStar.Krml.Endianness.fst | FStar.Krml.Endianness.offset_uint32_be | val offset_uint32_be (b: bytes) (n i: nat)
: Lemma (requires (S.length b = 4 * n /\ i < n))
(ensures (S.index (seq_uint32_of_be n b) i == uint32_of_be (S.slice b (4 * i) (4 * i + 4))))
(decreases (S.length b))
[SMTPat (S.index (seq_uint32_of_be n b) i)] | val offset_uint32_be (b: bytes) (n i: nat)
: Lemma (requires (S.length b = 4 * n /\ i < n))
(ensures (S.index (seq_uint32_of_be n b) i == uint32_of_be (S.slice b (4 * i) (4 * i + 4))))
(decreases (S.length b))
[SMTPat (S.index (seq_uint32_of_be n b) i)] | let rec offset_uint32_be (b: bytes) (n: nat) (i: nat):
Lemma
(requires (
S.length b = 4 * n /\
i < n))
(ensures (
S.index (seq_uint32_of_be n b) i == uint32_of_be (S.slice b (4 * i) (4 * i + 4))))
(decreases (
S.length b))
[ SMTPat (S.index (seq_uint32_of_be n b) i) ]
=
if S.... | {
"file_name": "krmllib/FStar.Krml.Endianness.fst",
"git_rev": "da1e941b2fcb196aa5d1e34941aa00b4c67ac321",
"git_url": "https://github.com/FStarLang/karamel.git",
"project_name": "karamel"
} | {
"end_col": 41,
"end_line": 338,
"start_col": 0,
"start_line": 320
} | module FStar.Krml.Endianness
open FStar.Mul
open FStar.HyperStack.All
module U8 = FStar.UInt8
module U32 = FStar.UInt32
module U64 = FStar.UInt64
module Math = FStar.Math.Lemmas
module S = FStar.Seq
(* Selectively imported from Hacl*'s FStar.Endianness.fst library, with several
name changes *)
inline_for_extraction... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.HyperStac... | [
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "FStar.Math.Lemmas",
"short_module": "Math"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": "FSt... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 1,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | b: FStar.Krml.Endianness.bytes -> n: Prims.nat -> i: Prims.nat
-> FStar.Pervasives.Lemma (requires FStar.Seq.Base.length b = 4 * n /\ i < n)
(ensures
FStar.Seq.Base.index (FStar.Krml.Endianness.seq_uint32_of_be n b) i ==
FStar.Krml.Endianness.uint32_of_be (FStar.Seq.Base.slice b (4 * i) (4 * i +... | FStar.Pervasives.Lemma | [
"lemma",
""
] | [] | [
"FStar.Krml.Endianness.bytes",
"Prims.nat",
"Prims.op_Equality",
"Prims.int",
"FStar.Seq.Base.length",
"FStar.UInt8.t",
"FStar.Pervasives.false_elim",
"Prims.unit",
"Prims.bool",
"FStar.Seq.Base.seq",
"FStar.Krml.Endianness.offset_uint32_be",
"Prims.op_Subtraction",
"FStar.Pervasives.Native.... | [
"recursion"
] | false | false | true | false | false | let rec offset_uint32_be (b: bytes) (n i: nat)
: Lemma (requires (S.length b = 4 * n /\ i < n))
(ensures (S.index (seq_uint32_of_be n b) i == uint32_of_be (S.slice b (4 * i) (4 * i + 4))))
(decreases (S.length b))
[SMTPat (S.index (seq_uint32_of_be n b) i)] =
| if S.length b = 0
then false_elim ()
else
let hd, tl = Seq.split b 4 in
if i = 0 then () else offset_uint32_be tl (n - 1) (i - 1) | false |
Hacl.Spec.Bignum.Multiplication.fst | Hacl.Spec.Bignum.Multiplication.bn_mul_loop_lemma_step | val bn_mul_loop_lemma_step:
#t:limb_t
-> #aLen:size_nat
-> #bLen:size_nat{aLen + bLen <= max_size_t}
-> a:lbignum t aLen
-> b:lbignum t bLen
-> i:pos{i <= bLen}
-> resi1:lbignum t (aLen + bLen) -> Lemma
(requires eval_ (aLen + bLen) resi1 (aLen + i - 1) == bn_v a * eval_ bLen b (i - 1))
(ensures
... | val bn_mul_loop_lemma_step:
#t:limb_t
-> #aLen:size_nat
-> #bLen:size_nat{aLen + bLen <= max_size_t}
-> a:lbignum t aLen
-> b:lbignum t bLen
-> i:pos{i <= bLen}
-> resi1:lbignum t (aLen + bLen) -> Lemma
(requires eval_ (aLen + bLen) resi1 (aLen + i - 1) == bn_v a * eval_ bLen b (i - 1))
(ensures
... | let bn_mul_loop_lemma_step #t #aLen #bLen a b i resi1 =
let pbits = bits t in
let resi = bn_mul_ a b (i - 1) resi1 in
bn_mul_lemma_ a b (i - 1) resi1;
assert
(v resi.[aLen + i - 1] * pow2 (pbits * (aLen + i - 1)) + eval_ (aLen + bLen) resi (aLen + i - 1) ==
eval_ (aLen + bLen) resi1 (aLen + i - 1) + bn... | {
"file_name": "code/bignum/Hacl.Spec.Bignum.Multiplication.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 73,
"end_line": 415,
"start_col": 0,
"start_line": 392
} | module Hacl.Spec.Bignum.Multiplication
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.LoopCombinators
open Hacl.Spec.Bignum.Definitions
open Hacl.Spec.Bignum.Base
open Hacl.Spec.Lib
#reset-options "--z3rlimit 50 --fuel 0 --ifuel 0"
val bn_mul1_f:
#t:limb_t
-> #aLen:size_nat
-> a:lbignum t aLe... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.Lib.fst.checked",
"Hacl.Spec.Bignum.Definitions.fst.checked",
"Hacl.Spec.Bignum.Base.fst.checked",
"FStar.Seq.fst.che... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Lib",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Spec.Bignum.Base",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Spec.Bignum.Definitions",
"short_module": null
},
{
"abbrev": fals... | {
"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.Spec.Bignum.Definitions.lbignum t aLen ->
b: Hacl.Spec.Bignum.Definitions.lbignum t bLen ->
i: Prims.pos{i <= bLen} ->
resi1: Hacl.Spec.Bignum.Definitions.lbignum t (aLen + bLen)
-> FStar.Pervasives.Lemma
(requires
Hacl.Spec.Bignum.Definitions.eval_ (aLen + bLen) resi1 (aLen + i... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Hacl.Spec.Bignum.Definitions.limb_t",
"Lib.IntTypes.size_nat",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_Addition",
"Lib.IntTypes.max_size_t",
"Hacl.Spec.Bignum.Definitions.lbignum",
"Prims.pos",
"Prims._assert",
"Prims.eq2",
"Prims.int",
"Hacl.Spec.Bignum.Definitions.eval_",
"FSta... | [] | false | false | true | false | false | let bn_mul_loop_lemma_step #t #aLen #bLen a b i resi1 =
| let pbits = bits t in
let resi = bn_mul_ a b (i - 1) resi1 in
bn_mul_lemma_ a b (i - 1) resi1;
assert (v resi.[ aLen + i - 1 ] * pow2 (pbits * (aLen + i - 1)) +
eval_ (aLen + bLen) resi (aLen + i - 1) ==
eval_ (aLen + bLen) resi1 (aLen + i - 1) + (bn_v a * v b.[ i - 1 ]) * (pow2 (pbits * (i - 1))));
calc ( == )... | false |
Vale.AES.X64.GF128_Init.fsti | Vale.AES.X64.GF128_Init.va_ens_Keyhash_init | val va_ens_Keyhash_init
(va_b0: va_code)
(va_s0: va_state)
(win: bool)
(alg: algorithm)
(key: (seq nat32))
(roundkeys_b hkeys_b: buffer128)
(va_sM: va_state)
(va_fM: va_fuel)
: prop | val va_ens_Keyhash_init
(va_b0: va_code)
(va_s0: va_state)
(win: bool)
(alg: algorithm)
(key: (seq nat32))
(roundkeys_b hkeys_b: buffer128)
(va_sM: va_state)
(va_fM: va_fuel)
: prop | let va_ens_Keyhash_init (va_b0:va_code) (va_s0:va_state) (win:bool) (alg:algorithm) (key:(seq
nat32)) (roundkeys_b:buffer128) (hkeys_b:buffer128) (va_sM:va_state) (va_fM:va_fuel) : prop =
(va_req_Keyhash_init va_b0 va_s0 win alg key roundkeys_b hkeys_b /\ va_ensure_total va_b0 va_s0
va_sM va_fM /\ va_get_ok va_... | {
"file_name": "obj/Vale.AES.X64.GF128_Init.fsti",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 96,
"end_line": 68,
"start_col": 0,
"start_line": 53
} | module Vale.AES.X64.GF128_Init
open Vale.Def.Words_s
open Vale.Def.Words.Four_s
open Vale.Def.Types_s
open FStar.Seq
open Vale.Arch.Types
open Vale.Arch.HeapImpl
open Vale.Math.Poly2_s
open Vale.Math.Poly2
open Vale.Math.Poly2.Bits_s
open Vale.Math.Poly2.Bits
open Vale.Math.Poly2.Lemmas
open Vale.AES.GF128_s
open Vale.... | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsVector.fsti.checked",
"Vale.X64.InsMem.fsti.checked",
"Vale.X64... | [
{
"abbrev": false,
"full_module": "Vale.AES.OptPublic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.AES.GHash",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.AES.X64.GF128_Mul",
"short_module": null
},
{
"abbrev": false,
"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
va_b0: Vale.X64.Decls.va_code ->
va_s0: Vale.X64.Decls.va_state ->
win: Prims.bool ->
alg: Vale.AES.AES_common_s.algorithm ->
key: FStar.Seq.Base.seq Vale.X64.Memory.nat32 ->
roundkeys_b: Vale.X64.Memory.buffer128 ->
hkeys_b: Vale.X64.Memory.buffer128 ->
va_sM: Vale.X64.Decls.va_state -... | Prims.Tot | [
"total"
] | [] | [
"Vale.X64.Decls.va_code",
"Vale.X64.Decls.va_state",
"Prims.bool",
"Vale.AES.AES_common_s.algorithm",
"FStar.Seq.Base.seq",
"Vale.X64.Memory.nat32",
"Vale.X64.Memory.buffer128",
"Vale.X64.Decls.va_fuel",
"Prims.l_and",
"Vale.AES.X64.GF128_Init.va_req_Keyhash_init",
"Vale.X64.Decls.va_ensure_tota... | [] | false | false | false | true | true | let va_ens_Keyhash_init
(va_b0: va_code)
(va_s0: va_state)
(win: bool)
(alg: algorithm)
(key: (seq nat32))
(roundkeys_b hkeys_b: buffer128)
(va_sM: va_state)
(va_fM: va_fuel)
: prop =
| (va_req_Keyhash_init va_b0 va_s0 win alg key roundkeys_b hkeys_b /\
va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\
(let round_ptr:(va_int_range 0 18446744073709551615) =
(if win then va_get_reg64 rRcx va_s0 else va_get_reg64 rRdi va_s0)
in
let hkey_ptr:(va_int_range 0 184467440737095516... | false |
FStar.Krml.Endianness.fst | FStar.Krml.Endianness.seq_uint32_of_be_be_of_seq_uint32 | val seq_uint32_of_be_be_of_seq_uint32 (n: nat) (s: S.seq U32.t)
: Lemma (requires (n == S.length s))
(ensures ((seq_uint32_of_be n (be_of_seq_uint32 s)) `S.equal` s))
(decreases n)
[SMTPat (seq_uint32_of_be n (be_of_seq_uint32 s))] | val seq_uint32_of_be_be_of_seq_uint32 (n: nat) (s: S.seq U32.t)
: Lemma (requires (n == S.length s))
(ensures ((seq_uint32_of_be n (be_of_seq_uint32 s)) `S.equal` s))
(decreases n)
[SMTPat (seq_uint32_of_be n (be_of_seq_uint32 s))] | let rec seq_uint32_of_be_be_of_seq_uint32 (n: nat) (s: S.seq U32.t) : Lemma
(requires (n == S.length s))
(ensures (seq_uint32_of_be n (be_of_seq_uint32 s) `S.equal` s))
(decreases n)
[SMTPat (seq_uint32_of_be n (be_of_seq_uint32 s))]
= if n = 0
then ()
else begin
assert (s `S.equal` S.cons (S.head s) (S... | {
"file_name": "krmllib/FStar.Krml.Endianness.fst",
"git_rev": "da1e941b2fcb196aa5d1e34941aa00b4c67ac321",
"git_url": "https://github.com/FStarLang/karamel.git",
"project_name": "karamel"
} | {
"end_col": 5,
"end_line": 526,
"start_col": 0,
"start_line": 513
} | module FStar.Krml.Endianness
open FStar.Mul
open FStar.HyperStack.All
module U8 = FStar.UInt8
module U32 = FStar.UInt32
module U64 = FStar.UInt64
module Math = FStar.Math.Lemmas
module S = FStar.Seq
(* Selectively imported from Hacl*'s FStar.Endianness.fst library, with several
name changes *)
inline_for_extraction... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.HyperStac... | [
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "FStar.Math.Lemmas",
"short_module": "Math"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": "FSt... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 1,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | n: Prims.nat -> s: FStar.Seq.Base.seq FStar.UInt32.t
-> FStar.Pervasives.Lemma (requires n == FStar.Seq.Base.length s)
(ensures
FStar.Seq.Base.equal (FStar.Krml.Endianness.seq_uint32_of_be n
(FStar.Krml.Endianness.be_of_seq_uint32 s))
s)
(decreases n)
[SMTPat (FStar.K... | FStar.Pervasives.Lemma | [
"lemma",
""
] | [] | [
"Prims.nat",
"FStar.Seq.Base.seq",
"FStar.UInt32.t",
"Prims.op_Equality",
"Prims.int",
"Prims.bool",
"FStar.Seq.Properties.lemma_append_inj",
"FStar.UInt8.t",
"FStar.Seq.Base.slice",
"FStar.Seq.Base.length",
"FStar.Krml.Endianness.be_of_uint32",
"FStar.Seq.Properties.head",
"FStar.Krml.Endia... | [
"recursion"
] | false | false | true | false | false | let rec seq_uint32_of_be_be_of_seq_uint32 (n: nat) (s: S.seq U32.t)
: Lemma (requires (n == S.length s))
(ensures ((seq_uint32_of_be n (be_of_seq_uint32 s)) `S.equal` s))
(decreases n)
[SMTPat (seq_uint32_of_be n (be_of_seq_uint32 s))] =
| if n = 0
then ()
else
(assert (s `S.equal` (S.cons (S.head s) (S.tail s)));
seq_uint32_of_be_be_of_seq_uint32 (n - 1) (S.tail s);
let s' = be_of_seq_uint32 s in
S.lemma_split s' 4;
S.lemma_append_inj (S.slice s' 0 4)
(S.slice s' 4 (S.length s'))
(be_of_uint32 (S.head s))
(be_of_seq_u... | false |
FStar.Krml.Endianness.fst | FStar.Krml.Endianness.be_of_seq_uint32_slice | val be_of_seq_uint32_slice (s: S.seq U32.t) (lo hi: nat)
: Lemma (requires (lo <= hi /\ hi <= S.length s))
(ensures
((be_of_seq_uint32 (S.slice s lo hi))
`S.equal`
(S.slice (be_of_seq_uint32 s) (4 * lo) (4 * hi)))) | val be_of_seq_uint32_slice (s: S.seq U32.t) (lo hi: nat)
: Lemma (requires (lo <= hi /\ hi <= S.length s))
(ensures
((be_of_seq_uint32 (S.slice s lo hi))
`S.equal`
(S.slice (be_of_seq_uint32 s) (4 * lo) (4 * hi)))) | let be_of_seq_uint32_slice (s: S.seq U32.t) (lo: nat) (hi: nat) : Lemma
(requires (lo <= hi /\ hi <= S.length s))
(ensures (be_of_seq_uint32 (S.slice s lo hi) `S.equal` S.slice (be_of_seq_uint32 s) (4 * lo) (4 * hi)))
= slice_seq_uint32_of_be (S.length s) (be_of_seq_uint32 s) lo hi | {
"file_name": "krmllib/FStar.Krml.Endianness.fst",
"git_rev": "da1e941b2fcb196aa5d1e34941aa00b4c67ac321",
"git_url": "https://github.com/FStarLang/karamel.git",
"project_name": "karamel"
} | {
"end_col": 64,
"end_line": 560,
"start_col": 0,
"start_line": 557
} | module FStar.Krml.Endianness
open FStar.Mul
open FStar.HyperStack.All
module U8 = FStar.UInt8
module U32 = FStar.UInt32
module U64 = FStar.UInt64
module Math = FStar.Math.Lemmas
module S = FStar.Seq
(* Selectively imported from Hacl*'s FStar.Endianness.fst library, with several
name changes *)
inline_for_extraction... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.HyperStac... | [
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "FStar.Math.Lemmas",
"short_module": "Math"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": "FSt... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 1,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | s: FStar.Seq.Base.seq FStar.UInt32.t -> lo: Prims.nat -> hi: Prims.nat
-> FStar.Pervasives.Lemma (requires lo <= hi /\ hi <= FStar.Seq.Base.length s)
(ensures
FStar.Seq.Base.equal (FStar.Krml.Endianness.be_of_seq_uint32 (FStar.Seq.Base.slice s lo hi))
(FStar.Seq.Base.slice (FStar.Krml.Endianne... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"FStar.Seq.Base.seq",
"FStar.UInt32.t",
"Prims.nat",
"FStar.Krml.Endianness.slice_seq_uint32_of_be",
"FStar.Seq.Base.length",
"FStar.Krml.Endianness.be_of_seq_uint32",
"Prims.unit",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.squash",
"FStar.Seq.Base.equal",
"FStar.UInt8.t... | [] | true | false | true | false | false | let be_of_seq_uint32_slice (s: S.seq U32.t) (lo hi: nat)
: Lemma (requires (lo <= hi /\ hi <= S.length s))
(ensures
((be_of_seq_uint32 (S.slice s lo hi))
`S.equal`
(S.slice (be_of_seq_uint32 s) (4 * lo) (4 * hi)))) =
| slice_seq_uint32_of_be (S.length s) (be_of_seq_uint32 s) lo hi | false |
FStar.Krml.Endianness.fst | FStar.Krml.Endianness.offset_uint64_le | val offset_uint64_le (b: bytes) (n i: nat)
: Lemma (requires (S.length b = 8 * n /\ i < n))
(ensures (S.index (seq_uint64_of_le n b) i == uint64_of_le (S.slice b (8 * i) (8 * i + 8))))
(decreases (S.length b))
[SMTPat (S.index (seq_uint64_of_le n b) i)] | val offset_uint64_le (b: bytes) (n i: nat)
: Lemma (requires (S.length b = 8 * n /\ i < n))
(ensures (S.index (seq_uint64_of_le n b) i == uint64_of_le (S.slice b (8 * i) (8 * i + 8))))
(decreases (S.length b))
[SMTPat (S.index (seq_uint64_of_le n b) i)] | let rec offset_uint64_le (b: bytes) (n: nat) (i: nat):
Lemma
(requires (
S.length b = 8 * n /\
i < n))
(ensures (
S.index (seq_uint64_of_le n b) i == uint64_of_le (S.slice b (8 * i) (8 * i + 8))))
(decreases (
S.length b))
[ SMTPat (S.index (seq_uint64_of_le n b) i) ]
=
if S.... | {
"file_name": "krmllib/FStar.Krml.Endianness.fst",
"git_rev": "da1e941b2fcb196aa5d1e34941aa00b4c67ac321",
"git_url": "https://github.com/FStarLang/karamel.git",
"project_name": "karamel"
} | {
"end_col": 41,
"end_line": 401,
"start_col": 0,
"start_line": 383
} | module FStar.Krml.Endianness
open FStar.Mul
open FStar.HyperStack.All
module U8 = FStar.UInt8
module U32 = FStar.UInt32
module U64 = FStar.UInt64
module Math = FStar.Math.Lemmas
module S = FStar.Seq
(* Selectively imported from Hacl*'s FStar.Endianness.fst library, with several
name changes *)
inline_for_extraction... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.HyperStac... | [
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "FStar.Math.Lemmas",
"short_module": "Math"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": "FSt... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 1,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | b: FStar.Krml.Endianness.bytes -> n: Prims.nat -> i: Prims.nat
-> FStar.Pervasives.Lemma (requires FStar.Seq.Base.length b = 8 * n /\ i < n)
(ensures
FStar.Seq.Base.index (FStar.Krml.Endianness.seq_uint64_of_le n b) i ==
FStar.Krml.Endianness.uint64_of_le (FStar.Seq.Base.slice b (8 * i) (8 * i +... | FStar.Pervasives.Lemma | [
"lemma",
""
] | [] | [
"FStar.Krml.Endianness.bytes",
"Prims.nat",
"Prims.op_Equality",
"Prims.int",
"FStar.Seq.Base.length",
"FStar.UInt8.t",
"FStar.Pervasives.false_elim",
"Prims.unit",
"Prims.bool",
"FStar.Seq.Base.seq",
"FStar.Krml.Endianness.offset_uint64_le",
"Prims.op_Subtraction",
"FStar.Pervasives.Native.... | [
"recursion"
] | false | false | true | false | false | let rec offset_uint64_le (b: bytes) (n i: nat)
: Lemma (requires (S.length b = 8 * n /\ i < n))
(ensures (S.index (seq_uint64_of_le n b) i == uint64_of_le (S.slice b (8 * i) (8 * i + 8))))
(decreases (S.length b))
[SMTPat (S.index (seq_uint64_of_le n b) i)] =
| if S.length b = 0
then false_elim ()
else
let hd, tl = Seq.split b 8 in
if i = 0 then () else offset_uint64_le tl (n - 1) (i - 1) | false |
FStar.Krml.Endianness.fst | FStar.Krml.Endianness.offset_uint32_le | val offset_uint32_le (b: bytes) (n i: nat)
: Lemma (requires (S.length b = 4 * n /\ i < n))
(ensures (S.index (seq_uint32_of_le n b) i == uint32_of_le (S.slice b (4 * i) (4 * i + 4))))
(decreases (S.length b))
[SMTPat (S.index (seq_uint32_of_le n b) i)] | val offset_uint32_le (b: bytes) (n i: nat)
: Lemma (requires (S.length b = 4 * n /\ i < n))
(ensures (S.index (seq_uint32_of_le n b) i == uint32_of_le (S.slice b (4 * i) (4 * i + 4))))
(decreases (S.length b))
[SMTPat (S.index (seq_uint32_of_le n b) i)] | let rec offset_uint32_le (b: bytes) (n: nat) (i: nat):
Lemma
(requires (
S.length b = 4 * n /\
i < n))
(ensures (
S.index (seq_uint32_of_le n b) i == uint32_of_le (S.slice b (4 * i) (4 * i + 4))))
(decreases (
S.length b))
[ SMTPat (S.index (seq_uint32_of_le n b) i) ]
=
if S.... | {
"file_name": "krmllib/FStar.Krml.Endianness.fst",
"git_rev": "da1e941b2fcb196aa5d1e34941aa00b4c67ac321",
"git_url": "https://github.com/FStarLang/karamel.git",
"project_name": "karamel"
} | {
"end_col": 41,
"end_line": 359,
"start_col": 0,
"start_line": 341
} | module FStar.Krml.Endianness
open FStar.Mul
open FStar.HyperStack.All
module U8 = FStar.UInt8
module U32 = FStar.UInt32
module U64 = FStar.UInt64
module Math = FStar.Math.Lemmas
module S = FStar.Seq
(* Selectively imported from Hacl*'s FStar.Endianness.fst library, with several
name changes *)
inline_for_extraction... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.HyperStac... | [
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "FStar.Math.Lemmas",
"short_module": "Math"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": "FSt... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 1,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | b: FStar.Krml.Endianness.bytes -> n: Prims.nat -> i: Prims.nat
-> FStar.Pervasives.Lemma (requires FStar.Seq.Base.length b = 4 * n /\ i < n)
(ensures
FStar.Seq.Base.index (FStar.Krml.Endianness.seq_uint32_of_le n b) i ==
FStar.Krml.Endianness.uint32_of_le (FStar.Seq.Base.slice b (4 * i) (4 * i +... | FStar.Pervasives.Lemma | [
"lemma",
""
] | [] | [
"FStar.Krml.Endianness.bytes",
"Prims.nat",
"Prims.op_Equality",
"Prims.int",
"FStar.Seq.Base.length",
"FStar.UInt8.t",
"FStar.Pervasives.false_elim",
"Prims.unit",
"Prims.bool",
"FStar.Seq.Base.seq",
"FStar.Krml.Endianness.offset_uint32_le",
"Prims.op_Subtraction",
"FStar.Pervasives.Native.... | [
"recursion"
] | false | false | true | false | false | let rec offset_uint32_le (b: bytes) (n i: nat)
: Lemma (requires (S.length b = 4 * n /\ i < n))
(ensures (S.index (seq_uint32_of_le n b) i == uint32_of_le (S.slice b (4 * i) (4 * i + 4))))
(decreases (S.length b))
[SMTPat (S.index (seq_uint32_of_le n b) i)] =
| if S.length b = 0
then false_elim ()
else
let hd, tl = Seq.split b 4 in
if i = 0 then () else offset_uint32_le tl (n - 1) (i - 1) | false |
FStar.Krml.Endianness.fst | FStar.Krml.Endianness.be_of_seq_uint32_seq_uint32_of_be | val be_of_seq_uint32_seq_uint32_of_be (n: nat) (s: S.seq U8.t)
: Lemma (requires (4 * n == S.length s))
(ensures ((be_of_seq_uint32 (seq_uint32_of_be n s)) `S.equal` s))
(decreases n)
[SMTPat (be_of_seq_uint32 (seq_uint32_of_be n s))] | val be_of_seq_uint32_seq_uint32_of_be (n: nat) (s: S.seq U8.t)
: Lemma (requires (4 * n == S.length s))
(ensures ((be_of_seq_uint32 (seq_uint32_of_be n s)) `S.equal` s))
(decreases n)
[SMTPat (be_of_seq_uint32 (seq_uint32_of_be n s))] | let rec be_of_seq_uint32_seq_uint32_of_be (n: nat) (s: S.seq U8.t) : Lemma
(requires (4 * n == S.length s))
(ensures (be_of_seq_uint32 (seq_uint32_of_be n s) `S.equal` s))
(decreases n)
[SMTPat (be_of_seq_uint32 (seq_uint32_of_be n s))]
= if n = 0
then ()
else begin
S.lemma_split s 4;
be_of_seq_uint... | {
"file_name": "krmllib/FStar.Krml.Endianness.fst",
"git_rev": "da1e941b2fcb196aa5d1e34941aa00b4c67ac321",
"git_url": "https://github.com/FStarLang/karamel.git",
"project_name": "karamel"
} | {
"end_col": 5,
"end_line": 548,
"start_col": 0,
"start_line": 529
} | module FStar.Krml.Endianness
open FStar.Mul
open FStar.HyperStack.All
module U8 = FStar.UInt8
module U32 = FStar.UInt32
module U64 = FStar.UInt64
module Math = FStar.Math.Lemmas
module S = FStar.Seq
(* Selectively imported from Hacl*'s FStar.Endianness.fst library, with several
name changes *)
inline_for_extraction... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.HyperStac... | [
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "FStar.Math.Lemmas",
"short_module": "Math"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": "FSt... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 1,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | n: Prims.nat -> s: FStar.Seq.Base.seq FStar.UInt8.t
-> FStar.Pervasives.Lemma (requires 4 * n == FStar.Seq.Base.length s)
(ensures
FStar.Seq.Base.equal (FStar.Krml.Endianness.be_of_seq_uint32 (FStar.Krml.Endianness.seq_uint32_of_be
n
s))
s)
(decreases ... | FStar.Pervasives.Lemma | [
"lemma",
""
] | [] | [
"Prims.nat",
"FStar.Seq.Base.seq",
"FStar.UInt8.t",
"Prims.op_Equality",
"Prims.int",
"Prims.bool",
"FStar.Krml.Endianness.n_to_be_be_to_n",
"FStar.UInt32.__uint_to_t",
"Prims.unit",
"FStar.Seq.Properties.lemma_append_inj",
"FStar.Seq.Base.slice",
"FStar.Seq.Base.length",
"FStar.Krml.Endiann... | [
"recursion"
] | false | false | true | false | false | let rec be_of_seq_uint32_seq_uint32_of_be (n: nat) (s: S.seq U8.t)
: Lemma (requires (4 * n == S.length s))
(ensures ((be_of_seq_uint32 (seq_uint32_of_be n s)) `S.equal` s))
(decreases n)
[SMTPat (be_of_seq_uint32 (seq_uint32_of_be n s))] =
| if n = 0
then ()
else
(S.lemma_split s 4;
be_of_seq_uint32_seq_uint32_of_be (n - 1) (S.slice s 4 (S.length s));
let s' = seq_uint32_of_be n s in
let hd, tl = S.split s 4 in
assert (S.head s' == uint32_of_be hd);
tail_cons (uint32_of_be hd) (seq_uint32_of_be (n - 1) tl);
assert (S.tail s' == se... | false |
FStar.Krml.Endianness.fst | FStar.Krml.Endianness.offset_uint64_be | val offset_uint64_be (b: bytes) (n i: nat)
: Lemma (requires (S.length b = 8 * n /\ i < n))
(ensures (S.index (seq_uint64_of_be n b) i == uint64_of_be (S.slice b (8 * i) (8 * i + 8))))
(decreases (S.length b))
[SMTPat (S.index (seq_uint64_of_be n b) i)] | val offset_uint64_be (b: bytes) (n i: nat)
: Lemma (requires (S.length b = 8 * n /\ i < n))
(ensures (S.index (seq_uint64_of_be n b) i == uint64_of_be (S.slice b (8 * i) (8 * i + 8))))
(decreases (S.length b))
[SMTPat (S.index (seq_uint64_of_be n b) i)] | let rec offset_uint64_be (b: bytes) (n: nat) (i: nat):
Lemma
(requires (
S.length b = 8 * n /\
i < n))
(ensures (
S.index (seq_uint64_of_be n b) i == uint64_of_be (S.slice b (8 * i) (8 * i + 8))))
(decreases (
S.length b))
[ SMTPat (S.index (seq_uint64_of_be n b) i) ]
=
if S.... | {
"file_name": "krmllib/FStar.Krml.Endianness.fst",
"git_rev": "da1e941b2fcb196aa5d1e34941aa00b4c67ac321",
"git_url": "https://github.com/FStarLang/karamel.git",
"project_name": "karamel"
} | {
"end_col": 41,
"end_line": 380,
"start_col": 0,
"start_line": 362
} | module FStar.Krml.Endianness
open FStar.Mul
open FStar.HyperStack.All
module U8 = FStar.UInt8
module U32 = FStar.UInt32
module U64 = FStar.UInt64
module Math = FStar.Math.Lemmas
module S = FStar.Seq
(* Selectively imported from Hacl*'s FStar.Endianness.fst library, with several
name changes *)
inline_for_extraction... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.HyperStac... | [
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "FStar.Math.Lemmas",
"short_module": "Math"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": "FSt... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 1,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | b: FStar.Krml.Endianness.bytes -> n: Prims.nat -> i: Prims.nat
-> FStar.Pervasives.Lemma (requires FStar.Seq.Base.length b = 8 * n /\ i < n)
(ensures
FStar.Seq.Base.index (FStar.Krml.Endianness.seq_uint64_of_be n b) i ==
FStar.Krml.Endianness.uint64_of_be (FStar.Seq.Base.slice b (8 * i) (8 * i +... | FStar.Pervasives.Lemma | [
"lemma",
""
] | [] | [
"FStar.Krml.Endianness.bytes",
"Prims.nat",
"Prims.op_Equality",
"Prims.int",
"FStar.Seq.Base.length",
"FStar.UInt8.t",
"FStar.Pervasives.false_elim",
"Prims.unit",
"Prims.bool",
"FStar.Seq.Base.seq",
"FStar.Krml.Endianness.offset_uint64_be",
"Prims.op_Subtraction",
"FStar.Pervasives.Native.... | [
"recursion"
] | false | false | true | false | false | let rec offset_uint64_be (b: bytes) (n i: nat)
: Lemma (requires (S.length b = 8 * n /\ i < n))
(ensures (S.index (seq_uint64_of_be n b) i == uint64_of_be (S.slice b (8 * i) (8 * i + 8))))
(decreases (S.length b))
[SMTPat (S.index (seq_uint64_of_be n b) i)] =
| if S.length b = 0
then false_elim ()
else
let hd, tl = Seq.split b 8 in
if i = 0 then () else offset_uint64_be tl (n - 1) (i - 1) | false |
FStar.Krml.Endianness.fst | FStar.Krml.Endianness.be_of_seq_uint32_append | val be_of_seq_uint32_append (s1 s2: S.seq U32.t)
: Lemma
(ensures
(S.equal (be_of_seq_uint32 (S.append s1 s2))
(S.append (be_of_seq_uint32 s1) (be_of_seq_uint32 s2))))
(decreases (S.length s1))
[SMTPat (S.append (be_of_seq_uint32 s1) (be_of_seq_uint32 s2))] | val be_of_seq_uint32_append (s1 s2: S.seq U32.t)
: Lemma
(ensures
(S.equal (be_of_seq_uint32 (S.append s1 s2))
(S.append (be_of_seq_uint32 s1) (be_of_seq_uint32 s2))))
(decreases (S.length s1))
[SMTPat (S.append (be_of_seq_uint32 s1) (be_of_seq_uint32 s2))] | let rec be_of_seq_uint32_append (s1 s2: S.seq U32.t): Lemma
(ensures (
S.equal (be_of_seq_uint32 (S.append s1 s2))
(S.append (be_of_seq_uint32 s1) (be_of_seq_uint32 s2))))
(decreases (
S.length s1))
[ SMTPat (S.append (be_of_seq_uint32 s1) (be_of_seq_uint32 s2)) ]
=
Classical.forall_intro_2 (tail_... | {
"file_name": "krmllib/FStar.Krml.Endianness.fst",
"git_rev": "da1e941b2fcb196aa5d1e34941aa00b4c67ac321",
"git_url": "https://github.com/FStarLang/karamel.git",
"project_name": "karamel"
} | {
"end_col": 5,
"end_line": 435,
"start_col": 0,
"start_line": 417
} | module FStar.Krml.Endianness
open FStar.Mul
open FStar.HyperStack.All
module U8 = FStar.UInt8
module U32 = FStar.UInt32
module U64 = FStar.UInt64
module Math = FStar.Math.Lemmas
module S = FStar.Seq
(* Selectively imported from Hacl*'s FStar.Endianness.fst library, with several
name changes *)
inline_for_extraction... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.HyperStac... | [
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "FStar.Math.Lemmas",
"short_module": "Math"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": "FSt... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 1,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | s1: FStar.Seq.Base.seq FStar.UInt32.t -> s2: FStar.Seq.Base.seq FStar.UInt32.t
-> FStar.Pervasives.Lemma
(ensures
FStar.Seq.Base.equal (FStar.Krml.Endianness.be_of_seq_uint32 (FStar.Seq.Base.append s1 s2))
(FStar.Seq.Base.append (FStar.Krml.Endianness.be_of_seq_uint32 s1)
(FStar.... | FStar.Pervasives.Lemma | [
"lemma",
""
] | [] | [
"FStar.Seq.Base.seq",
"FStar.UInt32.t",
"Prims.op_Equality",
"Prims.int",
"FStar.Seq.Base.length",
"Prims.unit",
"Prims._assert",
"FStar.Seq.Base.equal",
"FStar.Seq.Base.append",
"FStar.UInt8.t",
"FStar.Krml.Endianness.be_of_seq_uint32",
"FStar.Seq.Base.empty",
"Prims.bool",
"FStar.Krml.En... | [
"recursion"
] | false | false | true | false | false | let rec be_of_seq_uint32_append (s1 s2: S.seq U32.t)
: Lemma
(ensures
(S.equal (be_of_seq_uint32 (S.append s1 s2))
(S.append (be_of_seq_uint32 s1) (be_of_seq_uint32 s2))))
(decreases (S.length s1))
[SMTPat (S.append (be_of_seq_uint32 s1) (be_of_seq_uint32 s2))] =
| Classical.forall_intro_2 (tail_cons #U32.t);
if S.length s1 = 0
then
(assert (S.equal (be_of_seq_uint32 s1) S.empty);
assert (S.equal (S.append s1 s2) s2);
())
else
(assert (S.equal (S.append s1 s2) (S.cons (S.head s1) (S.append (S.tail s1) s2)));
assert (S.equal (be_of_seq_uint32 (S.append s1 s2))
... | false |
FStar.Krml.Endianness.fst | FStar.Krml.Endianness.le_of_seq_uint32_append | val le_of_seq_uint32_append (s1 s2: S.seq U32.t)
: Lemma
(ensures
(S.equal (le_of_seq_uint32 (S.append s1 s2))
(S.append (le_of_seq_uint32 s1) (le_of_seq_uint32 s2))))
(decreases (S.length s1))
[SMTPat (S.append (le_of_seq_uint32 s1) (le_of_seq_uint32 s2))] | val le_of_seq_uint32_append (s1 s2: S.seq U32.t)
: Lemma
(ensures
(S.equal (le_of_seq_uint32 (S.append s1 s2))
(S.append (le_of_seq_uint32 s1) (le_of_seq_uint32 s2))))
(decreases (S.length s1))
[SMTPat (S.append (le_of_seq_uint32 s1) (le_of_seq_uint32 s2))] | let rec le_of_seq_uint32_append (s1 s2: S.seq U32.t): Lemma
(ensures (
S.equal (le_of_seq_uint32 (S.append s1 s2))
(S.append (le_of_seq_uint32 s1) (le_of_seq_uint32 s2))))
(decreases (
S.length s1))
[ SMTPat (S.append (le_of_seq_uint32 s1) (le_of_seq_uint32 s2)) ]
=
Classical.forall_intro_2 (tail_... | {
"file_name": "krmllib/FStar.Krml.Endianness.fst",
"git_rev": "da1e941b2fcb196aa5d1e34941aa00b4c67ac321",
"git_url": "https://github.com/FStarLang/karamel.git",
"project_name": "karamel"
} | {
"end_col": 5,
"end_line": 467,
"start_col": 0,
"start_line": 449
} | module FStar.Krml.Endianness
open FStar.Mul
open FStar.HyperStack.All
module U8 = FStar.UInt8
module U32 = FStar.UInt32
module U64 = FStar.UInt64
module Math = FStar.Math.Lemmas
module S = FStar.Seq
(* Selectively imported from Hacl*'s FStar.Endianness.fst library, with several
name changes *)
inline_for_extraction... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.HyperStac... | [
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "FStar.Math.Lemmas",
"short_module": "Math"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": "FSt... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 1,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | s1: FStar.Seq.Base.seq FStar.UInt32.t -> s2: FStar.Seq.Base.seq FStar.UInt32.t
-> FStar.Pervasives.Lemma
(ensures
FStar.Seq.Base.equal (FStar.Krml.Endianness.le_of_seq_uint32 (FStar.Seq.Base.append s1 s2))
(FStar.Seq.Base.append (FStar.Krml.Endianness.le_of_seq_uint32 s1)
(FStar.... | FStar.Pervasives.Lemma | [
"lemma",
""
] | [] | [
"FStar.Seq.Base.seq",
"FStar.UInt32.t",
"Prims.op_Equality",
"Prims.int",
"FStar.Seq.Base.length",
"Prims.unit",
"Prims._assert",
"FStar.Seq.Base.equal",
"FStar.Seq.Base.append",
"FStar.UInt8.t",
"FStar.Krml.Endianness.le_of_seq_uint32",
"FStar.Seq.Base.empty",
"Prims.bool",
"FStar.Krml.En... | [
"recursion"
] | false | false | true | false | false | let rec le_of_seq_uint32_append (s1 s2: S.seq U32.t)
: Lemma
(ensures
(S.equal (le_of_seq_uint32 (S.append s1 s2))
(S.append (le_of_seq_uint32 s1) (le_of_seq_uint32 s2))))
(decreases (S.length s1))
[SMTPat (S.append (le_of_seq_uint32 s1) (le_of_seq_uint32 s2))] =
| Classical.forall_intro_2 (tail_cons #U32.t);
if S.length s1 = 0
then
(assert (S.equal (le_of_seq_uint32 s1) S.empty);
assert (S.equal (S.append s1 s2) s2);
())
else
(assert (S.equal (S.append s1 s2) (S.cons (S.head s1) (S.append (S.tail s1) s2)));
assert (S.equal (le_of_seq_uint32 (S.append s1 s2))
... | false |
FStar.Krml.Endianness.fst | FStar.Krml.Endianness.be_of_seq_uint64_append | val be_of_seq_uint64_append (s1 s2: S.seq U64.t)
: Lemma
(ensures
(S.equal (be_of_seq_uint64 (S.append s1 s2))
(S.append (be_of_seq_uint64 s1) (be_of_seq_uint64 s2))))
(decreases (S.length s1))
[SMTPat (S.append (be_of_seq_uint64 s1) (be_of_seq_uint64 s2))] | val be_of_seq_uint64_append (s1 s2: S.seq U64.t)
: Lemma
(ensures
(S.equal (be_of_seq_uint64 (S.append s1 s2))
(S.append (be_of_seq_uint64 s1) (be_of_seq_uint64 s2))))
(decreases (S.length s1))
[SMTPat (S.append (be_of_seq_uint64 s1) (be_of_seq_uint64 s2))] | let rec be_of_seq_uint64_append (s1 s2: S.seq U64.t): Lemma
(ensures (
S.equal (be_of_seq_uint64 (S.append s1 s2))
(S.append (be_of_seq_uint64 s1) (be_of_seq_uint64 s2))))
(decreases (
S.length s1))
[ SMTPat (S.append (be_of_seq_uint64 s1) (be_of_seq_uint64 s2)) ]
=
Classical.forall_intro_2 (tail_... | {
"file_name": "krmllib/FStar.Krml.Endianness.fst",
"git_rev": "da1e941b2fcb196aa5d1e34941aa00b4c67ac321",
"git_url": "https://github.com/FStarLang/karamel.git",
"project_name": "karamel"
} | {
"end_col": 5,
"end_line": 499,
"start_col": 0,
"start_line": 481
} | module FStar.Krml.Endianness
open FStar.Mul
open FStar.HyperStack.All
module U8 = FStar.UInt8
module U32 = FStar.UInt32
module U64 = FStar.UInt64
module Math = FStar.Math.Lemmas
module S = FStar.Seq
(* Selectively imported from Hacl*'s FStar.Endianness.fst library, with several
name changes *)
inline_for_extraction... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.HyperStac... | [
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "FStar.Math.Lemmas",
"short_module": "Math"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": "FSt... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 1,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | s1: FStar.Seq.Base.seq FStar.UInt64.t -> s2: FStar.Seq.Base.seq FStar.UInt64.t
-> FStar.Pervasives.Lemma
(ensures
FStar.Seq.Base.equal (FStar.Krml.Endianness.be_of_seq_uint64 (FStar.Seq.Base.append s1 s2))
(FStar.Seq.Base.append (FStar.Krml.Endianness.be_of_seq_uint64 s1)
(FStar.... | FStar.Pervasives.Lemma | [
"lemma",
""
] | [] | [
"FStar.Seq.Base.seq",
"FStar.UInt64.t",
"Prims.op_Equality",
"Prims.int",
"FStar.Seq.Base.length",
"Prims.unit",
"Prims._assert",
"FStar.Seq.Base.equal",
"FStar.Seq.Base.append",
"FStar.UInt8.t",
"FStar.Krml.Endianness.be_of_seq_uint64",
"FStar.Seq.Base.empty",
"Prims.bool",
"FStar.Krml.En... | [
"recursion"
] | false | false | true | false | false | let rec be_of_seq_uint64_append (s1 s2: S.seq U64.t)
: Lemma
(ensures
(S.equal (be_of_seq_uint64 (S.append s1 s2))
(S.append (be_of_seq_uint64 s1) (be_of_seq_uint64 s2))))
(decreases (S.length s1))
[SMTPat (S.append (be_of_seq_uint64 s1) (be_of_seq_uint64 s2))] =
| Classical.forall_intro_2 (tail_cons #U64.t);
if S.length s1 = 0
then
(assert (S.equal (be_of_seq_uint64 s1) S.empty);
assert (S.equal (S.append s1 s2) s2);
())
else
(assert (S.equal (S.append s1 s2) (S.cons (S.head s1) (S.append (S.tail s1) s2)));
assert (S.equal (be_of_seq_uint64 (S.append s1 s2))
... | false |
Hacl.Spec.Bignum.Multiplication.fst | Hacl.Spec.Bignum.Multiplication.bn_mul1_lshift_add_lemma | val bn_mul1_lshift_add_lemma:
#t:limb_t
-> #aLen:size_nat
-> #resLen:size_nat
-> a:lbignum t aLen
-> b_j:limb t
-> j:size_nat{j + aLen <= resLen}
-> acc:lbignum t resLen ->
Lemma (let (c, res) = bn_mul1_lshift_add a b_j j acc in
v c * pow2 (bits t * (aLen + j)) + eval_ resLen res (aLen + j) ==
e... | val bn_mul1_lshift_add_lemma:
#t:limb_t
-> #aLen:size_nat
-> #resLen:size_nat
-> a:lbignum t aLen
-> b_j:limb t
-> j:size_nat{j + aLen <= resLen}
-> acc:lbignum t resLen ->
Lemma (let (c, res) = bn_mul1_lshift_add a b_j j acc in
v c * pow2 (bits t * (aLen + j)) + eval_ resLen res (aLen + j) ==
e... | let bn_mul1_lshift_add_lemma #t #aLen #resLen a b_j j acc =
let pbits = bits t in
let res1 = sub acc j aLen in
let c, res2 = bn_mul1_add_in_place a b_j res1 in
bn_mul1_add_in_place_lemma a b_j res1;
assert (v c * pow2 (pbits * aLen) + bn_v res2 == bn_v res1 + bn_v a * v b_j);
let res = update_sub acc j aLen... | {
"file_name": "code/bignum/Hacl.Spec.Bignum.Multiplication.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 70,
"end_line": 356,
"start_col": 0,
"start_line": 323
} | module Hacl.Spec.Bignum.Multiplication
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.LoopCombinators
open Hacl.Spec.Bignum.Definitions
open Hacl.Spec.Bignum.Base
open Hacl.Spec.Lib
#reset-options "--z3rlimit 50 --fuel 0 --ifuel 0"
val bn_mul1_f:
#t:limb_t
-> #aLen:size_nat
-> a:lbignum t aLe... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.Lib.fst.checked",
"Hacl.Spec.Bignum.Definitions.fst.checked",
"Hacl.Spec.Bignum.Base.fst.checked",
"FStar.Seq.fst.che... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Lib",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Spec.Bignum.Base",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Spec.Bignum.Definitions",
"short_module": null
},
{
"abbrev": fals... | {
"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.Spec.Bignum.Definitions.lbignum t aLen ->
b_j: Hacl.Spec.Bignum.Definitions.limb t ->
j: Lib.IntTypes.size_nat{j + aLen <= resLen} ->
acc: Hacl.Spec.Bignum.Definitions.lbignum t resLen
-> FStar.Pervasives.Lemma
(ensures
(let _ = Hacl.Spec.Bignum.Multiplication.bn_mul1_lshift_add a b... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Hacl.Spec.Bignum.Definitions.limb_t",
"Lib.IntTypes.size_nat",
"Hacl.Spec.Bignum.Definitions.lbignum",
"Hacl.Spec.Bignum.Definitions.limb",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_Addition",
"Lib.Sequence.eq_intro",
"Prims.op_Subtraction",
"Lib.Sequence.slice",
"Prims.unit",
"Prims... | [] | false | false | true | false | false | let bn_mul1_lshift_add_lemma #t #aLen #resLen a b_j j acc =
| let pbits = bits t in
let res1 = sub acc j aLen in
let c, res2 = bn_mul1_add_in_place a b_j res1 in
bn_mul1_add_in_place_lemma a b_j res1;
assert (v c * pow2 (pbits * aLen) + bn_v res2 == bn_v res1 + bn_v a * v b_j);
let res = update_sub acc j aLen res2 in
bn_eval_split_i (sub res 0 (j + aLen)) j;
bn_eval_extensionalit... | false |
Hacl.Spec.Bignum.Multiplication.fst | Hacl.Spec.Bignum.Multiplication.bn_mul1_lemma_loop_step | val bn_mul1_lemma_loop_step:
#t:limb_t
-> #aLen:size_nat
-> a:lbignum t aLen
-> l:limb t
-> i:pos{i <= aLen}
-> c1_res1:generate_elem_a (limb t) (limb t) aLen (i - 1) -> Lemma
(requires
(let (c1, res1) = c1_res1 in
v c1 * pow2 (bits t * (i - 1)) + bn_v #t #(i - 1) res1 == eval_ aLen a (i - 1) * ... | val bn_mul1_lemma_loop_step:
#t:limb_t
-> #aLen:size_nat
-> a:lbignum t aLen
-> l:limb t
-> i:pos{i <= aLen}
-> c1_res1:generate_elem_a (limb t) (limb t) aLen (i - 1) -> Lemma
(requires
(let (c1, res1) = c1_res1 in
v c1 * pow2 (bits t * (i - 1)) + bn_v #t #(i - 1) res1 == eval_ aLen a (i - 1) * ... | let bn_mul1_lemma_loop_step #t #aLen a l i (c1, res1) =
let pbits = bits t in
let b1 = pow2 (pbits * (i - 1)) in
let b2 = pow2 (pbits * i) in
let (c, res) = generate_elem_f aLen (bn_mul1_f a l) (i - 1) (c1, res1) in
let c, e = mul_wide_add a.[i - 1] l c1 in
assert (v e + v c * pow2 pbits == v a.[i - 1] * v... | {
"file_name": "code/bignum/Hacl.Spec.Bignum.Multiplication.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 60,
"end_line": 157,
"start_col": 0,
"start_line": 127
} | module Hacl.Spec.Bignum.Multiplication
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.LoopCombinators
open Hacl.Spec.Bignum.Definitions
open Hacl.Spec.Bignum.Base
open Hacl.Spec.Lib
#reset-options "--z3rlimit 50 --fuel 0 --ifuel 0"
val bn_mul1_f:
#t:limb_t
-> #aLen:size_nat
-> a:lbignum t aLe... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.Lib.fst.checked",
"Hacl.Spec.Bignum.Definitions.fst.checked",
"Hacl.Spec.Bignum.Base.fst.checked",
"FStar.Seq.fst.che... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Lib",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Spec.Bignum.Base",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Spec.Bignum.Definitions",
"short_module": null
},
{
"abbrev": fals... | {
"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.Spec.Bignum.Definitions.lbignum t aLen ->
l: Hacl.Spec.Bignum.Definitions.limb t ->
i: Prims.pos{i <= aLen} ->
c1_res1:
Hacl.Spec.Lib.generate_elem_a (Hacl.Spec.Bignum.Definitions.limb t)
(Hacl.Spec.Bignum.Definitions.limb t)
aLen
(i - 1)
-> FStar.Pervasives.Lemm... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Hacl.Spec.Bignum.Definitions.limb_t",
"Lib.IntTypes.size_nat",
"Hacl.Spec.Bignum.Definitions.lbignum",
"Hacl.Spec.Bignum.Definitions.limb",
"Prims.pos",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Hacl.Spec.Lib.generate_elem_a",
"Prims.op_Subtraction",
"Lib.Sequence.seq",
"Prims.eq2",
"Prims.na... | [] | false | false | true | false | false | let bn_mul1_lemma_loop_step #t #aLen a l i (c1, res1) =
| let pbits = bits t in
let b1 = pow2 (pbits * (i - 1)) in
let b2 = pow2 (pbits * i) in
let c, res = generate_elem_f aLen (bn_mul1_f a l) (i - 1) (c1, res1) in
let c, e = mul_wide_add a.[ i - 1 ] l c1 in
assert (v e + v c * pow2 pbits == v a.[ i - 1 ] * v l + v c1);
calc ( == ) {
v c * b2 + bn_v #t #i res;
( == ) { b... | false |
Steel.HigherReference.fst | Steel.HigherReference.ref | val ref ([@@@unused] a:Type u#1) : Type u#0 | val ref ([@@@unused] a:Type u#1) : Type u#0 | let ref a = Mem.ref (fractional a) pcm_frac | {
"file_name": "lib/steel/Steel.HigherReference.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 43,
"end_line": 31,
"start_col": 0,
"start_line": 31
} | (*
Copyright 2020 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"Steel.PCMReference.fsti.checked",
"Steel.PCMFrac.fst.checked",
"Steel.Memory.fsti.checked",
"Steel.Effect.Atomic.fsti.checked",
"Steel.Effect.fsti.checked",
"prims.fst.checked",
"FStar.Real.fsti.checked",
"FStar.Pervasives.Native.fst.checked"... | [
{
"abbrev": true,
"full_module": "Steel.Memory",
"short_module": "Mem"
},
{
"abbrev": true,
"full_module": "Steel.PCMReference",
"short_module": "RP"
},
{
"abbrev": false,
"full_module": "FStar.Real",
"short_module": null
},
{
"abbrev": false,
"full_module": "... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: Type -> Type0 | Prims.Tot | [
"total"
] | [] | [
"Steel.Memory.ref",
"Steel.PCMFrac.fractional",
"Steel.PCMFrac.pcm_frac"
] | [] | false | false | false | true | true | let ref a =
| Mem.ref (fractional a) pcm_frac | false |
Steel.HigherReference.fst | Steel.HigherReference.null | val null (#a:Type u#1) : ref a | val null (#a:Type u#1) : ref a | let null #a = Mem.null #(fractional a) #pcm_frac | {
"file_name": "lib/steel/Steel.HigherReference.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 48,
"end_line": 32,
"start_col": 0,
"start_line": 32
} | (*
Copyright 2020 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"Steel.PCMReference.fsti.checked",
"Steel.PCMFrac.fst.checked",
"Steel.Memory.fsti.checked",
"Steel.Effect.Atomic.fsti.checked",
"Steel.Effect.fsti.checked",
"prims.fst.checked",
"FStar.Real.fsti.checked",
"FStar.Pervasives.Native.fst.checked"... | [
{
"abbrev": true,
"full_module": "Steel.Memory",
"short_module": "Mem"
},
{
"abbrev": true,
"full_module": "Steel.PCMReference",
"short_module": "RP"
},
{
"abbrev": false,
"full_module": "FStar.Real",
"short_module": null
},
{
"abbrev": false,
"full_module": "... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | Steel.HigherReference.ref a | Prims.Tot | [
"total"
] | [] | [
"Steel.Memory.null",
"Steel.PCMFrac.fractional",
"Steel.PCMFrac.pcm_frac",
"Steel.HigherReference.ref"
] | [] | false | false | false | true | false | let null #a =
| Mem.null #(fractional a) #pcm_frac | false |
Steel.HigherReference.fst | Steel.HigherReference.pts_to_raw | val pts_to_raw (#a: Type) (r: ref a) (p: perm) (v: erased a) : vprop | val pts_to_raw (#a: Type) (r: ref a) (p: perm) (v: erased a) : vprop | let pts_to_raw (#a:Type) (r:ref a) (p:perm) (v:erased a) : vprop =
to_vprop (Mem.pts_to r (Some (Ghost.reveal v, p))) | {
"file_name": "lib/steel/Steel.HigherReference.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 52,
"end_line": 38,
"start_col": 0,
"start_line": 37
} | (*
Copyright 2020 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"Steel.PCMReference.fsti.checked",
"Steel.PCMFrac.fst.checked",
"Steel.Memory.fsti.checked",
"Steel.Effect.Atomic.fsti.checked",
"Steel.Effect.fsti.checked",
"prims.fst.checked",
"FStar.Real.fsti.checked",
"FStar.Pervasives.Native.fst.checked"... | [
{
"abbrev": true,
"full_module": "Steel.Memory",
"short_module": "Mem"
},
{
"abbrev": true,
"full_module": "Steel.PCMReference",
"short_module": "RP"
},
{
"abbrev": false,
"full_module": "FStar.Real",
"short_module": null
},
{
"abbrev": false,
"full_module": "... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | r: Steel.HigherReference.ref a -> p: Steel.FractionalPermission.perm -> v: FStar.Ghost.erased a
-> Steel.Effect.Common.vprop | Prims.Tot | [
"total"
] | [] | [
"Steel.HigherReference.ref",
"Steel.FractionalPermission.perm",
"FStar.Ghost.erased",
"Steel.Effect.Common.to_vprop",
"Steel.Memory.pts_to",
"Steel.PCMFrac.fractional",
"Steel.PCMFrac.pcm_frac",
"FStar.Pervasives.Native.Some",
"FStar.Pervasives.Native.tuple2",
"FStar.Pervasives.Native.Mktuple2",
... | [] | false | false | false | true | false | let pts_to_raw (#a: Type) (r: ref a) (p: perm) (v: erased a) : vprop =
| to_vprop (Mem.pts_to r (Some (Ghost.reveal v, p))) | false |
Steel.HigherReference.fst | Steel.HigherReference.pts_to' | val pts_to' (#a: Type u#1) (r: ref a) (p: perm) (v: erased a) : vprop | val pts_to' (#a: Type u#1) (r: ref a) (p: perm) (v: erased a) : vprop | let pts_to' (#a:Type u#1) (r:ref a) (p:perm) (v:erased a) : vprop = pts_to_raw r p v `star` pure (perm_ok p) | {
"file_name": "lib/steel/Steel.HigherReference.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 108,
"end_line": 40,
"start_col": 0,
"start_line": 40
} | (*
Copyright 2020 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"Steel.PCMReference.fsti.checked",
"Steel.PCMFrac.fst.checked",
"Steel.Memory.fsti.checked",
"Steel.Effect.Atomic.fsti.checked",
"Steel.Effect.fsti.checked",
"prims.fst.checked",
"FStar.Real.fsti.checked",
"FStar.Pervasives.Native.fst.checked"... | [
{
"abbrev": true,
"full_module": "Steel.Memory",
"short_module": "Mem"
},
{
"abbrev": true,
"full_module": "Steel.PCMReference",
"short_module": "RP"
},
{
"abbrev": false,
"full_module": "FStar.Real",
"short_module": null
},
{
"abbrev": false,
"full_module": "... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | r: Steel.HigherReference.ref a -> p: Steel.FractionalPermission.perm -> v: FStar.Ghost.erased a
-> Steel.Effect.Common.vprop | Prims.Tot | [
"total"
] | [] | [
"Steel.HigherReference.ref",
"Steel.FractionalPermission.perm",
"FStar.Ghost.erased",
"Steel.Effect.Common.star",
"Steel.HigherReference.pts_to_raw",
"Steel.Effect.Common.pure",
"Steel.HigherReference.perm_ok",
"Steel.Effect.Common.vprop"
] | [] | false | false | false | true | false | let pts_to' (#a: Type u#1) (r: ref a) (p: perm) (v: erased a) : vprop =
| (pts_to_raw r p v) `star` (pure (perm_ok p)) | false |
Steel.HigherReference.fst | Steel.HigherReference.pts_to_sl | val pts_to_sl (#a:Type u#1) (r:ref a) (p:perm) (v:a) : slprop u#1 | val pts_to_sl (#a:Type u#1) (r:ref a) (p:perm) (v:a) : slprop u#1 | let pts_to_sl #a r p v = hp_of (pts_to' r p v) | {
"file_name": "lib/steel/Steel.HigherReference.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 47,
"end_line": 41,
"start_col": 0,
"start_line": 41
} | (*
Copyright 2020 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"Steel.PCMReference.fsti.checked",
"Steel.PCMFrac.fst.checked",
"Steel.Memory.fsti.checked",
"Steel.Effect.Atomic.fsti.checked",
"Steel.Effect.fsti.checked",
"prims.fst.checked",
"FStar.Real.fsti.checked",
"FStar.Pervasives.Native.fst.checked"... | [
{
"abbrev": true,
"full_module": "Steel.Memory",
"short_module": "Mem"
},
{
"abbrev": true,
"full_module": "Steel.PCMReference",
"short_module": "RP"
},
{
"abbrev": false,
"full_module": "FStar.Real",
"short_module": null
},
{
"abbrev": false,
"full_module": "... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | r: Steel.HigherReference.ref a -> p: Steel.FractionalPermission.perm -> v: a -> Steel.Memory.slprop | Prims.Tot | [
"total"
] | [] | [
"Steel.HigherReference.ref",
"Steel.FractionalPermission.perm",
"Steel.Effect.Common.hp_of",
"Steel.HigherReference.pts_to'",
"FStar.Ghost.hide",
"Steel.Memory.slprop"
] | [] | false | false | false | true | false | let pts_to_sl #a r p v =
| hp_of (pts_to' r p v) | false |
Hacl.Impl.Poly1305.Field32xN_128.fst | Hacl.Impl.Poly1305.Field32xN_128.fmul_r2_normalize | val fmul_r2_normalize:
out:felem 2
-> p:precomp_r 2
-> Stack unit
(requires fun h ->
live h out /\ live h p /\
felem_fits h out (3, 3, 3, 3, 3) /\
load_precompute_r_post h p)
(ensures fun h0 _ h1 ->
modifies (loc out) h0 h1 /\
felem_fits h1 out (2, 2, 2, 2, 2) /\
(let... | val fmul_r2_normalize:
out:felem 2
-> p:precomp_r 2
-> Stack unit
(requires fun h ->
live h out /\ live h p /\
felem_fits h out (3, 3, 3, 3, 3) /\
load_precompute_r_post h p)
(ensures fun h0 _ h1 ->
modifies (loc out) h0 h1 /\
felem_fits h1 out (2, 2, 2, 2, 2) /\
(let... | let fmul_r2_normalize out p =
let r = sub p 0ul 5ul in
let r2 = sub p 10ul 5ul in
let a0 = out.(0ul) in
let a1 = out.(1ul) in
let a2 = out.(2ul) in
let a3 = out.(3ul) in
let a4 = out.(4ul) in
let r10 = r.(0ul) in
let r11 = r.(1ul) in
let r12 = r.(2ul) in
let r13 = r.(3ul) in
let r14 = r.(4ul) ... | {
"file_name": "code/poly1305/Hacl.Impl.Poly1305.Field32xN_128.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 17,
"end_line": 101,
"start_col": 0,
"start_line": 73
} | module Hacl.Impl.Poly1305.Field32xN_128
open FStar.HyperStack
open FStar.HyperStack.All
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
include Hacl.Spec.Poly1305.Field32xN
open Hacl.Spec.Poly1305.Field32xN.Lemmas
module Vec = Hacl.Spec.Poly1305.Vec
module ST = FStar.HyperStack.ST
open Hacl.Impl.Poly1305.Field32x... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Poly1305.Vec.fst.checked",
"Hacl.Spec.Poly1305.Field32xN.Lemmas.fst.checked",
"Hacl.Spec.Poly1305.Field32xN.fst.checked",
"Hacl.Impl.Poly1305.Field32xN.fst.che... | [
{
"abbrev": false,
"full_module": "Hacl.Impl.Poly1305.Field32xN",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Poly1305.Vec",
"short_module": "Vec"
},
{
"abbrev"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | out: Hacl.Impl.Poly1305.Field32xN.felem 2 -> p: Hacl.Impl.Poly1305.Field32xN.precomp_r 2
-> FStar.HyperStack.ST.Stack Prims.unit | FStar.HyperStack.ST.Stack | [] | [] | [
"Hacl.Impl.Poly1305.Field32xN.felem",
"Hacl.Impl.Poly1305.Field32xN.precomp_r",
"Hacl.Spec.Poly1305.Field32xN.uint64xN",
"Lib.Buffer.op_Array_Assignment",
"FStar.UInt32.__uint_to_t",
"Prims.unit",
"Hacl.Spec.Poly1305.Field32xN.felem5",
"Hacl.Spec.Poly1305.Field32xN.fmul_r2_normalize5",
"FStar.Pervas... | [] | false | true | false | false | false | let fmul_r2_normalize out p =
| let r = sub p 0ul 5ul in
let r2 = sub p 10ul 5ul in
let a0 = out.(0ul) in
let a1 = out.(1ul) in
let a2 = out.(2ul) in
let a3 = out.(3ul) in
let a4 = out.(4ul) in
let r10 = r.(0ul) in
let r11 = r.(1ul) in
let r12 = r.(2ul) in
let r13 = r.(3ul) in
let r14 = r.(4ul) in
let r20 = r2.(0ul) in
let r21 = r2.(1ul) in
let r22 =... | false |
Steel.HigherReference.fst | Steel.HigherReference.ghost_ref | val ghost_ref (a:Type u#1) : Type u#0 | val ghost_ref (a:Type u#1) : Type u#0 | let ghost_ref a = erased (ref a) | {
"file_name": "lib/steel/Steel.HigherReference.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 32,
"end_line": 389,
"start_col": 0,
"start_line": 389
} | (*
Copyright 2020 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"Steel.PCMReference.fsti.checked",
"Steel.PCMFrac.fst.checked",
"Steel.Memory.fsti.checked",
"Steel.Effect.Atomic.fsti.checked",
"Steel.Effect.fsti.checked",
"prims.fst.checked",
"FStar.Real.fsti.checked",
"FStar.Pervasives.Native.fst.checked"... | [
{
"abbrev": true,
"full_module": "Steel.Memory",
"short_module": "Mem"
},
{
"abbrev": true,
"full_module": "Steel.PCMReference",
"short_module": "RP"
},
{
"abbrev": false,
"full_module": "FStar.Real",
"short_module": null
},
{
"abbrev": false,
"full_module": "... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: Type -> Type0 | Prims.Tot | [
"total"
] | [] | [
"FStar.Ghost.erased",
"Steel.HigherReference.ref"
] | [] | false | false | false | true | true | let ghost_ref a =
| erased (ref a) | false |
Steel.HigherReference.fst | Steel.HigherReference.ghost_pts_to_sl | val ghost_pts_to_sl (#a:_) (r:ghost_ref a) (p:perm) (x:a) : slprop u#1 | val ghost_pts_to_sl (#a:_) (r:ghost_ref a) (p:perm) (x:a) : slprop u#1 | let ghost_pts_to_sl #a (r:ghost_ref a) (p:perm) (x:a) = pts_to_sl (reveal r) p x | {
"file_name": "lib/steel/Steel.HigherReference.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 80,
"end_line": 392,
"start_col": 0,
"start_line": 392
} | (*
Copyright 2020 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"Steel.PCMReference.fsti.checked",
"Steel.PCMFrac.fst.checked",
"Steel.Memory.fsti.checked",
"Steel.Effect.Atomic.fsti.checked",
"Steel.Effect.fsti.checked",
"prims.fst.checked",
"FStar.Real.fsti.checked",
"FStar.Pervasives.Native.fst.checked"... | [
{
"abbrev": true,
"full_module": "Steel.Memory",
"short_module": "Mem"
},
{
"abbrev": true,
"full_module": "Steel.PCMReference",
"short_module": "RP"
},
{
"abbrev": false,
"full_module": "FStar.Real",
"short_module": null
},
{
"abbrev": false,
"full_module": "... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | r: Steel.HigherReference.ghost_ref a -> p: Steel.FractionalPermission.perm -> x: a
-> Steel.Memory.slprop | Prims.Tot | [
"total"
] | [] | [
"Steel.HigherReference.ghost_ref",
"Steel.FractionalPermission.perm",
"Steel.HigherReference.pts_to_sl",
"FStar.Ghost.reveal",
"Steel.HigherReference.ref",
"Steel.Memory.slprop"
] | [] | false | false | false | true | false | let ghost_pts_to_sl #a (r: ghost_ref a) (p: perm) (x: a) =
| pts_to_sl (reveal r) p x | false |
Steel.HigherReference.fst | Steel.HigherReference.cas_provides | val cas_provides : r: Steel.HigherReference.ref t -> v: FStar.Ghost.erased t -> v_new: t -> b: Prims.bool
-> Steel.Memory.slprop | let cas_provides #t (r:ref t) (v:Ghost.erased t) (v_new:t) (b:bool) =
if b then pts_to_sl r full_perm v_new else pts_to_sl r full_perm v | {
"file_name": "lib/steel/Steel.HigherReference.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 70,
"end_line": 308,
"start_col": 0,
"start_line": 307
} | (*
Copyright 2020 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"Steel.PCMReference.fsti.checked",
"Steel.PCMFrac.fst.checked",
"Steel.Memory.fsti.checked",
"Steel.Effect.Atomic.fsti.checked",
"Steel.Effect.fsti.checked",
"prims.fst.checked",
"FStar.Real.fsti.checked",
"FStar.Pervasives.Native.fst.checked"... | [
{
"abbrev": true,
"full_module": "Steel.Memory",
"short_module": "Mem"
},
{
"abbrev": true,
"full_module": "Steel.PCMReference",
"short_module": "RP"
},
{
"abbrev": false,
"full_module": "FStar.Real",
"short_module": null
},
{
"abbrev": false,
"full_module": "... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | r: Steel.HigherReference.ref t -> v: FStar.Ghost.erased t -> v_new: t -> b: Prims.bool
-> Steel.Memory.slprop | Prims.Tot | [
"total"
] | [] | [
"Steel.HigherReference.ref",
"FStar.Ghost.erased",
"Prims.bool",
"Steel.HigherReference.pts_to_sl",
"Steel.FractionalPermission.full_perm",
"FStar.Ghost.reveal",
"Steel.Memory.slprop"
] | [] | false | false | false | true | false | let cas_provides #t (r: ref t) (v: Ghost.erased t) (v_new: t) (b: bool) =
| if b then pts_to_sl r full_perm v_new else pts_to_sl r full_perm v | false | |
Steel.HigherReference.fst | Steel.HigherReference.pts_to_witinv | val pts_to_witinv (#a:Type) (r:ref a) (p:perm) : Lemma (is_witness_invariant (pts_to_sl r p)) | val pts_to_witinv (#a:Type) (r:ref a) (p:perm) : Lemma (is_witness_invariant (pts_to_sl r p)) | let pts_to_witinv (#a:Type) (r:ref a) (p:perm) : Lemma (is_witness_invariant (pts_to_sl r p)) =
let aux (x y : erased a) (m:mem)
: Lemma (requires (interp (pts_to_sl r p x) m /\ interp (pts_to_sl r p y) m))
(ensures (x == y))
=
Mem.pts_to_join r (Some (Ghost.reveal x, p)) (Some (Ghost.reveal ... | {
"file_name": "lib/steel/Steel.HigherReference.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 73,
"end_line": 106,
"start_col": 0,
"start_line": 99
} | (*
Copyright 2020 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"Steel.PCMReference.fsti.checked",
"Steel.PCMFrac.fst.checked",
"Steel.Memory.fsti.checked",
"Steel.Effect.Atomic.fsti.checked",
"Steel.Effect.fsti.checked",
"prims.fst.checked",
"FStar.Real.fsti.checked",
"FStar.Pervasives.Native.fst.checked"... | [
{
"abbrev": true,
"full_module": "Steel.Memory",
"short_module": "Mem"
},
{
"abbrev": true,
"full_module": "Steel.PCMReference",
"short_module": "RP"
},
{
"abbrev": false,
"full_module": "FStar.Real",
"short_module": null
},
{
"abbrev": false,
"full_module": "... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | r: Steel.HigherReference.ref a -> p: Steel.FractionalPermission.perm
-> FStar.Pervasives.Lemma
(ensures Steel.Memory.is_witness_invariant (Steel.HigherReference.pts_to_sl r p)) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Steel.HigherReference.ref",
"Steel.FractionalPermission.perm",
"FStar.Classical.forall_intro_3",
"FStar.Ghost.erased",
"Steel.Memory.mem",
"Prims.l_imp",
"Prims.l_and",
"Steel.Memory.interp",
"Steel.HigherReference.pts_to_sl",
"FStar.Ghost.reveal",
"Prims.eq2",
"FStar.Classical.move_requires"... | [] | false | false | true | false | false | let pts_to_witinv (#a: Type) (r: ref a) (p: perm) : Lemma (is_witness_invariant (pts_to_sl r p)) =
| let aux (x y: erased a) (m: mem)
: Lemma (requires (interp (pts_to_sl r p x) m /\ interp (pts_to_sl r p y) m)) (ensures (x == y))
=
Mem.pts_to_join r (Some (Ghost.reveal x, p)) (Some (Ghost.reveal y, p)) m
in
Classical.forall_intro_3 (fun x y -> Classical.move_requires (aux x y)) | false |
Steel.HigherReference.fst | Steel.HigherReference.is_null | val is_null (#a:Type u#1) (r:ref a) : (b:bool{b <==> r == null}) | val is_null (#a:Type u#1) (r:ref a) : (b:bool{b <==> r == null}) | let is_null #a r = Mem.is_null #(fractional a) #pcm_frac r | {
"file_name": "lib/steel/Steel.HigherReference.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 58,
"end_line": 33,
"start_col": 0,
"start_line": 33
} | (*
Copyright 2020 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"Steel.PCMReference.fsti.checked",
"Steel.PCMFrac.fst.checked",
"Steel.Memory.fsti.checked",
"Steel.Effect.Atomic.fsti.checked",
"Steel.Effect.fsti.checked",
"prims.fst.checked",
"FStar.Real.fsti.checked",
"FStar.Pervasives.Native.fst.checked"... | [
{
"abbrev": true,
"full_module": "Steel.Memory",
"short_module": "Mem"
},
{
"abbrev": true,
"full_module": "Steel.PCMReference",
"short_module": "RP"
},
{
"abbrev": false,
"full_module": "FStar.Real",
"short_module": null
},
{
"abbrev": false,
"full_module": "... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | r: Steel.HigherReference.ref a -> b: Prims.bool{b <==> r == Steel.HigherReference.null} | Prims.Tot | [
"total"
] | [] | [
"Steel.HigherReference.ref",
"Steel.Memory.is_null",
"Steel.PCMFrac.fractional",
"Steel.PCMFrac.pcm_frac",
"Prims.bool",
"Prims.l_iff",
"Prims.b2t",
"Prims.eq2",
"Steel.HigherReference.null"
] | [] | false | false | false | false | false | let is_null #a r =
| Mem.is_null #(fractional a) #pcm_frac r | false |
Steel.HigherReference.fst | Steel.HigherReference.abcd_acbd | val abcd_acbd (a b c d: slprop)
: Lemma
(let open Mem in ((a `star` b) `star` (c `star` d)) `equiv` ((a `star` c) `star` (b `star` d))) | val abcd_acbd (a b c d: slprop)
: Lemma
(let open Mem in ((a `star` b) `star` (c `star` d)) `equiv` ((a `star` c) `star` (b `star` d))) | let abcd_acbd (a b c d:slprop)
: Lemma (Mem.(((a `star` b) `star` (c `star` d)) `equiv`
((a `star` c) `star` (b `star` d))))
= let open Steel.Memory in
calc (equiv) {
((a `star` b) `star` (c `star` d));
(equiv) { star_associative a b (c `star` d) }
((a `star` (b `star` (c `star` d))));
... | {
"file_name": "lib/steel/Steel.HigherReference.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 4,
"end_line": 66,
"start_col": 0,
"start_line": 43
} | (*
Copyright 2020 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"Steel.PCMReference.fsti.checked",
"Steel.PCMFrac.fst.checked",
"Steel.Memory.fsti.checked",
"Steel.Effect.Atomic.fsti.checked",
"Steel.Effect.fsti.checked",
"prims.fst.checked",
"FStar.Real.fsti.checked",
"FStar.Pervasives.Native.fst.checked"... | [
{
"abbrev": true,
"full_module": "Steel.Memory",
"short_module": "Mem"
},
{
"abbrev": true,
"full_module": "Steel.PCMReference",
"short_module": "RP"
},
{
"abbrev": false,
"full_module": "FStar.Real",
"short_module": null
},
{
"abbrev": false,
"full_module": "... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: Steel.Memory.slprop -> b: Steel.Memory.slprop -> c: Steel.Memory.slprop -> d: Steel.Memory.slprop
-> FStar.Pervasives.Lemma
(ensures
Steel.Memory.equiv (Steel.Memory.star (Steel.Memory.star a b) (Steel.Memory.star c d))
(Steel.Memory.star (Steel.Memory.star a c) (Steel.Memory.star b d))) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Steel.Memory.slprop",
"FStar.Calc.calc_finish",
"Steel.Memory.equiv",
"Steel.Memory.star",
"Prims.Cons",
"FStar.Preorder.relation",
"Prims.Nil",
"Prims.unit",
"FStar.Calc.calc_step",
"FStar.Calc.calc_init",
"FStar.Calc.calc_pack",
"Steel.Memory.star_associative",
"Prims.squash",
"Steel.Me... | [] | false | false | true | false | false | let abcd_acbd (a b c d: slprop)
: Lemma
(let open Mem in ((a `star` b) `star` (c `star` d)) `equiv` ((a `star` c) `star` (b `star` d))) =
| let open Steel.Memory in
calc (equiv) {
((a `star` b) `star` (c `star` d));
(equiv) { star_associative a b (c `star` d) }
((a `star` (b `star` (c `star` d))));
(equiv) { (star_associative b c d;
star_congruence a (b `star` (c `star` d)) a ((b `star` c) `star` d)) }
(a `star` ((b `star` c) `star` d));
(e... | false |
Steel.HigherReference.fst | Steel.HigherReference.pts_to_not_null | val pts_to_not_null (#a:Type u#1)
(x:ref a)
(p:perm)
(v:a)
(m:mem)
: Lemma (requires interp (pts_to_sl x p v) m)
(ensures x =!= null) | val pts_to_not_null (#a:Type u#1)
(x:ref a)
(p:perm)
(v:a)
(m:mem)
: Lemma (requires interp (pts_to_sl x p v) m)
(ensures x =!= null) | let pts_to_not_null (#a:Type u#1)
(r:ref a)
(p:perm)
(v:a)
(m:mem)
: Lemma (requires interp (pts_to_sl r p v) m)
(ensures r =!= null)
= Mem.affine_star (hp_of (pts_to_raw r p v)) (Mem.pure (perm_ok p)) m;
Mem.pts_to_not_nu... | {
"file_name": "lib/steel/Steel.HigherReference.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 54,
"end_line": 97,
"start_col": 0,
"start_line": 89
} | (*
Copyright 2020 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"Steel.PCMReference.fsti.checked",
"Steel.PCMFrac.fst.checked",
"Steel.Memory.fsti.checked",
"Steel.Effect.Atomic.fsti.checked",
"Steel.Effect.fsti.checked",
"prims.fst.checked",
"FStar.Real.fsti.checked",
"FStar.Pervasives.Native.fst.checked"... | [
{
"abbrev": true,
"full_module": "Steel.Memory",
"short_module": "Mem"
},
{
"abbrev": true,
"full_module": "Steel.PCMReference",
"short_module": "RP"
},
{
"abbrev": false,
"full_module": "FStar.Real",
"short_module": null
},
{
"abbrev": false,
"full_module": "... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | x: Steel.HigherReference.ref a -> p: Steel.FractionalPermission.perm -> v: a -> m: Steel.Memory.mem
-> FStar.Pervasives.Lemma (requires Steel.Memory.interp (Steel.HigherReference.pts_to_sl x p v) m)
(ensures ~(x == Steel.HigherReference.null)) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Steel.HigherReference.ref",
"Steel.FractionalPermission.perm",
"Steel.Memory.mem",
"Steel.Memory.pts_to_not_null",
"Steel.PCMFrac.fractional",
"Steel.PCMFrac.pcm_frac",
"FStar.Pervasives.Native.Some",
"FStar.Pervasives.Native.tuple2",
"FStar.Pervasives.Native.Mktuple2",
"FStar.Ghost.reveal",
"F... | [] | true | false | true | false | false | let pts_to_not_null (#a: Type u#1) (r: ref a) (p: perm) (v: a) (m: mem)
: Lemma (requires interp (pts_to_sl r p v) m) (ensures r =!= null) =
| Mem.affine_star (hp_of (pts_to_raw r p v)) (Mem.pure (perm_ok p)) m;
Mem.pts_to_not_null r (Some (Ghost.reveal v, p)) m | false |
Steel.HigherReference.fst | Steel.HigherReference.pts_to_framon | val pts_to_framon (#a: Type) (r: ref a) (p: perm) : Lemma (is_frame_monotonic (pts_to_sl r p)) | val pts_to_framon (#a: Type) (r: ref a) (p: perm) : Lemma (is_frame_monotonic (pts_to_sl r p)) | let pts_to_framon (#a:Type) (r:ref a) (p:perm) : Lemma (is_frame_monotonic (pts_to_sl r p)) =
pts_to_witinv r p | {
"file_name": "lib/steel/Steel.HigherReference.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 19,
"end_line": 114,
"start_col": 0,
"start_line": 113
} | (*
Copyright 2020 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"Steel.PCMReference.fsti.checked",
"Steel.PCMFrac.fst.checked",
"Steel.Memory.fsti.checked",
"Steel.Effect.Atomic.fsti.checked",
"Steel.Effect.fsti.checked",
"prims.fst.checked",
"FStar.Real.fsti.checked",
"FStar.Pervasives.Native.fst.checked"... | [
{
"abbrev": true,
"full_module": "Steel.Memory",
"short_module": "Mem"
},
{
"abbrev": true,
"full_module": "Steel.PCMReference",
"short_module": "RP"
},
{
"abbrev": false,
"full_module": "FStar.Real",
"short_module": null
},
{
"abbrev": false,
"full_module": "... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | r: Steel.HigherReference.ref a -> p: Steel.FractionalPermission.perm
-> FStar.Pervasives.Lemma
(ensures Steel.Memory.is_frame_monotonic (Steel.HigherReference.pts_to_sl r p)) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Steel.HigherReference.ref",
"Steel.FractionalPermission.perm",
"Steel.HigherReference.pts_to_witinv",
"Prims.unit",
"Prims.l_True",
"Prims.squash",
"Steel.Memory.is_frame_monotonic",
"Steel.HigherReference.pts_to_sl",
"Prims.Nil",
"FStar.Pervasives.pattern"
] | [] | true | false | true | false | false | let pts_to_framon (#a: Type) (r: ref a) (p: perm) : Lemma (is_frame_monotonic (pts_to_sl r p)) =
| pts_to_witinv r p | false |
Steel.HigherReference.fst | Steel.HigherReference.pts_to_ref_injective | val pts_to_ref_injective
(#a: Type u#1)
(r: ref a)
(p0 p1:perm)
(v0 v1:a)
(m:mem)
: Lemma
(requires
interp (pts_to_sl r p0 v0 `Mem.star` pts_to_sl r p1 v1) m)
(ensures v0 == v1) | val pts_to_ref_injective
(#a: Type u#1)
(r: ref a)
(p0 p1:perm)
(v0 v1:a)
(m:mem)
: Lemma
(requires
interp (pts_to_sl r p0 v0 `Mem.star` pts_to_sl r p1 v1) m)
(ensures v0 == v1) | let pts_to_ref_injective
(#a: Type u#1)
(r: ref a)
(p0 p1:perm)
(v0 v1:a)
(m:mem)
: Lemma
(requires
interp (pts_to_sl r p0 v0 `Mem.star` pts_to_sl r p1 v1) m)
(ensures v0 == v1)
= let open Steel.Memory in
abcd_acbd (hp_of (pts_to_raw r p0 v0))
... | {
"file_name": "lib/steel/Steel.HigherReference.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 31,
"end_line": 87,
"start_col": 0,
"start_line": 68
} | (*
Copyright 2020 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"Steel.PCMReference.fsti.checked",
"Steel.PCMFrac.fst.checked",
"Steel.Memory.fsti.checked",
"Steel.Effect.Atomic.fsti.checked",
"Steel.Effect.fsti.checked",
"prims.fst.checked",
"FStar.Real.fsti.checked",
"FStar.Pervasives.Native.fst.checked"... | [
{
"abbrev": true,
"full_module": "Steel.Memory",
"short_module": "Mem"
},
{
"abbrev": true,
"full_module": "Steel.PCMReference",
"short_module": "RP"
},
{
"abbrev": false,
"full_module": "FStar.Real",
"short_module": null
},
{
"abbrev": false,
"full_module": "... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
r: Steel.HigherReference.ref a ->
p0: Steel.FractionalPermission.perm ->
p1: Steel.FractionalPermission.perm ->
v0: a ->
v1: a ->
m: Steel.Memory.mem
-> FStar.Pervasives.Lemma
(requires
Steel.Memory.interp (Steel.Memory.star (Steel.HigherReference.pts_to_sl r p0 v0)
... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Steel.HigherReference.ref",
"Steel.FractionalPermission.perm",
"Steel.Memory.mem",
"Steel.Memory.pts_to_compatible",
"Steel.PCMFrac.fractional",
"Steel.PCMFrac.pcm_frac",
"FStar.Pervasives.Native.Some",
"FStar.Pervasives.Native.tuple2",
"FStar.Pervasives.Native.Mktuple2",
"FStar.Ghost.reveal",
... | [] | true | false | true | false | false | let pts_to_ref_injective (#a: Type u#1) (r: ref a) (p0 p1: perm) (v0 v1: a) (m: mem)
: Lemma (requires interp ((pts_to_sl r p0 v0) `Mem.star` (pts_to_sl r p1 v1)) m)
(ensures v0 == v1) =
| let open Steel.Memory in
abcd_acbd (hp_of (pts_to_raw r p0 v0))
(pure (perm_ok p0))
(hp_of (pts_to_raw r p1 v1))
(pure (perm_ok p1));
Mem.affine_star ((hp_of (pts_to_raw r p0 v0)) `star` (hp_of (pts_to_raw r p1 v1)))
((pure (perm_ok p0)) `star` (pure (perm_ok p1)))
m;
Mem.pts_to_compatible r (Some (Ghost.reve... | false |
Hacl.Impl.Poly1305.Field32xN_128.fst | Hacl.Impl.Poly1305.Field32xN_128.load_acc2 | val load_acc2:
acc:felem 2
-> b:lbuffer uint8 32ul
-> Stack unit
(requires fun h ->
live h acc /\ live h b /\ disjoint acc b /\
felem_fits h acc (2, 2, 2, 2, 2))
(ensures fun h0 _ h1 ->
modifies (loc acc) h0 h1 /\
felem_fits h1 acc (3, 3, 3, 3, 3) /\
feval h1 acc == Vec.lo... | val load_acc2:
acc:felem 2
-> b:lbuffer uint8 32ul
-> Stack unit
(requires fun h ->
live h acc /\ live h b /\ disjoint acc b /\
felem_fits h acc (2, 2, 2, 2, 2))
(ensures fun h0 _ h1 ->
modifies (loc acc) h0 h1 /\
felem_fits h1 acc (3, 3, 3, 3, 3) /\
feval h1 acc == Vec.lo... | let load_acc2 acc b =
push_frame();
let e = create 5ul (zero 2) in
load_blocks e b;
let acc0 = acc.(0ul) in
let acc1 = acc.(1ul) in
let acc2 = acc.(2ul) in
let acc3 = acc.(3ul) in
let acc4 = acc.(4ul) in
let e0 = e.(0ul) in
let e1 = e.(1ul) in
let e2 = e.(2ul) in
let e3 = e.(3ul) in
let e4 = ... | {
"file_name": "code/poly1305/Hacl.Impl.Poly1305.Field32xN_128.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 13,
"end_line": 57,
"start_col": 0,
"start_line": 34
} | module Hacl.Impl.Poly1305.Field32xN_128
open FStar.HyperStack
open FStar.HyperStack.All
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
include Hacl.Spec.Poly1305.Field32xN
open Hacl.Spec.Poly1305.Field32xN.Lemmas
module Vec = Hacl.Spec.Poly1305.Vec
module ST = FStar.HyperStack.ST
open Hacl.Impl.Poly1305.Field32x... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Poly1305.Vec.fst.checked",
"Hacl.Spec.Poly1305.Field32xN.Lemmas.fst.checked",
"Hacl.Spec.Poly1305.Field32xN.fst.checked",
"Hacl.Impl.Poly1305.Field32xN.fst.che... | [
{
"abbrev": false,
"full_module": "Hacl.Impl.Poly1305.Field32xN",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Poly1305.Vec",
"short_module": "Vec"
},
{
"abbrev"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | acc: Hacl.Impl.Poly1305.Field32xN.felem 2 -> b: Lib.Buffer.lbuffer Lib.IntTypes.uint8 32ul
-> FStar.HyperStack.ST.Stack Prims.unit | FStar.HyperStack.ST.Stack | [] | [] | [
"Hacl.Impl.Poly1305.Field32xN.felem",
"Lib.Buffer.lbuffer",
"Lib.IntTypes.uint8",
"FStar.UInt32.__uint_to_t",
"Hacl.Spec.Poly1305.Field32xN.uint64xN",
"FStar.HyperStack.ST.pop_frame",
"Prims.unit",
"Lib.Buffer.op_Array_Assignment",
"Hacl.Spec.Poly1305.Field32xN.felem5",
"Hacl.Spec.Poly1305.Field32... | [] | false | true | false | false | false | let load_acc2 acc b =
| push_frame ();
let e = create 5ul (zero 2) in
load_blocks e b;
let acc0 = acc.(0ul) in
let acc1 = acc.(1ul) in
let acc2 = acc.(2ul) in
let acc3 = acc.(3ul) in
let acc4 = acc.(4ul) in
let e0 = e.(0ul) in
let e1 = e.(1ul) in
let e2 = e.(2ul) in
let e3 = e.(3ul) in
let e4 = e.(4ul) in
let acc0, acc1, acc2, acc3, acc4 =
... | false |
LatticeEff.fst | LatticeEff.wpof2 | val wpof2 (#a: _) (l: list eff_label) : wp a | val wpof2 (#a: _) (l: list eff_label) : wp a | let wpof2 #a (l : list eff_label) : wp a =
let i = interp l in
let wp : wp a = fun p s0 ->
(forall r s1.
(i WR == false ==> s1 == s0) ==>
(i EXN == false ==> V? r) ==>
p r s1)
in
wp | {
"file_name": "examples/layeredeffects/LatticeEff.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 4,
"end_line": 51,
"start_col": 0,
"start_line": 43
} | module LatticeEff
open FStar.Tactics.V2
open FStar.List.Tot
open FStar.All
module H = FStar.Heap
// GM: Force a type equality by SMT
let coerce #a #b (x:a{a == b}) : b = x
let unreachable #a () : Pure a (requires False) (ensures (fun _ -> False)) = coerce "whatever"
type eff_label =
// GM: Can we do this one? ALL... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.List.Tot.Properties.fst.checked",
"FStar.List.Tot.fst.checked",
"FStar.Heap.fst.checked",
"FStar.Classical.fsti.ch... | [
{
"abbrev": true,
"full_module": "FStar.Heap",
"short_module": "H"
},
{
"abbrev": false,
"full_module": "FStar.All",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.Tot",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Ta... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"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 LatticeEff.eff_label -> LatticeEff.wp a | Prims.Tot | [
"total"
] | [] | [
"Prims.list",
"LatticeEff.eff_label",
"LatticeEff.wp",
"FStar.Pervasives.all_post_h",
"FStar.Monotonic.Heap.heap",
"Prims.l_Forall",
"FStar.Pervasives.result",
"Prims.l_True",
"Prims.l_imp",
"Prims.eq2",
"Prims.bool",
"LatticeEff.WR",
"LatticeEff.EXN",
"Prims.b2t",
"FStar.Pervasives.uu__... | [] | false | false | false | true | false | let wpof2 #a (l: list eff_label) : wp a =
| let i = interp l in
let wp:wp a =
fun p s0 -> (forall r s1. (i WR == false ==> s1 == s0) ==> (i EXN == false ==> V? r) ==> p r s1)
in
wp | false |
Steel.HigherReference.fst | Steel.HigherReference.equiv_ext_right | val equiv_ext_right (p q r: slprop)
: Lemma (requires q `Mem.equiv` r) (ensures Mem.((p `star` q) `equiv` (p `star` r))) | val equiv_ext_right (p q r: slprop)
: Lemma (requires q `Mem.equiv` r) (ensures Mem.((p `star` q) `equiv` (p `star` r))) | let equiv_ext_right (p q r:slprop)
: Lemma
(requires q `Mem.equiv` r)
(ensures Mem.((p `star` q) `equiv` (p `star` r)))
= let open Steel.Memory in
calc (equiv) {
p `star` q;
(equiv) { star_commutative p q }
q `star` p;
(equiv) { equiv_extensional_on_star q r p }
r... | {
"file_name": "lib/steel/Steel.HigherReference.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 5,
"end_line": 323,
"start_col": 0,
"start_line": 310
} | (*
Copyright 2020 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"Steel.PCMReference.fsti.checked",
"Steel.PCMFrac.fst.checked",
"Steel.Memory.fsti.checked",
"Steel.Effect.Atomic.fsti.checked",
"Steel.Effect.fsti.checked",
"prims.fst.checked",
"FStar.Real.fsti.checked",
"FStar.Pervasives.Native.fst.checked"... | [
{
"abbrev": true,
"full_module": "Steel.Memory",
"short_module": "Mem"
},
{
"abbrev": true,
"full_module": "Steel.PCMReference",
"short_module": "RP"
},
{
"abbrev": false,
"full_module": "FStar.Real",
"short_module": null
},
{
"abbrev": false,
"full_module": "... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | p: Steel.Memory.slprop -> q: Steel.Memory.slprop -> r: Steel.Memory.slprop
-> FStar.Pervasives.Lemma (requires Steel.Memory.equiv q r)
(ensures Steel.Memory.equiv (Steel.Memory.star p q) (Steel.Memory.star p r)) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Steel.Memory.slprop",
"FStar.Calc.calc_finish",
"Steel.Memory.equiv",
"Steel.Memory.star",
"Prims.Cons",
"FStar.Preorder.relation",
"Prims.Nil",
"Prims.unit",
"FStar.Calc.calc_step",
"FStar.Calc.calc_init",
"FStar.Calc.calc_pack",
"Steel.Memory.star_commutative",
"Prims.squash",
"Steel.Me... | [] | false | false | true | false | false | let equiv_ext_right (p q r: slprop)
: Lemma (requires q `Mem.equiv` r) (ensures Mem.((p `star` q) `equiv` (p `star` r))) =
| let open Steel.Memory in
calc (equiv) {
p `star` q;
(equiv) { star_commutative p q }
q `star` p;
(equiv) { equiv_extensional_on_star q r p }
r `star` p;
(equiv) { star_commutative p r }
p `star` r;
} | false |
LatticeEff.fst | LatticeEff.ann_le | val ann_le (ann1 ann2: annot) : prop | val ann_le (ann1 ann2: annot) : prop | let ann_le (ann1 ann2 : annot) : prop =
forall x. ann1 x ==> ann2 x | {
"file_name": "examples/layeredeffects/LatticeEff.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 29,
"end_line": 92,
"start_col": 0,
"start_line": 91
} | module LatticeEff
open FStar.Tactics.V2
open FStar.List.Tot
open FStar.All
module H = FStar.Heap
// GM: Force a type equality by SMT
let coerce #a #b (x:a{a == b}) : b = x
let unreachable #a () : Pure a (requires False) (ensures (fun _ -> False)) = coerce "whatever"
type eff_label =
// GM: Can we do this one? ALL... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.List.Tot.Properties.fst.checked",
"FStar.List.Tot.fst.checked",
"FStar.Heap.fst.checked",
"FStar.Classical.fsti.ch... | [
{
"abbrev": true,
"full_module": "FStar.Heap",
"short_module": "H"
},
{
"abbrev": false,
"full_module": "FStar.All",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.Tot",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Ta... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | ann1: LatticeEff.annot -> ann2: LatticeEff.annot -> Prims.prop | Prims.Tot | [
"total"
] | [] | [
"LatticeEff.annot",
"Prims.l_Forall",
"LatticeEff.eff_label",
"Prims.l_imp",
"Prims.b2t",
"Prims.prop"
] | [] | false | false | false | true | true | let ann_le (ann1 ann2: annot) : prop =
| forall x. ann1 x ==> ann2 x | false |
SteelFramingTestSuite.fst | SteelFramingTestSuite.test_if7 | val test_if7 (b: bool) (r1 r2: ref)
: SteelT unit ((ptr r1) `star` (ptr r2)) (fun _ -> (ptr r1) `star` (ptr r2)) | val test_if7 (b: bool) (r1 r2: ref)
: SteelT unit ((ptr r1) `star` (ptr r2)) (fun _ -> (ptr r1) `star` (ptr r2)) | let test_if7 (b:bool) (r1 r2: ref) : SteelT unit
(ptr r1 `star` ptr r2)
(fun _ -> ptr r1 `star` ptr r2)
= if b then (write r1 0; write r2 0) else (write r2 0; write r1 0);
write r2 0 | {
"file_name": "share/steel/tests/SteelFramingTestSuite.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 14,
"end_line": 138,
"start_col": 0,
"start_line": 134
} | (*
Copyright 2020 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"Steel.Memory.fsti.checked",
"Steel.Effect.Atomic.fsti.checked",
"Steel.Effect.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": false,
"source_file": "SteelFramingTestSuite.fst"
} | [
{
"abbrev": false,
"full_module": "Steel.Effect.Atomic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Steel.Effect",
"short_module": null
},
{
"abbrev": false,
"full_module": "Steel.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | b: Prims.bool -> r1: SteelFramingTestSuite.ref -> r2: SteelFramingTestSuite.ref
-> Steel.Effect.SteelT Prims.unit | Steel.Effect.SteelT | [] | [] | [
"Prims.bool",
"SteelFramingTestSuite.ref",
"SteelFramingTestSuite.write",
"Prims.unit",
"Steel.Effect.Common.star",
"SteelFramingTestSuite.ptr",
"Steel.Effect.Common.vprop"
] | [] | false | true | false | false | false | let test_if7 (b: bool) (r1 r2: ref)
: SteelT unit ((ptr r1) `star` (ptr r2)) (fun _ -> (ptr r1) `star` (ptr r2)) =
| if b
then
(write r1 0;
write r2 0)
else
(write r2 0;
write r1 0);
write r2 0 | false |
Steel.HigherReference.fst | Steel.HigherReference.cas_action_helper | val cas_action_helper (p q r s: slprop) (m: mem)
: Lemma (requires interp Mem.(((p `star` q) `star` r) `star` s) m)
(ensures interp Mem.((p `star` q) `star` s) m) | val cas_action_helper (p q r s: slprop) (m: mem)
: Lemma (requires interp Mem.(((p `star` q) `star` r) `star` s) m)
(ensures interp Mem.((p `star` q) `star` s) m) | let cas_action_helper (p q r s:slprop) (m:mem)
: Lemma
(requires interp Mem.(p `star` q `star` r `star` s) m)
(ensures interp Mem.(p `star` q `star` s) m)
= let open Steel.Memory in
calc (equiv) {
r `star` s;
(equiv) { star_commutative r s }
s `star` r;
};
calc (equiv) {... | {
"file_name": "lib/steel/Steel.HigherReference.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 41,
"end_line": 347,
"start_col": 0,
"start_line": 325
} | (*
Copyright 2020 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"Steel.PCMReference.fsti.checked",
"Steel.PCMFrac.fst.checked",
"Steel.Memory.fsti.checked",
"Steel.Effect.Atomic.fsti.checked",
"Steel.Effect.fsti.checked",
"prims.fst.checked",
"FStar.Real.fsti.checked",
"FStar.Pervasives.Native.fst.checked"... | [
{
"abbrev": true,
"full_module": "Steel.Memory",
"short_module": "Mem"
},
{
"abbrev": true,
"full_module": "Steel.PCMReference",
"short_module": "RP"
},
{
"abbrev": false,
"full_module": "FStar.Real",
"short_module": null
},
{
"abbrev": false,
"full_module": "... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
p: Steel.Memory.slprop ->
q: Steel.Memory.slprop ->
r: Steel.Memory.slprop ->
s: Steel.Memory.slprop ->
m: Steel.Memory.mem
-> FStar.Pervasives.Lemma
(requires
Steel.Memory.interp (Steel.Memory.star (Steel.Memory.star (Steel.Memory.star p q) r) s) m)
(ensures Steel.Memory.inte... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Steel.Memory.slprop",
"Steel.Memory.mem",
"Steel.Memory.affine_star",
"Steel.Memory.star",
"Prims.unit",
"Prims._assert",
"Steel.Memory.interp",
"FStar.Calc.calc_finish",
"Steel.Memory.equiv",
"Prims.Cons",
"FStar.Preorder.relation",
"Prims.Nil",
"FStar.Calc.calc_step",
"FStar.Calc.calc_i... | [] | false | false | true | false | false | let cas_action_helper (p q r s: slprop) (m: mem)
: Lemma (requires interp Mem.(((p `star` q) `star` r) `star` s) m)
(ensures interp Mem.((p `star` q) `star` s) m) =
| let open Steel.Memory in
calc (equiv) {
r `star` s;
(equiv) { star_commutative r s }
s `star` r;
};
calc (equiv) {
((p `star` q) `star` r) `star` s;
(equiv) { Mem.star_associative (p `star` q) r s }
(p `star` q) `star` (r `star` s);
(equiv) { equiv_ext_right (p `star` q) (r `star` s) (s `star` r) }
(p `... | false |
LatticeEff.fst | LatticeEff.ite | val ite : p: Type0 -> q: Type0 -> r: Type0 -> Prims.logical | let ite (p q r : Type0) = (p ==> q) /\ (~p ==> r) | {
"file_name": "examples/layeredeffects/LatticeEff.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 49,
"end_line": 114,
"start_col": 0,
"start_line": 114
} | module LatticeEff
open FStar.Tactics.V2
open FStar.List.Tot
open FStar.All
module H = FStar.Heap
// GM: Force a type equality by SMT
let coerce #a #b (x:a{a == b}) : b = x
let unreachable #a () : Pure a (requires False) (ensures (fun _ -> False)) = coerce "whatever"
type eff_label =
// GM: Can we do this one? ALL... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.List.Tot.Properties.fst.checked",
"FStar.List.Tot.fst.checked",
"FStar.Heap.fst.checked",
"FStar.Classical.fsti.ch... | [
{
"abbrev": true,
"full_module": "FStar.Heap",
"short_module": "H"
},
{
"abbrev": false,
"full_module": "FStar.All",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.Tot",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Ta... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"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: Type0 -> q: Type0 -> r: Type0 -> Prims.logical | Prims.Tot | [
"total"
] | [] | [
"Prims.l_and",
"Prims.l_imp",
"Prims.l_not",
"Prims.logical"
] | [] | false | false | false | true | true | let ite (p q r: Type0) =
| (p ==> q) /\ (~p ==> r) | false | |
Steel.HigherReference.fst | Steel.HigherReference.ghost_pts_to_witinv | val ghost_pts_to_witinv (#a:Type) (r:ghost_ref a) (p:perm) : Lemma (is_witness_invariant (ghost_pts_to_sl r p)) | val ghost_pts_to_witinv (#a:Type) (r:ghost_ref a) (p:perm) : Lemma (is_witness_invariant (ghost_pts_to_sl r p)) | let ghost_pts_to_witinv (#a:Type) (r:ghost_ref a) (p:perm) : Lemma (is_witness_invariant (ghost_pts_to_sl r p)) =
let aux (x y : erased a) (m:mem)
: Lemma (requires (interp (ghost_pts_to_sl r p x) m /\ interp (ghost_pts_to_sl r p y) m))
(ensures (x == y))
[SMTPat ()]
=
Mem.pts_to_... | {
"file_name": "lib/steel/Steel.HigherReference.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 53,
"end_line": 408,
"start_col": 0,
"start_line": 399
} | (*
Copyright 2020 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"Steel.PCMReference.fsti.checked",
"Steel.PCMFrac.fst.checked",
"Steel.Memory.fsti.checked",
"Steel.Effect.Atomic.fsti.checked",
"Steel.Effect.fsti.checked",
"prims.fst.checked",
"FStar.Real.fsti.checked",
"FStar.Pervasives.Native.fst.checked"... | [
{
"abbrev": true,
"full_module": "Steel.Memory",
"short_module": "Mem"
},
{
"abbrev": true,
"full_module": "Steel.PCMReference",
"short_module": "RP"
},
{
"abbrev": false,
"full_module": "FStar.Real",
"short_module": null
},
{
"abbrev": false,
"full_module": "... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | r: Steel.HigherReference.ghost_ref a -> p: Steel.FractionalPermission.perm
-> FStar.Pervasives.Lemma
(ensures Steel.Memory.is_witness_invariant (Steel.HigherReference.ghost_pts_to_sl r p)) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Steel.HigherReference.ghost_ref",
"Steel.FractionalPermission.perm",
"Prims._assert",
"Steel.Memory.is_witness_invariant",
"Steel.HigherReference.ghost_pts_to_sl",
"Prims.unit",
"Prims.l_Forall",
"Steel.Memory.mem",
"Prims.l_imp",
"Prims.l_and",
"Steel.Memory.interp",
"Prims.eq2",
"FStar.Gh... | [] | false | false | true | false | false | let ghost_pts_to_witinv (#a: Type) (r: ghost_ref a) (p: perm)
: Lemma (is_witness_invariant (ghost_pts_to_sl r p)) =
| let aux (x y: erased a) (m: mem)
: Lemma (requires (interp (ghost_pts_to_sl r p x) m /\ interp (ghost_pts_to_sl r p y) m))
(ensures (x == y))
[SMTPat ()] =
Mem.pts_to_join (Ghost.reveal r) (Some (Ghost.reveal x, p)) (Some (Ghost.reveal y, p)) m
in
assert (forall x y m.
interp (ghost_pts_to_sl r ... | false |
LatticeEff.fst | LatticeEff.interp | val interp (l: list eff_label) : annot | val interp (l: list eff_label) : annot | let interp (l : list eff_label) : annot =
fun lab -> mem lab l | {
"file_name": "examples/layeredeffects/LatticeEff.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 22,
"end_line": 24,
"start_col": 0,
"start_line": 23
} | module LatticeEff
open FStar.Tactics.V2
open FStar.List.Tot
open FStar.All
module H = FStar.Heap
// GM: Force a type equality by SMT
let coerce #a #b (x:a{a == b}) : b = x
let unreachable #a () : Pure a (requires False) (ensures (fun _ -> False)) = coerce "whatever"
type eff_label =
// GM: Can we do this one? ALL... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.List.Tot.Properties.fst.checked",
"FStar.List.Tot.fst.checked",
"FStar.Heap.fst.checked",
"FStar.Classical.fsti.ch... | [
{
"abbrev": true,
"full_module": "FStar.Heap",
"short_module": "H"
},
{
"abbrev": false,
"full_module": "FStar.All",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.Tot",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Ta... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"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 LatticeEff.eff_label -> LatticeEff.annot | Prims.Tot | [
"total"
] | [] | [
"Prims.list",
"LatticeEff.eff_label",
"FStar.List.Tot.Base.mem",
"Prims.bool",
"LatticeEff.annot"
] | [] | false | false | false | true | false | let interp (l: list eff_label) : annot =
| fun lab -> mem lab l | false |
LatticeEff.fst | LatticeEff.sublist | val sublist : l1: Prims.list LatticeEff.eff_label -> l2: Prims.list LatticeEff.eff_label -> Prims.logical | let sublist (l1 l2 : list eff_label) =
forall x. mem x l1 ==> mem x l2 | {
"file_name": "examples/layeredeffects/LatticeEff.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 33,
"end_line": 66,
"start_col": 0,
"start_line": 65
} | module LatticeEff
open FStar.Tactics.V2
open FStar.List.Tot
open FStar.All
module H = FStar.Heap
// GM: Force a type equality by SMT
let coerce #a #b (x:a{a == b}) : b = x
let unreachable #a () : Pure a (requires False) (ensures (fun _ -> False)) = coerce "whatever"
type eff_label =
// GM: Can we do this one? ALL... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.List.Tot.Properties.fst.checked",
"FStar.List.Tot.fst.checked",
"FStar.Heap.fst.checked",
"FStar.Classical.fsti.ch... | [
{
"abbrev": true,
"full_module": "FStar.Heap",
"short_module": "H"
},
{
"abbrev": false,
"full_module": "FStar.All",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.Tot",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Ta... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"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: Prims.list LatticeEff.eff_label -> l2: Prims.list LatticeEff.eff_label -> Prims.logical | Prims.Tot | [
"total"
] | [] | [
"Prims.list",
"LatticeEff.eff_label",
"Prims.l_Forall",
"Prims.l_imp",
"Prims.b2t",
"FStar.List.Tot.Base.mem",
"Prims.logical"
] | [] | false | false | false | true | true | let sublist (l1 l2: list eff_label) =
| forall x. mem x l1 ==> mem x l2 | false | |
LatticeEff.fst | LatticeEff.interp_at | val interp_at (l1 l2: list eff_label) (l: eff_label)
: Lemma (interp (l1 @ l2) l == (interp l1 l || interp l2 l)) [SMTPat (interp (l1 @ l2) l)] | val interp_at (l1 l2: list eff_label) (l: eff_label)
: Lemma (interp (l1 @ l2) l == (interp l1 l || interp l2 l)) [SMTPat (interp (l1 @ l2) l)] | let rec interp_at (l1 l2 : list eff_label) (l : eff_label)
: Lemma (interp (l1@l2) l == (interp l1 l || interp l2 l))
[SMTPat (interp (l1@l2) l)]
= match l1 with
| [] -> ()
| _::l1 -> interp_at l1 l2 l | {
"file_name": "examples/layeredeffects/LatticeEff.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 32,
"end_line": 63,
"start_col": 0,
"start_line": 58
} | module LatticeEff
open FStar.Tactics.V2
open FStar.List.Tot
open FStar.All
module H = FStar.Heap
// GM: Force a type equality by SMT
let coerce #a #b (x:a{a == b}) : b = x
let unreachable #a () : Pure a (requires False) (ensures (fun _ -> False)) = coerce "whatever"
type eff_label =
// GM: Can we do this one? ALL... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.List.Tot.Properties.fst.checked",
"FStar.List.Tot.fst.checked",
"FStar.Heap.fst.checked",
"FStar.Classical.fsti.ch... | [
{
"abbrev": true,
"full_module": "FStar.Heap",
"short_module": "H"
},
{
"abbrev": false,
"full_module": "FStar.All",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.Tot",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Ta... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"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: Prims.list LatticeEff.eff_label ->
l2: Prims.list LatticeEff.eff_label ->
l: LatticeEff.eff_label
-> FStar.Pervasives.Lemma
(ensures LatticeEff.interp (l1 @ l2) l == (LatticeEff.interp l1 l || LatticeEff.interp l2 l))
[SMTPat (LatticeEff.interp (l1 @ l2) l)] | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.list",
"LatticeEff.eff_label",
"LatticeEff.interp_at",
"Prims.unit",
"Prims.l_True",
"Prims.squash",
"Prims.eq2",
"Prims.bool",
"LatticeEff.interp",
"FStar.List.Tot.Base.op_At",
"Prims.op_BarBar",
"Prims.Cons",
"FStar.Pervasives.pattern",
"FStar.Pervasives.smt_pat",
"Prims.Nil"
] | [
"recursion"
] | false | false | true | false | false | let rec interp_at (l1 l2: list eff_label) (l: eff_label)
: Lemma (interp (l1 @ l2) l == (interp l1 l || interp l2 l)) [SMTPat (interp (l1 @ l2) l)] =
| match l1 with
| [] -> ()
| _ :: l1 -> interp_at l1 l2 l | false |
LatticeEff.fst | LatticeEff.coerce | val coerce (#a #b: _) (x: a{a == b}) : b | val coerce (#a #b: _) (x: a{a == b}) : b | let coerce #a #b (x:a{a == b}) : b = x | {
"file_name": "examples/layeredeffects/LatticeEff.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 38,
"end_line": 9,
"start_col": 0,
"start_line": 9
} | module LatticeEff
open FStar.Tactics.V2
open FStar.List.Tot
open FStar.All
module H = FStar.Heap | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.List.Tot.Properties.fst.checked",
"FStar.List.Tot.fst.checked",
"FStar.Heap.fst.checked",
"FStar.Classical.fsti.ch... | [
{
"abbrev": true,
"full_module": "FStar.Heap",
"short_module": "H"
},
{
"abbrev": false,
"full_module": "FStar.All",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.Tot",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Ta... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"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{a == b} -> b | Prims.Tot | [
"total"
] | [] | [
"Prims.eq2"
] | [] | false | false | false | false | false | let coerce #a #b (x: a{a == b}) : b =
| x | false |
LatticeEff.fst | LatticeEff.interp_sublist | val interp_sublist (l1 l2: list eff_label) (l: eff_label)
: Lemma (requires (sublist l1 l2))
(ensures (interp l1 l ==> interp l2 l))
[SMTPat (interp l1 l); SMTPat (sublist l1 l2)] | val interp_sublist (l1 l2: list eff_label) (l: eff_label)
: Lemma (requires (sublist l1 l2))
(ensures (interp l1 l ==> interp l2 l))
[SMTPat (interp l1 l); SMTPat (sublist l1 l2)] | let rec interp_sublist (l1 l2 : list eff_label) (l : eff_label)
: Lemma (requires (sublist l1 l2))
(ensures (interp l1 l ==> interp l2 l))
[SMTPat (interp l1 l); SMTPat (sublist l1 l2)]
= match l1 with
| [] -> ()
| _::l1 -> interp_sublist l1 l2 l | {
"file_name": "examples/layeredeffects/LatticeEff.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 37,
"end_line": 80,
"start_col": 0,
"start_line": 74
} | module LatticeEff
open FStar.Tactics.V2
open FStar.List.Tot
open FStar.All
module H = FStar.Heap
// GM: Force a type equality by SMT
let coerce #a #b (x:a{a == b}) : b = x
let unreachable #a () : Pure a (requires False) (ensures (fun _ -> False)) = coerce "whatever"
type eff_label =
// GM: Can we do this one? ALL... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.List.Tot.Properties.fst.checked",
"FStar.List.Tot.fst.checked",
"FStar.Heap.fst.checked",
"FStar.Classical.fsti.ch... | [
{
"abbrev": true,
"full_module": "FStar.Heap",
"short_module": "H"
},
{
"abbrev": false,
"full_module": "FStar.All",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.Tot",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Ta... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"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: Prims.list LatticeEff.eff_label ->
l2: Prims.list LatticeEff.eff_label ->
l: LatticeEff.eff_label
-> FStar.Pervasives.Lemma (requires LatticeEff.sublist l1 l2)
(ensures LatticeEff.interp l1 l ==> LatticeEff.interp l2 l)
[SMTPat (LatticeEff.interp l1 l); SMTPat (LatticeEff.sublist l1 l2)] | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.list",
"LatticeEff.eff_label",
"LatticeEff.interp_sublist",
"Prims.unit",
"LatticeEff.sublist",
"Prims.squash",
"Prims.l_imp",
"Prims.b2t",
"LatticeEff.interp",
"Prims.Cons",
"FStar.Pervasives.pattern",
"FStar.Pervasives.smt_pat",
"Prims.bool",
"Prims.logical",
"Prims.Nil"
] | [
"recursion"
] | false | false | true | false | false | let rec interp_sublist (l1 l2: list eff_label) (l: eff_label)
: Lemma (requires (sublist l1 l2))
(ensures (interp l1 l ==> interp l2 l))
[SMTPat (interp l1 l); SMTPat (sublist l1 l2)] =
| match l1 with
| [] -> ()
| _ :: l1 -> interp_sublist l1 l2 l | false |
LatticeEff.fst | LatticeEff.return | val return (a: Type) (x: a) : repr a [] | val return (a: Type) (x: a) : repr a [] | let return (a:Type) (x:a)
: repr a []
=
fun () -> x | {
"file_name": "examples/layeredeffects/LatticeEff.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 13,
"end_line": 97,
"start_col": 0,
"start_line": 94
} | module LatticeEff
open FStar.Tactics.V2
open FStar.List.Tot
open FStar.All
module H = FStar.Heap
// GM: Force a type equality by SMT
let coerce #a #b (x:a{a == b}) : b = x
let unreachable #a () : Pure a (requires False) (ensures (fun _ -> False)) = coerce "whatever"
type eff_label =
// GM: Can we do this one? ALL... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.List.Tot.Properties.fst.checked",
"FStar.List.Tot.fst.checked",
"FStar.Heap.fst.checked",
"FStar.Classical.fsti.ch... | [
{
"abbrev": true,
"full_module": "FStar.Heap",
"short_module": "H"
},
{
"abbrev": false,
"full_module": "FStar.All",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.Tot",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Ta... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: Type -> x: a -> LatticeEff.repr a [] | Prims.Tot | [
"total"
] | [] | [
"Prims.unit",
"LatticeEff.repr",
"Prims.Nil",
"LatticeEff.eff_label"
] | [] | false | false | false | true | false | let return (a: Type) (x: a) : repr a [] =
| fun () -> x | false |
LatticeEff.fst | LatticeEff.sublist_at | val sublist_at (l1 l2: list eff_label)
: Lemma (sublist l1 (l1 @ l2) /\ sublist l2 (l1 @ l2))
[SMTPatOr [[SMTPat (sublist l1 (l1 @ l2))]; [SMTPat (sublist l2 (l1 @ l2))]]] | val sublist_at (l1 l2: list eff_label)
: Lemma (sublist l1 (l1 @ l2) /\ sublist l2 (l1 @ l2))
[SMTPatOr [[SMTPat (sublist l1 (l1 @ l2))]; [SMTPat (sublist l2 (l1 @ l2))]]] | let rec sublist_at
(l1 l2 : list eff_label)
: Lemma (sublist l1 (l1@l2) /\ sublist l2 (l1@l2))
[SMTPatOr [[SMTPat (sublist l1 (l1@l2))];
[SMTPat (sublist l2 (l1@l2))]]]
= match l1 with
| [] -> ()
| _::l1 -> sublist_at l1 l2 | {
"file_name": "examples/layeredeffects/LatticeEff.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 31,
"end_line": 89,
"start_col": 0,
"start_line": 82
} | module LatticeEff
open FStar.Tactics.V2
open FStar.List.Tot
open FStar.All
module H = FStar.Heap
// GM: Force a type equality by SMT
let coerce #a #b (x:a{a == b}) : b = x
let unreachable #a () : Pure a (requires False) (ensures (fun _ -> False)) = coerce "whatever"
type eff_label =
// GM: Can we do this one? ALL... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.List.Tot.Properties.fst.checked",
"FStar.List.Tot.fst.checked",
"FStar.Heap.fst.checked",
"FStar.Classical.fsti.ch... | [
{
"abbrev": true,
"full_module": "FStar.Heap",
"short_module": "H"
},
{
"abbrev": false,
"full_module": "FStar.All",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.Tot",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Ta... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"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: Prims.list LatticeEff.eff_label -> l2: Prims.list LatticeEff.eff_label
-> FStar.Pervasives.Lemma
(ensures LatticeEff.sublist l1 (l1 @ l2) /\ LatticeEff.sublist l2 (l1 @ l2))
[
SMTPatOr [
[SMTPat (LatticeEff.sublist l1 (l1 @ l2))];
[SMTPat (LatticeEff.sublist l2 (l1 @ l2... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.list",
"LatticeEff.eff_label",
"LatticeEff.sublist_at",
"Prims.unit",
"Prims.l_True",
"Prims.squash",
"Prims.l_and",
"LatticeEff.sublist",
"FStar.List.Tot.Base.op_At",
"Prims.Cons",
"FStar.Pervasives.pattern",
"FStar.Pervasives.smt_pat_or",
"FStar.Pervasives.smt_pat",
"Prims.logical... | [
"recursion"
] | false | false | true | false | false | let rec sublist_at (l1 l2: list eff_label)
: Lemma (sublist l1 (l1 @ l2) /\ sublist l2 (l1 @ l2))
[SMTPatOr [[SMTPat (sublist l1 (l1 @ l2))]; [SMTPat (sublist l2 (l1 @ l2))]]] =
| match l1 with
| [] -> ()
| _ :: l1 -> sublist_at l1 l2 | false |
LatticeEff.fst | LatticeEff.bind | val bind (a b: Type) (labs1 labs2: list eff_label) (c: repr a labs1) (f: (x: a -> repr b labs2))
: Tot (repr b (labs1 @ labs2)) | val bind (a b: Type) (labs1 labs2: list eff_label) (c: repr a labs1) (f: (x: a -> repr b labs2))
: Tot (repr b (labs1 @ labs2)) | let bind (a b : Type)
(labs1 labs2 : list eff_label)
(c : repr a labs1)
(f : (x:a -> repr b labs2))
: Tot (repr b (labs1@labs2))
= fun () -> f (c ()) () | {
"file_name": "examples/layeredeffects/LatticeEff.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 25,
"end_line": 104,
"start_col": 0,
"start_line": 99
} | module LatticeEff
open FStar.Tactics.V2
open FStar.List.Tot
open FStar.All
module H = FStar.Heap
// GM: Force a type equality by SMT
let coerce #a #b (x:a{a == b}) : b = x
let unreachable #a () : Pure a (requires False) (ensures (fun _ -> False)) = coerce "whatever"
type eff_label =
// GM: Can we do this one? ALL... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.List.Tot.Properties.fst.checked",
"FStar.List.Tot.fst.checked",
"FStar.Heap.fst.checked",
"FStar.Classical.fsti.ch... | [
{
"abbrev": true,
"full_module": "FStar.Heap",
"short_module": "H"
},
{
"abbrev": false,
"full_module": "FStar.All",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.Tot",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Ta... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"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 ->
labs1: Prims.list LatticeEff.eff_label ->
labs2: Prims.list LatticeEff.eff_label ->
c: LatticeEff.repr a labs1 ->
f: (x: a -> LatticeEff.repr b labs2)
-> LatticeEff.repr b (labs1 @ labs2) | Prims.Tot | [
"total"
] | [] | [
"Prims.list",
"LatticeEff.eff_label",
"LatticeEff.repr",
"Prims.unit",
"FStar.List.Tot.Base.op_At"
] | [] | false | false | false | false | false | let bind (a b: Type) (labs1 labs2: list eff_label) (c: repr a labs1) (f: (x: a -> repr b labs2))
: Tot (repr b (labs1 @ labs2)) =
| fun () -> f (c ()) () | false |
LatticeEff.fst | LatticeEff.subcomp | val subcomp (a: Type) (labs1 labs2: list eff_label) (f: repr a labs1)
: Pure (repr a labs2) (requires (sublist labs1 labs2)) (ensures (fun _ -> True)) | val subcomp (a: Type) (labs1 labs2: list eff_label) (f: repr a labs1)
: Pure (repr a labs2) (requires (sublist labs1 labs2)) (ensures (fun _ -> True)) | let subcomp (a:Type)
(labs1 labs2 : list eff_label)
(f : repr a labs1)
: Pure (repr a labs2)
(requires (sublist labs1 labs2))
(ensures (fun _ -> True))
= f | {
"file_name": "examples/layeredeffects/LatticeEff.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 5,
"end_line": 112,
"start_col": 0,
"start_line": 106
} | module LatticeEff
open FStar.Tactics.V2
open FStar.List.Tot
open FStar.All
module H = FStar.Heap
// GM: Force a type equality by SMT
let coerce #a #b (x:a{a == b}) : b = x
let unreachable #a () : Pure a (requires False) (ensures (fun _ -> False)) = coerce "whatever"
type eff_label =
// GM: Can we do this one? ALL... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.List.Tot.Properties.fst.checked",
"FStar.List.Tot.fst.checked",
"FStar.Heap.fst.checked",
"FStar.Classical.fsti.ch... | [
{
"abbrev": true,
"full_module": "FStar.Heap",
"short_module": "H"
},
{
"abbrev": false,
"full_module": "FStar.All",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.Tot",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Ta... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"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 ->
labs1: Prims.list LatticeEff.eff_label ->
labs2: Prims.list LatticeEff.eff_label ->
f: LatticeEff.repr a labs1
-> Prims.Pure (LatticeEff.repr a labs2) | Prims.Pure | [] | [] | [
"Prims.list",
"LatticeEff.eff_label",
"LatticeEff.repr",
"LatticeEff.sublist",
"Prims.l_True"
] | [] | false | false | false | false | false | let subcomp (a: Type) (labs1 labs2: list eff_label) (f: repr a labs1)
: Pure (repr a labs2) (requires (sublist labs1 labs2)) (ensures (fun _ -> True)) =
| f | false |
LatticeEff.fst | LatticeEff.put | val put (s: state{forall s1. heap_rel s1 s}) : EFF unit [WR] | val put (s: state{forall s1. heap_rel s1 s}) : EFF unit [WR] | let put (s:state{forall s1. heap_rel s1 s}) : EFF unit [WR] =
EFF?.reflect (fun () -> gst_put s) | {
"file_name": "examples/layeredeffects/LatticeEff.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 36,
"end_line": 157,
"start_col": 0,
"start_line": 156
} | module LatticeEff
open FStar.Tactics.V2
open FStar.List.Tot
open FStar.All
module H = FStar.Heap
// GM: Force a type equality by SMT
let coerce #a #b (x:a{a == b}) : b = x
let unreachable #a () : Pure a (requires False) (ensures (fun _ -> False)) = coerce "whatever"
type eff_label =
// GM: Can we do this one? ALL... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.List.Tot.Properties.fst.checked",
"FStar.List.Tot.fst.checked",
"FStar.Heap.fst.checked",
"FStar.Classical.fsti.ch... | [
{
"abbrev": true,
"full_module": "FStar.Heap",
"short_module": "H"
},
{
"abbrev": false,
"full_module": "FStar.All",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.Tot",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Ta... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | s: LatticeEff.state{forall (s1: FStar.Monotonic.Heap.heap). FStar.ST.heap_rel s1 s}
-> LatticeEff.EFF Prims.unit | LatticeEff.EFF | [] | [] | [
"LatticeEff.state",
"Prims.l_Forall",
"FStar.Monotonic.Heap.heap",
"FStar.ST.heap_rel",
"Prims.unit",
"FStar.ST.gst_put",
"Prims.Cons",
"LatticeEff.eff_label",
"LatticeEff.WR",
"Prims.Nil"
] | [] | false | true | false | false | false | let put (s: state{forall s1. heap_rel s1 s}) : EFF unit [WR] =
| EFF?.reflect (fun () -> gst_put s) | false |
LatticeEff.fst | LatticeEff.lift_pure_eff | val lift_pure_eff (a: Type) (wp: pure_wp a) (f: (unit -> PURE a wp))
: Pure (repr a []) (requires (wp (fun _ -> True))) (ensures (fun _ -> True)) | val lift_pure_eff (a: Type) (wp: pure_wp a) (f: (unit -> PURE a wp))
: Pure (repr a []) (requires (wp (fun _ -> True))) (ensures (fun _ -> True)) | let lift_pure_eff
(a:Type)
(wp : pure_wp a)
(f : unit -> PURE a wp)
: Pure (repr a [])
(requires (wp (fun _ -> True)))
(ensures (fun _ -> True))
= FStar.Monotonic.Pure.elim_pure_wp_monotonicity wp;
fun () -> f () | {
"file_name": "examples/layeredeffects/LatticeEff.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 17,
"end_line": 141,
"start_col": 0,
"start_line": 133
} | module LatticeEff
open FStar.Tactics.V2
open FStar.List.Tot
open FStar.All
module H = FStar.Heap
// GM: Force a type equality by SMT
let coerce #a #b (x:a{a == b}) : b = x
let unreachable #a () : Pure a (requires False) (ensures (fun _ -> False)) = coerce "whatever"
type eff_label =
// GM: Can we do this one? ALL... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.List.Tot.Properties.fst.checked",
"FStar.List.Tot.fst.checked",
"FStar.Heap.fst.checked",
"FStar.Classical.fsti.ch... | [
{
"abbrev": true,
"full_module": "FStar.Heap",
"short_module": "H"
},
{
"abbrev": false,
"full_module": "FStar.All",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.Tot",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Ta... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"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 (LatticeEff.repr a []) | Prims.Pure | [] | [] | [
"Prims.pure_wp",
"Prims.unit",
"FStar.Monotonic.Pure.elim_pure_wp_monotonicity",
"LatticeEff.repr",
"Prims.Nil",
"LatticeEff.eff_label",
"Prims.l_True"
] | [] | false | false | false | false | false | let lift_pure_eff (a: Type) (wp: pure_wp a) (f: (unit -> PURE a wp))
: Pure (repr a []) (requires (wp (fun _ -> True))) (ensures (fun _ -> True)) =
| FStar.Monotonic.Pure.elim_pure_wp_monotonicity wp;
fun () -> f () | false |
LatticeEff.fst | LatticeEff.get | val get: Prims.unit -> EFF H.heap [] | val get: Prims.unit -> EFF H.heap [] | let get () : EFF H.heap [] =
EFF?.reflect (fun () -> get ()) | {
"file_name": "examples/layeredeffects/LatticeEff.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 33,
"end_line": 146,
"start_col": 0,
"start_line": 145
} | module LatticeEff
open FStar.Tactics.V2
open FStar.List.Tot
open FStar.All
module H = FStar.Heap
// GM: Force a type equality by SMT
let coerce #a #b (x:a{a == b}) : b = x
let unreachable #a () : Pure a (requires False) (ensures (fun _ -> False)) = coerce "whatever"
type eff_label =
// GM: Can we do this one? ALL... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.List.Tot.Properties.fst.checked",
"FStar.List.Tot.fst.checked",
"FStar.Heap.fst.checked",
"FStar.Classical.fsti.ch... | [
{
"abbrev": true,
"full_module": "FStar.Heap",
"short_module": "H"
},
{
"abbrev": false,
"full_module": "FStar.All",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.Tot",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Ta... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"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 -> LatticeEff.EFF FStar.Monotonic.Heap.heap | LatticeEff.EFF | [] | [] | [
"Prims.unit",
"FStar.ST.get",
"FStar.Monotonic.Heap.heap",
"Prims.Nil",
"LatticeEff.eff_label"
] | [] | false | true | false | false | false | let get () : EFF H.heap [] =
| EFF?.reflect (fun () -> get ()) | false |
LatticeEff.fst | LatticeEff.test1 | val test1 (r: ref int) (x y: int) : EFF int [EXN; WR] | val test1 (r: ref int) (x y: int) : EFF int [EXN; WR] | let test1 (r:ref int) (x y : int) : EFF int [EXN; WR] =
let z = !r in
if x + z > 0
then raise (Failure "nope")
else (r := 42; y - z) | {
"file_name": "examples/layeredeffects/LatticeEff.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 23,
"end_line": 172,
"start_col": 0,
"start_line": 168
} | module LatticeEff
open FStar.Tactics.V2
open FStar.List.Tot
open FStar.All
module H = FStar.Heap
// GM: Force a type equality by SMT
let coerce #a #b (x:a{a == b}) : b = x
let unreachable #a () : Pure a (requires False) (ensures (fun _ -> False)) = coerce "whatever"
type eff_label =
// GM: Can we do this one? ALL... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.List.Tot.Properties.fst.checked",
"FStar.List.Tot.fst.checked",
"FStar.Heap.fst.checked",
"FStar.Classical.fsti.ch... | [
{
"abbrev": true,
"full_module": "FStar.Heap",
"short_module": "H"
},
{
"abbrev": false,
"full_module": "FStar.All",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.Tot",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Ta... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | r: FStar.ST.ref Prims.int -> x: Prims.int -> y: Prims.int -> LatticeEff.EFF Prims.int | LatticeEff.EFF | [] | [] | [
"FStar.ST.ref",
"Prims.int",
"Prims.op_GreaterThan",
"Prims.op_Addition",
"LatticeEff.raise",
"FStar.All.Failure",
"Prims.bool",
"Prims.op_Subtraction",
"Prims.unit",
"LatticeEff.op_Colon_Equals",
"LatticeEff.op_Bang",
"Prims.Cons",
"LatticeEff.eff_label",
"LatticeEff.EXN",
"LatticeEff.W... | [] | false | true | false | false | false | let test1 (r: ref int) (x y: int) : EFF int [EXN; WR] =
| let z = !r in
if x + z > 0
then raise (Failure "nope")
else
(r := 42;
y - z) | false |
LatticeEff.fst | LatticeEff.catch | val catch (#a #labs: _) (f: (unit -> EFF a (EXN :: labs))) (g: (unit -> EFF a labs)) : EFF a labs | val catch (#a #labs: _) (f: (unit -> EFF a (EXN :: labs))) (g: (unit -> EFF a labs)) : EFF a labs | let catch #a #labs (f : unit -> EFF a (EXN::labs)) (g : unit -> EFF a labs) : EFF a labs =
EFF?.reflect begin
fun () -> try_with (reify (f ())) (reify (g ()))
end | {
"file_name": "examples/layeredeffects/LatticeEff.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 5,
"end_line": 197,
"start_col": 0,
"start_line": 194
} | module LatticeEff
open FStar.Tactics.V2
open FStar.List.Tot
open FStar.All
module H = FStar.Heap
// GM: Force a type equality by SMT
let coerce #a #b (x:a{a == b}) : b = x
let unreachable #a () : Pure a (requires False) (ensures (fun _ -> False)) = coerce "whatever"
type eff_label =
// GM: Can we do this one? ALL... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.List.Tot.Properties.fst.checked",
"FStar.List.Tot.fst.checked",
"FStar.Heap.fst.checked",
"FStar.Classical.fsti.ch... | [
{
"abbrev": true,
"full_module": "FStar.Heap",
"short_module": "H"
},
{
"abbrev": false,
"full_module": "FStar.All",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.Tot",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Ta... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | f: (_: Prims.unit -> LatticeEff.EFF a) -> g: (_: Prims.unit -> LatticeEff.EFF a) -> LatticeEff.EFF a | LatticeEff.EFF | [] | [] | [
"Prims.list",
"LatticeEff.eff_label",
"Prims.unit",
"Prims.Cons",
"LatticeEff.EXN",
"LatticeEff.try_with",
"LatticeEff.wpof2"
] | [] | false | true | false | false | false | let catch #a #labs (f: (unit -> EFF a (EXN :: labs))) (g: (unit -> EFF a labs)) : EFF a labs =
| EFF?.reflect (fun () -> try_with (reify (f ())) (reify (g ()))) | false |
LatticeEff.fst | LatticeEff.raise | val raise (#a: _) (e: exn) : EFF a [EXN] | val raise (#a: _) (e: exn) : EFF a [EXN] | let raise #a (e:exn) : EFF a [EXN] =
EFF?.reflect (fun () -> raise e) | {
"file_name": "examples/layeredeffects/LatticeEff.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 34,
"end_line": 160,
"start_col": 0,
"start_line": 159
} | module LatticeEff
open FStar.Tactics.V2
open FStar.List.Tot
open FStar.All
module H = FStar.Heap
// GM: Force a type equality by SMT
let coerce #a #b (x:a{a == b}) : b = x
let unreachable #a () : Pure a (requires False) (ensures (fun _ -> False)) = coerce "whatever"
type eff_label =
// GM: Can we do this one? ALL... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.List.Tot.Properties.fst.checked",
"FStar.List.Tot.fst.checked",
"FStar.Heap.fst.checked",
"FStar.Classical.fsti.ch... | [
{
"abbrev": true,
"full_module": "FStar.Heap",
"short_module": "H"
},
{
"abbrev": false,
"full_module": "FStar.All",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.Tot",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Ta... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | e: Prims.exn -> LatticeEff.EFF a | LatticeEff.EFF | [] | [] | [
"Prims.exn",
"Prims.unit",
"FStar.Exn.raise",
"Prims.Cons",
"LatticeEff.eff_label",
"LatticeEff.EXN",
"Prims.Nil"
] | [] | false | true | false | false | false | let raise #a (e: exn) : EFF a [EXN] =
| EFF?.reflect (fun () -> raise e) | false |
Hacl.Spec.Bignum.Multiplication.fst | Hacl.Spec.Bignum.Multiplication.bn_mul1_add_in_place_lemma_loop_step | val bn_mul1_add_in_place_lemma_loop_step:
#t:limb_t
-> #aLen:size_nat
-> a:lbignum t aLen
-> l:limb t
-> acc:lbignum t aLen
-> i:pos{i <= aLen}
-> c1_res1:generate_elem_a (limb t) (limb t) aLen (i - 1) -> Lemma
(requires
(let (c1, res1) = c1_res1 in
v c1 * pow2 (bits t * (i - 1)) + bn_v #t #(i... | val bn_mul1_add_in_place_lemma_loop_step:
#t:limb_t
-> #aLen:size_nat
-> a:lbignum t aLen
-> l:limb t
-> acc:lbignum t aLen
-> i:pos{i <= aLen}
-> c1_res1:generate_elem_a (limb t) (limb t) aLen (i - 1) -> Lemma
(requires
(let (c1, res1) = c1_res1 in
v c1 * pow2 (bits t * (i - 1)) + bn_v #t #(i... | let bn_mul1_add_in_place_lemma_loop_step #t #aLen a l acc i (c1, res1) =
let pbits = bits t in
let b1 = pow2 (pbits * (i - 1)) in
let b2 = pow2 (pbits * i) in
let (c, res) = generate_elem_f aLen (bn_mul1_add_in_place_f a l acc) (i - 1) (c1, res1) in
let c, e = mul_wide_add2 a.[i - 1] l c1 acc.[i - 1] in
as... | {
"file_name": "code/bignum/Hacl.Spec.Bignum.Multiplication.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 79,
"end_line": 258,
"start_col": 0,
"start_line": 222
} | module Hacl.Spec.Bignum.Multiplication
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.LoopCombinators
open Hacl.Spec.Bignum.Definitions
open Hacl.Spec.Bignum.Base
open Hacl.Spec.Lib
#reset-options "--z3rlimit 50 --fuel 0 --ifuel 0"
val bn_mul1_f:
#t:limb_t
-> #aLen:size_nat
-> a:lbignum t aLe... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.Lib.fst.checked",
"Hacl.Spec.Bignum.Definitions.fst.checked",
"Hacl.Spec.Bignum.Base.fst.checked",
"FStar.Seq.fst.che... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Lib",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Spec.Bignum.Base",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Spec.Bignum.Definitions",
"short_module": null
},
{
"abbrev": fals... | {
"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.Spec.Bignum.Definitions.lbignum t aLen ->
l: Hacl.Spec.Bignum.Definitions.limb t ->
acc: Hacl.Spec.Bignum.Definitions.lbignum t aLen ->
i: Prims.pos{i <= aLen} ->
c1_res1:
Hacl.Spec.Lib.generate_elem_a (Hacl.Spec.Bignum.Definitions.limb t)
(Hacl.Spec.Bignum.Definitions.limb t)... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Hacl.Spec.Bignum.Definitions.limb_t",
"Lib.IntTypes.size_nat",
"Hacl.Spec.Bignum.Definitions.lbignum",
"Hacl.Spec.Bignum.Definitions.limb",
"Prims.pos",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Hacl.Spec.Lib.generate_elem_a",
"Prims.op_Subtraction",
"Lib.Sequence.seq",
"Prims.eq2",
"Prims.na... | [] | false | false | true | false | false | let bn_mul1_add_in_place_lemma_loop_step #t #aLen a l acc i (c1, res1) =
| let pbits = bits t in
let b1 = pow2 (pbits * (i - 1)) in
let b2 = pow2 (pbits * i) in
let c, res = generate_elem_f aLen (bn_mul1_add_in_place_f a l acc) (i - 1) (c1, res1) in
let c, e = mul_wide_add2 a.[ i - 1 ] l c1 acc.[ i - 1 ] in
assert (v e + v c * pow2 pbits == v a.[ i - 1 ] * v l + v c1 + v acc.[ i - 1 ]);
calc ... | false |
LatticeEff.fst | LatticeEff.test_catch | val test_catch (f: (unit -> EFF int [EXN; WR])) : EFF int [WR] | val test_catch (f: (unit -> EFF int [EXN; WR])) : EFF int [WR] | let test_catch (f : unit -> EFF int [EXN;WR]) : EFF int [WR] =
catch f g | {
"file_name": "examples/layeredeffects/LatticeEff.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 11,
"end_line": 202,
"start_col": 0,
"start_line": 201
} | module LatticeEff
open FStar.Tactics.V2
open FStar.List.Tot
open FStar.All
module H = FStar.Heap
// GM: Force a type equality by SMT
let coerce #a #b (x:a{a == b}) : b = x
let unreachable #a () : Pure a (requires False) (ensures (fun _ -> False)) = coerce "whatever"
type eff_label =
// GM: Can we do this one? ALL... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.List.Tot.Properties.fst.checked",
"FStar.List.Tot.fst.checked",
"FStar.Heap.fst.checked",
"FStar.Classical.fsti.ch... | [
{
"abbrev": true,
"full_module": "FStar.Heap",
"short_module": "H"
},
{
"abbrev": false,
"full_module": "FStar.All",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.Tot",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Ta... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | f: (_: Prims.unit -> LatticeEff.EFF Prims.int) -> LatticeEff.EFF Prims.int | LatticeEff.EFF | [] | [] | [
"Prims.unit",
"Prims.int",
"Prims.Cons",
"LatticeEff.eff_label",
"LatticeEff.EXN",
"LatticeEff.WR",
"Prims.Nil",
"LatticeEff.catch",
"LatticeEff.g"
] | [] | false | true | false | false | false | let test_catch (f: (unit -> EFF int [EXN; WR])) : EFF int [WR] =
| catch f g | false |
LatticeEff.fst | LatticeEff.labpoly | val labpoly (#labs: _) (f g: (unit -> EFF int labs)) : EFF int labs | val labpoly (#labs: _) (f g: (unit -> EFF int labs)) : EFF int labs | let labpoly #labs (f g : unit -> EFF int labs) : EFF int labs =
f () + g () | {
"file_name": "examples/layeredeffects/LatticeEff.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 13,
"end_line": 181,
"start_col": 0,
"start_line": 180
} | module LatticeEff
open FStar.Tactics.V2
open FStar.List.Tot
open FStar.All
module H = FStar.Heap
// GM: Force a type equality by SMT
let coerce #a #b (x:a{a == b}) : b = x
let unreachable #a () : Pure a (requires False) (ensures (fun _ -> False)) = coerce "whatever"
type eff_label =
// GM: Can we do this one? ALL... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.List.Tot.Properties.fst.checked",
"FStar.List.Tot.fst.checked",
"FStar.Heap.fst.checked",
"FStar.Classical.fsti.ch... | [
{
"abbrev": true,
"full_module": "FStar.Heap",
"short_module": "H"
},
{
"abbrev": false,
"full_module": "FStar.All",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.Tot",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Ta... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | f: (_: Prims.unit -> LatticeEff.EFF Prims.int) -> g: (_: Prims.unit -> LatticeEff.EFF Prims.int)
-> LatticeEff.EFF Prims.int | LatticeEff.EFF | [] | [] | [
"Prims.list",
"LatticeEff.eff_label",
"Prims.unit",
"Prims.int",
"Prims.op_Addition"
] | [] | false | true | false | false | false | let labpoly #labs (f: (unit -> EFF int labs)) (g: (unit -> EFF int labs)) : EFF int labs =
| f () + g () | false |
LatticeEff.fst | LatticeEff.sublist_at_self | val sublist_at_self (l1: list eff_label) : Lemma (sublist (l1 @ l1) l1) [SMTPat (l1 @ l1)] | val sublist_at_self (l1: list eff_label) : Lemma (sublist (l1 @ l1) l1) [SMTPat (l1 @ l1)] | let sublist_at_self (l1 : list eff_label)
: Lemma (sublist (l1@l1) l1)
[SMTPat (l1@l1)]
= Classical.forall_intro (List.Tot.Properties.append_mem l1 l1) | {
"file_name": "examples/layeredeffects/LatticeEff.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 65,
"end_line": 178,
"start_col": 0,
"start_line": 175
} | module LatticeEff
open FStar.Tactics.V2
open FStar.List.Tot
open FStar.All
module H = FStar.Heap
// GM: Force a type equality by SMT
let coerce #a #b (x:a{a == b}) : b = x
let unreachable #a () : Pure a (requires False) (ensures (fun _ -> False)) = coerce "whatever"
type eff_label =
// GM: Can we do this one? ALL... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.List.Tot.Properties.fst.checked",
"FStar.List.Tot.fst.checked",
"FStar.Heap.fst.checked",
"FStar.Classical.fsti.ch... | [
{
"abbrev": true,
"full_module": "FStar.Heap",
"short_module": "H"
},
{
"abbrev": false,
"full_module": "FStar.All",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.Tot",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Ta... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"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: Prims.list LatticeEff.eff_label
-> FStar.Pervasives.Lemma (ensures LatticeEff.sublist (l1 @ l1) l1) [SMTPat (l1 @ l1)] | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.list",
"LatticeEff.eff_label",
"FStar.Classical.forall_intro",
"Prims.b2t",
"Prims.op_Equality",
"Prims.bool",
"FStar.List.Tot.Base.mem",
"FStar.List.Tot.Base.op_At",
"Prims.op_BarBar",
"FStar.List.Tot.Properties.append_mem",
"Prims.unit",
"Prims.l_True",
"Prims.squash",
"LatticeEff... | [] | false | false | true | false | false | let sublist_at_self (l1: list eff_label) : Lemma (sublist (l1 @ l1) l1) [SMTPat (l1 @ l1)] =
| Classical.forall_intro (List.Tot.Properties.append_mem l1 l1) | false |
LatticeEff.fst | LatticeEff.g | val g: #labs: _ -> Prims.unit -> EFF int labs | val g: #labs: _ -> Prims.unit -> EFF int labs | let g #labs () : EFF int labs = 42 | {
"file_name": "examples/layeredeffects/LatticeEff.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 34,
"end_line": 199,
"start_col": 0,
"start_line": 199
} | module LatticeEff
open FStar.Tactics.V2
open FStar.List.Tot
open FStar.All
module H = FStar.Heap
// GM: Force a type equality by SMT
let coerce #a #b (x:a{a == b}) : b = x
let unreachable #a () : Pure a (requires False) (ensures (fun _ -> False)) = coerce "whatever"
type eff_label =
// GM: Can we do this one? ALL... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.List.Tot.Properties.fst.checked",
"FStar.List.Tot.fst.checked",
"FStar.Heap.fst.checked",
"FStar.Classical.fsti.ch... | [
{
"abbrev": true,
"full_module": "FStar.Heap",
"short_module": "H"
},
{
"abbrev": false,
"full_module": "FStar.All",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.Tot",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Ta... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"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 -> LatticeEff.EFF Prims.int | LatticeEff.EFF | [] | [] | [
"Prims.list",
"LatticeEff.eff_label",
"Prims.unit",
"Prims.int"
] | [] | false | true | false | false | false | let g #labs () : EFF int labs =
| 42 | false |
LatticeEff.fst | LatticeEff.test0 | val test0 (r: ref int) (x y: int) : EFF int [EXN] | val test0 (r: ref int) (x y: int) : EFF int [EXN] | let test0 (r:ref int) (x y : int) : EFF int [EXN] =
let z = !r in
if x + z > 0
then raise (Failure "nope")
else y - z | {
"file_name": "examples/layeredeffects/LatticeEff.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 12,
"end_line": 166,
"start_col": 0,
"start_line": 162
} | module LatticeEff
open FStar.Tactics.V2
open FStar.List.Tot
open FStar.All
module H = FStar.Heap
// GM: Force a type equality by SMT
let coerce #a #b (x:a{a == b}) : b = x
let unreachable #a () : Pure a (requires False) (ensures (fun _ -> False)) = coerce "whatever"
type eff_label =
// GM: Can we do this one? ALL... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Monotonic.Pure.fst.checked",
"FStar.List.Tot.Properties.fst.checked",
"FStar.List.Tot.fst.checked",
"FStar.Heap.fst.checked",
"FStar.Classical.fsti.ch... | [
{
"abbrev": true,
"full_module": "FStar.Heap",
"short_module": "H"
},
{
"abbrev": false,
"full_module": "FStar.All",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.Tot",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Ta... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | r: FStar.ST.ref Prims.int -> x: Prims.int -> y: Prims.int -> LatticeEff.EFF Prims.int | LatticeEff.EFF | [] | [] | [
"FStar.ST.ref",
"Prims.int",
"Prims.op_GreaterThan",
"Prims.op_Addition",
"LatticeEff.raise",
"FStar.All.Failure",
"Prims.bool",
"Prims.op_Subtraction",
"LatticeEff.op_Bang",
"Prims.Cons",
"LatticeEff.eff_label",
"LatticeEff.EXN",
"Prims.Nil"
] | [] | false | true | false | false | false | let test0 (r: ref int) (x y: int) : EFF int [EXN] =
| let z = !r in
if x + z > 0 then raise (Failure "nope") else y - z | false |
Steel.HigherReference.fst | Steel.HigherReference.ghost_share | val ghost_share (#a:Type) (#u:_)
(#p:perm)
(#x:erased a)
(r:ghost_ref a)
: SteelGhostT unit u
(ghost_pts_to r p x)
(fun _ -> ghost_pts_to r (half_perm p) x `star`
ghost_pts_to r (half_perm p) x) | val ghost_share (#a:Type) (#u:_)
(#p:perm)
(#x:erased a)
(r:ghost_ref a)
: SteelGhostT unit u
(ghost_pts_to r p x)
(fun _ -> ghost_pts_to r (half_perm p) x `star`
ghost_pts_to r (half_perm p) x) | let ghost_share r = share (reveal r) | {
"file_name": "lib/steel/Steel.HigherReference.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 36,
"end_line": 440,
"start_col": 0,
"start_line": 440
} | (*
Copyright 2020 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"Steel.PCMReference.fsti.checked",
"Steel.PCMFrac.fst.checked",
"Steel.Memory.fsti.checked",
"Steel.Effect.Atomic.fsti.checked",
"Steel.Effect.fsti.checked",
"prims.fst.checked",
"FStar.Real.fsti.checked",
"FStar.Pervasives.Native.fst.checked"... | [
{
"abbrev": true,
"full_module": "Steel.Memory",
"short_module": "Mem"
},
{
"abbrev": true,
"full_module": "Steel.PCMReference",
"short_module": "RP"
},
{
"abbrev": false,
"full_module": "FStar.Real",
"short_module": null
},
{
"abbrev": false,
"full_module": "... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | r: Steel.HigherReference.ghost_ref a -> Steel.Effect.Atomic.SteelGhostT Prims.unit | Steel.Effect.Atomic.SteelGhostT | [] | [] | [
"Steel.Memory.inames",
"Steel.FractionalPermission.perm",
"FStar.Ghost.erased",
"Steel.HigherReference.ghost_ref",
"Steel.HigherReference.share",
"FStar.Ghost.reveal",
"Steel.HigherReference.ref",
"Prims.unit"
] | [] | false | true | false | false | false | let ghost_share r =
| share (reveal r) | false |
Steel.HigherReference.fst | Steel.HigherReference.ghost_share_gen | val ghost_share_gen (#a:Type) (#u:_)
(#p:perm)
(#x:erased a)
(r:ghost_ref a)
(p1 p2: perm)
: SteelGhost unit u
(ghost_pts_to r p x)
(fun _ -> ghost_pts_to r p1 x `star`
ghost_pts_to r p2 x)
(fun _ -> p == p1 `sum_perm` p2)
(fun... | val ghost_share_gen (#a:Type) (#u:_)
(#p:perm)
(#x:erased a)
(r:ghost_ref a)
(p1 p2: perm)
: SteelGhost unit u
(ghost_pts_to r p x)
(fun _ -> ghost_pts_to r p1 x `star`
ghost_pts_to r p2 x)
(fun _ -> p == p1 `sum_perm` p2)
(fun... | let ghost_share_gen r p1 p2 = share_gen (reveal r) p1 p2 | {
"file_name": "lib/steel/Steel.HigherReference.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 56,
"end_line": 439,
"start_col": 0,
"start_line": 439
} | (*
Copyright 2020 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"Steel.PCMReference.fsti.checked",
"Steel.PCMFrac.fst.checked",
"Steel.Memory.fsti.checked",
"Steel.Effect.Atomic.fsti.checked",
"Steel.Effect.fsti.checked",
"prims.fst.checked",
"FStar.Real.fsti.checked",
"FStar.Pervasives.Native.fst.checked"... | [
{
"abbrev": true,
"full_module": "Steel.Memory",
"short_module": "Mem"
},
{
"abbrev": true,
"full_module": "Steel.PCMReference",
"short_module": "RP"
},
{
"abbrev": false,
"full_module": "FStar.Real",
"short_module": null
},
{
"abbrev": false,
"full_module": "... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
r: Steel.HigherReference.ghost_ref a ->
p1: Steel.FractionalPermission.perm ->
p2: Steel.FractionalPermission.perm
-> Steel.Effect.Atomic.SteelGhost Prims.unit | Steel.Effect.Atomic.SteelGhost | [] | [] | [
"Steel.Memory.inames",
"Steel.FractionalPermission.perm",
"FStar.Ghost.erased",
"Steel.HigherReference.ghost_ref",
"Steel.HigherReference.share_gen",
"FStar.Ghost.reveal",
"Steel.HigherReference.ref",
"Prims.unit"
] | [] | false | true | false | false | false | let ghost_share_gen r p1 p2 =
| share_gen (reveal r) p1 p2 | false |
Steel.HigherReference.fst | Steel.HigherReference.ghost_gather | val ghost_gather (#a:Type) (#u:_)
(#p0 #p1:perm)
(#x0 #x1:erased a)
(r:ghost_ref a)
: SteelGhost unit u
(ghost_pts_to r p0 x0 `star`
ghost_pts_to r p1 x1)
(fun _ -> ghost_pts_to r (sum_perm p0 p1) x0)
(requires fun _ -> True)
(ensures fun _ _ _ -... | val ghost_gather (#a:Type) (#u:_)
(#p0 #p1:perm)
(#x0 #x1:erased a)
(r:ghost_ref a)
: SteelGhost unit u
(ghost_pts_to r p0 x0 `star`
ghost_pts_to r p1 x1)
(fun _ -> ghost_pts_to r (sum_perm p0 p1) x0)
(requires fun _ -> True)
(ensures fun _ _ _ -... | let ghost_gather r = gather (reveal r) | {
"file_name": "lib/steel/Steel.HigherReference.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 38,
"end_line": 441,
"start_col": 0,
"start_line": 441
} | (*
Copyright 2020 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"Steel.PCMReference.fsti.checked",
"Steel.PCMFrac.fst.checked",
"Steel.Memory.fsti.checked",
"Steel.Effect.Atomic.fsti.checked",
"Steel.Effect.fsti.checked",
"prims.fst.checked",
"FStar.Real.fsti.checked",
"FStar.Pervasives.Native.fst.checked"... | [
{
"abbrev": true,
"full_module": "Steel.Memory",
"short_module": "Mem"
},
{
"abbrev": true,
"full_module": "Steel.PCMReference",
"short_module": "RP"
},
{
"abbrev": false,
"full_module": "FStar.Real",
"short_module": null
},
{
"abbrev": false,
"full_module": "... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | r: Steel.HigherReference.ghost_ref a -> Steel.Effect.Atomic.SteelGhost Prims.unit | Steel.Effect.Atomic.SteelGhost | [] | [] | [
"Steel.Memory.inames",
"Steel.FractionalPermission.perm",
"FStar.Ghost.erased",
"Steel.HigherReference.ghost_ref",
"Steel.HigherReference.gather",
"FStar.Ghost.reveal",
"Steel.HigherReference.ref",
"Prims.unit"
] | [] | false | true | false | false | false | let ghost_gather r =
| gather (reveal r) | false |
Steel.HigherReference.fst | Steel.HigherReference.ghost_pts_to_injective_eq | val ghost_pts_to_injective_eq (#a:_) (#u:_) (#p #q:_) (r:ghost_ref a) (v0 v1:Ghost.erased a)
: SteelGhost unit u
(ghost_pts_to r p v0 `star` ghost_pts_to r q v1)
(fun _ -> ghost_pts_to r p v0 `star` ghost_pts_to r q v0)
(requires fun _ -> True)
(ensures fun _ _ _ -> v0 == v1) | val ghost_pts_to_injective_eq (#a:_) (#u:_) (#p #q:_) (r:ghost_ref a) (v0 v1:Ghost.erased a)
: SteelGhost unit u
(ghost_pts_to r p v0 `star` ghost_pts_to r q v1)
(fun _ -> ghost_pts_to r p v0 `star` ghost_pts_to r q v0)
(requires fun _ -> True)
(ensures fun _ _ _ -> v0 == v1) | let ghost_pts_to_injective_eq #_ #_ #p0 #p1 r v0 v1 =
higher_ref_pts_to_injective_eq #_ #_ #p0 #p1 #v0 #v1 (reveal r) | {
"file_name": "lib/steel/Steel.HigherReference.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 65,
"end_line": 444,
"start_col": 0,
"start_line": 443
} | (*
Copyright 2020 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"Steel.PCMReference.fsti.checked",
"Steel.PCMFrac.fst.checked",
"Steel.Memory.fsti.checked",
"Steel.Effect.Atomic.fsti.checked",
"Steel.Effect.fsti.checked",
"prims.fst.checked",
"FStar.Real.fsti.checked",
"FStar.Pervasives.Native.fst.checked"... | [
{
"abbrev": true,
"full_module": "Steel.Memory",
"short_module": "Mem"
},
{
"abbrev": true,
"full_module": "Steel.PCMReference",
"short_module": "RP"
},
{
"abbrev": false,
"full_module": "FStar.Real",
"short_module": null
},
{
"abbrev": false,
"full_module": "... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | r: Steel.HigherReference.ghost_ref a -> v0: FStar.Ghost.erased a -> v1: FStar.Ghost.erased a
-> Steel.Effect.Atomic.SteelGhost Prims.unit | Steel.Effect.Atomic.SteelGhost | [] | [] | [
"Steel.Memory.inames",
"Steel.FractionalPermission.perm",
"Steel.HigherReference.ghost_ref",
"FStar.Ghost.erased",
"Steel.HigherReference.higher_ref_pts_to_injective_eq",
"FStar.Ghost.reveal",
"Steel.HigherReference.ref",
"Prims.unit"
] | [] | false | true | false | false | false | let ghost_pts_to_injective_eq #_ #_ #p0 #p1 r v0 v1 =
| higher_ref_pts_to_injective_eq #_ #_ #p0 #p1 #v0 #v1 (reveal r) | false |
SteelFramingTestSuite.fst | SteelFramingTestSuite.test_if10 | val test_if10 (b: bool) (r1 r2 r3: ref)
: SteelT unit
(((ptr r1) `star` (ptr r2)) `star` (ptr r3))
(fun _ -> ((ptr r1) `star` (ptr r2)) `star` (ptr r3)) | val test_if10 (b: bool) (r1 r2 r3: ref)
: SteelT unit
(((ptr r1) `star` (ptr r2)) `star` (ptr r3))
(fun _ -> ((ptr r1) `star` (ptr r2)) `star` (ptr r3)) | let test_if10 (b:bool) (r1 r2 r3: ref) : SteelT unit
(ptr r1 `star` ptr r2 `star` ptr r3)
(fun _ -> ptr r1 `star` ptr r2 `star` ptr r3)
= if b then (write r1 0; write r2 0) else (write r2 0; write r1 0);
write r2 0 | {
"file_name": "share/steel/tests/SteelFramingTestSuite.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 14,
"end_line": 161,
"start_col": 0,
"start_line": 157
} | (*
Copyright 2020 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"Steel.Memory.fsti.checked",
"Steel.Effect.Atomic.fsti.checked",
"Steel.Effect.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": false,
"source_file": "SteelFramingTestSuite.fst"
} | [
{
"abbrev": false,
"full_module": "Steel.Effect.Atomic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Steel.Effect",
"short_module": null
},
{
"abbrev": false,
"full_module": "Steel.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
b: Prims.bool ->
r1: SteelFramingTestSuite.ref ->
r2: SteelFramingTestSuite.ref ->
r3: SteelFramingTestSuite.ref
-> Steel.Effect.SteelT Prims.unit | Steel.Effect.SteelT | [] | [] | [
"Prims.bool",
"SteelFramingTestSuite.ref",
"SteelFramingTestSuite.write",
"Prims.unit",
"Steel.Effect.Common.star",
"SteelFramingTestSuite.ptr",
"Steel.Effect.Common.vprop"
] | [] | false | true | false | false | false | let test_if10 (b: bool) (r1 r2 r3: ref)
: SteelT unit
(((ptr r1) `star` (ptr r2)) `star` (ptr r3))
(fun _ -> ((ptr r1) `star` (ptr r2)) `star` (ptr r3)) =
| if b
then
(write r1 0;
write r2 0)
else
(write r2 0;
write r1 0);
write r2 0 | false |
Steel.HigherReference.fst | Steel.HigherReference.ghost_alloc | val ghost_alloc (#a:Type) (#u:_) (x:erased a)
: SteelGhostT (ghost_ref a) u
emp
(fun r -> ghost_pts_to r full_perm x) | val ghost_alloc (#a:Type) (#u:_) (x:erased a)
: SteelGhostT (ghost_ref a) u
emp
(fun r -> ghost_pts_to r full_perm x) | let ghost_alloc x =
let r = ghost_alloc_aux (reveal x) in
hide r | {
"file_name": "lib/steel/Steel.HigherReference.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 8,
"end_line": 427,
"start_col": 0,
"start_line": 425
} | (*
Copyright 2020 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"Steel.PCMReference.fsti.checked",
"Steel.PCMFrac.fst.checked",
"Steel.Memory.fsti.checked",
"Steel.Effect.Atomic.fsti.checked",
"Steel.Effect.fsti.checked",
"prims.fst.checked",
"FStar.Real.fsti.checked",
"FStar.Pervasives.Native.fst.checked"... | [
{
"abbrev": true,
"full_module": "Steel.Memory",
"short_module": "Mem"
},
{
"abbrev": true,
"full_module": "Steel.PCMReference",
"short_module": "RP"
},
{
"abbrev": false,
"full_module": "FStar.Real",
"short_module": null
},
{
"abbrev": false,
"full_module": "... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | x: FStar.Ghost.erased a -> Steel.Effect.Atomic.SteelGhostT (Steel.HigherReference.ghost_ref a) | Steel.Effect.Atomic.SteelGhostT | [] | [] | [
"Steel.Memory.inames",
"FStar.Ghost.erased",
"FStar.Ghost.hide",
"Steel.HigherReference.ref",
"Steel.HigherReference.ghost_ref",
"Steel.HigherReference.ghost_alloc_aux",
"FStar.Ghost.reveal"
] | [] | false | true | false | false | false | let ghost_alloc x =
| let r = ghost_alloc_aux (reveal x) in
hide r | false |
DoublyLinkedListIface.fst | DoublyLinkedListIface.node | val node (a:Type0) : Type0 | val node (a:Type0) : Type0 | let node a = B.pointer (DLL.node a) | {
"file_name": "examples/doublylinkedlist/DoublyLinkedListIface.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 35,
"end_line": 48,
"start_col": 0,
"start_line": 48
} | (*
Copyright 2008-2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Pure.fst.checked",
"FStar.HyperStack.ST.fsti.c... | [
{
"abbrev": false,
"full_module": "LowStar.BufferOps",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.List.Pure",
"short_module": "L"
},
{
"abbrev": true,
"full_module": "FStar.Ghost",
"short_module": "G"
},
{
"abbrev": true,
"full_module": "D... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: Type0 -> Type0 | Prims.Tot | [
"total"
] | [] | [
"LowStar.Buffer.pointer",
"DoublyLinkedList.node"
] | [] | false | false | false | true | true | let node a =
| B.pointer (DLL.node a) | false |
DoublyLinkedListIface.fst | DoublyLinkedListIface.dll | val dll (a:Type0) : Type0 | val dll (a:Type0) : Type0 | let dll a = B.pointer (DLL.dll a) | {
"file_name": "examples/doublylinkedlist/DoublyLinkedListIface.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 33,
"end_line": 49,
"start_col": 0,
"start_line": 49
} | (*
Copyright 2008-2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Pure.fst.checked",
"FStar.HyperStack.ST.fsti.c... | [
{
"abbrev": false,
"full_module": "LowStar.BufferOps",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.List.Pure",
"short_module": "L"
},
{
"abbrev": true,
"full_module": "FStar.Ghost",
"short_module": "G"
},
{
"abbrev": true,
"full_module": "D... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: Type0 -> Type0 | Prims.Tot | [
"total"
] | [] | [
"LowStar.Buffer.pointer",
"DoublyLinkedList.dll"
] | [] | false | false | false | true | true | let dll a =
| B.pointer (DLL.dll a) | false |
DoublyLinkedListIface.fst | DoublyLinkedListIface.dll_valid | val dll_valid (h:HS.mem) (d:dll 'a) : prop | val dll_valid (h:HS.mem) (d:dll 'a) : prop | let dll_valid h d =
B.live h d /\
DLL.dll_valid h (d@h) /\
B.loc_buffer d `B.loc_disjoint` DLL.dll_fp0 (d@h) | {
"file_name": "examples/doublylinkedlist/DoublyLinkedListIface.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 51,
"end_line": 58,
"start_col": 0,
"start_line": 55
} | (*
Copyright 2008-2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Pure.fst.checked",
"FStar.HyperStack.ST.fsti.c... | [
{
"abbrev": false,
"full_module": "LowStar.BufferOps",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.List.Pure",
"short_module": "L"
},
{
"abbrev": true,
"full_module": "FStar.Ghost",
"short_module": "G"
},
{
"abbrev": true,
"full_module": "D... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"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 -> d: DoublyLinkedListIface.dll 'a -> Prims.prop | Prims.Tot | [
"total"
] | [] | [
"FStar.Monotonic.HyperStack.mem",
"DoublyLinkedListIface.dll",
"Prims.l_and",
"LowStar.Monotonic.Buffer.live",
"DoublyLinkedList.dll",
"LowStar.Buffer.trivial_preorder",
"DoublyLinkedList.dll_valid",
"DoublyLinkedListIface.op_At",
"LowStar.Monotonic.Buffer.loc_disjoint",
"LowStar.Monotonic.Buffer.... | [] | false | false | false | true | true | let dll_valid h d =
| B.live h d /\ DLL.dll_valid h (d @ h) /\ (B.loc_buffer d) `B.loc_disjoint` (DLL.dll_fp0 (d @ h)) | false |
DoublyLinkedListIface.fst | DoublyLinkedListIface.node_valid | val node_valid (h:HS.mem) (n:node 'a) : prop | val node_valid (h:HS.mem) (n:node 'a) : prop | let node_valid h n = True /\ B.live h n | {
"file_name": "examples/doublylinkedlist/DoublyLinkedListIface.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 39,
"end_line": 53,
"start_col": 0,
"start_line": 53
} | (*
Copyright 2008-2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Pure.fst.checked",
"FStar.HyperStack.ST.fsti.c... | [
{
"abbrev": false,
"full_module": "LowStar.BufferOps",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.List.Pure",
"short_module": "L"
},
{
"abbrev": true,
"full_module": "FStar.Ghost",
"short_module": "G"
},
{
"abbrev": true,
"full_module": "D... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"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 -> n: DoublyLinkedListIface.node 'a -> Prims.prop | Prims.Tot | [
"total"
] | [] | [
"FStar.Monotonic.HyperStack.mem",
"DoublyLinkedListIface.node",
"Prims.l_and",
"Prims.l_True",
"LowStar.Monotonic.Buffer.live",
"DoublyLinkedList.node",
"LowStar.Buffer.trivial_preorder",
"Prims.prop"
] | [] | false | false | false | true | true | let node_valid h n =
| True /\ B.live h n | false |
DoublyLinkedListIface.fst | DoublyLinkedListIface.fp_node | val fp_node (n:node 'a) : GTot B.loc | val fp_node (n:node 'a) : GTot B.loc | let fp_node n = B.loc_buffer n | {
"file_name": "examples/doublylinkedlist/DoublyLinkedListIface.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 30,
"end_line": 62,
"start_col": 0,
"start_line": 62
} | (*
Copyright 2008-2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Pure.fst.checked",
"FStar.HyperStack.ST.fsti.c... | [
{
"abbrev": false,
"full_module": "LowStar.BufferOps",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.List.Pure",
"short_module": "L"
},
{
"abbrev": true,
"full_module": "FStar.Ghost",
"short_module": "G"
},
{
"abbrev": true,
"full_module": "D... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | n: DoublyLinkedListIface.node 'a -> Prims.GTot LowStar.Monotonic.Buffer.loc | Prims.GTot | [
"sometrivial"
] | [] | [
"DoublyLinkedListIface.node",
"LowStar.Monotonic.Buffer.loc_buffer",
"DoublyLinkedList.node",
"LowStar.Buffer.trivial_preorder",
"LowStar.Monotonic.Buffer.loc"
] | [] | false | false | false | false | false | let fp_node n =
| B.loc_buffer n | false |
DoublyLinkedListIface.fst | DoublyLinkedListIface.fp_dll | val fp_dll (h:HS.mem) (d:dll 'a) : GTot B.loc | val fp_dll (h:HS.mem) (d:dll 'a) : GTot B.loc | let fp_dll h d =
B.loc_union (B.loc_buffer d) (DLL.dll_fp0 (d@h)) | {
"file_name": "examples/doublylinkedlist/DoublyLinkedListIface.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 50,
"end_line": 65,
"start_col": 0,
"start_line": 64
} | (*
Copyright 2008-2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Pure.fst.checked",
"FStar.HyperStack.ST.fsti.c... | [
{
"abbrev": false,
"full_module": "LowStar.BufferOps",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.List.Pure",
"short_module": "L"
},
{
"abbrev": true,
"full_module": "FStar.Ghost",
"short_module": "G"
},
{
"abbrev": true,
"full_module": "D... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"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 -> d: DoublyLinkedListIface.dll 'a
-> Prims.GTot LowStar.Monotonic.Buffer.loc | Prims.GTot | [
"sometrivial"
] | [] | [
"FStar.Monotonic.HyperStack.mem",
"DoublyLinkedListIface.dll",
"LowStar.Monotonic.Buffer.loc_union",
"LowStar.Monotonic.Buffer.loc_buffer",
"DoublyLinkedList.dll",
"LowStar.Buffer.trivial_preorder",
"DoublyLinkedList.dll_fp0",
"DoublyLinkedListIface.op_At",
"LowStar.Monotonic.Buffer.loc"
] | [] | false | false | false | false | false | let fp_dll h d =
| B.loc_union (B.loc_buffer d) (DLL.dll_fp0 (d @ h)) | false |
DoublyLinkedListIface.fst | DoublyLinkedListIface.g_node_val | val g_node_val (h:HS.mem) (n:node 'a) : GTot 'a | val g_node_val (h:HS.mem) (n:node 'a) : GTot 'a | let g_node_val h n =
(n@h).DLL.p | {
"file_name": "examples/doublylinkedlist/DoublyLinkedListIface.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 13,
"end_line": 70,
"start_col": 0,
"start_line": 69
} | (*
Copyright 2008-2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Pure.fst.checked",
"FStar.HyperStack.ST.fsti.c... | [
{
"abbrev": false,
"full_module": "LowStar.BufferOps",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.List.Pure",
"short_module": "L"
},
{
"abbrev": true,
"full_module": "FStar.Ghost",
"short_module": "G"
},
{
"abbrev": true,
"full_module": "D... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"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 -> n: DoublyLinkedListIface.node 'a -> Prims.GTot 'a | Prims.GTot | [
"sometrivial"
] | [] | [
"FStar.Monotonic.HyperStack.mem",
"DoublyLinkedListIface.node",
"DoublyLinkedList.__proj__Mknode__item__p",
"DoublyLinkedListIface.op_At",
"DoublyLinkedList.node"
] | [] | false | false | false | false | false | let g_node_val h n =
| (n @ h).DLL.p | false |
DoublyLinkedListIface.fst | DoublyLinkedListIface.unchanged_node_connections | val unchanged_node_connections (h0 h1:HS.mem) (n:node 'a) : GTot prop | val unchanged_node_connections (h0 h1:HS.mem) (n:node 'a) : GTot prop | let unchanged_node_connections h0 h1 n =
(n@h0).DLL.flink == (n@h1).DLL.flink /\
(n@h0).DLL.blink == (n@h1).DLL.blink | {
"file_name": "examples/doublylinkedlist/DoublyLinkedListIface.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 38,
"end_line": 83,
"start_col": 0,
"start_line": 81
} | (*
Copyright 2008-2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Pure.fst.checked",
"FStar.HyperStack.ST.fsti.c... | [
{
"abbrev": false,
"full_module": "LowStar.BufferOps",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.List.Pure",
"short_module": "L"
},
{
"abbrev": true,
"full_module": "FStar.Ghost",
"short_module": "G"
},
{
"abbrev": true,
"full_module": "D... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
h0: FStar.Monotonic.HyperStack.mem ->
h1: FStar.Monotonic.HyperStack.mem ->
n: DoublyLinkedListIface.node 'a
-> Prims.GTot Prims.prop | Prims.GTot | [
"sometrivial"
] | [] | [
"FStar.Monotonic.HyperStack.mem",
"DoublyLinkedListIface.node",
"Prims.l_and",
"Prims.eq2",
"LowStar.Buffer.pointer_or_null",
"DoublyLinkedList.node",
"DoublyLinkedList.__proj__Mknode__item__flink",
"DoublyLinkedListIface.op_At",
"DoublyLinkedList.__proj__Mknode__item__blink",
"Prims.prop"
] | [] | false | false | false | false | true | let unchanged_node_connections h0 h1 n =
| (n @ h0).DLL.flink == (n @ h1).DLL.flink /\ (n @ h0).DLL.blink == (n @ h1).DLL.blink | false |
DoublyLinkedListIface.fst | DoublyLinkedListIface.as_list | val as_list (h:HS.mem) (d:dll 'a) : GTot (list (node 'a)) | val as_list (h:HS.mem) (d:dll 'a) : GTot (list (node 'a)) | let as_list h d =
(d@h).DLL.nodes | {
"file_name": "examples/doublylinkedlist/DoublyLinkedListIface.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 17,
"end_line": 106,
"start_col": 0,
"start_line": 105
} | (*
Copyright 2008-2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Pure.fst.checked",
"FStar.HyperStack.ST.fsti.c... | [
{
"abbrev": false,
"full_module": "LowStar.BufferOps",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.List.Pure",
"short_module": "L"
},
{
"abbrev": true,
"full_module": "FStar.Ghost",
"short_module": "G"
},
{
"abbrev": true,
"full_module": "D... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"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 -> d: DoublyLinkedListIface.dll 'a
-> Prims.GTot (Prims.list (DoublyLinkedListIface.node 'a)) | Prims.GTot | [
"sometrivial"
] | [] | [
"FStar.Monotonic.HyperStack.mem",
"DoublyLinkedListIface.dll",
"FStar.Ghost.reveal",
"DoublyLinkedList.nodelist",
"DoublyLinkedList.__proj__Mkdll__item__nodes",
"DoublyLinkedListIface.op_At",
"DoublyLinkedList.dll",
"Prims.list",
"DoublyLinkedListIface.node"
] | [] | false | false | false | false | false | let as_list h d =
| (d @ h).DLL.nodes | false |
DoublyLinkedListIface.fst | DoublyLinkedListIface.unchanged_node_val | val unchanged_node_val (h0 h1: HS.mem) (n: node 'a) : GTot prop | val unchanged_node_val (h0 h1: HS.mem) (n: node 'a) : GTot prop | let unchanged_node_val (h0 h1:HS.mem) (n:node 'a) : GTot prop =
(B.live h0 n ==>
(g_node_val h0 n == g_node_val h1 n /\ B.live h1 n)) | {
"file_name": "examples/doublylinkedlist/DoublyLinkedListIface.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 55,
"end_line": 96,
"start_col": 0,
"start_line": 94
} | (*
Copyright 2008-2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Pure.fst.checked",
"FStar.HyperStack.ST.fsti.c... | [
{
"abbrev": false,
"full_module": "LowStar.BufferOps",
"short_module": null
},
{
"abbrev": true,
"full_module": "LowStar.Buffer",
"short_module": "B"
},
{
"abbrev": true,
"full_module": "FStar.List.Pure",
"short_module": "L"
},
{
"abbrev": true,
"full_module":... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
h0: FStar.Monotonic.HyperStack.mem ->
h1: FStar.Monotonic.HyperStack.mem ->
n: DoublyLinkedListIface.node 'a
-> Prims.GTot Prims.prop | Prims.GTot | [
"sometrivial"
] | [] | [
"FStar.Monotonic.HyperStack.mem",
"DoublyLinkedListIface.node",
"Prims.l_imp",
"LowStar.Monotonic.Buffer.live",
"DoublyLinkedList.node",
"LowStar.Buffer.trivial_preorder",
"Prims.l_and",
"Prims.eq2",
"DoublyLinkedListIface.g_node_val",
"Prims.prop"
] | [] | false | false | false | false | true | let unchanged_node_val (h0 h1: HS.mem) (n: node 'a) : GTot prop =
| (B.live h0 n ==> (g_node_val h0 n == g_node_val h1 n /\ B.live h1 n)) | false |
DoublyLinkedListIface.fst | DoublyLinkedListIface.node_of | val node_of (v:'a) :
HST.StackInline (node 'a)
(requires (fun h0 -> True))
(ensures (fun h0 n h1 ->
B.modifies B.loc_none h0 h1 /\
B.fresh_loc (fp_node n) h0 h1 /\
node_valid h1 n /\
v == g_node_val h1 n)) | val node_of (v:'a) :
HST.StackInline (node 'a)
(requires (fun h0 -> True))
(ensures (fun h0 n h1 ->
B.modifies B.loc_none h0 h1 /\
B.fresh_loc (fp_node n) h0 h1 /\
node_valid h1 n /\
v == g_node_val h1 n)) | let node_of v =
B.alloca (DLL.empty_node v) 1ul | {
"file_name": "examples/doublylinkedlist/DoublyLinkedListIface.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 33,
"end_line": 76,
"start_col": 0,
"start_line": 75
} | (*
Copyright 2008-2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Pure.fst.checked",
"FStar.HyperStack.ST.fsti.c... | [
{
"abbrev": false,
"full_module": "LowStar.BufferOps",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.List.Pure",
"short_module": "L"
},
{
"abbrev": true,
"full_module": "FStar.Ghost",
"short_module": "G"
},
{
"abbrev": true,
"full_module": "D... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | v: 'a -> FStar.HyperStack.ST.StackInline (DoublyLinkedListIface.node 'a) | FStar.HyperStack.ST.StackInline | [] | [] | [
"LowStar.Buffer.alloca",
"DoublyLinkedList.node",
"DoublyLinkedList.empty_node",
"FStar.UInt32.__uint_to_t",
"LowStar.Monotonic.Buffer.mbuffer",
"LowStar.Buffer.trivial_preorder",
"Prims.l_and",
"Prims.eq2",
"Prims.nat",
"LowStar.Monotonic.Buffer.length",
"FStar.UInt32.v",
"Prims.b2t",
"Prim... | [] | false | true | false | false | false | let node_of v =
| B.alloca (DLL.empty_node v) 1ul | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.