Skip to content

Commit c1ec1b3

Browse files
author
Alexander Steen
committed
fix bug where goal types of symbols are not correctly used for local terms in modal logic embeddings
1 parent 5418679 commit c1ec1b3

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
lazy val commonSettings = Seq(
22
organization := "org.leo",
3-
version := "1.8.3",
3+
version := "1.8.4",
44
scalaVersion := "2.13.12",
55
scalacOptions ++= Seq(
66
"-deprecation",

embedding-app/src/main/scala/leo/modules/EmbeddingApp.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import scala.collection.mutable
1212

1313
object EmbeddingApp {
1414
final val name: String = "embedproblem"
15-
final val version: String = "1.8.3"
15+
final val version: String = "1.8.4"
1616

1717
private[this] var inputFileName = ""
1818
private[this] var outputFileName: Option[String] = None

embedding-runtime/src/main/scala/leo/modules/embeddings/FirstOrderManySortedToTXFEmbedding.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ object FirstOrderManySortedToTXFEmbedding extends Embedding with ModalEmbeddingL
4040
override final def embeddingParameter: FOMLToTXFEmbeddingParameter.type = FOMLToTXFEmbeddingParameter
4141

4242
override final val name: String = "$$fomlModel"
43-
override final val version: String = "1.3.3"
43+
override final val version: String = "1.3.4"
4444

4545
override final def generateSpecification(specs: Map[String, String]): TPTP.TFFAnnotated =
4646
generateTFFSpecification(name, logicSpecParamNames, specs)
@@ -179,7 +179,7 @@ object FirstOrderManySortedToTXFEmbedding extends Embedding with ModalEmbeddingL
179179
case o@TFF.AtomicType("$o", _) => TFF.MappingType(worldType +: argTypes, o)
180180
case _ => escapedTyp
181181
}
182-
symbolsWithGoalType = symbolsWithGoalType + (argumentTypesAndGoalTypeOfTFFType(typ)._2 -> (symbolsWithGoalType(typ) + ((atom, typ))))
182+
symbolsWithGoalType = symbolsWithGoalType + (goalTy -> (symbolsWithGoalType(goalTy) + ((atom, typ))))
183183
TFFAnnotated(input.name, input.role, TFF.Typing(atom, convertedType), input.annotations)
184184
case _ => throw new EmbeddingException(s"Malformed type definition in formula '${input.name}', aborting.")
185185
}

embedding-runtime/src/main/scala/leo/modules/embeddings/ModalEmbedding.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,8 @@ object ModalEmbedding extends Embedding with ModalEmbeddingLike {
630630
val rigidity = getRigidityOfSymbol(symbol, typ)
631631
rigidityMap = rigidityMap + (symbol -> rigidity) // add to table in case it was implicit (e.g. a predicate)
632632
val convertedType = convertConstantSymbolType(symbol, typ)
633-
symbolsWithGoalType = symbolsWithGoalType + (goalType(typ) -> (symbolsWithGoalType(typ) + ((symbol, typ))))
633+
val goalTy = goalType(typ)
634+
symbolsWithGoalType = symbolsWithGoalType + (goalTy -> (symbolsWithGoalType(goalTy) + ((symbol, typ))))
634635
val convertedTyping = TPTP.THF.Typing(symbol, convertedType)
635636
TPTP.THFAnnotated(formula.name, formula.role, convertedTyping, formula.annotations)
636637
case _ => throw new EmbeddingException(s"Malformed type definition in formula '${formula.name}', aborting.")

0 commit comments

Comments
 (0)