diekmann / Iptables_Semantics

Verified iptables Firewall Ruleset Analysis
http://iptables.isabelle.systems/
BSD 2-Clause "Simplified" License
96 stars 13 forks source link

[Isabelle + Haskell] Reasonable error messages #75

Open diekmann opened 8 years ago

diekmann commented 8 years ago

The fffuu Haskell tool fails with the error message "undefined" if some precondition of the Isabelle-generated code does not hold. For example, Isabelle assumes that an ipassmt does not have wildcard interface names in it. For safety reasons, the Isabelle-generated code checks preconditions at runtime. If it fails, it just aborts with "undefined". There are many different cases how this undefined can be triggered. It is almost impossible to debug which "undefined" triggered. Feature request: human-readable error messages for each undefined!

diekmann commented 8 years ago

TODOs: Asses where safe versions of Isabelle-generated functions can be exported without cluttering the code with error handling. If Isabelle-generated functions are called wrongly, then this is a coding error and an exception is fine. If functions are given an unsupported input at runtime and we need to explain to the user what the error was, we probably want safe functions. What does Isabelle Monad syntax provide? Functions that should only be exported in their safe version:

diekmann commented 8 years ago

Using rewrite_Goto_safe and unfold_ruleset_CHAIN_safe consistently now.