Commit 389f6cc
Reduction semantics (#109)
* Reduction semantics
This patch populates the "Execution" section of the Explainer document
with the reduction rules for stack switching.
* Some type expansions
* Fix minor typo, hdl => hdl1
* Fix typo: stray '
* Address Andreas' feedback
* Remove stray ^
* Incorporated comments
Incorporated comments from before
The biggest thing I am unsure of is lines 814 and 826. This pertains to what point the tag argument of suspend and switch is translated into a tag address. Doing it in the reduction rule for resume (as was the case in the previous version of Explainer.md) is wrong, for reasons explained in the comment I wrote at the time. I believe I was told in the actual implementation, the change happens during the validation phase, which is why I propose these lines 814 and 826; however my phrasing can perhaps be improved.
* rectified the suspend address translation to its correct place
Incorporating Thomas Lively's comment, I have rectified the spot where suspend and switch translate the tag index into a tag address, by creating new instructions suspend.addr and switch.addr that take addresses (rather than indices) as arguments. This allows for a rule focused on translating suspend to suspend.addr (and likewise for switch), enforcing that the correct wasm frame F is used.
* Update proposals/stack-switching/Explainer.md
Co-authored-by: Thomas Lively <tlively123@gmail.com>
* Fix resume_throw semantics
* Update proposals/stack-switching/Explainer.md
Committing tlively's suggested change
Co-authored-by: Thomas Lively <tlively123@gmail.com>
* Update proposals/stack-switching/Explainer.md
Committing tlively's suggested change
Co-authored-by: Thomas Lively <tlively123@gmail.com>
* Applied all suggested changes except taguse
Applied all suggested changes except taguse which is the last remaining issue
* Added tag uses
* using taguse in hdl too
* factored typing rules and added keyword 'on' where now necessary
* Typo in typing rule for tag addresses
* corrected $a to $e and added switch failure rules
---------
Co-authored-by: mlegoupil <90708290+mlegoupil@users.noreply.github.com>
Co-authored-by: Sam Lindley <Sam.Lindley@ed.ac.uk>
Co-authored-by: Thomas Lively <tlively123@gmail.com>1 parent 804a076 commit 389f6cc
1 file changed
Lines changed: 133 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
923 | 923 | | |
924 | 924 | | |
925 | 925 | | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
926 | 935 | | |
927 | 936 | | |
928 | 937 | | |
| |||
968 | 977 | | |
969 | 978 | | |
970 | 979 | | |
971 | | - | |
| 980 | + | |
972 | 981 | | |
973 | | - | |
974 | | - | |
975 | | - | |
| 982 | + | |
| 983 | + | |
976 | 984 | | |
977 | 985 | | |
978 | 986 | | |
979 | 987 | | |
980 | | - | |
981 | | - | |
982 | | - | |
| 988 | + | |
| 989 | + | |
983 | 990 | | |
984 | | - | |
| 991 | + | |
985 | 992 | | |
986 | | - | |
987 | | - | |
988 | | - | |
| 993 | + | |
| 994 | + | |
989 | 995 | | |
990 | | - | |
| 996 | + | |
991 | 997 | | |
992 | 998 | | |
993 | | - | |
994 | | - | |
995 | | - | |
| 999 | + | |
| 1000 | + | |
996 | 1001 | | |
997 | 1002 | | |
998 | 1003 | | |
| |||
1017 | 1022 | | |
1018 | 1023 | | |
1019 | 1024 | | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
1020 | 1137 | | |
1021 | 1138 | | |
1022 | 1139 | | |
| |||
1040 | 1157 | | |
1041 | 1158 | | |
1042 | 1159 | | |
1043 | | - | |
| 1160 | + | |
1044 | 1161 | | |
1045 | 1162 | | |
1046 | 1163 | | |
| |||
0 commit comments