Skip to content

Commit b0ec1f3

Browse files
committed
[spec] Fix typos in definitions
1 parent acebe27 commit b0ec1f3

6 files changed

Lines changed: 23 additions & 23 deletions

File tree

‎specification/wasm-3.0/5.1-binary.values.spectec‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ grammar Bu64 : u64 = BuN(64)
2828

2929
grammar Bs33 : s33 = BsN(33)
3030

31-
grammar Bi32 : i32 = BuN(32)
32-
grammar Bi64 : i64 = BuN(64)
31+
grammar Bi32 : i32 = BiN(32)
32+
grammar Bi64 : i64 = BiN(64)
3333

3434
grammar Bf32 : f32 = BfN(32)
3535
grammar Bf64 : f64 = BfN(64)
@@ -46,7 +46,7 @@ grammar Blist(grammar BX : el) : el* =
4646
var ch : char
4747

4848
def $cont(byte) : nat hint(macro none)
49-
def $cont(b) = $(b - 0x80) -- if (0x80 < b < 0xC0)
49+
def $cont(b) = $(b - 0x80) -- if 0x80 <= b < 0xC0
5050

5151
;; def $utf8(char*) : byte*
5252
def $utf8(ch*) = $concat_(byte, $utf8single(ch)*)

‎specification/wasm-latest/5.1-binary.values.spectec‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ grammar Bu64 : u64 = BuN(64)
2828

2929
grammar Bs33 : s33 = BsN(33)
3030

31-
grammar Bi32 : i32 = BuN(32)
32-
grammar Bi64 : i64 = BuN(64)
31+
grammar Bi32 : i32 = BiN(32)
32+
grammar Bi64 : i64 = BiN(64)
3333

3434
grammar Bf32 : f32 = BfN(32)
3535
grammar Bf64 : f64 = BfN(64)
@@ -46,7 +46,7 @@ grammar Blist(grammar BX : el) : el* =
4646
var ch : char
4747

4848
def $cont(byte) : nat hint(macro none)
49-
def $cont(b) = $(b - 0x80) -- if (0x80 < b < 0xC0)
49+
def $cont(b) = $(b - 0x80) -- if 0x80 <= b < 0xC0
5050

5151
;; def $utf8(char*) : byte*
5252
def $utf8(ch*) = $concat_(byte, $utf8single(ch)*)

‎spectec/test-frontend/TEST.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -778,7 +778,7 @@ syntax char =
778778
def $cont(byte : byte) : nat
779779
;; ../../../../specification/wasm-latest/5.1-binary.values.spectec
780780
def $cont{b : byte}(b) = (((b!`%`_byte.0 : nat <:> int) - (128 : nat <:> int)) : int <:> nat)
781-
-- if ((128 < b!`%`_byte.0) /\ (b!`%`_byte.0 < 192))
781+
-- if ((128 <= b!`%`_byte.0) /\ (b!`%`_byte.0 < 192))
782782

783783
;; ../../../../specification/wasm-latest/5.1-binary.values.spectec
784784
def $utf8single(char : char) : byte*
@@ -8774,12 +8774,12 @@ grammar Bs33 : s33
87748774
;; ../../../../specification/wasm-latest/5.1-binary.values.spectec
87758775
grammar Bi32 : i32
87768776
;; ../../../../specification/wasm-latest/5.1-binary.values.spectec
8777-
prod{`<implicit-prod-result>` : uN(32)} `<implicit-prod-result>`:BuN(32) => `<implicit-prod-result>`
8777+
prod{`<implicit-prod-result>` : iN(32)} `<implicit-prod-result>`:BiN(32) => `<implicit-prod-result>`
87788778

87798779
;; ../../../../specification/wasm-latest/5.1-binary.values.spectec
87808780
grammar Bi64 : i64
87818781
;; ../../../../specification/wasm-latest/5.1-binary.values.spectec
8782-
prod{`<implicit-prod-result>` : uN(64)} `<implicit-prod-result>`:BuN(64) => `<implicit-prod-result>`
8782+
prod{`<implicit-prod-result>` : iN(64)} `<implicit-prod-result>`:BiN(64) => `<implicit-prod-result>`
87838783

87848784
;; ../../../../specification/wasm-latest/5.1-binary.values.spectec
87858785
grammar Bf32 : f32

‎spectec/test-latex/TEST.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11526,8 +11526,8 @@ $$
1152611526
& {\mathtt{u32}} & ::= & {{\mathtt{u}}}{32} \\
1152711527
& {\mathtt{u64}} & ::= & {{\mathtt{u}}}{64} \\
1152811528
& {\mathtt{s33}} & ::= & {{\mathtt{s}}}{33} \\
11529-
& {\mathtt{i32}} & ::= & {{\mathtt{u}}}{32} \\
11530-
& {\mathtt{i64}} & ::= & {{\mathtt{u}}}{64} \\
11529+
& {\mathtt{i32}} & ::= & {{\mathtt{i}}}{32} \\
11530+
& {\mathtt{i64}} & ::= & {{\mathtt{i}}}{64} \\
1153111531
& {\mathtt{f32}} & ::= & {{\mathtt{f}}}{32} \\
1153211532
& {\mathtt{f64}} & ::= & {{\mathtt{f}}}{64} \\
1153311533
\end{array}
@@ -11545,7 +11545,7 @@ $$
1154511545

1154611546
$$
1154711547
\begin{array}[t]{@{}lcl@{}l@{}}
11548-
{\mathrm{cont}}(b) & = & b - \mathtt{0x80} & \quad \mbox{if}~ (\mathtt{0x80} < b < \mathtt{0xC0}) \\
11548+
{\mathrm{cont}}(b) & = & b - \mathtt{0x80} & \quad \mbox{if}~ \mathtt{0x80} \leq b < \mathtt{0xC0} \\
1154911549
\end{array}
1155011550
$$
1155111551

‎spectec/test-middlend/TEST.md‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ syntax char =
301301
def $cont(byte : byte) : nat
302302
;; ../../../../specification/wasm-latest/5.1-binary.values.spectec
303303
def $cont{b : byte}(b) = (((b!`%`_byte.0 : nat <:> int) - (128 : nat <:> int)) : int <:> nat)
304-
-- if ((128 < b!`%`_byte.0) /\ (b!`%`_byte.0 < 192))
304+
-- if ((128 <= b!`%`_byte.0) /\ (b!`%`_byte.0 < 192))
305305

306306
;; ../../../../specification/wasm-latest/5.1-binary.values.spectec
307307
def $utf8single(char : char) : byte*
@@ -8297,12 +8297,12 @@ grammar Bs33 : s33
82978297
;; ../../../../specification/wasm-latest/5.1-binary.values.spectec
82988298
grammar Bi32 : i32
82998299
;; ../../../../specification/wasm-latest/5.1-binary.values.spectec
8300-
prod{`<implicit-prod-result>` : uN(32)} `<implicit-prod-result>`:BuN(32) => `<implicit-prod-result>`
8300+
prod{`<implicit-prod-result>` : iN(32)} `<implicit-prod-result>`:BiN(32) => `<implicit-prod-result>`
83018301

83028302
;; ../../../../specification/wasm-latest/5.1-binary.values.spectec
83038303
grammar Bi64 : i64
83048304
;; ../../../../specification/wasm-latest/5.1-binary.values.spectec
8305-
prod{`<implicit-prod-result>` : uN(64)} `<implicit-prod-result>`:BuN(64) => `<implicit-prod-result>`
8305+
prod{`<implicit-prod-result>` : iN(64)} `<implicit-prod-result>`:BiN(64) => `<implicit-prod-result>`
83068306

83078307
;; ../../../../specification/wasm-latest/5.1-binary.values.spectec
83088308
grammar Bf32 : f32
@@ -12207,7 +12207,7 @@ syntax char =
1220712207
def $cont(byte : byte) : nat
1220812208
;; ../../../../specification/wasm-latest/5.1-binary.values.spectec
1220912209
def $cont{b : byte}(b) = (((b!`%`_byte.0 : nat <:> int) - (128 : nat <:> int)) : int <:> nat)
12210-
-- if ((128 < b!`%`_byte.0) /\ (b!`%`_byte.0 < 192))
12210+
-- if ((128 <= b!`%`_byte.0) /\ (b!`%`_byte.0 < 192))
1221112211

