Proof Assistant Projects
Collection
Digesting proof assistant libraries for AI ingestion.
•
79 items
•
Updated
•
2
fact
stringlengths 9
50.1k
| type
stringclasses 15
values | library
stringclasses 1
value | imports
listlengths 0
8
| filename
stringclasses 48
values | symbolic_name
stringlengths 1
51
| docstring
stringclasses 1
value |
|---|---|---|---|---|---|---|
ansi_escape_char : Ascii.ascii := Ascii.ascii_of_byte Byte.x1b.
|
Definition
|
theories
|
[
"Require Import Coq."
] |
theories/ansi.v
|
ansi_escape_char
| |
ansi_escape : string := String ansi_escape_char EmptyString.
|
Definition
|
theories
|
[
"Require Import Coq."
] |
theories/ansi.v
|
ansi_escape
| |
ansi_fg : Type := | FG_reset | FG_green | FG_red | FG_yellow | FG_blue | FG_magenta | FG_cyan | FG_bold.
|
Inductive
|
theories
|
[
"Require Import Coq."
] |
theories/ansi.v
|
ansi_fg
| |
code_of_fg (fg : ansi_fg) : string := match fg with | FG_reset => "0" | FG_bold => "1" | FG_red => "31" | FG_green => "32" | FG_yellow => "33" | FG_blue => "34" | FG_magenta => "35" | FG_cyan => "36" end.
|
Definition
|
theories
|
[
"Require Import Coq."
] |
theories/ansi.v
|
code_of_fg
| |
show_fg (fg : ansi_fg) : string := ansi_escape ++ "[" ++ code_of_fg fg ++ "m".
|
Definition
|
theories
|
[
"Require Import Coq."
] |
theories/ansi.v
|
show_fg
| |
with_fg (fg : ansi_fg) (s : string) : string := show_fg fg ++ s ++ show_fg FG_reset.
|
Definition
|
theories
|
[
"Require Import Coq."
] |
theories/ansi.v
|
with_fg
| |
Index : Type.
|
Parameter
|
theories
|
[] |
theories/array.v
|
Index
| |
index_eqb : Index -> Index -> bool.
|
Parameter
|
theories
|
[] |
theories/array.v
|
index_eqb
| |
Value : Type.
|
Parameter
|
theories
|
[] |
theories/array.v
|
Value
| |
array : Type := | A_init : Value -> array | A_update : Index -> Value -> array -> array.
|
Inductive
|
theories
|
[] |
theories/array.v
|
array
| |
make (v : Value) : array := A_init v.
|
Definition
|
theories
|
[] |
theories/array.v
|
make
| |
get (arr : array) (idx : Index) : Value := match arr with | A_init a => a | A_update idx' a arr' => if index_eqb idx idx' then a else get arr' idx end.
|
Fixpoint
|
theories
|
[] |
theories/array.v
|
get
| |
set (arr : array) (idx : Index) (a : Value) : array := A_update idx a arr.
|
Definition
|
theories
|
[] |
theories/array.v
|
set
| |
byte_parser A n := Parser Toks byte M A n.
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
byte_parser
| |
be_parser n := byte_parser basic_instruction n. (* Given a parser, produce a new parser that also returns the number of tokens consumed by it. *)
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
be_parser
| |
sized_parser {T: Type} {n} (f: byte_parser T n) : byte_parser (T * N) n. Proof. apply MkParser. intros m Hmlen toks. remember (runParser f Hmlen toks) as run_res. refine (_app _ _ _ run_res). refine (_pure _ _). intros ret; destruct ret as [value size Hsmall leftovers]. exact (Success.MkSuccess (value, N.of_nat (m - size)) Hsmall leftovers). Defined.
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
sized_parser
| |
assert_sized {T: Type} {n} (f: byte_parser T n) (constraint: N -> bool) : byte_parser T n := guardM (fun '(ret, sz) => if constraint sz then Some ret else None) (sized_parser f).
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
assert_sized
| |
exact_byte (b : byte) {n} : byte_parser byte n := guardM (fun b' => if byte_eqb b' b then Some b' else None) anyTok.
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
exact_byte
| |
parse_u8_as_N {n} : byte_parser N n := guardM (fun n => if (N.leb n 255%N) then Some n else None) (assert_sized (extract parse_unsigned n) (fun sz => N.leb sz 2)).
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_u8_as_N
| |
parse_u32_as_N {n} : byte_parser N n := guardM (fun n => if (N.leb n 4294967295%N) then Some n else None) (assert_sized (extract parse_unsigned n) (fun sz => N.leb sz 5)).
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_u32_as_N
| |
assert_u32 {n} (k: N) : byte_parser N n := guardM (fun parsed_n => if N.eqb parsed_n k then Some k else None) parse_u32_as_N.
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
assert_u32
| |
parse_s32 {n} : byte_parser Wasm_int.Int32.int n := guardM (fun x => if (andb (Z.leb x 2147483647%Z) (Z.leb (-2147483648)%Z x)) then Some (Wasm_int.Int32.repr x) else None) (assert_sized (extract parse_signed n) (fun sz => N.leb sz 5)).
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_s32
| |
parse_s64 {n} : byte_parser Wasm_int.Int64.int n := guardM (fun x => if (andb (Z.leb x 9223372036854775807%Z) (Z.leb (-9223372036854775808)%Z x)) then Some (Wasm_int.Int64.repr x) else None) (assert_sized (extract parse_signed n) (fun sz => N.leb sz 10)).
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_s64
| |
parse_vec_length {n} : byte_parser N n := parse_u32_as_N. (* Safe vector parsing, without going through nat. Also avoids hanging when the parameter is too large. *)
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_vec_length
| |
parse_vec_aux_positive {B} {n} (f: byte_parser B n) (p: positive) : byte_parser (list B) n := match p with | xH => (fun x => cons x nil) <$> f | xO p' => (fun '(l1, l2) => List.app l1 l2) <$> (parse_vec_aux_positive f p' &>>= (fun _ => parse_vec_aux_positive f p')) | xI p' => (((fun '(h, (l1, l2)) => cons h (List.app l1 l2))) <$> (f &>>= (fun _ => (parse_vec_aux_positive f p' &>>= (fun _ => parse_vec_aux_positive f p'))))) end.
|
Fixpoint
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_vec_aux_positive
| |
parse_vec_aux {B} {n} (f : byte_parser B n) (k : N) : byte_parser (list B) n:= match k with | 0%N => fail (* nil *) | Npos p => parse_vec_aux_positive f p end. (* parsing a length-indexed list *)
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_vec_aux
| |
parse_vec {B} {n} (f : byte_parser B n) : byte_parser (list B) n := exact_byte x00 $> nil <|> (parse_vec_length >>= (fun k => parse_vec_aux f k)).
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_vec
| |
parse_16bytes {n} : byte_parser SIMD.v128 n := (fun bs => List.map compcert_byte_of_byte bs) <$> parse_vec_aux anyTok 16.
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_16bytes
| |
parse_f32 {n} : byte_parser Wasm_float.FloatSize32.T n := (fun bs => Floats.Float32.of_bits (Integers.Int.repr (common.Memdata.decode_int (List.map compcert_byte_of_byte bs)))) <$> (parse_vec_aux anyTok 4%N).
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_f32
| |
parse_f64 {n} : byte_parser Wasm_float.FloatSize64.T n := (fun bs => Floats.Float.of_bits (Integers.Int64.repr (common.Memdata.decode_int (List.map compcert_byte_of_byte bs)))) <$> (parse_vec_aux anyTok 8%N). (* Kept as separate definitions in case a distincion is required in the future *)
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_f64
| |
parse_labelidx {n} : byte_parser labelidx n := parse_u32_as_N.
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_labelidx
| |
parse_funcidx {n} : byte_parser funcidx n := parse_u32_as_N.
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_funcidx
| |
parse_tableidx {n} : byte_parser tableidx n := parse_u32_as_N.
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_tableidx
| |
parse_memidx {n} : byte_parser memidx n := parse_u32_as_N.
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_memidx
| |
parse_typeidx {n} : byte_parser typeidx n := parse_u32_as_N.
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_typeidx
| |
parse_localidx {n} : byte_parser localidx n := parse_u32_as_N.
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_localidx
| |
parse_globalidx {n} : byte_parser globalidx n := parse_u32_as_N.
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_globalidx
| |
parse_elemidx {n} : byte_parser elemidx n := parse_u32_as_N.
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_elemidx
| |
parse_dataidx {n} : byte_parser dataidx n := parse_u32_as_N.
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_dataidx
| |
parse_laneidx {n} : byte_parser laneidx n := parse_u8_as_N.
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_laneidx
| |
parse_number_type {n} : byte_parser number_type n := (exact_byte x7f $> T_i32) <|> (exact_byte x7e $> T_i64) <|> (exact_byte x7d $> T_f32) <|> (exact_byte x7c $> T_f64).
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_number_type
| |
parse_vector_type {n} : byte_parser vector_type n := (exact_byte x7b $> T_v128).
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_vector_type
| |
parse_reference_type {n} : byte_parser reference_type n := (exact_byte x70 $> T_funcref) <|> (exact_byte x6f $> T_externref).
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_reference_type
| |
parse_value_type {n} : byte_parser value_type n := T_num <$> parse_number_type <|> T_vec <$> parse_vector_type <|> T_ref <$> parse_reference_type.
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_value_type
| |
parse_block_type {n} : byte_parser block_type n := (exact_byte x40 $> BT_valtype None) <|> (fun t => BT_valtype (Some t)) <$> parse_value_type <|> BT_id <$> parse_typeidx.
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_block_type
| |
parse_unreachable {n} : byte_parser basic_instruction n := exact_byte x00 $> BI_unreachable.
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_unreachable
| |
parse_nop {n} : byte_parser basic_instruction n := exact_byte x01 $> BI_nop. (* Might be better to keep these redundant conversions for typechecking in case; it's always easy to erase them than to recover them *)
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_nop
| |
extract_labelidx {B} (f : N -> B) (x : labelidx) : B := f x.
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
extract_labelidx
| |
extract_funcidx {B} (f : N -> B) (x : funcidx) : B := f x.
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
extract_funcidx
| |
extract_typeidx {B} (f : N -> B) (x : typeidx) : B := f x.
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
extract_typeidx
| |
extract_localidx {B} (f : N -> B) (x : localidx) : B := f x.
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
extract_localidx
| |
extract_globalidx {B} (f : N -> B) (x : globalidx) : B := f x.
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
extract_globalidx
| |
parse_br {n} : byte_parser basic_instruction n := exact_byte x0c &> (extract_labelidx BI_br <$> parse_labelidx).
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_br
| |
parse_br_if {n} : byte_parser basic_instruction n := exact_byte x0d &> (extract_labelidx BI_br_if <$> parse_labelidx).
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_br_if
| |
parse_br_table_aux (xs : list labelidx) (x : labelidx) := BI_br_table (List.map (extract_labelidx (fun x => x)) xs) (extract_labelidx (fun x => x) x).
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_br_table_aux
| |
parse_br_table {n} : byte_parser basic_instruction n := exact_byte x0e &> ((parse_br_table_aux <$> parse_vec parse_labelidx) <*> parse_labelidx).
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_br_table
| |
parse_return {n} : byte_parser basic_instruction n := exact_byte x0f $> BI_return.
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_return
| |
parse_call {n} : byte_parser basic_instruction n := exact_byte x10 &> (extract_funcidx BI_call <$> parse_funcidx).
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_call
| |
parse_call_indirect {n} : byte_parser basic_instruction n := exact_byte x11 &> (((fun typ tab => BI_call_indirect tab typ) <$> parse_typeidx) <*> parse_tableidx).
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_call_indirect
| |
parse_return_call {n} : byte_parser basic_instruction n := exact_byte x12 &> (extract_funcidx BI_call <$> parse_funcidx).
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_return_call
| |
parse_return_call_indirect {n} : byte_parser basic_instruction n := exact_byte x13 &> (((fun typ tab => BI_call_indirect tab typ) <$> parse_typeidx) <*> parse_tableidx). (* Reference instructions *)
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_return_call_indirect
| |
parse_ref_null {n}: byte_parser basic_instruction n := exact_byte xd0 &> (BI_ref_null <$> parse_reference_type).
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_ref_null
| |
parse_ref_is_null {n} : byte_parser basic_instruction n := exact_byte xd1 $> BI_ref_is_null.
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_ref_is_null
| |
parse_ref_func {n} : byte_parser basic_instruction n := exact_byte xd2 &> (BI_ref_func <$> parse_funcidx).
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_ref_func
| |
parse_reference_instruction {n} : byte_parser basic_instruction n := parse_ref_null <|> parse_ref_is_null <|> parse_ref_func. (* Variable instructions *)
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_reference_instruction
| |
parse_drop {n} : byte_parser basic_instruction n := exact_byte x1a $> BI_drop.
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_drop
| |
parse_select_None {n} : byte_parser basic_instruction n := exact_byte x1b $> (BI_select None).
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_select_None
| |
parse_select_Some {n} : byte_parser basic_instruction n := exact_byte x1c &> ((fun vts => BI_select (Some vts)) <$> parse_vec parse_value_type).
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_select_Some
| |
parse_parametric_instruction {n} : byte_parser basic_instruction n := parse_drop <|> parse_select_None <|> parse_select_Some.
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_parametric_instruction
| |
parse_local_get {n} : byte_parser basic_instruction n := exact_byte x20 &> (extract_localidx BI_local_get <$> parse_localidx).
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_local_get
| |
parse_local_set {n} : byte_parser basic_instruction n := exact_byte x21 &> (extract_localidx BI_local_set <$> parse_localidx).
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_local_set
| |
parse_local_tee {n} : byte_parser basic_instruction n := exact_byte x22 &> (extract_localidx BI_local_tee <$> parse_localidx).
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_local_tee
| |
parse_global_get {n} : byte_parser basic_instruction n := exact_byte x23 &> (extract_globalidx BI_global_get <$> parse_globalidx).
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_global_get
| |
parse_global_set {n} : byte_parser basic_instruction n := exact_byte x24 &> (extract_globalidx BI_global_set <$> parse_globalidx).
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_global_set
| |
parse_variable_instruction {n} : byte_parser basic_instruction n := parse_local_get <|> parse_local_set <|> parse_local_tee <|> parse_global_get <|> parse_global_set. (* Table instructions *)
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_variable_instruction
| |
parse_table_get {n} : byte_parser basic_instruction n := exact_byte x25 &> (BI_table_get <$> parse_tableidx).
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_table_get
| |
parse_table_set {n} : byte_parser basic_instruction n := exact_byte x26 &> (BI_table_set <$> parse_tableidx). (* Order of the arguments is reversed in the binary format *)
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_table_set
| |
parse_table_init {n} : byte_parser basic_instruction n := exact_byte xfc &> assert_u32 12%N &> (((fun y x => BI_table_init x y) <$> parse_elemidx) <*> parse_tableidx).
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_table_init
| |
parse_elem_drop {n} : byte_parser basic_instruction n := exact_byte xfc &> assert_u32 13%N &> (BI_elem_drop <$> parse_elemidx).
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_elem_drop
| |
parse_table_copy {n} : byte_parser basic_instruction n := exact_byte xfc &> assert_u32 14%N &> ((BI_table_copy <$> parse_tableidx) <*> parse_tableidx).
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_table_copy
| |
parse_table_grow {n} : byte_parser basic_instruction n := exact_byte xfc &> assert_u32 15%N &> (BI_table_grow <$> parse_tableidx).
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_table_grow
| |
parse_table_size {n} : byte_parser basic_instruction n := exact_byte xfc &> assert_u32 16%N &> (BI_table_size <$> parse_tableidx).
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_table_size
| |
parse_table_fill {n} : byte_parser basic_instruction n := exact_byte xfc &> assert_u32 17%N &> (BI_table_fill <$> parse_tableidx).
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_table_fill
| |
parse_table_instruction {n}: byte_parser basic_instruction n := parse_table_get <|> parse_table_set <|> parse_table_init <|> parse_elem_drop <|> parse_table_copy <|> parse_table_grow <|> parse_table_size <|> parse_table_fill.
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_table_instruction
| |
parse_alignment_exponent {n} : byte_parser N n := parse_u32_as_N.
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_alignment_exponent
| |
parse_static_offset {n} : byte_parser N n := parse_u32_as_N.
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_static_offset
| |
parse_memarg {n} : byte_parser memarg n := (fun ao => match ao with | (a, o) => {| memarg_offset := o; memarg_align := a |} end) <$> (parse_alignment_exponent <&> parse_static_offset).
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_memarg
| |
parse_i32_load {n} : byte_parser basic_instruction n := exact_byte x28 &> ((BI_load T_i32 None) <$> parse_memarg).
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_i32_load
| |
parse_i64_load {n} : byte_parser basic_instruction n := exact_byte x29 &> ((BI_load T_i64 None) <$> parse_memarg).
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_i64_load
| |
parse_f32_load {n} : byte_parser basic_instruction n := exact_byte x2a &> ((BI_load T_f32 None) <$> parse_memarg).
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_f32_load
| |
parse_f64_load {n} : byte_parser basic_instruction n := exact_byte x2b &> ((BI_load T_f64 None) <$> parse_memarg).
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_f64_load
| |
parse_i32_load8_s {n} : byte_parser basic_instruction n := exact_byte x2c &> ((BI_load T_i32 (Some (Tp_i8, SX_S))) <$> parse_memarg).
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_i32_load8_s
| |
parse_i32_load8_u {n} : byte_parser basic_instruction n := exact_byte x2d &> ((BI_load T_i32 (Some (Tp_i8, SX_U))) <$> parse_memarg).
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_i32_load8_u
| |
parse_i32_load16_s {n} : byte_parser basic_instruction n := exact_byte x2e &> ((BI_load T_i32 (Some (Tp_i16, SX_S))) <$> parse_memarg).
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_i32_load16_s
| |
parse_i32_load16_u {n} : byte_parser basic_instruction n := exact_byte x2f &> ((BI_load T_i32 (Some (Tp_i16, SX_U))) <$> parse_memarg).
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_i32_load16_u
| |
parse_i64_load8_s {n} : byte_parser basic_instruction n := exact_byte x30 &> ((BI_load T_i64 (Some (Tp_i8, SX_S))) <$> parse_memarg).
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_i64_load8_s
| |
parse_i64_load8_u {n} : byte_parser basic_instruction n := exact_byte x31 &> ((BI_load T_i64 (Some (Tp_i8, SX_U))) <$> parse_memarg).
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_i64_load8_u
| |
parse_i64_load16_s {n} : byte_parser basic_instruction n := exact_byte x32 &> ((BI_load T_i64 (Some (Tp_i16, SX_S))) <$> parse_memarg).
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_i64_load16_s
| |
parse_i64_load16_u {n} : byte_parser basic_instruction n := exact_byte x33 &> ((BI_load T_i64 (Some (Tp_i16, SX_U))) <$> parse_memarg).
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_i64_load16_u
| |
parse_i64_load32_s {n} : byte_parser basic_instruction n := exact_byte x34 &> ((BI_load T_i64 (Some (Tp_i32, SX_S))) <$> parse_memarg).
|
Definition
|
theories
|
[
"From Wasm Require Import datatypes_properties typing leb128 utf8.",
"From compcert Require Import Integers.",
"From parseque Require Import Parseque.",
"Require Import Strings."
] |
theories/binary_format_parser.v
|
parse_i64_load32_s
|
Structured dataset from WasmCert-Coq — WebAssembly formalization.
2,447 declarations extracted from Coq source files.
| Column | Type | Description |
|---|---|---|
| fact | string | Declaration body |
| type | string | Lemma, Definition, Theorem, etc. |
| library | string | Source module |
| imports | list | Required imports |
| filename | string | Source file path |
| symbolic_name | string | Identifier |