Skip to content

Commit e4be814

Browse files
authored
Merge pull request #454 from viperproject/optimize-lookup
Use optimized findDomainFunction (fixes #453)
2 parents 75fd875 + fbfbfdd commit e4be814

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

src/main/scala/viper/carbon/modules/impls/DefaultDomainModule.scala

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,7 @@ class DefaultDomainModule(val verifier: Verifier) extends DomainModule with Stat
6868
}
6969

7070
override def translateDomainFuncApp(fa: sil.DomainFuncApp): Exp = {
71-
val domain = verifier.program.findDomain(fa.domainName)
72-
val funct = domain.functions.find(_.name == fa.funcname) match {
73-
case Some(f) => f
74-
case None => sys.error("Domain function " + fa.funcname + " not found in domain " + domain.name)
75-
}
71+
val funct = verifier.program.findDomainFunction(fa.funcname)
7672
if (funct.unique) {
7773
Const(Identifier(funct.name))
7874
} else {

0 commit comments

Comments
 (0)