table fix

This commit is contained in:
Rachel Lambda Samuelsson 2024-07-17 18:44:37 +02:00
parent 96e99061e9
commit bfa3365255

View File

@ -76,43 +76,21 @@ data Inst
All stacks grow from right to left, that is, the left most element is at the top of the stack. All stacks grow from right to left, that is, the left most element is at the top of the stack.
{% katexmm %} <style>
<table> th { text-align: left; }
<tr> </style>
<th align=center colspan="3">Before</th><th align=center colspan="3">After</th> | Before | | | After | | |
</tr> | ----------------------------------- | --- | -------------------------------- | ------- | ------ | --------------------------------------- |
<tr> | Control | Env | Stack | Control | Env | Stack |
<th>Control</th><th>Env</th><th>Stack</th><th>Control</th><th>Env</th><th>Stack</th> | Const i : c | e | s | c | e | i : s |
</tr> | Global i : c | e | s | c | e | Globals\[i\] : s |
<tr> | Local i : c | e | s | c | e | e\[i\] : s |
<td>Const i : c</td><td>e</td><td>s</td><td>c</td><td>e</td><td>i : s</td> | Closure n a : $c\_1$ ... $c\_n$ : c | e | s | c | e | Closure a {e} \[$c\_1$ ... $c\_n$\] : s |
</tr> | App : c | e | Closure {e'} \[c'\] : v : s | c' | v : e' | Closure⁰ {e} \[c\] : s |
<tr> | App : c | e | Closureⁿ {e'} \[c'\] : v : s | c | e | Closureⁿ⁻¹ {v : e'} \[c'\] : s |
<td>Global i : c</td><td>e</td><td>s</td><td>c</td><td>e</td><td>Globals[i] : s</td> | Ret : c | e | v : Closure⁰ {e'} \[c'\] : s | c' | e' | v : s |
</tr> | Dup : c | e | v : s | c | e | v : v : s |
<tr> | Add : c | e | v : s | c | e | v + v : s |
<td>Local i : c</td><td>e</td><td>s</td><td>c </td><td> e</td><td>e[i] : s</td>
</tr>
<tr>
<td>Closure n a : $c_1$ ... $c_n$ : c</td><td>e</td><td>s</td><td>c</td><td>e</td><td>Closure a {e} [$c_1$ ... $c_n$] : s</td>
</tr>
<tr>
<td>App : c</td><td>e</td><td>Closure {e'} [c'] : v : s</td><td>c'</td><td>v : e'</td><td>Closure$^0$ {e} [c] : s</td>
</tr>
<tr>
<td>App : c</td><td>e</td><td>Closure$^n$ {e'} [c'] : v : s</td><td>c</td><td>e</td><td>Closure$^{n - 1}$ {v : e'} [c'] : s</td>
</tr>
<tr>
<td>Ret : c </td><td>e</td><td>v : Closure$^0$ \{e'\} [c'] : s </td><td> c'</td><td>e' </td><td> v : s</td>
</tr>
<tr>
<td>Dup : c</td><td>e</td><td>v : s</td><td>c</td><td>e</td><td>v : v : s</td>
</tr>
<tr>
<td>Add : c </td><td>e</td><td>v : s</td><td>c</td><td>e</td><td>v + v : s</td>
</tr>
</table>
{% endkatexmm %}
### An example ### An example