effect
stringclasses 48
values | original_source_type
stringlengths 0
23k
| opens_and_abbrevs
listlengths 2
92
| isa_cross_project_example
bool 1
class | source_definition
stringlengths 9
57.9k
| partial_definition
stringlengths 7
23.3k
| is_div
bool 2
classes | is_type
null | is_proof
bool 2
classes | completed_definiton
stringlengths 1
250k
| dependencies
dict | effect_flags
sequencelengths 0
2
| ideal_premises
sequencelengths 0
236
| mutual_with
sequencelengths 0
11
| file_context
stringlengths 0
407k
| interleaved
bool 1
class | is_simply_typed
bool 2
classes | file_name
stringlengths 5
48
| vconfig
dict | is_simple_lemma
null | source_type
stringlengths 10
23k
| proof_features
sequencelengths 0
1
| name
stringlengths 8
95
| source
dict | verbose_type
stringlengths 1
7.42k
| source_range
dict |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
FStar.HyperStack.ST.Stack | val sum_state:
st:state
-> ost:state ->
Stack unit
(requires fun h -> live h st /\ live h ost /\ eq_or_disjoint st ost)
(ensures fun h0 _ h1 -> modifies (loc st) h0 h1 /\
as_seq h1 st == Lib.Sequence.map2 (+.) (as_seq h0 st) (as_seq h0 ost)) | [
{
"abbrev": true,
"full_module": "Spec.Salsa20",
"short_module": "Spec"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Lib.ByteBuffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Buffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack.All",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Impl.Salsa20",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Impl.Salsa20",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let sum_state st ost = map2T #MUT #MUT #uint32 #uint32 #uint32 (size 16) st ( +. ) st ost | val sum_state:
st:state
-> ost:state ->
Stack unit
(requires fun h -> live h st /\ live h ost /\ eq_or_disjoint st ost)
(ensures fun h0 _ h1 -> modifies (loc st) h0 h1 /\
as_seq h1 st == Lib.Sequence.map2 (+.) (as_seq h0 st) (as_seq h0 ost))
let sum_state st ost = | true | null | false | map2T #MUT #MUT #uint32 #uint32 #uint32 (size 16) st ( +. ) st ost | {
"checked_file": "Hacl.Impl.Salsa20.Core32.fst.checked",
"dependencies": [
"Spec.Salsa20.fst.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Lib.ByteBuffer.fsti.checked",
"Lib.Buffer.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.HyperStack.ST.fsti.checked",
"FStar.HyperStack.All.fst.checked",
"FStar.HyperStack.fst.checked"
],
"interface_file": false,
"source_file": "Hacl.Impl.Salsa20.Core32.fst"
} | [] | [
"Hacl.Impl.Salsa20.Core32.state",
"Lib.Buffer.map2T",
"Lib.Buffer.MUT",
"Lib.IntTypes.uint32",
"Lib.IntTypes.size",
"Lib.IntTypes.op_Plus_Dot",
"Lib.IntTypes.U32",
"Lib.IntTypes.SEC",
"Prims.unit"
] | [] | module Hacl.Impl.Salsa20.Core32
open FStar.HyperStack
open FStar.HyperStack.All
open Lib.IntTypes
open Lib.Sequence
open Lib.Buffer
open Lib.ByteBuffer
module ST = FStar.HyperStack.ST
module Spec = Spec.Salsa20
let state = lbuffer uint32 16ul
let index = i:size_t{size_v i < 16}
inline_for_extraction
val create_state: unit ->
StackInline state
(requires fun h -> True)
(ensures fun h0 r h1 -> live h1 r /\
as_seq h1 r == Seq.create 16 (u32 0) /\
stack_allocated r h0 h1 (Seq.create 16 (u32 0)))
let create_state () = create (size 16) (u32 0)
inline_for_extraction
val load_state:
st:state
-> b:lbuffer uint8 64ul ->
Stack unit
(requires fun h -> live h st /\ live h b /\ disjoint st b)
(ensures fun h0 _ h1 -> modifies (loc st) h0 h1 /\
as_seq h1 st == Lib.ByteSequence.uints_from_bytes_le (as_seq h0 b))
let load_state st b =
uints_from_bytes_le st b
inline_for_extraction
val store_state:
b:lbuffer uint8 64ul
-> st:state ->
Stack unit
(requires fun h -> live h st /\ live h b /\ disjoint st b)
(ensures fun h0 _ h1 -> modifies (loc b) h0 h1 /\
as_seq h1 b == Lib.ByteSequence.uints_to_bytes_le (as_seq h0 st))
let store_state st b =
uints_to_bytes_le 16ul st b
inline_for_extraction
val set_counter:
st:state
-> c:size_t ->
Stack unit
(requires fun h -> live h st)
(ensures fun h0 _ h1 -> modifies (loc st) h0 h1 /\
as_seq h1 st == Seq.upd (as_seq h0 st) 8 (size_to_uint32 c))
let set_counter st c =
st.(size 8) <- size_to_uint32 c
inline_for_extraction
val copy_state:
st:state
-> ost:state ->
Stack unit
(requires fun h -> live h st /\ live h ost /\ disjoint st ost)
(ensures fun h0 _ h1 -> modifies (loc st) h0 h1 /\
as_seq h1 st == as_seq h0 ost)
let copy_state st ost = copy #MUT #uint32 #(size 16) st ost
inline_for_extraction
val sum_state:
st:state
-> ost:state ->
Stack unit
(requires fun h -> live h st /\ live h ost /\ eq_or_disjoint st ost)
(ensures fun h0 _ h1 -> modifies (loc st) h0 h1 /\
as_seq h1 st == Lib.Sequence.map2 (+.) (as_seq h0 st) (as_seq h0 ost)) | false | false | Hacl.Impl.Salsa20.Core32.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_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val sum_state:
st:state
-> ost:state ->
Stack unit
(requires fun h -> live h st /\ live h ost /\ eq_or_disjoint st ost)
(ensures fun h0 _ h1 -> modifies (loc st) h0 h1 /\
as_seq h1 st == Lib.Sequence.map2 (+.) (as_seq h0 st) (as_seq h0 ost)) | [] | Hacl.Impl.Salsa20.Core32.sum_state | {
"file_name": "code/salsa20/Hacl.Impl.Salsa20.Core32.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | st: Hacl.Impl.Salsa20.Core32.state -> ost: Hacl.Impl.Salsa20.Core32.state
-> FStar.HyperStack.ST.Stack Prims.unit | {
"end_col": 89,
"end_line": 90,
"start_col": 23,
"start_line": 90
} |
FStar.HyperStack.ST.Stack | val line:
st:state
-> a:index
-> b:index
-> d:index
-> r:rotval U32 ->
Stack unit
(requires fun h -> live h st /\ v a <> v d)
(ensures fun h0 _ h1 -> modifies (loc st) h0 h1 /\
as_seq h1 st == Spec.line (v a) (v b) (v d) r (as_seq h0 st)) | [
{
"abbrev": true,
"full_module": "Spec.Salsa20",
"short_module": "Spec"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Lib.ByteBuffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Buffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack.All",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Impl.Salsa20",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Impl.Salsa20",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let line st a b d r =
let sta = st.(a) in
let stb = st.(b) in
let std = st.(d) in
let sta = sta ^. ((stb +. std) <<<. r) in
st.(a) <- sta | val line:
st:state
-> a:index
-> b:index
-> d:index
-> r:rotval U32 ->
Stack unit
(requires fun h -> live h st /\ v a <> v d)
(ensures fun h0 _ h1 -> modifies (loc st) h0 h1 /\
as_seq h1 st == Spec.line (v a) (v b) (v d) r (as_seq h0 st))
let line st a b d r = | true | null | false | let sta = st.(a) in
let stb = st.(b) in
let std = st.(d) in
let sta = sta ^. ((stb +. std) <<<. r) in
st.(a) <- sta | {
"checked_file": "Hacl.Impl.Salsa20.Core32.fst.checked",
"dependencies": [
"Spec.Salsa20.fst.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Lib.ByteBuffer.fsti.checked",
"Lib.Buffer.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.HyperStack.ST.fsti.checked",
"FStar.HyperStack.All.fst.checked",
"FStar.HyperStack.fst.checked"
],
"interface_file": false,
"source_file": "Hacl.Impl.Salsa20.Core32.fst"
} | [] | [
"Hacl.Impl.Salsa20.Core32.state",
"Hacl.Impl.Salsa20.Core32.index",
"Lib.IntTypes.rotval",
"Lib.IntTypes.U32",
"Lib.Buffer.op_Array_Assignment",
"Lib.IntTypes.uint32",
"FStar.UInt32.__uint_to_t",
"Prims.unit",
"Lib.IntTypes.int_t",
"Lib.IntTypes.SEC",
"Lib.IntTypes.op_Hat_Dot",
"Lib.IntTypes.op_Less_Less_Less_Dot",
"Lib.IntTypes.op_Plus_Dot",
"Lib.Buffer.op_Array_Access",
"Lib.Buffer.MUT"
] | [] | module Hacl.Impl.Salsa20.Core32
open FStar.HyperStack
open FStar.HyperStack.All
open Lib.IntTypes
open Lib.Sequence
open Lib.Buffer
open Lib.ByteBuffer
module ST = FStar.HyperStack.ST
module Spec = Spec.Salsa20
let state = lbuffer uint32 16ul
let index = i:size_t{size_v i < 16}
inline_for_extraction
val create_state: unit ->
StackInline state
(requires fun h -> True)
(ensures fun h0 r h1 -> live h1 r /\
as_seq h1 r == Seq.create 16 (u32 0) /\
stack_allocated r h0 h1 (Seq.create 16 (u32 0)))
let create_state () = create (size 16) (u32 0)
inline_for_extraction
val load_state:
st:state
-> b:lbuffer uint8 64ul ->
Stack unit
(requires fun h -> live h st /\ live h b /\ disjoint st b)
(ensures fun h0 _ h1 -> modifies (loc st) h0 h1 /\
as_seq h1 st == Lib.ByteSequence.uints_from_bytes_le (as_seq h0 b))
let load_state st b =
uints_from_bytes_le st b
inline_for_extraction
val store_state:
b:lbuffer uint8 64ul
-> st:state ->
Stack unit
(requires fun h -> live h st /\ live h b /\ disjoint st b)
(ensures fun h0 _ h1 -> modifies (loc b) h0 h1 /\
as_seq h1 b == Lib.ByteSequence.uints_to_bytes_le (as_seq h0 st))
let store_state st b =
uints_to_bytes_le 16ul st b
inline_for_extraction
val set_counter:
st:state
-> c:size_t ->
Stack unit
(requires fun h -> live h st)
(ensures fun h0 _ h1 -> modifies (loc st) h0 h1 /\
as_seq h1 st == Seq.upd (as_seq h0 st) 8 (size_to_uint32 c))
let set_counter st c =
st.(size 8) <- size_to_uint32 c
inline_for_extraction
val copy_state:
st:state
-> ost:state ->
Stack unit
(requires fun h -> live h st /\ live h ost /\ disjoint st ost)
(ensures fun h0 _ h1 -> modifies (loc st) h0 h1 /\
as_seq h1 st == as_seq h0 ost)
let copy_state st ost = copy #MUT #uint32 #(size 16) st ost
inline_for_extraction
val sum_state:
st:state
-> ost:state ->
Stack unit
(requires fun h -> live h st /\ live h ost /\ eq_or_disjoint st ost)
(ensures fun h0 _ h1 -> modifies (loc st) h0 h1 /\
as_seq h1 st == Lib.Sequence.map2 (+.) (as_seq h0 st) (as_seq h0 ost))
let sum_state st ost = map2T #MUT #MUT #uint32 #uint32 #uint32 (size 16) st ( +. ) st ost
inline_for_extraction
val xor_block:
o:lbuffer uint8 64ul
-> st:state
-> b:lbuffer uint8 64ul ->
Stack unit
(requires fun h -> live h o /\ live h st /\ live h b)
(ensures fun h0 _ h1 -> modifies (loc o) h0 h1 /\
as_seq h1 o == Spec.xor_block (as_seq h0 st) (as_seq h0 b))
#set-options "--z3rlimit 100"
let xor_block o st b =
push_frame();
let bl = create_state() in
load_state bl b;
map2T (size 16) bl ( ^. ) bl st;
store_state o bl;
pop_frame()
inline_for_extraction
val line:
st:state
-> a:index
-> b:index
-> d:index
-> r:rotval U32 ->
Stack unit
(requires fun h -> live h st /\ v a <> v d)
(ensures fun h0 _ h1 -> modifies (loc st) h0 h1 /\
as_seq h1 st == Spec.line (v a) (v b) (v d) r (as_seq h0 st)) | false | false | Hacl.Impl.Salsa20.Core32.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_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 100,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val line:
st:state
-> a:index
-> b:index
-> d:index
-> r:rotval U32 ->
Stack unit
(requires fun h -> live h st /\ v a <> v d)
(ensures fun h0 _ h1 -> modifies (loc st) h0 h1 /\
as_seq h1 st == Spec.line (v a) (v b) (v d) r (as_seq h0 st)) | [] | Hacl.Impl.Salsa20.Core32.line | {
"file_name": "code/salsa20/Hacl.Impl.Salsa20.Core32.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
st: Hacl.Impl.Salsa20.Core32.state ->
a: Hacl.Impl.Salsa20.Core32.index ->
b: Hacl.Impl.Salsa20.Core32.index ->
d: Hacl.Impl.Salsa20.Core32.index ->
r: Lib.IntTypes.rotval Lib.IntTypes.U32
-> FStar.HyperStack.ST.Stack Prims.unit | {
"end_col": 15,
"end_line": 130,
"start_col": 21,
"start_line": 125
} |
FStar.HyperStack.ST.StackInline | val create_state: unit ->
StackInline state
(requires fun h -> True)
(ensures fun h0 r h1 -> live h1 r /\
as_seq h1 r == Seq.create 16 (u32 0) /\
stack_allocated r h0 h1 (Seq.create 16 (u32 0))) | [
{
"abbrev": true,
"full_module": "Spec.Salsa20",
"short_module": "Spec"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Lib.ByteBuffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Buffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack.All",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Impl.Salsa20",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Impl.Salsa20",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let create_state () = create (size 16) (u32 0) | val create_state: unit ->
StackInline state
(requires fun h -> True)
(ensures fun h0 r h1 -> live h1 r /\
as_seq h1 r == Seq.create 16 (u32 0) /\
stack_allocated r h0 h1 (Seq.create 16 (u32 0)))
let create_state () = | true | null | false | create (size 16) (u32 0) | {
"checked_file": "Hacl.Impl.Salsa20.Core32.fst.checked",
"dependencies": [
"Spec.Salsa20.fst.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Lib.ByteBuffer.fsti.checked",
"Lib.Buffer.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.HyperStack.ST.fsti.checked",
"FStar.HyperStack.All.fst.checked",
"FStar.HyperStack.fst.checked"
],
"interface_file": false,
"source_file": "Hacl.Impl.Salsa20.Core32.fst"
} | [] | [
"Prims.unit",
"Lib.Buffer.create",
"Lib.IntTypes.uint32",
"Lib.IntTypes.size",
"Lib.IntTypes.u32",
"Lib.Buffer.lbuffer",
"Hacl.Impl.Salsa20.Core32.state"
] | [] | module Hacl.Impl.Salsa20.Core32
open FStar.HyperStack
open FStar.HyperStack.All
open Lib.IntTypes
open Lib.Sequence
open Lib.Buffer
open Lib.ByteBuffer
module ST = FStar.HyperStack.ST
module Spec = Spec.Salsa20
let state = lbuffer uint32 16ul
let index = i:size_t{size_v i < 16}
inline_for_extraction
val create_state: unit ->
StackInline state
(requires fun h -> True)
(ensures fun h0 r h1 -> live h1 r /\
as_seq h1 r == Seq.create 16 (u32 0) /\
stack_allocated r h0 h1 (Seq.create 16 (u32 0))) | false | false | Hacl.Impl.Salsa20.Core32.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_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val create_state: unit ->
StackInline state
(requires fun h -> True)
(ensures fun h0 r h1 -> live h1 r /\
as_seq h1 r == Seq.create 16 (u32 0) /\
stack_allocated r h0 h1 (Seq.create 16 (u32 0))) | [] | Hacl.Impl.Salsa20.Core32.create_state | {
"file_name": "code/salsa20/Hacl.Impl.Salsa20.Core32.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | _: Prims.unit -> FStar.HyperStack.ST.StackInline Hacl.Impl.Salsa20.Core32.state | {
"end_col": 46,
"end_line": 27,
"start_col": 22,
"start_line": 27
} |
FStar.HyperStack.ST.Stack | val load_state:
st:state
-> b:lbuffer uint8 64ul ->
Stack unit
(requires fun h -> live h st /\ live h b /\ disjoint st b)
(ensures fun h0 _ h1 -> modifies (loc st) h0 h1 /\
as_seq h1 st == Lib.ByteSequence.uints_from_bytes_le (as_seq h0 b)) | [
{
"abbrev": true,
"full_module": "Spec.Salsa20",
"short_module": "Spec"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Lib.ByteBuffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Buffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack.All",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Impl.Salsa20",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Impl.Salsa20",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let load_state st b =
uints_from_bytes_le st b | val load_state:
st:state
-> b:lbuffer uint8 64ul ->
Stack unit
(requires fun h -> live h st /\ live h b /\ disjoint st b)
(ensures fun h0 _ h1 -> modifies (loc st) h0 h1 /\
as_seq h1 st == Lib.ByteSequence.uints_from_bytes_le (as_seq h0 b))
let load_state st b = | true | null | false | uints_from_bytes_le st b | {
"checked_file": "Hacl.Impl.Salsa20.Core32.fst.checked",
"dependencies": [
"Spec.Salsa20.fst.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Lib.ByteBuffer.fsti.checked",
"Lib.Buffer.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.HyperStack.ST.fsti.checked",
"FStar.HyperStack.All.fst.checked",
"FStar.HyperStack.fst.checked"
],
"interface_file": false,
"source_file": "Hacl.Impl.Salsa20.Core32.fst"
} | [] | [
"Hacl.Impl.Salsa20.Core32.state",
"Lib.Buffer.lbuffer",
"Lib.IntTypes.uint8",
"FStar.UInt32.__uint_to_t",
"Lib.ByteBuffer.uints_from_bytes_le",
"Lib.IntTypes.U32",
"Lib.IntTypes.SEC",
"Prims.unit"
] | [] | module Hacl.Impl.Salsa20.Core32
open FStar.HyperStack
open FStar.HyperStack.All
open Lib.IntTypes
open Lib.Sequence
open Lib.Buffer
open Lib.ByteBuffer
module ST = FStar.HyperStack.ST
module Spec = Spec.Salsa20
let state = lbuffer uint32 16ul
let index = i:size_t{size_v i < 16}
inline_for_extraction
val create_state: unit ->
StackInline state
(requires fun h -> True)
(ensures fun h0 r h1 -> live h1 r /\
as_seq h1 r == Seq.create 16 (u32 0) /\
stack_allocated r h0 h1 (Seq.create 16 (u32 0)))
let create_state () = create (size 16) (u32 0)
inline_for_extraction
val load_state:
st:state
-> b:lbuffer uint8 64ul ->
Stack unit
(requires fun h -> live h st /\ live h b /\ disjoint st b)
(ensures fun h0 _ h1 -> modifies (loc st) h0 h1 /\
as_seq h1 st == Lib.ByteSequence.uints_from_bytes_le (as_seq h0 b)) | false | false | Hacl.Impl.Salsa20.Core32.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_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val load_state:
st:state
-> b:lbuffer uint8 64ul ->
Stack unit
(requires fun h -> live h st /\ live h b /\ disjoint st b)
(ensures fun h0 _ h1 -> modifies (loc st) h0 h1 /\
as_seq h1 st == Lib.ByteSequence.uints_from_bytes_le (as_seq h0 b)) | [] | Hacl.Impl.Salsa20.Core32.load_state | {
"file_name": "code/salsa20/Hacl.Impl.Salsa20.Core32.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | st: Hacl.Impl.Salsa20.Core32.state -> b: Lib.Buffer.lbuffer Lib.IntTypes.uint8 64ul
-> FStar.HyperStack.ST.Stack Prims.unit | {
"end_col": 26,
"end_line": 40,
"start_col": 2,
"start_line": 40
} |
FStar.HyperStack.ST.Stack | val store_state:
b:lbuffer uint8 64ul
-> st:state ->
Stack unit
(requires fun h -> live h st /\ live h b /\ disjoint st b)
(ensures fun h0 _ h1 -> modifies (loc b) h0 h1 /\
as_seq h1 b == Lib.ByteSequence.uints_to_bytes_le (as_seq h0 st)) | [
{
"abbrev": true,
"full_module": "Spec.Salsa20",
"short_module": "Spec"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Lib.ByteBuffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Buffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack.All",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Impl.Salsa20",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Impl.Salsa20",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let store_state st b =
uints_to_bytes_le 16ul st b | val store_state:
b:lbuffer uint8 64ul
-> st:state ->
Stack unit
(requires fun h -> live h st /\ live h b /\ disjoint st b)
(ensures fun h0 _ h1 -> modifies (loc b) h0 h1 /\
as_seq h1 b == Lib.ByteSequence.uints_to_bytes_le (as_seq h0 st))
let store_state st b = | true | null | false | uints_to_bytes_le 16ul st b | {
"checked_file": "Hacl.Impl.Salsa20.Core32.fst.checked",
"dependencies": [
"Spec.Salsa20.fst.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Lib.ByteBuffer.fsti.checked",
"Lib.Buffer.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.HyperStack.ST.fsti.checked",
"FStar.HyperStack.All.fst.checked",
"FStar.HyperStack.fst.checked"
],
"interface_file": false,
"source_file": "Hacl.Impl.Salsa20.Core32.fst"
} | [] | [
"Lib.Buffer.lbuffer",
"Lib.IntTypes.uint8",
"FStar.UInt32.__uint_to_t",
"Hacl.Impl.Salsa20.Core32.state",
"Lib.ByteBuffer.uints_to_bytes_le",
"Lib.IntTypes.U32",
"Lib.IntTypes.SEC",
"Prims.unit"
] | [] | module Hacl.Impl.Salsa20.Core32
open FStar.HyperStack
open FStar.HyperStack.All
open Lib.IntTypes
open Lib.Sequence
open Lib.Buffer
open Lib.ByteBuffer
module ST = FStar.HyperStack.ST
module Spec = Spec.Salsa20
let state = lbuffer uint32 16ul
let index = i:size_t{size_v i < 16}
inline_for_extraction
val create_state: unit ->
StackInline state
(requires fun h -> True)
(ensures fun h0 r h1 -> live h1 r /\
as_seq h1 r == Seq.create 16 (u32 0) /\
stack_allocated r h0 h1 (Seq.create 16 (u32 0)))
let create_state () = create (size 16) (u32 0)
inline_for_extraction
val load_state:
st:state
-> b:lbuffer uint8 64ul ->
Stack unit
(requires fun h -> live h st /\ live h b /\ disjoint st b)
(ensures fun h0 _ h1 -> modifies (loc st) h0 h1 /\
as_seq h1 st == Lib.ByteSequence.uints_from_bytes_le (as_seq h0 b))
let load_state st b =
uints_from_bytes_le st b
inline_for_extraction
val store_state:
b:lbuffer uint8 64ul
-> st:state ->
Stack unit
(requires fun h -> live h st /\ live h b /\ disjoint st b)
(ensures fun h0 _ h1 -> modifies (loc b) h0 h1 /\
as_seq h1 b == Lib.ByteSequence.uints_to_bytes_le (as_seq h0 st)) | false | false | Hacl.Impl.Salsa20.Core32.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_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val store_state:
b:lbuffer uint8 64ul
-> st:state ->
Stack unit
(requires fun h -> live h st /\ live h b /\ disjoint st b)
(ensures fun h0 _ h1 -> modifies (loc b) h0 h1 /\
as_seq h1 b == Lib.ByteSequence.uints_to_bytes_le (as_seq h0 st)) | [] | Hacl.Impl.Salsa20.Core32.store_state | {
"file_name": "code/salsa20/Hacl.Impl.Salsa20.Core32.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | b: Lib.Buffer.lbuffer Lib.IntTypes.uint8 64ul -> st: Hacl.Impl.Salsa20.Core32.state
-> FStar.HyperStack.ST.Stack Prims.unit | {
"end_col": 29,
"end_line": 53,
"start_col": 2,
"start_line": 53
} |
FStar.HyperStack.ST.Stack | val set_counter:
st:state
-> c:size_t ->
Stack unit
(requires fun h -> live h st)
(ensures fun h0 _ h1 -> modifies (loc st) h0 h1 /\
as_seq h1 st == Seq.upd (as_seq h0 st) 8 (size_to_uint32 c)) | [
{
"abbrev": true,
"full_module": "Spec.Salsa20",
"short_module": "Spec"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Lib.ByteBuffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Buffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack.All",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Impl.Salsa20",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Impl.Salsa20",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let set_counter st c =
st.(size 8) <- size_to_uint32 c | val set_counter:
st:state
-> c:size_t ->
Stack unit
(requires fun h -> live h st)
(ensures fun h0 _ h1 -> modifies (loc st) h0 h1 /\
as_seq h1 st == Seq.upd (as_seq h0 st) 8 (size_to_uint32 c))
let set_counter st c = | true | null | false | st.(size 8) <- size_to_uint32 c | {
"checked_file": "Hacl.Impl.Salsa20.Core32.fst.checked",
"dependencies": [
"Spec.Salsa20.fst.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Lib.ByteBuffer.fsti.checked",
"Lib.Buffer.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.HyperStack.ST.fsti.checked",
"FStar.HyperStack.All.fst.checked",
"FStar.HyperStack.fst.checked"
],
"interface_file": false,
"source_file": "Hacl.Impl.Salsa20.Core32.fst"
} | [] | [
"Hacl.Impl.Salsa20.Core32.state",
"Lib.IntTypes.size_t",
"Lib.Buffer.op_Array_Assignment",
"Lib.IntTypes.uint32",
"FStar.UInt32.__uint_to_t",
"Lib.IntTypes.size",
"Lib.IntTypes.size_to_uint32",
"Prims.unit"
] | [] | module Hacl.Impl.Salsa20.Core32
open FStar.HyperStack
open FStar.HyperStack.All
open Lib.IntTypes
open Lib.Sequence
open Lib.Buffer
open Lib.ByteBuffer
module ST = FStar.HyperStack.ST
module Spec = Spec.Salsa20
let state = lbuffer uint32 16ul
let index = i:size_t{size_v i < 16}
inline_for_extraction
val create_state: unit ->
StackInline state
(requires fun h -> True)
(ensures fun h0 r h1 -> live h1 r /\
as_seq h1 r == Seq.create 16 (u32 0) /\
stack_allocated r h0 h1 (Seq.create 16 (u32 0)))
let create_state () = create (size 16) (u32 0)
inline_for_extraction
val load_state:
st:state
-> b:lbuffer uint8 64ul ->
Stack unit
(requires fun h -> live h st /\ live h b /\ disjoint st b)
(ensures fun h0 _ h1 -> modifies (loc st) h0 h1 /\
as_seq h1 st == Lib.ByteSequence.uints_from_bytes_le (as_seq h0 b))
let load_state st b =
uints_from_bytes_le st b
inline_for_extraction
val store_state:
b:lbuffer uint8 64ul
-> st:state ->
Stack unit
(requires fun h -> live h st /\ live h b /\ disjoint st b)
(ensures fun h0 _ h1 -> modifies (loc b) h0 h1 /\
as_seq h1 b == Lib.ByteSequence.uints_to_bytes_le (as_seq h0 st))
let store_state st b =
uints_to_bytes_le 16ul st b
inline_for_extraction
val set_counter:
st:state
-> c:size_t ->
Stack unit
(requires fun h -> live h st)
(ensures fun h0 _ h1 -> modifies (loc st) h0 h1 /\
as_seq h1 st == Seq.upd (as_seq h0 st) 8 (size_to_uint32 c)) | false | false | Hacl.Impl.Salsa20.Core32.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_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val set_counter:
st:state
-> c:size_t ->
Stack unit
(requires fun h -> live h st)
(ensures fun h0 _ h1 -> modifies (loc st) h0 h1 /\
as_seq h1 st == Seq.upd (as_seq h0 st) 8 (size_to_uint32 c)) | [] | Hacl.Impl.Salsa20.Core32.set_counter | {
"file_name": "code/salsa20/Hacl.Impl.Salsa20.Core32.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | st: Hacl.Impl.Salsa20.Core32.state -> c: Lib.IntTypes.size_t -> FStar.HyperStack.ST.Stack Prims.unit | {
"end_col": 33,
"end_line": 66,
"start_col": 2,
"start_line": 66
} |
FStar.HyperStack.ST.Stack | val quarter_round:
st:state
-> a:index
-> b:index
-> c:index
-> d:index ->
Stack unit
(requires fun h -> live h st /\ v b <> v d /\ v c <> v a)
(ensures fun h0 _ h1 -> modifies (loc st) h0 h1 /\
as_seq h1 st == Spec.quarter_round (v a) (v b) (v c) (v d) (as_seq h0 st)) | [
{
"abbrev": true,
"full_module": "Spec.Salsa20",
"short_module": "Spec"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Lib.ByteBuffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Buffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack.All",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Impl.Salsa20",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Impl.Salsa20",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let quarter_round st a b c d =
line st b a d (size 7);
line st c b a (size 9);
line st d c b (size 13);
line st a d c (size 18) | val quarter_round:
st:state
-> a:index
-> b:index
-> c:index
-> d:index ->
Stack unit
(requires fun h -> live h st /\ v b <> v d /\ v c <> v a)
(ensures fun h0 _ h1 -> modifies (loc st) h0 h1 /\
as_seq h1 st == Spec.quarter_round (v a) (v b) (v c) (v d) (as_seq h0 st))
let quarter_round st a b c d = | true | null | false | line st b a d (size 7);
line st c b a (size 9);
line st d c b (size 13);
line st a d c (size 18) | {
"checked_file": "Hacl.Impl.Salsa20.Core32.fst.checked",
"dependencies": [
"Spec.Salsa20.fst.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Lib.ByteBuffer.fsti.checked",
"Lib.Buffer.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.HyperStack.ST.fsti.checked",
"FStar.HyperStack.All.fst.checked",
"FStar.HyperStack.fst.checked"
],
"interface_file": false,
"source_file": "Hacl.Impl.Salsa20.Core32.fst"
} | [] | [
"Hacl.Impl.Salsa20.Core32.state",
"Hacl.Impl.Salsa20.Core32.index",
"Hacl.Impl.Salsa20.Core32.line",
"Lib.IntTypes.size",
"Prims.unit"
] | [] | module Hacl.Impl.Salsa20.Core32
open FStar.HyperStack
open FStar.HyperStack.All
open Lib.IntTypes
open Lib.Sequence
open Lib.Buffer
open Lib.ByteBuffer
module ST = FStar.HyperStack.ST
module Spec = Spec.Salsa20
let state = lbuffer uint32 16ul
let index = i:size_t{size_v i < 16}
inline_for_extraction
val create_state: unit ->
StackInline state
(requires fun h -> True)
(ensures fun h0 r h1 -> live h1 r /\
as_seq h1 r == Seq.create 16 (u32 0) /\
stack_allocated r h0 h1 (Seq.create 16 (u32 0)))
let create_state () = create (size 16) (u32 0)
inline_for_extraction
val load_state:
st:state
-> b:lbuffer uint8 64ul ->
Stack unit
(requires fun h -> live h st /\ live h b /\ disjoint st b)
(ensures fun h0 _ h1 -> modifies (loc st) h0 h1 /\
as_seq h1 st == Lib.ByteSequence.uints_from_bytes_le (as_seq h0 b))
let load_state st b =
uints_from_bytes_le st b
inline_for_extraction
val store_state:
b:lbuffer uint8 64ul
-> st:state ->
Stack unit
(requires fun h -> live h st /\ live h b /\ disjoint st b)
(ensures fun h0 _ h1 -> modifies (loc b) h0 h1 /\
as_seq h1 b == Lib.ByteSequence.uints_to_bytes_le (as_seq h0 st))
let store_state st b =
uints_to_bytes_le 16ul st b
inline_for_extraction
val set_counter:
st:state
-> c:size_t ->
Stack unit
(requires fun h -> live h st)
(ensures fun h0 _ h1 -> modifies (loc st) h0 h1 /\
as_seq h1 st == Seq.upd (as_seq h0 st) 8 (size_to_uint32 c))
let set_counter st c =
st.(size 8) <- size_to_uint32 c
inline_for_extraction
val copy_state:
st:state
-> ost:state ->
Stack unit
(requires fun h -> live h st /\ live h ost /\ disjoint st ost)
(ensures fun h0 _ h1 -> modifies (loc st) h0 h1 /\
as_seq h1 st == as_seq h0 ost)
let copy_state st ost = copy #MUT #uint32 #(size 16) st ost
inline_for_extraction
val sum_state:
st:state
-> ost:state ->
Stack unit
(requires fun h -> live h st /\ live h ost /\ eq_or_disjoint st ost)
(ensures fun h0 _ h1 -> modifies (loc st) h0 h1 /\
as_seq h1 st == Lib.Sequence.map2 (+.) (as_seq h0 st) (as_seq h0 ost))
let sum_state st ost = map2T #MUT #MUT #uint32 #uint32 #uint32 (size 16) st ( +. ) st ost
inline_for_extraction
val xor_block:
o:lbuffer uint8 64ul
-> st:state
-> b:lbuffer uint8 64ul ->
Stack unit
(requires fun h -> live h o /\ live h st /\ live h b)
(ensures fun h0 _ h1 -> modifies (loc o) h0 h1 /\
as_seq h1 o == Spec.xor_block (as_seq h0 st) (as_seq h0 b))
#set-options "--z3rlimit 100"
let xor_block o st b =
push_frame();
let bl = create_state() in
load_state bl b;
map2T (size 16) bl ( ^. ) bl st;
store_state o bl;
pop_frame()
inline_for_extraction
val line:
st:state
-> a:index
-> b:index
-> d:index
-> r:rotval U32 ->
Stack unit
(requires fun h -> live h st /\ v a <> v d)
(ensures fun h0 _ h1 -> modifies (loc st) h0 h1 /\
as_seq h1 st == Spec.line (v a) (v b) (v d) r (as_seq h0 st))
let line st a b d r =
let sta = st.(a) in
let stb = st.(b) in
let std = st.(d) in
let sta = sta ^. ((stb +. std) <<<. r) in
st.(a) <- sta
val quarter_round:
st:state
-> a:index
-> b:index
-> c:index
-> d:index ->
Stack unit
(requires fun h -> live h st /\ v b <> v d /\ v c <> v a)
(ensures fun h0 _ h1 -> modifies (loc st) h0 h1 /\
as_seq h1 st == Spec.quarter_round (v a) (v b) (v c) (v d) (as_seq h0 st))
[@ CInline ] | false | false | Hacl.Impl.Salsa20.Core32.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_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 100,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val quarter_round:
st:state
-> a:index
-> b:index
-> c:index
-> d:index ->
Stack unit
(requires fun h -> live h st /\ v b <> v d /\ v c <> v a)
(ensures fun h0 _ h1 -> modifies (loc st) h0 h1 /\
as_seq h1 st == Spec.quarter_round (v a) (v b) (v c) (v d) (as_seq h0 st)) | [] | Hacl.Impl.Salsa20.Core32.quarter_round | {
"file_name": "code/salsa20/Hacl.Impl.Salsa20.Core32.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
st: Hacl.Impl.Salsa20.Core32.state ->
a: Hacl.Impl.Salsa20.Core32.index ->
b: Hacl.Impl.Salsa20.Core32.index ->
c: Hacl.Impl.Salsa20.Core32.index ->
d: Hacl.Impl.Salsa20.Core32.index
-> FStar.HyperStack.ST.Stack Prims.unit | {
"end_col": 25,
"end_line": 149,
"start_col": 2,
"start_line": 146
} |
FStar.HyperStack.ST.Stack | val xor_block:
o:lbuffer uint8 64ul
-> st:state
-> b:lbuffer uint8 64ul ->
Stack unit
(requires fun h -> live h o /\ live h st /\ live h b)
(ensures fun h0 _ h1 -> modifies (loc o) h0 h1 /\
as_seq h1 o == Spec.xor_block (as_seq h0 st) (as_seq h0 b)) | [
{
"abbrev": true,
"full_module": "Spec.Salsa20",
"short_module": "Spec"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Lib.ByteBuffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Buffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack.All",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Impl.Salsa20",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Impl.Salsa20",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let xor_block o st b =
push_frame();
let bl = create_state() in
load_state bl b;
map2T (size 16) bl ( ^. ) bl st;
store_state o bl;
pop_frame() | val xor_block:
o:lbuffer uint8 64ul
-> st:state
-> b:lbuffer uint8 64ul ->
Stack unit
(requires fun h -> live h o /\ live h st /\ live h b)
(ensures fun h0 _ h1 -> modifies (loc o) h0 h1 /\
as_seq h1 o == Spec.xor_block (as_seq h0 st) (as_seq h0 b))
let xor_block o st b = | true | null | false | push_frame ();
let bl = create_state () in
load_state bl b;
map2T (size 16) bl ( ^. ) bl st;
store_state o bl;
pop_frame () | {
"checked_file": "Hacl.Impl.Salsa20.Core32.fst.checked",
"dependencies": [
"Spec.Salsa20.fst.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Lib.ByteBuffer.fsti.checked",
"Lib.Buffer.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.HyperStack.ST.fsti.checked",
"FStar.HyperStack.All.fst.checked",
"FStar.HyperStack.fst.checked"
],
"interface_file": false,
"source_file": "Hacl.Impl.Salsa20.Core32.fst"
} | [] | [
"Lib.Buffer.lbuffer",
"Lib.IntTypes.uint8",
"FStar.UInt32.__uint_to_t",
"Hacl.Impl.Salsa20.Core32.state",
"FStar.HyperStack.ST.pop_frame",
"Prims.unit",
"Hacl.Impl.Salsa20.Core32.store_state",
"Lib.Buffer.map2T",
"Lib.Buffer.MUT",
"Lib.IntTypes.uint32",
"Lib.IntTypes.size",
"Lib.IntTypes.op_Hat_Dot",
"Lib.IntTypes.U32",
"Lib.IntTypes.SEC",
"Hacl.Impl.Salsa20.Core32.load_state",
"Hacl.Impl.Salsa20.Core32.create_state",
"FStar.HyperStack.ST.push_frame"
] | [] | module Hacl.Impl.Salsa20.Core32
open FStar.HyperStack
open FStar.HyperStack.All
open Lib.IntTypes
open Lib.Sequence
open Lib.Buffer
open Lib.ByteBuffer
module ST = FStar.HyperStack.ST
module Spec = Spec.Salsa20
let state = lbuffer uint32 16ul
let index = i:size_t{size_v i < 16}
inline_for_extraction
val create_state: unit ->
StackInline state
(requires fun h -> True)
(ensures fun h0 r h1 -> live h1 r /\
as_seq h1 r == Seq.create 16 (u32 0) /\
stack_allocated r h0 h1 (Seq.create 16 (u32 0)))
let create_state () = create (size 16) (u32 0)
inline_for_extraction
val load_state:
st:state
-> b:lbuffer uint8 64ul ->
Stack unit
(requires fun h -> live h st /\ live h b /\ disjoint st b)
(ensures fun h0 _ h1 -> modifies (loc st) h0 h1 /\
as_seq h1 st == Lib.ByteSequence.uints_from_bytes_le (as_seq h0 b))
let load_state st b =
uints_from_bytes_le st b
inline_for_extraction
val store_state:
b:lbuffer uint8 64ul
-> st:state ->
Stack unit
(requires fun h -> live h st /\ live h b /\ disjoint st b)
(ensures fun h0 _ h1 -> modifies (loc b) h0 h1 /\
as_seq h1 b == Lib.ByteSequence.uints_to_bytes_le (as_seq h0 st))
let store_state st b =
uints_to_bytes_le 16ul st b
inline_for_extraction
val set_counter:
st:state
-> c:size_t ->
Stack unit
(requires fun h -> live h st)
(ensures fun h0 _ h1 -> modifies (loc st) h0 h1 /\
as_seq h1 st == Seq.upd (as_seq h0 st) 8 (size_to_uint32 c))
let set_counter st c =
st.(size 8) <- size_to_uint32 c
inline_for_extraction
val copy_state:
st:state
-> ost:state ->
Stack unit
(requires fun h -> live h st /\ live h ost /\ disjoint st ost)
(ensures fun h0 _ h1 -> modifies (loc st) h0 h1 /\
as_seq h1 st == as_seq h0 ost)
let copy_state st ost = copy #MUT #uint32 #(size 16) st ost
inline_for_extraction
val sum_state:
st:state
-> ost:state ->
Stack unit
(requires fun h -> live h st /\ live h ost /\ eq_or_disjoint st ost)
(ensures fun h0 _ h1 -> modifies (loc st) h0 h1 /\
as_seq h1 st == Lib.Sequence.map2 (+.) (as_seq h0 st) (as_seq h0 ost))
let sum_state st ost = map2T #MUT #MUT #uint32 #uint32 #uint32 (size 16) st ( +. ) st ost
inline_for_extraction
val xor_block:
o:lbuffer uint8 64ul
-> st:state
-> b:lbuffer uint8 64ul ->
Stack unit
(requires fun h -> live h o /\ live h st /\ live h b)
(ensures fun h0 _ h1 -> modifies (loc o) h0 h1 /\
as_seq h1 o == Spec.xor_block (as_seq h0 st) (as_seq h0 b))
#set-options "--z3rlimit 100" | false | false | Hacl.Impl.Salsa20.Core32.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_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 100,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val xor_block:
o:lbuffer uint8 64ul
-> st:state
-> b:lbuffer uint8 64ul ->
Stack unit
(requires fun h -> live h o /\ live h st /\ live h b)
(ensures fun h0 _ h1 -> modifies (loc o) h0 h1 /\
as_seq h1 o == Spec.xor_block (as_seq h0 st) (as_seq h0 b)) | [] | Hacl.Impl.Salsa20.Core32.xor_block | {
"file_name": "code/salsa20/Hacl.Impl.Salsa20.Core32.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
o: Lib.Buffer.lbuffer Lib.IntTypes.uint8 64ul ->
st: Hacl.Impl.Salsa20.Core32.state ->
b: Lib.Buffer.lbuffer Lib.IntTypes.uint8 64ul
-> FStar.HyperStack.ST.Stack Prims.unit | {
"end_col": 13,
"end_line": 110,
"start_col": 2,
"start_line": 105
} |
FStar.HyperStack.ST.Stack | val double_round:
st:state ->
Stack unit
(requires fun h -> live h st)
(ensures fun h0 _ h1 -> modifies (loc st) h0 h1 /\
as_seq h1 st == Spec.double_round (as_seq h0 st)) | [
{
"abbrev": true,
"full_module": "Spec.Salsa20",
"short_module": "Spec"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Lib.ByteBuffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Buffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack.All",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Impl.Salsa20",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Impl.Salsa20",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let double_round st =
quarter_round st (size 0) (size 4) (size 8) (size 12);
quarter_round st (size 5) (size 9) (size 13) (size 1);
quarter_round st (size 10) (size 14) (size 2) (size 6);
quarter_round st (size 15) (size 3) (size 7) (size 11);
quarter_round st (size 0) (size 1) (size 2) (size 3);
quarter_round st (size 5) (size 6) (size 7) (size 4);
quarter_round st (size 10) (size 11) (size 8) (size 9);
quarter_round st (size 15) (size 12) (size 13) (size 14) | val double_round:
st:state ->
Stack unit
(requires fun h -> live h st)
(ensures fun h0 _ h1 -> modifies (loc st) h0 h1 /\
as_seq h1 st == Spec.double_round (as_seq h0 st))
let double_round st = | true | null | false | quarter_round st (size 0) (size 4) (size 8) (size 12);
quarter_round st (size 5) (size 9) (size 13) (size 1);
quarter_round st (size 10) (size 14) (size 2) (size 6);
quarter_round st (size 15) (size 3) (size 7) (size 11);
quarter_round st (size 0) (size 1) (size 2) (size 3);
quarter_round st (size 5) (size 6) (size 7) (size 4);
quarter_round st (size 10) (size 11) (size 8) (size 9);
quarter_round st (size 15) (size 12) (size 13) (size 14) | {
"checked_file": "Hacl.Impl.Salsa20.Core32.fst.checked",
"dependencies": [
"Spec.Salsa20.fst.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Lib.ByteBuffer.fsti.checked",
"Lib.Buffer.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.HyperStack.ST.fsti.checked",
"FStar.HyperStack.All.fst.checked",
"FStar.HyperStack.fst.checked"
],
"interface_file": false,
"source_file": "Hacl.Impl.Salsa20.Core32.fst"
} | [] | [
"Hacl.Impl.Salsa20.Core32.state",
"Hacl.Impl.Salsa20.Core32.quarter_round",
"Lib.IntTypes.size",
"Prims.unit"
] | [] | module Hacl.Impl.Salsa20.Core32
open FStar.HyperStack
open FStar.HyperStack.All
open Lib.IntTypes
open Lib.Sequence
open Lib.Buffer
open Lib.ByteBuffer
module ST = FStar.HyperStack.ST
module Spec = Spec.Salsa20
let state = lbuffer uint32 16ul
let index = i:size_t{size_v i < 16}
inline_for_extraction
val create_state: unit ->
StackInline state
(requires fun h -> True)
(ensures fun h0 r h1 -> live h1 r /\
as_seq h1 r == Seq.create 16 (u32 0) /\
stack_allocated r h0 h1 (Seq.create 16 (u32 0)))
let create_state () = create (size 16) (u32 0)
inline_for_extraction
val load_state:
st:state
-> b:lbuffer uint8 64ul ->
Stack unit
(requires fun h -> live h st /\ live h b /\ disjoint st b)
(ensures fun h0 _ h1 -> modifies (loc st) h0 h1 /\
as_seq h1 st == Lib.ByteSequence.uints_from_bytes_le (as_seq h0 b))
let load_state st b =
uints_from_bytes_le st b
inline_for_extraction
val store_state:
b:lbuffer uint8 64ul
-> st:state ->
Stack unit
(requires fun h -> live h st /\ live h b /\ disjoint st b)
(ensures fun h0 _ h1 -> modifies (loc b) h0 h1 /\
as_seq h1 b == Lib.ByteSequence.uints_to_bytes_le (as_seq h0 st))
let store_state st b =
uints_to_bytes_le 16ul st b
inline_for_extraction
val set_counter:
st:state
-> c:size_t ->
Stack unit
(requires fun h -> live h st)
(ensures fun h0 _ h1 -> modifies (loc st) h0 h1 /\
as_seq h1 st == Seq.upd (as_seq h0 st) 8 (size_to_uint32 c))
let set_counter st c =
st.(size 8) <- size_to_uint32 c
inline_for_extraction
val copy_state:
st:state
-> ost:state ->
Stack unit
(requires fun h -> live h st /\ live h ost /\ disjoint st ost)
(ensures fun h0 _ h1 -> modifies (loc st) h0 h1 /\
as_seq h1 st == as_seq h0 ost)
let copy_state st ost = copy #MUT #uint32 #(size 16) st ost
inline_for_extraction
val sum_state:
st:state
-> ost:state ->
Stack unit
(requires fun h -> live h st /\ live h ost /\ eq_or_disjoint st ost)
(ensures fun h0 _ h1 -> modifies (loc st) h0 h1 /\
as_seq h1 st == Lib.Sequence.map2 (+.) (as_seq h0 st) (as_seq h0 ost))
let sum_state st ost = map2T #MUT #MUT #uint32 #uint32 #uint32 (size 16) st ( +. ) st ost
inline_for_extraction
val xor_block:
o:lbuffer uint8 64ul
-> st:state
-> b:lbuffer uint8 64ul ->
Stack unit
(requires fun h -> live h o /\ live h st /\ live h b)
(ensures fun h0 _ h1 -> modifies (loc o) h0 h1 /\
as_seq h1 o == Spec.xor_block (as_seq h0 st) (as_seq h0 b))
#set-options "--z3rlimit 100"
let xor_block o st b =
push_frame();
let bl = create_state() in
load_state bl b;
map2T (size 16) bl ( ^. ) bl st;
store_state o bl;
pop_frame()
inline_for_extraction
val line:
st:state
-> a:index
-> b:index
-> d:index
-> r:rotval U32 ->
Stack unit
(requires fun h -> live h st /\ v a <> v d)
(ensures fun h0 _ h1 -> modifies (loc st) h0 h1 /\
as_seq h1 st == Spec.line (v a) (v b) (v d) r (as_seq h0 st))
let line st a b d r =
let sta = st.(a) in
let stb = st.(b) in
let std = st.(d) in
let sta = sta ^. ((stb +. std) <<<. r) in
st.(a) <- sta
val quarter_round:
st:state
-> a:index
-> b:index
-> c:index
-> d:index ->
Stack unit
(requires fun h -> live h st /\ v b <> v d /\ v c <> v a)
(ensures fun h0 _ h1 -> modifies (loc st) h0 h1 /\
as_seq h1 st == Spec.quarter_round (v a) (v b) (v c) (v d) (as_seq h0 st))
[@ CInline ]
let quarter_round st a b c d =
line st b a d (size 7);
line st c b a (size 9);
line st d c b (size 13);
line st a d c (size 18)
#reset-options "--z3rlimit 50"
val double_round:
st:state ->
Stack unit
(requires fun h -> live h st)
(ensures fun h0 _ h1 -> modifies (loc st) h0 h1 /\
as_seq h1 st == Spec.double_round (as_seq h0 st))
[@ CInline ] | false | false | Hacl.Impl.Salsa20.Core32.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_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 50,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val double_round:
st:state ->
Stack unit
(requires fun h -> live h st)
(ensures fun h0 _ h1 -> modifies (loc st) h0 h1 /\
as_seq h1 st == Spec.double_round (as_seq h0 st)) | [] | Hacl.Impl.Salsa20.Core32.double_round | {
"file_name": "code/salsa20/Hacl.Impl.Salsa20.Core32.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | st: Hacl.Impl.Salsa20.Core32.state -> FStar.HyperStack.ST.Stack Prims.unit | {
"end_col": 58,
"end_line": 171,
"start_col": 2,
"start_line": 163
} |
Prims.Tot | val rRbx:reg_64 | [
{
"abbrev": false,
"full_module": "Vale.Arch.HeapTypes_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let rRbx : reg_64 = 1 | val rRbx:reg_64
let rRbx:reg_64 = | false | null | false | 1 | {
"checked_file": "Vale.X64.Machine_s.fst.checked",
"dependencies": [
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.HeapTypes_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "Vale.X64.Machine_s.fst"
} | [
"total"
] | [] | [] | module Vale.X64.Machine_s
open FStar.Mul
include Vale.Arch.HeapTypes_s
irreducible let va_qattr = ()
unfold let pow2_32 = Vale.Def.Words_s.pow2_32
unfold let pow2_64 = Vale.Def.Words_s.pow2_64
unfold let pow2_128 = Vale.Def.Words_s.pow2_128
unfold let nat64 = Vale.Def.Types_s.nat64
let int_to_nat64 (i:int) : n:nat64{0 <= i && i < pow2_64 ==> i == n} =
Vale.Def.Words_s.int_to_natN pow2_64 i
unfold let nat128 = Vale.Def.Words_s.nat128
unfold let quad32 = Vale.Def.Types_s.quad32
type flag:eqtype = i:int{0 <= i /\ i < 16}
[@va_qattr] unfold let fCarry : flag = 0
[@va_qattr] unfold let fOverflow : flag = 11
let n_reg_files = 2
let reg_file_id = rf:nat{rf < n_reg_files}
let n_regs (rf:reg_file_id) : nat =
match rf with
| 0 -> 16
| 1 -> 16
let t_reg_file (rf:reg_file_id) : Type0 =
match rf with
| 0 -> nat64
| 1 -> quad32
let reg_id (rf:reg_file_id) : Type0 = r:nat{r < n_regs rf}
[@va_qattr]
type reg =
| Reg: rf:reg_file_id -> r:reg_id rf -> reg
let t_reg (r:reg) : Type0 = t_reg_file r.rf
// Some register files can be used as integers (for addresses); others arbitrarily return 0
let t_reg_to_int (rf:reg_file_id) (v:t_reg_file rf) : int =
match rf with
| 0 -> v
| 1 -> 0
type maddr:eqtype =
| MConst: n:int -> maddr
| MReg: r:reg -> offset:int -> maddr
| MIndex: base:reg -> scale:int -> index:reg -> offset:int -> maddr
type tmaddr:eqtype = maddr & taint
[@va_qattr]
type operand (tc tr:eqtype) : eqtype =
| OConst: n:tc -> operand tc tr
| OReg: r:tr -> operand tc tr
| OMem: m:tmaddr -> operand tc tr
| OStack: m:tmaddr -> operand tc tr
[@va_qattr]
let operand_rf (rf:reg_file_id) : eqtype =
operand (t_reg_file rf) (reg_id rf)
[@va_qattr]
unfold let oreg (r:reg) : operand_rf r.rf =
OReg r.r
let reg_64 : Type0 = r:nat{r < 16}
let reg_xmm : Type0 = r:nat{r < 16} | false | true | Vale.X64.Machine_s.fst | {
"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_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val rRbx:reg_64 | [] | Vale.X64.Machine_s.rRbx | {
"file_name": "vale/specs/hardware/Vale.X64.Machine_s.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | Vale.X64.Machine_s.reg_64 | {
"end_col": 40,
"end_line": 72,
"start_col": 39,
"start_line": 72
} |
Prims.Tot | val reg_id (rf: reg_file_id) : Type0 | [
{
"abbrev": false,
"full_module": "Vale.Arch.HeapTypes_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let reg_id (rf:reg_file_id) : Type0 = r:nat{r < n_regs rf} | val reg_id (rf: reg_file_id) : Type0
let reg_id (rf: reg_file_id) : Type0 = | false | null | false | r: nat{r < n_regs rf} | {
"checked_file": "Vale.X64.Machine_s.fst.checked",
"dependencies": [
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.HeapTypes_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "Vale.X64.Machine_s.fst"
} | [
"total"
] | [
"Vale.X64.Machine_s.reg_file_id",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"Vale.X64.Machine_s.n_regs"
] | [] | module Vale.X64.Machine_s
open FStar.Mul
include Vale.Arch.HeapTypes_s
irreducible let va_qattr = ()
unfold let pow2_32 = Vale.Def.Words_s.pow2_32
unfold let pow2_64 = Vale.Def.Words_s.pow2_64
unfold let pow2_128 = Vale.Def.Words_s.pow2_128
unfold let nat64 = Vale.Def.Types_s.nat64
let int_to_nat64 (i:int) : n:nat64{0 <= i && i < pow2_64 ==> i == n} =
Vale.Def.Words_s.int_to_natN pow2_64 i
unfold let nat128 = Vale.Def.Words_s.nat128
unfold let quad32 = Vale.Def.Types_s.quad32
type flag:eqtype = i:int{0 <= i /\ i < 16}
[@va_qattr] unfold let fCarry : flag = 0
[@va_qattr] unfold let fOverflow : flag = 11
let n_reg_files = 2
let reg_file_id = rf:nat{rf < n_reg_files}
let n_regs (rf:reg_file_id) : nat =
match rf with
| 0 -> 16
| 1 -> 16
let t_reg_file (rf:reg_file_id) : Type0 =
match rf with
| 0 -> nat64
| 1 -> quad32 | false | true | Vale.X64.Machine_s.fst | {
"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_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val reg_id (rf: reg_file_id) : Type0 | [] | Vale.X64.Machine_s.reg_id | {
"file_name": "vale/specs/hardware/Vale.X64.Machine_s.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | rf: Vale.X64.Machine_s.reg_file_id -> Type0 | {
"end_col": 58,
"end_line": 32,
"start_col": 38,
"start_line": 32
} |
Prims.Tot | val t_reg (r: reg) : Type0 | [
{
"abbrev": false,
"full_module": "Vale.Arch.HeapTypes_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let t_reg (r:reg) : Type0 = t_reg_file r.rf | val t_reg (r: reg) : Type0
let t_reg (r: reg) : Type0 = | false | null | false | t_reg_file r.rf | {
"checked_file": "Vale.X64.Machine_s.fst.checked",
"dependencies": [
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.HeapTypes_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "Vale.X64.Machine_s.fst"
} | [
"total"
] | [
"Vale.X64.Machine_s.reg",
"Vale.X64.Machine_s.t_reg_file",
"Vale.X64.Machine_s.__proj__Reg__item__rf"
] | [] | module Vale.X64.Machine_s
open FStar.Mul
include Vale.Arch.HeapTypes_s
irreducible let va_qattr = ()
unfold let pow2_32 = Vale.Def.Words_s.pow2_32
unfold let pow2_64 = Vale.Def.Words_s.pow2_64
unfold let pow2_128 = Vale.Def.Words_s.pow2_128
unfold let nat64 = Vale.Def.Types_s.nat64
let int_to_nat64 (i:int) : n:nat64{0 <= i && i < pow2_64 ==> i == n} =
Vale.Def.Words_s.int_to_natN pow2_64 i
unfold let nat128 = Vale.Def.Words_s.nat128
unfold let quad32 = Vale.Def.Types_s.quad32
type flag:eqtype = i:int{0 <= i /\ i < 16}
[@va_qattr] unfold let fCarry : flag = 0
[@va_qattr] unfold let fOverflow : flag = 11
let n_reg_files = 2
let reg_file_id = rf:nat{rf < n_reg_files}
let n_regs (rf:reg_file_id) : nat =
match rf with
| 0 -> 16
| 1 -> 16
let t_reg_file (rf:reg_file_id) : Type0 =
match rf with
| 0 -> nat64
| 1 -> quad32
let reg_id (rf:reg_file_id) : Type0 = r:nat{r < n_regs rf}
[@va_qattr]
type reg =
| Reg: rf:reg_file_id -> r:reg_id rf -> reg | false | true | Vale.X64.Machine_s.fst | {
"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_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val t_reg (r: reg) : Type0 | [] | Vale.X64.Machine_s.t_reg | {
"file_name": "vale/specs/hardware/Vale.X64.Machine_s.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | r: Vale.X64.Machine_s.reg -> Type0 | {
"end_col": 43,
"end_line": 38,
"start_col": 28,
"start_line": 38
} |
Prims.Tot | [
{
"abbrev": false,
"full_module": "Vale.Arch.HeapTypes_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let nat128 = Vale.Def.Words_s.nat128 | let nat128 = | false | null | false | Vale.Def.Words_s.nat128 | {
"checked_file": "Vale.X64.Machine_s.fst.checked",
"dependencies": [
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.HeapTypes_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "Vale.X64.Machine_s.fst"
} | [
"total"
] | [
"Vale.Def.Words_s.nat128"
] | [] | module Vale.X64.Machine_s
open FStar.Mul
include Vale.Arch.HeapTypes_s
irreducible let va_qattr = ()
unfold let pow2_32 = Vale.Def.Words_s.pow2_32
unfold let pow2_64 = Vale.Def.Words_s.pow2_64
unfold let pow2_128 = Vale.Def.Words_s.pow2_128
unfold let nat64 = Vale.Def.Types_s.nat64
let int_to_nat64 (i:int) : n:nat64{0 <= i && i < pow2_64 ==> i == n} = | false | true | Vale.X64.Machine_s.fst | {
"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_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val nat128 : Type0 | [] | Vale.X64.Machine_s.nat128 | {
"file_name": "vale/specs/hardware/Vale.X64.Machine_s.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | Type0 | {
"end_col": 43,
"end_line": 13,
"start_col": 20,
"start_line": 13
} |
|
Prims.Tot | val rRsi:reg_64 | [
{
"abbrev": false,
"full_module": "Vale.Arch.HeapTypes_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let rRsi : reg_64 = 4 | val rRsi:reg_64
let rRsi:reg_64 = | false | null | false | 4 | {
"checked_file": "Vale.X64.Machine_s.fst.checked",
"dependencies": [
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.HeapTypes_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "Vale.X64.Machine_s.fst"
} | [
"total"
] | [] | [] | module Vale.X64.Machine_s
open FStar.Mul
include Vale.Arch.HeapTypes_s
irreducible let va_qattr = ()
unfold let pow2_32 = Vale.Def.Words_s.pow2_32
unfold let pow2_64 = Vale.Def.Words_s.pow2_64
unfold let pow2_128 = Vale.Def.Words_s.pow2_128
unfold let nat64 = Vale.Def.Types_s.nat64
let int_to_nat64 (i:int) : n:nat64{0 <= i && i < pow2_64 ==> i == n} =
Vale.Def.Words_s.int_to_natN pow2_64 i
unfold let nat128 = Vale.Def.Words_s.nat128
unfold let quad32 = Vale.Def.Types_s.quad32
type flag:eqtype = i:int{0 <= i /\ i < 16}
[@va_qattr] unfold let fCarry : flag = 0
[@va_qattr] unfold let fOverflow : flag = 11
let n_reg_files = 2
let reg_file_id = rf:nat{rf < n_reg_files}
let n_regs (rf:reg_file_id) : nat =
match rf with
| 0 -> 16
| 1 -> 16
let t_reg_file (rf:reg_file_id) : Type0 =
match rf with
| 0 -> nat64
| 1 -> quad32
let reg_id (rf:reg_file_id) : Type0 = r:nat{r < n_regs rf}
[@va_qattr]
type reg =
| Reg: rf:reg_file_id -> r:reg_id rf -> reg
let t_reg (r:reg) : Type0 = t_reg_file r.rf
// Some register files can be used as integers (for addresses); others arbitrarily return 0
let t_reg_to_int (rf:reg_file_id) (v:t_reg_file rf) : int =
match rf with
| 0 -> v
| 1 -> 0
type maddr:eqtype =
| MConst: n:int -> maddr
| MReg: r:reg -> offset:int -> maddr
| MIndex: base:reg -> scale:int -> index:reg -> offset:int -> maddr
type tmaddr:eqtype = maddr & taint
[@va_qattr]
type operand (tc tr:eqtype) : eqtype =
| OConst: n:tc -> operand tc tr
| OReg: r:tr -> operand tc tr
| OMem: m:tmaddr -> operand tc tr
| OStack: m:tmaddr -> operand tc tr
[@va_qattr]
let operand_rf (rf:reg_file_id) : eqtype =
operand (t_reg_file rf) (reg_id rf)
[@va_qattr]
unfold let oreg (r:reg) : operand_rf r.rf =
OReg r.r
let reg_64 : Type0 = r:nat{r < 16}
let reg_xmm : Type0 = r:nat{r < 16}
[@va_qattr] unfold let rRax : reg_64 = 0
[@va_qattr] unfold let rRbx : reg_64 = 1
[@va_qattr] unfold let rRcx : reg_64 = 2 | false | true | Vale.X64.Machine_s.fst | {
"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_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val rRsi:reg_64 | [] | Vale.X64.Machine_s.rRsi | {
"file_name": "vale/specs/hardware/Vale.X64.Machine_s.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | Vale.X64.Machine_s.reg_64 | {
"end_col": 40,
"end_line": 75,
"start_col": 39,
"start_line": 75
} |
Prims.Tot | [
{
"abbrev": false,
"full_module": "Vale.Arch.HeapTypes_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let nat64 = Vale.Def.Types_s.nat64 | let nat64 = | false | null | false | Vale.Def.Types_s.nat64 | {
"checked_file": "Vale.X64.Machine_s.fst.checked",
"dependencies": [
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.HeapTypes_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "Vale.X64.Machine_s.fst"
} | [
"total"
] | [
"Vale.Def.Types_s.nat64"
] | [] | module Vale.X64.Machine_s
open FStar.Mul
include Vale.Arch.HeapTypes_s
irreducible let va_qattr = ()
unfold let pow2_32 = Vale.Def.Words_s.pow2_32
unfold let pow2_64 = Vale.Def.Words_s.pow2_64
unfold let pow2_128 = Vale.Def.Words_s.pow2_128 | false | true | Vale.X64.Machine_s.fst | {
"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_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val nat64 : Type0 | [] | Vale.X64.Machine_s.nat64 | {
"file_name": "vale/specs/hardware/Vale.X64.Machine_s.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | Type0 | {
"end_col": 41,
"end_line": 10,
"start_col": 19,
"start_line": 10
} |
|
Prims.Tot | [
{
"abbrev": false,
"full_module": "Vale.Arch.HeapTypes_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let reg_file_id = rf:nat{rf < n_reg_files} | let reg_file_id = | false | null | false | rf: nat{rf < n_reg_files} | {
"checked_file": "Vale.X64.Machine_s.fst.checked",
"dependencies": [
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.HeapTypes_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "Vale.X64.Machine_s.fst"
} | [
"total"
] | [
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"Vale.X64.Machine_s.n_reg_files"
] | [] | module Vale.X64.Machine_s
open FStar.Mul
include Vale.Arch.HeapTypes_s
irreducible let va_qattr = ()
unfold let pow2_32 = Vale.Def.Words_s.pow2_32
unfold let pow2_64 = Vale.Def.Words_s.pow2_64
unfold let pow2_128 = Vale.Def.Words_s.pow2_128
unfold let nat64 = Vale.Def.Types_s.nat64
let int_to_nat64 (i:int) : n:nat64{0 <= i && i < pow2_64 ==> i == n} =
Vale.Def.Words_s.int_to_natN pow2_64 i
unfold let nat128 = Vale.Def.Words_s.nat128
unfold let quad32 = Vale.Def.Types_s.quad32
type flag:eqtype = i:int{0 <= i /\ i < 16}
[@va_qattr] unfold let fCarry : flag = 0
[@va_qattr] unfold let fOverflow : flag = 11 | false | true | Vale.X64.Machine_s.fst | {
"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_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val reg_file_id : Type0 | [] | Vale.X64.Machine_s.reg_file_id | {
"file_name": "vale/specs/hardware/Vale.X64.Machine_s.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | Type0 | {
"end_col": 42,
"end_line": 22,
"start_col": 18,
"start_line": 22
} |
|
Prims.Tot | [
{
"abbrev": false,
"full_module": "Vale.Arch.HeapTypes_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let quad32 = Vale.Def.Types_s.quad32 | let quad32 = | false | null | false | Vale.Def.Types_s.quad32 | {
"checked_file": "Vale.X64.Machine_s.fst.checked",
"dependencies": [
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.HeapTypes_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "Vale.X64.Machine_s.fst"
} | [
"total"
] | [
"Vale.Def.Types_s.quad32"
] | [] | module Vale.X64.Machine_s
open FStar.Mul
include Vale.Arch.HeapTypes_s
irreducible let va_qattr = ()
unfold let pow2_32 = Vale.Def.Words_s.pow2_32
unfold let pow2_64 = Vale.Def.Words_s.pow2_64
unfold let pow2_128 = Vale.Def.Words_s.pow2_128
unfold let nat64 = Vale.Def.Types_s.nat64
let int_to_nat64 (i:int) : n:nat64{0 <= i && i < pow2_64 ==> i == n} =
Vale.Def.Words_s.int_to_natN pow2_64 i | false | true | Vale.X64.Machine_s.fst | {
"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_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val quad32 : Prims.eqtype | [] | Vale.X64.Machine_s.quad32 | {
"file_name": "vale/specs/hardware/Vale.X64.Machine_s.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | Prims.eqtype | {
"end_col": 43,
"end_line": 14,
"start_col": 20,
"start_line": 14
} |
|
Prims.Tot | [
{
"abbrev": false,
"full_module": "Vale.Arch.HeapTypes_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let pow2_64 = Vale.Def.Words_s.pow2_64 | let pow2_64 = | false | null | false | Vale.Def.Words_s.pow2_64 | {
"checked_file": "Vale.X64.Machine_s.fst.checked",
"dependencies": [
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.HeapTypes_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "Vale.X64.Machine_s.fst"
} | [
"total"
] | [
"Vale.Def.Words_s.pow2_64"
] | [] | module Vale.X64.Machine_s
open FStar.Mul
include Vale.Arch.HeapTypes_s
irreducible let va_qattr = () | false | true | Vale.X64.Machine_s.fst | {
"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_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val pow2_64 : Prims.int | [] | Vale.X64.Machine_s.pow2_64 | {
"file_name": "vale/specs/hardware/Vale.X64.Machine_s.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | Prims.int | {
"end_col": 45,
"end_line": 7,
"start_col": 21,
"start_line": 7
} |
|
Prims.Tot | val rR15:reg_64 | [
{
"abbrev": false,
"full_module": "Vale.Arch.HeapTypes_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let rR15 : reg_64 = 15 | val rR15:reg_64
let rR15:reg_64 = | false | null | false | 15 | {
"checked_file": "Vale.X64.Machine_s.fst.checked",
"dependencies": [
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.HeapTypes_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "Vale.X64.Machine_s.fst"
} | [
"total"
] | [] | [] | module Vale.X64.Machine_s
open FStar.Mul
include Vale.Arch.HeapTypes_s
irreducible let va_qattr = ()
unfold let pow2_32 = Vale.Def.Words_s.pow2_32
unfold let pow2_64 = Vale.Def.Words_s.pow2_64
unfold let pow2_128 = Vale.Def.Words_s.pow2_128
unfold let nat64 = Vale.Def.Types_s.nat64
let int_to_nat64 (i:int) : n:nat64{0 <= i && i < pow2_64 ==> i == n} =
Vale.Def.Words_s.int_to_natN pow2_64 i
unfold let nat128 = Vale.Def.Words_s.nat128
unfold let quad32 = Vale.Def.Types_s.quad32
type flag:eqtype = i:int{0 <= i /\ i < 16}
[@va_qattr] unfold let fCarry : flag = 0
[@va_qattr] unfold let fOverflow : flag = 11
let n_reg_files = 2
let reg_file_id = rf:nat{rf < n_reg_files}
let n_regs (rf:reg_file_id) : nat =
match rf with
| 0 -> 16
| 1 -> 16
let t_reg_file (rf:reg_file_id) : Type0 =
match rf with
| 0 -> nat64
| 1 -> quad32
let reg_id (rf:reg_file_id) : Type0 = r:nat{r < n_regs rf}
[@va_qattr]
type reg =
| Reg: rf:reg_file_id -> r:reg_id rf -> reg
let t_reg (r:reg) : Type0 = t_reg_file r.rf
// Some register files can be used as integers (for addresses); others arbitrarily return 0
let t_reg_to_int (rf:reg_file_id) (v:t_reg_file rf) : int =
match rf with
| 0 -> v
| 1 -> 0
type maddr:eqtype =
| MConst: n:int -> maddr
| MReg: r:reg -> offset:int -> maddr
| MIndex: base:reg -> scale:int -> index:reg -> offset:int -> maddr
type tmaddr:eqtype = maddr & taint
[@va_qattr]
type operand (tc tr:eqtype) : eqtype =
| OConst: n:tc -> operand tc tr
| OReg: r:tr -> operand tc tr
| OMem: m:tmaddr -> operand tc tr
| OStack: m:tmaddr -> operand tc tr
[@va_qattr]
let operand_rf (rf:reg_file_id) : eqtype =
operand (t_reg_file rf) (reg_id rf)
[@va_qattr]
unfold let oreg (r:reg) : operand_rf r.rf =
OReg r.r
let reg_64 : Type0 = r:nat{r < 16}
let reg_xmm : Type0 = r:nat{r < 16}
[@va_qattr] unfold let rRax : reg_64 = 0
[@va_qattr] unfold let rRbx : reg_64 = 1
[@va_qattr] unfold let rRcx : reg_64 = 2
[@va_qattr] unfold let rRdx : reg_64 = 3
[@va_qattr] unfold let rRsi : reg_64 = 4
[@va_qattr] unfold let rRdi : reg_64 = 5
[@va_qattr] unfold let rRbp : reg_64 = 6
[@va_qattr] unfold let rRsp : reg_64 = 7
[@va_qattr] unfold let rR8 : reg_64 = 8
[@va_qattr] unfold let rR9 : reg_64 = 9
[@va_qattr] unfold let rR10 : reg_64 = 10
[@va_qattr] unfold let rR11 : reg_64 = 11
[@va_qattr] unfold let rR12 : reg_64 = 12
[@va_qattr] unfold let rR13 : reg_64 = 13 | false | true | Vale.X64.Machine_s.fst | {
"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_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val rR15:reg_64 | [] | Vale.X64.Machine_s.rR15 | {
"file_name": "vale/specs/hardware/Vale.X64.Machine_s.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | Vale.X64.Machine_s.reg_64 | {
"end_col": 41,
"end_line": 86,
"start_col": 39,
"start_line": 86
} |
Prims.Tot | val rR9:reg_64 | [
{
"abbrev": false,
"full_module": "Vale.Arch.HeapTypes_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let rR9 : reg_64 = 9 | val rR9:reg_64
let rR9:reg_64 = | false | null | false | 9 | {
"checked_file": "Vale.X64.Machine_s.fst.checked",
"dependencies": [
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.HeapTypes_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "Vale.X64.Machine_s.fst"
} | [
"total"
] | [] | [] | module Vale.X64.Machine_s
open FStar.Mul
include Vale.Arch.HeapTypes_s
irreducible let va_qattr = ()
unfold let pow2_32 = Vale.Def.Words_s.pow2_32
unfold let pow2_64 = Vale.Def.Words_s.pow2_64
unfold let pow2_128 = Vale.Def.Words_s.pow2_128
unfold let nat64 = Vale.Def.Types_s.nat64
let int_to_nat64 (i:int) : n:nat64{0 <= i && i < pow2_64 ==> i == n} =
Vale.Def.Words_s.int_to_natN pow2_64 i
unfold let nat128 = Vale.Def.Words_s.nat128
unfold let quad32 = Vale.Def.Types_s.quad32
type flag:eqtype = i:int{0 <= i /\ i < 16}
[@va_qattr] unfold let fCarry : flag = 0
[@va_qattr] unfold let fOverflow : flag = 11
let n_reg_files = 2
let reg_file_id = rf:nat{rf < n_reg_files}
let n_regs (rf:reg_file_id) : nat =
match rf with
| 0 -> 16
| 1 -> 16
let t_reg_file (rf:reg_file_id) : Type0 =
match rf with
| 0 -> nat64
| 1 -> quad32
let reg_id (rf:reg_file_id) : Type0 = r:nat{r < n_regs rf}
[@va_qattr]
type reg =
| Reg: rf:reg_file_id -> r:reg_id rf -> reg
let t_reg (r:reg) : Type0 = t_reg_file r.rf
// Some register files can be used as integers (for addresses); others arbitrarily return 0
let t_reg_to_int (rf:reg_file_id) (v:t_reg_file rf) : int =
match rf with
| 0 -> v
| 1 -> 0
type maddr:eqtype =
| MConst: n:int -> maddr
| MReg: r:reg -> offset:int -> maddr
| MIndex: base:reg -> scale:int -> index:reg -> offset:int -> maddr
type tmaddr:eqtype = maddr & taint
[@va_qattr]
type operand (tc tr:eqtype) : eqtype =
| OConst: n:tc -> operand tc tr
| OReg: r:tr -> operand tc tr
| OMem: m:tmaddr -> operand tc tr
| OStack: m:tmaddr -> operand tc tr
[@va_qattr]
let operand_rf (rf:reg_file_id) : eqtype =
operand (t_reg_file rf) (reg_id rf)
[@va_qattr]
unfold let oreg (r:reg) : operand_rf r.rf =
OReg r.r
let reg_64 : Type0 = r:nat{r < 16}
let reg_xmm : Type0 = r:nat{r < 16}
[@va_qattr] unfold let rRax : reg_64 = 0
[@va_qattr] unfold let rRbx : reg_64 = 1
[@va_qattr] unfold let rRcx : reg_64 = 2
[@va_qattr] unfold let rRdx : reg_64 = 3
[@va_qattr] unfold let rRsi : reg_64 = 4
[@va_qattr] unfold let rRdi : reg_64 = 5
[@va_qattr] unfold let rRbp : reg_64 = 6
[@va_qattr] unfold let rRsp : reg_64 = 7 | false | true | Vale.X64.Machine_s.fst | {
"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_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val rR9:reg_64 | [] | Vale.X64.Machine_s.rR9 | {
"file_name": "vale/specs/hardware/Vale.X64.Machine_s.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | Vale.X64.Machine_s.reg_64 | {
"end_col": 40,
"end_line": 80,
"start_col": 39,
"start_line": 80
} |
Prims.Tot | val rR8:reg_64 | [
{
"abbrev": false,
"full_module": "Vale.Arch.HeapTypes_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let rR8 : reg_64 = 8 | val rR8:reg_64
let rR8:reg_64 = | false | null | false | 8 | {
"checked_file": "Vale.X64.Machine_s.fst.checked",
"dependencies": [
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.HeapTypes_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "Vale.X64.Machine_s.fst"
} | [
"total"
] | [] | [] | module Vale.X64.Machine_s
open FStar.Mul
include Vale.Arch.HeapTypes_s
irreducible let va_qattr = ()
unfold let pow2_32 = Vale.Def.Words_s.pow2_32
unfold let pow2_64 = Vale.Def.Words_s.pow2_64
unfold let pow2_128 = Vale.Def.Words_s.pow2_128
unfold let nat64 = Vale.Def.Types_s.nat64
let int_to_nat64 (i:int) : n:nat64{0 <= i && i < pow2_64 ==> i == n} =
Vale.Def.Words_s.int_to_natN pow2_64 i
unfold let nat128 = Vale.Def.Words_s.nat128
unfold let quad32 = Vale.Def.Types_s.quad32
type flag:eqtype = i:int{0 <= i /\ i < 16}
[@va_qattr] unfold let fCarry : flag = 0
[@va_qattr] unfold let fOverflow : flag = 11
let n_reg_files = 2
let reg_file_id = rf:nat{rf < n_reg_files}
let n_regs (rf:reg_file_id) : nat =
match rf with
| 0 -> 16
| 1 -> 16
let t_reg_file (rf:reg_file_id) : Type0 =
match rf with
| 0 -> nat64
| 1 -> quad32
let reg_id (rf:reg_file_id) : Type0 = r:nat{r < n_regs rf}
[@va_qattr]
type reg =
| Reg: rf:reg_file_id -> r:reg_id rf -> reg
let t_reg (r:reg) : Type0 = t_reg_file r.rf
// Some register files can be used as integers (for addresses); others arbitrarily return 0
let t_reg_to_int (rf:reg_file_id) (v:t_reg_file rf) : int =
match rf with
| 0 -> v
| 1 -> 0
type maddr:eqtype =
| MConst: n:int -> maddr
| MReg: r:reg -> offset:int -> maddr
| MIndex: base:reg -> scale:int -> index:reg -> offset:int -> maddr
type tmaddr:eqtype = maddr & taint
[@va_qattr]
type operand (tc tr:eqtype) : eqtype =
| OConst: n:tc -> operand tc tr
| OReg: r:tr -> operand tc tr
| OMem: m:tmaddr -> operand tc tr
| OStack: m:tmaddr -> operand tc tr
[@va_qattr]
let operand_rf (rf:reg_file_id) : eqtype =
operand (t_reg_file rf) (reg_id rf)
[@va_qattr]
unfold let oreg (r:reg) : operand_rf r.rf =
OReg r.r
let reg_64 : Type0 = r:nat{r < 16}
let reg_xmm : Type0 = r:nat{r < 16}
[@va_qattr] unfold let rRax : reg_64 = 0
[@va_qattr] unfold let rRbx : reg_64 = 1
[@va_qattr] unfold let rRcx : reg_64 = 2
[@va_qattr] unfold let rRdx : reg_64 = 3
[@va_qattr] unfold let rRsi : reg_64 = 4
[@va_qattr] unfold let rRdi : reg_64 = 5
[@va_qattr] unfold let rRbp : reg_64 = 6 | false | true | Vale.X64.Machine_s.fst | {
"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_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val rR8:reg_64 | [] | Vale.X64.Machine_s.rR8 | {
"file_name": "vale/specs/hardware/Vale.X64.Machine_s.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | Vale.X64.Machine_s.reg_64 | {
"end_col": 40,
"end_line": 79,
"start_col": 39,
"start_line": 79
} |
Prims.Tot | val reg_64:Type0 | [
{
"abbrev": false,
"full_module": "Vale.Arch.HeapTypes_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let reg_64 : Type0 = r:nat{r < 16} | val reg_64:Type0
let reg_64:Type0 = | false | null | false | r: nat{r < 16} | {
"checked_file": "Vale.X64.Machine_s.fst.checked",
"dependencies": [
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.HeapTypes_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "Vale.X64.Machine_s.fst"
} | [
"total"
] | [
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan"
] | [] | module Vale.X64.Machine_s
open FStar.Mul
include Vale.Arch.HeapTypes_s
irreducible let va_qattr = ()
unfold let pow2_32 = Vale.Def.Words_s.pow2_32
unfold let pow2_64 = Vale.Def.Words_s.pow2_64
unfold let pow2_128 = Vale.Def.Words_s.pow2_128
unfold let nat64 = Vale.Def.Types_s.nat64
let int_to_nat64 (i:int) : n:nat64{0 <= i && i < pow2_64 ==> i == n} =
Vale.Def.Words_s.int_to_natN pow2_64 i
unfold let nat128 = Vale.Def.Words_s.nat128
unfold let quad32 = Vale.Def.Types_s.quad32
type flag:eqtype = i:int{0 <= i /\ i < 16}
[@va_qattr] unfold let fCarry : flag = 0
[@va_qattr] unfold let fOverflow : flag = 11
let n_reg_files = 2
let reg_file_id = rf:nat{rf < n_reg_files}
let n_regs (rf:reg_file_id) : nat =
match rf with
| 0 -> 16
| 1 -> 16
let t_reg_file (rf:reg_file_id) : Type0 =
match rf with
| 0 -> nat64
| 1 -> quad32
let reg_id (rf:reg_file_id) : Type0 = r:nat{r < n_regs rf}
[@va_qattr]
type reg =
| Reg: rf:reg_file_id -> r:reg_id rf -> reg
let t_reg (r:reg) : Type0 = t_reg_file r.rf
// Some register files can be used as integers (for addresses); others arbitrarily return 0
let t_reg_to_int (rf:reg_file_id) (v:t_reg_file rf) : int =
match rf with
| 0 -> v
| 1 -> 0
type maddr:eqtype =
| MConst: n:int -> maddr
| MReg: r:reg -> offset:int -> maddr
| MIndex: base:reg -> scale:int -> index:reg -> offset:int -> maddr
type tmaddr:eqtype = maddr & taint
[@va_qattr]
type operand (tc tr:eqtype) : eqtype =
| OConst: n:tc -> operand tc tr
| OReg: r:tr -> operand tc tr
| OMem: m:tmaddr -> operand tc tr
| OStack: m:tmaddr -> operand tc tr
[@va_qattr]
let operand_rf (rf:reg_file_id) : eqtype =
operand (t_reg_file rf) (reg_id rf)
[@va_qattr]
unfold let oreg (r:reg) : operand_rf r.rf =
OReg r.r | false | true | Vale.X64.Machine_s.fst | {
"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_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val reg_64:Type0 | [] | Vale.X64.Machine_s.reg_64 | {
"file_name": "vale/specs/hardware/Vale.X64.Machine_s.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | Type0 | {
"end_col": 34,
"end_line": 68,
"start_col": 21,
"start_line": 68
} |
Prims.Tot | [
{
"abbrev": false,
"full_module": "Vale.Arch.HeapTypes_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let n_reg_files = 2 | let n_reg_files = | false | null | false | 2 | {
"checked_file": "Vale.X64.Machine_s.fst.checked",
"dependencies": [
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.HeapTypes_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "Vale.X64.Machine_s.fst"
} | [
"total"
] | [] | [] | module Vale.X64.Machine_s
open FStar.Mul
include Vale.Arch.HeapTypes_s
irreducible let va_qattr = ()
unfold let pow2_32 = Vale.Def.Words_s.pow2_32
unfold let pow2_64 = Vale.Def.Words_s.pow2_64
unfold let pow2_128 = Vale.Def.Words_s.pow2_128
unfold let nat64 = Vale.Def.Types_s.nat64
let int_to_nat64 (i:int) : n:nat64{0 <= i && i < pow2_64 ==> i == n} =
Vale.Def.Words_s.int_to_natN pow2_64 i
unfold let nat128 = Vale.Def.Words_s.nat128
unfold let quad32 = Vale.Def.Types_s.quad32
type flag:eqtype = i:int{0 <= i /\ i < 16}
[@va_qattr] unfold let fCarry : flag = 0
[@va_qattr] unfold let fOverflow : flag = 11 | false | true | Vale.X64.Machine_s.fst | {
"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_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val n_reg_files : Prims.int | [] | Vale.X64.Machine_s.n_reg_files | {
"file_name": "vale/specs/hardware/Vale.X64.Machine_s.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | Prims.int | {
"end_col": 19,
"end_line": 21,
"start_col": 18,
"start_line": 21
} |
|
Prims.Tot | val rRcx:reg_64 | [
{
"abbrev": false,
"full_module": "Vale.Arch.HeapTypes_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let rRcx : reg_64 = 2 | val rRcx:reg_64
let rRcx:reg_64 = | false | null | false | 2 | {
"checked_file": "Vale.X64.Machine_s.fst.checked",
"dependencies": [
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.HeapTypes_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "Vale.X64.Machine_s.fst"
} | [
"total"
] | [] | [] | module Vale.X64.Machine_s
open FStar.Mul
include Vale.Arch.HeapTypes_s
irreducible let va_qattr = ()
unfold let pow2_32 = Vale.Def.Words_s.pow2_32
unfold let pow2_64 = Vale.Def.Words_s.pow2_64
unfold let pow2_128 = Vale.Def.Words_s.pow2_128
unfold let nat64 = Vale.Def.Types_s.nat64
let int_to_nat64 (i:int) : n:nat64{0 <= i && i < pow2_64 ==> i == n} =
Vale.Def.Words_s.int_to_natN pow2_64 i
unfold let nat128 = Vale.Def.Words_s.nat128
unfold let quad32 = Vale.Def.Types_s.quad32
type flag:eqtype = i:int{0 <= i /\ i < 16}
[@va_qattr] unfold let fCarry : flag = 0
[@va_qattr] unfold let fOverflow : flag = 11
let n_reg_files = 2
let reg_file_id = rf:nat{rf < n_reg_files}
let n_regs (rf:reg_file_id) : nat =
match rf with
| 0 -> 16
| 1 -> 16
let t_reg_file (rf:reg_file_id) : Type0 =
match rf with
| 0 -> nat64
| 1 -> quad32
let reg_id (rf:reg_file_id) : Type0 = r:nat{r < n_regs rf}
[@va_qattr]
type reg =
| Reg: rf:reg_file_id -> r:reg_id rf -> reg
let t_reg (r:reg) : Type0 = t_reg_file r.rf
// Some register files can be used as integers (for addresses); others arbitrarily return 0
let t_reg_to_int (rf:reg_file_id) (v:t_reg_file rf) : int =
match rf with
| 0 -> v
| 1 -> 0
type maddr:eqtype =
| MConst: n:int -> maddr
| MReg: r:reg -> offset:int -> maddr
| MIndex: base:reg -> scale:int -> index:reg -> offset:int -> maddr
type tmaddr:eqtype = maddr & taint
[@va_qattr]
type operand (tc tr:eqtype) : eqtype =
| OConst: n:tc -> operand tc tr
| OReg: r:tr -> operand tc tr
| OMem: m:tmaddr -> operand tc tr
| OStack: m:tmaddr -> operand tc tr
[@va_qattr]
let operand_rf (rf:reg_file_id) : eqtype =
operand (t_reg_file rf) (reg_id rf)
[@va_qattr]
unfold let oreg (r:reg) : operand_rf r.rf =
OReg r.r
let reg_64 : Type0 = r:nat{r < 16}
let reg_xmm : Type0 = r:nat{r < 16}
[@va_qattr] unfold let rRax : reg_64 = 0 | false | true | Vale.X64.Machine_s.fst | {
"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_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val rRcx:reg_64 | [] | Vale.X64.Machine_s.rRcx | {
"file_name": "vale/specs/hardware/Vale.X64.Machine_s.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | Vale.X64.Machine_s.reg_64 | {
"end_col": 40,
"end_line": 73,
"start_col": 39,
"start_line": 73
} |
Prims.Tot | val fCarry:flag | [
{
"abbrev": false,
"full_module": "Vale.Arch.HeapTypes_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let fCarry : flag = 0 | val fCarry:flag
let fCarry:flag = | false | null | false | 0 | {
"checked_file": "Vale.X64.Machine_s.fst.checked",
"dependencies": [
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.HeapTypes_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "Vale.X64.Machine_s.fst"
} | [
"total"
] | [] | [] | module Vale.X64.Machine_s
open FStar.Mul
include Vale.Arch.HeapTypes_s
irreducible let va_qattr = ()
unfold let pow2_32 = Vale.Def.Words_s.pow2_32
unfold let pow2_64 = Vale.Def.Words_s.pow2_64
unfold let pow2_128 = Vale.Def.Words_s.pow2_128
unfold let nat64 = Vale.Def.Types_s.nat64
let int_to_nat64 (i:int) : n:nat64{0 <= i && i < pow2_64 ==> i == n} =
Vale.Def.Words_s.int_to_natN pow2_64 i
unfold let nat128 = Vale.Def.Words_s.nat128
unfold let quad32 = Vale.Def.Types_s.quad32
type flag:eqtype = i:int{0 <= i /\ i < 16} | false | true | Vale.X64.Machine_s.fst | {
"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_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val fCarry:flag | [] | Vale.X64.Machine_s.fCarry | {
"file_name": "vale/specs/hardware/Vale.X64.Machine_s.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | Vale.X64.Machine_s.flag | {
"end_col": 43,
"end_line": 18,
"start_col": 42,
"start_line": 18
} |
Prims.Tot | val rRdi:reg_64 | [
{
"abbrev": false,
"full_module": "Vale.Arch.HeapTypes_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let rRdi : reg_64 = 5 | val rRdi:reg_64
let rRdi:reg_64 = | false | null | false | 5 | {
"checked_file": "Vale.X64.Machine_s.fst.checked",
"dependencies": [
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.HeapTypes_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "Vale.X64.Machine_s.fst"
} | [
"total"
] | [] | [] | module Vale.X64.Machine_s
open FStar.Mul
include Vale.Arch.HeapTypes_s
irreducible let va_qattr = ()
unfold let pow2_32 = Vale.Def.Words_s.pow2_32
unfold let pow2_64 = Vale.Def.Words_s.pow2_64
unfold let pow2_128 = Vale.Def.Words_s.pow2_128
unfold let nat64 = Vale.Def.Types_s.nat64
let int_to_nat64 (i:int) : n:nat64{0 <= i && i < pow2_64 ==> i == n} =
Vale.Def.Words_s.int_to_natN pow2_64 i
unfold let nat128 = Vale.Def.Words_s.nat128
unfold let quad32 = Vale.Def.Types_s.quad32
type flag:eqtype = i:int{0 <= i /\ i < 16}
[@va_qattr] unfold let fCarry : flag = 0
[@va_qattr] unfold let fOverflow : flag = 11
let n_reg_files = 2
let reg_file_id = rf:nat{rf < n_reg_files}
let n_regs (rf:reg_file_id) : nat =
match rf with
| 0 -> 16
| 1 -> 16
let t_reg_file (rf:reg_file_id) : Type0 =
match rf with
| 0 -> nat64
| 1 -> quad32
let reg_id (rf:reg_file_id) : Type0 = r:nat{r < n_regs rf}
[@va_qattr]
type reg =
| Reg: rf:reg_file_id -> r:reg_id rf -> reg
let t_reg (r:reg) : Type0 = t_reg_file r.rf
// Some register files can be used as integers (for addresses); others arbitrarily return 0
let t_reg_to_int (rf:reg_file_id) (v:t_reg_file rf) : int =
match rf with
| 0 -> v
| 1 -> 0
type maddr:eqtype =
| MConst: n:int -> maddr
| MReg: r:reg -> offset:int -> maddr
| MIndex: base:reg -> scale:int -> index:reg -> offset:int -> maddr
type tmaddr:eqtype = maddr & taint
[@va_qattr]
type operand (tc tr:eqtype) : eqtype =
| OConst: n:tc -> operand tc tr
| OReg: r:tr -> operand tc tr
| OMem: m:tmaddr -> operand tc tr
| OStack: m:tmaddr -> operand tc tr
[@va_qattr]
let operand_rf (rf:reg_file_id) : eqtype =
operand (t_reg_file rf) (reg_id rf)
[@va_qattr]
unfold let oreg (r:reg) : operand_rf r.rf =
OReg r.r
let reg_64 : Type0 = r:nat{r < 16}
let reg_xmm : Type0 = r:nat{r < 16}
[@va_qattr] unfold let rRax : reg_64 = 0
[@va_qattr] unfold let rRbx : reg_64 = 1
[@va_qattr] unfold let rRcx : reg_64 = 2
[@va_qattr] unfold let rRdx : reg_64 = 3 | false | true | Vale.X64.Machine_s.fst | {
"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_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val rRdi:reg_64 | [] | Vale.X64.Machine_s.rRdi | {
"file_name": "vale/specs/hardware/Vale.X64.Machine_s.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | Vale.X64.Machine_s.reg_64 | {
"end_col": 40,
"end_line": 76,
"start_col": 39,
"start_line": 76
} |
Prims.Tot | val rR10:reg_64 | [
{
"abbrev": false,
"full_module": "Vale.Arch.HeapTypes_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let rR10 : reg_64 = 10 | val rR10:reg_64
let rR10:reg_64 = | false | null | false | 10 | {
"checked_file": "Vale.X64.Machine_s.fst.checked",
"dependencies": [
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.HeapTypes_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "Vale.X64.Machine_s.fst"
} | [
"total"
] | [] | [] | module Vale.X64.Machine_s
open FStar.Mul
include Vale.Arch.HeapTypes_s
irreducible let va_qattr = ()
unfold let pow2_32 = Vale.Def.Words_s.pow2_32
unfold let pow2_64 = Vale.Def.Words_s.pow2_64
unfold let pow2_128 = Vale.Def.Words_s.pow2_128
unfold let nat64 = Vale.Def.Types_s.nat64
let int_to_nat64 (i:int) : n:nat64{0 <= i && i < pow2_64 ==> i == n} =
Vale.Def.Words_s.int_to_natN pow2_64 i
unfold let nat128 = Vale.Def.Words_s.nat128
unfold let quad32 = Vale.Def.Types_s.quad32
type flag:eqtype = i:int{0 <= i /\ i < 16}
[@va_qattr] unfold let fCarry : flag = 0
[@va_qattr] unfold let fOverflow : flag = 11
let n_reg_files = 2
let reg_file_id = rf:nat{rf < n_reg_files}
let n_regs (rf:reg_file_id) : nat =
match rf with
| 0 -> 16
| 1 -> 16
let t_reg_file (rf:reg_file_id) : Type0 =
match rf with
| 0 -> nat64
| 1 -> quad32
let reg_id (rf:reg_file_id) : Type0 = r:nat{r < n_regs rf}
[@va_qattr]
type reg =
| Reg: rf:reg_file_id -> r:reg_id rf -> reg
let t_reg (r:reg) : Type0 = t_reg_file r.rf
// Some register files can be used as integers (for addresses); others arbitrarily return 0
let t_reg_to_int (rf:reg_file_id) (v:t_reg_file rf) : int =
match rf with
| 0 -> v
| 1 -> 0
type maddr:eqtype =
| MConst: n:int -> maddr
| MReg: r:reg -> offset:int -> maddr
| MIndex: base:reg -> scale:int -> index:reg -> offset:int -> maddr
type tmaddr:eqtype = maddr & taint
[@va_qattr]
type operand (tc tr:eqtype) : eqtype =
| OConst: n:tc -> operand tc tr
| OReg: r:tr -> operand tc tr
| OMem: m:tmaddr -> operand tc tr
| OStack: m:tmaddr -> operand tc tr
[@va_qattr]
let operand_rf (rf:reg_file_id) : eqtype =
operand (t_reg_file rf) (reg_id rf)
[@va_qattr]
unfold let oreg (r:reg) : operand_rf r.rf =
OReg r.r
let reg_64 : Type0 = r:nat{r < 16}
let reg_xmm : Type0 = r:nat{r < 16}
[@va_qattr] unfold let rRax : reg_64 = 0
[@va_qattr] unfold let rRbx : reg_64 = 1
[@va_qattr] unfold let rRcx : reg_64 = 2
[@va_qattr] unfold let rRdx : reg_64 = 3
[@va_qattr] unfold let rRsi : reg_64 = 4
[@va_qattr] unfold let rRdi : reg_64 = 5
[@va_qattr] unfold let rRbp : reg_64 = 6
[@va_qattr] unfold let rRsp : reg_64 = 7
[@va_qattr] unfold let rR8 : reg_64 = 8 | false | true | Vale.X64.Machine_s.fst | {
"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_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val rR10:reg_64 | [] | Vale.X64.Machine_s.rR10 | {
"file_name": "vale/specs/hardware/Vale.X64.Machine_s.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | Vale.X64.Machine_s.reg_64 | {
"end_col": 41,
"end_line": 81,
"start_col": 39,
"start_line": 81
} |
Prims.Tot | val fOverflow:flag | [
{
"abbrev": false,
"full_module": "Vale.Arch.HeapTypes_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let fOverflow : flag = 11 | val fOverflow:flag
let fOverflow:flag = | false | null | false | 11 | {
"checked_file": "Vale.X64.Machine_s.fst.checked",
"dependencies": [
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.HeapTypes_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "Vale.X64.Machine_s.fst"
} | [
"total"
] | [] | [] | module Vale.X64.Machine_s
open FStar.Mul
include Vale.Arch.HeapTypes_s
irreducible let va_qattr = ()
unfold let pow2_32 = Vale.Def.Words_s.pow2_32
unfold let pow2_64 = Vale.Def.Words_s.pow2_64
unfold let pow2_128 = Vale.Def.Words_s.pow2_128
unfold let nat64 = Vale.Def.Types_s.nat64
let int_to_nat64 (i:int) : n:nat64{0 <= i && i < pow2_64 ==> i == n} =
Vale.Def.Words_s.int_to_natN pow2_64 i
unfold let nat128 = Vale.Def.Words_s.nat128
unfold let quad32 = Vale.Def.Types_s.quad32
type flag:eqtype = i:int{0 <= i /\ i < 16} | false | true | Vale.X64.Machine_s.fst | {
"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_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val fOverflow:flag | [] | Vale.X64.Machine_s.fOverflow | {
"file_name": "vale/specs/hardware/Vale.X64.Machine_s.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | Vale.X64.Machine_s.flag | {
"end_col": 44,
"end_line": 19,
"start_col": 42,
"start_line": 19
} |
Prims.Tot | val rRsp:reg_64 | [
{
"abbrev": false,
"full_module": "Vale.Arch.HeapTypes_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let rRsp : reg_64 = 7 | val rRsp:reg_64
let rRsp:reg_64 = | false | null | false | 7 | {
"checked_file": "Vale.X64.Machine_s.fst.checked",
"dependencies": [
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.HeapTypes_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "Vale.X64.Machine_s.fst"
} | [
"total"
] | [] | [] | module Vale.X64.Machine_s
open FStar.Mul
include Vale.Arch.HeapTypes_s
irreducible let va_qattr = ()
unfold let pow2_32 = Vale.Def.Words_s.pow2_32
unfold let pow2_64 = Vale.Def.Words_s.pow2_64
unfold let pow2_128 = Vale.Def.Words_s.pow2_128
unfold let nat64 = Vale.Def.Types_s.nat64
let int_to_nat64 (i:int) : n:nat64{0 <= i && i < pow2_64 ==> i == n} =
Vale.Def.Words_s.int_to_natN pow2_64 i
unfold let nat128 = Vale.Def.Words_s.nat128
unfold let quad32 = Vale.Def.Types_s.quad32
type flag:eqtype = i:int{0 <= i /\ i < 16}
[@va_qattr] unfold let fCarry : flag = 0
[@va_qattr] unfold let fOverflow : flag = 11
let n_reg_files = 2
let reg_file_id = rf:nat{rf < n_reg_files}
let n_regs (rf:reg_file_id) : nat =
match rf with
| 0 -> 16
| 1 -> 16
let t_reg_file (rf:reg_file_id) : Type0 =
match rf with
| 0 -> nat64
| 1 -> quad32
let reg_id (rf:reg_file_id) : Type0 = r:nat{r < n_regs rf}
[@va_qattr]
type reg =
| Reg: rf:reg_file_id -> r:reg_id rf -> reg
let t_reg (r:reg) : Type0 = t_reg_file r.rf
// Some register files can be used as integers (for addresses); others arbitrarily return 0
let t_reg_to_int (rf:reg_file_id) (v:t_reg_file rf) : int =
match rf with
| 0 -> v
| 1 -> 0
type maddr:eqtype =
| MConst: n:int -> maddr
| MReg: r:reg -> offset:int -> maddr
| MIndex: base:reg -> scale:int -> index:reg -> offset:int -> maddr
type tmaddr:eqtype = maddr & taint
[@va_qattr]
type operand (tc tr:eqtype) : eqtype =
| OConst: n:tc -> operand tc tr
| OReg: r:tr -> operand tc tr
| OMem: m:tmaddr -> operand tc tr
| OStack: m:tmaddr -> operand tc tr
[@va_qattr]
let operand_rf (rf:reg_file_id) : eqtype =
operand (t_reg_file rf) (reg_id rf)
[@va_qattr]
unfold let oreg (r:reg) : operand_rf r.rf =
OReg r.r
let reg_64 : Type0 = r:nat{r < 16}
let reg_xmm : Type0 = r:nat{r < 16}
[@va_qattr] unfold let rRax : reg_64 = 0
[@va_qattr] unfold let rRbx : reg_64 = 1
[@va_qattr] unfold let rRcx : reg_64 = 2
[@va_qattr] unfold let rRdx : reg_64 = 3
[@va_qattr] unfold let rRsi : reg_64 = 4
[@va_qattr] unfold let rRdi : reg_64 = 5 | false | true | Vale.X64.Machine_s.fst | {
"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_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val rRsp:reg_64 | [] | Vale.X64.Machine_s.rRsp | {
"file_name": "vale/specs/hardware/Vale.X64.Machine_s.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | Vale.X64.Machine_s.reg_64 | {
"end_col": 40,
"end_line": 78,
"start_col": 39,
"start_line": 78
} |
Prims.Tot | val rR13:reg_64 | [
{
"abbrev": false,
"full_module": "Vale.Arch.HeapTypes_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let rR13 : reg_64 = 13 | val rR13:reg_64
let rR13:reg_64 = | false | null | false | 13 | {
"checked_file": "Vale.X64.Machine_s.fst.checked",
"dependencies": [
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.HeapTypes_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "Vale.X64.Machine_s.fst"
} | [
"total"
] | [] | [] | module Vale.X64.Machine_s
open FStar.Mul
include Vale.Arch.HeapTypes_s
irreducible let va_qattr = ()
unfold let pow2_32 = Vale.Def.Words_s.pow2_32
unfold let pow2_64 = Vale.Def.Words_s.pow2_64
unfold let pow2_128 = Vale.Def.Words_s.pow2_128
unfold let nat64 = Vale.Def.Types_s.nat64
let int_to_nat64 (i:int) : n:nat64{0 <= i && i < pow2_64 ==> i == n} =
Vale.Def.Words_s.int_to_natN pow2_64 i
unfold let nat128 = Vale.Def.Words_s.nat128
unfold let quad32 = Vale.Def.Types_s.quad32
type flag:eqtype = i:int{0 <= i /\ i < 16}
[@va_qattr] unfold let fCarry : flag = 0
[@va_qattr] unfold let fOverflow : flag = 11
let n_reg_files = 2
let reg_file_id = rf:nat{rf < n_reg_files}
let n_regs (rf:reg_file_id) : nat =
match rf with
| 0 -> 16
| 1 -> 16
let t_reg_file (rf:reg_file_id) : Type0 =
match rf with
| 0 -> nat64
| 1 -> quad32
let reg_id (rf:reg_file_id) : Type0 = r:nat{r < n_regs rf}
[@va_qattr]
type reg =
| Reg: rf:reg_file_id -> r:reg_id rf -> reg
let t_reg (r:reg) : Type0 = t_reg_file r.rf
// Some register files can be used as integers (for addresses); others arbitrarily return 0
let t_reg_to_int (rf:reg_file_id) (v:t_reg_file rf) : int =
match rf with
| 0 -> v
| 1 -> 0
type maddr:eqtype =
| MConst: n:int -> maddr
| MReg: r:reg -> offset:int -> maddr
| MIndex: base:reg -> scale:int -> index:reg -> offset:int -> maddr
type tmaddr:eqtype = maddr & taint
[@va_qattr]
type operand (tc tr:eqtype) : eqtype =
| OConst: n:tc -> operand tc tr
| OReg: r:tr -> operand tc tr
| OMem: m:tmaddr -> operand tc tr
| OStack: m:tmaddr -> operand tc tr
[@va_qattr]
let operand_rf (rf:reg_file_id) : eqtype =
operand (t_reg_file rf) (reg_id rf)
[@va_qattr]
unfold let oreg (r:reg) : operand_rf r.rf =
OReg r.r
let reg_64 : Type0 = r:nat{r < 16}
let reg_xmm : Type0 = r:nat{r < 16}
[@va_qattr] unfold let rRax : reg_64 = 0
[@va_qattr] unfold let rRbx : reg_64 = 1
[@va_qattr] unfold let rRcx : reg_64 = 2
[@va_qattr] unfold let rRdx : reg_64 = 3
[@va_qattr] unfold let rRsi : reg_64 = 4
[@va_qattr] unfold let rRdi : reg_64 = 5
[@va_qattr] unfold let rRbp : reg_64 = 6
[@va_qattr] unfold let rRsp : reg_64 = 7
[@va_qattr] unfold let rR8 : reg_64 = 8
[@va_qattr] unfold let rR9 : reg_64 = 9
[@va_qattr] unfold let rR10 : reg_64 = 10
[@va_qattr] unfold let rR11 : reg_64 = 11 | false | true | Vale.X64.Machine_s.fst | {
"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_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val rR13:reg_64 | [] | Vale.X64.Machine_s.rR13 | {
"file_name": "vale/specs/hardware/Vale.X64.Machine_s.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | Vale.X64.Machine_s.reg_64 | {
"end_col": 41,
"end_line": 84,
"start_col": 39,
"start_line": 84
} |
Prims.Tot | [
{
"abbrev": false,
"full_module": "Vale.Arch.HeapTypes_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let pow2_32 = Vale.Def.Words_s.pow2_32 | let pow2_32 = | false | null | false | Vale.Def.Words_s.pow2_32 | {
"checked_file": "Vale.X64.Machine_s.fst.checked",
"dependencies": [
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.HeapTypes_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "Vale.X64.Machine_s.fst"
} | [
"total"
] | [
"Vale.Def.Words_s.pow2_32"
] | [] | module Vale.X64.Machine_s
open FStar.Mul
include Vale.Arch.HeapTypes_s | false | true | Vale.X64.Machine_s.fst | {
"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_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val pow2_32 : Prims.int | [] | Vale.X64.Machine_s.pow2_32 | {
"file_name": "vale/specs/hardware/Vale.X64.Machine_s.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | Prims.int | {
"end_col": 45,
"end_line": 6,
"start_col": 21,
"start_line": 6
} |
|
Prims.Tot | val rR12:reg_64 | [
{
"abbrev": false,
"full_module": "Vale.Arch.HeapTypes_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let rR12 : reg_64 = 12 | val rR12:reg_64
let rR12:reg_64 = | false | null | false | 12 | {
"checked_file": "Vale.X64.Machine_s.fst.checked",
"dependencies": [
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.HeapTypes_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "Vale.X64.Machine_s.fst"
} | [
"total"
] | [] | [] | module Vale.X64.Machine_s
open FStar.Mul
include Vale.Arch.HeapTypes_s
irreducible let va_qattr = ()
unfold let pow2_32 = Vale.Def.Words_s.pow2_32
unfold let pow2_64 = Vale.Def.Words_s.pow2_64
unfold let pow2_128 = Vale.Def.Words_s.pow2_128
unfold let nat64 = Vale.Def.Types_s.nat64
let int_to_nat64 (i:int) : n:nat64{0 <= i && i < pow2_64 ==> i == n} =
Vale.Def.Words_s.int_to_natN pow2_64 i
unfold let nat128 = Vale.Def.Words_s.nat128
unfold let quad32 = Vale.Def.Types_s.quad32
type flag:eqtype = i:int{0 <= i /\ i < 16}
[@va_qattr] unfold let fCarry : flag = 0
[@va_qattr] unfold let fOverflow : flag = 11
let n_reg_files = 2
let reg_file_id = rf:nat{rf < n_reg_files}
let n_regs (rf:reg_file_id) : nat =
match rf with
| 0 -> 16
| 1 -> 16
let t_reg_file (rf:reg_file_id) : Type0 =
match rf with
| 0 -> nat64
| 1 -> quad32
let reg_id (rf:reg_file_id) : Type0 = r:nat{r < n_regs rf}
[@va_qattr]
type reg =
| Reg: rf:reg_file_id -> r:reg_id rf -> reg
let t_reg (r:reg) : Type0 = t_reg_file r.rf
// Some register files can be used as integers (for addresses); others arbitrarily return 0
let t_reg_to_int (rf:reg_file_id) (v:t_reg_file rf) : int =
match rf with
| 0 -> v
| 1 -> 0
type maddr:eqtype =
| MConst: n:int -> maddr
| MReg: r:reg -> offset:int -> maddr
| MIndex: base:reg -> scale:int -> index:reg -> offset:int -> maddr
type tmaddr:eqtype = maddr & taint
[@va_qattr]
type operand (tc tr:eqtype) : eqtype =
| OConst: n:tc -> operand tc tr
| OReg: r:tr -> operand tc tr
| OMem: m:tmaddr -> operand tc tr
| OStack: m:tmaddr -> operand tc tr
[@va_qattr]
let operand_rf (rf:reg_file_id) : eqtype =
operand (t_reg_file rf) (reg_id rf)
[@va_qattr]
unfold let oreg (r:reg) : operand_rf r.rf =
OReg r.r
let reg_64 : Type0 = r:nat{r < 16}
let reg_xmm : Type0 = r:nat{r < 16}
[@va_qattr] unfold let rRax : reg_64 = 0
[@va_qattr] unfold let rRbx : reg_64 = 1
[@va_qattr] unfold let rRcx : reg_64 = 2
[@va_qattr] unfold let rRdx : reg_64 = 3
[@va_qattr] unfold let rRsi : reg_64 = 4
[@va_qattr] unfold let rRdi : reg_64 = 5
[@va_qattr] unfold let rRbp : reg_64 = 6
[@va_qattr] unfold let rRsp : reg_64 = 7
[@va_qattr] unfold let rR8 : reg_64 = 8
[@va_qattr] unfold let rR9 : reg_64 = 9
[@va_qattr] unfold let rR10 : reg_64 = 10 | false | true | Vale.X64.Machine_s.fst | {
"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_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val rR12:reg_64 | [] | Vale.X64.Machine_s.rR12 | {
"file_name": "vale/specs/hardware/Vale.X64.Machine_s.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | Vale.X64.Machine_s.reg_64 | {
"end_col": 41,
"end_line": 83,
"start_col": 39,
"start_line": 83
} |
Prims.Tot | val rRbp:reg_64 | [
{
"abbrev": false,
"full_module": "Vale.Arch.HeapTypes_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let rRbp : reg_64 = 6 | val rRbp:reg_64
let rRbp:reg_64 = | false | null | false | 6 | {
"checked_file": "Vale.X64.Machine_s.fst.checked",
"dependencies": [
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.HeapTypes_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "Vale.X64.Machine_s.fst"
} | [
"total"
] | [] | [] | module Vale.X64.Machine_s
open FStar.Mul
include Vale.Arch.HeapTypes_s
irreducible let va_qattr = ()
unfold let pow2_32 = Vale.Def.Words_s.pow2_32
unfold let pow2_64 = Vale.Def.Words_s.pow2_64
unfold let pow2_128 = Vale.Def.Words_s.pow2_128
unfold let nat64 = Vale.Def.Types_s.nat64
let int_to_nat64 (i:int) : n:nat64{0 <= i && i < pow2_64 ==> i == n} =
Vale.Def.Words_s.int_to_natN pow2_64 i
unfold let nat128 = Vale.Def.Words_s.nat128
unfold let quad32 = Vale.Def.Types_s.quad32
type flag:eqtype = i:int{0 <= i /\ i < 16}
[@va_qattr] unfold let fCarry : flag = 0
[@va_qattr] unfold let fOverflow : flag = 11
let n_reg_files = 2
let reg_file_id = rf:nat{rf < n_reg_files}
let n_regs (rf:reg_file_id) : nat =
match rf with
| 0 -> 16
| 1 -> 16
let t_reg_file (rf:reg_file_id) : Type0 =
match rf with
| 0 -> nat64
| 1 -> quad32
let reg_id (rf:reg_file_id) : Type0 = r:nat{r < n_regs rf}
[@va_qattr]
type reg =
| Reg: rf:reg_file_id -> r:reg_id rf -> reg
let t_reg (r:reg) : Type0 = t_reg_file r.rf
// Some register files can be used as integers (for addresses); others arbitrarily return 0
let t_reg_to_int (rf:reg_file_id) (v:t_reg_file rf) : int =
match rf with
| 0 -> v
| 1 -> 0
type maddr:eqtype =
| MConst: n:int -> maddr
| MReg: r:reg -> offset:int -> maddr
| MIndex: base:reg -> scale:int -> index:reg -> offset:int -> maddr
type tmaddr:eqtype = maddr & taint
[@va_qattr]
type operand (tc tr:eqtype) : eqtype =
| OConst: n:tc -> operand tc tr
| OReg: r:tr -> operand tc tr
| OMem: m:tmaddr -> operand tc tr
| OStack: m:tmaddr -> operand tc tr
[@va_qattr]
let operand_rf (rf:reg_file_id) : eqtype =
operand (t_reg_file rf) (reg_id rf)
[@va_qattr]
unfold let oreg (r:reg) : operand_rf r.rf =
OReg r.r
let reg_64 : Type0 = r:nat{r < 16}
let reg_xmm : Type0 = r:nat{r < 16}
[@va_qattr] unfold let rRax : reg_64 = 0
[@va_qattr] unfold let rRbx : reg_64 = 1
[@va_qattr] unfold let rRcx : reg_64 = 2
[@va_qattr] unfold let rRdx : reg_64 = 3
[@va_qattr] unfold let rRsi : reg_64 = 4 | false | true | Vale.X64.Machine_s.fst | {
"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_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val rRbp:reg_64 | [] | Vale.X64.Machine_s.rRbp | {
"file_name": "vale/specs/hardware/Vale.X64.Machine_s.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | Vale.X64.Machine_s.reg_64 | {
"end_col": 40,
"end_line": 77,
"start_col": 39,
"start_line": 77
} |
Prims.Tot | val rRdx:reg_64 | [
{
"abbrev": false,
"full_module": "Vale.Arch.HeapTypes_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let rRdx : reg_64 = 3 | val rRdx:reg_64
let rRdx:reg_64 = | false | null | false | 3 | {
"checked_file": "Vale.X64.Machine_s.fst.checked",
"dependencies": [
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.HeapTypes_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "Vale.X64.Machine_s.fst"
} | [
"total"
] | [] | [] | module Vale.X64.Machine_s
open FStar.Mul
include Vale.Arch.HeapTypes_s
irreducible let va_qattr = ()
unfold let pow2_32 = Vale.Def.Words_s.pow2_32
unfold let pow2_64 = Vale.Def.Words_s.pow2_64
unfold let pow2_128 = Vale.Def.Words_s.pow2_128
unfold let nat64 = Vale.Def.Types_s.nat64
let int_to_nat64 (i:int) : n:nat64{0 <= i && i < pow2_64 ==> i == n} =
Vale.Def.Words_s.int_to_natN pow2_64 i
unfold let nat128 = Vale.Def.Words_s.nat128
unfold let quad32 = Vale.Def.Types_s.quad32
type flag:eqtype = i:int{0 <= i /\ i < 16}
[@va_qattr] unfold let fCarry : flag = 0
[@va_qattr] unfold let fOverflow : flag = 11
let n_reg_files = 2
let reg_file_id = rf:nat{rf < n_reg_files}
let n_regs (rf:reg_file_id) : nat =
match rf with
| 0 -> 16
| 1 -> 16
let t_reg_file (rf:reg_file_id) : Type0 =
match rf with
| 0 -> nat64
| 1 -> quad32
let reg_id (rf:reg_file_id) : Type0 = r:nat{r < n_regs rf}
[@va_qattr]
type reg =
| Reg: rf:reg_file_id -> r:reg_id rf -> reg
let t_reg (r:reg) : Type0 = t_reg_file r.rf
// Some register files can be used as integers (for addresses); others arbitrarily return 0
let t_reg_to_int (rf:reg_file_id) (v:t_reg_file rf) : int =
match rf with
| 0 -> v
| 1 -> 0
type maddr:eqtype =
| MConst: n:int -> maddr
| MReg: r:reg -> offset:int -> maddr
| MIndex: base:reg -> scale:int -> index:reg -> offset:int -> maddr
type tmaddr:eqtype = maddr & taint
[@va_qattr]
type operand (tc tr:eqtype) : eqtype =
| OConst: n:tc -> operand tc tr
| OReg: r:tr -> operand tc tr
| OMem: m:tmaddr -> operand tc tr
| OStack: m:tmaddr -> operand tc tr
[@va_qattr]
let operand_rf (rf:reg_file_id) : eqtype =
operand (t_reg_file rf) (reg_id rf)
[@va_qattr]
unfold let oreg (r:reg) : operand_rf r.rf =
OReg r.r
let reg_64 : Type0 = r:nat{r < 16}
let reg_xmm : Type0 = r:nat{r < 16}
[@va_qattr] unfold let rRax : reg_64 = 0
[@va_qattr] unfold let rRbx : reg_64 = 1 | false | true | Vale.X64.Machine_s.fst | {
"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_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val rRdx:reg_64 | [] | Vale.X64.Machine_s.rRdx | {
"file_name": "vale/specs/hardware/Vale.X64.Machine_s.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | Vale.X64.Machine_s.reg_64 | {
"end_col": 40,
"end_line": 74,
"start_col": 39,
"start_line": 74
} |
Prims.Tot | val rR14:reg_64 | [
{
"abbrev": false,
"full_module": "Vale.Arch.HeapTypes_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let rR14 : reg_64 = 14 | val rR14:reg_64
let rR14:reg_64 = | false | null | false | 14 | {
"checked_file": "Vale.X64.Machine_s.fst.checked",
"dependencies": [
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.HeapTypes_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "Vale.X64.Machine_s.fst"
} | [
"total"
] | [] | [] | module Vale.X64.Machine_s
open FStar.Mul
include Vale.Arch.HeapTypes_s
irreducible let va_qattr = ()
unfold let pow2_32 = Vale.Def.Words_s.pow2_32
unfold let pow2_64 = Vale.Def.Words_s.pow2_64
unfold let pow2_128 = Vale.Def.Words_s.pow2_128
unfold let nat64 = Vale.Def.Types_s.nat64
let int_to_nat64 (i:int) : n:nat64{0 <= i && i < pow2_64 ==> i == n} =
Vale.Def.Words_s.int_to_natN pow2_64 i
unfold let nat128 = Vale.Def.Words_s.nat128
unfold let quad32 = Vale.Def.Types_s.quad32
type flag:eqtype = i:int{0 <= i /\ i < 16}
[@va_qattr] unfold let fCarry : flag = 0
[@va_qattr] unfold let fOverflow : flag = 11
let n_reg_files = 2
let reg_file_id = rf:nat{rf < n_reg_files}
let n_regs (rf:reg_file_id) : nat =
match rf with
| 0 -> 16
| 1 -> 16
let t_reg_file (rf:reg_file_id) : Type0 =
match rf with
| 0 -> nat64
| 1 -> quad32
let reg_id (rf:reg_file_id) : Type0 = r:nat{r < n_regs rf}
[@va_qattr]
type reg =
| Reg: rf:reg_file_id -> r:reg_id rf -> reg
let t_reg (r:reg) : Type0 = t_reg_file r.rf
// Some register files can be used as integers (for addresses); others arbitrarily return 0
let t_reg_to_int (rf:reg_file_id) (v:t_reg_file rf) : int =
match rf with
| 0 -> v
| 1 -> 0
type maddr:eqtype =
| MConst: n:int -> maddr
| MReg: r:reg -> offset:int -> maddr
| MIndex: base:reg -> scale:int -> index:reg -> offset:int -> maddr
type tmaddr:eqtype = maddr & taint
[@va_qattr]
type operand (tc tr:eqtype) : eqtype =
| OConst: n:tc -> operand tc tr
| OReg: r:tr -> operand tc tr
| OMem: m:tmaddr -> operand tc tr
| OStack: m:tmaddr -> operand tc tr
[@va_qattr]
let operand_rf (rf:reg_file_id) : eqtype =
operand (t_reg_file rf) (reg_id rf)
[@va_qattr]
unfold let oreg (r:reg) : operand_rf r.rf =
OReg r.r
let reg_64 : Type0 = r:nat{r < 16}
let reg_xmm : Type0 = r:nat{r < 16}
[@va_qattr] unfold let rRax : reg_64 = 0
[@va_qattr] unfold let rRbx : reg_64 = 1
[@va_qattr] unfold let rRcx : reg_64 = 2
[@va_qattr] unfold let rRdx : reg_64 = 3
[@va_qattr] unfold let rRsi : reg_64 = 4
[@va_qattr] unfold let rRdi : reg_64 = 5
[@va_qattr] unfold let rRbp : reg_64 = 6
[@va_qattr] unfold let rRsp : reg_64 = 7
[@va_qattr] unfold let rR8 : reg_64 = 8
[@va_qattr] unfold let rR9 : reg_64 = 9
[@va_qattr] unfold let rR10 : reg_64 = 10
[@va_qattr] unfold let rR11 : reg_64 = 11
[@va_qattr] unfold let rR12 : reg_64 = 12 | false | true | Vale.X64.Machine_s.fst | {
"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_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val rR14:reg_64 | [] | Vale.X64.Machine_s.rR14 | {
"file_name": "vale/specs/hardware/Vale.X64.Machine_s.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | Vale.X64.Machine_s.reg_64 | {
"end_col": 41,
"end_line": 85,
"start_col": 39,
"start_line": 85
} |
Prims.Tot | val reg_xmm:Type0 | [
{
"abbrev": false,
"full_module": "Vale.Arch.HeapTypes_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let reg_xmm : Type0 = r:nat{r < 16} | val reg_xmm:Type0
let reg_xmm:Type0 = | false | null | false | r: nat{r < 16} | {
"checked_file": "Vale.X64.Machine_s.fst.checked",
"dependencies": [
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.HeapTypes_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "Vale.X64.Machine_s.fst"
} | [
"total"
] | [
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan"
] | [] | module Vale.X64.Machine_s
open FStar.Mul
include Vale.Arch.HeapTypes_s
irreducible let va_qattr = ()
unfold let pow2_32 = Vale.Def.Words_s.pow2_32
unfold let pow2_64 = Vale.Def.Words_s.pow2_64
unfold let pow2_128 = Vale.Def.Words_s.pow2_128
unfold let nat64 = Vale.Def.Types_s.nat64
let int_to_nat64 (i:int) : n:nat64{0 <= i && i < pow2_64 ==> i == n} =
Vale.Def.Words_s.int_to_natN pow2_64 i
unfold let nat128 = Vale.Def.Words_s.nat128
unfold let quad32 = Vale.Def.Types_s.quad32
type flag:eqtype = i:int{0 <= i /\ i < 16}
[@va_qattr] unfold let fCarry : flag = 0
[@va_qattr] unfold let fOverflow : flag = 11
let n_reg_files = 2
let reg_file_id = rf:nat{rf < n_reg_files}
let n_regs (rf:reg_file_id) : nat =
match rf with
| 0 -> 16
| 1 -> 16
let t_reg_file (rf:reg_file_id) : Type0 =
match rf with
| 0 -> nat64
| 1 -> quad32
let reg_id (rf:reg_file_id) : Type0 = r:nat{r < n_regs rf}
[@va_qattr]
type reg =
| Reg: rf:reg_file_id -> r:reg_id rf -> reg
let t_reg (r:reg) : Type0 = t_reg_file r.rf
// Some register files can be used as integers (for addresses); others arbitrarily return 0
let t_reg_to_int (rf:reg_file_id) (v:t_reg_file rf) : int =
match rf with
| 0 -> v
| 1 -> 0
type maddr:eqtype =
| MConst: n:int -> maddr
| MReg: r:reg -> offset:int -> maddr
| MIndex: base:reg -> scale:int -> index:reg -> offset:int -> maddr
type tmaddr:eqtype = maddr & taint
[@va_qattr]
type operand (tc tr:eqtype) : eqtype =
| OConst: n:tc -> operand tc tr
| OReg: r:tr -> operand tc tr
| OMem: m:tmaddr -> operand tc tr
| OStack: m:tmaddr -> operand tc tr
[@va_qattr]
let operand_rf (rf:reg_file_id) : eqtype =
operand (t_reg_file rf) (reg_id rf)
[@va_qattr]
unfold let oreg (r:reg) : operand_rf r.rf =
OReg r.r | false | true | Vale.X64.Machine_s.fst | {
"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_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val reg_xmm:Type0 | [] | Vale.X64.Machine_s.reg_xmm | {
"file_name": "vale/specs/hardware/Vale.X64.Machine_s.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | Type0 | {
"end_col": 35,
"end_line": 69,
"start_col": 22,
"start_line": 69
} |
Prims.Tot | val rRax:reg_64 | [
{
"abbrev": false,
"full_module": "Vale.Arch.HeapTypes_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let rRax : reg_64 = 0 | val rRax:reg_64
let rRax:reg_64 = | false | null | false | 0 | {
"checked_file": "Vale.X64.Machine_s.fst.checked",
"dependencies": [
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.HeapTypes_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "Vale.X64.Machine_s.fst"
} | [
"total"
] | [] | [] | module Vale.X64.Machine_s
open FStar.Mul
include Vale.Arch.HeapTypes_s
irreducible let va_qattr = ()
unfold let pow2_32 = Vale.Def.Words_s.pow2_32
unfold let pow2_64 = Vale.Def.Words_s.pow2_64
unfold let pow2_128 = Vale.Def.Words_s.pow2_128
unfold let nat64 = Vale.Def.Types_s.nat64
let int_to_nat64 (i:int) : n:nat64{0 <= i && i < pow2_64 ==> i == n} =
Vale.Def.Words_s.int_to_natN pow2_64 i
unfold let nat128 = Vale.Def.Words_s.nat128
unfold let quad32 = Vale.Def.Types_s.quad32
type flag:eqtype = i:int{0 <= i /\ i < 16}
[@va_qattr] unfold let fCarry : flag = 0
[@va_qattr] unfold let fOverflow : flag = 11
let n_reg_files = 2
let reg_file_id = rf:nat{rf < n_reg_files}
let n_regs (rf:reg_file_id) : nat =
match rf with
| 0 -> 16
| 1 -> 16
let t_reg_file (rf:reg_file_id) : Type0 =
match rf with
| 0 -> nat64
| 1 -> quad32
let reg_id (rf:reg_file_id) : Type0 = r:nat{r < n_regs rf}
[@va_qattr]
type reg =
| Reg: rf:reg_file_id -> r:reg_id rf -> reg
let t_reg (r:reg) : Type0 = t_reg_file r.rf
// Some register files can be used as integers (for addresses); others arbitrarily return 0
let t_reg_to_int (rf:reg_file_id) (v:t_reg_file rf) : int =
match rf with
| 0 -> v
| 1 -> 0
type maddr:eqtype =
| MConst: n:int -> maddr
| MReg: r:reg -> offset:int -> maddr
| MIndex: base:reg -> scale:int -> index:reg -> offset:int -> maddr
type tmaddr:eqtype = maddr & taint
[@va_qattr]
type operand (tc tr:eqtype) : eqtype =
| OConst: n:tc -> operand tc tr
| OReg: r:tr -> operand tc tr
| OMem: m:tmaddr -> operand tc tr
| OStack: m:tmaddr -> operand tc tr
[@va_qattr]
let operand_rf (rf:reg_file_id) : eqtype =
operand (t_reg_file rf) (reg_id rf)
[@va_qattr]
unfold let oreg (r:reg) : operand_rf r.rf =
OReg r.r
let reg_64 : Type0 = r:nat{r < 16}
let reg_xmm : Type0 = r:nat{r < 16} | false | true | Vale.X64.Machine_s.fst | {
"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_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val rRax:reg_64 | [] | Vale.X64.Machine_s.rRax | {
"file_name": "vale/specs/hardware/Vale.X64.Machine_s.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | Vale.X64.Machine_s.reg_64 | {
"end_col": 40,
"end_line": 71,
"start_col": 39,
"start_line": 71
} |
Prims.Tot | val rR11:reg_64 | [
{
"abbrev": false,
"full_module": "Vale.Arch.HeapTypes_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let rR11 : reg_64 = 11 | val rR11:reg_64
let rR11:reg_64 = | false | null | false | 11 | {
"checked_file": "Vale.X64.Machine_s.fst.checked",
"dependencies": [
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.HeapTypes_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "Vale.X64.Machine_s.fst"
} | [
"total"
] | [] | [] | module Vale.X64.Machine_s
open FStar.Mul
include Vale.Arch.HeapTypes_s
irreducible let va_qattr = ()
unfold let pow2_32 = Vale.Def.Words_s.pow2_32
unfold let pow2_64 = Vale.Def.Words_s.pow2_64
unfold let pow2_128 = Vale.Def.Words_s.pow2_128
unfold let nat64 = Vale.Def.Types_s.nat64
let int_to_nat64 (i:int) : n:nat64{0 <= i && i < pow2_64 ==> i == n} =
Vale.Def.Words_s.int_to_natN pow2_64 i
unfold let nat128 = Vale.Def.Words_s.nat128
unfold let quad32 = Vale.Def.Types_s.quad32
type flag:eqtype = i:int{0 <= i /\ i < 16}
[@va_qattr] unfold let fCarry : flag = 0
[@va_qattr] unfold let fOverflow : flag = 11
let n_reg_files = 2
let reg_file_id = rf:nat{rf < n_reg_files}
let n_regs (rf:reg_file_id) : nat =
match rf with
| 0 -> 16
| 1 -> 16
let t_reg_file (rf:reg_file_id) : Type0 =
match rf with
| 0 -> nat64
| 1 -> quad32
let reg_id (rf:reg_file_id) : Type0 = r:nat{r < n_regs rf}
[@va_qattr]
type reg =
| Reg: rf:reg_file_id -> r:reg_id rf -> reg
let t_reg (r:reg) : Type0 = t_reg_file r.rf
// Some register files can be used as integers (for addresses); others arbitrarily return 0
let t_reg_to_int (rf:reg_file_id) (v:t_reg_file rf) : int =
match rf with
| 0 -> v
| 1 -> 0
type maddr:eqtype =
| MConst: n:int -> maddr
| MReg: r:reg -> offset:int -> maddr
| MIndex: base:reg -> scale:int -> index:reg -> offset:int -> maddr
type tmaddr:eqtype = maddr & taint
[@va_qattr]
type operand (tc tr:eqtype) : eqtype =
| OConst: n:tc -> operand tc tr
| OReg: r:tr -> operand tc tr
| OMem: m:tmaddr -> operand tc tr
| OStack: m:tmaddr -> operand tc tr
[@va_qattr]
let operand_rf (rf:reg_file_id) : eqtype =
operand (t_reg_file rf) (reg_id rf)
[@va_qattr]
unfold let oreg (r:reg) : operand_rf r.rf =
OReg r.r
let reg_64 : Type0 = r:nat{r < 16}
let reg_xmm : Type0 = r:nat{r < 16}
[@va_qattr] unfold let rRax : reg_64 = 0
[@va_qattr] unfold let rRbx : reg_64 = 1
[@va_qattr] unfold let rRcx : reg_64 = 2
[@va_qattr] unfold let rRdx : reg_64 = 3
[@va_qattr] unfold let rRsi : reg_64 = 4
[@va_qattr] unfold let rRdi : reg_64 = 5
[@va_qattr] unfold let rRbp : reg_64 = 6
[@va_qattr] unfold let rRsp : reg_64 = 7
[@va_qattr] unfold let rR8 : reg_64 = 8
[@va_qattr] unfold let rR9 : reg_64 = 9 | false | true | Vale.X64.Machine_s.fst | {
"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_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val rR11:reg_64 | [] | Vale.X64.Machine_s.rR11 | {
"file_name": "vale/specs/hardware/Vale.X64.Machine_s.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | Vale.X64.Machine_s.reg_64 | {
"end_col": 41,
"end_line": 82,
"start_col": 39,
"start_line": 82
} |
Prims.Tot | [
{
"abbrev": false,
"full_module": "Vale.Arch.HeapTypes_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let pow2_128 = Vale.Def.Words_s.pow2_128 | let pow2_128 = | false | null | false | Vale.Def.Words_s.pow2_128 | {
"checked_file": "Vale.X64.Machine_s.fst.checked",
"dependencies": [
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.HeapTypes_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "Vale.X64.Machine_s.fst"
} | [
"total"
] | [
"Vale.Def.Words_s.pow2_128"
] | [] | module Vale.X64.Machine_s
open FStar.Mul
include Vale.Arch.HeapTypes_s
irreducible let va_qattr = ()
unfold let pow2_32 = Vale.Def.Words_s.pow2_32 | false | true | Vale.X64.Machine_s.fst | {
"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_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val pow2_128 : Prims.int | [] | Vale.X64.Machine_s.pow2_128 | {
"file_name": "vale/specs/hardware/Vale.X64.Machine_s.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | Prims.int | {
"end_col": 47,
"end_line": 8,
"start_col": 22,
"start_line": 8
} |
|
Prims.Tot | val n_regs (rf: reg_file_id) : nat | [
{
"abbrev": false,
"full_module": "Vale.Arch.HeapTypes_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let n_regs (rf:reg_file_id) : nat =
match rf with
| 0 -> 16
| 1 -> 16 | val n_regs (rf: reg_file_id) : nat
let n_regs (rf: reg_file_id) : nat = | false | null | false | match rf with
| 0 -> 16
| 1 -> 16 | {
"checked_file": "Vale.X64.Machine_s.fst.checked",
"dependencies": [
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.HeapTypes_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "Vale.X64.Machine_s.fst"
} | [
"total"
] | [
"Vale.X64.Machine_s.reg_file_id",
"Prims.nat"
] | [] | module Vale.X64.Machine_s
open FStar.Mul
include Vale.Arch.HeapTypes_s
irreducible let va_qattr = ()
unfold let pow2_32 = Vale.Def.Words_s.pow2_32
unfold let pow2_64 = Vale.Def.Words_s.pow2_64
unfold let pow2_128 = Vale.Def.Words_s.pow2_128
unfold let nat64 = Vale.Def.Types_s.nat64
let int_to_nat64 (i:int) : n:nat64{0 <= i && i < pow2_64 ==> i == n} =
Vale.Def.Words_s.int_to_natN pow2_64 i
unfold let nat128 = Vale.Def.Words_s.nat128
unfold let quad32 = Vale.Def.Types_s.quad32
type flag:eqtype = i:int{0 <= i /\ i < 16}
[@va_qattr] unfold let fCarry : flag = 0
[@va_qattr] unfold let fOverflow : flag = 11
let n_reg_files = 2
let reg_file_id = rf:nat{rf < n_reg_files} | false | true | Vale.X64.Machine_s.fst | {
"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_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val n_regs (rf: reg_file_id) : nat | [] | Vale.X64.Machine_s.n_regs | {
"file_name": "vale/specs/hardware/Vale.X64.Machine_s.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | rf: Vale.X64.Machine_s.reg_file_id -> Prims.nat | {
"end_col": 11,
"end_line": 26,
"start_col": 2,
"start_line": 24
} |
Prims.Tot | val reg_Rbp:reg | [
{
"abbrev": false,
"full_module": "Vale.Arch.HeapTypes_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let reg_Rbp : reg = Reg 0 6 | val reg_Rbp:reg
let reg_Rbp:reg = | false | null | false | Reg 0 6 | {
"checked_file": "Vale.X64.Machine_s.fst.checked",
"dependencies": [
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.HeapTypes_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "Vale.X64.Machine_s.fst"
} | [
"total"
] | [
"Vale.X64.Machine_s.Reg"
] | [] | module Vale.X64.Machine_s
open FStar.Mul
include Vale.Arch.HeapTypes_s
irreducible let va_qattr = ()
unfold let pow2_32 = Vale.Def.Words_s.pow2_32
unfold let pow2_64 = Vale.Def.Words_s.pow2_64
unfold let pow2_128 = Vale.Def.Words_s.pow2_128
unfold let nat64 = Vale.Def.Types_s.nat64
let int_to_nat64 (i:int) : n:nat64{0 <= i && i < pow2_64 ==> i == n} =
Vale.Def.Words_s.int_to_natN pow2_64 i
unfold let nat128 = Vale.Def.Words_s.nat128
unfold let quad32 = Vale.Def.Types_s.quad32
type flag:eqtype = i:int{0 <= i /\ i < 16}
[@va_qattr] unfold let fCarry : flag = 0
[@va_qattr] unfold let fOverflow : flag = 11
let n_reg_files = 2
let reg_file_id = rf:nat{rf < n_reg_files}
let n_regs (rf:reg_file_id) : nat =
match rf with
| 0 -> 16
| 1 -> 16
let t_reg_file (rf:reg_file_id) : Type0 =
match rf with
| 0 -> nat64
| 1 -> quad32
let reg_id (rf:reg_file_id) : Type0 = r:nat{r < n_regs rf}
[@va_qattr]
type reg =
| Reg: rf:reg_file_id -> r:reg_id rf -> reg
let t_reg (r:reg) : Type0 = t_reg_file r.rf
// Some register files can be used as integers (for addresses); others arbitrarily return 0
let t_reg_to_int (rf:reg_file_id) (v:t_reg_file rf) : int =
match rf with
| 0 -> v
| 1 -> 0
type maddr:eqtype =
| MConst: n:int -> maddr
| MReg: r:reg -> offset:int -> maddr
| MIndex: base:reg -> scale:int -> index:reg -> offset:int -> maddr
type tmaddr:eqtype = maddr & taint
[@va_qattr]
type operand (tc tr:eqtype) : eqtype =
| OConst: n:tc -> operand tc tr
| OReg: r:tr -> operand tc tr
| OMem: m:tmaddr -> operand tc tr
| OStack: m:tmaddr -> operand tc tr
[@va_qattr]
let operand_rf (rf:reg_file_id) : eqtype =
operand (t_reg_file rf) (reg_id rf)
[@va_qattr]
unfold let oreg (r:reg) : operand_rf r.rf =
OReg r.r
let reg_64 : Type0 = r:nat{r < 16}
let reg_xmm : Type0 = r:nat{r < 16}
[@va_qattr] unfold let rRax : reg_64 = 0
[@va_qattr] unfold let rRbx : reg_64 = 1
[@va_qattr] unfold let rRcx : reg_64 = 2
[@va_qattr] unfold let rRdx : reg_64 = 3
[@va_qattr] unfold let rRsi : reg_64 = 4
[@va_qattr] unfold let rRdi : reg_64 = 5
[@va_qattr] unfold let rRbp : reg_64 = 6
[@va_qattr] unfold let rRsp : reg_64 = 7
[@va_qattr] unfold let rR8 : reg_64 = 8
[@va_qattr] unfold let rR9 : reg_64 = 9
[@va_qattr] unfold let rR10 : reg_64 = 10
[@va_qattr] unfold let rR11 : reg_64 = 11
[@va_qattr] unfold let rR12 : reg_64 = 12
[@va_qattr] unfold let rR13 : reg_64 = 13
[@va_qattr] unfold let rR14 : reg_64 = 14
[@va_qattr] unfold let rR15 : reg_64 = 15
[@va_qattr] unfold let reg_Rax : reg = Reg 0 0
[@va_qattr] unfold let reg_Rbx : reg = Reg 0 1
[@va_qattr] unfold let reg_Rcx : reg = Reg 0 2
[@va_qattr] unfold let reg_Rdx : reg = Reg 0 3
[@va_qattr] unfold let reg_Rsi : reg = Reg 0 4 | false | true | Vale.X64.Machine_s.fst | {
"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_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val reg_Rbp:reg | [] | Vale.X64.Machine_s.reg_Rbp | {
"file_name": "vale/specs/hardware/Vale.X64.Machine_s.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | Vale.X64.Machine_s.reg | {
"end_col": 46,
"end_line": 94,
"start_col": 39,
"start_line": 94
} |
Prims.Tot | val t_reg_to_int (rf: reg_file_id) (v: t_reg_file rf) : int | [
{
"abbrev": false,
"full_module": "Vale.Arch.HeapTypes_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let t_reg_to_int (rf:reg_file_id) (v:t_reg_file rf) : int =
match rf with
| 0 -> v
| 1 -> 0 | val t_reg_to_int (rf: reg_file_id) (v: t_reg_file rf) : int
let t_reg_to_int (rf: reg_file_id) (v: t_reg_file rf) : int = | false | null | false | match rf with
| 0 -> v
| 1 -> 0 | {
"checked_file": "Vale.X64.Machine_s.fst.checked",
"dependencies": [
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.HeapTypes_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "Vale.X64.Machine_s.fst"
} | [
"total"
] | [
"Vale.X64.Machine_s.reg_file_id",
"Vale.X64.Machine_s.t_reg_file",
"Prims.int"
] | [] | module Vale.X64.Machine_s
open FStar.Mul
include Vale.Arch.HeapTypes_s
irreducible let va_qattr = ()
unfold let pow2_32 = Vale.Def.Words_s.pow2_32
unfold let pow2_64 = Vale.Def.Words_s.pow2_64
unfold let pow2_128 = Vale.Def.Words_s.pow2_128
unfold let nat64 = Vale.Def.Types_s.nat64
let int_to_nat64 (i:int) : n:nat64{0 <= i && i < pow2_64 ==> i == n} =
Vale.Def.Words_s.int_to_natN pow2_64 i
unfold let nat128 = Vale.Def.Words_s.nat128
unfold let quad32 = Vale.Def.Types_s.quad32
type flag:eqtype = i:int{0 <= i /\ i < 16}
[@va_qattr] unfold let fCarry : flag = 0
[@va_qattr] unfold let fOverflow : flag = 11
let n_reg_files = 2
let reg_file_id = rf:nat{rf < n_reg_files}
let n_regs (rf:reg_file_id) : nat =
match rf with
| 0 -> 16
| 1 -> 16
let t_reg_file (rf:reg_file_id) : Type0 =
match rf with
| 0 -> nat64
| 1 -> quad32
let reg_id (rf:reg_file_id) : Type0 = r:nat{r < n_regs rf}
[@va_qattr]
type reg =
| Reg: rf:reg_file_id -> r:reg_id rf -> reg
let t_reg (r:reg) : Type0 = t_reg_file r.rf
// Some register files can be used as integers (for addresses); others arbitrarily return 0 | false | false | Vale.X64.Machine_s.fst | {
"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_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val t_reg_to_int (rf: reg_file_id) (v: t_reg_file rf) : int | [] | Vale.X64.Machine_s.t_reg_to_int | {
"file_name": "vale/specs/hardware/Vale.X64.Machine_s.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | rf: Vale.X64.Machine_s.reg_file_id -> v: Vale.X64.Machine_s.t_reg_file rf -> Prims.int | {
"end_col": 10,
"end_line": 44,
"start_col": 2,
"start_line": 42
} |
Prims.Tot | val reg_R13:reg | [
{
"abbrev": false,
"full_module": "Vale.Arch.HeapTypes_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let reg_R13 : reg = Reg 0 13 | val reg_R13:reg
let reg_R13:reg = | false | null | false | Reg 0 13 | {
"checked_file": "Vale.X64.Machine_s.fst.checked",
"dependencies": [
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.HeapTypes_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "Vale.X64.Machine_s.fst"
} | [
"total"
] | [
"Vale.X64.Machine_s.Reg"
] | [] | module Vale.X64.Machine_s
open FStar.Mul
include Vale.Arch.HeapTypes_s
irreducible let va_qattr = ()
unfold let pow2_32 = Vale.Def.Words_s.pow2_32
unfold let pow2_64 = Vale.Def.Words_s.pow2_64
unfold let pow2_128 = Vale.Def.Words_s.pow2_128
unfold let nat64 = Vale.Def.Types_s.nat64
let int_to_nat64 (i:int) : n:nat64{0 <= i && i < pow2_64 ==> i == n} =
Vale.Def.Words_s.int_to_natN pow2_64 i
unfold let nat128 = Vale.Def.Words_s.nat128
unfold let quad32 = Vale.Def.Types_s.quad32
type flag:eqtype = i:int{0 <= i /\ i < 16}
[@va_qattr] unfold let fCarry : flag = 0
[@va_qattr] unfold let fOverflow : flag = 11
let n_reg_files = 2
let reg_file_id = rf:nat{rf < n_reg_files}
let n_regs (rf:reg_file_id) : nat =
match rf with
| 0 -> 16
| 1 -> 16
let t_reg_file (rf:reg_file_id) : Type0 =
match rf with
| 0 -> nat64
| 1 -> quad32
let reg_id (rf:reg_file_id) : Type0 = r:nat{r < n_regs rf}
[@va_qattr]
type reg =
| Reg: rf:reg_file_id -> r:reg_id rf -> reg
let t_reg (r:reg) : Type0 = t_reg_file r.rf
// Some register files can be used as integers (for addresses); others arbitrarily return 0
let t_reg_to_int (rf:reg_file_id) (v:t_reg_file rf) : int =
match rf with
| 0 -> v
| 1 -> 0
type maddr:eqtype =
| MConst: n:int -> maddr
| MReg: r:reg -> offset:int -> maddr
| MIndex: base:reg -> scale:int -> index:reg -> offset:int -> maddr
type tmaddr:eqtype = maddr & taint
[@va_qattr]
type operand (tc tr:eqtype) : eqtype =
| OConst: n:tc -> operand tc tr
| OReg: r:tr -> operand tc tr
| OMem: m:tmaddr -> operand tc tr
| OStack: m:tmaddr -> operand tc tr
[@va_qattr]
let operand_rf (rf:reg_file_id) : eqtype =
operand (t_reg_file rf) (reg_id rf)
[@va_qattr]
unfold let oreg (r:reg) : operand_rf r.rf =
OReg r.r
let reg_64 : Type0 = r:nat{r < 16}
let reg_xmm : Type0 = r:nat{r < 16}
[@va_qattr] unfold let rRax : reg_64 = 0
[@va_qattr] unfold let rRbx : reg_64 = 1
[@va_qattr] unfold let rRcx : reg_64 = 2
[@va_qattr] unfold let rRdx : reg_64 = 3
[@va_qattr] unfold let rRsi : reg_64 = 4
[@va_qattr] unfold let rRdi : reg_64 = 5
[@va_qattr] unfold let rRbp : reg_64 = 6
[@va_qattr] unfold let rRsp : reg_64 = 7
[@va_qattr] unfold let rR8 : reg_64 = 8
[@va_qattr] unfold let rR9 : reg_64 = 9
[@va_qattr] unfold let rR10 : reg_64 = 10
[@va_qattr] unfold let rR11 : reg_64 = 11
[@va_qattr] unfold let rR12 : reg_64 = 12
[@va_qattr] unfold let rR13 : reg_64 = 13
[@va_qattr] unfold let rR14 : reg_64 = 14
[@va_qattr] unfold let rR15 : reg_64 = 15
[@va_qattr] unfold let reg_Rax : reg = Reg 0 0
[@va_qattr] unfold let reg_Rbx : reg = Reg 0 1
[@va_qattr] unfold let reg_Rcx : reg = Reg 0 2
[@va_qattr] unfold let reg_Rdx : reg = Reg 0 3
[@va_qattr] unfold let reg_Rsi : reg = Reg 0 4
[@va_qattr] unfold let reg_Rdi : reg = Reg 0 5
[@va_qattr] unfold let reg_Rbp : reg = Reg 0 6
[@va_qattr] unfold let reg_Rsp : reg = Reg 0 7
[@va_qattr] unfold let reg_R8 : reg = Reg 0 8
[@va_qattr] unfold let reg_R9 : reg = Reg 0 9
[@va_qattr] unfold let reg_R10 : reg = Reg 0 10
[@va_qattr] unfold let reg_R11 : reg = Reg 0 11 | false | true | Vale.X64.Machine_s.fst | {
"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_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val reg_R13:reg | [] | Vale.X64.Machine_s.reg_R13 | {
"file_name": "vale/specs/hardware/Vale.X64.Machine_s.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | Vale.X64.Machine_s.reg | {
"end_col": 47,
"end_line": 101,
"start_col": 39,
"start_line": 101
} |
Prims.Tot | val operand_rf (rf: reg_file_id) : eqtype | [
{
"abbrev": false,
"full_module": "Vale.Arch.HeapTypes_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let operand_rf (rf:reg_file_id) : eqtype =
operand (t_reg_file rf) (reg_id rf) | val operand_rf (rf: reg_file_id) : eqtype
let operand_rf (rf: reg_file_id) : eqtype = | false | null | false | operand (t_reg_file rf) (reg_id rf) | {
"checked_file": "Vale.X64.Machine_s.fst.checked",
"dependencies": [
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.HeapTypes_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "Vale.X64.Machine_s.fst"
} | [
"total"
] | [
"Vale.X64.Machine_s.reg_file_id",
"Vale.X64.Machine_s.operand",
"Vale.X64.Machine_s.t_reg_file",
"Vale.X64.Machine_s.reg_id",
"Prims.eqtype"
] | [] | module Vale.X64.Machine_s
open FStar.Mul
include Vale.Arch.HeapTypes_s
irreducible let va_qattr = ()
unfold let pow2_32 = Vale.Def.Words_s.pow2_32
unfold let pow2_64 = Vale.Def.Words_s.pow2_64
unfold let pow2_128 = Vale.Def.Words_s.pow2_128
unfold let nat64 = Vale.Def.Types_s.nat64
let int_to_nat64 (i:int) : n:nat64{0 <= i && i < pow2_64 ==> i == n} =
Vale.Def.Words_s.int_to_natN pow2_64 i
unfold let nat128 = Vale.Def.Words_s.nat128
unfold let quad32 = Vale.Def.Types_s.quad32
type flag:eqtype = i:int{0 <= i /\ i < 16}
[@va_qattr] unfold let fCarry : flag = 0
[@va_qattr] unfold let fOverflow : flag = 11
let n_reg_files = 2
let reg_file_id = rf:nat{rf < n_reg_files}
let n_regs (rf:reg_file_id) : nat =
match rf with
| 0 -> 16
| 1 -> 16
let t_reg_file (rf:reg_file_id) : Type0 =
match rf with
| 0 -> nat64
| 1 -> quad32
let reg_id (rf:reg_file_id) : Type0 = r:nat{r < n_regs rf}
[@va_qattr]
type reg =
| Reg: rf:reg_file_id -> r:reg_id rf -> reg
let t_reg (r:reg) : Type0 = t_reg_file r.rf
// Some register files can be used as integers (for addresses); others arbitrarily return 0
let t_reg_to_int (rf:reg_file_id) (v:t_reg_file rf) : int =
match rf with
| 0 -> v
| 1 -> 0
type maddr:eqtype =
| MConst: n:int -> maddr
| MReg: r:reg -> offset:int -> maddr
| MIndex: base:reg -> scale:int -> index:reg -> offset:int -> maddr
type tmaddr:eqtype = maddr & taint
[@va_qattr]
type operand (tc tr:eqtype) : eqtype =
| OConst: n:tc -> operand tc tr
| OReg: r:tr -> operand tc tr
| OMem: m:tmaddr -> operand tc tr
| OStack: m:tmaddr -> operand tc tr
[@va_qattr] | false | true | Vale.X64.Machine_s.fst | {
"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_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val operand_rf (rf: reg_file_id) : eqtype | [] | Vale.X64.Machine_s.operand_rf | {
"file_name": "vale/specs/hardware/Vale.X64.Machine_s.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | rf: Vale.X64.Machine_s.reg_file_id -> Prims.eqtype | {
"end_col": 37,
"end_line": 62,
"start_col": 2,
"start_line": 62
} |
Prims.Tot | val oreg (r: reg) : operand_rf r.rf | [
{
"abbrev": false,
"full_module": "Vale.Arch.HeapTypes_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let oreg (r:reg) : operand_rf r.rf =
OReg r.r | val oreg (r: reg) : operand_rf r.rf
let oreg (r: reg) : operand_rf r.rf = | false | null | false | OReg r.r | {
"checked_file": "Vale.X64.Machine_s.fst.checked",
"dependencies": [
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.HeapTypes_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "Vale.X64.Machine_s.fst"
} | [
"total"
] | [
"Vale.X64.Machine_s.reg",
"Vale.X64.Machine_s.OReg",
"Vale.X64.Machine_s.t_reg_file",
"Vale.X64.Machine_s.__proj__Reg__item__rf",
"Vale.X64.Machine_s.reg_id",
"Vale.X64.Machine_s.__proj__Reg__item__r",
"Vale.X64.Machine_s.operand_rf"
] | [] | module Vale.X64.Machine_s
open FStar.Mul
include Vale.Arch.HeapTypes_s
irreducible let va_qattr = ()
unfold let pow2_32 = Vale.Def.Words_s.pow2_32
unfold let pow2_64 = Vale.Def.Words_s.pow2_64
unfold let pow2_128 = Vale.Def.Words_s.pow2_128
unfold let nat64 = Vale.Def.Types_s.nat64
let int_to_nat64 (i:int) : n:nat64{0 <= i && i < pow2_64 ==> i == n} =
Vale.Def.Words_s.int_to_natN pow2_64 i
unfold let nat128 = Vale.Def.Words_s.nat128
unfold let quad32 = Vale.Def.Types_s.quad32
type flag:eqtype = i:int{0 <= i /\ i < 16}
[@va_qattr] unfold let fCarry : flag = 0
[@va_qattr] unfold let fOverflow : flag = 11
let n_reg_files = 2
let reg_file_id = rf:nat{rf < n_reg_files}
let n_regs (rf:reg_file_id) : nat =
match rf with
| 0 -> 16
| 1 -> 16
let t_reg_file (rf:reg_file_id) : Type0 =
match rf with
| 0 -> nat64
| 1 -> quad32
let reg_id (rf:reg_file_id) : Type0 = r:nat{r < n_regs rf}
[@va_qattr]
type reg =
| Reg: rf:reg_file_id -> r:reg_id rf -> reg
let t_reg (r:reg) : Type0 = t_reg_file r.rf
// Some register files can be used as integers (for addresses); others arbitrarily return 0
let t_reg_to_int (rf:reg_file_id) (v:t_reg_file rf) : int =
match rf with
| 0 -> v
| 1 -> 0
type maddr:eqtype =
| MConst: n:int -> maddr
| MReg: r:reg -> offset:int -> maddr
| MIndex: base:reg -> scale:int -> index:reg -> offset:int -> maddr
type tmaddr:eqtype = maddr & taint
[@va_qattr]
type operand (tc tr:eqtype) : eqtype =
| OConst: n:tc -> operand tc tr
| OReg: r:tr -> operand tc tr
| OMem: m:tmaddr -> operand tc tr
| OStack: m:tmaddr -> operand tc tr
[@va_qattr]
let operand_rf (rf:reg_file_id) : eqtype =
operand (t_reg_file rf) (reg_id rf)
[@va_qattr] | false | false | Vale.X64.Machine_s.fst | {
"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_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val oreg (r: reg) : operand_rf r.rf | [] | Vale.X64.Machine_s.oreg | {
"file_name": "vale/specs/hardware/Vale.X64.Machine_s.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | r: Vale.X64.Machine_s.reg -> Vale.X64.Machine_s.operand_rf (Reg?.rf r) | {
"end_col": 10,
"end_line": 66,
"start_col": 2,
"start_line": 66
} |
Prims.Tot | val int_to_nat64 (i: int) : n: nat64{0 <= i && i < pow2_64 ==> i == n} | [
{
"abbrev": false,
"full_module": "Vale.Arch.HeapTypes_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let int_to_nat64 (i:int) : n:nat64{0 <= i && i < pow2_64 ==> i == n} =
Vale.Def.Words_s.int_to_natN pow2_64 i | val int_to_nat64 (i: int) : n: nat64{0 <= i && i < pow2_64 ==> i == n}
let int_to_nat64 (i: int) : n: nat64{0 <= i && i < pow2_64 ==> i == n} = | false | null | false | Vale.Def.Words_s.int_to_natN pow2_64 i | {
"checked_file": "Vale.X64.Machine_s.fst.checked",
"dependencies": [
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.HeapTypes_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "Vale.X64.Machine_s.fst"
} | [
"total"
] | [
"Prims.int",
"Vale.Def.Words_s.int_to_natN",
"Vale.X64.Machine_s.pow2_64",
"Vale.X64.Machine_s.nat64",
"Prims.l_imp",
"Prims.b2t",
"Prims.op_AmpAmp",
"Prims.op_LessThanOrEqual",
"Prims.op_LessThan",
"Prims.eq2"
] | [] | module Vale.X64.Machine_s
open FStar.Mul
include Vale.Arch.HeapTypes_s
irreducible let va_qattr = ()
unfold let pow2_32 = Vale.Def.Words_s.pow2_32
unfold let pow2_64 = Vale.Def.Words_s.pow2_64
unfold let pow2_128 = Vale.Def.Words_s.pow2_128
unfold let nat64 = Vale.Def.Types_s.nat64 | false | false | Vale.X64.Machine_s.fst | {
"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_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val int_to_nat64 (i: int) : n: nat64{0 <= i && i < pow2_64 ==> i == n} | [] | Vale.X64.Machine_s.int_to_nat64 | {
"file_name": "vale/specs/hardware/Vale.X64.Machine_s.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | i: Prims.int -> n: Vale.X64.Machine_s.nat64{0 <= i && i < Vale.X64.Machine_s.pow2_64 ==> i == n} | {
"end_col": 40,
"end_line": 12,
"start_col": 2,
"start_line": 12
} |
Prims.Tot | val reg_R9:reg | [
{
"abbrev": false,
"full_module": "Vale.Arch.HeapTypes_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let reg_R9 : reg = Reg 0 9 | val reg_R9:reg
let reg_R9:reg = | false | null | false | Reg 0 9 | {
"checked_file": "Vale.X64.Machine_s.fst.checked",
"dependencies": [
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.HeapTypes_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "Vale.X64.Machine_s.fst"
} | [
"total"
] | [
"Vale.X64.Machine_s.Reg"
] | [] | module Vale.X64.Machine_s
open FStar.Mul
include Vale.Arch.HeapTypes_s
irreducible let va_qattr = ()
unfold let pow2_32 = Vale.Def.Words_s.pow2_32
unfold let pow2_64 = Vale.Def.Words_s.pow2_64
unfold let pow2_128 = Vale.Def.Words_s.pow2_128
unfold let nat64 = Vale.Def.Types_s.nat64
let int_to_nat64 (i:int) : n:nat64{0 <= i && i < pow2_64 ==> i == n} =
Vale.Def.Words_s.int_to_natN pow2_64 i
unfold let nat128 = Vale.Def.Words_s.nat128
unfold let quad32 = Vale.Def.Types_s.quad32
type flag:eqtype = i:int{0 <= i /\ i < 16}
[@va_qattr] unfold let fCarry : flag = 0
[@va_qattr] unfold let fOverflow : flag = 11
let n_reg_files = 2
let reg_file_id = rf:nat{rf < n_reg_files}
let n_regs (rf:reg_file_id) : nat =
match rf with
| 0 -> 16
| 1 -> 16
let t_reg_file (rf:reg_file_id) : Type0 =
match rf with
| 0 -> nat64
| 1 -> quad32
let reg_id (rf:reg_file_id) : Type0 = r:nat{r < n_regs rf}
[@va_qattr]
type reg =
| Reg: rf:reg_file_id -> r:reg_id rf -> reg
let t_reg (r:reg) : Type0 = t_reg_file r.rf
// Some register files can be used as integers (for addresses); others arbitrarily return 0
let t_reg_to_int (rf:reg_file_id) (v:t_reg_file rf) : int =
match rf with
| 0 -> v
| 1 -> 0
type maddr:eqtype =
| MConst: n:int -> maddr
| MReg: r:reg -> offset:int -> maddr
| MIndex: base:reg -> scale:int -> index:reg -> offset:int -> maddr
type tmaddr:eqtype = maddr & taint
[@va_qattr]
type operand (tc tr:eqtype) : eqtype =
| OConst: n:tc -> operand tc tr
| OReg: r:tr -> operand tc tr
| OMem: m:tmaddr -> operand tc tr
| OStack: m:tmaddr -> operand tc tr
[@va_qattr]
let operand_rf (rf:reg_file_id) : eqtype =
operand (t_reg_file rf) (reg_id rf)
[@va_qattr]
unfold let oreg (r:reg) : operand_rf r.rf =
OReg r.r
let reg_64 : Type0 = r:nat{r < 16}
let reg_xmm : Type0 = r:nat{r < 16}
[@va_qattr] unfold let rRax : reg_64 = 0
[@va_qattr] unfold let rRbx : reg_64 = 1
[@va_qattr] unfold let rRcx : reg_64 = 2
[@va_qattr] unfold let rRdx : reg_64 = 3
[@va_qattr] unfold let rRsi : reg_64 = 4
[@va_qattr] unfold let rRdi : reg_64 = 5
[@va_qattr] unfold let rRbp : reg_64 = 6
[@va_qattr] unfold let rRsp : reg_64 = 7
[@va_qattr] unfold let rR8 : reg_64 = 8
[@va_qattr] unfold let rR9 : reg_64 = 9
[@va_qattr] unfold let rR10 : reg_64 = 10
[@va_qattr] unfold let rR11 : reg_64 = 11
[@va_qattr] unfold let rR12 : reg_64 = 12
[@va_qattr] unfold let rR13 : reg_64 = 13
[@va_qattr] unfold let rR14 : reg_64 = 14
[@va_qattr] unfold let rR15 : reg_64 = 15
[@va_qattr] unfold let reg_Rax : reg = Reg 0 0
[@va_qattr] unfold let reg_Rbx : reg = Reg 0 1
[@va_qattr] unfold let reg_Rcx : reg = Reg 0 2
[@va_qattr] unfold let reg_Rdx : reg = Reg 0 3
[@va_qattr] unfold let reg_Rsi : reg = Reg 0 4
[@va_qattr] unfold let reg_Rdi : reg = Reg 0 5
[@va_qattr] unfold let reg_Rbp : reg = Reg 0 6
[@va_qattr] unfold let reg_Rsp : reg = Reg 0 7 | false | true | Vale.X64.Machine_s.fst | {
"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_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val reg_R9:reg | [] | Vale.X64.Machine_s.reg_R9 | {
"file_name": "vale/specs/hardware/Vale.X64.Machine_s.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | Vale.X64.Machine_s.reg | {
"end_col": 46,
"end_line": 97,
"start_col": 39,
"start_line": 97
} |
Prims.Tot | val operand128:eqtype | [
{
"abbrev": false,
"full_module": "Vale.Arch.HeapTypes_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let operand128:eqtype = operand quad32 reg_xmm | val operand128:eqtype
let operand128:eqtype = | false | null | false | operand quad32 reg_xmm | {
"checked_file": "Vale.X64.Machine_s.fst.checked",
"dependencies": [
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.HeapTypes_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "Vale.X64.Machine_s.fst"
} | [
"total"
] | [
"Vale.X64.Machine_s.operand",
"Vale.X64.Machine_s.quad32",
"Vale.X64.Machine_s.reg_xmm"
] | [] | module Vale.X64.Machine_s
open FStar.Mul
include Vale.Arch.HeapTypes_s
irreducible let va_qattr = ()
unfold let pow2_32 = Vale.Def.Words_s.pow2_32
unfold let pow2_64 = Vale.Def.Words_s.pow2_64
unfold let pow2_128 = Vale.Def.Words_s.pow2_128
unfold let nat64 = Vale.Def.Types_s.nat64
let int_to_nat64 (i:int) : n:nat64{0 <= i && i < pow2_64 ==> i == n} =
Vale.Def.Words_s.int_to_natN pow2_64 i
unfold let nat128 = Vale.Def.Words_s.nat128
unfold let quad32 = Vale.Def.Types_s.quad32
type flag:eqtype = i:int{0 <= i /\ i < 16}
[@va_qattr] unfold let fCarry : flag = 0
[@va_qattr] unfold let fOverflow : flag = 11
let n_reg_files = 2
let reg_file_id = rf:nat{rf < n_reg_files}
let n_regs (rf:reg_file_id) : nat =
match rf with
| 0 -> 16
| 1 -> 16
let t_reg_file (rf:reg_file_id) : Type0 =
match rf with
| 0 -> nat64
| 1 -> quad32
let reg_id (rf:reg_file_id) : Type0 = r:nat{r < n_regs rf}
[@va_qattr]
type reg =
| Reg: rf:reg_file_id -> r:reg_id rf -> reg
let t_reg (r:reg) : Type0 = t_reg_file r.rf
// Some register files can be used as integers (for addresses); others arbitrarily return 0
let t_reg_to_int (rf:reg_file_id) (v:t_reg_file rf) : int =
match rf with
| 0 -> v
| 1 -> 0
type maddr:eqtype =
| MConst: n:int -> maddr
| MReg: r:reg -> offset:int -> maddr
| MIndex: base:reg -> scale:int -> index:reg -> offset:int -> maddr
type tmaddr:eqtype = maddr & taint
[@va_qattr]
type operand (tc tr:eqtype) : eqtype =
| OConst: n:tc -> operand tc tr
| OReg: r:tr -> operand tc tr
| OMem: m:tmaddr -> operand tc tr
| OStack: m:tmaddr -> operand tc tr
[@va_qattr]
let operand_rf (rf:reg_file_id) : eqtype =
operand (t_reg_file rf) (reg_id rf)
[@va_qattr]
unfold let oreg (r:reg) : operand_rf r.rf =
OReg r.r
let reg_64 : Type0 = r:nat{r < 16}
let reg_xmm : Type0 = r:nat{r < 16}
[@va_qattr] unfold let rRax : reg_64 = 0
[@va_qattr] unfold let rRbx : reg_64 = 1
[@va_qattr] unfold let rRcx : reg_64 = 2
[@va_qattr] unfold let rRdx : reg_64 = 3
[@va_qattr] unfold let rRsi : reg_64 = 4
[@va_qattr] unfold let rRdi : reg_64 = 5
[@va_qattr] unfold let rRbp : reg_64 = 6
[@va_qattr] unfold let rRsp : reg_64 = 7
[@va_qattr] unfold let rR8 : reg_64 = 8
[@va_qattr] unfold let rR9 : reg_64 = 9
[@va_qattr] unfold let rR10 : reg_64 = 10
[@va_qattr] unfold let rR11 : reg_64 = 11
[@va_qattr] unfold let rR12 : reg_64 = 12
[@va_qattr] unfold let rR13 : reg_64 = 13
[@va_qattr] unfold let rR14 : reg_64 = 14
[@va_qattr] unfold let rR15 : reg_64 = 15
[@va_qattr] unfold let reg_Rax : reg = Reg 0 0
[@va_qattr] unfold let reg_Rbx : reg = Reg 0 1
[@va_qattr] unfold let reg_Rcx : reg = Reg 0 2
[@va_qattr] unfold let reg_Rdx : reg = Reg 0 3
[@va_qattr] unfold let reg_Rsi : reg = Reg 0 4
[@va_qattr] unfold let reg_Rdi : reg = Reg 0 5
[@va_qattr] unfold let reg_Rbp : reg = Reg 0 6
[@va_qattr] unfold let reg_Rsp : reg = Reg 0 7
[@va_qattr] unfold let reg_R8 : reg = Reg 0 8
[@va_qattr] unfold let reg_R9 : reg = Reg 0 9
[@va_qattr] unfold let reg_R10 : reg = Reg 0 10
[@va_qattr] unfold let reg_R11 : reg = Reg 0 11
[@va_qattr] unfold let reg_R12 : reg = Reg 0 12
[@va_qattr] unfold let reg_R13 : reg = Reg 0 13
[@va_qattr] unfold let reg_R14 : reg = Reg 0 14
[@va_qattr] unfold let reg_R15 : reg = Reg 0 15
[@va_qattr]
let operand64:eqtype = operand nat64 reg_64 | false | true | Vale.X64.Machine_s.fst | {
"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_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val operand128:eqtype | [] | Vale.X64.Machine_s.operand128 | {
"file_name": "vale/specs/hardware/Vale.X64.Machine_s.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | Prims.eqtype | {
"end_col": 46,
"end_line": 109,
"start_col": 24,
"start_line": 109
} |
Prims.Tot | val reg_Rsp:reg | [
{
"abbrev": false,
"full_module": "Vale.Arch.HeapTypes_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let reg_Rsp : reg = Reg 0 7 | val reg_Rsp:reg
let reg_Rsp:reg = | false | null | false | Reg 0 7 | {
"checked_file": "Vale.X64.Machine_s.fst.checked",
"dependencies": [
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.HeapTypes_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "Vale.X64.Machine_s.fst"
} | [
"total"
] | [
"Vale.X64.Machine_s.Reg"
] | [] | module Vale.X64.Machine_s
open FStar.Mul
include Vale.Arch.HeapTypes_s
irreducible let va_qattr = ()
unfold let pow2_32 = Vale.Def.Words_s.pow2_32
unfold let pow2_64 = Vale.Def.Words_s.pow2_64
unfold let pow2_128 = Vale.Def.Words_s.pow2_128
unfold let nat64 = Vale.Def.Types_s.nat64
let int_to_nat64 (i:int) : n:nat64{0 <= i && i < pow2_64 ==> i == n} =
Vale.Def.Words_s.int_to_natN pow2_64 i
unfold let nat128 = Vale.Def.Words_s.nat128
unfold let quad32 = Vale.Def.Types_s.quad32
type flag:eqtype = i:int{0 <= i /\ i < 16}
[@va_qattr] unfold let fCarry : flag = 0
[@va_qattr] unfold let fOverflow : flag = 11
let n_reg_files = 2
let reg_file_id = rf:nat{rf < n_reg_files}
let n_regs (rf:reg_file_id) : nat =
match rf with
| 0 -> 16
| 1 -> 16
let t_reg_file (rf:reg_file_id) : Type0 =
match rf with
| 0 -> nat64
| 1 -> quad32
let reg_id (rf:reg_file_id) : Type0 = r:nat{r < n_regs rf}
[@va_qattr]
type reg =
| Reg: rf:reg_file_id -> r:reg_id rf -> reg
let t_reg (r:reg) : Type0 = t_reg_file r.rf
// Some register files can be used as integers (for addresses); others arbitrarily return 0
let t_reg_to_int (rf:reg_file_id) (v:t_reg_file rf) : int =
match rf with
| 0 -> v
| 1 -> 0
type maddr:eqtype =
| MConst: n:int -> maddr
| MReg: r:reg -> offset:int -> maddr
| MIndex: base:reg -> scale:int -> index:reg -> offset:int -> maddr
type tmaddr:eqtype = maddr & taint
[@va_qattr]
type operand (tc tr:eqtype) : eqtype =
| OConst: n:tc -> operand tc tr
| OReg: r:tr -> operand tc tr
| OMem: m:tmaddr -> operand tc tr
| OStack: m:tmaddr -> operand tc tr
[@va_qattr]
let operand_rf (rf:reg_file_id) : eqtype =
operand (t_reg_file rf) (reg_id rf)
[@va_qattr]
unfold let oreg (r:reg) : operand_rf r.rf =
OReg r.r
let reg_64 : Type0 = r:nat{r < 16}
let reg_xmm : Type0 = r:nat{r < 16}
[@va_qattr] unfold let rRax : reg_64 = 0
[@va_qattr] unfold let rRbx : reg_64 = 1
[@va_qattr] unfold let rRcx : reg_64 = 2
[@va_qattr] unfold let rRdx : reg_64 = 3
[@va_qattr] unfold let rRsi : reg_64 = 4
[@va_qattr] unfold let rRdi : reg_64 = 5
[@va_qattr] unfold let rRbp : reg_64 = 6
[@va_qattr] unfold let rRsp : reg_64 = 7
[@va_qattr] unfold let rR8 : reg_64 = 8
[@va_qattr] unfold let rR9 : reg_64 = 9
[@va_qattr] unfold let rR10 : reg_64 = 10
[@va_qattr] unfold let rR11 : reg_64 = 11
[@va_qattr] unfold let rR12 : reg_64 = 12
[@va_qattr] unfold let rR13 : reg_64 = 13
[@va_qattr] unfold let rR14 : reg_64 = 14
[@va_qattr] unfold let rR15 : reg_64 = 15
[@va_qattr] unfold let reg_Rax : reg = Reg 0 0
[@va_qattr] unfold let reg_Rbx : reg = Reg 0 1
[@va_qattr] unfold let reg_Rcx : reg = Reg 0 2
[@va_qattr] unfold let reg_Rdx : reg = Reg 0 3
[@va_qattr] unfold let reg_Rsi : reg = Reg 0 4
[@va_qattr] unfold let reg_Rdi : reg = Reg 0 5 | false | true | Vale.X64.Machine_s.fst | {
"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_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val reg_Rsp:reg | [] | Vale.X64.Machine_s.reg_Rsp | {
"file_name": "vale/specs/hardware/Vale.X64.Machine_s.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | Vale.X64.Machine_s.reg | {
"end_col": 46,
"end_line": 95,
"start_col": 39,
"start_line": 95
} |
Prims.Tot | val reg_Rdx:reg | [
{
"abbrev": false,
"full_module": "Vale.Arch.HeapTypes_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let reg_Rdx : reg = Reg 0 3 | val reg_Rdx:reg
let reg_Rdx:reg = | false | null | false | Reg 0 3 | {
"checked_file": "Vale.X64.Machine_s.fst.checked",
"dependencies": [
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.HeapTypes_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "Vale.X64.Machine_s.fst"
} | [
"total"
] | [
"Vale.X64.Machine_s.Reg"
] | [] | module Vale.X64.Machine_s
open FStar.Mul
include Vale.Arch.HeapTypes_s
irreducible let va_qattr = ()
unfold let pow2_32 = Vale.Def.Words_s.pow2_32
unfold let pow2_64 = Vale.Def.Words_s.pow2_64
unfold let pow2_128 = Vale.Def.Words_s.pow2_128
unfold let nat64 = Vale.Def.Types_s.nat64
let int_to_nat64 (i:int) : n:nat64{0 <= i && i < pow2_64 ==> i == n} =
Vale.Def.Words_s.int_to_natN pow2_64 i
unfold let nat128 = Vale.Def.Words_s.nat128
unfold let quad32 = Vale.Def.Types_s.quad32
type flag:eqtype = i:int{0 <= i /\ i < 16}
[@va_qattr] unfold let fCarry : flag = 0
[@va_qattr] unfold let fOverflow : flag = 11
let n_reg_files = 2
let reg_file_id = rf:nat{rf < n_reg_files}
let n_regs (rf:reg_file_id) : nat =
match rf with
| 0 -> 16
| 1 -> 16
let t_reg_file (rf:reg_file_id) : Type0 =
match rf with
| 0 -> nat64
| 1 -> quad32
let reg_id (rf:reg_file_id) : Type0 = r:nat{r < n_regs rf}
[@va_qattr]
type reg =
| Reg: rf:reg_file_id -> r:reg_id rf -> reg
let t_reg (r:reg) : Type0 = t_reg_file r.rf
// Some register files can be used as integers (for addresses); others arbitrarily return 0
let t_reg_to_int (rf:reg_file_id) (v:t_reg_file rf) : int =
match rf with
| 0 -> v
| 1 -> 0
type maddr:eqtype =
| MConst: n:int -> maddr
| MReg: r:reg -> offset:int -> maddr
| MIndex: base:reg -> scale:int -> index:reg -> offset:int -> maddr
type tmaddr:eqtype = maddr & taint
[@va_qattr]
type operand (tc tr:eqtype) : eqtype =
| OConst: n:tc -> operand tc tr
| OReg: r:tr -> operand tc tr
| OMem: m:tmaddr -> operand tc tr
| OStack: m:tmaddr -> operand tc tr
[@va_qattr]
let operand_rf (rf:reg_file_id) : eqtype =
operand (t_reg_file rf) (reg_id rf)
[@va_qattr]
unfold let oreg (r:reg) : operand_rf r.rf =
OReg r.r
let reg_64 : Type0 = r:nat{r < 16}
let reg_xmm : Type0 = r:nat{r < 16}
[@va_qattr] unfold let rRax : reg_64 = 0
[@va_qattr] unfold let rRbx : reg_64 = 1
[@va_qattr] unfold let rRcx : reg_64 = 2
[@va_qattr] unfold let rRdx : reg_64 = 3
[@va_qattr] unfold let rRsi : reg_64 = 4
[@va_qattr] unfold let rRdi : reg_64 = 5
[@va_qattr] unfold let rRbp : reg_64 = 6
[@va_qattr] unfold let rRsp : reg_64 = 7
[@va_qattr] unfold let rR8 : reg_64 = 8
[@va_qattr] unfold let rR9 : reg_64 = 9
[@va_qattr] unfold let rR10 : reg_64 = 10
[@va_qattr] unfold let rR11 : reg_64 = 11
[@va_qattr] unfold let rR12 : reg_64 = 12
[@va_qattr] unfold let rR13 : reg_64 = 13
[@va_qattr] unfold let rR14 : reg_64 = 14
[@va_qattr] unfold let rR15 : reg_64 = 15
[@va_qattr] unfold let reg_Rax : reg = Reg 0 0
[@va_qattr] unfold let reg_Rbx : reg = Reg 0 1 | false | true | Vale.X64.Machine_s.fst | {
"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_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val reg_Rdx:reg | [] | Vale.X64.Machine_s.reg_Rdx | {
"file_name": "vale/specs/hardware/Vale.X64.Machine_s.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | Vale.X64.Machine_s.reg | {
"end_col": 46,
"end_line": 91,
"start_col": 39,
"start_line": 91
} |
Prims.Tot | val reg_R15:reg | [
{
"abbrev": false,
"full_module": "Vale.Arch.HeapTypes_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let reg_R15 : reg = Reg 0 15 | val reg_R15:reg
let reg_R15:reg = | false | null | false | Reg 0 15 | {
"checked_file": "Vale.X64.Machine_s.fst.checked",
"dependencies": [
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.HeapTypes_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "Vale.X64.Machine_s.fst"
} | [
"total"
] | [
"Vale.X64.Machine_s.Reg"
] | [] | module Vale.X64.Machine_s
open FStar.Mul
include Vale.Arch.HeapTypes_s
irreducible let va_qattr = ()
unfold let pow2_32 = Vale.Def.Words_s.pow2_32
unfold let pow2_64 = Vale.Def.Words_s.pow2_64
unfold let pow2_128 = Vale.Def.Words_s.pow2_128
unfold let nat64 = Vale.Def.Types_s.nat64
let int_to_nat64 (i:int) : n:nat64{0 <= i && i < pow2_64 ==> i == n} =
Vale.Def.Words_s.int_to_natN pow2_64 i
unfold let nat128 = Vale.Def.Words_s.nat128
unfold let quad32 = Vale.Def.Types_s.quad32
type flag:eqtype = i:int{0 <= i /\ i < 16}
[@va_qattr] unfold let fCarry : flag = 0
[@va_qattr] unfold let fOverflow : flag = 11
let n_reg_files = 2
let reg_file_id = rf:nat{rf < n_reg_files}
let n_regs (rf:reg_file_id) : nat =
match rf with
| 0 -> 16
| 1 -> 16
let t_reg_file (rf:reg_file_id) : Type0 =
match rf with
| 0 -> nat64
| 1 -> quad32
let reg_id (rf:reg_file_id) : Type0 = r:nat{r < n_regs rf}
[@va_qattr]
type reg =
| Reg: rf:reg_file_id -> r:reg_id rf -> reg
let t_reg (r:reg) : Type0 = t_reg_file r.rf
// Some register files can be used as integers (for addresses); others arbitrarily return 0
let t_reg_to_int (rf:reg_file_id) (v:t_reg_file rf) : int =
match rf with
| 0 -> v
| 1 -> 0
type maddr:eqtype =
| MConst: n:int -> maddr
| MReg: r:reg -> offset:int -> maddr
| MIndex: base:reg -> scale:int -> index:reg -> offset:int -> maddr
type tmaddr:eqtype = maddr & taint
[@va_qattr]
type operand (tc tr:eqtype) : eqtype =
| OConst: n:tc -> operand tc tr
| OReg: r:tr -> operand tc tr
| OMem: m:tmaddr -> operand tc tr
| OStack: m:tmaddr -> operand tc tr
[@va_qattr]
let operand_rf (rf:reg_file_id) : eqtype =
operand (t_reg_file rf) (reg_id rf)
[@va_qattr]
unfold let oreg (r:reg) : operand_rf r.rf =
OReg r.r
let reg_64 : Type0 = r:nat{r < 16}
let reg_xmm : Type0 = r:nat{r < 16}
[@va_qattr] unfold let rRax : reg_64 = 0
[@va_qattr] unfold let rRbx : reg_64 = 1
[@va_qattr] unfold let rRcx : reg_64 = 2
[@va_qattr] unfold let rRdx : reg_64 = 3
[@va_qattr] unfold let rRsi : reg_64 = 4
[@va_qattr] unfold let rRdi : reg_64 = 5
[@va_qattr] unfold let rRbp : reg_64 = 6
[@va_qattr] unfold let rRsp : reg_64 = 7
[@va_qattr] unfold let rR8 : reg_64 = 8
[@va_qattr] unfold let rR9 : reg_64 = 9
[@va_qattr] unfold let rR10 : reg_64 = 10
[@va_qattr] unfold let rR11 : reg_64 = 11
[@va_qattr] unfold let rR12 : reg_64 = 12
[@va_qattr] unfold let rR13 : reg_64 = 13
[@va_qattr] unfold let rR14 : reg_64 = 14
[@va_qattr] unfold let rR15 : reg_64 = 15
[@va_qattr] unfold let reg_Rax : reg = Reg 0 0
[@va_qattr] unfold let reg_Rbx : reg = Reg 0 1
[@va_qattr] unfold let reg_Rcx : reg = Reg 0 2
[@va_qattr] unfold let reg_Rdx : reg = Reg 0 3
[@va_qattr] unfold let reg_Rsi : reg = Reg 0 4
[@va_qattr] unfold let reg_Rdi : reg = Reg 0 5
[@va_qattr] unfold let reg_Rbp : reg = Reg 0 6
[@va_qattr] unfold let reg_Rsp : reg = Reg 0 7
[@va_qattr] unfold let reg_R8 : reg = Reg 0 8
[@va_qattr] unfold let reg_R9 : reg = Reg 0 9
[@va_qattr] unfold let reg_R10 : reg = Reg 0 10
[@va_qattr] unfold let reg_R11 : reg = Reg 0 11
[@va_qattr] unfold let reg_R12 : reg = Reg 0 12
[@va_qattr] unfold let reg_R13 : reg = Reg 0 13 | false | true | Vale.X64.Machine_s.fst | {
"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_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val reg_R15:reg | [] | Vale.X64.Machine_s.reg_R15 | {
"file_name": "vale/specs/hardware/Vale.X64.Machine_s.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | Vale.X64.Machine_s.reg | {
"end_col": 47,
"end_line": 103,
"start_col": 39,
"start_line": 103
} |
Prims.Tot | val reg_Rsi:reg | [
{
"abbrev": false,
"full_module": "Vale.Arch.HeapTypes_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let reg_Rsi : reg = Reg 0 4 | val reg_Rsi:reg
let reg_Rsi:reg = | false | null | false | Reg 0 4 | {
"checked_file": "Vale.X64.Machine_s.fst.checked",
"dependencies": [
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.HeapTypes_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "Vale.X64.Machine_s.fst"
} | [
"total"
] | [
"Vale.X64.Machine_s.Reg"
] | [] | module Vale.X64.Machine_s
open FStar.Mul
include Vale.Arch.HeapTypes_s
irreducible let va_qattr = ()
unfold let pow2_32 = Vale.Def.Words_s.pow2_32
unfold let pow2_64 = Vale.Def.Words_s.pow2_64
unfold let pow2_128 = Vale.Def.Words_s.pow2_128
unfold let nat64 = Vale.Def.Types_s.nat64
let int_to_nat64 (i:int) : n:nat64{0 <= i && i < pow2_64 ==> i == n} =
Vale.Def.Words_s.int_to_natN pow2_64 i
unfold let nat128 = Vale.Def.Words_s.nat128
unfold let quad32 = Vale.Def.Types_s.quad32
type flag:eqtype = i:int{0 <= i /\ i < 16}
[@va_qattr] unfold let fCarry : flag = 0
[@va_qattr] unfold let fOverflow : flag = 11
let n_reg_files = 2
let reg_file_id = rf:nat{rf < n_reg_files}
let n_regs (rf:reg_file_id) : nat =
match rf with
| 0 -> 16
| 1 -> 16
let t_reg_file (rf:reg_file_id) : Type0 =
match rf with
| 0 -> nat64
| 1 -> quad32
let reg_id (rf:reg_file_id) : Type0 = r:nat{r < n_regs rf}
[@va_qattr]
type reg =
| Reg: rf:reg_file_id -> r:reg_id rf -> reg
let t_reg (r:reg) : Type0 = t_reg_file r.rf
// Some register files can be used as integers (for addresses); others arbitrarily return 0
let t_reg_to_int (rf:reg_file_id) (v:t_reg_file rf) : int =
match rf with
| 0 -> v
| 1 -> 0
type maddr:eqtype =
| MConst: n:int -> maddr
| MReg: r:reg -> offset:int -> maddr
| MIndex: base:reg -> scale:int -> index:reg -> offset:int -> maddr
type tmaddr:eqtype = maddr & taint
[@va_qattr]
type operand (tc tr:eqtype) : eqtype =
| OConst: n:tc -> operand tc tr
| OReg: r:tr -> operand tc tr
| OMem: m:tmaddr -> operand tc tr
| OStack: m:tmaddr -> operand tc tr
[@va_qattr]
let operand_rf (rf:reg_file_id) : eqtype =
operand (t_reg_file rf) (reg_id rf)
[@va_qattr]
unfold let oreg (r:reg) : operand_rf r.rf =
OReg r.r
let reg_64 : Type0 = r:nat{r < 16}
let reg_xmm : Type0 = r:nat{r < 16}
[@va_qattr] unfold let rRax : reg_64 = 0
[@va_qattr] unfold let rRbx : reg_64 = 1
[@va_qattr] unfold let rRcx : reg_64 = 2
[@va_qattr] unfold let rRdx : reg_64 = 3
[@va_qattr] unfold let rRsi : reg_64 = 4
[@va_qattr] unfold let rRdi : reg_64 = 5
[@va_qattr] unfold let rRbp : reg_64 = 6
[@va_qattr] unfold let rRsp : reg_64 = 7
[@va_qattr] unfold let rR8 : reg_64 = 8
[@va_qattr] unfold let rR9 : reg_64 = 9
[@va_qattr] unfold let rR10 : reg_64 = 10
[@va_qattr] unfold let rR11 : reg_64 = 11
[@va_qattr] unfold let rR12 : reg_64 = 12
[@va_qattr] unfold let rR13 : reg_64 = 13
[@va_qattr] unfold let rR14 : reg_64 = 14
[@va_qattr] unfold let rR15 : reg_64 = 15
[@va_qattr] unfold let reg_Rax : reg = Reg 0 0
[@va_qattr] unfold let reg_Rbx : reg = Reg 0 1
[@va_qattr] unfold let reg_Rcx : reg = Reg 0 2 | false | true | Vale.X64.Machine_s.fst | {
"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_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val reg_Rsi:reg | [] | Vale.X64.Machine_s.reg_Rsi | {
"file_name": "vale/specs/hardware/Vale.X64.Machine_s.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | Vale.X64.Machine_s.reg | {
"end_col": 46,
"end_line": 92,
"start_col": 39,
"start_line": 92
} |
Prims.Tot | val reg_Rbx:reg | [
{
"abbrev": false,
"full_module": "Vale.Arch.HeapTypes_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let reg_Rbx : reg = Reg 0 1 | val reg_Rbx:reg
let reg_Rbx:reg = | false | null | false | Reg 0 1 | {
"checked_file": "Vale.X64.Machine_s.fst.checked",
"dependencies": [
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.HeapTypes_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "Vale.X64.Machine_s.fst"
} | [
"total"
] | [
"Vale.X64.Machine_s.Reg"
] | [] | module Vale.X64.Machine_s
open FStar.Mul
include Vale.Arch.HeapTypes_s
irreducible let va_qattr = ()
unfold let pow2_32 = Vale.Def.Words_s.pow2_32
unfold let pow2_64 = Vale.Def.Words_s.pow2_64
unfold let pow2_128 = Vale.Def.Words_s.pow2_128
unfold let nat64 = Vale.Def.Types_s.nat64
let int_to_nat64 (i:int) : n:nat64{0 <= i && i < pow2_64 ==> i == n} =
Vale.Def.Words_s.int_to_natN pow2_64 i
unfold let nat128 = Vale.Def.Words_s.nat128
unfold let quad32 = Vale.Def.Types_s.quad32
type flag:eqtype = i:int{0 <= i /\ i < 16}
[@va_qattr] unfold let fCarry : flag = 0
[@va_qattr] unfold let fOverflow : flag = 11
let n_reg_files = 2
let reg_file_id = rf:nat{rf < n_reg_files}
let n_regs (rf:reg_file_id) : nat =
match rf with
| 0 -> 16
| 1 -> 16
let t_reg_file (rf:reg_file_id) : Type0 =
match rf with
| 0 -> nat64
| 1 -> quad32
let reg_id (rf:reg_file_id) : Type0 = r:nat{r < n_regs rf}
[@va_qattr]
type reg =
| Reg: rf:reg_file_id -> r:reg_id rf -> reg
let t_reg (r:reg) : Type0 = t_reg_file r.rf
// Some register files can be used as integers (for addresses); others arbitrarily return 0
let t_reg_to_int (rf:reg_file_id) (v:t_reg_file rf) : int =
match rf with
| 0 -> v
| 1 -> 0
type maddr:eqtype =
| MConst: n:int -> maddr
| MReg: r:reg -> offset:int -> maddr
| MIndex: base:reg -> scale:int -> index:reg -> offset:int -> maddr
type tmaddr:eqtype = maddr & taint
[@va_qattr]
type operand (tc tr:eqtype) : eqtype =
| OConst: n:tc -> operand tc tr
| OReg: r:tr -> operand tc tr
| OMem: m:tmaddr -> operand tc tr
| OStack: m:tmaddr -> operand tc tr
[@va_qattr]
let operand_rf (rf:reg_file_id) : eqtype =
operand (t_reg_file rf) (reg_id rf)
[@va_qattr]
unfold let oreg (r:reg) : operand_rf r.rf =
OReg r.r
let reg_64 : Type0 = r:nat{r < 16}
let reg_xmm : Type0 = r:nat{r < 16}
[@va_qattr] unfold let rRax : reg_64 = 0
[@va_qattr] unfold let rRbx : reg_64 = 1
[@va_qattr] unfold let rRcx : reg_64 = 2
[@va_qattr] unfold let rRdx : reg_64 = 3
[@va_qattr] unfold let rRsi : reg_64 = 4
[@va_qattr] unfold let rRdi : reg_64 = 5
[@va_qattr] unfold let rRbp : reg_64 = 6
[@va_qattr] unfold let rRsp : reg_64 = 7
[@va_qattr] unfold let rR8 : reg_64 = 8
[@va_qattr] unfold let rR9 : reg_64 = 9
[@va_qattr] unfold let rR10 : reg_64 = 10
[@va_qattr] unfold let rR11 : reg_64 = 11
[@va_qattr] unfold let rR12 : reg_64 = 12
[@va_qattr] unfold let rR13 : reg_64 = 13
[@va_qattr] unfold let rR14 : reg_64 = 14
[@va_qattr] unfold let rR15 : reg_64 = 15 | false | true | Vale.X64.Machine_s.fst | {
"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_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val reg_Rbx:reg | [] | Vale.X64.Machine_s.reg_Rbx | {
"file_name": "vale/specs/hardware/Vale.X64.Machine_s.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | Vale.X64.Machine_s.reg | {
"end_col": 46,
"end_line": 89,
"start_col": 39,
"start_line": 89
} |
Prims.Tot | val reg_Rax:reg | [
{
"abbrev": false,
"full_module": "Vale.Arch.HeapTypes_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let reg_Rax : reg = Reg 0 0 | val reg_Rax:reg
let reg_Rax:reg = | false | null | false | Reg 0 0 | {
"checked_file": "Vale.X64.Machine_s.fst.checked",
"dependencies": [
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.HeapTypes_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "Vale.X64.Machine_s.fst"
} | [
"total"
] | [
"Vale.X64.Machine_s.Reg"
] | [] | module Vale.X64.Machine_s
open FStar.Mul
include Vale.Arch.HeapTypes_s
irreducible let va_qattr = ()
unfold let pow2_32 = Vale.Def.Words_s.pow2_32
unfold let pow2_64 = Vale.Def.Words_s.pow2_64
unfold let pow2_128 = Vale.Def.Words_s.pow2_128
unfold let nat64 = Vale.Def.Types_s.nat64
let int_to_nat64 (i:int) : n:nat64{0 <= i && i < pow2_64 ==> i == n} =
Vale.Def.Words_s.int_to_natN pow2_64 i
unfold let nat128 = Vale.Def.Words_s.nat128
unfold let quad32 = Vale.Def.Types_s.quad32
type flag:eqtype = i:int{0 <= i /\ i < 16}
[@va_qattr] unfold let fCarry : flag = 0
[@va_qattr] unfold let fOverflow : flag = 11
let n_reg_files = 2
let reg_file_id = rf:nat{rf < n_reg_files}
let n_regs (rf:reg_file_id) : nat =
match rf with
| 0 -> 16
| 1 -> 16
let t_reg_file (rf:reg_file_id) : Type0 =
match rf with
| 0 -> nat64
| 1 -> quad32
let reg_id (rf:reg_file_id) : Type0 = r:nat{r < n_regs rf}
[@va_qattr]
type reg =
| Reg: rf:reg_file_id -> r:reg_id rf -> reg
let t_reg (r:reg) : Type0 = t_reg_file r.rf
// Some register files can be used as integers (for addresses); others arbitrarily return 0
let t_reg_to_int (rf:reg_file_id) (v:t_reg_file rf) : int =
match rf with
| 0 -> v
| 1 -> 0
type maddr:eqtype =
| MConst: n:int -> maddr
| MReg: r:reg -> offset:int -> maddr
| MIndex: base:reg -> scale:int -> index:reg -> offset:int -> maddr
type tmaddr:eqtype = maddr & taint
[@va_qattr]
type operand (tc tr:eqtype) : eqtype =
| OConst: n:tc -> operand tc tr
| OReg: r:tr -> operand tc tr
| OMem: m:tmaddr -> operand tc tr
| OStack: m:tmaddr -> operand tc tr
[@va_qattr]
let operand_rf (rf:reg_file_id) : eqtype =
operand (t_reg_file rf) (reg_id rf)
[@va_qattr]
unfold let oreg (r:reg) : operand_rf r.rf =
OReg r.r
let reg_64 : Type0 = r:nat{r < 16}
let reg_xmm : Type0 = r:nat{r < 16}
[@va_qattr] unfold let rRax : reg_64 = 0
[@va_qattr] unfold let rRbx : reg_64 = 1
[@va_qattr] unfold let rRcx : reg_64 = 2
[@va_qattr] unfold let rRdx : reg_64 = 3
[@va_qattr] unfold let rRsi : reg_64 = 4
[@va_qattr] unfold let rRdi : reg_64 = 5
[@va_qattr] unfold let rRbp : reg_64 = 6
[@va_qattr] unfold let rRsp : reg_64 = 7
[@va_qattr] unfold let rR8 : reg_64 = 8
[@va_qattr] unfold let rR9 : reg_64 = 9
[@va_qattr] unfold let rR10 : reg_64 = 10
[@va_qattr] unfold let rR11 : reg_64 = 11
[@va_qattr] unfold let rR12 : reg_64 = 12
[@va_qattr] unfold let rR13 : reg_64 = 13
[@va_qattr] unfold let rR14 : reg_64 = 14
[@va_qattr] unfold let rR15 : reg_64 = 15 | false | true | Vale.X64.Machine_s.fst | {
"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_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val reg_Rax:reg | [] | Vale.X64.Machine_s.reg_Rax | {
"file_name": "vale/specs/hardware/Vale.X64.Machine_s.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | Vale.X64.Machine_s.reg | {
"end_col": 46,
"end_line": 88,
"start_col": 39,
"start_line": 88
} |
Prims.Tot | val reg_R14:reg | [
{
"abbrev": false,
"full_module": "Vale.Arch.HeapTypes_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let reg_R14 : reg = Reg 0 14 | val reg_R14:reg
let reg_R14:reg = | false | null | false | Reg 0 14 | {
"checked_file": "Vale.X64.Machine_s.fst.checked",
"dependencies": [
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.HeapTypes_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "Vale.X64.Machine_s.fst"
} | [
"total"
] | [
"Vale.X64.Machine_s.Reg"
] | [] | module Vale.X64.Machine_s
open FStar.Mul
include Vale.Arch.HeapTypes_s
irreducible let va_qattr = ()
unfold let pow2_32 = Vale.Def.Words_s.pow2_32
unfold let pow2_64 = Vale.Def.Words_s.pow2_64
unfold let pow2_128 = Vale.Def.Words_s.pow2_128
unfold let nat64 = Vale.Def.Types_s.nat64
let int_to_nat64 (i:int) : n:nat64{0 <= i && i < pow2_64 ==> i == n} =
Vale.Def.Words_s.int_to_natN pow2_64 i
unfold let nat128 = Vale.Def.Words_s.nat128
unfold let quad32 = Vale.Def.Types_s.quad32
type flag:eqtype = i:int{0 <= i /\ i < 16}
[@va_qattr] unfold let fCarry : flag = 0
[@va_qattr] unfold let fOverflow : flag = 11
let n_reg_files = 2
let reg_file_id = rf:nat{rf < n_reg_files}
let n_regs (rf:reg_file_id) : nat =
match rf with
| 0 -> 16
| 1 -> 16
let t_reg_file (rf:reg_file_id) : Type0 =
match rf with
| 0 -> nat64
| 1 -> quad32
let reg_id (rf:reg_file_id) : Type0 = r:nat{r < n_regs rf}
[@va_qattr]
type reg =
| Reg: rf:reg_file_id -> r:reg_id rf -> reg
let t_reg (r:reg) : Type0 = t_reg_file r.rf
// Some register files can be used as integers (for addresses); others arbitrarily return 0
let t_reg_to_int (rf:reg_file_id) (v:t_reg_file rf) : int =
match rf with
| 0 -> v
| 1 -> 0
type maddr:eqtype =
| MConst: n:int -> maddr
| MReg: r:reg -> offset:int -> maddr
| MIndex: base:reg -> scale:int -> index:reg -> offset:int -> maddr
type tmaddr:eqtype = maddr & taint
[@va_qattr]
type operand (tc tr:eqtype) : eqtype =
| OConst: n:tc -> operand tc tr
| OReg: r:tr -> operand tc tr
| OMem: m:tmaddr -> operand tc tr
| OStack: m:tmaddr -> operand tc tr
[@va_qattr]
let operand_rf (rf:reg_file_id) : eqtype =
operand (t_reg_file rf) (reg_id rf)
[@va_qattr]
unfold let oreg (r:reg) : operand_rf r.rf =
OReg r.r
let reg_64 : Type0 = r:nat{r < 16}
let reg_xmm : Type0 = r:nat{r < 16}
[@va_qattr] unfold let rRax : reg_64 = 0
[@va_qattr] unfold let rRbx : reg_64 = 1
[@va_qattr] unfold let rRcx : reg_64 = 2
[@va_qattr] unfold let rRdx : reg_64 = 3
[@va_qattr] unfold let rRsi : reg_64 = 4
[@va_qattr] unfold let rRdi : reg_64 = 5
[@va_qattr] unfold let rRbp : reg_64 = 6
[@va_qattr] unfold let rRsp : reg_64 = 7
[@va_qattr] unfold let rR8 : reg_64 = 8
[@va_qattr] unfold let rR9 : reg_64 = 9
[@va_qattr] unfold let rR10 : reg_64 = 10
[@va_qattr] unfold let rR11 : reg_64 = 11
[@va_qattr] unfold let rR12 : reg_64 = 12
[@va_qattr] unfold let rR13 : reg_64 = 13
[@va_qattr] unfold let rR14 : reg_64 = 14
[@va_qattr] unfold let rR15 : reg_64 = 15
[@va_qattr] unfold let reg_Rax : reg = Reg 0 0
[@va_qattr] unfold let reg_Rbx : reg = Reg 0 1
[@va_qattr] unfold let reg_Rcx : reg = Reg 0 2
[@va_qattr] unfold let reg_Rdx : reg = Reg 0 3
[@va_qattr] unfold let reg_Rsi : reg = Reg 0 4
[@va_qattr] unfold let reg_Rdi : reg = Reg 0 5
[@va_qattr] unfold let reg_Rbp : reg = Reg 0 6
[@va_qattr] unfold let reg_Rsp : reg = Reg 0 7
[@va_qattr] unfold let reg_R8 : reg = Reg 0 8
[@va_qattr] unfold let reg_R9 : reg = Reg 0 9
[@va_qattr] unfold let reg_R10 : reg = Reg 0 10
[@va_qattr] unfold let reg_R11 : reg = Reg 0 11
[@va_qattr] unfold let reg_R12 : reg = Reg 0 12 | false | true | Vale.X64.Machine_s.fst | {
"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_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val reg_R14:reg | [] | Vale.X64.Machine_s.reg_R14 | {
"file_name": "vale/specs/hardware/Vale.X64.Machine_s.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | Vale.X64.Machine_s.reg | {
"end_col": 47,
"end_line": 102,
"start_col": 39,
"start_line": 102
} |
Prims.Tot | val reg_R11:reg | [
{
"abbrev": false,
"full_module": "Vale.Arch.HeapTypes_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let reg_R11 : reg = Reg 0 11 | val reg_R11:reg
let reg_R11:reg = | false | null | false | Reg 0 11 | {
"checked_file": "Vale.X64.Machine_s.fst.checked",
"dependencies": [
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.HeapTypes_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "Vale.X64.Machine_s.fst"
} | [
"total"
] | [
"Vale.X64.Machine_s.Reg"
] | [] | module Vale.X64.Machine_s
open FStar.Mul
include Vale.Arch.HeapTypes_s
irreducible let va_qattr = ()
unfold let pow2_32 = Vale.Def.Words_s.pow2_32
unfold let pow2_64 = Vale.Def.Words_s.pow2_64
unfold let pow2_128 = Vale.Def.Words_s.pow2_128
unfold let nat64 = Vale.Def.Types_s.nat64
let int_to_nat64 (i:int) : n:nat64{0 <= i && i < pow2_64 ==> i == n} =
Vale.Def.Words_s.int_to_natN pow2_64 i
unfold let nat128 = Vale.Def.Words_s.nat128
unfold let quad32 = Vale.Def.Types_s.quad32
type flag:eqtype = i:int{0 <= i /\ i < 16}
[@va_qattr] unfold let fCarry : flag = 0
[@va_qattr] unfold let fOverflow : flag = 11
let n_reg_files = 2
let reg_file_id = rf:nat{rf < n_reg_files}
let n_regs (rf:reg_file_id) : nat =
match rf with
| 0 -> 16
| 1 -> 16
let t_reg_file (rf:reg_file_id) : Type0 =
match rf with
| 0 -> nat64
| 1 -> quad32
let reg_id (rf:reg_file_id) : Type0 = r:nat{r < n_regs rf}
[@va_qattr]
type reg =
| Reg: rf:reg_file_id -> r:reg_id rf -> reg
let t_reg (r:reg) : Type0 = t_reg_file r.rf
// Some register files can be used as integers (for addresses); others arbitrarily return 0
let t_reg_to_int (rf:reg_file_id) (v:t_reg_file rf) : int =
match rf with
| 0 -> v
| 1 -> 0
type maddr:eqtype =
| MConst: n:int -> maddr
| MReg: r:reg -> offset:int -> maddr
| MIndex: base:reg -> scale:int -> index:reg -> offset:int -> maddr
type tmaddr:eqtype = maddr & taint
[@va_qattr]
type operand (tc tr:eqtype) : eqtype =
| OConst: n:tc -> operand tc tr
| OReg: r:tr -> operand tc tr
| OMem: m:tmaddr -> operand tc tr
| OStack: m:tmaddr -> operand tc tr
[@va_qattr]
let operand_rf (rf:reg_file_id) : eqtype =
operand (t_reg_file rf) (reg_id rf)
[@va_qattr]
unfold let oreg (r:reg) : operand_rf r.rf =
OReg r.r
let reg_64 : Type0 = r:nat{r < 16}
let reg_xmm : Type0 = r:nat{r < 16}
[@va_qattr] unfold let rRax : reg_64 = 0
[@va_qattr] unfold let rRbx : reg_64 = 1
[@va_qattr] unfold let rRcx : reg_64 = 2
[@va_qattr] unfold let rRdx : reg_64 = 3
[@va_qattr] unfold let rRsi : reg_64 = 4
[@va_qattr] unfold let rRdi : reg_64 = 5
[@va_qattr] unfold let rRbp : reg_64 = 6
[@va_qattr] unfold let rRsp : reg_64 = 7
[@va_qattr] unfold let rR8 : reg_64 = 8
[@va_qattr] unfold let rR9 : reg_64 = 9
[@va_qattr] unfold let rR10 : reg_64 = 10
[@va_qattr] unfold let rR11 : reg_64 = 11
[@va_qattr] unfold let rR12 : reg_64 = 12
[@va_qattr] unfold let rR13 : reg_64 = 13
[@va_qattr] unfold let rR14 : reg_64 = 14
[@va_qattr] unfold let rR15 : reg_64 = 15
[@va_qattr] unfold let reg_Rax : reg = Reg 0 0
[@va_qattr] unfold let reg_Rbx : reg = Reg 0 1
[@va_qattr] unfold let reg_Rcx : reg = Reg 0 2
[@va_qattr] unfold let reg_Rdx : reg = Reg 0 3
[@va_qattr] unfold let reg_Rsi : reg = Reg 0 4
[@va_qattr] unfold let reg_Rdi : reg = Reg 0 5
[@va_qattr] unfold let reg_Rbp : reg = Reg 0 6
[@va_qattr] unfold let reg_Rsp : reg = Reg 0 7
[@va_qattr] unfold let reg_R8 : reg = Reg 0 8
[@va_qattr] unfold let reg_R9 : reg = Reg 0 9 | false | true | Vale.X64.Machine_s.fst | {
"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_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val reg_R11:reg | [] | Vale.X64.Machine_s.reg_R11 | {
"file_name": "vale/specs/hardware/Vale.X64.Machine_s.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | Vale.X64.Machine_s.reg | {
"end_col": 47,
"end_line": 99,
"start_col": 39,
"start_line": 99
} |
Prims.Tot | val reg_R8:reg | [
{
"abbrev": false,
"full_module": "Vale.Arch.HeapTypes_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let reg_R8 : reg = Reg 0 8 | val reg_R8:reg
let reg_R8:reg = | false | null | false | Reg 0 8 | {
"checked_file": "Vale.X64.Machine_s.fst.checked",
"dependencies": [
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.HeapTypes_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "Vale.X64.Machine_s.fst"
} | [
"total"
] | [
"Vale.X64.Machine_s.Reg"
] | [] | module Vale.X64.Machine_s
open FStar.Mul
include Vale.Arch.HeapTypes_s
irreducible let va_qattr = ()
unfold let pow2_32 = Vale.Def.Words_s.pow2_32
unfold let pow2_64 = Vale.Def.Words_s.pow2_64
unfold let pow2_128 = Vale.Def.Words_s.pow2_128
unfold let nat64 = Vale.Def.Types_s.nat64
let int_to_nat64 (i:int) : n:nat64{0 <= i && i < pow2_64 ==> i == n} =
Vale.Def.Words_s.int_to_natN pow2_64 i
unfold let nat128 = Vale.Def.Words_s.nat128
unfold let quad32 = Vale.Def.Types_s.quad32
type flag:eqtype = i:int{0 <= i /\ i < 16}
[@va_qattr] unfold let fCarry : flag = 0
[@va_qattr] unfold let fOverflow : flag = 11
let n_reg_files = 2
let reg_file_id = rf:nat{rf < n_reg_files}
let n_regs (rf:reg_file_id) : nat =
match rf with
| 0 -> 16
| 1 -> 16
let t_reg_file (rf:reg_file_id) : Type0 =
match rf with
| 0 -> nat64
| 1 -> quad32
let reg_id (rf:reg_file_id) : Type0 = r:nat{r < n_regs rf}
[@va_qattr]
type reg =
| Reg: rf:reg_file_id -> r:reg_id rf -> reg
let t_reg (r:reg) : Type0 = t_reg_file r.rf
// Some register files can be used as integers (for addresses); others arbitrarily return 0
let t_reg_to_int (rf:reg_file_id) (v:t_reg_file rf) : int =
match rf with
| 0 -> v
| 1 -> 0
type maddr:eqtype =
| MConst: n:int -> maddr
| MReg: r:reg -> offset:int -> maddr
| MIndex: base:reg -> scale:int -> index:reg -> offset:int -> maddr
type tmaddr:eqtype = maddr & taint
[@va_qattr]
type operand (tc tr:eqtype) : eqtype =
| OConst: n:tc -> operand tc tr
| OReg: r:tr -> operand tc tr
| OMem: m:tmaddr -> operand tc tr
| OStack: m:tmaddr -> operand tc tr
[@va_qattr]
let operand_rf (rf:reg_file_id) : eqtype =
operand (t_reg_file rf) (reg_id rf)
[@va_qattr]
unfold let oreg (r:reg) : operand_rf r.rf =
OReg r.r
let reg_64 : Type0 = r:nat{r < 16}
let reg_xmm : Type0 = r:nat{r < 16}
[@va_qattr] unfold let rRax : reg_64 = 0
[@va_qattr] unfold let rRbx : reg_64 = 1
[@va_qattr] unfold let rRcx : reg_64 = 2
[@va_qattr] unfold let rRdx : reg_64 = 3
[@va_qattr] unfold let rRsi : reg_64 = 4
[@va_qattr] unfold let rRdi : reg_64 = 5
[@va_qattr] unfold let rRbp : reg_64 = 6
[@va_qattr] unfold let rRsp : reg_64 = 7
[@va_qattr] unfold let rR8 : reg_64 = 8
[@va_qattr] unfold let rR9 : reg_64 = 9
[@va_qattr] unfold let rR10 : reg_64 = 10
[@va_qattr] unfold let rR11 : reg_64 = 11
[@va_qattr] unfold let rR12 : reg_64 = 12
[@va_qattr] unfold let rR13 : reg_64 = 13
[@va_qattr] unfold let rR14 : reg_64 = 14
[@va_qattr] unfold let rR15 : reg_64 = 15
[@va_qattr] unfold let reg_Rax : reg = Reg 0 0
[@va_qattr] unfold let reg_Rbx : reg = Reg 0 1
[@va_qattr] unfold let reg_Rcx : reg = Reg 0 2
[@va_qattr] unfold let reg_Rdx : reg = Reg 0 3
[@va_qattr] unfold let reg_Rsi : reg = Reg 0 4
[@va_qattr] unfold let reg_Rdi : reg = Reg 0 5
[@va_qattr] unfold let reg_Rbp : reg = Reg 0 6 | false | true | Vale.X64.Machine_s.fst | {
"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_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val reg_R8:reg | [] | Vale.X64.Machine_s.reg_R8 | {
"file_name": "vale/specs/hardware/Vale.X64.Machine_s.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | Vale.X64.Machine_s.reg | {
"end_col": 46,
"end_line": 96,
"start_col": 39,
"start_line": 96
} |
Prims.Tot | val operand64:eqtype | [
{
"abbrev": false,
"full_module": "Vale.Arch.HeapTypes_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let operand64:eqtype = operand nat64 reg_64 | val operand64:eqtype
let operand64:eqtype = | false | null | false | operand nat64 reg_64 | {
"checked_file": "Vale.X64.Machine_s.fst.checked",
"dependencies": [
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.HeapTypes_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "Vale.X64.Machine_s.fst"
} | [
"total"
] | [
"Vale.X64.Machine_s.operand",
"Vale.X64.Machine_s.nat64",
"Vale.X64.Machine_s.reg_64"
] | [] | module Vale.X64.Machine_s
open FStar.Mul
include Vale.Arch.HeapTypes_s
irreducible let va_qattr = ()
unfold let pow2_32 = Vale.Def.Words_s.pow2_32
unfold let pow2_64 = Vale.Def.Words_s.pow2_64
unfold let pow2_128 = Vale.Def.Words_s.pow2_128
unfold let nat64 = Vale.Def.Types_s.nat64
let int_to_nat64 (i:int) : n:nat64{0 <= i && i < pow2_64 ==> i == n} =
Vale.Def.Words_s.int_to_natN pow2_64 i
unfold let nat128 = Vale.Def.Words_s.nat128
unfold let quad32 = Vale.Def.Types_s.quad32
type flag:eqtype = i:int{0 <= i /\ i < 16}
[@va_qattr] unfold let fCarry : flag = 0
[@va_qattr] unfold let fOverflow : flag = 11
let n_reg_files = 2
let reg_file_id = rf:nat{rf < n_reg_files}
let n_regs (rf:reg_file_id) : nat =
match rf with
| 0 -> 16
| 1 -> 16
let t_reg_file (rf:reg_file_id) : Type0 =
match rf with
| 0 -> nat64
| 1 -> quad32
let reg_id (rf:reg_file_id) : Type0 = r:nat{r < n_regs rf}
[@va_qattr]
type reg =
| Reg: rf:reg_file_id -> r:reg_id rf -> reg
let t_reg (r:reg) : Type0 = t_reg_file r.rf
// Some register files can be used as integers (for addresses); others arbitrarily return 0
let t_reg_to_int (rf:reg_file_id) (v:t_reg_file rf) : int =
match rf with
| 0 -> v
| 1 -> 0
type maddr:eqtype =
| MConst: n:int -> maddr
| MReg: r:reg -> offset:int -> maddr
| MIndex: base:reg -> scale:int -> index:reg -> offset:int -> maddr
type tmaddr:eqtype = maddr & taint
[@va_qattr]
type operand (tc tr:eqtype) : eqtype =
| OConst: n:tc -> operand tc tr
| OReg: r:tr -> operand tc tr
| OMem: m:tmaddr -> operand tc tr
| OStack: m:tmaddr -> operand tc tr
[@va_qattr]
let operand_rf (rf:reg_file_id) : eqtype =
operand (t_reg_file rf) (reg_id rf)
[@va_qattr]
unfold let oreg (r:reg) : operand_rf r.rf =
OReg r.r
let reg_64 : Type0 = r:nat{r < 16}
let reg_xmm : Type0 = r:nat{r < 16}
[@va_qattr] unfold let rRax : reg_64 = 0
[@va_qattr] unfold let rRbx : reg_64 = 1
[@va_qattr] unfold let rRcx : reg_64 = 2
[@va_qattr] unfold let rRdx : reg_64 = 3
[@va_qattr] unfold let rRsi : reg_64 = 4
[@va_qattr] unfold let rRdi : reg_64 = 5
[@va_qattr] unfold let rRbp : reg_64 = 6
[@va_qattr] unfold let rRsp : reg_64 = 7
[@va_qattr] unfold let rR8 : reg_64 = 8
[@va_qattr] unfold let rR9 : reg_64 = 9
[@va_qattr] unfold let rR10 : reg_64 = 10
[@va_qattr] unfold let rR11 : reg_64 = 11
[@va_qattr] unfold let rR12 : reg_64 = 12
[@va_qattr] unfold let rR13 : reg_64 = 13
[@va_qattr] unfold let rR14 : reg_64 = 14
[@va_qattr] unfold let rR15 : reg_64 = 15
[@va_qattr] unfold let reg_Rax : reg = Reg 0 0
[@va_qattr] unfold let reg_Rbx : reg = Reg 0 1
[@va_qattr] unfold let reg_Rcx : reg = Reg 0 2
[@va_qattr] unfold let reg_Rdx : reg = Reg 0 3
[@va_qattr] unfold let reg_Rsi : reg = Reg 0 4
[@va_qattr] unfold let reg_Rdi : reg = Reg 0 5
[@va_qattr] unfold let reg_Rbp : reg = Reg 0 6
[@va_qattr] unfold let reg_Rsp : reg = Reg 0 7
[@va_qattr] unfold let reg_R8 : reg = Reg 0 8
[@va_qattr] unfold let reg_R9 : reg = Reg 0 9
[@va_qattr] unfold let reg_R10 : reg = Reg 0 10
[@va_qattr] unfold let reg_R11 : reg = Reg 0 11
[@va_qattr] unfold let reg_R12 : reg = Reg 0 12
[@va_qattr] unfold let reg_R13 : reg = Reg 0 13
[@va_qattr] unfold let reg_R14 : reg = Reg 0 14
[@va_qattr] unfold let reg_R15 : reg = Reg 0 15 | false | true | Vale.X64.Machine_s.fst | {
"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_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val operand64:eqtype | [] | Vale.X64.Machine_s.operand64 | {
"file_name": "vale/specs/hardware/Vale.X64.Machine_s.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | Prims.eqtype | {
"end_col": 43,
"end_line": 106,
"start_col": 23,
"start_line": 106
} |
Prims.Tot | val reg_Rcx:reg | [
{
"abbrev": false,
"full_module": "Vale.Arch.HeapTypes_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let reg_Rcx : reg = Reg 0 2 | val reg_Rcx:reg
let reg_Rcx:reg = | false | null | false | Reg 0 2 | {
"checked_file": "Vale.X64.Machine_s.fst.checked",
"dependencies": [
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.HeapTypes_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "Vale.X64.Machine_s.fst"
} | [
"total"
] | [
"Vale.X64.Machine_s.Reg"
] | [] | module Vale.X64.Machine_s
open FStar.Mul
include Vale.Arch.HeapTypes_s
irreducible let va_qattr = ()
unfold let pow2_32 = Vale.Def.Words_s.pow2_32
unfold let pow2_64 = Vale.Def.Words_s.pow2_64
unfold let pow2_128 = Vale.Def.Words_s.pow2_128
unfold let nat64 = Vale.Def.Types_s.nat64
let int_to_nat64 (i:int) : n:nat64{0 <= i && i < pow2_64 ==> i == n} =
Vale.Def.Words_s.int_to_natN pow2_64 i
unfold let nat128 = Vale.Def.Words_s.nat128
unfold let quad32 = Vale.Def.Types_s.quad32
type flag:eqtype = i:int{0 <= i /\ i < 16}
[@va_qattr] unfold let fCarry : flag = 0
[@va_qattr] unfold let fOverflow : flag = 11
let n_reg_files = 2
let reg_file_id = rf:nat{rf < n_reg_files}
let n_regs (rf:reg_file_id) : nat =
match rf with
| 0 -> 16
| 1 -> 16
let t_reg_file (rf:reg_file_id) : Type0 =
match rf with
| 0 -> nat64
| 1 -> quad32
let reg_id (rf:reg_file_id) : Type0 = r:nat{r < n_regs rf}
[@va_qattr]
type reg =
| Reg: rf:reg_file_id -> r:reg_id rf -> reg
let t_reg (r:reg) : Type0 = t_reg_file r.rf
// Some register files can be used as integers (for addresses); others arbitrarily return 0
let t_reg_to_int (rf:reg_file_id) (v:t_reg_file rf) : int =
match rf with
| 0 -> v
| 1 -> 0
type maddr:eqtype =
| MConst: n:int -> maddr
| MReg: r:reg -> offset:int -> maddr
| MIndex: base:reg -> scale:int -> index:reg -> offset:int -> maddr
type tmaddr:eqtype = maddr & taint
[@va_qattr]
type operand (tc tr:eqtype) : eqtype =
| OConst: n:tc -> operand tc tr
| OReg: r:tr -> operand tc tr
| OMem: m:tmaddr -> operand tc tr
| OStack: m:tmaddr -> operand tc tr
[@va_qattr]
let operand_rf (rf:reg_file_id) : eqtype =
operand (t_reg_file rf) (reg_id rf)
[@va_qattr]
unfold let oreg (r:reg) : operand_rf r.rf =
OReg r.r
let reg_64 : Type0 = r:nat{r < 16}
let reg_xmm : Type0 = r:nat{r < 16}
[@va_qattr] unfold let rRax : reg_64 = 0
[@va_qattr] unfold let rRbx : reg_64 = 1
[@va_qattr] unfold let rRcx : reg_64 = 2
[@va_qattr] unfold let rRdx : reg_64 = 3
[@va_qattr] unfold let rRsi : reg_64 = 4
[@va_qattr] unfold let rRdi : reg_64 = 5
[@va_qattr] unfold let rRbp : reg_64 = 6
[@va_qattr] unfold let rRsp : reg_64 = 7
[@va_qattr] unfold let rR8 : reg_64 = 8
[@va_qattr] unfold let rR9 : reg_64 = 9
[@va_qattr] unfold let rR10 : reg_64 = 10
[@va_qattr] unfold let rR11 : reg_64 = 11
[@va_qattr] unfold let rR12 : reg_64 = 12
[@va_qattr] unfold let rR13 : reg_64 = 13
[@va_qattr] unfold let rR14 : reg_64 = 14
[@va_qattr] unfold let rR15 : reg_64 = 15
[@va_qattr] unfold let reg_Rax : reg = Reg 0 0 | false | true | Vale.X64.Machine_s.fst | {
"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_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val reg_Rcx:reg | [] | Vale.X64.Machine_s.reg_Rcx | {
"file_name": "vale/specs/hardware/Vale.X64.Machine_s.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | Vale.X64.Machine_s.reg | {
"end_col": 46,
"end_line": 90,
"start_col": 39,
"start_line": 90
} |
Prims.Tot | val t_reg_file (rf: reg_file_id) : Type0 | [
{
"abbrev": false,
"full_module": "Vale.Arch.HeapTypes_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let t_reg_file (rf:reg_file_id) : Type0 =
match rf with
| 0 -> nat64
| 1 -> quad32 | val t_reg_file (rf: reg_file_id) : Type0
let t_reg_file (rf: reg_file_id) : Type0 = | false | null | false | match rf with
| 0 -> nat64
| 1 -> quad32 | {
"checked_file": "Vale.X64.Machine_s.fst.checked",
"dependencies": [
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.HeapTypes_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "Vale.X64.Machine_s.fst"
} | [
"total"
] | [
"Vale.X64.Machine_s.reg_file_id",
"Vale.X64.Machine_s.nat64",
"Vale.X64.Machine_s.quad32"
] | [] | module Vale.X64.Machine_s
open FStar.Mul
include Vale.Arch.HeapTypes_s
irreducible let va_qattr = ()
unfold let pow2_32 = Vale.Def.Words_s.pow2_32
unfold let pow2_64 = Vale.Def.Words_s.pow2_64
unfold let pow2_128 = Vale.Def.Words_s.pow2_128
unfold let nat64 = Vale.Def.Types_s.nat64
let int_to_nat64 (i:int) : n:nat64{0 <= i && i < pow2_64 ==> i == n} =
Vale.Def.Words_s.int_to_natN pow2_64 i
unfold let nat128 = Vale.Def.Words_s.nat128
unfold let quad32 = Vale.Def.Types_s.quad32
type flag:eqtype = i:int{0 <= i /\ i < 16}
[@va_qattr] unfold let fCarry : flag = 0
[@va_qattr] unfold let fOverflow : flag = 11
let n_reg_files = 2
let reg_file_id = rf:nat{rf < n_reg_files}
let n_regs (rf:reg_file_id) : nat =
match rf with
| 0 -> 16
| 1 -> 16 | false | true | Vale.X64.Machine_s.fst | {
"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_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val t_reg_file (rf: reg_file_id) : Type0 | [] | Vale.X64.Machine_s.t_reg_file | {
"file_name": "vale/specs/hardware/Vale.X64.Machine_s.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | rf: Vale.X64.Machine_s.reg_file_id -> Type0 | {
"end_col": 15,
"end_line": 30,
"start_col": 2,
"start_line": 28
} |
Prims.Tot | val reg_R12:reg | [
{
"abbrev": false,
"full_module": "Vale.Arch.HeapTypes_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let reg_R12 : reg = Reg 0 12 | val reg_R12:reg
let reg_R12:reg = | false | null | false | Reg 0 12 | {
"checked_file": "Vale.X64.Machine_s.fst.checked",
"dependencies": [
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.HeapTypes_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "Vale.X64.Machine_s.fst"
} | [
"total"
] | [
"Vale.X64.Machine_s.Reg"
] | [] | module Vale.X64.Machine_s
open FStar.Mul
include Vale.Arch.HeapTypes_s
irreducible let va_qattr = ()
unfold let pow2_32 = Vale.Def.Words_s.pow2_32
unfold let pow2_64 = Vale.Def.Words_s.pow2_64
unfold let pow2_128 = Vale.Def.Words_s.pow2_128
unfold let nat64 = Vale.Def.Types_s.nat64
let int_to_nat64 (i:int) : n:nat64{0 <= i && i < pow2_64 ==> i == n} =
Vale.Def.Words_s.int_to_natN pow2_64 i
unfold let nat128 = Vale.Def.Words_s.nat128
unfold let quad32 = Vale.Def.Types_s.quad32
type flag:eqtype = i:int{0 <= i /\ i < 16}
[@va_qattr] unfold let fCarry : flag = 0
[@va_qattr] unfold let fOverflow : flag = 11
let n_reg_files = 2
let reg_file_id = rf:nat{rf < n_reg_files}
let n_regs (rf:reg_file_id) : nat =
match rf with
| 0 -> 16
| 1 -> 16
let t_reg_file (rf:reg_file_id) : Type0 =
match rf with
| 0 -> nat64
| 1 -> quad32
let reg_id (rf:reg_file_id) : Type0 = r:nat{r < n_regs rf}
[@va_qattr]
type reg =
| Reg: rf:reg_file_id -> r:reg_id rf -> reg
let t_reg (r:reg) : Type0 = t_reg_file r.rf
// Some register files can be used as integers (for addresses); others arbitrarily return 0
let t_reg_to_int (rf:reg_file_id) (v:t_reg_file rf) : int =
match rf with
| 0 -> v
| 1 -> 0
type maddr:eqtype =
| MConst: n:int -> maddr
| MReg: r:reg -> offset:int -> maddr
| MIndex: base:reg -> scale:int -> index:reg -> offset:int -> maddr
type tmaddr:eqtype = maddr & taint
[@va_qattr]
type operand (tc tr:eqtype) : eqtype =
| OConst: n:tc -> operand tc tr
| OReg: r:tr -> operand tc tr
| OMem: m:tmaddr -> operand tc tr
| OStack: m:tmaddr -> operand tc tr
[@va_qattr]
let operand_rf (rf:reg_file_id) : eqtype =
operand (t_reg_file rf) (reg_id rf)
[@va_qattr]
unfold let oreg (r:reg) : operand_rf r.rf =
OReg r.r
let reg_64 : Type0 = r:nat{r < 16}
let reg_xmm : Type0 = r:nat{r < 16}
[@va_qattr] unfold let rRax : reg_64 = 0
[@va_qattr] unfold let rRbx : reg_64 = 1
[@va_qattr] unfold let rRcx : reg_64 = 2
[@va_qattr] unfold let rRdx : reg_64 = 3
[@va_qattr] unfold let rRsi : reg_64 = 4
[@va_qattr] unfold let rRdi : reg_64 = 5
[@va_qattr] unfold let rRbp : reg_64 = 6
[@va_qattr] unfold let rRsp : reg_64 = 7
[@va_qattr] unfold let rR8 : reg_64 = 8
[@va_qattr] unfold let rR9 : reg_64 = 9
[@va_qattr] unfold let rR10 : reg_64 = 10
[@va_qattr] unfold let rR11 : reg_64 = 11
[@va_qattr] unfold let rR12 : reg_64 = 12
[@va_qattr] unfold let rR13 : reg_64 = 13
[@va_qattr] unfold let rR14 : reg_64 = 14
[@va_qattr] unfold let rR15 : reg_64 = 15
[@va_qattr] unfold let reg_Rax : reg = Reg 0 0
[@va_qattr] unfold let reg_Rbx : reg = Reg 0 1
[@va_qattr] unfold let reg_Rcx : reg = Reg 0 2
[@va_qattr] unfold let reg_Rdx : reg = Reg 0 3
[@va_qattr] unfold let reg_Rsi : reg = Reg 0 4
[@va_qattr] unfold let reg_Rdi : reg = Reg 0 5
[@va_qattr] unfold let reg_Rbp : reg = Reg 0 6
[@va_qattr] unfold let reg_Rsp : reg = Reg 0 7
[@va_qattr] unfold let reg_R8 : reg = Reg 0 8
[@va_qattr] unfold let reg_R9 : reg = Reg 0 9
[@va_qattr] unfold let reg_R10 : reg = Reg 0 10 | false | true | Vale.X64.Machine_s.fst | {
"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_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val reg_R12:reg | [] | Vale.X64.Machine_s.reg_R12 | {
"file_name": "vale/specs/hardware/Vale.X64.Machine_s.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | Vale.X64.Machine_s.reg | {
"end_col": 47,
"end_line": 100,
"start_col": 39,
"start_line": 100
} |
Prims.Tot | val reg_Rdi:reg | [
{
"abbrev": false,
"full_module": "Vale.Arch.HeapTypes_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let reg_Rdi : reg = Reg 0 5 | val reg_Rdi:reg
let reg_Rdi:reg = | false | null | false | Reg 0 5 | {
"checked_file": "Vale.X64.Machine_s.fst.checked",
"dependencies": [
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.HeapTypes_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "Vale.X64.Machine_s.fst"
} | [
"total"
] | [
"Vale.X64.Machine_s.Reg"
] | [] | module Vale.X64.Machine_s
open FStar.Mul
include Vale.Arch.HeapTypes_s
irreducible let va_qattr = ()
unfold let pow2_32 = Vale.Def.Words_s.pow2_32
unfold let pow2_64 = Vale.Def.Words_s.pow2_64
unfold let pow2_128 = Vale.Def.Words_s.pow2_128
unfold let nat64 = Vale.Def.Types_s.nat64
let int_to_nat64 (i:int) : n:nat64{0 <= i && i < pow2_64 ==> i == n} =
Vale.Def.Words_s.int_to_natN pow2_64 i
unfold let nat128 = Vale.Def.Words_s.nat128
unfold let quad32 = Vale.Def.Types_s.quad32
type flag:eqtype = i:int{0 <= i /\ i < 16}
[@va_qattr] unfold let fCarry : flag = 0
[@va_qattr] unfold let fOverflow : flag = 11
let n_reg_files = 2
let reg_file_id = rf:nat{rf < n_reg_files}
let n_regs (rf:reg_file_id) : nat =
match rf with
| 0 -> 16
| 1 -> 16
let t_reg_file (rf:reg_file_id) : Type0 =
match rf with
| 0 -> nat64
| 1 -> quad32
let reg_id (rf:reg_file_id) : Type0 = r:nat{r < n_regs rf}
[@va_qattr]
type reg =
| Reg: rf:reg_file_id -> r:reg_id rf -> reg
let t_reg (r:reg) : Type0 = t_reg_file r.rf
// Some register files can be used as integers (for addresses); others arbitrarily return 0
let t_reg_to_int (rf:reg_file_id) (v:t_reg_file rf) : int =
match rf with
| 0 -> v
| 1 -> 0
type maddr:eqtype =
| MConst: n:int -> maddr
| MReg: r:reg -> offset:int -> maddr
| MIndex: base:reg -> scale:int -> index:reg -> offset:int -> maddr
type tmaddr:eqtype = maddr & taint
[@va_qattr]
type operand (tc tr:eqtype) : eqtype =
| OConst: n:tc -> operand tc tr
| OReg: r:tr -> operand tc tr
| OMem: m:tmaddr -> operand tc tr
| OStack: m:tmaddr -> operand tc tr
[@va_qattr]
let operand_rf (rf:reg_file_id) : eqtype =
operand (t_reg_file rf) (reg_id rf)
[@va_qattr]
unfold let oreg (r:reg) : operand_rf r.rf =
OReg r.r
let reg_64 : Type0 = r:nat{r < 16}
let reg_xmm : Type0 = r:nat{r < 16}
[@va_qattr] unfold let rRax : reg_64 = 0
[@va_qattr] unfold let rRbx : reg_64 = 1
[@va_qattr] unfold let rRcx : reg_64 = 2
[@va_qattr] unfold let rRdx : reg_64 = 3
[@va_qattr] unfold let rRsi : reg_64 = 4
[@va_qattr] unfold let rRdi : reg_64 = 5
[@va_qattr] unfold let rRbp : reg_64 = 6
[@va_qattr] unfold let rRsp : reg_64 = 7
[@va_qattr] unfold let rR8 : reg_64 = 8
[@va_qattr] unfold let rR9 : reg_64 = 9
[@va_qattr] unfold let rR10 : reg_64 = 10
[@va_qattr] unfold let rR11 : reg_64 = 11
[@va_qattr] unfold let rR12 : reg_64 = 12
[@va_qattr] unfold let rR13 : reg_64 = 13
[@va_qattr] unfold let rR14 : reg_64 = 14
[@va_qattr] unfold let rR15 : reg_64 = 15
[@va_qattr] unfold let reg_Rax : reg = Reg 0 0
[@va_qattr] unfold let reg_Rbx : reg = Reg 0 1
[@va_qattr] unfold let reg_Rcx : reg = Reg 0 2
[@va_qattr] unfold let reg_Rdx : reg = Reg 0 3 | false | true | Vale.X64.Machine_s.fst | {
"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_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val reg_Rdi:reg | [] | Vale.X64.Machine_s.reg_Rdi | {
"file_name": "vale/specs/hardware/Vale.X64.Machine_s.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | Vale.X64.Machine_s.reg | {
"end_col": 46,
"end_line": 93,
"start_col": 39,
"start_line": 93
} |
Prims.Tot | val reg_R10:reg | [
{
"abbrev": false,
"full_module": "Vale.Arch.HeapTypes_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let reg_R10 : reg = Reg 0 10 | val reg_R10:reg
let reg_R10:reg = | false | null | false | Reg 0 10 | {
"checked_file": "Vale.X64.Machine_s.fst.checked",
"dependencies": [
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.HeapTypes_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "Vale.X64.Machine_s.fst"
} | [
"total"
] | [
"Vale.X64.Machine_s.Reg"
] | [] | module Vale.X64.Machine_s
open FStar.Mul
include Vale.Arch.HeapTypes_s
irreducible let va_qattr = ()
unfold let pow2_32 = Vale.Def.Words_s.pow2_32
unfold let pow2_64 = Vale.Def.Words_s.pow2_64
unfold let pow2_128 = Vale.Def.Words_s.pow2_128
unfold let nat64 = Vale.Def.Types_s.nat64
let int_to_nat64 (i:int) : n:nat64{0 <= i && i < pow2_64 ==> i == n} =
Vale.Def.Words_s.int_to_natN pow2_64 i
unfold let nat128 = Vale.Def.Words_s.nat128
unfold let quad32 = Vale.Def.Types_s.quad32
type flag:eqtype = i:int{0 <= i /\ i < 16}
[@va_qattr] unfold let fCarry : flag = 0
[@va_qattr] unfold let fOverflow : flag = 11
let n_reg_files = 2
let reg_file_id = rf:nat{rf < n_reg_files}
let n_regs (rf:reg_file_id) : nat =
match rf with
| 0 -> 16
| 1 -> 16
let t_reg_file (rf:reg_file_id) : Type0 =
match rf with
| 0 -> nat64
| 1 -> quad32
let reg_id (rf:reg_file_id) : Type0 = r:nat{r < n_regs rf}
[@va_qattr]
type reg =
| Reg: rf:reg_file_id -> r:reg_id rf -> reg
let t_reg (r:reg) : Type0 = t_reg_file r.rf
// Some register files can be used as integers (for addresses); others arbitrarily return 0
let t_reg_to_int (rf:reg_file_id) (v:t_reg_file rf) : int =
match rf with
| 0 -> v
| 1 -> 0
type maddr:eqtype =
| MConst: n:int -> maddr
| MReg: r:reg -> offset:int -> maddr
| MIndex: base:reg -> scale:int -> index:reg -> offset:int -> maddr
type tmaddr:eqtype = maddr & taint
[@va_qattr]
type operand (tc tr:eqtype) : eqtype =
| OConst: n:tc -> operand tc tr
| OReg: r:tr -> operand tc tr
| OMem: m:tmaddr -> operand tc tr
| OStack: m:tmaddr -> operand tc tr
[@va_qattr]
let operand_rf (rf:reg_file_id) : eqtype =
operand (t_reg_file rf) (reg_id rf)
[@va_qattr]
unfold let oreg (r:reg) : operand_rf r.rf =
OReg r.r
let reg_64 : Type0 = r:nat{r < 16}
let reg_xmm : Type0 = r:nat{r < 16}
[@va_qattr] unfold let rRax : reg_64 = 0
[@va_qattr] unfold let rRbx : reg_64 = 1
[@va_qattr] unfold let rRcx : reg_64 = 2
[@va_qattr] unfold let rRdx : reg_64 = 3
[@va_qattr] unfold let rRsi : reg_64 = 4
[@va_qattr] unfold let rRdi : reg_64 = 5
[@va_qattr] unfold let rRbp : reg_64 = 6
[@va_qattr] unfold let rRsp : reg_64 = 7
[@va_qattr] unfold let rR8 : reg_64 = 8
[@va_qattr] unfold let rR9 : reg_64 = 9
[@va_qattr] unfold let rR10 : reg_64 = 10
[@va_qattr] unfold let rR11 : reg_64 = 11
[@va_qattr] unfold let rR12 : reg_64 = 12
[@va_qattr] unfold let rR13 : reg_64 = 13
[@va_qattr] unfold let rR14 : reg_64 = 14
[@va_qattr] unfold let rR15 : reg_64 = 15
[@va_qattr] unfold let reg_Rax : reg = Reg 0 0
[@va_qattr] unfold let reg_Rbx : reg = Reg 0 1
[@va_qattr] unfold let reg_Rcx : reg = Reg 0 2
[@va_qattr] unfold let reg_Rdx : reg = Reg 0 3
[@va_qattr] unfold let reg_Rsi : reg = Reg 0 4
[@va_qattr] unfold let reg_Rdi : reg = Reg 0 5
[@va_qattr] unfold let reg_Rbp : reg = Reg 0 6
[@va_qattr] unfold let reg_Rsp : reg = Reg 0 7
[@va_qattr] unfold let reg_R8 : reg = Reg 0 8 | false | true | Vale.X64.Machine_s.fst | {
"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_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val reg_R10:reg | [] | Vale.X64.Machine_s.reg_R10 | {
"file_name": "vale/specs/hardware/Vale.X64.Machine_s.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | Vale.X64.Machine_s.reg | {
"end_col": 47,
"end_line": 98,
"start_col": 39,
"start_line": 98
} |
FStar.Tactics.Effect.Tac | val iteri: (int -> 'a -> Tac unit) -> list 'a -> Tac unit | [
{
"abbrev": false,
"full_module": "FStar.List.Tot.Base",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics.Effect",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let iteri f x = iteri_aux 0 f x | val iteri: (int -> 'a -> Tac unit) -> list 'a -> Tac unit
let iteri f x = | true | null | false | iteri_aux 0 f x | {
"checked_file": "FStar.Tactics.Util.fst.checked",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.Base.fst.checked"
],
"interface_file": false,
"source_file": "FStar.Tactics.Util.fst"
} | [] | [
"Prims.int",
"Prims.unit",
"Prims.list",
"FStar.Tactics.Util.iteri_aux"
] | [] | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*)
module FStar.Tactics.Util
open FStar.Tactics.Effect
open FStar.List.Tot.Base
(* Tac list functions, since there's no effect polymorphism *)
val map: ('a -> Tac 'b) -> list 'a -> Tac (list 'b)
let rec map f x = match x with
| [] -> []
| a::tl -> f a::map f tl
val __mapi: nat -> (nat -> 'a -> Tac 'b) -> list 'a -> Tac (list 'b)
let rec __mapi i f x = match x with
| [] -> []
| a::tl -> f i a::__mapi (i+1) f tl
val mapi: (nat -> 'a -> Tac 'b) -> list 'a -> Tac (list 'b)
let mapi f l = __mapi 0 f l
val iter : ('a -> Tac unit) -> list 'a -> Tac unit
let rec iter f x = match x with
| [] -> ()
| a::tl -> f a; iter f tl
val iteri_aux: int -> (int -> 'a -> Tac unit) -> list 'a -> Tac unit
let rec iteri_aux i f x = match x with
| [] -> ()
| a::tl -> f i a; iteri_aux (i+1) f tl | false | false | FStar.Tactics.Util.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_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": true,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val iteri: (int -> 'a -> Tac unit) -> list 'a -> Tac unit | [] | FStar.Tactics.Util.iteri | {
"file_name": "ulib/FStar.Tactics.Util.fst",
"git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | f: (_: Prims.int -> _: 'a -> FStar.Tactics.Effect.Tac Prims.unit) -> x: Prims.list 'a
-> FStar.Tactics.Effect.Tac Prims.unit | {
"end_col": 31,
"end_line": 46,
"start_col": 16,
"start_line": 46
} |
FStar.Tactics.Effect.Tac | val mapi: (nat -> 'a -> Tac 'b) -> list 'a -> Tac (list 'b) | [
{
"abbrev": false,
"full_module": "FStar.List.Tot.Base",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics.Effect",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let mapi f l = __mapi 0 f l | val mapi: (nat -> 'a -> Tac 'b) -> list 'a -> Tac (list 'b)
let mapi f l = | true | null | false | __mapi 0 f l | {
"checked_file": "FStar.Tactics.Util.fst.checked",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.Base.fst.checked"
],
"interface_file": false,
"source_file": "FStar.Tactics.Util.fst"
} | [] | [
"Prims.nat",
"Prims.list",
"FStar.Tactics.Util.__mapi"
] | [] | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*)
module FStar.Tactics.Util
open FStar.Tactics.Effect
open FStar.List.Tot.Base
(* Tac list functions, since there's no effect polymorphism *)
val map: ('a -> Tac 'b) -> list 'a -> Tac (list 'b)
let rec map f x = match x with
| [] -> []
| a::tl -> f a::map f tl
val __mapi: nat -> (nat -> 'a -> Tac 'b) -> list 'a -> Tac (list 'b)
let rec __mapi i f x = match x with
| [] -> []
| a::tl -> f i a::__mapi (i+1) f tl | false | false | FStar.Tactics.Util.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_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": true,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val mapi: (nat -> 'a -> Tac 'b) -> list 'a -> Tac (list 'b) | [] | FStar.Tactics.Util.mapi | {
"file_name": "ulib/FStar.Tactics.Util.fst",
"git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | f: (_: Prims.nat -> _: 'a -> FStar.Tactics.Effect.Tac 'b) -> l: Prims.list 'a
-> FStar.Tactics.Effect.Tac (Prims.list 'b) | {
"end_col": 27,
"end_line": 33,
"start_col": 15,
"start_line": 33
} |
FStar.Tactics.Effect.Tac | val filter_map (f: ('a -> Tac (option 'b))) (l: list 'a) : Tac (list 'b) | [
{
"abbrev": false,
"full_module": "FStar.List.Tot.Base",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics.Effect",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let filter_map (f:'a -> Tac (option 'b)) (l:list 'a) : Tac (list 'b) =
filter_map_acc f [] l | val filter_map (f: ('a -> Tac (option 'b))) (l: list 'a) : Tac (list 'b)
let filter_map (f: ('a -> Tac (option 'b))) (l: list 'a) : Tac (list 'b) = | true | null | false | filter_map_acc f [] l | {
"checked_file": "FStar.Tactics.Util.fst.checked",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.Base.fst.checked"
],
"interface_file": false,
"source_file": "FStar.Tactics.Util.fst"
} | [] | [
"FStar.Pervasives.Native.option",
"Prims.list",
"FStar.Tactics.Util.filter_map_acc",
"Prims.Nil"
] | [] | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*)
module FStar.Tactics.Util
open FStar.Tactics.Effect
open FStar.List.Tot.Base
(* Tac list functions, since there's no effect polymorphism *)
val map: ('a -> Tac 'b) -> list 'a -> Tac (list 'b)
let rec map f x = match x with
| [] -> []
| a::tl -> f a::map f tl
val __mapi: nat -> (nat -> 'a -> Tac 'b) -> list 'a -> Tac (list 'b)
let rec __mapi i f x = match x with
| [] -> []
| a::tl -> f i a::__mapi (i+1) f tl
val mapi: (nat -> 'a -> Tac 'b) -> list 'a -> Tac (list 'b)
let mapi f l = __mapi 0 f l
val iter : ('a -> Tac unit) -> list 'a -> Tac unit
let rec iter f x = match x with
| [] -> ()
| a::tl -> f a; iter f tl
val iteri_aux: int -> (int -> 'a -> Tac unit) -> list 'a -> Tac unit
let rec iteri_aux i f x = match x with
| [] -> ()
| a::tl -> f i a; iteri_aux (i+1) f tl
val iteri: (int -> 'a -> Tac unit) -> list 'a -> Tac unit
let iteri f x = iteri_aux 0 f x
val fold_left: ('a -> 'b -> Tac 'a) -> 'a -> l:list 'b -> Tac 'a
let rec fold_left f x l = match l with
| [] -> x
| hd::tl -> fold_left f (f x hd) tl
val fold_right: ('a -> 'b -> Tac 'b) -> list 'a -> 'b -> Tac 'b
let rec fold_right f l x = match l with
| [] -> x
| hd::tl -> f hd (fold_right f tl x)
(* There's no unconditionally total zip like this in Tot.Base, why? Anyway use this *)
val zip : (#a:Type) -> (#b:Type) -> list a -> list b -> Tac (list (a * b))
let rec zip #a #b l1 l2 = match l1, l2 with
| x::xs, y::ys -> (x,y) :: (zip xs ys)
| _ -> []
val filter: ('a -> Tac bool) -> list 'a -> Tac (list 'a)
let rec filter f = function
| [] -> []
| hd::tl -> if f hd then hd::(filter f tl) else filter f tl
private let rec filter_map_acc (f:'a -> Tac (option 'b)) (acc:list 'b) (l:list 'a)
: Tac (list 'b) =
match l with
| [] ->
rev acc
| hd :: tl ->
match f hd with
| Some hd ->
filter_map_acc f (hd :: acc) tl
| None ->
filter_map_acc f acc tl | false | false | FStar.Tactics.Util.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_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": true,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val filter_map (f: ('a -> Tac (option 'b))) (l: list 'a) : Tac (list 'b) | [] | FStar.Tactics.Util.filter_map | {
"file_name": "ulib/FStar.Tactics.Util.fst",
"git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | f: (_: 'a -> FStar.Tactics.Effect.Tac (FStar.Pervasives.Native.option 'b)) -> l: Prims.list 'a
-> FStar.Tactics.Effect.Tac (Prims.list 'b) | {
"end_col": 23,
"end_line": 82,
"start_col": 2,
"start_line": 82
} |
FStar.Tactics.Effect.Tac | val repeatn (#a: Type) (n: int) (t: (unit -> Tac a)) : Tac (list a) | [
{
"abbrev": false,
"full_module": "FStar.List.Tot.Base",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics.Effect",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let rec repeatn (#a:Type) (n : int) (t : unit -> Tac a) : Tac (list a) =
if n <= 0
then []
else t () :: repeatn (n - 1) t | val repeatn (#a: Type) (n: int) (t: (unit -> Tac a)) : Tac (list a)
let rec repeatn (#a: Type) (n: int) (t: (unit -> Tac a)) : Tac (list a) = | true | null | false | if n <= 0 then [] else t () :: repeatn (n - 1) t | {
"checked_file": "FStar.Tactics.Util.fst.checked",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.Base.fst.checked"
],
"interface_file": false,
"source_file": "FStar.Tactics.Util.fst"
} | [] | [
"Prims.int",
"Prims.unit",
"Prims.op_LessThanOrEqual",
"Prims.Nil",
"Prims.list",
"Prims.bool",
"Prims.Cons",
"FStar.Tactics.Util.repeatn",
"Prims.op_Subtraction"
] | [] | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*)
module FStar.Tactics.Util
open FStar.Tactics.Effect
open FStar.List.Tot.Base
(* Tac list functions, since there's no effect polymorphism *)
val map: ('a -> Tac 'b) -> list 'a -> Tac (list 'b)
let rec map f x = match x with
| [] -> []
| a::tl -> f a::map f tl
val __mapi: nat -> (nat -> 'a -> Tac 'b) -> list 'a -> Tac (list 'b)
let rec __mapi i f x = match x with
| [] -> []
| a::tl -> f i a::__mapi (i+1) f tl
val mapi: (nat -> 'a -> Tac 'b) -> list 'a -> Tac (list 'b)
let mapi f l = __mapi 0 f l
val iter : ('a -> Tac unit) -> list 'a -> Tac unit
let rec iter f x = match x with
| [] -> ()
| a::tl -> f a; iter f tl
val iteri_aux: int -> (int -> 'a -> Tac unit) -> list 'a -> Tac unit
let rec iteri_aux i f x = match x with
| [] -> ()
| a::tl -> f i a; iteri_aux (i+1) f tl
val iteri: (int -> 'a -> Tac unit) -> list 'a -> Tac unit
let iteri f x = iteri_aux 0 f x
val fold_left: ('a -> 'b -> Tac 'a) -> 'a -> l:list 'b -> Tac 'a
let rec fold_left f x l = match l with
| [] -> x
| hd::tl -> fold_left f (f x hd) tl
val fold_right: ('a -> 'b -> Tac 'b) -> list 'a -> 'b -> Tac 'b
let rec fold_right f l x = match l with
| [] -> x
| hd::tl -> f hd (fold_right f tl x)
(* There's no unconditionally total zip like this in Tot.Base, why? Anyway use this *)
val zip : (#a:Type) -> (#b:Type) -> list a -> list b -> Tac (list (a * b))
let rec zip #a #b l1 l2 = match l1, l2 with
| x::xs, y::ys -> (x,y) :: (zip xs ys)
| _ -> []
val filter: ('a -> Tac bool) -> list 'a -> Tac (list 'a)
let rec filter f = function
| [] -> []
| hd::tl -> if f hd then hd::(filter f tl) else filter f tl
private let rec filter_map_acc (f:'a -> Tac (option 'b)) (acc:list 'b) (l:list 'a)
: Tac (list 'b) =
match l with
| [] ->
rev acc
| hd :: tl ->
match f hd with
| Some hd ->
filter_map_acc f (hd :: acc) tl
| None ->
filter_map_acc f acc tl
let filter_map (f:'a -> Tac (option 'b)) (l:list 'a) : Tac (list 'b) =
filter_map_acc f [] l
val tryPick: ('a -> Tac (option 'b)) -> list 'a -> Tac (option 'b)
let rec tryPick f l = match l with
| [] -> None
| hd::tl ->
match f hd with
| Some x -> Some x
| None -> tryPick f tl
let map_opt (f:'a -> Tac 'b) (x:option 'a) : Tac (option 'b) =
match x with
| None -> None
| Some x -> Some (f x)
(** Apply a given tactic [t] repeatedly [n] times and return the results. *) | false | false | FStar.Tactics.Util.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_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": true,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val repeatn (#a: Type) (n: int) (t: (unit -> Tac a)) : Tac (list a) | [
"recursion"
] | FStar.Tactics.Util.repeatn | {
"file_name": "ulib/FStar.Tactics.Util.fst",
"git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | n: Prims.int -> t: (_: Prims.unit -> FStar.Tactics.Effect.Tac a)
-> FStar.Tactics.Effect.Tac (Prims.list a) | {
"end_col": 34,
"end_line": 101,
"start_col": 4,
"start_line": 99
} |
FStar.Tactics.Effect.Tac | val zip : (#a:Type) -> (#b:Type) -> list a -> list b -> Tac (list (a * b)) | [
{
"abbrev": false,
"full_module": "FStar.List.Tot.Base",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics.Effect",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let rec zip #a #b l1 l2 = match l1, l2 with
| x::xs, y::ys -> (x,y) :: (zip xs ys)
| _ -> [] | val zip : (#a:Type) -> (#b:Type) -> list a -> list b -> Tac (list (a * b))
let rec zip #a #b l1 l2 = | true | null | false | match l1, l2 with
| x :: xs, y :: ys -> (x, y) :: (zip xs ys)
| _ -> [] | {
"checked_file": "FStar.Tactics.Util.fst.checked",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.Base.fst.checked"
],
"interface_file": false,
"source_file": "FStar.Tactics.Util.fst"
} | [] | [
"Prims.list",
"FStar.Pervasives.Native.Mktuple2",
"Prims.Cons",
"FStar.Pervasives.Native.tuple2",
"FStar.Tactics.Util.zip",
"Prims.Nil"
] | [] | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*)
module FStar.Tactics.Util
open FStar.Tactics.Effect
open FStar.List.Tot.Base
(* Tac list functions, since there's no effect polymorphism *)
val map: ('a -> Tac 'b) -> list 'a -> Tac (list 'b)
let rec map f x = match x with
| [] -> []
| a::tl -> f a::map f tl
val __mapi: nat -> (nat -> 'a -> Tac 'b) -> list 'a -> Tac (list 'b)
let rec __mapi i f x = match x with
| [] -> []
| a::tl -> f i a::__mapi (i+1) f tl
val mapi: (nat -> 'a -> Tac 'b) -> list 'a -> Tac (list 'b)
let mapi f l = __mapi 0 f l
val iter : ('a -> Tac unit) -> list 'a -> Tac unit
let rec iter f x = match x with
| [] -> ()
| a::tl -> f a; iter f tl
val iteri_aux: int -> (int -> 'a -> Tac unit) -> list 'a -> Tac unit
let rec iteri_aux i f x = match x with
| [] -> ()
| a::tl -> f i a; iteri_aux (i+1) f tl
val iteri: (int -> 'a -> Tac unit) -> list 'a -> Tac unit
let iteri f x = iteri_aux 0 f x
val fold_left: ('a -> 'b -> Tac 'a) -> 'a -> l:list 'b -> Tac 'a
let rec fold_left f x l = match l with
| [] -> x
| hd::tl -> fold_left f (f x hd) tl
val fold_right: ('a -> 'b -> Tac 'b) -> list 'a -> 'b -> Tac 'b
let rec fold_right f l x = match l with
| [] -> x
| hd::tl -> f hd (fold_right f tl x)
(* There's no unconditionally total zip like this in Tot.Base, why? Anyway use this *) | false | false | FStar.Tactics.Util.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_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": true,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val zip : (#a:Type) -> (#b:Type) -> list a -> list b -> Tac (list (a * b)) | [
"recursion"
] | FStar.Tactics.Util.zip | {
"file_name": "ulib/FStar.Tactics.Util.fst",
"git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | l1: Prims.list a -> l2: Prims.list b -> FStar.Tactics.Effect.Tac (Prims.list (a * b)) | {
"end_col": 13,
"end_line": 62,
"start_col": 26,
"start_line": 60
} |
FStar.Tactics.Effect.Tac | val fold_left: ('a -> 'b -> Tac 'a) -> 'a -> l:list 'b -> Tac 'a | [
{
"abbrev": false,
"full_module": "FStar.List.Tot.Base",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics.Effect",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let rec fold_left f x l = match l with
| [] -> x
| hd::tl -> fold_left f (f x hd) tl | val fold_left: ('a -> 'b -> Tac 'a) -> 'a -> l:list 'b -> Tac 'a
let rec fold_left f x l = | true | null | false | match l with
| [] -> x
| hd :: tl -> fold_left f (f x hd) tl | {
"checked_file": "FStar.Tactics.Util.fst.checked",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.Base.fst.checked"
],
"interface_file": false,
"source_file": "FStar.Tactics.Util.fst"
} | [] | [
"Prims.list",
"FStar.Tactics.Util.fold_left"
] | [] | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*)
module FStar.Tactics.Util
open FStar.Tactics.Effect
open FStar.List.Tot.Base
(* Tac list functions, since there's no effect polymorphism *)
val map: ('a -> Tac 'b) -> list 'a -> Tac (list 'b)
let rec map f x = match x with
| [] -> []
| a::tl -> f a::map f tl
val __mapi: nat -> (nat -> 'a -> Tac 'b) -> list 'a -> Tac (list 'b)
let rec __mapi i f x = match x with
| [] -> []
| a::tl -> f i a::__mapi (i+1) f tl
val mapi: (nat -> 'a -> Tac 'b) -> list 'a -> Tac (list 'b)
let mapi f l = __mapi 0 f l
val iter : ('a -> Tac unit) -> list 'a -> Tac unit
let rec iter f x = match x with
| [] -> ()
| a::tl -> f a; iter f tl
val iteri_aux: int -> (int -> 'a -> Tac unit) -> list 'a -> Tac unit
let rec iteri_aux i f x = match x with
| [] -> ()
| a::tl -> f i a; iteri_aux (i+1) f tl
val iteri: (int -> 'a -> Tac unit) -> list 'a -> Tac unit
let iteri f x = iteri_aux 0 f x | false | false | FStar.Tactics.Util.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_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": true,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val fold_left: ('a -> 'b -> Tac 'a) -> 'a -> l:list 'b -> Tac 'a | [
"recursion"
] | FStar.Tactics.Util.fold_left | {
"file_name": "ulib/FStar.Tactics.Util.fst",
"git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | f: (_: 'a -> _: 'b -> FStar.Tactics.Effect.Tac 'a) -> x: 'a -> l: Prims.list 'b
-> FStar.Tactics.Effect.Tac 'a | {
"end_col": 37,
"end_line": 51,
"start_col": 26,
"start_line": 49
} |
FStar.Tactics.Effect.Tac | val map_opt (f: ('a -> Tac 'b)) (x: option 'a) : Tac (option 'b) | [
{
"abbrev": false,
"full_module": "FStar.List.Tot.Base",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics.Effect",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let map_opt (f:'a -> Tac 'b) (x:option 'a) : Tac (option 'b) =
match x with
| None -> None
| Some x -> Some (f x) | val map_opt (f: ('a -> Tac 'b)) (x: option 'a) : Tac (option 'b)
let map_opt (f: ('a -> Tac 'b)) (x: option 'a) : Tac (option 'b) = | true | null | false | match x with
| None -> None
| Some x -> Some (f x) | {
"checked_file": "FStar.Tactics.Util.fst.checked",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.Base.fst.checked"
],
"interface_file": false,
"source_file": "FStar.Tactics.Util.fst"
} | [] | [
"FStar.Pervasives.Native.option",
"FStar.Pervasives.Native.None",
"FStar.Pervasives.Native.Some"
] | [] | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*)
module FStar.Tactics.Util
open FStar.Tactics.Effect
open FStar.List.Tot.Base
(* Tac list functions, since there's no effect polymorphism *)
val map: ('a -> Tac 'b) -> list 'a -> Tac (list 'b)
let rec map f x = match x with
| [] -> []
| a::tl -> f a::map f tl
val __mapi: nat -> (nat -> 'a -> Tac 'b) -> list 'a -> Tac (list 'b)
let rec __mapi i f x = match x with
| [] -> []
| a::tl -> f i a::__mapi (i+1) f tl
val mapi: (nat -> 'a -> Tac 'b) -> list 'a -> Tac (list 'b)
let mapi f l = __mapi 0 f l
val iter : ('a -> Tac unit) -> list 'a -> Tac unit
let rec iter f x = match x with
| [] -> ()
| a::tl -> f a; iter f tl
val iteri_aux: int -> (int -> 'a -> Tac unit) -> list 'a -> Tac unit
let rec iteri_aux i f x = match x with
| [] -> ()
| a::tl -> f i a; iteri_aux (i+1) f tl
val iteri: (int -> 'a -> Tac unit) -> list 'a -> Tac unit
let iteri f x = iteri_aux 0 f x
val fold_left: ('a -> 'b -> Tac 'a) -> 'a -> l:list 'b -> Tac 'a
let rec fold_left f x l = match l with
| [] -> x
| hd::tl -> fold_left f (f x hd) tl
val fold_right: ('a -> 'b -> Tac 'b) -> list 'a -> 'b -> Tac 'b
let rec fold_right f l x = match l with
| [] -> x
| hd::tl -> f hd (fold_right f tl x)
(* There's no unconditionally total zip like this in Tot.Base, why? Anyway use this *)
val zip : (#a:Type) -> (#b:Type) -> list a -> list b -> Tac (list (a * b))
let rec zip #a #b l1 l2 = match l1, l2 with
| x::xs, y::ys -> (x,y) :: (zip xs ys)
| _ -> []
val filter: ('a -> Tac bool) -> list 'a -> Tac (list 'a)
let rec filter f = function
| [] -> []
| hd::tl -> if f hd then hd::(filter f tl) else filter f tl
private let rec filter_map_acc (f:'a -> Tac (option 'b)) (acc:list 'b) (l:list 'a)
: Tac (list 'b) =
match l with
| [] ->
rev acc
| hd :: tl ->
match f hd with
| Some hd ->
filter_map_acc f (hd :: acc) tl
| None ->
filter_map_acc f acc tl
let filter_map (f:'a -> Tac (option 'b)) (l:list 'a) : Tac (list 'b) =
filter_map_acc f [] l
val tryPick: ('a -> Tac (option 'b)) -> list 'a -> Tac (option 'b)
let rec tryPick f l = match l with
| [] -> None
| hd::tl ->
match f hd with
| Some x -> Some x
| None -> tryPick f tl | false | false | FStar.Tactics.Util.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_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": true,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val map_opt (f: ('a -> Tac 'b)) (x: option 'a) : Tac (option 'b) | [] | FStar.Tactics.Util.map_opt | {
"file_name": "ulib/FStar.Tactics.Util.fst",
"git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | f: (_: 'a -> FStar.Tactics.Effect.Tac 'b) -> x: FStar.Pervasives.Native.option 'a
-> FStar.Tactics.Effect.Tac (FStar.Pervasives.Native.option 'b) | {
"end_col": 24,
"end_line": 95,
"start_col": 2,
"start_line": 93
} |
FStar.Tactics.Effect.Tac | val map: ('a -> Tac 'b) -> list 'a -> Tac (list 'b) | [
{
"abbrev": false,
"full_module": "FStar.List.Tot.Base",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics.Effect",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let rec map f x = match x with
| [] -> []
| a::tl -> f a::map f tl | val map: ('a -> Tac 'b) -> list 'a -> Tac (list 'b)
let rec map f x = | true | null | false | match x with
| [] -> []
| a :: tl -> f a :: map f tl | {
"checked_file": "FStar.Tactics.Util.fst.checked",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.Base.fst.checked"
],
"interface_file": false,
"source_file": "FStar.Tactics.Util.fst"
} | [] | [
"Prims.list",
"Prims.Nil",
"Prims.Cons",
"FStar.Tactics.Util.map"
] | [] | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*)
module FStar.Tactics.Util
open FStar.Tactics.Effect
open FStar.List.Tot.Base
(* Tac list functions, since there's no effect polymorphism *) | false | false | FStar.Tactics.Util.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_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": true,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val map: ('a -> Tac 'b) -> list 'a -> Tac (list 'b) | [
"recursion"
] | FStar.Tactics.Util.map | {
"file_name": "ulib/FStar.Tactics.Util.fst",
"git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | f: (_: 'a -> FStar.Tactics.Effect.Tac 'b) -> x: Prims.list 'a
-> FStar.Tactics.Effect.Tac (Prims.list 'b) | {
"end_col": 26,
"end_line": 25,
"start_col": 18,
"start_line": 23
} |
FStar.Tactics.Effect.Tac | val fold_right: ('a -> 'b -> Tac 'b) -> list 'a -> 'b -> Tac 'b | [
{
"abbrev": false,
"full_module": "FStar.List.Tot.Base",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics.Effect",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let rec fold_right f l x = match l with
| [] -> x
| hd::tl -> f hd (fold_right f tl x) | val fold_right: ('a -> 'b -> Tac 'b) -> list 'a -> 'b -> Tac 'b
let rec fold_right f l x = | true | null | false | match l with
| [] -> x
| hd :: tl -> f hd (fold_right f tl x) | {
"checked_file": "FStar.Tactics.Util.fst.checked",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.Base.fst.checked"
],
"interface_file": false,
"source_file": "FStar.Tactics.Util.fst"
} | [] | [
"Prims.list",
"FStar.Tactics.Util.fold_right"
] | [] | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*)
module FStar.Tactics.Util
open FStar.Tactics.Effect
open FStar.List.Tot.Base
(* Tac list functions, since there's no effect polymorphism *)
val map: ('a -> Tac 'b) -> list 'a -> Tac (list 'b)
let rec map f x = match x with
| [] -> []
| a::tl -> f a::map f tl
val __mapi: nat -> (nat -> 'a -> Tac 'b) -> list 'a -> Tac (list 'b)
let rec __mapi i f x = match x with
| [] -> []
| a::tl -> f i a::__mapi (i+1) f tl
val mapi: (nat -> 'a -> Tac 'b) -> list 'a -> Tac (list 'b)
let mapi f l = __mapi 0 f l
val iter : ('a -> Tac unit) -> list 'a -> Tac unit
let rec iter f x = match x with
| [] -> ()
| a::tl -> f a; iter f tl
val iteri_aux: int -> (int -> 'a -> Tac unit) -> list 'a -> Tac unit
let rec iteri_aux i f x = match x with
| [] -> ()
| a::tl -> f i a; iteri_aux (i+1) f tl
val iteri: (int -> 'a -> Tac unit) -> list 'a -> Tac unit
let iteri f x = iteri_aux 0 f x
val fold_left: ('a -> 'b -> Tac 'a) -> 'a -> l:list 'b -> Tac 'a
let rec fold_left f x l = match l with
| [] -> x
| hd::tl -> fold_left f (f x hd) tl | false | false | FStar.Tactics.Util.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_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": true,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val fold_right: ('a -> 'b -> Tac 'b) -> list 'a -> 'b -> Tac 'b | [
"recursion"
] | FStar.Tactics.Util.fold_right | {
"file_name": "ulib/FStar.Tactics.Util.fst",
"git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | f: (_: 'a -> _: 'b -> FStar.Tactics.Effect.Tac 'b) -> l: Prims.list 'a -> x: 'b
-> FStar.Tactics.Effect.Tac 'b | {
"end_col": 38,
"end_line": 56,
"start_col": 27,
"start_line": 54
} |
FStar.Tactics.Effect.Tac | val __mapi: nat -> (nat -> 'a -> Tac 'b) -> list 'a -> Tac (list 'b) | [
{
"abbrev": false,
"full_module": "FStar.List.Tot.Base",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics.Effect",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let rec __mapi i f x = match x with
| [] -> []
| a::tl -> f i a::__mapi (i+1) f tl | val __mapi: nat -> (nat -> 'a -> Tac 'b) -> list 'a -> Tac (list 'b)
let rec __mapi i f x = | true | null | false | match x with
| [] -> []
| a :: tl -> f i a :: __mapi (i + 1) f tl | {
"checked_file": "FStar.Tactics.Util.fst.checked",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.Base.fst.checked"
],
"interface_file": false,
"source_file": "FStar.Tactics.Util.fst"
} | [] | [
"Prims.nat",
"Prims.list",
"Prims.Nil",
"Prims.Cons",
"FStar.Tactics.Util.__mapi",
"Prims.op_Addition"
] | [] | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*)
module FStar.Tactics.Util
open FStar.Tactics.Effect
open FStar.List.Tot.Base
(* Tac list functions, since there's no effect polymorphism *)
val map: ('a -> Tac 'b) -> list 'a -> Tac (list 'b)
let rec map f x = match x with
| [] -> []
| a::tl -> f a::map f tl | false | false | FStar.Tactics.Util.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_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": true,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val __mapi: nat -> (nat -> 'a -> Tac 'b) -> list 'a -> Tac (list 'b) | [
"recursion"
] | FStar.Tactics.Util.__mapi | {
"file_name": "ulib/FStar.Tactics.Util.fst",
"git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | i: Prims.nat -> f: (_: Prims.nat -> _: 'a -> FStar.Tactics.Effect.Tac 'b) -> x: Prims.list 'a
-> FStar.Tactics.Effect.Tac (Prims.list 'b) | {
"end_col": 37,
"end_line": 30,
"start_col": 23,
"start_line": 28
} |
FStar.Tactics.Effect.Tac | val filter_map_acc (f: ('a -> Tac (option 'b))) (acc: list 'b) (l: list 'a) : Tac (list 'b) | [
{
"abbrev": false,
"full_module": "FStar.List.Tot.Base",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics.Effect",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let rec filter_map_acc (f:'a -> Tac (option 'b)) (acc:list 'b) (l:list 'a)
: Tac (list 'b) =
match l with
| [] ->
rev acc
| hd :: tl ->
match f hd with
| Some hd ->
filter_map_acc f (hd :: acc) tl
| None ->
filter_map_acc f acc tl | val filter_map_acc (f: ('a -> Tac (option 'b))) (acc: list 'b) (l: list 'a) : Tac (list 'b)
let rec filter_map_acc (f: ('a -> Tac (option 'b))) (acc: list 'b) (l: list 'a) : Tac (list 'b) = | true | null | false | match l with
| [] -> rev acc
| hd :: tl ->
match f hd with
| Some hd -> filter_map_acc f (hd :: acc) tl
| None -> filter_map_acc f acc tl | {
"checked_file": "FStar.Tactics.Util.fst.checked",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.Base.fst.checked"
],
"interface_file": false,
"source_file": "FStar.Tactics.Util.fst"
} | [] | [
"FStar.Pervasives.Native.option",
"Prims.list",
"FStar.List.Tot.Base.rev",
"FStar.Tactics.Util.filter_map_acc",
"Prims.Cons"
] | [] | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*)
module FStar.Tactics.Util
open FStar.Tactics.Effect
open FStar.List.Tot.Base
(* Tac list functions, since there's no effect polymorphism *)
val map: ('a -> Tac 'b) -> list 'a -> Tac (list 'b)
let rec map f x = match x with
| [] -> []
| a::tl -> f a::map f tl
val __mapi: nat -> (nat -> 'a -> Tac 'b) -> list 'a -> Tac (list 'b)
let rec __mapi i f x = match x with
| [] -> []
| a::tl -> f i a::__mapi (i+1) f tl
val mapi: (nat -> 'a -> Tac 'b) -> list 'a -> Tac (list 'b)
let mapi f l = __mapi 0 f l
val iter : ('a -> Tac unit) -> list 'a -> Tac unit
let rec iter f x = match x with
| [] -> ()
| a::tl -> f a; iter f tl
val iteri_aux: int -> (int -> 'a -> Tac unit) -> list 'a -> Tac unit
let rec iteri_aux i f x = match x with
| [] -> ()
| a::tl -> f i a; iteri_aux (i+1) f tl
val iteri: (int -> 'a -> Tac unit) -> list 'a -> Tac unit
let iteri f x = iteri_aux 0 f x
val fold_left: ('a -> 'b -> Tac 'a) -> 'a -> l:list 'b -> Tac 'a
let rec fold_left f x l = match l with
| [] -> x
| hd::tl -> fold_left f (f x hd) tl
val fold_right: ('a -> 'b -> Tac 'b) -> list 'a -> 'b -> Tac 'b
let rec fold_right f l x = match l with
| [] -> x
| hd::tl -> f hd (fold_right f tl x)
(* There's no unconditionally total zip like this in Tot.Base, why? Anyway use this *)
val zip : (#a:Type) -> (#b:Type) -> list a -> list b -> Tac (list (a * b))
let rec zip #a #b l1 l2 = match l1, l2 with
| x::xs, y::ys -> (x,y) :: (zip xs ys)
| _ -> []
val filter: ('a -> Tac bool) -> list 'a -> Tac (list 'a)
let rec filter f = function
| [] -> []
| hd::tl -> if f hd then hd::(filter f tl) else filter f tl
private let rec filter_map_acc (f:'a -> Tac (option 'b)) (acc:list 'b) (l:list 'a) | false | false | FStar.Tactics.Util.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_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": true,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val filter_map_acc (f: ('a -> Tac (option 'b))) (acc: list 'b) (l: list 'a) : Tac (list 'b) | [
"recursion"
] | FStar.Tactics.Util.filter_map_acc | {
"file_name": "ulib/FStar.Tactics.Util.fst",
"git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} |
f: (_: 'a -> FStar.Tactics.Effect.Tac (FStar.Pervasives.Native.option 'b)) ->
acc: Prims.list 'b ->
l: Prims.list 'a
-> FStar.Tactics.Effect.Tac (Prims.list 'b) | {
"end_col": 33,
"end_line": 79,
"start_col": 2,
"start_line": 71
} |
FStar.Tactics.Effect.Tac | val iteri_aux: int -> (int -> 'a -> Tac unit) -> list 'a -> Tac unit | [
{
"abbrev": false,
"full_module": "FStar.List.Tot.Base",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics.Effect",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let rec iteri_aux i f x = match x with
| [] -> ()
| a::tl -> f i a; iteri_aux (i+1) f tl | val iteri_aux: int -> (int -> 'a -> Tac unit) -> list 'a -> Tac unit
let rec iteri_aux i f x = | true | null | false | match x with
| [] -> ()
| a :: tl ->
f i a;
iteri_aux (i + 1) f tl | {
"checked_file": "FStar.Tactics.Util.fst.checked",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.Base.fst.checked"
],
"interface_file": false,
"source_file": "FStar.Tactics.Util.fst"
} | [] | [
"Prims.int",
"Prims.unit",
"Prims.list",
"FStar.Tactics.Util.iteri_aux",
"Prims.op_Addition"
] | [] | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*)
module FStar.Tactics.Util
open FStar.Tactics.Effect
open FStar.List.Tot.Base
(* Tac list functions, since there's no effect polymorphism *)
val map: ('a -> Tac 'b) -> list 'a -> Tac (list 'b)
let rec map f x = match x with
| [] -> []
| a::tl -> f a::map f tl
val __mapi: nat -> (nat -> 'a -> Tac 'b) -> list 'a -> Tac (list 'b)
let rec __mapi i f x = match x with
| [] -> []
| a::tl -> f i a::__mapi (i+1) f tl
val mapi: (nat -> 'a -> Tac 'b) -> list 'a -> Tac (list 'b)
let mapi f l = __mapi 0 f l
val iter : ('a -> Tac unit) -> list 'a -> Tac unit
let rec iter f x = match x with
| [] -> ()
| a::tl -> f a; iter f tl | false | false | FStar.Tactics.Util.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_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": true,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val iteri_aux: int -> (int -> 'a -> Tac unit) -> list 'a -> Tac unit | [
"recursion"
] | FStar.Tactics.Util.iteri_aux | {
"file_name": "ulib/FStar.Tactics.Util.fst",
"git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} |
i: Prims.int ->
f: (_: Prims.int -> _: 'a -> FStar.Tactics.Effect.Tac Prims.unit) ->
x: Prims.list 'a
-> FStar.Tactics.Effect.Tac Prims.unit | {
"end_col": 40,
"end_line": 43,
"start_col": 26,
"start_line": 41
} |
FStar.Tactics.Effect.Tac | val filter: ('a -> Tac bool) -> list 'a -> Tac (list 'a) | [
{
"abbrev": false,
"full_module": "FStar.List.Tot.Base",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics.Effect",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let rec filter f = function
| [] -> []
| hd::tl -> if f hd then hd::(filter f tl) else filter f tl | val filter: ('a -> Tac bool) -> list 'a -> Tac (list 'a)
let rec filter f = | true | null | false | function
| [] -> []
| hd :: tl -> if f hd then hd :: (filter f tl) else filter f tl | {
"checked_file": "FStar.Tactics.Util.fst.checked",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.Base.fst.checked"
],
"interface_file": false,
"source_file": "FStar.Tactics.Util.fst"
} | [] | [
"Prims.bool",
"Prims.list",
"Prims.Nil",
"Prims.Cons",
"FStar.Tactics.Util.filter"
] | [] | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*)
module FStar.Tactics.Util
open FStar.Tactics.Effect
open FStar.List.Tot.Base
(* Tac list functions, since there's no effect polymorphism *)
val map: ('a -> Tac 'b) -> list 'a -> Tac (list 'b)
let rec map f x = match x with
| [] -> []
| a::tl -> f a::map f tl
val __mapi: nat -> (nat -> 'a -> Tac 'b) -> list 'a -> Tac (list 'b)
let rec __mapi i f x = match x with
| [] -> []
| a::tl -> f i a::__mapi (i+1) f tl
val mapi: (nat -> 'a -> Tac 'b) -> list 'a -> Tac (list 'b)
let mapi f l = __mapi 0 f l
val iter : ('a -> Tac unit) -> list 'a -> Tac unit
let rec iter f x = match x with
| [] -> ()
| a::tl -> f a; iter f tl
val iteri_aux: int -> (int -> 'a -> Tac unit) -> list 'a -> Tac unit
let rec iteri_aux i f x = match x with
| [] -> ()
| a::tl -> f i a; iteri_aux (i+1) f tl
val iteri: (int -> 'a -> Tac unit) -> list 'a -> Tac unit
let iteri f x = iteri_aux 0 f x
val fold_left: ('a -> 'b -> Tac 'a) -> 'a -> l:list 'b -> Tac 'a
let rec fold_left f x l = match l with
| [] -> x
| hd::tl -> fold_left f (f x hd) tl
val fold_right: ('a -> 'b -> Tac 'b) -> list 'a -> 'b -> Tac 'b
let rec fold_right f l x = match l with
| [] -> x
| hd::tl -> f hd (fold_right f tl x)
(* There's no unconditionally total zip like this in Tot.Base, why? Anyway use this *)
val zip : (#a:Type) -> (#b:Type) -> list a -> list b -> Tac (list (a * b))
let rec zip #a #b l1 l2 = match l1, l2 with
| x::xs, y::ys -> (x,y) :: (zip xs ys)
| _ -> [] | false | false | FStar.Tactics.Util.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_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": true,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val filter: ('a -> Tac bool) -> list 'a -> Tac (list 'a) | [
"recursion"
] | FStar.Tactics.Util.filter | {
"file_name": "ulib/FStar.Tactics.Util.fst",
"git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | f: (_: 'a -> FStar.Tactics.Effect.Tac Prims.bool) -> _: Prims.list 'a
-> FStar.Tactics.Effect.Tac (Prims.list 'a) | {
"end_col": 61,
"end_line": 67,
"start_col": 19,
"start_line": 65
} |
FStar.Tactics.Effect.Tac | val tryFind (#a: Type) (f: (a -> Tac bool)) (l: list a) : Tac bool | [
{
"abbrev": false,
"full_module": "FStar.List.Tot.Base",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics.Effect",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let rec tryFind (#a:Type) (f:a -> Tac bool) (l:list a) : Tac bool =
match l with
| [] -> false
| hd::tl ->
if f hd then true
else tryFind f tl | val tryFind (#a: Type) (f: (a -> Tac bool)) (l: list a) : Tac bool
let rec tryFind (#a: Type) (f: (a -> Tac bool)) (l: list a) : Tac bool = | true | null | false | match l with
| [] -> false
| hd :: tl -> if f hd then true else tryFind f tl | {
"checked_file": "FStar.Tactics.Util.fst.checked",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.Base.fst.checked"
],
"interface_file": false,
"source_file": "FStar.Tactics.Util.fst"
} | [] | [
"Prims.bool",
"Prims.list",
"FStar.Tactics.Util.tryFind"
] | [] | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*)
module FStar.Tactics.Util
open FStar.Tactics.Effect
open FStar.List.Tot.Base
(* Tac list functions, since there's no effect polymorphism *)
val map: ('a -> Tac 'b) -> list 'a -> Tac (list 'b)
let rec map f x = match x with
| [] -> []
| a::tl -> f a::map f tl
val __mapi: nat -> (nat -> 'a -> Tac 'b) -> list 'a -> Tac (list 'b)
let rec __mapi i f x = match x with
| [] -> []
| a::tl -> f i a::__mapi (i+1) f tl
val mapi: (nat -> 'a -> Tac 'b) -> list 'a -> Tac (list 'b)
let mapi f l = __mapi 0 f l
val iter : ('a -> Tac unit) -> list 'a -> Tac unit
let rec iter f x = match x with
| [] -> ()
| a::tl -> f a; iter f tl
val iteri_aux: int -> (int -> 'a -> Tac unit) -> list 'a -> Tac unit
let rec iteri_aux i f x = match x with
| [] -> ()
| a::tl -> f i a; iteri_aux (i+1) f tl
val iteri: (int -> 'a -> Tac unit) -> list 'a -> Tac unit
let iteri f x = iteri_aux 0 f x
val fold_left: ('a -> 'b -> Tac 'a) -> 'a -> l:list 'b -> Tac 'a
let rec fold_left f x l = match l with
| [] -> x
| hd::tl -> fold_left f (f x hd) tl
val fold_right: ('a -> 'b -> Tac 'b) -> list 'a -> 'b -> Tac 'b
let rec fold_right f l x = match l with
| [] -> x
| hd::tl -> f hd (fold_right f tl x)
(* There's no unconditionally total zip like this in Tot.Base, why? Anyway use this *)
val zip : (#a:Type) -> (#b:Type) -> list a -> list b -> Tac (list (a * b))
let rec zip #a #b l1 l2 = match l1, l2 with
| x::xs, y::ys -> (x,y) :: (zip xs ys)
| _ -> []
val filter: ('a -> Tac bool) -> list 'a -> Tac (list 'a)
let rec filter f = function
| [] -> []
| hd::tl -> if f hd then hd::(filter f tl) else filter f tl
private let rec filter_map_acc (f:'a -> Tac (option 'b)) (acc:list 'b) (l:list 'a)
: Tac (list 'b) =
match l with
| [] ->
rev acc
| hd :: tl ->
match f hd with
| Some hd ->
filter_map_acc f (hd :: acc) tl
| None ->
filter_map_acc f acc tl
let filter_map (f:'a -> Tac (option 'b)) (l:list 'a) : Tac (list 'b) =
filter_map_acc f [] l
val tryPick: ('a -> Tac (option 'b)) -> list 'a -> Tac (option 'b)
let rec tryPick f l = match l with
| [] -> None
| hd::tl ->
match f hd with
| Some x -> Some x
| None -> tryPick f tl
let map_opt (f:'a -> Tac 'b) (x:option 'a) : Tac (option 'b) =
match x with
| None -> None
| Some x -> Some (f x)
(** Apply a given tactic [t] repeatedly [n] times and return the results. *)
let rec repeatn (#a:Type) (n : int) (t : unit -> Tac a) : Tac (list a) =
if n <= 0
then []
else t () :: repeatn (n - 1) t | false | false | FStar.Tactics.Util.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_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": true,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val tryFind (#a: Type) (f: (a -> Tac bool)) (l: list a) : Tac bool | [
"recursion"
] | FStar.Tactics.Util.tryFind | {
"file_name": "ulib/FStar.Tactics.Util.fst",
"git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | f: (_: a -> FStar.Tactics.Effect.Tac Prims.bool) -> l: Prims.list a
-> FStar.Tactics.Effect.Tac Prims.bool | {
"end_col": 21,
"end_line": 108,
"start_col": 2,
"start_line": 104
} |
FStar.Tactics.Effect.Tac | val tryPick: ('a -> Tac (option 'b)) -> list 'a -> Tac (option 'b) | [
{
"abbrev": false,
"full_module": "FStar.List.Tot.Base",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics.Effect",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let rec tryPick f l = match l with
| [] -> None
| hd::tl ->
match f hd with
| Some x -> Some x
| None -> tryPick f tl | val tryPick: ('a -> Tac (option 'b)) -> list 'a -> Tac (option 'b)
let rec tryPick f l = | true | null | false | match l with
| [] -> None
| hd :: tl ->
match f hd with
| Some x -> Some x
| None -> tryPick f tl | {
"checked_file": "FStar.Tactics.Util.fst.checked",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.Base.fst.checked"
],
"interface_file": false,
"source_file": "FStar.Tactics.Util.fst"
} | [] | [
"FStar.Pervasives.Native.option",
"Prims.list",
"FStar.Pervasives.Native.None",
"FStar.Pervasives.Native.Some",
"FStar.Tactics.Util.tryPick"
] | [] | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*)
module FStar.Tactics.Util
open FStar.Tactics.Effect
open FStar.List.Tot.Base
(* Tac list functions, since there's no effect polymorphism *)
val map: ('a -> Tac 'b) -> list 'a -> Tac (list 'b)
let rec map f x = match x with
| [] -> []
| a::tl -> f a::map f tl
val __mapi: nat -> (nat -> 'a -> Tac 'b) -> list 'a -> Tac (list 'b)
let rec __mapi i f x = match x with
| [] -> []
| a::tl -> f i a::__mapi (i+1) f tl
val mapi: (nat -> 'a -> Tac 'b) -> list 'a -> Tac (list 'b)
let mapi f l = __mapi 0 f l
val iter : ('a -> Tac unit) -> list 'a -> Tac unit
let rec iter f x = match x with
| [] -> ()
| a::tl -> f a; iter f tl
val iteri_aux: int -> (int -> 'a -> Tac unit) -> list 'a -> Tac unit
let rec iteri_aux i f x = match x with
| [] -> ()
| a::tl -> f i a; iteri_aux (i+1) f tl
val iteri: (int -> 'a -> Tac unit) -> list 'a -> Tac unit
let iteri f x = iteri_aux 0 f x
val fold_left: ('a -> 'b -> Tac 'a) -> 'a -> l:list 'b -> Tac 'a
let rec fold_left f x l = match l with
| [] -> x
| hd::tl -> fold_left f (f x hd) tl
val fold_right: ('a -> 'b -> Tac 'b) -> list 'a -> 'b -> Tac 'b
let rec fold_right f l x = match l with
| [] -> x
| hd::tl -> f hd (fold_right f tl x)
(* There's no unconditionally total zip like this in Tot.Base, why? Anyway use this *)
val zip : (#a:Type) -> (#b:Type) -> list a -> list b -> Tac (list (a * b))
let rec zip #a #b l1 l2 = match l1, l2 with
| x::xs, y::ys -> (x,y) :: (zip xs ys)
| _ -> []
val filter: ('a -> Tac bool) -> list 'a -> Tac (list 'a)
let rec filter f = function
| [] -> []
| hd::tl -> if f hd then hd::(filter f tl) else filter f tl
private let rec filter_map_acc (f:'a -> Tac (option 'b)) (acc:list 'b) (l:list 'a)
: Tac (list 'b) =
match l with
| [] ->
rev acc
| hd :: tl ->
match f hd with
| Some hd ->
filter_map_acc f (hd :: acc) tl
| None ->
filter_map_acc f acc tl
let filter_map (f:'a -> Tac (option 'b)) (l:list 'a) : Tac (list 'b) =
filter_map_acc f [] l | false | false | FStar.Tactics.Util.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_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": true,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val tryPick: ('a -> Tac (option 'b)) -> list 'a -> Tac (option 'b) | [
"recursion"
] | FStar.Tactics.Util.tryPick | {
"file_name": "ulib/FStar.Tactics.Util.fst",
"git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | f: (_: 'a -> FStar.Tactics.Effect.Tac (FStar.Pervasives.Native.option 'b)) -> l: Prims.list 'a
-> FStar.Tactics.Effect.Tac (FStar.Pervasives.Native.option 'b) | {
"end_col": 31,
"end_line": 90,
"start_col": 22,
"start_line": 85
} |
FStar.Tactics.Effect.Tac | val iter : ('a -> Tac unit) -> list 'a -> Tac unit | [
{
"abbrev": false,
"full_module": "FStar.List.Tot.Base",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics.Effect",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let rec iter f x = match x with
| [] -> ()
| a::tl -> f a; iter f tl | val iter : ('a -> Tac unit) -> list 'a -> Tac unit
let rec iter f x = | true | null | false | match x with
| [] -> ()
| a :: tl ->
f a;
iter f tl | {
"checked_file": "FStar.Tactics.Util.fst.checked",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.Base.fst.checked"
],
"interface_file": false,
"source_file": "FStar.Tactics.Util.fst"
} | [] | [
"Prims.unit",
"Prims.list",
"FStar.Tactics.Util.iter"
] | [] | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*)
module FStar.Tactics.Util
open FStar.Tactics.Effect
open FStar.List.Tot.Base
(* Tac list functions, since there's no effect polymorphism *)
val map: ('a -> Tac 'b) -> list 'a -> Tac (list 'b)
let rec map f x = match x with
| [] -> []
| a::tl -> f a::map f tl
val __mapi: nat -> (nat -> 'a -> Tac 'b) -> list 'a -> Tac (list 'b)
let rec __mapi i f x = match x with
| [] -> []
| a::tl -> f i a::__mapi (i+1) f tl
val mapi: (nat -> 'a -> Tac 'b) -> list 'a -> Tac (list 'b)
let mapi f l = __mapi 0 f l | false | false | FStar.Tactics.Util.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_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": true,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val iter : ('a -> Tac unit) -> list 'a -> Tac unit | [
"recursion"
] | FStar.Tactics.Util.iter | {
"file_name": "ulib/FStar.Tactics.Util.fst",
"git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | f: (_: 'a -> FStar.Tactics.Effect.Tac Prims.unit) -> x: Prims.list 'a
-> FStar.Tactics.Effect.Tac Prims.unit | {
"end_col": 27,
"end_line": 38,
"start_col": 19,
"start_line": 36
} |
FStar.Tactics.Effect.Tac | val string_of_list (#a: _) (f: (a -> Tac string)) (l: list a) : Tac string | [
{
"abbrev": false,
"full_module": "FStar.List.Tot.Base",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics.Effect",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let rec string_of_list #a (f : a -> Tac string) (l : list a) : Tac string =
match l with
| [] -> ""
| x::xs -> f x ^ ";" ^ string_of_list f xs | val string_of_list (#a: _) (f: (a -> Tac string)) (l: list a) : Tac string
let rec string_of_list #a (f: (a -> Tac string)) (l: list a) : Tac string = | true | null | false | match l with
| [] -> ""
| x :: xs -> f x ^ ";" ^ string_of_list f xs | {
"checked_file": "FStar.Tactics.Util.fst.checked",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.Base.fst.checked"
],
"interface_file": false,
"source_file": "FStar.Tactics.Util.fst"
} | [] | [
"Prims.string",
"Prims.list",
"Prims.op_Hat",
"FStar.Tactics.Util.string_of_list"
] | [] | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*)
module FStar.Tactics.Util
open FStar.Tactics.Effect
open FStar.List.Tot.Base
(* Tac list functions, since there's no effect polymorphism *)
val map: ('a -> Tac 'b) -> list 'a -> Tac (list 'b)
let rec map f x = match x with
| [] -> []
| a::tl -> f a::map f tl
val __mapi: nat -> (nat -> 'a -> Tac 'b) -> list 'a -> Tac (list 'b)
let rec __mapi i f x = match x with
| [] -> []
| a::tl -> f i a::__mapi (i+1) f tl
val mapi: (nat -> 'a -> Tac 'b) -> list 'a -> Tac (list 'b)
let mapi f l = __mapi 0 f l
val iter : ('a -> Tac unit) -> list 'a -> Tac unit
let rec iter f x = match x with
| [] -> ()
| a::tl -> f a; iter f tl
val iteri_aux: int -> (int -> 'a -> Tac unit) -> list 'a -> Tac unit
let rec iteri_aux i f x = match x with
| [] -> ()
| a::tl -> f i a; iteri_aux (i+1) f tl
val iteri: (int -> 'a -> Tac unit) -> list 'a -> Tac unit
let iteri f x = iteri_aux 0 f x
val fold_left: ('a -> 'b -> Tac 'a) -> 'a -> l:list 'b -> Tac 'a
let rec fold_left f x l = match l with
| [] -> x
| hd::tl -> fold_left f (f x hd) tl
val fold_right: ('a -> 'b -> Tac 'b) -> list 'a -> 'b -> Tac 'b
let rec fold_right f l x = match l with
| [] -> x
| hd::tl -> f hd (fold_right f tl x)
(* There's no unconditionally total zip like this in Tot.Base, why? Anyway use this *)
val zip : (#a:Type) -> (#b:Type) -> list a -> list b -> Tac (list (a * b))
let rec zip #a #b l1 l2 = match l1, l2 with
| x::xs, y::ys -> (x,y) :: (zip xs ys)
| _ -> []
val filter: ('a -> Tac bool) -> list 'a -> Tac (list 'a)
let rec filter f = function
| [] -> []
| hd::tl -> if f hd then hd::(filter f tl) else filter f tl
private let rec filter_map_acc (f:'a -> Tac (option 'b)) (acc:list 'b) (l:list 'a)
: Tac (list 'b) =
match l with
| [] ->
rev acc
| hd :: tl ->
match f hd with
| Some hd ->
filter_map_acc f (hd :: acc) tl
| None ->
filter_map_acc f acc tl
let filter_map (f:'a -> Tac (option 'b)) (l:list 'a) : Tac (list 'b) =
filter_map_acc f [] l
val tryPick: ('a -> Tac (option 'b)) -> list 'a -> Tac (option 'b)
let rec tryPick f l = match l with
| [] -> None
| hd::tl ->
match f hd with
| Some x -> Some x
| None -> tryPick f tl
let map_opt (f:'a -> Tac 'b) (x:option 'a) : Tac (option 'b) =
match x with
| None -> None
| Some x -> Some (f x)
(** Apply a given tactic [t] repeatedly [n] times and return the results. *)
let rec repeatn (#a:Type) (n : int) (t : unit -> Tac a) : Tac (list a) =
if n <= 0
then []
else t () :: repeatn (n - 1) t
let rec tryFind (#a:Type) (f:a -> Tac bool) (l:list a) : Tac bool =
match l with
| [] -> false
| hd::tl ->
if f hd then true
else tryFind f tl
let rec fold_left2 (#a #b #c:Type) (f:a -> b -> c -> Tac a) (x:a) (l1:list b) (l2:list c)
: TacH a
(requires fun _ -> length l1 == length l2)
(ensures fun _ _ -> True) =
match l1, l2 with
| [], [] -> x
| hd1::tl1, hd2::tl2 ->
fold_left2 f (f x hd1 hd2) tl1 tl2 | false | false | FStar.Tactics.Util.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_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": true,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val string_of_list (#a: _) (f: (a -> Tac string)) (l: list a) : Tac string | [
"recursion"
] | FStar.Tactics.Util.string_of_list | {
"file_name": "ulib/FStar.Tactics.Util.fst",
"git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | f: (_: a -> FStar.Tactics.Effect.Tac Prims.string) -> l: Prims.list a
-> FStar.Tactics.Effect.Tac Prims.string | {
"end_col": 44,
"end_line": 122,
"start_col": 2,
"start_line": 120
} |
FStar.Tactics.Effect.TacH | val fold_left2 (#a #b #c: Type) (f: (a -> b -> c -> Tac a)) (x: a) (l1: list b) (l2: list c)
: TacH a (requires fun _ -> length l1 == length l2) (ensures fun _ _ -> True) | [
{
"abbrev": false,
"full_module": "FStar.List.Tot.Base",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics.Effect",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let rec fold_left2 (#a #b #c:Type) (f:a -> b -> c -> Tac a) (x:a) (l1:list b) (l2:list c)
: TacH a
(requires fun _ -> length l1 == length l2)
(ensures fun _ _ -> True) =
match l1, l2 with
| [], [] -> x
| hd1::tl1, hd2::tl2 ->
fold_left2 f (f x hd1 hd2) tl1 tl2 | val fold_left2 (#a #b #c: Type) (f: (a -> b -> c -> Tac a)) (x: a) (l1: list b) (l2: list c)
: TacH a (requires fun _ -> length l1 == length l2) (ensures fun _ _ -> True)
let rec fold_left2 (#a #b #c: Type) (f: (a -> b -> c -> Tac a)) (x: a) (l1: list b) (l2: list c)
: TacH a (requires fun _ -> length l1 == length l2) (ensures fun _ _ -> True) = | true | null | false | match l1, l2 with
| [], [] -> x
| hd1 :: tl1, hd2 :: tl2 -> fold_left2 f (f x hd1 hd2) tl1 tl2 | {
"checked_file": "FStar.Tactics.Util.fst.checked",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.Effect.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.Base.fst.checked"
],
"interface_file": false,
"source_file": "FStar.Tactics.Util.fst"
} | [] | [
"Prims.list",
"FStar.Pervasives.Native.Mktuple2",
"FStar.Tactics.Util.fold_left2",
"FStar.Tactics.Types.proofstate",
"Prims.eq2",
"Prims.nat",
"FStar.List.Tot.Base.length",
"FStar.Tactics.Result.__result",
"Prims.l_True"
] | [] | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*)
module FStar.Tactics.Util
open FStar.Tactics.Effect
open FStar.List.Tot.Base
(* Tac list functions, since there's no effect polymorphism *)
val map: ('a -> Tac 'b) -> list 'a -> Tac (list 'b)
let rec map f x = match x with
| [] -> []
| a::tl -> f a::map f tl
val __mapi: nat -> (nat -> 'a -> Tac 'b) -> list 'a -> Tac (list 'b)
let rec __mapi i f x = match x with
| [] -> []
| a::tl -> f i a::__mapi (i+1) f tl
val mapi: (nat -> 'a -> Tac 'b) -> list 'a -> Tac (list 'b)
let mapi f l = __mapi 0 f l
val iter : ('a -> Tac unit) -> list 'a -> Tac unit
let rec iter f x = match x with
| [] -> ()
| a::tl -> f a; iter f tl
val iteri_aux: int -> (int -> 'a -> Tac unit) -> list 'a -> Tac unit
let rec iteri_aux i f x = match x with
| [] -> ()
| a::tl -> f i a; iteri_aux (i+1) f tl
val iteri: (int -> 'a -> Tac unit) -> list 'a -> Tac unit
let iteri f x = iteri_aux 0 f x
val fold_left: ('a -> 'b -> Tac 'a) -> 'a -> l:list 'b -> Tac 'a
let rec fold_left f x l = match l with
| [] -> x
| hd::tl -> fold_left f (f x hd) tl
val fold_right: ('a -> 'b -> Tac 'b) -> list 'a -> 'b -> Tac 'b
let rec fold_right f l x = match l with
| [] -> x
| hd::tl -> f hd (fold_right f tl x)
(* There's no unconditionally total zip like this in Tot.Base, why? Anyway use this *)
val zip : (#a:Type) -> (#b:Type) -> list a -> list b -> Tac (list (a * b))
let rec zip #a #b l1 l2 = match l1, l2 with
| x::xs, y::ys -> (x,y) :: (zip xs ys)
| _ -> []
val filter: ('a -> Tac bool) -> list 'a -> Tac (list 'a)
let rec filter f = function
| [] -> []
| hd::tl -> if f hd then hd::(filter f tl) else filter f tl
private let rec filter_map_acc (f:'a -> Tac (option 'b)) (acc:list 'b) (l:list 'a)
: Tac (list 'b) =
match l with
| [] ->
rev acc
| hd :: tl ->
match f hd with
| Some hd ->
filter_map_acc f (hd :: acc) tl
| None ->
filter_map_acc f acc tl
let filter_map (f:'a -> Tac (option 'b)) (l:list 'a) : Tac (list 'b) =
filter_map_acc f [] l
val tryPick: ('a -> Tac (option 'b)) -> list 'a -> Tac (option 'b)
let rec tryPick f l = match l with
| [] -> None
| hd::tl ->
match f hd with
| Some x -> Some x
| None -> tryPick f tl
let map_opt (f:'a -> Tac 'b) (x:option 'a) : Tac (option 'b) =
match x with
| None -> None
| Some x -> Some (f x)
(** Apply a given tactic [t] repeatedly [n] times and return the results. *)
let rec repeatn (#a:Type) (n : int) (t : unit -> Tac a) : Tac (list a) =
if n <= 0
then []
else t () :: repeatn (n - 1) t
let rec tryFind (#a:Type) (f:a -> Tac bool) (l:list a) : Tac bool =
match l with
| [] -> false
| hd::tl ->
if f hd then true
else tryFind f tl
let rec fold_left2 (#a #b #c:Type) (f:a -> b -> c -> Tac a) (x:a) (l1:list b) (l2:list c)
: TacH a
(requires fun _ -> length l1 == length l2) | false | false | FStar.Tactics.Util.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_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": true,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val fold_left2 (#a #b #c: Type) (f: (a -> b -> c -> Tac a)) (x: a) (l1: list b) (l2: list c)
: TacH a (requires fun _ -> length l1 == length l2) (ensures fun _ _ -> True) | [
"recursion"
] | FStar.Tactics.Util.fold_left2 | {
"file_name": "ulib/FStar.Tactics.Util.fst",
"git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} |
f: (_: a -> _: b -> _: c -> FStar.Tactics.Effect.Tac a) ->
x: a ->
l1: Prims.list b ->
l2: Prims.list c
-> FStar.Tactics.Effect.TacH a | {
"end_col": 38,
"end_line": 117,
"start_col": 2,
"start_line": 114
} |
Prims.Tot | val add4:BN.bn_add_eq_len_st U64 qnlimb | [
{
"abbrev": false,
"full_module": "Hacl.Spec.K256.Scalar",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Definitions",
"short_module": "SD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum",
"short_module": "SN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Base",
"short_module": "BB"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Definitions",
"short_module": "BD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.GLV.Lemmas",
"short_module": "SGL"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.GLV",
"short_module": "SG"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Scalar.Lemmas",
"short_module": "KL"
},
{
"abbrev": true,
"full_module": "Spec.K256",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Lib.ByteBuffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Buffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Definitions",
"short_module": "BD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.GLV",
"short_module": "SG"
},
{
"abbrev": true,
"full_module": "Spec.K256",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Lib.ByteSequence",
"short_module": "BSeq"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Lib.Buffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.K256",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.K256",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let add4: BN.bn_add_eq_len_st U64 qnlimb =
BN.bn_add_eq_len qnlimb | val add4:BN.bn_add_eq_len_st U64 qnlimb
let add4:BN.bn_add_eq_len_st U64 qnlimb = | false | null | false | BN.bn_add_eq_len qnlimb | {
"checked_file": "Hacl.K256.Scalar.fst.checked",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteBuffer.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.K256.Scalar.Lemmas.fst.checked",
"Hacl.Spec.K256.Scalar.fst.checked",
"Hacl.Spec.K256.GLV.Lemmas.fst.checked",
"Hacl.Spec.K256.GLV.fst.checked",
"Hacl.Spec.Bignum.Definitions.fst.checked",
"Hacl.Spec.Bignum.Convert.fst.checked",
"Hacl.Spec.Bignum.fsti.checked",
"Hacl.Bignum.Definitions.fst.checked",
"Hacl.Bignum.Convert.fst.checked",
"Hacl.Bignum.Base.fst.checked",
"Hacl.Bignum.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Tactics.Typeclasses.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.List.Tot.fst.checked",
"FStar.HyperStack.ST.fsti.checked",
"FStar.HyperStack.fst.checked",
"FStar.Ghost.fsti.checked"
],
"interface_file": true,
"source_file": "Hacl.K256.Scalar.fst"
} | [
"total"
] | [
"Hacl.Bignum.bn_add_eq_len",
"Lib.IntTypes.U64",
"Hacl.K256.Scalar.qnlimb"
] | [] | module Hacl.K256.Scalar
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module S = Spec.K256
module KL = Hacl.Spec.K256.Scalar.Lemmas
module SG = Hacl.Spec.K256.GLV
module SGL = Hacl.Spec.K256.GLV.Lemmas
module BD = Hacl.Bignum.Definitions
module BN = Hacl.Bignum
module BB = Hacl.Bignum.Base
module SN = Hacl.Spec.Bignum
module SD = Hacl.Spec.Bignum.Definitions
include Hacl.Spec.K256.Scalar
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
[@CInline]
let bn_add : BN.bn_add_st U64 = BN.bn_add
//inline_for_extraction noextract
//let kn = BN.mk_runtime_bn U64 qnlimb | false | true | Hacl.K256.Scalar.fst | {
"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_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 50,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val add4:BN.bn_add_eq_len_st U64 qnlimb | [] | Hacl.K256.Scalar.add4 | {
"file_name": "code/k256/Hacl.K256.Scalar.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | Hacl.Bignum.bn_add_eq_len_st Lib.IntTypes.U64 Hacl.K256.Scalar.qnlimb | {
"end_col": 25,
"end_line": 37,
"start_col": 2,
"start_line": 37
} |
Prims.Tot | val bn_add:BN.bn_add_st U64 | [
{
"abbrev": false,
"full_module": "Hacl.Spec.K256.Scalar",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Definitions",
"short_module": "SD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum",
"short_module": "SN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Base",
"short_module": "BB"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Definitions",
"short_module": "BD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.GLV.Lemmas",
"short_module": "SGL"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.GLV",
"short_module": "SG"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Scalar.Lemmas",
"short_module": "KL"
},
{
"abbrev": true,
"full_module": "Spec.K256",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Lib.ByteBuffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Buffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Definitions",
"short_module": "BD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.GLV",
"short_module": "SG"
},
{
"abbrev": true,
"full_module": "Spec.K256",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Lib.ByteSequence",
"short_module": "BSeq"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Lib.Buffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.K256",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.K256",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let bn_add : BN.bn_add_st U64 = BN.bn_add | val bn_add:BN.bn_add_st U64
let bn_add:BN.bn_add_st U64 = | false | null | false | BN.bn_add | {
"checked_file": "Hacl.K256.Scalar.fst.checked",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteBuffer.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.K256.Scalar.Lemmas.fst.checked",
"Hacl.Spec.K256.Scalar.fst.checked",
"Hacl.Spec.K256.GLV.Lemmas.fst.checked",
"Hacl.Spec.K256.GLV.fst.checked",
"Hacl.Spec.Bignum.Definitions.fst.checked",
"Hacl.Spec.Bignum.Convert.fst.checked",
"Hacl.Spec.Bignum.fsti.checked",
"Hacl.Bignum.Definitions.fst.checked",
"Hacl.Bignum.Convert.fst.checked",
"Hacl.Bignum.Base.fst.checked",
"Hacl.Bignum.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Tactics.Typeclasses.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.List.Tot.fst.checked",
"FStar.HyperStack.ST.fsti.checked",
"FStar.HyperStack.fst.checked",
"FStar.Ghost.fsti.checked"
],
"interface_file": true,
"source_file": "Hacl.K256.Scalar.fst"
} | [
"total"
] | [
"Hacl.Bignum.bn_add",
"Lib.IntTypes.U64"
] | [] | module Hacl.K256.Scalar
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module S = Spec.K256
module KL = Hacl.Spec.K256.Scalar.Lemmas
module SG = Hacl.Spec.K256.GLV
module SGL = Hacl.Spec.K256.GLV.Lemmas
module BD = Hacl.Bignum.Definitions
module BN = Hacl.Bignum
module BB = Hacl.Bignum.Base
module SN = Hacl.Spec.Bignum
module SD = Hacl.Spec.Bignum.Definitions
include Hacl.Spec.K256.Scalar
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0" | false | true | Hacl.K256.Scalar.fst | {
"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_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 50,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val bn_add:BN.bn_add_st U64 | [] | Hacl.K256.Scalar.bn_add | {
"file_name": "code/k256/Hacl.K256.Scalar.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | Hacl.Bignum.bn_add_st Lib.IntTypes.U64 | {
"end_col": 41,
"end_line": 31,
"start_col": 32,
"start_line": 31
} |
Prims.Tot | val sub4:BN.bn_sub_eq_len_st U64 qnlimb | [
{
"abbrev": false,
"full_module": "Hacl.Spec.K256.Scalar",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Definitions",
"short_module": "SD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum",
"short_module": "SN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Base",
"short_module": "BB"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Definitions",
"short_module": "BD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.GLV.Lemmas",
"short_module": "SGL"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.GLV",
"short_module": "SG"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Scalar.Lemmas",
"short_module": "KL"
},
{
"abbrev": true,
"full_module": "Spec.K256",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Lib.ByteBuffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Buffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Definitions",
"short_module": "BD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.GLV",
"short_module": "SG"
},
{
"abbrev": true,
"full_module": "Spec.K256",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Lib.ByteSequence",
"short_module": "BSeq"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Lib.Buffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.K256",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.K256",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let sub4: BN.bn_sub_eq_len_st U64 qnlimb =
BN.bn_sub_eq_len qnlimb | val sub4:BN.bn_sub_eq_len_st U64 qnlimb
let sub4:BN.bn_sub_eq_len_st U64 qnlimb = | false | null | false | BN.bn_sub_eq_len qnlimb | {
"checked_file": "Hacl.K256.Scalar.fst.checked",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteBuffer.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.K256.Scalar.Lemmas.fst.checked",
"Hacl.Spec.K256.Scalar.fst.checked",
"Hacl.Spec.K256.GLV.Lemmas.fst.checked",
"Hacl.Spec.K256.GLV.fst.checked",
"Hacl.Spec.Bignum.Definitions.fst.checked",
"Hacl.Spec.Bignum.Convert.fst.checked",
"Hacl.Spec.Bignum.fsti.checked",
"Hacl.Bignum.Definitions.fst.checked",
"Hacl.Bignum.Convert.fst.checked",
"Hacl.Bignum.Base.fst.checked",
"Hacl.Bignum.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Tactics.Typeclasses.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.List.Tot.fst.checked",
"FStar.HyperStack.ST.fsti.checked",
"FStar.HyperStack.fst.checked",
"FStar.Ghost.fsti.checked"
],
"interface_file": true,
"source_file": "Hacl.K256.Scalar.fst"
} | [
"total"
] | [
"Hacl.Bignum.bn_sub_eq_len",
"Lib.IntTypes.U64",
"Hacl.K256.Scalar.qnlimb"
] | [] | module Hacl.K256.Scalar
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module S = Spec.K256
module KL = Hacl.Spec.K256.Scalar.Lemmas
module SG = Hacl.Spec.K256.GLV
module SGL = Hacl.Spec.K256.GLV.Lemmas
module BD = Hacl.Bignum.Definitions
module BN = Hacl.Bignum
module BB = Hacl.Bignum.Base
module SN = Hacl.Spec.Bignum
module SD = Hacl.Spec.Bignum.Definitions
include Hacl.Spec.K256.Scalar
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
[@CInline]
let bn_add : BN.bn_add_st U64 = BN.bn_add
//inline_for_extraction noextract
//let kn = BN.mk_runtime_bn U64 qnlimb
let add4: BN.bn_add_eq_len_st U64 qnlimb =
BN.bn_add_eq_len qnlimb | false | true | Hacl.K256.Scalar.fst | {
"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_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 50,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val sub4:BN.bn_sub_eq_len_st U64 qnlimb | [] | Hacl.K256.Scalar.sub4 | {
"file_name": "code/k256/Hacl.K256.Scalar.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | Hacl.Bignum.bn_sub_eq_len_st Lib.IntTypes.U64 Hacl.K256.Scalar.qnlimb | {
"end_col": 25,
"end_line": 40,
"start_col": 2,
"start_line": 40
} |
FStar.HyperStack.ST.Stack | val is_qelem_zero (f:qelem) : Stack uint64
(requires fun h -> live h f)
(ensures fun h0 m h1 -> modifies0 h0 h1 /\
(v m = 0 \/ v m = ones_v U64) /\
v m == (if qas_nat h0 f = 0 then ones_v U64 else 0)) | [
{
"abbrev": false,
"full_module": "Hacl.Spec.K256.Scalar",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Definitions",
"short_module": "SD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum",
"short_module": "SN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Base",
"short_module": "BB"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Definitions",
"short_module": "BD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.GLV.Lemmas",
"short_module": "SGL"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.GLV",
"short_module": "SG"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Scalar.Lemmas",
"short_module": "KL"
},
{
"abbrev": true,
"full_module": "Spec.K256",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Lib.ByteBuffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Buffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Definitions",
"short_module": "BD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.GLV",
"short_module": "SG"
},
{
"abbrev": true,
"full_module": "Spec.K256",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Lib.ByteSequence",
"short_module": "BSeq"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Lib.Buffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.K256",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.K256",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let is_qelem_zero f =
let h0 = ST.get () in
SN.bn_is_zero_mask_lemma (as_seq h0 f);
BN.bn_is_zero_mask qnlimb f | val is_qelem_zero (f:qelem) : Stack uint64
(requires fun h -> live h f)
(ensures fun h0 m h1 -> modifies0 h0 h1 /\
(v m = 0 \/ v m = ones_v U64) /\
v m == (if qas_nat h0 f = 0 then ones_v U64 else 0))
let is_qelem_zero f = | true | null | false | let h0 = ST.get () in
SN.bn_is_zero_mask_lemma (as_seq h0 f);
BN.bn_is_zero_mask qnlimb f | {
"checked_file": "Hacl.K256.Scalar.fst.checked",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteBuffer.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.K256.Scalar.Lemmas.fst.checked",
"Hacl.Spec.K256.Scalar.fst.checked",
"Hacl.Spec.K256.GLV.Lemmas.fst.checked",
"Hacl.Spec.K256.GLV.fst.checked",
"Hacl.Spec.Bignum.Definitions.fst.checked",
"Hacl.Spec.Bignum.Convert.fst.checked",
"Hacl.Spec.Bignum.fsti.checked",
"Hacl.Bignum.Definitions.fst.checked",
"Hacl.Bignum.Convert.fst.checked",
"Hacl.Bignum.Base.fst.checked",
"Hacl.Bignum.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Tactics.Typeclasses.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.List.Tot.fst.checked",
"FStar.HyperStack.ST.fsti.checked",
"FStar.HyperStack.fst.checked",
"FStar.Ghost.fsti.checked"
],
"interface_file": true,
"source_file": "Hacl.K256.Scalar.fst"
} | [] | [
"Hacl.K256.Scalar.qelem",
"Hacl.Bignum.bn_is_zero_mask",
"Lib.IntTypes.U64",
"Hacl.K256.Scalar.qnlimb",
"Hacl.Bignum.Definitions.limb",
"Prims.unit",
"Hacl.Spec.Bignum.bn_is_zero_mask_lemma",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Lib.Buffer.as_seq",
"Lib.Buffer.MUT",
"Lib.IntTypes.uint64",
"FStar.Monotonic.HyperStack.mem",
"FStar.HyperStack.ST.get"
] | [] | module Hacl.K256.Scalar
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module S = Spec.K256
module KL = Hacl.Spec.K256.Scalar.Lemmas
module SG = Hacl.Spec.K256.GLV
module SGL = Hacl.Spec.K256.GLV.Lemmas
module BD = Hacl.Bignum.Definitions
module BN = Hacl.Bignum
module BB = Hacl.Bignum.Base
module SN = Hacl.Spec.Bignum
module SD = Hacl.Spec.Bignum.Definitions
include Hacl.Spec.K256.Scalar
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
[@CInline]
let bn_add : BN.bn_add_st U64 = BN.bn_add
//inline_for_extraction noextract
//let kn = BN.mk_runtime_bn U64 qnlimb
let add4: BN.bn_add_eq_len_st U64 qnlimb =
BN.bn_add_eq_len qnlimb
let sub4: BN.bn_sub_eq_len_st U64 qnlimb =
BN.bn_sub_eq_len qnlimb
let add_mod4: BN.bn_add_mod_n_st U64 qnlimb =
BN.bn_add_mod_n qnlimb
let sub_mod4: BN.bn_sub_mod_n_st U64 qnlimb =
BN.bn_sub_mod_n qnlimb
let mul4 (a:BD.lbignum U64 qnlimb) : BN.bn_karatsuba_mul_st U64 qnlimb a =
BN.bn_mul qnlimb qnlimb a
let sqr4 (a:BD.lbignum U64 qnlimb) : BN.bn_karatsuba_sqr_st U64 qnlimb a =
BN.bn_sqr qnlimb a
inline_for_extraction noextract
instance kn: BN.bn U64 = {
BN.len = qnlimb;
BN.add = add4;
BN.sub = sub4;
BN.add_mod_n = add_mod4;
BN.sub_mod_n = sub_mod4;
BN.mul = mul4;
BN.sqr = sqr4
}
let make_u64_4 out (f0, f1, f2, f3) =
out.(0ul) <- f0;
out.(1ul) <- f1;
out.(2ul) <- f2;
out.(3ul) <- f3;
let h = ST.get () in
KL.qas_nat4_is_qas_nat (as_seq h out);
assert (Seq.equal (as_seq h out) (LSeq.create4 f0 f1 f2 f3))
let make_order_k256 () =
[@inline_let]
let r =
(u64 0xbfd25e8cd0364141,
u64 0xbaaedce6af48a03b,
u64 0xfffffffffffffffe,
u64 0xffffffffffffffff) in
assert_norm (qas_nat4 r = S.q);
r
let create_qelem () =
SD.bn_eval_zeroes #U64 (v qnlimb) (v qnlimb);
create qnlimb (u64 0)
let create_one () =
[@inline_let]
let l = [u64 0x1; u64 0x0; u64 0x0; u64 0x0] in
assert_norm (FStar.List.Tot.length l = 4);
Seq.elim_of_list l;
LSeq.eq_intro (LSeq.create4 (u64 0x1) (u64 0x0) (u64 0x0) (u64 0x0)) (Seq.seq_of_list l);
KL.qas_nat4_is_qas_nat (LSeq.create4 (u64 0x1) (u64 0x0) (u64 0x0) (u64 0x0));
createL l | false | false | Hacl.K256.Scalar.fst | {
"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_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 50,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val is_qelem_zero (f:qelem) : Stack uint64
(requires fun h -> live h f)
(ensures fun h0 m h1 -> modifies0 h0 h1 /\
(v m = 0 \/ v m = ones_v U64) /\
v m == (if qas_nat h0 f = 0 then ones_v U64 else 0)) | [] | Hacl.K256.Scalar.is_qelem_zero | {
"file_name": "code/k256/Hacl.K256.Scalar.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | f: Hacl.K256.Scalar.qelem -> FStar.HyperStack.ST.Stack Lib.IntTypes.uint64 | {
"end_col": 29,
"end_line": 107,
"start_col": 21,
"start_line": 104
} |
Prims.Tot | [@@ FStar.Tactics.Typeclasses.tcinstance]
val kn:BN.bn U64 | [
{
"abbrev": false,
"full_module": "Hacl.Spec.K256.Scalar",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Definitions",
"short_module": "SD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum",
"short_module": "SN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Base",
"short_module": "BB"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Definitions",
"short_module": "BD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.GLV.Lemmas",
"short_module": "SGL"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.GLV",
"short_module": "SG"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Scalar.Lemmas",
"short_module": "KL"
},
{
"abbrev": true,
"full_module": "Spec.K256",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Lib.ByteBuffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Buffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Definitions",
"short_module": "BD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.GLV",
"short_module": "SG"
},
{
"abbrev": true,
"full_module": "Spec.K256",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Lib.ByteSequence",
"short_module": "BSeq"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Lib.Buffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.K256",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.K256",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | instance kn: BN.bn U64 = {
BN.len = qnlimb;
BN.add = add4;
BN.sub = sub4;
BN.add_mod_n = add_mod4;
BN.sub_mod_n = sub_mod4;
BN.mul = mul4;
BN.sqr = sqr4
} | [@@ FStar.Tactics.Typeclasses.tcinstance]
val kn:BN.bn U64
[@@ FStar.Tactics.Typeclasses.tcinstance]
let kn:BN.bn U64 = | false | null | false | {
BN.len = qnlimb;
BN.add = add4;
BN.sub = sub4;
BN.add_mod_n = add_mod4;
BN.sub_mod_n = sub_mod4;
BN.mul = mul4;
BN.sqr = sqr4
} | {
"checked_file": "Hacl.K256.Scalar.fst.checked",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteBuffer.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.K256.Scalar.Lemmas.fst.checked",
"Hacl.Spec.K256.Scalar.fst.checked",
"Hacl.Spec.K256.GLV.Lemmas.fst.checked",
"Hacl.Spec.K256.GLV.fst.checked",
"Hacl.Spec.Bignum.Definitions.fst.checked",
"Hacl.Spec.Bignum.Convert.fst.checked",
"Hacl.Spec.Bignum.fsti.checked",
"Hacl.Bignum.Definitions.fst.checked",
"Hacl.Bignum.Convert.fst.checked",
"Hacl.Bignum.Base.fst.checked",
"Hacl.Bignum.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Tactics.Typeclasses.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.List.Tot.fst.checked",
"FStar.HyperStack.ST.fsti.checked",
"FStar.HyperStack.fst.checked",
"FStar.Ghost.fsti.checked"
],
"interface_file": true,
"source_file": "Hacl.K256.Scalar.fst"
} | [
"total"
] | [
"Hacl.Bignum.Mkbn",
"Lib.IntTypes.U64",
"Hacl.K256.Scalar.qnlimb",
"Hacl.K256.Scalar.add4",
"Hacl.K256.Scalar.sub4",
"Hacl.K256.Scalar.add_mod4",
"Hacl.K256.Scalar.sub_mod4",
"Hacl.K256.Scalar.mul4",
"Hacl.K256.Scalar.sqr4"
] | [] | module Hacl.K256.Scalar
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module S = Spec.K256
module KL = Hacl.Spec.K256.Scalar.Lemmas
module SG = Hacl.Spec.K256.GLV
module SGL = Hacl.Spec.K256.GLV.Lemmas
module BD = Hacl.Bignum.Definitions
module BN = Hacl.Bignum
module BB = Hacl.Bignum.Base
module SN = Hacl.Spec.Bignum
module SD = Hacl.Spec.Bignum.Definitions
include Hacl.Spec.K256.Scalar
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
[@CInline]
let bn_add : BN.bn_add_st U64 = BN.bn_add
//inline_for_extraction noextract
//let kn = BN.mk_runtime_bn U64 qnlimb
let add4: BN.bn_add_eq_len_st U64 qnlimb =
BN.bn_add_eq_len qnlimb
let sub4: BN.bn_sub_eq_len_st U64 qnlimb =
BN.bn_sub_eq_len qnlimb
let add_mod4: BN.bn_add_mod_n_st U64 qnlimb =
BN.bn_add_mod_n qnlimb
let sub_mod4: BN.bn_sub_mod_n_st U64 qnlimb =
BN.bn_sub_mod_n qnlimb
let mul4 (a:BD.lbignum U64 qnlimb) : BN.bn_karatsuba_mul_st U64 qnlimb a =
BN.bn_mul qnlimb qnlimb a
let sqr4 (a:BD.lbignum U64 qnlimb) : BN.bn_karatsuba_sqr_st U64 qnlimb a =
BN.bn_sqr qnlimb a
inline_for_extraction noextract | false | true | Hacl.K256.Scalar.fst | {
"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_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 50,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | [@@ FStar.Tactics.Typeclasses.tcinstance]
val kn:BN.bn U64 | [] | Hacl.K256.Scalar.kn | {
"file_name": "code/k256/Hacl.K256.Scalar.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | Hacl.Bignum.bn Lib.IntTypes.U64 | {
"end_col": 15,
"end_line": 62,
"start_col": 2,
"start_line": 56
} |
Prims.Pure | val make_order_k256: unit -> Pure qelem4
(requires True)
(ensures fun r -> qas_nat4 r = S.q) | [
{
"abbrev": false,
"full_module": "Hacl.Spec.K256.Scalar",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Definitions",
"short_module": "SD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum",
"short_module": "SN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Base",
"short_module": "BB"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Definitions",
"short_module": "BD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.GLV.Lemmas",
"short_module": "SGL"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.GLV",
"short_module": "SG"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Scalar.Lemmas",
"short_module": "KL"
},
{
"abbrev": true,
"full_module": "Spec.K256",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Lib.ByteBuffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Buffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Definitions",
"short_module": "BD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.GLV",
"short_module": "SG"
},
{
"abbrev": true,
"full_module": "Spec.K256",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Lib.ByteSequence",
"short_module": "BSeq"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Lib.Buffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.K256",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.K256",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let make_order_k256 () =
[@inline_let]
let r =
(u64 0xbfd25e8cd0364141,
u64 0xbaaedce6af48a03b,
u64 0xfffffffffffffffe,
u64 0xffffffffffffffff) in
assert_norm (qas_nat4 r = S.q);
r | val make_order_k256: unit -> Pure qelem4
(requires True)
(ensures fun r -> qas_nat4 r = S.q)
let make_order_k256 () = | false | null | false | [@@ inline_let ]let r =
(u64 0xbfd25e8cd0364141, u64 0xbaaedce6af48a03b, u64 0xfffffffffffffffe, u64 0xffffffffffffffff)
in
assert_norm (qas_nat4 r = S.q);
r | {
"checked_file": "Hacl.K256.Scalar.fst.checked",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteBuffer.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.K256.Scalar.Lemmas.fst.checked",
"Hacl.Spec.K256.Scalar.fst.checked",
"Hacl.Spec.K256.GLV.Lemmas.fst.checked",
"Hacl.Spec.K256.GLV.fst.checked",
"Hacl.Spec.Bignum.Definitions.fst.checked",
"Hacl.Spec.Bignum.Convert.fst.checked",
"Hacl.Spec.Bignum.fsti.checked",
"Hacl.Bignum.Definitions.fst.checked",
"Hacl.Bignum.Convert.fst.checked",
"Hacl.Bignum.Base.fst.checked",
"Hacl.Bignum.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Tactics.Typeclasses.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.List.Tot.fst.checked",
"FStar.HyperStack.ST.fsti.checked",
"FStar.HyperStack.fst.checked",
"FStar.Ghost.fsti.checked"
],
"interface_file": true,
"source_file": "Hacl.K256.Scalar.fst"
} | [] | [
"Prims.unit",
"FStar.Pervasives.assert_norm",
"Prims.b2t",
"Prims.op_Equality",
"Prims.int",
"Hacl.Spec.K256.Scalar.qas_nat4",
"Spec.K256.PointOps.q",
"FStar.Pervasives.Native.tuple4",
"Lib.IntTypes.int_t",
"Lib.IntTypes.U64",
"Lib.IntTypes.SEC",
"FStar.Pervasives.Native.Mktuple4",
"Lib.IntTypes.uint64",
"Lib.IntTypes.u64",
"Hacl.Spec.K256.Scalar.qelem4"
] | [] | module Hacl.K256.Scalar
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module S = Spec.K256
module KL = Hacl.Spec.K256.Scalar.Lemmas
module SG = Hacl.Spec.K256.GLV
module SGL = Hacl.Spec.K256.GLV.Lemmas
module BD = Hacl.Bignum.Definitions
module BN = Hacl.Bignum
module BB = Hacl.Bignum.Base
module SN = Hacl.Spec.Bignum
module SD = Hacl.Spec.Bignum.Definitions
include Hacl.Spec.K256.Scalar
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
[@CInline]
let bn_add : BN.bn_add_st U64 = BN.bn_add
//inline_for_extraction noextract
//let kn = BN.mk_runtime_bn U64 qnlimb
let add4: BN.bn_add_eq_len_st U64 qnlimb =
BN.bn_add_eq_len qnlimb
let sub4: BN.bn_sub_eq_len_st U64 qnlimb =
BN.bn_sub_eq_len qnlimb
let add_mod4: BN.bn_add_mod_n_st U64 qnlimb =
BN.bn_add_mod_n qnlimb
let sub_mod4: BN.bn_sub_mod_n_st U64 qnlimb =
BN.bn_sub_mod_n qnlimb
let mul4 (a:BD.lbignum U64 qnlimb) : BN.bn_karatsuba_mul_st U64 qnlimb a =
BN.bn_mul qnlimb qnlimb a
let sqr4 (a:BD.lbignum U64 qnlimb) : BN.bn_karatsuba_sqr_st U64 qnlimb a =
BN.bn_sqr qnlimb a
inline_for_extraction noextract
instance kn: BN.bn U64 = {
BN.len = qnlimb;
BN.add = add4;
BN.sub = sub4;
BN.add_mod_n = add_mod4;
BN.sub_mod_n = sub_mod4;
BN.mul = mul4;
BN.sqr = sqr4
}
let make_u64_4 out (f0, f1, f2, f3) =
out.(0ul) <- f0;
out.(1ul) <- f1;
out.(2ul) <- f2;
out.(3ul) <- f3;
let h = ST.get () in
KL.qas_nat4_is_qas_nat (as_seq h out);
assert (Seq.equal (as_seq h out) (LSeq.create4 f0 f1 f2 f3)) | false | false | Hacl.K256.Scalar.fst | {
"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_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 50,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val make_order_k256: unit -> Pure qelem4
(requires True)
(ensures fun r -> qas_nat4 r = S.q) | [] | Hacl.K256.Scalar.make_order_k256 | {
"file_name": "code/k256/Hacl.K256.Scalar.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | _: Prims.unit -> Prims.Pure Hacl.Spec.K256.Scalar.qelem4 | {
"end_col": 3,
"end_line": 85,
"start_col": 2,
"start_line": 77
} |
FStar.HyperStack.ST.Stack | val is_qelem_zero_vartime (f:qelem) : Stack bool
(requires fun h -> live h f)
(ensures fun h0 m h1 -> modifies0 h0 h1 /\
m == (qas_nat h0 f = 0)) | [
{
"abbrev": false,
"full_module": "Hacl.Spec.K256.Scalar",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Definitions",
"short_module": "SD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum",
"short_module": "SN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Base",
"short_module": "BB"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Definitions",
"short_module": "BD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.GLV.Lemmas",
"short_module": "SGL"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.GLV",
"short_module": "SG"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Scalar.Lemmas",
"short_module": "KL"
},
{
"abbrev": true,
"full_module": "Spec.K256",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Lib.ByteBuffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Buffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Definitions",
"short_module": "BD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.GLV",
"short_module": "SG"
},
{
"abbrev": true,
"full_module": "Spec.K256",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Lib.ByteSequence",
"short_module": "BSeq"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Lib.Buffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.K256",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.K256",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let is_qelem_zero_vartime f =
let h = ST.get () in
KL.qas_nat4_is_qas_nat (as_seq h f);
let (f0,f1,f2,f3) = (f.(0ul), f.(1ul), f.(2ul), f.(3ul)) in
KL.is_qelem_zero_vartime4_lemma (f0,f1,f2,f3);
is_qelem_zero_vartime4 (f0,f1,f2,f3) | val is_qelem_zero_vartime (f:qelem) : Stack bool
(requires fun h -> live h f)
(ensures fun h0 m h1 -> modifies0 h0 h1 /\
m == (qas_nat h0 f = 0))
let is_qelem_zero_vartime f = | true | null | false | let h = ST.get () in
KL.qas_nat4_is_qas_nat (as_seq h f);
let f0, f1, f2, f3 = (f.(0ul), f.(1ul), f.(2ul), f.(3ul)) in
KL.is_qelem_zero_vartime4_lemma (f0, f1, f2, f3);
is_qelem_zero_vartime4 (f0, f1, f2, f3) | {
"checked_file": "Hacl.K256.Scalar.fst.checked",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteBuffer.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.K256.Scalar.Lemmas.fst.checked",
"Hacl.Spec.K256.Scalar.fst.checked",
"Hacl.Spec.K256.GLV.Lemmas.fst.checked",
"Hacl.Spec.K256.GLV.fst.checked",
"Hacl.Spec.Bignum.Definitions.fst.checked",
"Hacl.Spec.Bignum.Convert.fst.checked",
"Hacl.Spec.Bignum.fsti.checked",
"Hacl.Bignum.Definitions.fst.checked",
"Hacl.Bignum.Convert.fst.checked",
"Hacl.Bignum.Base.fst.checked",
"Hacl.Bignum.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Tactics.Typeclasses.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.List.Tot.fst.checked",
"FStar.HyperStack.ST.fsti.checked",
"FStar.HyperStack.fst.checked",
"FStar.Ghost.fsti.checked"
],
"interface_file": true,
"source_file": "Hacl.K256.Scalar.fst"
} | [] | [
"Hacl.K256.Scalar.qelem",
"Lib.IntTypes.uint64",
"Hacl.Spec.K256.Scalar.is_qelem_zero_vartime4",
"FStar.Pervasives.Native.Mktuple4",
"Prims.unit",
"Hacl.Spec.K256.Scalar.Lemmas.is_qelem_zero_vartime4_lemma",
"Prims.bool",
"FStar.Pervasives.Native.tuple4",
"Lib.IntTypes.int_t",
"Lib.IntTypes.U64",
"Lib.IntTypes.SEC",
"Lib.Buffer.op_Array_Access",
"Lib.Buffer.MUT",
"Hacl.K256.Scalar.qnlimb",
"FStar.UInt32.__uint_to_t",
"Hacl.Spec.K256.Scalar.Lemmas.qas_nat4_is_qas_nat",
"Lib.Buffer.as_seq",
"FStar.Monotonic.HyperStack.mem",
"FStar.HyperStack.ST.get"
] | [] | module Hacl.K256.Scalar
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module S = Spec.K256
module KL = Hacl.Spec.K256.Scalar.Lemmas
module SG = Hacl.Spec.K256.GLV
module SGL = Hacl.Spec.K256.GLV.Lemmas
module BD = Hacl.Bignum.Definitions
module BN = Hacl.Bignum
module BB = Hacl.Bignum.Base
module SN = Hacl.Spec.Bignum
module SD = Hacl.Spec.Bignum.Definitions
include Hacl.Spec.K256.Scalar
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
[@CInline]
let bn_add : BN.bn_add_st U64 = BN.bn_add
//inline_for_extraction noextract
//let kn = BN.mk_runtime_bn U64 qnlimb
let add4: BN.bn_add_eq_len_st U64 qnlimb =
BN.bn_add_eq_len qnlimb
let sub4: BN.bn_sub_eq_len_st U64 qnlimb =
BN.bn_sub_eq_len qnlimb
let add_mod4: BN.bn_add_mod_n_st U64 qnlimb =
BN.bn_add_mod_n qnlimb
let sub_mod4: BN.bn_sub_mod_n_st U64 qnlimb =
BN.bn_sub_mod_n qnlimb
let mul4 (a:BD.lbignum U64 qnlimb) : BN.bn_karatsuba_mul_st U64 qnlimb a =
BN.bn_mul qnlimb qnlimb a
let sqr4 (a:BD.lbignum U64 qnlimb) : BN.bn_karatsuba_sqr_st U64 qnlimb a =
BN.bn_sqr qnlimb a
inline_for_extraction noextract
instance kn: BN.bn U64 = {
BN.len = qnlimb;
BN.add = add4;
BN.sub = sub4;
BN.add_mod_n = add_mod4;
BN.sub_mod_n = sub_mod4;
BN.mul = mul4;
BN.sqr = sqr4
}
let make_u64_4 out (f0, f1, f2, f3) =
out.(0ul) <- f0;
out.(1ul) <- f1;
out.(2ul) <- f2;
out.(3ul) <- f3;
let h = ST.get () in
KL.qas_nat4_is_qas_nat (as_seq h out);
assert (Seq.equal (as_seq h out) (LSeq.create4 f0 f1 f2 f3))
let make_order_k256 () =
[@inline_let]
let r =
(u64 0xbfd25e8cd0364141,
u64 0xbaaedce6af48a03b,
u64 0xfffffffffffffffe,
u64 0xffffffffffffffff) in
assert_norm (qas_nat4 r = S.q);
r
let create_qelem () =
SD.bn_eval_zeroes #U64 (v qnlimb) (v qnlimb);
create qnlimb (u64 0)
let create_one () =
[@inline_let]
let l = [u64 0x1; u64 0x0; u64 0x0; u64 0x0] in
assert_norm (FStar.List.Tot.length l = 4);
Seq.elim_of_list l;
LSeq.eq_intro (LSeq.create4 (u64 0x1) (u64 0x0) (u64 0x0) (u64 0x0)) (Seq.seq_of_list l);
KL.qas_nat4_is_qas_nat (LSeq.create4 (u64 0x1) (u64 0x0) (u64 0x0) (u64 0x0));
createL l
[@CInline]
let is_qelem_zero f =
let h0 = ST.get () in
SN.bn_is_zero_mask_lemma (as_seq h0 f);
BN.bn_is_zero_mask qnlimb f | false | false | Hacl.K256.Scalar.fst | {
"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_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 50,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val is_qelem_zero_vartime (f:qelem) : Stack bool
(requires fun h -> live h f)
(ensures fun h0 m h1 -> modifies0 h0 h1 /\
m == (qas_nat h0 f = 0)) | [] | Hacl.K256.Scalar.is_qelem_zero_vartime | {
"file_name": "code/k256/Hacl.K256.Scalar.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | f: Hacl.K256.Scalar.qelem -> FStar.HyperStack.ST.Stack Prims.bool | {
"end_col": 38,
"end_line": 117,
"start_col": 29,
"start_line": 111
} |
FStar.HyperStack.ST.Stack | val is_qelem_le_q_halved_vartime: f:qelem -> Stack bool
(requires fun h -> live h f)
(ensures fun h0 b h1 -> modifies0 h0 h1 /\
b == (qas_nat h0 f <= S.q / 2)) | [
{
"abbrev": false,
"full_module": "Hacl.Spec.K256.Scalar",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Definitions",
"short_module": "SD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum",
"short_module": "SN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Base",
"short_module": "BB"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Definitions",
"short_module": "BD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.GLV.Lemmas",
"short_module": "SGL"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.GLV",
"short_module": "SG"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Scalar.Lemmas",
"short_module": "KL"
},
{
"abbrev": true,
"full_module": "Spec.K256",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Lib.ByteBuffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Buffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Definitions",
"short_module": "BD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.GLV",
"short_module": "SG"
},
{
"abbrev": true,
"full_module": "Spec.K256",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Lib.ByteSequence",
"short_module": "BSeq"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Lib.Buffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.K256",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.K256",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let is_qelem_le_q_halved_vartime f =
let h = ST.get () in
KL.qas_nat4_is_qas_nat (as_seq h f);
let (a0,a1,a2,a3) = (f.(0ul), f.(1ul), f.(2ul), f.(3ul)) in
KL.is_qelem_le_q_halved_vartime4_lemma (a0,a1,a2,a3);
is_qelem_le_q_halved_vartime4 (a0,a1,a2,a3) | val is_qelem_le_q_halved_vartime: f:qelem -> Stack bool
(requires fun h -> live h f)
(ensures fun h0 b h1 -> modifies0 h0 h1 /\
b == (qas_nat h0 f <= S.q / 2))
let is_qelem_le_q_halved_vartime f = | true | null | false | let h = ST.get () in
KL.qas_nat4_is_qas_nat (as_seq h f);
let a0, a1, a2, a3 = (f.(0ul), f.(1ul), f.(2ul), f.(3ul)) in
KL.is_qelem_le_q_halved_vartime4_lemma (a0, a1, a2, a3);
is_qelem_le_q_halved_vartime4 (a0, a1, a2, a3) | {
"checked_file": "Hacl.K256.Scalar.fst.checked",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteBuffer.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.K256.Scalar.Lemmas.fst.checked",
"Hacl.Spec.K256.Scalar.fst.checked",
"Hacl.Spec.K256.GLV.Lemmas.fst.checked",
"Hacl.Spec.K256.GLV.fst.checked",
"Hacl.Spec.Bignum.Definitions.fst.checked",
"Hacl.Spec.Bignum.Convert.fst.checked",
"Hacl.Spec.Bignum.fsti.checked",
"Hacl.Bignum.Definitions.fst.checked",
"Hacl.Bignum.Convert.fst.checked",
"Hacl.Bignum.Base.fst.checked",
"Hacl.Bignum.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Tactics.Typeclasses.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.List.Tot.fst.checked",
"FStar.HyperStack.ST.fsti.checked",
"FStar.HyperStack.fst.checked",
"FStar.Ghost.fsti.checked"
],
"interface_file": true,
"source_file": "Hacl.K256.Scalar.fst"
} | [] | [
"Hacl.K256.Scalar.qelem",
"Lib.IntTypes.uint64",
"Hacl.Spec.K256.Scalar.is_qelem_le_q_halved_vartime4",
"FStar.Pervasives.Native.Mktuple4",
"Prims.unit",
"Hacl.Spec.K256.Scalar.Lemmas.is_qelem_le_q_halved_vartime4_lemma",
"Prims.bool",
"FStar.Pervasives.Native.tuple4",
"Lib.IntTypes.int_t",
"Lib.IntTypes.U64",
"Lib.IntTypes.SEC",
"Lib.Buffer.op_Array_Access",
"Lib.Buffer.MUT",
"Hacl.K256.Scalar.qnlimb",
"FStar.UInt32.__uint_to_t",
"Hacl.Spec.K256.Scalar.Lemmas.qas_nat4_is_qas_nat",
"Lib.Buffer.as_seq",
"FStar.Monotonic.HyperStack.mem",
"FStar.HyperStack.ST.get"
] | [] | module Hacl.K256.Scalar
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module S = Spec.K256
module KL = Hacl.Spec.K256.Scalar.Lemmas
module SG = Hacl.Spec.K256.GLV
module SGL = Hacl.Spec.K256.GLV.Lemmas
module BD = Hacl.Bignum.Definitions
module BN = Hacl.Bignum
module BB = Hacl.Bignum.Base
module SN = Hacl.Spec.Bignum
module SD = Hacl.Spec.Bignum.Definitions
include Hacl.Spec.K256.Scalar
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
[@CInline]
let bn_add : BN.bn_add_st U64 = BN.bn_add
//inline_for_extraction noextract
//let kn = BN.mk_runtime_bn U64 qnlimb
let add4: BN.bn_add_eq_len_st U64 qnlimb =
BN.bn_add_eq_len qnlimb
let sub4: BN.bn_sub_eq_len_st U64 qnlimb =
BN.bn_sub_eq_len qnlimb
let add_mod4: BN.bn_add_mod_n_st U64 qnlimb =
BN.bn_add_mod_n qnlimb
let sub_mod4: BN.bn_sub_mod_n_st U64 qnlimb =
BN.bn_sub_mod_n qnlimb
let mul4 (a:BD.lbignum U64 qnlimb) : BN.bn_karatsuba_mul_st U64 qnlimb a =
BN.bn_mul qnlimb qnlimb a
let sqr4 (a:BD.lbignum U64 qnlimb) : BN.bn_karatsuba_sqr_st U64 qnlimb a =
BN.bn_sqr qnlimb a
inline_for_extraction noextract
instance kn: BN.bn U64 = {
BN.len = qnlimb;
BN.add = add4;
BN.sub = sub4;
BN.add_mod_n = add_mod4;
BN.sub_mod_n = sub_mod4;
BN.mul = mul4;
BN.sqr = sqr4
}
let make_u64_4 out (f0, f1, f2, f3) =
out.(0ul) <- f0;
out.(1ul) <- f1;
out.(2ul) <- f2;
out.(3ul) <- f3;
let h = ST.get () in
KL.qas_nat4_is_qas_nat (as_seq h out);
assert (Seq.equal (as_seq h out) (LSeq.create4 f0 f1 f2 f3))
let make_order_k256 () =
[@inline_let]
let r =
(u64 0xbfd25e8cd0364141,
u64 0xbaaedce6af48a03b,
u64 0xfffffffffffffffe,
u64 0xffffffffffffffff) in
assert_norm (qas_nat4 r = S.q);
r
let create_qelem () =
SD.bn_eval_zeroes #U64 (v qnlimb) (v qnlimb);
create qnlimb (u64 0)
let create_one () =
[@inline_let]
let l = [u64 0x1; u64 0x0; u64 0x0; u64 0x0] in
assert_norm (FStar.List.Tot.length l = 4);
Seq.elim_of_list l;
LSeq.eq_intro (LSeq.create4 (u64 0x1) (u64 0x0) (u64 0x0) (u64 0x0)) (Seq.seq_of_list l);
KL.qas_nat4_is_qas_nat (LSeq.create4 (u64 0x1) (u64 0x0) (u64 0x0) (u64 0x0));
createL l
[@CInline]
let is_qelem_zero f =
let h0 = ST.get () in
SN.bn_is_zero_mask_lemma (as_seq h0 f);
BN.bn_is_zero_mask qnlimb f
[@CInline]
let is_qelem_zero_vartime f =
let h = ST.get () in
KL.qas_nat4_is_qas_nat (as_seq h f);
let (f0,f1,f2,f3) = (f.(0ul), f.(1ul), f.(2ul), f.(3ul)) in
KL.is_qelem_zero_vartime4_lemma (f0,f1,f2,f3);
is_qelem_zero_vartime4 (f0,f1,f2,f3)
[@CInline]
let is_qelem_eq_vartime f1 f2 =
let h = ST.get () in
KL.qas_nat4_is_qas_nat (as_seq h f1);
KL.qas_nat4_is_qas_nat (as_seq h f2);
let (a0,a1,a2,a3) = (f1.(0ul), f1.(1ul), f1.(2ul), f1.(3ul)) in
let (b0,b1,b2,b3) = (f2.(0ul), f2.(1ul), f2.(2ul), f2.(3ul)) in
KL.is_qelem_eq_vartime4_lemma (a0,a1,a2,a3) (b0,b1,b2,b3);
is_qelem_eq_vartime4 (a0,a1,a2,a3) (b0,b1,b2,b3)
let load_qelem f b =
let h0 = ST.get () in
Hacl.Spec.Bignum.Convert.bn_from_bytes_be_lemma #U64 32 (as_seq h0 b);
Hacl.Bignum.Convert.mk_bn_from_bytes_be true 32ul b f
[@CInline]
let load_qelem_check f b =
push_frame ();
let n = create_qelem () in
make_u64_4 n (make_order_k256 ());
load_qelem f b;
let h0 = ST.get () in
let is_zero = is_qelem_zero f in
assert (v is_zero == (if qas_nat h0 f = 0 then ones_v U64 else 0));
let is_lt_q = BN.bn_lt_mask qnlimb f n in
SN.bn_lt_mask_lemma (as_seq h0 f) (as_seq h0 n);
assert (v is_lt_q == (if qas_nat h0 f < S.q then ones_v U64 else 0));
let m = logand (lognot is_zero) is_lt_q in
lognot_lemma is_zero;
logand_lemma (lognot is_zero) is_lt_q;
pop_frame ();
m
let load_qelem_conditional res b =
push_frame ();
let is_b_valid = load_qelem_check res b in
let oneq = create_one () in
let h0 = ST.get () in
Lib.ByteBuffer.buf_mask_select res oneq is_b_valid res;
let h1 = ST.get () in
assert (as_seq h1 res == (if (v is_b_valid = 0) then as_seq h0 oneq else as_seq h0 res));
pop_frame ();
is_b_valid
[@CInline]
let load_qelem_vartime f b =
load_qelem f b;
let h = ST.get () in
KL.qas_nat4_is_qas_nat (as_seq h f);
let is_zero = is_qelem_zero_vartime f in
let (a0,a1,a2,a3) = (f.(0ul), f.(1ul), f.(2ul), f.(3ul)) in
let is_lt_q_b = is_qelem_lt_q_vartime4 (a0,a1,a2,a3) in
KL.is_qelem_lt_q_vartime4_lemma (a0,a1,a2,a3);
not is_zero && is_lt_q_b
val modq_short: out:qelem -> a:qelem -> Stack unit
(requires fun h ->
live h a /\ live h out /\ disjoint a out)
(ensures fun h0 _ h1 -> modifies (loc out) h0 h1 /\
qas_nat h1 out == qas_nat h0 a % S.q)
[@CInline]
let modq_short out a =
push_frame ();
let tmp = create_qelem () in
[@inline_let]
let (t0,t1,t2,t3) = make_pow2_256_minus_order_k256 () in
make_u64_4 tmp (t0,t1,t2,t3);
let h0 = ST.get () in
let c = kn.BN.add a tmp out in
let mask = u64 0 -. c in
map2T qnlimb out (BB.mask_select mask) out a;
KL.mod_short_lseq_lemma (as_seq h0 a);
pop_frame ()
[@CInline]
let load_qelem_modq f b =
push_frame ();
let tmp = create_qelem () in
load_qelem f b;
copy tmp f;
modq_short f tmp;
pop_frame ()
[@CInline]
let store_qelem b f =
let h0 = ST.get () in
Hacl.Spec.Bignum.Convert.bn_to_bytes_be_lemma #U64 32 (as_seq h0 f);
Hacl.Bignum.Convert.mk_bn_to_bytes_be true 32ul f b
[@CInline]
let qadd out f1 f2 =
push_frame ();
let n = create_qelem () in
make_u64_4 n (make_order_k256 ());
let h0 = ST.get () in
kn.BN.add_mod_n n f1 f2 out;
SN.bn_add_mod_n_lemma (as_seq h0 n) (as_seq h0 f1) (as_seq h0 f2);
pop_frame ()
val mul_pow2_256_minus_q_add:
len:size_t
-> resLen:size_t{2 + v len <= v resLen /\ 4 <= v resLen}
-> t01:lbuffer uint64 2ul
-> a:lbuffer uint64 len
-> e:lbuffer uint64 4ul
-> res:lbuffer uint64 resLen ->
Stack (BB.carry U64)
(requires fun h ->
live h a /\ live h res /\ live h t01 /\ live h e /\
disjoint a res /\ disjoint a t01 /\ disjoint a e /\
disjoint res t01 /\ disjoint res e /\ disjoint t01 e /\
as_seq h t01 == LSeq.create2 (u64 0x402da1732fc9bebf) (u64 0x4551231950b75fc4) /\
as_seq h res == LSeq.create (v resLen) (u64 0))
(ensures fun h0 c h1 -> modifies (loc res) h0 h1 /\
(c, as_seq h1 res) ==
mul_pow2_256_minus_q_lseq_add (v len) (v resLen) (as_seq h0 a) (as_seq h0 e))
[@CInline]
let mul_pow2_256_minus_q_add len resLen t01 a e res =
push_frame ();
let tmp = create (len +! 2ul) (u64 0) in
BN.bn_mul len 2ul a t01 tmp;
update_sub res 2ul len a;
let _ = bn_add resLen res (len +! 2ul) tmp res in
let c = bn_add resLen res 4ul e res in
pop_frame ();
c
inline_for_extraction noextract
val modq_before_final:
t01:lbuffer uint64 2ul
-> a:lbuffer uint64 (2ul *! qnlimb)
-> out:qelem ->
Stack (BB.carry U64)
(requires fun h ->
live h a /\ live h out /\ live h t01 /\
disjoint a out /\ disjoint a t01 /\ disjoint out t01 /\
as_seq h t01 == LSeq.create2 (u64 0x402da1732fc9bebf) (u64 0x4551231950b75fc4) /\
as_seq h out == LSeq.create 4 (u64 0))
(ensures fun h0 c h1 -> modifies (loc out) h0 h1 /\
(c, as_seq h1 out) == mod_lseq_before_final (as_seq h0 a))
let modq_before_final t01 a out =
push_frame ();
let m = create 7ul (u64 0) in
let p = create 5ul (u64 0) in
let c0 = mul_pow2_256_minus_q_add 4ul 7ul t01 (sub a 4ul 4ul) (sub a 0ul 4ul) m in
let c1 = mul_pow2_256_minus_q_add 3ul 5ul t01 (sub m 4ul 3ul) (sub m 0ul 4ul) p in
let c2 = mul_pow2_256_minus_q_add 1ul 4ul t01 (sub p 4ul 1ul) (sub p 0ul 4ul) out in
pop_frame ();
c2
val modq: out:qelem -> a:lbuffer uint64 (2ul *! qnlimb) -> Stack unit
(requires fun h ->
live h a /\ live h out /\ disjoint a out)
(ensures fun h0 _ h1 -> modifies (loc out) h0 h1 /\
qas_nat h1 out == BD.bn_v h0 a % S.q)
[@CInline]
let modq out a =
push_frame ();
let r = create_qelem () in
let tmp = create_qelem () in
[@inline_let]
let (t0,t1,t2,t3) = make_pow2_256_minus_order_k256 () in
make_u64_4 tmp (t0,t1,t2,t3);
let t01 = sub tmp 0ul 2ul in
let h0 = ST.get () in
assert (Seq.equal (as_seq h0 t01) (LSeq.create2 t0 t1));
let c0 = modq_before_final t01 a r in
let c1 = kn.BN.add r tmp out in
let mask = u64 0 -. (c0 +. c1) in
map2T qnlimb out (BB.mask_select mask) out r;
let h1 = ST.get () in
KL.mod_lseq_lemma (as_seq h0 a);
pop_frame ()
[@CInline]
let qmul out f1 f2 =
push_frame ();
let h0 = ST.get () in
let tmp = create (2ul *! qnlimb) (u64 0) in
kn.BN.mul f1 f2 tmp;
SN.bn_mul_lemma (as_seq h0 f1) (as_seq h0 f2);
modq out tmp;
pop_frame ()
[@CInline]
let qsqr out f =
push_frame ();
let h0 = ST.get () in
let tmp = create (2ul *! qnlimb) (u64 0) in
kn.BN.sqr f tmp;
SN.bn_sqr_lemma (as_seq h0 f);
modq out tmp;
pop_frame ()
[@CInline]
let qnegate_conditional_vartime f is_negate =
push_frame ();
let n = create_qelem () in
make_u64_4 n (make_order_k256 ());
let zero = create_qelem () in
if is_negate then begin
let h0 = ST.get () in
kn.BN.sub_mod_n n zero f f;
SN.bn_sub_mod_n_lemma (as_seq h0 n) (as_seq h0 zero) (as_seq h0 f);
let h1 = ST.get () in
assert (qas_nat h1 f = (0 - qas_nat h0 f) % S.q);
Math.Lemmas.modulo_addition_lemma (- qas_nat h0 f) S.q 1;
assert (qas_nat h1 f == (S.q - qas_nat h0 f) % S.q) end;
pop_frame () | false | false | Hacl.K256.Scalar.fst | {
"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_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 50,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val is_qelem_le_q_halved_vartime: f:qelem -> Stack bool
(requires fun h -> live h f)
(ensures fun h0 b h1 -> modifies0 h0 h1 /\
b == (qas_nat h0 f <= S.q / 2)) | [] | Hacl.K256.Scalar.is_qelem_le_q_halved_vartime | {
"file_name": "code/k256/Hacl.K256.Scalar.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | f: Hacl.K256.Scalar.qelem -> FStar.HyperStack.ST.Stack Prims.bool | {
"end_col": 45,
"end_line": 367,
"start_col": 36,
"start_line": 361
} |
FStar.HyperStack.ST.Stack | val is_qelem_lt_pow2_128_vartime: f:qelem -> Stack bool
(requires fun h -> live h f)
(ensures fun h0 b h1 -> modifies0 h0 h1 /\
b == (qas_nat h0 f < pow2 128)) | [
{
"abbrev": false,
"full_module": "Hacl.Spec.K256.Scalar",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Definitions",
"short_module": "SD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum",
"short_module": "SN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Base",
"short_module": "BB"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Definitions",
"short_module": "BD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.GLV.Lemmas",
"short_module": "SGL"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.GLV",
"short_module": "SG"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Scalar.Lemmas",
"short_module": "KL"
},
{
"abbrev": true,
"full_module": "Spec.K256",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Lib.ByteBuffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Buffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Definitions",
"short_module": "BD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.GLV",
"short_module": "SG"
},
{
"abbrev": true,
"full_module": "Spec.K256",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Lib.ByteSequence",
"short_module": "BSeq"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Lib.Buffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.K256",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.K256",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let is_qelem_lt_pow2_128_vartime f =
let open Lib.RawIntTypes in
let h0 = ST.get () in
KL.qas_nat4_is_qas_nat (as_seq h0 f);
let f0 = Ghost.hide (LSeq.index (as_seq h0 f) 0) in
let f1 = Ghost.hide (LSeq.index (as_seq h0 f) 1) in
let f2 = f.(2ul) in
let f3 = f.(3ul) in
KL.is_qelem_lt_pow2_128_vartime4_lemma (Ghost.reveal f0, Ghost.reveal f1,f2,f3);
u64_to_UInt64 f2 =. 0uL && u64_to_UInt64 f3 =. 0uL | val is_qelem_lt_pow2_128_vartime: f:qelem -> Stack bool
(requires fun h -> live h f)
(ensures fun h0 b h1 -> modifies0 h0 h1 /\
b == (qas_nat h0 f < pow2 128))
let is_qelem_lt_pow2_128_vartime f = | true | null | false | let open Lib.RawIntTypes in
let h0 = ST.get () in
KL.qas_nat4_is_qas_nat (as_seq h0 f);
let f0 = Ghost.hide (LSeq.index (as_seq h0 f) 0) in
let f1 = Ghost.hide (LSeq.index (as_seq h0 f) 1) in
let f2 = f.(2ul) in
let f3 = f.(3ul) in
KL.is_qelem_lt_pow2_128_vartime4_lemma (Ghost.reveal f0, Ghost.reveal f1, f2, f3);
u64_to_UInt64 f2 =. 0uL && u64_to_UInt64 f3 =. 0uL | {
"checked_file": "Hacl.K256.Scalar.fst.checked",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteBuffer.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.K256.Scalar.Lemmas.fst.checked",
"Hacl.Spec.K256.Scalar.fst.checked",
"Hacl.Spec.K256.GLV.Lemmas.fst.checked",
"Hacl.Spec.K256.GLV.fst.checked",
"Hacl.Spec.Bignum.Definitions.fst.checked",
"Hacl.Spec.Bignum.Convert.fst.checked",
"Hacl.Spec.Bignum.fsti.checked",
"Hacl.Bignum.Definitions.fst.checked",
"Hacl.Bignum.Convert.fst.checked",
"Hacl.Bignum.Base.fst.checked",
"Hacl.Bignum.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Tactics.Typeclasses.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.List.Tot.fst.checked",
"FStar.HyperStack.ST.fsti.checked",
"FStar.HyperStack.fst.checked",
"FStar.Ghost.fsti.checked"
],
"interface_file": true,
"source_file": "Hacl.K256.Scalar.fst"
} | [] | [
"Hacl.K256.Scalar.qelem",
"Prims.op_AmpAmp",
"Lib.IntTypes.op_Equals_Dot",
"Lib.IntTypes.U64",
"Lib.RawIntTypes.u64_to_UInt64",
"FStar.UInt64.__uint_to_t",
"Prims.unit",
"Hacl.Spec.K256.Scalar.Lemmas.is_qelem_lt_pow2_128_vartime4_lemma",
"FStar.Pervasives.Native.Mktuple4",
"Lib.IntTypes.uint64",
"FStar.Ghost.reveal",
"Prims.bool",
"Lib.IntTypes.int_t",
"Lib.IntTypes.SEC",
"Lib.Buffer.op_Array_Access",
"Lib.Buffer.MUT",
"Hacl.K256.Scalar.qnlimb",
"FStar.UInt32.__uint_to_t",
"FStar.Ghost.erased",
"FStar.Ghost.hide",
"Lib.Sequence.index",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Lib.Buffer.as_seq",
"Hacl.Spec.K256.Scalar.Lemmas.qas_nat4_is_qas_nat",
"FStar.Monotonic.HyperStack.mem",
"FStar.HyperStack.ST.get"
] | [] | module Hacl.K256.Scalar
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module S = Spec.K256
module KL = Hacl.Spec.K256.Scalar.Lemmas
module SG = Hacl.Spec.K256.GLV
module SGL = Hacl.Spec.K256.GLV.Lemmas
module BD = Hacl.Bignum.Definitions
module BN = Hacl.Bignum
module BB = Hacl.Bignum.Base
module SN = Hacl.Spec.Bignum
module SD = Hacl.Spec.Bignum.Definitions
include Hacl.Spec.K256.Scalar
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
[@CInline]
let bn_add : BN.bn_add_st U64 = BN.bn_add
//inline_for_extraction noextract
//let kn = BN.mk_runtime_bn U64 qnlimb
let add4: BN.bn_add_eq_len_st U64 qnlimb =
BN.bn_add_eq_len qnlimb
let sub4: BN.bn_sub_eq_len_st U64 qnlimb =
BN.bn_sub_eq_len qnlimb
let add_mod4: BN.bn_add_mod_n_st U64 qnlimb =
BN.bn_add_mod_n qnlimb
let sub_mod4: BN.bn_sub_mod_n_st U64 qnlimb =
BN.bn_sub_mod_n qnlimb
let mul4 (a:BD.lbignum U64 qnlimb) : BN.bn_karatsuba_mul_st U64 qnlimb a =
BN.bn_mul qnlimb qnlimb a
let sqr4 (a:BD.lbignum U64 qnlimb) : BN.bn_karatsuba_sqr_st U64 qnlimb a =
BN.bn_sqr qnlimb a
inline_for_extraction noextract
instance kn: BN.bn U64 = {
BN.len = qnlimb;
BN.add = add4;
BN.sub = sub4;
BN.add_mod_n = add_mod4;
BN.sub_mod_n = sub_mod4;
BN.mul = mul4;
BN.sqr = sqr4
}
let make_u64_4 out (f0, f1, f2, f3) =
out.(0ul) <- f0;
out.(1ul) <- f1;
out.(2ul) <- f2;
out.(3ul) <- f3;
let h = ST.get () in
KL.qas_nat4_is_qas_nat (as_seq h out);
assert (Seq.equal (as_seq h out) (LSeq.create4 f0 f1 f2 f3))
let make_order_k256 () =
[@inline_let]
let r =
(u64 0xbfd25e8cd0364141,
u64 0xbaaedce6af48a03b,
u64 0xfffffffffffffffe,
u64 0xffffffffffffffff) in
assert_norm (qas_nat4 r = S.q);
r
let create_qelem () =
SD.bn_eval_zeroes #U64 (v qnlimb) (v qnlimb);
create qnlimb (u64 0)
let create_one () =
[@inline_let]
let l = [u64 0x1; u64 0x0; u64 0x0; u64 0x0] in
assert_norm (FStar.List.Tot.length l = 4);
Seq.elim_of_list l;
LSeq.eq_intro (LSeq.create4 (u64 0x1) (u64 0x0) (u64 0x0) (u64 0x0)) (Seq.seq_of_list l);
KL.qas_nat4_is_qas_nat (LSeq.create4 (u64 0x1) (u64 0x0) (u64 0x0) (u64 0x0));
createL l
[@CInline]
let is_qelem_zero f =
let h0 = ST.get () in
SN.bn_is_zero_mask_lemma (as_seq h0 f);
BN.bn_is_zero_mask qnlimb f
[@CInline]
let is_qelem_zero_vartime f =
let h = ST.get () in
KL.qas_nat4_is_qas_nat (as_seq h f);
let (f0,f1,f2,f3) = (f.(0ul), f.(1ul), f.(2ul), f.(3ul)) in
KL.is_qelem_zero_vartime4_lemma (f0,f1,f2,f3);
is_qelem_zero_vartime4 (f0,f1,f2,f3)
[@CInline]
let is_qelem_eq_vartime f1 f2 =
let h = ST.get () in
KL.qas_nat4_is_qas_nat (as_seq h f1);
KL.qas_nat4_is_qas_nat (as_seq h f2);
let (a0,a1,a2,a3) = (f1.(0ul), f1.(1ul), f1.(2ul), f1.(3ul)) in
let (b0,b1,b2,b3) = (f2.(0ul), f2.(1ul), f2.(2ul), f2.(3ul)) in
KL.is_qelem_eq_vartime4_lemma (a0,a1,a2,a3) (b0,b1,b2,b3);
is_qelem_eq_vartime4 (a0,a1,a2,a3) (b0,b1,b2,b3)
let load_qelem f b =
let h0 = ST.get () in
Hacl.Spec.Bignum.Convert.bn_from_bytes_be_lemma #U64 32 (as_seq h0 b);
Hacl.Bignum.Convert.mk_bn_from_bytes_be true 32ul b f
[@CInline]
let load_qelem_check f b =
push_frame ();
let n = create_qelem () in
make_u64_4 n (make_order_k256 ());
load_qelem f b;
let h0 = ST.get () in
let is_zero = is_qelem_zero f in
assert (v is_zero == (if qas_nat h0 f = 0 then ones_v U64 else 0));
let is_lt_q = BN.bn_lt_mask qnlimb f n in
SN.bn_lt_mask_lemma (as_seq h0 f) (as_seq h0 n);
assert (v is_lt_q == (if qas_nat h0 f < S.q then ones_v U64 else 0));
let m = logand (lognot is_zero) is_lt_q in
lognot_lemma is_zero;
logand_lemma (lognot is_zero) is_lt_q;
pop_frame ();
m
let load_qelem_conditional res b =
push_frame ();
let is_b_valid = load_qelem_check res b in
let oneq = create_one () in
let h0 = ST.get () in
Lib.ByteBuffer.buf_mask_select res oneq is_b_valid res;
let h1 = ST.get () in
assert (as_seq h1 res == (if (v is_b_valid = 0) then as_seq h0 oneq else as_seq h0 res));
pop_frame ();
is_b_valid
[@CInline]
let load_qelem_vartime f b =
load_qelem f b;
let h = ST.get () in
KL.qas_nat4_is_qas_nat (as_seq h f);
let is_zero = is_qelem_zero_vartime f in
let (a0,a1,a2,a3) = (f.(0ul), f.(1ul), f.(2ul), f.(3ul)) in
let is_lt_q_b = is_qelem_lt_q_vartime4 (a0,a1,a2,a3) in
KL.is_qelem_lt_q_vartime4_lemma (a0,a1,a2,a3);
not is_zero && is_lt_q_b
val modq_short: out:qelem -> a:qelem -> Stack unit
(requires fun h ->
live h a /\ live h out /\ disjoint a out)
(ensures fun h0 _ h1 -> modifies (loc out) h0 h1 /\
qas_nat h1 out == qas_nat h0 a % S.q)
[@CInline]
let modq_short out a =
push_frame ();
let tmp = create_qelem () in
[@inline_let]
let (t0,t1,t2,t3) = make_pow2_256_minus_order_k256 () in
make_u64_4 tmp (t0,t1,t2,t3);
let h0 = ST.get () in
let c = kn.BN.add a tmp out in
let mask = u64 0 -. c in
map2T qnlimb out (BB.mask_select mask) out a;
KL.mod_short_lseq_lemma (as_seq h0 a);
pop_frame ()
[@CInline]
let load_qelem_modq f b =
push_frame ();
let tmp = create_qelem () in
load_qelem f b;
copy tmp f;
modq_short f tmp;
pop_frame ()
[@CInline]
let store_qelem b f =
let h0 = ST.get () in
Hacl.Spec.Bignum.Convert.bn_to_bytes_be_lemma #U64 32 (as_seq h0 f);
Hacl.Bignum.Convert.mk_bn_to_bytes_be true 32ul f b
[@CInline]
let qadd out f1 f2 =
push_frame ();
let n = create_qelem () in
make_u64_4 n (make_order_k256 ());
let h0 = ST.get () in
kn.BN.add_mod_n n f1 f2 out;
SN.bn_add_mod_n_lemma (as_seq h0 n) (as_seq h0 f1) (as_seq h0 f2);
pop_frame ()
val mul_pow2_256_minus_q_add:
len:size_t
-> resLen:size_t{2 + v len <= v resLen /\ 4 <= v resLen}
-> t01:lbuffer uint64 2ul
-> a:lbuffer uint64 len
-> e:lbuffer uint64 4ul
-> res:lbuffer uint64 resLen ->
Stack (BB.carry U64)
(requires fun h ->
live h a /\ live h res /\ live h t01 /\ live h e /\
disjoint a res /\ disjoint a t01 /\ disjoint a e /\
disjoint res t01 /\ disjoint res e /\ disjoint t01 e /\
as_seq h t01 == LSeq.create2 (u64 0x402da1732fc9bebf) (u64 0x4551231950b75fc4) /\
as_seq h res == LSeq.create (v resLen) (u64 0))
(ensures fun h0 c h1 -> modifies (loc res) h0 h1 /\
(c, as_seq h1 res) ==
mul_pow2_256_minus_q_lseq_add (v len) (v resLen) (as_seq h0 a) (as_seq h0 e))
[@CInline]
let mul_pow2_256_minus_q_add len resLen t01 a e res =
push_frame ();
let tmp = create (len +! 2ul) (u64 0) in
BN.bn_mul len 2ul a t01 tmp;
update_sub res 2ul len a;
let _ = bn_add resLen res (len +! 2ul) tmp res in
let c = bn_add resLen res 4ul e res in
pop_frame ();
c
inline_for_extraction noextract
val modq_before_final:
t01:lbuffer uint64 2ul
-> a:lbuffer uint64 (2ul *! qnlimb)
-> out:qelem ->
Stack (BB.carry U64)
(requires fun h ->
live h a /\ live h out /\ live h t01 /\
disjoint a out /\ disjoint a t01 /\ disjoint out t01 /\
as_seq h t01 == LSeq.create2 (u64 0x402da1732fc9bebf) (u64 0x4551231950b75fc4) /\
as_seq h out == LSeq.create 4 (u64 0))
(ensures fun h0 c h1 -> modifies (loc out) h0 h1 /\
(c, as_seq h1 out) == mod_lseq_before_final (as_seq h0 a))
let modq_before_final t01 a out =
push_frame ();
let m = create 7ul (u64 0) in
let p = create 5ul (u64 0) in
let c0 = mul_pow2_256_minus_q_add 4ul 7ul t01 (sub a 4ul 4ul) (sub a 0ul 4ul) m in
let c1 = mul_pow2_256_minus_q_add 3ul 5ul t01 (sub m 4ul 3ul) (sub m 0ul 4ul) p in
let c2 = mul_pow2_256_minus_q_add 1ul 4ul t01 (sub p 4ul 1ul) (sub p 0ul 4ul) out in
pop_frame ();
c2
val modq: out:qelem -> a:lbuffer uint64 (2ul *! qnlimb) -> Stack unit
(requires fun h ->
live h a /\ live h out /\ disjoint a out)
(ensures fun h0 _ h1 -> modifies (loc out) h0 h1 /\
qas_nat h1 out == BD.bn_v h0 a % S.q)
[@CInline]
let modq out a =
push_frame ();
let r = create_qelem () in
let tmp = create_qelem () in
[@inline_let]
let (t0,t1,t2,t3) = make_pow2_256_minus_order_k256 () in
make_u64_4 tmp (t0,t1,t2,t3);
let t01 = sub tmp 0ul 2ul in
let h0 = ST.get () in
assert (Seq.equal (as_seq h0 t01) (LSeq.create2 t0 t1));
let c0 = modq_before_final t01 a r in
let c1 = kn.BN.add r tmp out in
let mask = u64 0 -. (c0 +. c1) in
map2T qnlimb out (BB.mask_select mask) out r;
let h1 = ST.get () in
KL.mod_lseq_lemma (as_seq h0 a);
pop_frame ()
[@CInline]
let qmul out f1 f2 =
push_frame ();
let h0 = ST.get () in
let tmp = create (2ul *! qnlimb) (u64 0) in
kn.BN.mul f1 f2 tmp;
SN.bn_mul_lemma (as_seq h0 f1) (as_seq h0 f2);
modq out tmp;
pop_frame ()
[@CInline]
let qsqr out f =
push_frame ();
let h0 = ST.get () in
let tmp = create (2ul *! qnlimb) (u64 0) in
kn.BN.sqr f tmp;
SN.bn_sqr_lemma (as_seq h0 f);
modq out tmp;
pop_frame ()
[@CInline]
let qnegate_conditional_vartime f is_negate =
push_frame ();
let n = create_qelem () in
make_u64_4 n (make_order_k256 ());
let zero = create_qelem () in
if is_negate then begin
let h0 = ST.get () in
kn.BN.sub_mod_n n zero f f;
SN.bn_sub_mod_n_lemma (as_seq h0 n) (as_seq h0 zero) (as_seq h0 f);
let h1 = ST.get () in
assert (qas_nat h1 f = (0 - qas_nat h0 f) % S.q);
Math.Lemmas.modulo_addition_lemma (- qas_nat h0 f) S.q 1;
assert (qas_nat h1 f == (S.q - qas_nat h0 f) % S.q) end;
pop_frame ()
[@CInline]
let is_qelem_le_q_halved_vartime f =
let h = ST.get () in
KL.qas_nat4_is_qas_nat (as_seq h f);
let (a0,a1,a2,a3) = (f.(0ul), f.(1ul), f.(2ul), f.(3ul)) in
KL.is_qelem_le_q_halved_vartime4_lemma (a0,a1,a2,a3);
is_qelem_le_q_halved_vartime4 (a0,a1,a2,a3) | false | false | Hacl.K256.Scalar.fst | {
"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_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 50,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val is_qelem_lt_pow2_128_vartime: f:qelem -> Stack bool
(requires fun h -> live h f)
(ensures fun h0 b h1 -> modifies0 h0 h1 /\
b == (qas_nat h0 f < pow2 128)) | [] | Hacl.K256.Scalar.is_qelem_lt_pow2_128_vartime | {
"file_name": "code/k256/Hacl.K256.Scalar.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | f: Hacl.K256.Scalar.qelem -> FStar.HyperStack.ST.Stack Prims.bool | {
"end_col": 52,
"end_line": 379,
"start_col": 2,
"start_line": 371
} |
FStar.HyperStack.ST.Stack | val load_qelem: f:qelem -> b:lbuffer uint8 32ul -> Stack unit
(requires fun h ->
live h f /\ live h b /\ disjoint f b)
(ensures fun h0 _ h1 -> modifies (loc f) h0 h1 /\
qas_nat h1 f == BSeq.nat_from_bytes_be (as_seq h0 b)) | [
{
"abbrev": false,
"full_module": "Hacl.Spec.K256.Scalar",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Definitions",
"short_module": "SD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum",
"short_module": "SN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Base",
"short_module": "BB"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Definitions",
"short_module": "BD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.GLV.Lemmas",
"short_module": "SGL"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.GLV",
"short_module": "SG"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Scalar.Lemmas",
"short_module": "KL"
},
{
"abbrev": true,
"full_module": "Spec.K256",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Lib.ByteBuffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Buffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Definitions",
"short_module": "BD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.GLV",
"short_module": "SG"
},
{
"abbrev": true,
"full_module": "Spec.K256",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Lib.ByteSequence",
"short_module": "BSeq"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Lib.Buffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.K256",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.K256",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let load_qelem f b =
let h0 = ST.get () in
Hacl.Spec.Bignum.Convert.bn_from_bytes_be_lemma #U64 32 (as_seq h0 b);
Hacl.Bignum.Convert.mk_bn_from_bytes_be true 32ul b f | val load_qelem: f:qelem -> b:lbuffer uint8 32ul -> Stack unit
(requires fun h ->
live h f /\ live h b /\ disjoint f b)
(ensures fun h0 _ h1 -> modifies (loc f) h0 h1 /\
qas_nat h1 f == BSeq.nat_from_bytes_be (as_seq h0 b))
let load_qelem f b = | true | null | false | let h0 = ST.get () in
Hacl.Spec.Bignum.Convert.bn_from_bytes_be_lemma #U64 32 (as_seq h0 b);
Hacl.Bignum.Convert.mk_bn_from_bytes_be true 32ul b f | {
"checked_file": "Hacl.K256.Scalar.fst.checked",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteBuffer.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.K256.Scalar.Lemmas.fst.checked",
"Hacl.Spec.K256.Scalar.fst.checked",
"Hacl.Spec.K256.GLV.Lemmas.fst.checked",
"Hacl.Spec.K256.GLV.fst.checked",
"Hacl.Spec.Bignum.Definitions.fst.checked",
"Hacl.Spec.Bignum.Convert.fst.checked",
"Hacl.Spec.Bignum.fsti.checked",
"Hacl.Bignum.Definitions.fst.checked",
"Hacl.Bignum.Convert.fst.checked",
"Hacl.Bignum.Base.fst.checked",
"Hacl.Bignum.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Tactics.Typeclasses.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.List.Tot.fst.checked",
"FStar.HyperStack.ST.fsti.checked",
"FStar.HyperStack.fst.checked",
"FStar.Ghost.fsti.checked"
],
"interface_file": true,
"source_file": "Hacl.K256.Scalar.fst"
} | [] | [
"Hacl.K256.Scalar.qelem",
"Lib.Buffer.lbuffer",
"Lib.IntTypes.uint8",
"FStar.UInt32.__uint_to_t",
"Hacl.Bignum.Convert.mk_bn_from_bytes_be",
"Lib.IntTypes.U64",
"Prims.unit",
"Hacl.Spec.Bignum.Convert.bn_from_bytes_be_lemma",
"Lib.Buffer.as_seq",
"Lib.Buffer.MUT",
"FStar.Monotonic.HyperStack.mem",
"FStar.HyperStack.ST.get"
] | [] | module Hacl.K256.Scalar
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module S = Spec.K256
module KL = Hacl.Spec.K256.Scalar.Lemmas
module SG = Hacl.Spec.K256.GLV
module SGL = Hacl.Spec.K256.GLV.Lemmas
module BD = Hacl.Bignum.Definitions
module BN = Hacl.Bignum
module BB = Hacl.Bignum.Base
module SN = Hacl.Spec.Bignum
module SD = Hacl.Spec.Bignum.Definitions
include Hacl.Spec.K256.Scalar
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
[@CInline]
let bn_add : BN.bn_add_st U64 = BN.bn_add
//inline_for_extraction noextract
//let kn = BN.mk_runtime_bn U64 qnlimb
let add4: BN.bn_add_eq_len_st U64 qnlimb =
BN.bn_add_eq_len qnlimb
let sub4: BN.bn_sub_eq_len_st U64 qnlimb =
BN.bn_sub_eq_len qnlimb
let add_mod4: BN.bn_add_mod_n_st U64 qnlimb =
BN.bn_add_mod_n qnlimb
let sub_mod4: BN.bn_sub_mod_n_st U64 qnlimb =
BN.bn_sub_mod_n qnlimb
let mul4 (a:BD.lbignum U64 qnlimb) : BN.bn_karatsuba_mul_st U64 qnlimb a =
BN.bn_mul qnlimb qnlimb a
let sqr4 (a:BD.lbignum U64 qnlimb) : BN.bn_karatsuba_sqr_st U64 qnlimb a =
BN.bn_sqr qnlimb a
inline_for_extraction noextract
instance kn: BN.bn U64 = {
BN.len = qnlimb;
BN.add = add4;
BN.sub = sub4;
BN.add_mod_n = add_mod4;
BN.sub_mod_n = sub_mod4;
BN.mul = mul4;
BN.sqr = sqr4
}
let make_u64_4 out (f0, f1, f2, f3) =
out.(0ul) <- f0;
out.(1ul) <- f1;
out.(2ul) <- f2;
out.(3ul) <- f3;
let h = ST.get () in
KL.qas_nat4_is_qas_nat (as_seq h out);
assert (Seq.equal (as_seq h out) (LSeq.create4 f0 f1 f2 f3))
let make_order_k256 () =
[@inline_let]
let r =
(u64 0xbfd25e8cd0364141,
u64 0xbaaedce6af48a03b,
u64 0xfffffffffffffffe,
u64 0xffffffffffffffff) in
assert_norm (qas_nat4 r = S.q);
r
let create_qelem () =
SD.bn_eval_zeroes #U64 (v qnlimb) (v qnlimb);
create qnlimb (u64 0)
let create_one () =
[@inline_let]
let l = [u64 0x1; u64 0x0; u64 0x0; u64 0x0] in
assert_norm (FStar.List.Tot.length l = 4);
Seq.elim_of_list l;
LSeq.eq_intro (LSeq.create4 (u64 0x1) (u64 0x0) (u64 0x0) (u64 0x0)) (Seq.seq_of_list l);
KL.qas_nat4_is_qas_nat (LSeq.create4 (u64 0x1) (u64 0x0) (u64 0x0) (u64 0x0));
createL l
[@CInline]
let is_qelem_zero f =
let h0 = ST.get () in
SN.bn_is_zero_mask_lemma (as_seq h0 f);
BN.bn_is_zero_mask qnlimb f
[@CInline]
let is_qelem_zero_vartime f =
let h = ST.get () in
KL.qas_nat4_is_qas_nat (as_seq h f);
let (f0,f1,f2,f3) = (f.(0ul), f.(1ul), f.(2ul), f.(3ul)) in
KL.is_qelem_zero_vartime4_lemma (f0,f1,f2,f3);
is_qelem_zero_vartime4 (f0,f1,f2,f3)
[@CInline]
let is_qelem_eq_vartime f1 f2 =
let h = ST.get () in
KL.qas_nat4_is_qas_nat (as_seq h f1);
KL.qas_nat4_is_qas_nat (as_seq h f2);
let (a0,a1,a2,a3) = (f1.(0ul), f1.(1ul), f1.(2ul), f1.(3ul)) in
let (b0,b1,b2,b3) = (f2.(0ul), f2.(1ul), f2.(2ul), f2.(3ul)) in
KL.is_qelem_eq_vartime4_lemma (a0,a1,a2,a3) (b0,b1,b2,b3);
is_qelem_eq_vartime4 (a0,a1,a2,a3) (b0,b1,b2,b3) | false | false | Hacl.K256.Scalar.fst | {
"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_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 50,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val load_qelem: f:qelem -> b:lbuffer uint8 32ul -> Stack unit
(requires fun h ->
live h f /\ live h b /\ disjoint f b)
(ensures fun h0 _ h1 -> modifies (loc f) h0 h1 /\
qas_nat h1 f == BSeq.nat_from_bytes_be (as_seq h0 b)) | [] | Hacl.K256.Scalar.load_qelem | {
"file_name": "code/k256/Hacl.K256.Scalar.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | f: Hacl.K256.Scalar.qelem -> b: Lib.Buffer.lbuffer Lib.IntTypes.uint8 32ul
-> FStar.HyperStack.ST.Stack Prims.unit | {
"end_col": 55,
"end_line": 135,
"start_col": 20,
"start_line": 132
} |
Prims.Tot | val add_mod4:BN.bn_add_mod_n_st U64 qnlimb | [
{
"abbrev": false,
"full_module": "Hacl.Spec.K256.Scalar",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Definitions",
"short_module": "SD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum",
"short_module": "SN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Base",
"short_module": "BB"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Definitions",
"short_module": "BD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.GLV.Lemmas",
"short_module": "SGL"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.GLV",
"short_module": "SG"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Scalar.Lemmas",
"short_module": "KL"
},
{
"abbrev": true,
"full_module": "Spec.K256",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Lib.ByteBuffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Buffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Definitions",
"short_module": "BD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.GLV",
"short_module": "SG"
},
{
"abbrev": true,
"full_module": "Spec.K256",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Lib.ByteSequence",
"short_module": "BSeq"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Lib.Buffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.K256",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.K256",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let add_mod4: BN.bn_add_mod_n_st U64 qnlimb =
BN.bn_add_mod_n qnlimb | val add_mod4:BN.bn_add_mod_n_st U64 qnlimb
let add_mod4:BN.bn_add_mod_n_st U64 qnlimb = | false | null | false | BN.bn_add_mod_n qnlimb | {
"checked_file": "Hacl.K256.Scalar.fst.checked",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteBuffer.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.K256.Scalar.Lemmas.fst.checked",
"Hacl.Spec.K256.Scalar.fst.checked",
"Hacl.Spec.K256.GLV.Lemmas.fst.checked",
"Hacl.Spec.K256.GLV.fst.checked",
"Hacl.Spec.Bignum.Definitions.fst.checked",
"Hacl.Spec.Bignum.Convert.fst.checked",
"Hacl.Spec.Bignum.fsti.checked",
"Hacl.Bignum.Definitions.fst.checked",
"Hacl.Bignum.Convert.fst.checked",
"Hacl.Bignum.Base.fst.checked",
"Hacl.Bignum.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Tactics.Typeclasses.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.List.Tot.fst.checked",
"FStar.HyperStack.ST.fsti.checked",
"FStar.HyperStack.fst.checked",
"FStar.Ghost.fsti.checked"
],
"interface_file": true,
"source_file": "Hacl.K256.Scalar.fst"
} | [
"total"
] | [
"Hacl.Bignum.bn_add_mod_n",
"Lib.IntTypes.U64",
"Hacl.K256.Scalar.qnlimb"
] | [] | module Hacl.K256.Scalar
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module S = Spec.K256
module KL = Hacl.Spec.K256.Scalar.Lemmas
module SG = Hacl.Spec.K256.GLV
module SGL = Hacl.Spec.K256.GLV.Lemmas
module BD = Hacl.Bignum.Definitions
module BN = Hacl.Bignum
module BB = Hacl.Bignum.Base
module SN = Hacl.Spec.Bignum
module SD = Hacl.Spec.Bignum.Definitions
include Hacl.Spec.K256.Scalar
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
[@CInline]
let bn_add : BN.bn_add_st U64 = BN.bn_add
//inline_for_extraction noextract
//let kn = BN.mk_runtime_bn U64 qnlimb
let add4: BN.bn_add_eq_len_st U64 qnlimb =
BN.bn_add_eq_len qnlimb
let sub4: BN.bn_sub_eq_len_st U64 qnlimb =
BN.bn_sub_eq_len qnlimb | false | true | Hacl.K256.Scalar.fst | {
"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_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 50,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val add_mod4:BN.bn_add_mod_n_st U64 qnlimb | [] | Hacl.K256.Scalar.add_mod4 | {
"file_name": "code/k256/Hacl.K256.Scalar.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | Hacl.Bignum.bn_add_mod_n_st Lib.IntTypes.U64 Hacl.K256.Scalar.qnlimb | {
"end_col": 24,
"end_line": 43,
"start_col": 2,
"start_line": 43
} |
Prims.Tot | val sqr4 (a: BD.lbignum U64 qnlimb) : BN.bn_karatsuba_sqr_st U64 qnlimb a | [
{
"abbrev": false,
"full_module": "Hacl.Spec.K256.Scalar",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Definitions",
"short_module": "SD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum",
"short_module": "SN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Base",
"short_module": "BB"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Definitions",
"short_module": "BD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.GLV.Lemmas",
"short_module": "SGL"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.GLV",
"short_module": "SG"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Scalar.Lemmas",
"short_module": "KL"
},
{
"abbrev": true,
"full_module": "Spec.K256",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Lib.ByteBuffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Buffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Definitions",
"short_module": "BD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.GLV",
"short_module": "SG"
},
{
"abbrev": true,
"full_module": "Spec.K256",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Lib.ByteSequence",
"short_module": "BSeq"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Lib.Buffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.K256",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.K256",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let sqr4 (a:BD.lbignum U64 qnlimb) : BN.bn_karatsuba_sqr_st U64 qnlimb a =
BN.bn_sqr qnlimb a | val sqr4 (a: BD.lbignum U64 qnlimb) : BN.bn_karatsuba_sqr_st U64 qnlimb a
let sqr4 (a: BD.lbignum U64 qnlimb) : BN.bn_karatsuba_sqr_st U64 qnlimb a = | false | null | false | BN.bn_sqr qnlimb a | {
"checked_file": "Hacl.K256.Scalar.fst.checked",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteBuffer.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.K256.Scalar.Lemmas.fst.checked",
"Hacl.Spec.K256.Scalar.fst.checked",
"Hacl.Spec.K256.GLV.Lemmas.fst.checked",
"Hacl.Spec.K256.GLV.fst.checked",
"Hacl.Spec.Bignum.Definitions.fst.checked",
"Hacl.Spec.Bignum.Convert.fst.checked",
"Hacl.Spec.Bignum.fsti.checked",
"Hacl.Bignum.Definitions.fst.checked",
"Hacl.Bignum.Convert.fst.checked",
"Hacl.Bignum.Base.fst.checked",
"Hacl.Bignum.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Tactics.Typeclasses.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.List.Tot.fst.checked",
"FStar.HyperStack.ST.fsti.checked",
"FStar.HyperStack.fst.checked",
"FStar.Ghost.fsti.checked"
],
"interface_file": true,
"source_file": "Hacl.K256.Scalar.fst"
} | [
"total"
] | [
"Hacl.Bignum.Definitions.lbignum",
"Lib.IntTypes.U64",
"Hacl.K256.Scalar.qnlimb",
"Hacl.Bignum.bn_sqr",
"Hacl.Bignum.bn_karatsuba_sqr_st"
] | [] | module Hacl.K256.Scalar
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module S = Spec.K256
module KL = Hacl.Spec.K256.Scalar.Lemmas
module SG = Hacl.Spec.K256.GLV
module SGL = Hacl.Spec.K256.GLV.Lemmas
module BD = Hacl.Bignum.Definitions
module BN = Hacl.Bignum
module BB = Hacl.Bignum.Base
module SN = Hacl.Spec.Bignum
module SD = Hacl.Spec.Bignum.Definitions
include Hacl.Spec.K256.Scalar
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
[@CInline]
let bn_add : BN.bn_add_st U64 = BN.bn_add
//inline_for_extraction noextract
//let kn = BN.mk_runtime_bn U64 qnlimb
let add4: BN.bn_add_eq_len_st U64 qnlimb =
BN.bn_add_eq_len qnlimb
let sub4: BN.bn_sub_eq_len_st U64 qnlimb =
BN.bn_sub_eq_len qnlimb
let add_mod4: BN.bn_add_mod_n_st U64 qnlimb =
BN.bn_add_mod_n qnlimb
let sub_mod4: BN.bn_sub_mod_n_st U64 qnlimb =
BN.bn_sub_mod_n qnlimb
let mul4 (a:BD.lbignum U64 qnlimb) : BN.bn_karatsuba_mul_st U64 qnlimb a =
BN.bn_mul qnlimb qnlimb a | false | false | Hacl.K256.Scalar.fst | {
"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_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 50,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val sqr4 (a: BD.lbignum U64 qnlimb) : BN.bn_karatsuba_sqr_st U64 qnlimb a | [] | Hacl.K256.Scalar.sqr4 | {
"file_name": "code/k256/Hacl.K256.Scalar.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | a: Hacl.Bignum.Definitions.lbignum Lib.IntTypes.U64 Hacl.K256.Scalar.qnlimb
-> Hacl.Bignum.bn_karatsuba_sqr_st Lib.IntTypes.U64 Hacl.K256.Scalar.qnlimb a | {
"end_col": 20,
"end_line": 52,
"start_col": 2,
"start_line": 52
} |
Prims.Tot | val mul4 (a: BD.lbignum U64 qnlimb) : BN.bn_karatsuba_mul_st U64 qnlimb a | [
{
"abbrev": false,
"full_module": "Hacl.Spec.K256.Scalar",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Definitions",
"short_module": "SD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum",
"short_module": "SN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Base",
"short_module": "BB"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Definitions",
"short_module": "BD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.GLV.Lemmas",
"short_module": "SGL"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.GLV",
"short_module": "SG"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Scalar.Lemmas",
"short_module": "KL"
},
{
"abbrev": true,
"full_module": "Spec.K256",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Lib.ByteBuffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Buffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Definitions",
"short_module": "BD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.GLV",
"short_module": "SG"
},
{
"abbrev": true,
"full_module": "Spec.K256",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Lib.ByteSequence",
"short_module": "BSeq"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Lib.Buffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.K256",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.K256",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let mul4 (a:BD.lbignum U64 qnlimb) : BN.bn_karatsuba_mul_st U64 qnlimb a =
BN.bn_mul qnlimb qnlimb a | val mul4 (a: BD.lbignum U64 qnlimb) : BN.bn_karatsuba_mul_st U64 qnlimb a
let mul4 (a: BD.lbignum U64 qnlimb) : BN.bn_karatsuba_mul_st U64 qnlimb a = | false | null | false | BN.bn_mul qnlimb qnlimb a | {
"checked_file": "Hacl.K256.Scalar.fst.checked",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteBuffer.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.K256.Scalar.Lemmas.fst.checked",
"Hacl.Spec.K256.Scalar.fst.checked",
"Hacl.Spec.K256.GLV.Lemmas.fst.checked",
"Hacl.Spec.K256.GLV.fst.checked",
"Hacl.Spec.Bignum.Definitions.fst.checked",
"Hacl.Spec.Bignum.Convert.fst.checked",
"Hacl.Spec.Bignum.fsti.checked",
"Hacl.Bignum.Definitions.fst.checked",
"Hacl.Bignum.Convert.fst.checked",
"Hacl.Bignum.Base.fst.checked",
"Hacl.Bignum.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Tactics.Typeclasses.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.List.Tot.fst.checked",
"FStar.HyperStack.ST.fsti.checked",
"FStar.HyperStack.fst.checked",
"FStar.Ghost.fsti.checked"
],
"interface_file": true,
"source_file": "Hacl.K256.Scalar.fst"
} | [
"total"
] | [
"Hacl.Bignum.Definitions.lbignum",
"Lib.IntTypes.U64",
"Hacl.K256.Scalar.qnlimb",
"Hacl.Bignum.bn_mul",
"Hacl.Bignum.bn_karatsuba_mul_st"
] | [] | module Hacl.K256.Scalar
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module S = Spec.K256
module KL = Hacl.Spec.K256.Scalar.Lemmas
module SG = Hacl.Spec.K256.GLV
module SGL = Hacl.Spec.K256.GLV.Lemmas
module BD = Hacl.Bignum.Definitions
module BN = Hacl.Bignum
module BB = Hacl.Bignum.Base
module SN = Hacl.Spec.Bignum
module SD = Hacl.Spec.Bignum.Definitions
include Hacl.Spec.K256.Scalar
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
[@CInline]
let bn_add : BN.bn_add_st U64 = BN.bn_add
//inline_for_extraction noextract
//let kn = BN.mk_runtime_bn U64 qnlimb
let add4: BN.bn_add_eq_len_st U64 qnlimb =
BN.bn_add_eq_len qnlimb
let sub4: BN.bn_sub_eq_len_st U64 qnlimb =
BN.bn_sub_eq_len qnlimb
let add_mod4: BN.bn_add_mod_n_st U64 qnlimb =
BN.bn_add_mod_n qnlimb
let sub_mod4: BN.bn_sub_mod_n_st U64 qnlimb =
BN.bn_sub_mod_n qnlimb | false | false | Hacl.K256.Scalar.fst | {
"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_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 50,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val mul4 (a: BD.lbignum U64 qnlimb) : BN.bn_karatsuba_mul_st U64 qnlimb a | [] | Hacl.K256.Scalar.mul4 | {
"file_name": "code/k256/Hacl.K256.Scalar.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | a: Hacl.Bignum.Definitions.lbignum Lib.IntTypes.U64 Hacl.K256.Scalar.qnlimb
-> Hacl.Bignum.bn_karatsuba_mul_st Lib.IntTypes.U64 Hacl.K256.Scalar.qnlimb a | {
"end_col": 27,
"end_line": 49,
"start_col": 2,
"start_line": 49
} |
Prims.Tot | val sub_mod4:BN.bn_sub_mod_n_st U64 qnlimb | [
{
"abbrev": false,
"full_module": "Hacl.Spec.K256.Scalar",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Definitions",
"short_module": "SD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum",
"short_module": "SN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Base",
"short_module": "BB"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Definitions",
"short_module": "BD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.GLV.Lemmas",
"short_module": "SGL"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.GLV",
"short_module": "SG"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Scalar.Lemmas",
"short_module": "KL"
},
{
"abbrev": true,
"full_module": "Spec.K256",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Lib.ByteBuffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Buffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Definitions",
"short_module": "BD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.GLV",
"short_module": "SG"
},
{
"abbrev": true,
"full_module": "Spec.K256",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Lib.ByteSequence",
"short_module": "BSeq"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Lib.Buffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.K256",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.K256",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let sub_mod4: BN.bn_sub_mod_n_st U64 qnlimb =
BN.bn_sub_mod_n qnlimb | val sub_mod4:BN.bn_sub_mod_n_st U64 qnlimb
let sub_mod4:BN.bn_sub_mod_n_st U64 qnlimb = | false | null | false | BN.bn_sub_mod_n qnlimb | {
"checked_file": "Hacl.K256.Scalar.fst.checked",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteBuffer.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.K256.Scalar.Lemmas.fst.checked",
"Hacl.Spec.K256.Scalar.fst.checked",
"Hacl.Spec.K256.GLV.Lemmas.fst.checked",
"Hacl.Spec.K256.GLV.fst.checked",
"Hacl.Spec.Bignum.Definitions.fst.checked",
"Hacl.Spec.Bignum.Convert.fst.checked",
"Hacl.Spec.Bignum.fsti.checked",
"Hacl.Bignum.Definitions.fst.checked",
"Hacl.Bignum.Convert.fst.checked",
"Hacl.Bignum.Base.fst.checked",
"Hacl.Bignum.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Tactics.Typeclasses.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.List.Tot.fst.checked",
"FStar.HyperStack.ST.fsti.checked",
"FStar.HyperStack.fst.checked",
"FStar.Ghost.fsti.checked"
],
"interface_file": true,
"source_file": "Hacl.K256.Scalar.fst"
} | [
"total"
] | [
"Hacl.Bignum.bn_sub_mod_n",
"Lib.IntTypes.U64",
"Hacl.K256.Scalar.qnlimb"
] | [] | module Hacl.K256.Scalar
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module S = Spec.K256
module KL = Hacl.Spec.K256.Scalar.Lemmas
module SG = Hacl.Spec.K256.GLV
module SGL = Hacl.Spec.K256.GLV.Lemmas
module BD = Hacl.Bignum.Definitions
module BN = Hacl.Bignum
module BB = Hacl.Bignum.Base
module SN = Hacl.Spec.Bignum
module SD = Hacl.Spec.Bignum.Definitions
include Hacl.Spec.K256.Scalar
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
[@CInline]
let bn_add : BN.bn_add_st U64 = BN.bn_add
//inline_for_extraction noextract
//let kn = BN.mk_runtime_bn U64 qnlimb
let add4: BN.bn_add_eq_len_st U64 qnlimb =
BN.bn_add_eq_len qnlimb
let sub4: BN.bn_sub_eq_len_st U64 qnlimb =
BN.bn_sub_eq_len qnlimb
let add_mod4: BN.bn_add_mod_n_st U64 qnlimb =
BN.bn_add_mod_n qnlimb | false | true | Hacl.K256.Scalar.fst | {
"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_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 50,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val sub_mod4:BN.bn_sub_mod_n_st U64 qnlimb | [] | Hacl.K256.Scalar.sub_mod4 | {
"file_name": "code/k256/Hacl.K256.Scalar.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | Hacl.Bignum.bn_sub_mod_n_st Lib.IntTypes.U64 Hacl.K256.Scalar.qnlimb | {
"end_col": 24,
"end_line": 46,
"start_col": 2,
"start_line": 46
} |
FStar.HyperStack.ST.Stack | val is_qelem_eq_vartime (f1 f2:qelem) : Stack bool
(requires fun h ->
live h f1 /\ live h f2 /\ qe_lt_q h f1 /\ qe_lt_q h f2)
(ensures fun h0 m h1 -> modifies0 h0 h1 /\
m == (qas_nat h0 f1 = qas_nat h0 f2)) | [
{
"abbrev": false,
"full_module": "Hacl.Spec.K256.Scalar",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Definitions",
"short_module": "SD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum",
"short_module": "SN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Base",
"short_module": "BB"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Definitions",
"short_module": "BD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.GLV.Lemmas",
"short_module": "SGL"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.GLV",
"short_module": "SG"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Scalar.Lemmas",
"short_module": "KL"
},
{
"abbrev": true,
"full_module": "Spec.K256",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Lib.ByteBuffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Buffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Definitions",
"short_module": "BD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.GLV",
"short_module": "SG"
},
{
"abbrev": true,
"full_module": "Spec.K256",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Lib.ByteSequence",
"short_module": "BSeq"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Lib.Buffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.K256",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.K256",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let is_qelem_eq_vartime f1 f2 =
let h = ST.get () in
KL.qas_nat4_is_qas_nat (as_seq h f1);
KL.qas_nat4_is_qas_nat (as_seq h f2);
let (a0,a1,a2,a3) = (f1.(0ul), f1.(1ul), f1.(2ul), f1.(3ul)) in
let (b0,b1,b2,b3) = (f2.(0ul), f2.(1ul), f2.(2ul), f2.(3ul)) in
KL.is_qelem_eq_vartime4_lemma (a0,a1,a2,a3) (b0,b1,b2,b3);
is_qelem_eq_vartime4 (a0,a1,a2,a3) (b0,b1,b2,b3) | val is_qelem_eq_vartime (f1 f2:qelem) : Stack bool
(requires fun h ->
live h f1 /\ live h f2 /\ qe_lt_q h f1 /\ qe_lt_q h f2)
(ensures fun h0 m h1 -> modifies0 h0 h1 /\
m == (qas_nat h0 f1 = qas_nat h0 f2))
let is_qelem_eq_vartime f1 f2 = | true | null | false | let h = ST.get () in
KL.qas_nat4_is_qas_nat (as_seq h f1);
KL.qas_nat4_is_qas_nat (as_seq h f2);
let a0, a1, a2, a3 = (f1.(0ul), f1.(1ul), f1.(2ul), f1.(3ul)) in
let b0, b1, b2, b3 = (f2.(0ul), f2.(1ul), f2.(2ul), f2.(3ul)) in
KL.is_qelem_eq_vartime4_lemma (a0, a1, a2, a3) (b0, b1, b2, b3);
is_qelem_eq_vartime4 (a0, a1, a2, a3) (b0, b1, b2, b3) | {
"checked_file": "Hacl.K256.Scalar.fst.checked",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteBuffer.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.K256.Scalar.Lemmas.fst.checked",
"Hacl.Spec.K256.Scalar.fst.checked",
"Hacl.Spec.K256.GLV.Lemmas.fst.checked",
"Hacl.Spec.K256.GLV.fst.checked",
"Hacl.Spec.Bignum.Definitions.fst.checked",
"Hacl.Spec.Bignum.Convert.fst.checked",
"Hacl.Spec.Bignum.fsti.checked",
"Hacl.Bignum.Definitions.fst.checked",
"Hacl.Bignum.Convert.fst.checked",
"Hacl.Bignum.Base.fst.checked",
"Hacl.Bignum.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Tactics.Typeclasses.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.List.Tot.fst.checked",
"FStar.HyperStack.ST.fsti.checked",
"FStar.HyperStack.fst.checked",
"FStar.Ghost.fsti.checked"
],
"interface_file": true,
"source_file": "Hacl.K256.Scalar.fst"
} | [] | [
"Hacl.K256.Scalar.qelem",
"Lib.IntTypes.uint64",
"Hacl.Spec.K256.Scalar.is_qelem_eq_vartime4",
"FStar.Pervasives.Native.Mktuple4",
"Prims.unit",
"Hacl.Spec.K256.Scalar.Lemmas.is_qelem_eq_vartime4_lemma",
"Prims.bool",
"FStar.Pervasives.Native.tuple4",
"Lib.IntTypes.int_t",
"Lib.IntTypes.U64",
"Lib.IntTypes.SEC",
"Lib.Buffer.op_Array_Access",
"Lib.Buffer.MUT",
"Hacl.K256.Scalar.qnlimb",
"FStar.UInt32.__uint_to_t",
"Hacl.Spec.K256.Scalar.Lemmas.qas_nat4_is_qas_nat",
"Lib.Buffer.as_seq",
"FStar.Monotonic.HyperStack.mem",
"FStar.HyperStack.ST.get"
] | [] | module Hacl.K256.Scalar
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module S = Spec.K256
module KL = Hacl.Spec.K256.Scalar.Lemmas
module SG = Hacl.Spec.K256.GLV
module SGL = Hacl.Spec.K256.GLV.Lemmas
module BD = Hacl.Bignum.Definitions
module BN = Hacl.Bignum
module BB = Hacl.Bignum.Base
module SN = Hacl.Spec.Bignum
module SD = Hacl.Spec.Bignum.Definitions
include Hacl.Spec.K256.Scalar
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
[@CInline]
let bn_add : BN.bn_add_st U64 = BN.bn_add
//inline_for_extraction noextract
//let kn = BN.mk_runtime_bn U64 qnlimb
let add4: BN.bn_add_eq_len_st U64 qnlimb =
BN.bn_add_eq_len qnlimb
let sub4: BN.bn_sub_eq_len_st U64 qnlimb =
BN.bn_sub_eq_len qnlimb
let add_mod4: BN.bn_add_mod_n_st U64 qnlimb =
BN.bn_add_mod_n qnlimb
let sub_mod4: BN.bn_sub_mod_n_st U64 qnlimb =
BN.bn_sub_mod_n qnlimb
let mul4 (a:BD.lbignum U64 qnlimb) : BN.bn_karatsuba_mul_st U64 qnlimb a =
BN.bn_mul qnlimb qnlimb a
let sqr4 (a:BD.lbignum U64 qnlimb) : BN.bn_karatsuba_sqr_st U64 qnlimb a =
BN.bn_sqr qnlimb a
inline_for_extraction noextract
instance kn: BN.bn U64 = {
BN.len = qnlimb;
BN.add = add4;
BN.sub = sub4;
BN.add_mod_n = add_mod4;
BN.sub_mod_n = sub_mod4;
BN.mul = mul4;
BN.sqr = sqr4
}
let make_u64_4 out (f0, f1, f2, f3) =
out.(0ul) <- f0;
out.(1ul) <- f1;
out.(2ul) <- f2;
out.(3ul) <- f3;
let h = ST.get () in
KL.qas_nat4_is_qas_nat (as_seq h out);
assert (Seq.equal (as_seq h out) (LSeq.create4 f0 f1 f2 f3))
let make_order_k256 () =
[@inline_let]
let r =
(u64 0xbfd25e8cd0364141,
u64 0xbaaedce6af48a03b,
u64 0xfffffffffffffffe,
u64 0xffffffffffffffff) in
assert_norm (qas_nat4 r = S.q);
r
let create_qelem () =
SD.bn_eval_zeroes #U64 (v qnlimb) (v qnlimb);
create qnlimb (u64 0)
let create_one () =
[@inline_let]
let l = [u64 0x1; u64 0x0; u64 0x0; u64 0x0] in
assert_norm (FStar.List.Tot.length l = 4);
Seq.elim_of_list l;
LSeq.eq_intro (LSeq.create4 (u64 0x1) (u64 0x0) (u64 0x0) (u64 0x0)) (Seq.seq_of_list l);
KL.qas_nat4_is_qas_nat (LSeq.create4 (u64 0x1) (u64 0x0) (u64 0x0) (u64 0x0));
createL l
[@CInline]
let is_qelem_zero f =
let h0 = ST.get () in
SN.bn_is_zero_mask_lemma (as_seq h0 f);
BN.bn_is_zero_mask qnlimb f
[@CInline]
let is_qelem_zero_vartime f =
let h = ST.get () in
KL.qas_nat4_is_qas_nat (as_seq h f);
let (f0,f1,f2,f3) = (f.(0ul), f.(1ul), f.(2ul), f.(3ul)) in
KL.is_qelem_zero_vartime4_lemma (f0,f1,f2,f3);
is_qelem_zero_vartime4 (f0,f1,f2,f3) | false | false | Hacl.K256.Scalar.fst | {
"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_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 50,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val is_qelem_eq_vartime (f1 f2:qelem) : Stack bool
(requires fun h ->
live h f1 /\ live h f2 /\ qe_lt_q h f1 /\ qe_lt_q h f2)
(ensures fun h0 m h1 -> modifies0 h0 h1 /\
m == (qas_nat h0 f1 = qas_nat h0 f2)) | [] | Hacl.K256.Scalar.is_qelem_eq_vartime | {
"file_name": "code/k256/Hacl.K256.Scalar.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | f1: Hacl.K256.Scalar.qelem -> f2: Hacl.K256.Scalar.qelem -> FStar.HyperStack.ST.Stack Prims.bool | {
"end_col": 50,
"end_line": 129,
"start_col": 31,
"start_line": 121
} |
FStar.HyperStack.ST.StackInline | val create_qelem: unit -> StackInline qelem
(requires fun h -> True)
(ensures fun h0 f h1 ->
stack_allocated f h0 h1 (LSeq.create (v qnlimb) (u64 0)) /\
qas_nat h1 f == 0) | [
{
"abbrev": false,
"full_module": "Hacl.Spec.K256.Scalar",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Definitions",
"short_module": "SD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum",
"short_module": "SN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Base",
"short_module": "BB"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Definitions",
"short_module": "BD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.GLV.Lemmas",
"short_module": "SGL"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.GLV",
"short_module": "SG"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Scalar.Lemmas",
"short_module": "KL"
},
{
"abbrev": true,
"full_module": "Spec.K256",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Lib.ByteBuffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Buffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Definitions",
"short_module": "BD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.GLV",
"short_module": "SG"
},
{
"abbrev": true,
"full_module": "Spec.K256",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Lib.ByteSequence",
"short_module": "BSeq"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Lib.Buffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.K256",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.K256",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let create_qelem () =
SD.bn_eval_zeroes #U64 (v qnlimb) (v qnlimb);
create qnlimb (u64 0) | val create_qelem: unit -> StackInline qelem
(requires fun h -> True)
(ensures fun h0 f h1 ->
stack_allocated f h0 h1 (LSeq.create (v qnlimb) (u64 0)) /\
qas_nat h1 f == 0)
let create_qelem () = | true | null | false | SD.bn_eval_zeroes #U64 (v qnlimb) (v qnlimb);
create qnlimb (u64 0) | {
"checked_file": "Hacl.K256.Scalar.fst.checked",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteBuffer.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.K256.Scalar.Lemmas.fst.checked",
"Hacl.Spec.K256.Scalar.fst.checked",
"Hacl.Spec.K256.GLV.Lemmas.fst.checked",
"Hacl.Spec.K256.GLV.fst.checked",
"Hacl.Spec.Bignum.Definitions.fst.checked",
"Hacl.Spec.Bignum.Convert.fst.checked",
"Hacl.Spec.Bignum.fsti.checked",
"Hacl.Bignum.Definitions.fst.checked",
"Hacl.Bignum.Convert.fst.checked",
"Hacl.Bignum.Base.fst.checked",
"Hacl.Bignum.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Tactics.Typeclasses.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.List.Tot.fst.checked",
"FStar.HyperStack.ST.fsti.checked",
"FStar.HyperStack.fst.checked",
"FStar.Ghost.fsti.checked"
],
"interface_file": true,
"source_file": "Hacl.K256.Scalar.fst"
} | [] | [
"Prims.unit",
"Lib.Buffer.create",
"Lib.IntTypes.uint64",
"Hacl.K256.Scalar.qnlimb",
"Lib.IntTypes.u64",
"Lib.Buffer.lbuffer",
"Hacl.Spec.Bignum.Definitions.bn_eval_zeroes",
"Lib.IntTypes.U64",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Hacl.K256.Scalar.qelem"
] | [] | module Hacl.K256.Scalar
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module S = Spec.K256
module KL = Hacl.Spec.K256.Scalar.Lemmas
module SG = Hacl.Spec.K256.GLV
module SGL = Hacl.Spec.K256.GLV.Lemmas
module BD = Hacl.Bignum.Definitions
module BN = Hacl.Bignum
module BB = Hacl.Bignum.Base
module SN = Hacl.Spec.Bignum
module SD = Hacl.Spec.Bignum.Definitions
include Hacl.Spec.K256.Scalar
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
[@CInline]
let bn_add : BN.bn_add_st U64 = BN.bn_add
//inline_for_extraction noextract
//let kn = BN.mk_runtime_bn U64 qnlimb
let add4: BN.bn_add_eq_len_st U64 qnlimb =
BN.bn_add_eq_len qnlimb
let sub4: BN.bn_sub_eq_len_st U64 qnlimb =
BN.bn_sub_eq_len qnlimb
let add_mod4: BN.bn_add_mod_n_st U64 qnlimb =
BN.bn_add_mod_n qnlimb
let sub_mod4: BN.bn_sub_mod_n_st U64 qnlimb =
BN.bn_sub_mod_n qnlimb
let mul4 (a:BD.lbignum U64 qnlimb) : BN.bn_karatsuba_mul_st U64 qnlimb a =
BN.bn_mul qnlimb qnlimb a
let sqr4 (a:BD.lbignum U64 qnlimb) : BN.bn_karatsuba_sqr_st U64 qnlimb a =
BN.bn_sqr qnlimb a
inline_for_extraction noextract
instance kn: BN.bn U64 = {
BN.len = qnlimb;
BN.add = add4;
BN.sub = sub4;
BN.add_mod_n = add_mod4;
BN.sub_mod_n = sub_mod4;
BN.mul = mul4;
BN.sqr = sqr4
}
let make_u64_4 out (f0, f1, f2, f3) =
out.(0ul) <- f0;
out.(1ul) <- f1;
out.(2ul) <- f2;
out.(3ul) <- f3;
let h = ST.get () in
KL.qas_nat4_is_qas_nat (as_seq h out);
assert (Seq.equal (as_seq h out) (LSeq.create4 f0 f1 f2 f3))
let make_order_k256 () =
[@inline_let]
let r =
(u64 0xbfd25e8cd0364141,
u64 0xbaaedce6af48a03b,
u64 0xfffffffffffffffe,
u64 0xffffffffffffffff) in
assert_norm (qas_nat4 r = S.q);
r | false | false | Hacl.K256.Scalar.fst | {
"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_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 50,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val create_qelem: unit -> StackInline qelem
(requires fun h -> True)
(ensures fun h0 f h1 ->
stack_allocated f h0 h1 (LSeq.create (v qnlimb) (u64 0)) /\
qas_nat h1 f == 0) | [] | Hacl.K256.Scalar.create_qelem | {
"file_name": "code/k256/Hacl.K256.Scalar.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | _: Prims.unit -> FStar.HyperStack.ST.StackInline Hacl.K256.Scalar.qelem | {
"end_col": 23,
"end_line": 90,
"start_col": 2,
"start_line": 89
} |
FStar.HyperStack.ST.Stack | val store_qelem: b:lbuffer uint8 32ul -> f:qelem -> Stack unit
(requires fun h ->
live h b /\ live h f /\ disjoint f b /\
qe_lt_q h f)
(ensures fun h0 _ h1 -> modifies (loc b) h0 h1 /\
as_seq h1 b == BSeq.nat_to_bytes_be 32 (qas_nat h0 f)) | [
{
"abbrev": false,
"full_module": "Hacl.Spec.K256.Scalar",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Definitions",
"short_module": "SD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum",
"short_module": "SN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Base",
"short_module": "BB"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Definitions",
"short_module": "BD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.GLV.Lemmas",
"short_module": "SGL"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.GLV",
"short_module": "SG"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Scalar.Lemmas",
"short_module": "KL"
},
{
"abbrev": true,
"full_module": "Spec.K256",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Lib.ByteBuffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Buffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Definitions",
"short_module": "BD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.GLV",
"short_module": "SG"
},
{
"abbrev": true,
"full_module": "Spec.K256",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Lib.ByteSequence",
"short_module": "BSeq"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Lib.Buffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.K256",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.K256",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let store_qelem b f =
let h0 = ST.get () in
Hacl.Spec.Bignum.Convert.bn_to_bytes_be_lemma #U64 32 (as_seq h0 f);
Hacl.Bignum.Convert.mk_bn_to_bytes_be true 32ul f b | val store_qelem: b:lbuffer uint8 32ul -> f:qelem -> Stack unit
(requires fun h ->
live h b /\ live h f /\ disjoint f b /\
qe_lt_q h f)
(ensures fun h0 _ h1 -> modifies (loc b) h0 h1 /\
as_seq h1 b == BSeq.nat_to_bytes_be 32 (qas_nat h0 f))
let store_qelem b f = | true | null | false | let h0 = ST.get () in
Hacl.Spec.Bignum.Convert.bn_to_bytes_be_lemma #U64 32 (as_seq h0 f);
Hacl.Bignum.Convert.mk_bn_to_bytes_be true 32ul f b | {
"checked_file": "Hacl.K256.Scalar.fst.checked",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteBuffer.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.K256.Scalar.Lemmas.fst.checked",
"Hacl.Spec.K256.Scalar.fst.checked",
"Hacl.Spec.K256.GLV.Lemmas.fst.checked",
"Hacl.Spec.K256.GLV.fst.checked",
"Hacl.Spec.Bignum.Definitions.fst.checked",
"Hacl.Spec.Bignum.Convert.fst.checked",
"Hacl.Spec.Bignum.fsti.checked",
"Hacl.Bignum.Definitions.fst.checked",
"Hacl.Bignum.Convert.fst.checked",
"Hacl.Bignum.Base.fst.checked",
"Hacl.Bignum.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Tactics.Typeclasses.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.List.Tot.fst.checked",
"FStar.HyperStack.ST.fsti.checked",
"FStar.HyperStack.fst.checked",
"FStar.Ghost.fsti.checked"
],
"interface_file": true,
"source_file": "Hacl.K256.Scalar.fst"
} | [] | [
"Lib.Buffer.lbuffer",
"Lib.IntTypes.uint8",
"FStar.UInt32.__uint_to_t",
"Hacl.K256.Scalar.qelem",
"Hacl.Bignum.Convert.mk_bn_to_bytes_be",
"Lib.IntTypes.U64",
"Prims.unit",
"Hacl.Spec.Bignum.Convert.bn_to_bytes_be_lemma",
"Lib.Buffer.as_seq",
"Lib.Buffer.MUT",
"Lib.IntTypes.uint64",
"Hacl.K256.Scalar.qnlimb",
"FStar.Monotonic.HyperStack.mem",
"FStar.HyperStack.ST.get"
] | [] | module Hacl.K256.Scalar
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module S = Spec.K256
module KL = Hacl.Spec.K256.Scalar.Lemmas
module SG = Hacl.Spec.K256.GLV
module SGL = Hacl.Spec.K256.GLV.Lemmas
module BD = Hacl.Bignum.Definitions
module BN = Hacl.Bignum
module BB = Hacl.Bignum.Base
module SN = Hacl.Spec.Bignum
module SD = Hacl.Spec.Bignum.Definitions
include Hacl.Spec.K256.Scalar
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
[@CInline]
let bn_add : BN.bn_add_st U64 = BN.bn_add
//inline_for_extraction noextract
//let kn = BN.mk_runtime_bn U64 qnlimb
let add4: BN.bn_add_eq_len_st U64 qnlimb =
BN.bn_add_eq_len qnlimb
let sub4: BN.bn_sub_eq_len_st U64 qnlimb =
BN.bn_sub_eq_len qnlimb
let add_mod4: BN.bn_add_mod_n_st U64 qnlimb =
BN.bn_add_mod_n qnlimb
let sub_mod4: BN.bn_sub_mod_n_st U64 qnlimb =
BN.bn_sub_mod_n qnlimb
let mul4 (a:BD.lbignum U64 qnlimb) : BN.bn_karatsuba_mul_st U64 qnlimb a =
BN.bn_mul qnlimb qnlimb a
let sqr4 (a:BD.lbignum U64 qnlimb) : BN.bn_karatsuba_sqr_st U64 qnlimb a =
BN.bn_sqr qnlimb a
inline_for_extraction noextract
instance kn: BN.bn U64 = {
BN.len = qnlimb;
BN.add = add4;
BN.sub = sub4;
BN.add_mod_n = add_mod4;
BN.sub_mod_n = sub_mod4;
BN.mul = mul4;
BN.sqr = sqr4
}
let make_u64_4 out (f0, f1, f2, f3) =
out.(0ul) <- f0;
out.(1ul) <- f1;
out.(2ul) <- f2;
out.(3ul) <- f3;
let h = ST.get () in
KL.qas_nat4_is_qas_nat (as_seq h out);
assert (Seq.equal (as_seq h out) (LSeq.create4 f0 f1 f2 f3))
let make_order_k256 () =
[@inline_let]
let r =
(u64 0xbfd25e8cd0364141,
u64 0xbaaedce6af48a03b,
u64 0xfffffffffffffffe,
u64 0xffffffffffffffff) in
assert_norm (qas_nat4 r = S.q);
r
let create_qelem () =
SD.bn_eval_zeroes #U64 (v qnlimb) (v qnlimb);
create qnlimb (u64 0)
let create_one () =
[@inline_let]
let l = [u64 0x1; u64 0x0; u64 0x0; u64 0x0] in
assert_norm (FStar.List.Tot.length l = 4);
Seq.elim_of_list l;
LSeq.eq_intro (LSeq.create4 (u64 0x1) (u64 0x0) (u64 0x0) (u64 0x0)) (Seq.seq_of_list l);
KL.qas_nat4_is_qas_nat (LSeq.create4 (u64 0x1) (u64 0x0) (u64 0x0) (u64 0x0));
createL l
[@CInline]
let is_qelem_zero f =
let h0 = ST.get () in
SN.bn_is_zero_mask_lemma (as_seq h0 f);
BN.bn_is_zero_mask qnlimb f
[@CInline]
let is_qelem_zero_vartime f =
let h = ST.get () in
KL.qas_nat4_is_qas_nat (as_seq h f);
let (f0,f1,f2,f3) = (f.(0ul), f.(1ul), f.(2ul), f.(3ul)) in
KL.is_qelem_zero_vartime4_lemma (f0,f1,f2,f3);
is_qelem_zero_vartime4 (f0,f1,f2,f3)
[@CInline]
let is_qelem_eq_vartime f1 f2 =
let h = ST.get () in
KL.qas_nat4_is_qas_nat (as_seq h f1);
KL.qas_nat4_is_qas_nat (as_seq h f2);
let (a0,a1,a2,a3) = (f1.(0ul), f1.(1ul), f1.(2ul), f1.(3ul)) in
let (b0,b1,b2,b3) = (f2.(0ul), f2.(1ul), f2.(2ul), f2.(3ul)) in
KL.is_qelem_eq_vartime4_lemma (a0,a1,a2,a3) (b0,b1,b2,b3);
is_qelem_eq_vartime4 (a0,a1,a2,a3) (b0,b1,b2,b3)
let load_qelem f b =
let h0 = ST.get () in
Hacl.Spec.Bignum.Convert.bn_from_bytes_be_lemma #U64 32 (as_seq h0 b);
Hacl.Bignum.Convert.mk_bn_from_bytes_be true 32ul b f
[@CInline]
let load_qelem_check f b =
push_frame ();
let n = create_qelem () in
make_u64_4 n (make_order_k256 ());
load_qelem f b;
let h0 = ST.get () in
let is_zero = is_qelem_zero f in
assert (v is_zero == (if qas_nat h0 f = 0 then ones_v U64 else 0));
let is_lt_q = BN.bn_lt_mask qnlimb f n in
SN.bn_lt_mask_lemma (as_seq h0 f) (as_seq h0 n);
assert (v is_lt_q == (if qas_nat h0 f < S.q then ones_v U64 else 0));
let m = logand (lognot is_zero) is_lt_q in
lognot_lemma is_zero;
logand_lemma (lognot is_zero) is_lt_q;
pop_frame ();
m
let load_qelem_conditional res b =
push_frame ();
let is_b_valid = load_qelem_check res b in
let oneq = create_one () in
let h0 = ST.get () in
Lib.ByteBuffer.buf_mask_select res oneq is_b_valid res;
let h1 = ST.get () in
assert (as_seq h1 res == (if (v is_b_valid = 0) then as_seq h0 oneq else as_seq h0 res));
pop_frame ();
is_b_valid
[@CInline]
let load_qelem_vartime f b =
load_qelem f b;
let h = ST.get () in
KL.qas_nat4_is_qas_nat (as_seq h f);
let is_zero = is_qelem_zero_vartime f in
let (a0,a1,a2,a3) = (f.(0ul), f.(1ul), f.(2ul), f.(3ul)) in
let is_lt_q_b = is_qelem_lt_q_vartime4 (a0,a1,a2,a3) in
KL.is_qelem_lt_q_vartime4_lemma (a0,a1,a2,a3);
not is_zero && is_lt_q_b
val modq_short: out:qelem -> a:qelem -> Stack unit
(requires fun h ->
live h a /\ live h out /\ disjoint a out)
(ensures fun h0 _ h1 -> modifies (loc out) h0 h1 /\
qas_nat h1 out == qas_nat h0 a % S.q)
[@CInline]
let modq_short out a =
push_frame ();
let tmp = create_qelem () in
[@inline_let]
let (t0,t1,t2,t3) = make_pow2_256_minus_order_k256 () in
make_u64_4 tmp (t0,t1,t2,t3);
let h0 = ST.get () in
let c = kn.BN.add a tmp out in
let mask = u64 0 -. c in
map2T qnlimb out (BB.mask_select mask) out a;
KL.mod_short_lseq_lemma (as_seq h0 a);
pop_frame ()
[@CInline]
let load_qelem_modq f b =
push_frame ();
let tmp = create_qelem () in
load_qelem f b;
copy tmp f;
modq_short f tmp;
pop_frame () | false | false | Hacl.K256.Scalar.fst | {
"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_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 50,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val store_qelem: b:lbuffer uint8 32ul -> f:qelem -> Stack unit
(requires fun h ->
live h b /\ live h f /\ disjoint f b /\
qe_lt_q h f)
(ensures fun h0 _ h1 -> modifies (loc b) h0 h1 /\
as_seq h1 b == BSeq.nat_to_bytes_be 32 (qas_nat h0 f)) | [] | Hacl.K256.Scalar.store_qelem | {
"file_name": "code/k256/Hacl.K256.Scalar.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | b: Lib.Buffer.lbuffer Lib.IntTypes.uint8 32ul -> f: Hacl.K256.Scalar.qelem
-> FStar.HyperStack.ST.Stack Prims.unit | {
"end_col": 53,
"end_line": 219,
"start_col": 21,
"start_line": 216
} |
FStar.HyperStack.ST.Stack | val load_qelem_vartime: f:qelem -> b:lbuffer uint8 32ul -> Stack bool
(requires fun h ->
live h f /\ live h b /\ disjoint f b)
(ensures fun h0 m h1 -> modifies (loc f) h0 h1 /\
(let b_nat = BSeq.nat_from_bytes_be (as_seq h0 b) in
qas_nat h1 f == b_nat /\ m = (0 < b_nat && b_nat < S.q))) | [
{
"abbrev": false,
"full_module": "Hacl.Spec.K256.Scalar",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Definitions",
"short_module": "SD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum",
"short_module": "SN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Base",
"short_module": "BB"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Definitions",
"short_module": "BD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.GLV.Lemmas",
"short_module": "SGL"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.GLV",
"short_module": "SG"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Scalar.Lemmas",
"short_module": "KL"
},
{
"abbrev": true,
"full_module": "Spec.K256",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Lib.ByteBuffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Buffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Definitions",
"short_module": "BD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.GLV",
"short_module": "SG"
},
{
"abbrev": true,
"full_module": "Spec.K256",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Lib.ByteSequence",
"short_module": "BSeq"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Lib.Buffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.K256",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.K256",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let load_qelem_vartime f b =
load_qelem f b;
let h = ST.get () in
KL.qas_nat4_is_qas_nat (as_seq h f);
let is_zero = is_qelem_zero_vartime f in
let (a0,a1,a2,a3) = (f.(0ul), f.(1ul), f.(2ul), f.(3ul)) in
let is_lt_q_b = is_qelem_lt_q_vartime4 (a0,a1,a2,a3) in
KL.is_qelem_lt_q_vartime4_lemma (a0,a1,a2,a3);
not is_zero && is_lt_q_b | val load_qelem_vartime: f:qelem -> b:lbuffer uint8 32ul -> Stack bool
(requires fun h ->
live h f /\ live h b /\ disjoint f b)
(ensures fun h0 m h1 -> modifies (loc f) h0 h1 /\
(let b_nat = BSeq.nat_from_bytes_be (as_seq h0 b) in
qas_nat h1 f == b_nat /\ m = (0 < b_nat && b_nat < S.q)))
let load_qelem_vartime f b = | true | null | false | load_qelem f b;
let h = ST.get () in
KL.qas_nat4_is_qas_nat (as_seq h f);
let is_zero = is_qelem_zero_vartime f in
let a0, a1, a2, a3 = (f.(0ul), f.(1ul), f.(2ul), f.(3ul)) in
let is_lt_q_b = is_qelem_lt_q_vartime4 (a0, a1, a2, a3) in
KL.is_qelem_lt_q_vartime4_lemma (a0, a1, a2, a3);
not is_zero && is_lt_q_b | {
"checked_file": "Hacl.K256.Scalar.fst.checked",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteBuffer.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.K256.Scalar.Lemmas.fst.checked",
"Hacl.Spec.K256.Scalar.fst.checked",
"Hacl.Spec.K256.GLV.Lemmas.fst.checked",
"Hacl.Spec.K256.GLV.fst.checked",
"Hacl.Spec.Bignum.Definitions.fst.checked",
"Hacl.Spec.Bignum.Convert.fst.checked",
"Hacl.Spec.Bignum.fsti.checked",
"Hacl.Bignum.Definitions.fst.checked",
"Hacl.Bignum.Convert.fst.checked",
"Hacl.Bignum.Base.fst.checked",
"Hacl.Bignum.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Tactics.Typeclasses.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.List.Tot.fst.checked",
"FStar.HyperStack.ST.fsti.checked",
"FStar.HyperStack.fst.checked",
"FStar.Ghost.fsti.checked"
],
"interface_file": true,
"source_file": "Hacl.K256.Scalar.fst"
} | [] | [
"Hacl.K256.Scalar.qelem",
"Lib.Buffer.lbuffer",
"Lib.IntTypes.uint8",
"FStar.UInt32.__uint_to_t",
"Lib.IntTypes.uint64",
"Prims.op_AmpAmp",
"Prims.op_Negation",
"Prims.unit",
"Hacl.Spec.K256.Scalar.Lemmas.is_qelem_lt_q_vartime4_lemma",
"FStar.Pervasives.Native.Mktuple4",
"Prims.bool",
"Hacl.Spec.K256.Scalar.is_qelem_lt_q_vartime4",
"FStar.Pervasives.Native.tuple4",
"Lib.IntTypes.int_t",
"Lib.IntTypes.U64",
"Lib.IntTypes.SEC",
"Lib.Buffer.op_Array_Access",
"Lib.Buffer.MUT",
"Hacl.K256.Scalar.qnlimb",
"Hacl.K256.Scalar.is_qelem_zero_vartime",
"Hacl.Spec.K256.Scalar.Lemmas.qas_nat4_is_qas_nat",
"Lib.Buffer.as_seq",
"FStar.Monotonic.HyperStack.mem",
"FStar.HyperStack.ST.get",
"Hacl.K256.Scalar.load_qelem"
] | [] | module Hacl.K256.Scalar
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module S = Spec.K256
module KL = Hacl.Spec.K256.Scalar.Lemmas
module SG = Hacl.Spec.K256.GLV
module SGL = Hacl.Spec.K256.GLV.Lemmas
module BD = Hacl.Bignum.Definitions
module BN = Hacl.Bignum
module BB = Hacl.Bignum.Base
module SN = Hacl.Spec.Bignum
module SD = Hacl.Spec.Bignum.Definitions
include Hacl.Spec.K256.Scalar
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
[@CInline]
let bn_add : BN.bn_add_st U64 = BN.bn_add
//inline_for_extraction noextract
//let kn = BN.mk_runtime_bn U64 qnlimb
let add4: BN.bn_add_eq_len_st U64 qnlimb =
BN.bn_add_eq_len qnlimb
let sub4: BN.bn_sub_eq_len_st U64 qnlimb =
BN.bn_sub_eq_len qnlimb
let add_mod4: BN.bn_add_mod_n_st U64 qnlimb =
BN.bn_add_mod_n qnlimb
let sub_mod4: BN.bn_sub_mod_n_st U64 qnlimb =
BN.bn_sub_mod_n qnlimb
let mul4 (a:BD.lbignum U64 qnlimb) : BN.bn_karatsuba_mul_st U64 qnlimb a =
BN.bn_mul qnlimb qnlimb a
let sqr4 (a:BD.lbignum U64 qnlimb) : BN.bn_karatsuba_sqr_st U64 qnlimb a =
BN.bn_sqr qnlimb a
inline_for_extraction noextract
instance kn: BN.bn U64 = {
BN.len = qnlimb;
BN.add = add4;
BN.sub = sub4;
BN.add_mod_n = add_mod4;
BN.sub_mod_n = sub_mod4;
BN.mul = mul4;
BN.sqr = sqr4
}
let make_u64_4 out (f0, f1, f2, f3) =
out.(0ul) <- f0;
out.(1ul) <- f1;
out.(2ul) <- f2;
out.(3ul) <- f3;
let h = ST.get () in
KL.qas_nat4_is_qas_nat (as_seq h out);
assert (Seq.equal (as_seq h out) (LSeq.create4 f0 f1 f2 f3))
let make_order_k256 () =
[@inline_let]
let r =
(u64 0xbfd25e8cd0364141,
u64 0xbaaedce6af48a03b,
u64 0xfffffffffffffffe,
u64 0xffffffffffffffff) in
assert_norm (qas_nat4 r = S.q);
r
let create_qelem () =
SD.bn_eval_zeroes #U64 (v qnlimb) (v qnlimb);
create qnlimb (u64 0)
let create_one () =
[@inline_let]
let l = [u64 0x1; u64 0x0; u64 0x0; u64 0x0] in
assert_norm (FStar.List.Tot.length l = 4);
Seq.elim_of_list l;
LSeq.eq_intro (LSeq.create4 (u64 0x1) (u64 0x0) (u64 0x0) (u64 0x0)) (Seq.seq_of_list l);
KL.qas_nat4_is_qas_nat (LSeq.create4 (u64 0x1) (u64 0x0) (u64 0x0) (u64 0x0));
createL l
[@CInline]
let is_qelem_zero f =
let h0 = ST.get () in
SN.bn_is_zero_mask_lemma (as_seq h0 f);
BN.bn_is_zero_mask qnlimb f
[@CInline]
let is_qelem_zero_vartime f =
let h = ST.get () in
KL.qas_nat4_is_qas_nat (as_seq h f);
let (f0,f1,f2,f3) = (f.(0ul), f.(1ul), f.(2ul), f.(3ul)) in
KL.is_qelem_zero_vartime4_lemma (f0,f1,f2,f3);
is_qelem_zero_vartime4 (f0,f1,f2,f3)
[@CInline]
let is_qelem_eq_vartime f1 f2 =
let h = ST.get () in
KL.qas_nat4_is_qas_nat (as_seq h f1);
KL.qas_nat4_is_qas_nat (as_seq h f2);
let (a0,a1,a2,a3) = (f1.(0ul), f1.(1ul), f1.(2ul), f1.(3ul)) in
let (b0,b1,b2,b3) = (f2.(0ul), f2.(1ul), f2.(2ul), f2.(3ul)) in
KL.is_qelem_eq_vartime4_lemma (a0,a1,a2,a3) (b0,b1,b2,b3);
is_qelem_eq_vartime4 (a0,a1,a2,a3) (b0,b1,b2,b3)
let load_qelem f b =
let h0 = ST.get () in
Hacl.Spec.Bignum.Convert.bn_from_bytes_be_lemma #U64 32 (as_seq h0 b);
Hacl.Bignum.Convert.mk_bn_from_bytes_be true 32ul b f
[@CInline]
let load_qelem_check f b =
push_frame ();
let n = create_qelem () in
make_u64_4 n (make_order_k256 ());
load_qelem f b;
let h0 = ST.get () in
let is_zero = is_qelem_zero f in
assert (v is_zero == (if qas_nat h0 f = 0 then ones_v U64 else 0));
let is_lt_q = BN.bn_lt_mask qnlimb f n in
SN.bn_lt_mask_lemma (as_seq h0 f) (as_seq h0 n);
assert (v is_lt_q == (if qas_nat h0 f < S.q then ones_v U64 else 0));
let m = logand (lognot is_zero) is_lt_q in
lognot_lemma is_zero;
logand_lemma (lognot is_zero) is_lt_q;
pop_frame ();
m
let load_qelem_conditional res b =
push_frame ();
let is_b_valid = load_qelem_check res b in
let oneq = create_one () in
let h0 = ST.get () in
Lib.ByteBuffer.buf_mask_select res oneq is_b_valid res;
let h1 = ST.get () in
assert (as_seq h1 res == (if (v is_b_valid = 0) then as_seq h0 oneq else as_seq h0 res));
pop_frame ();
is_b_valid
[@CInline] | false | false | Hacl.K256.Scalar.fst | {
"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_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 50,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val load_qelem_vartime: f:qelem -> b:lbuffer uint8 32ul -> Stack bool
(requires fun h ->
live h f /\ live h b /\ disjoint f b)
(ensures fun h0 m h1 -> modifies (loc f) h0 h1 /\
(let b_nat = BSeq.nat_from_bytes_be (as_seq h0 b) in
qas_nat h1 f == b_nat /\ m = (0 < b_nat && b_nat < S.q))) | [] | Hacl.K256.Scalar.load_qelem_vartime | {
"file_name": "code/k256/Hacl.K256.Scalar.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | f: Hacl.K256.Scalar.qelem -> b: Lib.Buffer.lbuffer Lib.IntTypes.uint8 32ul
-> FStar.HyperStack.ST.Stack Prims.bool | {
"end_col": 26,
"end_line": 180,
"start_col": 2,
"start_line": 172
} |
FStar.HyperStack.ST.StackInline | val create_one: unit -> StackInline qelem
(requires fun h -> True)
(ensures fun h0 f h1 ->
stack_allocated f h0 h1 (LSeq.create4 (u64 1) (u64 0) (u64 0) (u64 0)) /\
qas_nat h1 f = 1) | [
{
"abbrev": false,
"full_module": "Hacl.Spec.K256.Scalar",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Definitions",
"short_module": "SD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum",
"short_module": "SN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Base",
"short_module": "BB"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Definitions",
"short_module": "BD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.GLV.Lemmas",
"short_module": "SGL"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.GLV",
"short_module": "SG"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Scalar.Lemmas",
"short_module": "KL"
},
{
"abbrev": true,
"full_module": "Spec.K256",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Lib.ByteBuffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Buffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Definitions",
"short_module": "BD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.GLV",
"short_module": "SG"
},
{
"abbrev": true,
"full_module": "Spec.K256",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Lib.ByteSequence",
"short_module": "BSeq"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Lib.Buffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.K256",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.K256",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | false | let create_one () =
[@inline_let]
let l = [u64 0x1; u64 0x0; u64 0x0; u64 0x0] in
assert_norm (FStar.List.Tot.length l = 4);
Seq.elim_of_list l;
LSeq.eq_intro (LSeq.create4 (u64 0x1) (u64 0x0) (u64 0x0) (u64 0x0)) (Seq.seq_of_list l);
KL.qas_nat4_is_qas_nat (LSeq.create4 (u64 0x1) (u64 0x0) (u64 0x0) (u64 0x0));
createL l | val create_one: unit -> StackInline qelem
(requires fun h -> True)
(ensures fun h0 f h1 ->
stack_allocated f h0 h1 (LSeq.create4 (u64 1) (u64 0) (u64 0) (u64 0)) /\
qas_nat h1 f = 1)
let create_one () = | true | null | false | [@@ inline_let ]let l = [u64 0x1; u64 0x0; u64 0x0; u64 0x0] in
assert_norm (FStar.List.Tot.length l = 4);
Seq.elim_of_list l;
LSeq.eq_intro (LSeq.create4 (u64 0x1) (u64 0x0) (u64 0x0) (u64 0x0)) (Seq.seq_of_list l);
KL.qas_nat4_is_qas_nat (LSeq.create4 (u64 0x1) (u64 0x0) (u64 0x0) (u64 0x0));
createL l | {
"checked_file": "Hacl.K256.Scalar.fst.checked",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteBuffer.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.K256.Scalar.Lemmas.fst.checked",
"Hacl.Spec.K256.Scalar.fst.checked",
"Hacl.Spec.K256.GLV.Lemmas.fst.checked",
"Hacl.Spec.K256.GLV.fst.checked",
"Hacl.Spec.Bignum.Definitions.fst.checked",
"Hacl.Spec.Bignum.Convert.fst.checked",
"Hacl.Spec.Bignum.fsti.checked",
"Hacl.Bignum.Definitions.fst.checked",
"Hacl.Bignum.Convert.fst.checked",
"Hacl.Bignum.Base.fst.checked",
"Hacl.Bignum.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Tactics.Typeclasses.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.List.Tot.fst.checked",
"FStar.HyperStack.ST.fsti.checked",
"FStar.HyperStack.fst.checked",
"FStar.Ghost.fsti.checked"
],
"interface_file": true,
"source_file": "Hacl.K256.Scalar.fst"
} | [] | [
"Prims.unit",
"Lib.Buffer.createL",
"Lib.IntTypes.uint64",
"Lib.Buffer.lbuffer",
"Lib.IntTypes.size",
"FStar.Pervasives.normalize_term",
"Lib.IntTypes.size_nat",
"FStar.List.Tot.Base.length",
"Hacl.Spec.K256.Scalar.Lemmas.qas_nat4_is_qas_nat",
"Lib.Sequence.create4",
"Lib.IntTypes.u64",
"Hacl.K256.Scalar.qelem",
"Lib.Sequence.eq_intro",
"FStar.Seq.Properties.seq_of_list",
"FStar.Seq.Properties.elim_of_list",
"FStar.Pervasives.assert_norm",
"Prims.b2t",
"Prims.op_Equality",
"Prims.int",
"Prims.list",
"Lib.IntTypes.int_t",
"Lib.IntTypes.U64",
"Lib.IntTypes.SEC",
"Prims.Cons",
"Prims.Nil"
] | [] | module Hacl.K256.Scalar
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module S = Spec.K256
module KL = Hacl.Spec.K256.Scalar.Lemmas
module SG = Hacl.Spec.K256.GLV
module SGL = Hacl.Spec.K256.GLV.Lemmas
module BD = Hacl.Bignum.Definitions
module BN = Hacl.Bignum
module BB = Hacl.Bignum.Base
module SN = Hacl.Spec.Bignum
module SD = Hacl.Spec.Bignum.Definitions
include Hacl.Spec.K256.Scalar
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
[@CInline]
let bn_add : BN.bn_add_st U64 = BN.bn_add
//inline_for_extraction noextract
//let kn = BN.mk_runtime_bn U64 qnlimb
let add4: BN.bn_add_eq_len_st U64 qnlimb =
BN.bn_add_eq_len qnlimb
let sub4: BN.bn_sub_eq_len_st U64 qnlimb =
BN.bn_sub_eq_len qnlimb
let add_mod4: BN.bn_add_mod_n_st U64 qnlimb =
BN.bn_add_mod_n qnlimb
let sub_mod4: BN.bn_sub_mod_n_st U64 qnlimb =
BN.bn_sub_mod_n qnlimb
let mul4 (a:BD.lbignum U64 qnlimb) : BN.bn_karatsuba_mul_st U64 qnlimb a =
BN.bn_mul qnlimb qnlimb a
let sqr4 (a:BD.lbignum U64 qnlimb) : BN.bn_karatsuba_sqr_st U64 qnlimb a =
BN.bn_sqr qnlimb a
inline_for_extraction noextract
instance kn: BN.bn U64 = {
BN.len = qnlimb;
BN.add = add4;
BN.sub = sub4;
BN.add_mod_n = add_mod4;
BN.sub_mod_n = sub_mod4;
BN.mul = mul4;
BN.sqr = sqr4
}
let make_u64_4 out (f0, f1, f2, f3) =
out.(0ul) <- f0;
out.(1ul) <- f1;
out.(2ul) <- f2;
out.(3ul) <- f3;
let h = ST.get () in
KL.qas_nat4_is_qas_nat (as_seq h out);
assert (Seq.equal (as_seq h out) (LSeq.create4 f0 f1 f2 f3))
let make_order_k256 () =
[@inline_let]
let r =
(u64 0xbfd25e8cd0364141,
u64 0xbaaedce6af48a03b,
u64 0xfffffffffffffffe,
u64 0xffffffffffffffff) in
assert_norm (qas_nat4 r = S.q);
r
let create_qelem () =
SD.bn_eval_zeroes #U64 (v qnlimb) (v qnlimb);
create qnlimb (u64 0) | false | false | Hacl.K256.Scalar.fst | {
"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_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 50,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | null | val create_one: unit -> StackInline qelem
(requires fun h -> True)
(ensures fun h0 f h1 ->
stack_allocated f h0 h1 (LSeq.create4 (u64 1) (u64 0) (u64 0) (u64 0)) /\
qas_nat h1 f = 1) | [] | Hacl.K256.Scalar.create_one | {
"file_name": "code/k256/Hacl.K256.Scalar.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | _: Prims.unit -> FStar.HyperStack.ST.StackInline Hacl.K256.Scalar.qelem | {
"end_col": 11,
"end_line": 100,
"start_col": 2,
"start_line": 94
} |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.