Closed aochagavia closed 7 years ago
Create sets.
All gotos target existing labels.
ERROR
otherwise. All labels should be used, no dead code.
WARNING
otherwise.What is the problem with skipped labels? If we already check for the above
"Collect all labels into a set" finds the labels present in the program. The point is that unused labels aren't present in the program.
The no unused labels check is implemented in commit f61be97949e9be24e0c40a6e008cb84ac714f076.
Unused labels already didn't end up in the source code.
@ReinierMaas the checks are performed on the Program
data type, before translating it to code.
Okay, that clears that up. Checked the code this time, with tests!
The no dead check code is implemented in commit c788dc85418c0c9ba7333da1c6593c3da33b2ef5. This led to some code duplication which I've fixed as well.
It looks like all properties are checked now, so I'm closing this issue.
We need to check the following properties (see
Language.Fragment.hs
at the bottom):