You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is an attempt to log the various problems with the current approach.
Functions. Translating a Whiley function as a boogie function is fraught with difficulties (why?). A better solution would be to translate them as procedures. This has a bunch of knock-on effects. In particular, we cannot use preconditions / postconditions in procedures. Instead, we must use assume and assert statements. Also, it means function calls have to be pulled out of expressions. In effect, we end up with something much closer to bytecode.
Properties. These are translated into boogie functions. But, how do we enforce their preconditions / postconditions (e.g. parameter / return types). Likewise, internal consistency requirements, such as indices within bounds? Potentially, a separate property check procedure is required for this.
Control Flow. Current challenges with extracting method calls from conditions mean that we often fall back to unstructured control-flow (e.g. for loops). Overall, I thing its simply better to do this all the time.
Boxing / Unboxing. It should be possible to eliminate the need for boxing / unboxing. This can done using algebraic datatypes, and types like Vec. See also Boogie Sequences #109. Questions remain around the heap and template.
Types. Dafny uses something like <A>[ref, Field A]A for representing parts of the heap (see Memory T below). Boogie also has built-in support for "sequences" (see here), and supports tuple assignments.
Casts. These appear to be a problem in my current design.
Error Reporting. You can supply messages in assertions which can help with error reporting (see here). Syntax is {:msg "your text goes here"}
(see also #72, #120 and #142)
This is an attempt to log the various problems with the current approach.
functionas a boogiefunctionis fraught with difficulties (why?). A better solution would be to translate them asprocedures. This has a bunch of knock-on effects. In particular, we cannot use preconditions / postconditions inprocedures. Instead, we must useassumeandassertstatements. Also, it means function calls have to be pulled out of expressions. In effect, we end up with something much closer to bytecode.procedureis required for this.Vec. See also Boogie Sequences #109. Questions remain around the heap and template.<A>[ref, Field A]Afor representing parts of the heap (seeMemory Tbelow). Boogie also has built-in support for "sequences" (see here), and supports tuple assignments.{:msg "your text goes here"}