Skip to content

Commit

Permalink
Merge branch 'master' into meilers_term_plugin_deactive_flag
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoeilers authored Aug 14, 2023
2 parents afaf452 + c3cf35a commit 4f4f990
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ class TerminationPlugin(@unused reporter: viper.silver.reporter.Reporter,
case PMapType(_, _) => Seq("Map")
case PDomainType(d, _) if d.name == "PredicateInstance" => Seq("PredicateInstances")
case PDomainType(d, _) => Seq(d.name)
case gt: PGenericType => Seq(gt.genericName)
}
!typeNames.exists(tn => wfTypeName.contains(tn))
}
Expand Down
20 changes: 20 additions & 0 deletions src/test/resources/all/issues/silicon/0740.vpr
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Any copyright is dedicated to the Public Domain.
// http://creativecommons.org/publicdomain/zero/1.0/


field f: Bool

method fails(a: Bool)
{
var curr: Ref := null

while (curr != null)
invariant curr != null ==> acc(curr.f)
{
refute false
curr := null
}

//:: ExpectedOutput(assert.failed:assertion.false)
assert false
}
28 changes: 28 additions & 0 deletions src/test/resources/all/issues/silicon/0742.vpr
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// Any copyright is dedicated to the Public Domain.
// http://creativecommons.org/publicdomain/zero/1.0/

import <decreases/all.vpr>

domain ListWellFoundedOrder[T] {


axiom {
forall y : List[T] :: {bounded(y)} bounded(y)
}


axiom {
forall xs : List[T] , y : T ::
decreasing(xs, Cons(y, xs))
}

axiom {
forall xs : List[T], ys : List[T], zs : List[T] :: {decreasing(xs, ys), decreasing(ys, zs)}
decreasing(xs, ys) && decreasing(ys, zs) ==> decreasing(xs, zs)
}
}

adt List[T] {
Nil()
Cons(value : T, tail : List[T])
}

0 comments on commit 4f4f990

Please sign in to comment.