undoHol2Fol

gapt.expr.formula.fol.undoHol2Fol
object undoHol2Fol

This is implements some heuristics to convert a fol formula obtained by gapt.expr.formula.fol.replaceAbstractions and gapt.expr.formula.fol.reduceHolToFol back to its original signature. Sometimes, types have to be guessed and the code is poorly tested, so it is unclear how general it is. It works (and is necessary) during the acnf creation of the n-tape proof.

To extract a signature, use the undoHol2Fol.getSignature, to to the back translation use undoHol2Fol.backtranslate.

Attributes

Source
hol2fol_heuristics.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Type members

Types

Attributes

Source
hol2fol_heuristics.scala

Value members

Concrete methods

def backtranslate(e: Expr, sig_vars: Map[String, List[Var]], sig_consts: Map[String, List[Const]], abssymbol_map: Hol2FolDefinitions): Formula

Translate the fol formula e to a hol formula over the given signature for constants and variables.

Translate the fol formula e to a hol formula over the given signature for constants and variables.

Value parameters

abssymbol_map

a mapping fol constant name to a lambda expression (obtained by replaceAbstractions)

e

the fol formula.

sig_consts

a mapping fol name to hol const with appropriate type

sig_vars

a mapping fol name to hol var with appropriate type

Attributes

Returns

the changed formula

Source
hol2fol_heuristics.scala
def backtranslate(e: Expr, sig_vars: Map[String, List[Var]], sig_consts: Map[String, List[Const]], abssymbol_map: Hol2FolDefinitions, expected_type: Option[Ty]): Expr

We do some dirty stuff in here to translate a prover9 term back to the richer type signature of hol proofs, undoing replace abstractions at the same time.

We do some dirty stuff in here to translate a prover9 term back to the richer type signature of hol proofs, undoing replace abstractions at the same time.

Attributes

Source
hol2fol_heuristics.scala
def getSignature[F, T <: SequentProof[F, LazyRef(...)]](proof: SequentProof[F, T], extract: F => Expr): Signature

Attributes

Source
hol2fol_heuristics.scala
def getSignature(e: Expr, csig: Map[String, Set[Const]], vsig: Map[String, Set[Var]]): (Map[String, Set[Const]], Map[String, Set[Var]])

Attributes

Source
hol2fol_heuristics.scala

Concrete fields

Attributes

Source
hol2fol_heuristics.scala
val logger: Logger

Attributes

Source
hol2fol_heuristics.scala