Skip to content

Commit 2d52bb6

Browse files
authored
Merge pull request #704 from viperproject/meilers_qp_hints
Function application as QP hints
2 parents 943aa29 + b1cc979 commit 2d52bb6

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

src/main/scala/rules/QuantifiedChunkSupport.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1723,7 +1723,7 @@ object quantifiedChunkSupporter extends QuantifiedChunkSupport {
17231723
arguments.flatMap {
17241724
case SeqAt(seq, _) => Some(seq)
17251725
case MapLookup(map, _) => Some(map)
1726-
// TODO: Add a case for (domain or heap-dep.) function applications, i.e. fun(_)
1726+
case App(f, _) => Some(AppHint(f))
17271727
case _ => None
17281728
}
17291729

src/main/scala/state/Terms.scala

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,13 @@ object App extends ((Applicable, Seq[Term]) => App) {
244244
def unapply(app: App) = Some((app.applicable, app.args))
245245
}
246246

247+
/*
248+
* Applicable without arguments, only to be used as a hint for quantified chunks.
249+
*/
250+
case class AppHint(applicable: Applicable) extends Term {
251+
val sort = applicable.resultSort
252+
}
253+
247254
/*
248255
* Terms
249256
*/

0 commit comments

Comments
 (0)