Skip to content

Checking injectivity of receiver for a predicate with no argument crashes #595

@tdardinier

Description

@tdardinier

When inhaling or exhaling quantified permissions with predicates, Viper checks that the arguments of the predicate is injective in the quantified variables. Both Carbon and Silicon do this with reduceLeft, which crashes when the predicate has no argument, as in the following example

predicate P()

method test()
  requires P()
  ensures forall i: Int :: i == 0 ==> P()
{}

Corresponding Carbon issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions