Skip to content

Commit

Permalink
fix obsolete bit concatenation notation
Browse files Browse the repository at this point in the history
  • Loading branch information
sayon committed Sep 25, 2023
1 parent 8fb42f5 commit f493f89
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
16 changes: 8 additions & 8 deletions src/Glossary.v
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
$$\mathit{[start, limit) := \{n | start \leq n \lt limit\}}$$
In other words, start is included, and limit is excluded.
In other words, start of the range is included, and limit is excluded.
- Accessing subranges of a binary representation of a number is denoted with $\{\}$.
For example, this denotes a binary number obtained by taking bits from 128-th
to 255-th, both inclusive, of the value $\mathit{op}$:
- Accessing subranges of a binary representation of a number is denoted with $\{low, high\}$.
For example, this denotes a binary number obtained by taking bits from 128-th inclusive to
to 256-th exclusive of the value $\mathit{op}$:
$$\mathit{op}\{255, 128\}$$
$$\mathit{op}\{128, 256\}$$
- Concatenation of sequences of binary numbers is denoted with $||$
- Concatenation of sequences of binary numbers is denoted with $\#\#$
For example, this denotes concatenating bit representations of the numbers $a$ and $b$:
$$a || b$$
For example, the following denotes concatenating bit representations of the numbers $a$ and $b$:
$$a \#\# b$$
*)

(**
Expand Down
2 changes: 1 addition & 1 deletion src/sem/PtrAdd.v
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ $$\mathit{ptr_{out}} := \mathit{ptr_{in}} | _\mathit{offset := offset + diff}$$
6. Store the result, tagged as a pointer, to `out`. The most significant 128 bits of result are taken from `op1`, the least significant bits hold an encoded pointer:
$$result := \mathit{op_1}\{255\dots128\} || \texttt{encode}(\mathit{ptr_{out}})$$
$$result := \mathit{op_1}\{255\dots128\} \#\# \texttt{encode}(\mathit{ptr_{out}})$$
*)
Inductive step_ptradd : instruction -> smallstep :=
Expand Down
2 changes: 1 addition & 1 deletion src/sem/PtrPack.v
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ See Usage.
3. Ensure that the lower 128 bits of $\mathit{op}_2$ are zero. Otherwise panic.
4. Store the result, tagged as a pointer, to `out`:
$$result := \mathit{op_1}\{255\dots128\} || \mathit{op_2}\{128\dots 0\}$$
$$result := \mathit{op_1}\{255\dots128\} \#\# \mathit{op_2}\{128\dots 0\}$$
*)

| step_PtrPack :
Expand Down
2 changes: 1 addition & 1 deletion src/sem/PtrShrink.v
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ $$\mathit{ptr_{out}} := \mathit{ptr_{in}} | _\mathit{length := length - diff}$$
6. Store the result, tagged as a pointer, to `out`:
$$result := \mathit{op_1}\{255\dots128\} || \texttt{encode}(\mathit{ptr_{out}})$$
$$result := \mathit{op_1}\{255\dots128\} \#\# \texttt{encode}(\mathit{ptr_{out}})$$
*)

| step_PtrShrink :
Expand Down
2 changes: 1 addition & 1 deletion src/sem/PtrSub.v
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ $$\mathit{ptr_{out}} := \mathit{ptr_{in}} | _\mathit{offset := offset - diff}$$
6. Store the result, tagged as a pointer, to `out`. The most significant 128 bits of result are taken from `op1`, the least significant bits hold an encoded pointer:
$$result := \mathit{op_1}\{255\dots128\} || \texttt{encode}(\mathit{ptr_{out}})$$
$$result := \mathit{op_1}\{255\dots128\} \#\# \texttt{encode}(\mathit{ptr_{out}})$$
*)
Inductive step_ptrsub : instruction -> smallstep :=
Expand Down

0 comments on commit f493f89

Please sign in to comment.