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

Feature request: Add more default types (and use them in examples and tutorials) #741

Open
marcoeilers opened this issue Sep 18, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@marcoeilers
Copy link
Contributor

Viper would benefit from having some additional built-in types.

For example, lots of Viper examples (e.g. in the tutorial) abstract list data structures on the heap to Viper's pure sequences. Sequences, however, often require additional assertions to prove simple properties. Automation would likely (I have some examples) be much better if we used a Nil-Cons-List-ADT instead. Thanks to the ADT plugin, we could of course do that (and get better automation), but due to the fact that sequences are built-in whereas lists must be self-declared, and sequences are advertised in the tutorial, most users will default to sequences. If Lists were built-in, Viper could offer convenient syntax that's standard in many other languages, like x :: xs.

On a similar note, @jcp19 recently requested a built-in pair (or more general tuple?) type with simple syntax (e.g., the obvious (e1, e2) syntax for constructing pairs).

If extending the core Viper language is not desirable, such additional default types could also be a part of a teaching-focused version of Viper (as opposed to standard Viper which also or mostly targets frontends) that has been discussed before and could be implemented as a plugin.

@marcoeilers marcoeilers added the enhancement New feature or request label Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant