[spec] Define soundness rules in SpecTec#2125
Conversation
|
A comment on the soundness appendix -- is there any plan of adding a definition for the validity of the typing context C itself (which probably just says that all types in C.Types are valid)? Unlike pre-3.0, the type system is quite rich currently, and C.Types can contain ill-formed types in itself (e.g. invalid deftypes/heaptypes etc). The validity of C is required to prove that intermediate matchings for deftypes/heaptypes are correct. |
|
@raoxiaojia, good point. Yes, at this point we need that, too. I'll look into it. |
|
@raoxiaojia, I just pushed a commit that adds a wf-rule for contexts. Can you please check if it makes sense to you? |
|
@rossberg Looks mostly fine, except this line which I'm unsure: I would have thought Upd: I guess using but that seems to be also fine because |
|
You're right, thanks for spotting! Fixed. |
|
Ah, sorry, propagated now. |
Yes, the prose generator was somewhat overfitted to specific relation forms. I have fixed it so that it can robustly handle the new relation formats. The rendered prose is still somewhat naive and may occasionally require a prose hint, but the generator should no longer crash in most cases. |
|
Hi @f52985, thanks for the hotfix! That works, but when I renamed
|
Done. Now it automatically detects the validation rules, based on the dependencies, removing all the hardcodings. |
|
@f52985, oh excellent, thanks for the super-fast granting of my wishes! Since this PR already landed, can you please create a new one with that change? |
|
Sure, I opened the new PR: #2147 |
Formulate extra rules from Type Soundness Appendix in SpecTec. Also closes #2141 and #2142.
Fix SpecTec sideconditions pass to not generate vacuous iterated premises.
@f52985, the prose backend crashes failing to find one of the added relations. That may have to do with the preceding "Yet" warning from
translate_rulepr, which IIUC means that something is unimplemented in the backend. Can you please have a look?