viperproject / viperproject/silver
Automatically rewrite 'i in [a..b)' expressions
Nobody has claimed this yet.
- Dominant language
- Scala
- Stars
- 100
- Forks
- 53
- Avg merge
- 8h 10m
- Merged PRs (30d)
- 2
Description
Created by @mschwerhoff on 2015-08-07 06:22
Last updated on 2015-08-07 06:23
Given the current sequence axiomatisation, expressions of the shape i in [a..b) are known to cause performance problems. Rewriting such expressions to a <= i && i < b is tempting, but not always wise. For example
-
When inhaling a quantifier whose body has no expression other than
i in [a..b)that can be used as a trigger, e.g.var x: Int inhale forall i: Int :: i in [0..10) ==> x > i -
When inhaling a quantifier for which
i in [a..b)has been explicitly chosen as a trigger, e.g.var x: Int inhale forall i: Int :: {i in [0..10)} i in [0..10) && f(i) ==> x > i ... var i: Int inhale i in [0..10) exhale x > i
We should therefore carefully consider if we want to rewrite such expressions at all, or if we want to inform the user that they should consider rewriting them manually; and if we wanted to, when to rewrite them.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files, tests, or entry points. Start by locating the sequence axiomatisation and the handling of i in [a..b) expressions, then determine when rewriting is sound and beneficial; done means an agreed rewriting policy or user guidance that addresses the supplied quantifier and trigger examples.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100