Skip to content

Commit

Permalink
Adapted to changes in Slang.
Browse files Browse the repository at this point in the history
  • Loading branch information
robby-phd committed Oct 18, 2024
1 parent 76e2e3f commit aa44794
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions shared/src/main/scala/org/sireum/logika/RewritingSystem.scala
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ object RewritingSystem {
val hasChanged: B = r.nonEmpty
val o2: AST.CoreExp.Base = r.getOrElse(o)
val shouldUnfold: B = o2 match {
case o2: AST.CoreExp.VarRef if methodPatterns.contains((o2.owner :+ o2.id, o2.isInObject)) => T
case o2: AST.CoreExp.VarRef if methodPatterns.contains((o2.owner :+ o2.id, T)) => T
case o2: AST.CoreExp.Select =>
val infoOpt: Option[Info.Method] = o2.exp.tipe match {
case t: AST.Typed.Name =>
Expand Down Expand Up @@ -1546,19 +1546,9 @@ object RewritingSystem {
}

def evalVarRef(e: AST.CoreExp.VarRef): Option[AST.CoreExp.Base] = {
val minfo: Info.Method = if (e.isInObject) {
th.nameMap.get(e.owner :+ e.id) match {
case Some(info: Info.Method) => info
case _ => return None()
}
} else {
th.typeMap.get(e.owner).get match {
case ti: TypeInfo.Sig => ti.methods.get(e.id).get
case ti: TypeInfo.Adt => ti.methods.get(e.id).get
case ti: TypeInfo.Enum => halt(s"TODO: $ti")
case ti: TypeInfo.SubZ => halt(s"TODO: $ti")
case _ => halt("Infeasible")
}
val minfo: Info.Method = th.nameMap.get(e.owner :+ e.id) match {
case Some(info: Info.Method) => info
case _ => return None()
}
if (shouldUnfold(minfo)) {
val r = unfold(minfo, None())
Expand Down

0 comments on commit aa44794

Please sign in to comment.