1221212212
;; ../../../../specification/wasm-latest/5.1-binary.values.spectec
1221312213
def $utf8single(char : char) : byte*
@@ -20212,12 +20212,12 @@ grammar Bs33 : s33
2021220212
;; ../../../../specification/wasm-latest/5.1-binary.values.spectec
2021320213
grammar Bi32 : i32
2021420214
;; ../../../../specification/wasm-latest/5.1-binary.values.spectec
20215-
prod{`<implicit-prod-result>` : uN(32)} `<implicit-prod-result>`:BuN(32) => `<implicit-prod-result>`
20215+
prod{`<implicit-prod-result>` : iN(32)} `<implicit-prod-result>`:BiN(32) => `<implicit-prod-result>`
2021620216

2021720217
;; ../../../../specification/wasm-latest/5.1-binary.values.spectec
2021820218
grammar Bi64 : i64
2021920219
;; ../../../../specification/wasm-latest/5.1-binary.values.spectec
20220-
prod{`<implicit-prod-result>` : uN(64)} `<implicit-prod-result>`:BuN(64) => `<implicit-prod-result>`
20220+
prod{`<implicit-prod-result>` : iN(64)} `<implicit-prod-result>`:BiN(64) => `<implicit-prod-result>`
2022120221

2022220222
;; ../../../../specification/wasm-latest/5.1-binary.values.spectec
2022320223
grammar Bf32 : f32
@@ -24122,7 +24122,7 @@ syntax char =
2412224122
def $cont(byte : byte) : nat
2412324123
;; ../../../../specification/wasm-latest/5.1-binary.values.spectec
2412424124
def $cont{b : byte}(b) = (((b!`%`_byte.0 : nat <:> int) - (128 : nat <:> int)) : int <:> nat)
24125-
-- if ((128 < b!`%`_byte.0) /\ (b!`%`_byte.0 < 192))
24125+
-- if ((128 <= b!`%`_byte.0) /\ (b!`%`_byte.0 < 192))
2412624126

2412724127
;; ../../../../specification/wasm-latest/5.1-binary.values.spectec
2412824128
def $utf8single(char : char) : byte*
@@ -32369,12 +32369,12 @@ grammar Bs33 : s33
3236932369
;; ../../../../specification/wasm-latest/5.1-binary.values.spectec
3237032370
grammar Bi32 : i32
3237132371
;; ../../../../specification/wasm-latest/5.1-binary.values.spectec
32372-
prod{`<implicit-prod-result>` : uN(32)} `<implicit-prod-result>`:BuN(32) => `<implicit-prod-result>`
32372+
prod{`<implicit-prod-result>` : iN(32)} `<implicit-prod-result>`:BiN(32) => `<implicit-prod-result>`
3237332373

3237432374
;; ../../../../specification/wasm-latest/5.1-binary.values.spectec
3237532375
grammar Bi64 : i64
3237632376
;; ../../../../specification/wasm-latest/5.1-binary.values.spectec
32377-
prod{`<implicit-prod-result>` : uN(64)} `<implicit-prod-result>`:BuN(64) => `<implicit-prod-result>`
32377+
prod{`<implicit-prod-result>` : iN(64)} `<implicit-prod-result>`:BiN(64) => `<implicit-prod-result>`
3237832378

3237932379
;; ../../../../specification/wasm-latest/5.1-binary.values.spectec
3238032380
grammar Bf32 : f32

‎spectec/test-prose/TEST.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22133,7 +22133,7 @@ The instruction sequence :math:`(\mathsf{block}~{\mathit{blocktype}}~{{\mathit{i
2213322133
..........................
2213422134

2213522135

22136-
1. Assert: Due to validation, :math:`128 < b`.
22136+
1. Assert: Due to validation, :math:`128 \leq b`.
2213722137

2213822138
#. Assert: Due to validation, :math:`b < 192`.
2213922139

@@ -31977,7 +31977,7 @@ canon_ N
3197731977
1. Return (2 ^ ($signif(N) - 1)).
3197831978

3197931979
cont b
31980-
1. Assert: Due to validation, (128 < b).
31980+
1. Assert: Due to validation, (128 <= b).
3198131981
2. Assert: Due to validation, (b < 192).
3198231982
3. Return (b - 128).
3198331983

0 commit comments

Comments
 (0)