Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional errors and warnings #23

Open
2 of 13 tasks
Calvin-L opened this issue Apr 2, 2018 · 1 comment
Open
2 of 13 tasks

Additional errors and warnings #23

Calvin-L opened this issue Apr 2, 2018 · 1 comment

Comments

@Calvin-L
Copy link
Collaborator

Calvin-L commented Apr 2, 2018

Cozy currently issues errors for a number of things: typechecking failures, misuses of the, invariant preservation failures, and so on. There are also things it should warn about but does not.

  • Attach line number information to syntax trees during parsing so that Cozy's error messages can show location information
  • Identifiers may not start with underscores (Cozy generates fresh names by prefixing them with _)
  • Taking the min or max of an empty collection.
  • Boolean expressions that are always true or always false. (These can be caused by developer mistakes or by the limitations of bounded verification.)
  • String literals are not fully supported (See Solver cannot deal with string literals #20)
  • No two functions (query specifications or extern functions) may have the same name (This is a defensive measure that protects against bugs in the rest of Cozy.)
  • Two arguments to a function cannot have the same name (This is a defensive measure that protects against bugs in the rest of Cozy.)
  • Two state variables cannot have the same name (This is a defensive measure that protects against bugs in the rest of Cozy.)
  • No function argument may have the same name as a state variable (This is a defensive measure that protects against bugs in the rest of Cozy.)
  • If a method calls a query, it must satisfy that query's preconditions where the call is made
  • you are not allowed to remove missing elements from a bag or set
  • all arguments mentioned in the definitions of extern functions should be actual arguments to the function
  • all abstract state variables should be read by some query or update operation
Calvin-L added a commit that referenced this issue Jul 2, 2018
This addresses one of the points in #23.
Calvin-L added a commit that referenced this issue Jul 10, 2018
@izgzhen
Copy link
Collaborator

izgzhen commented Oct 14, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants