Skip to content

Finding Triggers #131

@DavePearce

Description

@DavePearce
property sorted_a(int[] xs)
where |xs| == 0 || all { i in 1 .. |xs| | xs[i-1] < xs[i] }

property sorted_b(int[] xs)
where all { i in 0 .. |xs|, j in 0..|xs| | (i < j) ==> xs[i] < xs[j] }

method f(int[] xs) -> (int[] ys)
requires sorted_a(xs)
ensures sorted_b(ys):
    return xs

Presumably it needs a lemma. This is an interesting one because it shows up differences in the difficulty of quantified formulae. I guess the other question is: does a trigger help?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions