Skip to content

make trigger-generation code less sensitive to arithmetic #67

Open
@viper-admin

Description

@viper-admin

Created by @alexanderjsummers on 2014-11-10 14:32
Last updated on 2018-06-09 12:24

In some cases, trigger generation is sensitive to the way in which arithmetic is expressed, since arithmetic operations are ruled out in triggers. We could try to automatically rewrite such quantifiers, instead of failing to find triggers for them. For example:

//invariant forall j:Int :: 0<=j && j < n && (x+j) in [0..length(a)) && (y+j) in [0..length(a)) ==> loc(a,x+j).val == loc(a,y+j).val // no triggers involving loc are available
// REWRITTEN USING: j==k-x, k==j+x
invariant forall k:Int :: x<=k && k < x+n ==> loc(a,k).val == loc(a,y+k-x).val // triggers on loc(a,k)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions