Skip to content

Commit

Permalink
fix bug where goal types of symbols are not correctly used for local …
Browse files Browse the repository at this point in the history
…terms in modal logic embeddings
  • Loading branch information
Alexander Steen committed Feb 13, 2024
1 parent 5418679 commit c1ec1b3
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
lazy val commonSettings = Seq(
organization := "org.leo",
version := "1.8.3",
version := "1.8.4",
scalaVersion := "2.13.12",
scalacOptions ++= Seq(
"-deprecation",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import scala.collection.mutable

object EmbeddingApp {
final val name: String = "embedproblem"
final val version: String = "1.8.3"
final val version: String = "1.8.4"

private[this] var inputFileName = ""
private[this] var outputFileName: Option[String] = None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ object FirstOrderManySortedToTXFEmbedding extends Embedding with ModalEmbeddingL
override final def embeddingParameter: FOMLToTXFEmbeddingParameter.type = FOMLToTXFEmbeddingParameter

override final val name: String = "$$fomlModel"
override final val version: String = "1.3.3"
override final val version: String = "1.3.4"

override final def generateSpecification(specs: Map[String, String]): TPTP.TFFAnnotated =
generateTFFSpecification(name, logicSpecParamNames, specs)
Expand Down Expand Up @@ -179,7 +179,7 @@ object FirstOrderManySortedToTXFEmbedding extends Embedding with ModalEmbeddingL
case o@TFF.AtomicType("$o", _) => TFF.MappingType(worldType +: argTypes, o)
case _ => escapedTyp
}
symbolsWithGoalType = symbolsWithGoalType + (argumentTypesAndGoalTypeOfTFFType(typ)._2 -> (symbolsWithGoalType(typ) + ((atom, typ))))
symbolsWithGoalType = symbolsWithGoalType + (goalTy -> (symbolsWithGoalType(goalTy) + ((atom, typ))))
TFFAnnotated(input.name, input.role, TFF.Typing(atom, convertedType), input.annotations)
case _ => throw new EmbeddingException(s"Malformed type definition in formula '${input.name}', aborting.")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,8 @@ object ModalEmbedding extends Embedding with ModalEmbeddingLike {
val rigidity = getRigidityOfSymbol(symbol, typ)
rigidityMap = rigidityMap + (symbol -> rigidity) // add to table in case it was implicit (e.g. a predicate)
val convertedType = convertConstantSymbolType(symbol, typ)
symbolsWithGoalType = symbolsWithGoalType + (goalType(typ) -> (symbolsWithGoalType(typ) + ((symbol, typ))))
val goalTy = goalType(typ)
symbolsWithGoalType = symbolsWithGoalType + (goalTy -> (symbolsWithGoalType(goalTy) + ((symbol, typ))))
val convertedTyping = TPTP.THF.Typing(symbol, convertedType)
TPTP.THFAnnotated(formula.name, formula.role, convertedTyping, formula.annotations)
case _ => throw new EmbeddingException(s"Malformed type definition in formula '${formula.name}', aborting.")
Expand Down

0 comments on commit c1ec1b3

Please sign in to comment.