Skip to content

Commit 8a73ca5

Browse files
committed
[spectec] Fix rule SUB-STR in IL semantics
1 parent 6a6876a commit 8a73ca5

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

spectec/doc/semantics/il/5-reduction.spectec

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -394,11 +394,12 @@ rule Step_exp/SUB-LIST:
394394
S |- SUB (LIST e*) (ITER t_1 STAR) (ITER t_2 STAR) ~> LIST (SUB e t_1 t_2)*
395395

396396
rule Step_exp/SUB-STR:
397-
S |- SUB (STR (at `= e)*) (VAR x_1 a_1*) (VAR x_2 a_2*) ~> STR (at' `= SUB e t_1 t_2)*
397+
S |- SUB (STR ef*) (VAR x_1 a_1*) (VAR x_2 a_2*) ~> STR (at `= SUB e t_1 t_2)*
398398
-- Expand_typ: S |- VAR x_1 a_1* => STRUCT tf_1*
399399
-- Expand_typ: S |- VAR x_2 a_2* => STRUCT tf_2*
400-
-- (if (at' `: t_1 `- `{q_1*} pr_1*) <- tf_1*)*
401-
-- (if (at' `: t_2 `- `{q_2*} pr_2*) = tf_2)*
400+
-- (if (at `: t_2 `- `{q_2*} pr_2*) = tf_2)*
401+
-- (if (at `: t_1 `- `{q_1*} pr_1*) <- tf_1*)*
402+
-- (if (at `= e) <- ef*)*
402403

403404
rule Step_exp/SUB-CASE:
404405
S |- SUB (INJ op e) (VAR x_1 a_1*) (VAR x_2 a_2*) ~> INJ op (SUB e t_1 t_2)

0 commit comments

Comments
 (0)