Skip to content

Exhale QPs with predicates results in an "empty.reduceLeft" error #391

@tdardinier

Description

@tdardinier

The Viper program

predicate p()

method m()
  ensures forall i: Int :: p()

results in the following error:

ERROR: The following exception occured in ViperServer: java.lang.UnsupportedOperationException: empty.reduceLeft
 trace:
  scala.collection.TraversableOnce.reduceLeft(TraversableOnce.scala:179)
  scala.collection.TraversableOnce.reduceLeft$(TraversableOnce.scala:177)
  scala.collection.mutable.ArrayBuffer.scala$collection$IndexedSeqOptimized$$super$reduceLeft(ArrayBuffer.scala:47)
  scala.collection.IndexedSeqOptimized.reduceLeft(IndexedSeqOptimized.scala:73)
  scala.collection.IndexedSeqOptimized.reduceLeft$(IndexedSeqOptimized.scala:72)
  scala.collection.mutable.ArrayBuffer.reduceLeft(ArrayBuffer.scala:47)
  scala.collection.TraversableOnce.reduce(TraversableOnce.scala:207)
  scala.collection.TraversableOnce.reduce$(TraversableOnce.scala:207)
  scala.collection.AbstractTraversable.reduce(Traversable.scala:104)
  viper.carbon.modules.impls.QuantifiedPermModule.translateExhale(QuantifiedPermModule.scala:723)

which occurs because a reduce operation is done on the arguments of the predicates, and in this case the predicate has no argument.

This should probably be handled by the consistency checks.

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