Skip to content

Commit 501f1ec

Browse files
authored
Merge pull request #730 from viperproject/meilers_fix_silicon_742
Added missing case (fixes Silicon issue #742)
2 parents 04df2df + 948b7e9 commit 501f1ec

2 files changed

Lines changed: 29 additions & 0 deletions

File tree

src/main/scala/viper/silver/plugin/standard/termination/TerminationPlugin.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ class TerminationPlugin(@unused reporter: viper.silver.reporter.Reporter,
140140
case PMapType(_, _) => Seq("Map")
141141
case PDomainType(d, _) if d.name == "PredicateInstance" => Seq("PredicateInstances")
142142
case PDomainType(d, _) => Seq(d.name)
143+
case gt: PGenericType => Seq(gt.genericName)
143144
}
144145
!typeNames.exists(tn => wfTypeName.contains(tn))
145146
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// Any copyright is dedicated to the Public Domain.
2+
// http://creativecommons.org/publicdomain/zero/1.0/
3+
4+
import <decreases/all.vpr>
5+
6+
domain ListWellFoundedOrder[T] {
7+
8+
9+
axiom {
10+
forall y : List[T] :: {bounded(y)} bounded(y)
11+
}
12+
13+
14+
axiom {
15+
forall xs : List[T] , y : T ::
16+
decreasing(xs, Cons(y, xs))
17+
}
18+
19+
axiom {
20+
forall xs : List[T], ys : List[T], zs : List[T] :: {decreasing(xs, ys), decreasing(ys, zs)}
21+
decreasing(xs, ys) && decreasing(ys, zs) ==> decreasing(xs, zs)
22+
}
23+
}
24+
25+
adt List[T] {
26+
Nil()
27+
Cons(value : T, tail : List[T])
28+
}

0 commit comments

Comments
 (0)