Extend /testContracts
to be able to test contracts on any function/method
#3151
Labels
kind: enhancement
Enhancements, feature requests, etc. These are NOT bugs, but ways we can improve Dafny
Summary
It could be useful to allow any (compilable) contract clause to be checked at runtime. This would make it possible to test code that's difficult to prove. In the extreme case, you could compile with this turned on and
/noVerify
and have a system more like Eiffel.Background and Motivation
PR #2712 introduced the
/testContracts
flag, which adds runtime checks for certain functions and methods. In particular it supports checking contracts dynamically on either:The original goal was to extend this to support a larger range of code, and not leave it restricted to externs.
Proposed Feature
Add a parameter to
/testContracts
, perhaps/testContracts:All
to insert runtime checks for all compilable contract clauses (with warnings for any that aren't compilable, as are already present for externs).Alternatives
No response
The text was updated successfully, but these errors were encountered: