goblint / cil

C Intermediate Language
https://goblint.github.io/cil/
Other
40 stars 16 forks source link

Add standalone expression AST checking #96

Closed sim642 closed 2 years ago

sim642 commented 2 years ago

This adds a function Check.checkStandaloneExp which allows checking a standalone expression (not an entire file). It allows working around #95 (and maybe #94) by first checking if the invariant parsed from a witness has valid AST and ignoring the invalid ones. This is better than having the respective crash come from deep within Goblint, where it's not obvious whose fault it is, and prevents garbage-in–garbage-out.