Packages

p

gapt

expr

package expr

Source
package.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. expr
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. class Abs extends Expr
  2. class App extends Expr
  3. trait Atom extends Expr with Formula with HOLPartialAtom
  4. class BinaryPropConnectiveHelper extends AnyRef
  5. type ClosedUnderFOLSub[T] = Substitutable[FOLSubstitution, T, T]
  6. type ClosedUnderReplacement[T] = Replaceable[T, T]
  7. type ClosedUnderSub[T] = Substitutable[Substitution, T, T]
  8. class Const extends Expr with VarOrConst
  9. case class Definition(what: Const, by: Expr) extends Update with Product with Serializable
  10. abstract class Expr extends AnyRef
  11. implicit final class ExprNameGenerator extends AnyVal
  12. trait ExprSubstWithβ0 extends AnyRef
  13. trait ExprSubstWithβ1 extends ExprSubstWithβ0
  14. trait ExprSubstitutable1 extends AnyRef
  15. trait ExprSubstitutable2 extends ExprSubstitutable1
  16. trait ExprSubstitutable3 extends ExprSubstitutable2
  17. trait ExprSubstitutable4 extends ExprSubstitutable3
  18. trait ExprSubstitutable5 extends ExprSubstitutable4
  19. trait ExprSubstitutable6 extends ExprSubstitutable5
  20. trait ExprSubstitutable7 extends ExprSubstitutable6
  21. class ExpressionParseHelper extends AnyRef

    Extension class that provides string interpolation functions for various expression types.

  22. trait FOLAtom extends Expr with FOLPartialAtom with Atom with FOLFormula
  23. trait FOLAtomConst extends Const with HOLAtomConst with FOLPartialAtom
  24. trait FOLConst extends Const with FOLTerm with FOLFunctionConst
  25. trait FOLExpression extends Expr
  26. trait FOLFormula extends Expr with FOLPartialFormula with Formula with FOLExpression
  27. trait FOLFunctionConst extends Const with FOLPartialTerm
  28. trait FOLPartialAtom extends Expr with HOLPartialAtom
  29. trait FOLPartialTerm extends Expr
  30. trait FOLQuantifier extends Const with LogicalConstant
  31. class FOLSubstitution extends Substitution
  32. trait FOLTerm extends Expr with FOLPartialTerm with FOLExpression
  33. trait FOLVar extends Var with FOLTerm
  34. trait Formula extends Expr
  35. trait HOLAtomConst extends Const with HOLPartialAtom
  36. trait HOLPartialAtom extends Expr
  37. case class LambdaPosition(list: List[Int]) extends Product with Serializable

    Represents a position in a gapt.expr.Expr.

    Represents a position in a gapt.expr.Expr.

    Positions are represented by lists of Integers. The empty list denotes the expression itself. A nonempty list denotes a position in the left or right subexpression according to whether it starts with 1 or 2.

    list

    The list of integers describing the position.

  38. abstract class LogicalC extends AnyRef

    Helper class for logical constants.

    Helper class for logical constants.

    The logical constans are the propositional connectives, the quantifiers, bottom, top, and the equality constant. A logical constant is different from an expression consisting of only this logical constant, as the expression is an object of type Expr and needs to have a definite type.

    A logical constant consists of a name (e.g. "∀"), and a set of possible types, (e.g. (Ti->To)->To, ((Ti->Ti)->To)->To, ...). Subclasses need to implement the function matchType, which matches these possible types. This way we can handle the parametric types of the quantifiers.

  39. trait LogicalConstant extends Const
  40. class MonoidalBinaryPropConnectiveHelper extends BinaryPropConnectiveHelper
  41. class MonomorphicLogicalC extends LogicalC

    Logical constant with a fixed type.

  42. case class Normalizer(rules: Set[ReductionRule]) extends Product with Serializable
  43. class NullaryPropConnectiveHelper extends AnyRef
  44. final case class Polarity(inSuc: Boolean) extends AnyVal with Product with Serializable

    Polarity of a formula.

    Polarity of a formula.

    There are two polarities, positive/in-succedent and negative/in-antecedent. Polarities serve multiple purposes:

    • They distinguish strong and weak quantifiers. A universal (∀) quantifier in positive/in-succedent polarity is strong (requires an eigenvariable/Skolem inference), and is weak in negative/in-antecedent polarity (can be instantiated with any term).
    • They guide the construction of expansion trees and their deep formulas. A merge in positive polarity has a disjunction as deep formula, in negative polarity it has a conjunction.
    • They specify the side/cedent of a sequent.

    Our convention is based on proofs in LK:

    • formulas in the succedent are positive
    • formulas in the antecedent are negative

    This is used consistently, except for a major exception: in resolution proofs, the polarity is reversed. A formula in the antecedent of a clause in a resolution proof has the negative/in-antecedent polarity (as it is in the antecedent of a sequent). However upon conversion to LK/ET, the polarity switches to positive/in-succedent polarity.

  45. class PreSubstitution extends AnyRef

    An unvalidated substitution, you should use Substitution instead.

  46. trait PropAtom extends Const with PropFormula with FOLAtom with FOLAtomConst
  47. trait PropConnective extends Const with LogicalConstant with PropPartialFormula
  48. trait PropFormula extends Expr with PropPartialFormula with FOLFormula
  49. class QuantifierC extends LogicalC

    A logical constant describing a quantifier, which is of type (α->To)->To.

  50. class QuantifierHelper extends AnyRef
  51. case class ReductionRule(lhs: Expr, rhs: Expr) extends Product with Serializable
  52. trait Replaceable[-I, +O] extends AnyRef
  53. trait ReplaceableInstances0 extends AnyRef
  54. trait ReplaceableInstances1 extends ReplaceableInstances0
  55. trait ReplaceableInstances2 extends ReplaceableInstances1
  56. trait SeqSubstitutable extends AnyRef
  57. trait Substitutable[-S <: Substitution, -T, +U] extends AnyRef

    Trait that describes the following relation between types S, T, U: If a substitution of type S is applied to an element of type T, the result will have type U.

    Trait that describes the following relation between types S, T, U: If a substitution of type S is applied to an element of type T, the result will have type U.

    S

    A subtype of Substitution.

    T

    The input type.

    U

    The output type.

    Annotations
    @implicitNotFound( ... )
  58. class Substitution extends PreSubstitution

    A substitution is a mapping from variables to lambda-expressions which differs from the identity on finitely many variables.

    A substitution is a mapping from variables to lambda-expressions which differs from the identity on finitely many variables. Therefore: 1) each variable is mapped to only one lambda expression 2) the order of the variable-mappings is irrelevant 3) all variable-mappings are applied simultaneously to a term i.e. {x |-> y, y |-> a}x = y and not a.

    As the lambda calculus contains variable binders, substitution can only be defined up to alpha-equivalence. When applying a substitution, bound variables are renamed if needed.

  59. case class TArr(in: Ty, out: Ty) extends Ty with Product with Serializable
  60. case class TBase(name: String, params: List[Ty]) extends Ty with Product with Serializable
  61. case class TVar(name: String) extends Ty with Product with Serializable
  62. sealed abstract class Ty extends AnyRef
  63. class UnaryPropConnectiveHelper extends AnyRef
  64. class Var extends Expr with VarOrConst
  65. trait VarOrConst extends Expr

Value Members

  1. implicit def stringInterpolationForExpressions(sc: StringContext)(implicit file: File, line: Line, sig: BabelSignature): ExpressionParseHelper
  2. object ->:
  3. object Abs
  4. object All extends QuantifierHelper
  5. object And extends MonoidalBinaryPropConnectiveHelper
  6. object AndC extends MonomorphicLogicalC
  7. object App
  8. object Apps
  9. object Atom
  10. object BetaReduction extends Normalizer
  11. object Bottom extends NullaryPropConnectiveHelper
  12. object BottomC extends MonomorphicLogicalC
  13. object Const
  14. object Definition extends Serializable
  15. object Eq
  16. object EqC extends LogicalC
  17. object Ex extends QuantifierHelper
  18. object ExistsC extends QuantifierC
  19. object ExprSubstWithβ extends ExprSubstWithβ1

    Contains Substitutable instances for expressions that automatically perform β-reduction if the range of the substitution contains a λ-abstraction.

  20. object ExpressionParseHelper
  21. object FOLAtom
  22. object FOLAtomConst extends FOLHead
  23. object FOLConst
  24. object FOLFunction
  25. object FOLFunctionConst extends FOLHead
  26. object FOLHeadType
  27. object FOLSubstitution
  28. object FOLVar
  29. object ForallC extends QuantifierC
  30. object FunctionType
  31. object HOLAtomConst
  32. object HOLFunction
  33. object Iff
  34. object Imp extends BinaryPropConnectiveHelper
  35. object ImpC extends MonomorphicLogicalC
  36. object LambdaPosition extends Serializable
  37. object Neg extends UnaryPropConnectiveHelper
  38. object NegC extends MonomorphicLogicalC
  39. object NonLogicalConstant
  40. object Normalizer extends Serializable
  41. object Or extends MonoidalBinaryPropConnectiveHelper
  42. object OrC extends MonomorphicLogicalC
  43. object Polarity extends Serializable
  44. object PreSubstitution
  45. object PropAtom
  46. object Quant
  47. object ReductionRule extends Serializable
  48. object Replaceable extends ReplaceableInstances2
  49. object Substitutable extends ExprSubstitutable7 with SeqSubstitutable
  50. object Substitution
  51. object TBase extends Serializable
  52. object TermReplacement

    A term replacement homomorphically extends a partial function on lambda expressions to all lambda expressions.

    A term replacement homomorphically extends a partial function on lambda expressions to all lambda expressions.

    This is done on a "best effort" basis. Replacing constants by ground terms of the same type will usually work, anything beyond that might or might not work.

  53. object Ti extends TBase

    This object represents the type of individuals.

  54. object To extends TBase

    This object represents the type of truth values.

  55. object Top extends NullaryPropConnectiveHelper
  56. object TopC extends MonomorphicLogicalC
  57. object Var
  58. object VarOrConst

    Matches constants and variables, but nothing else.

  59. object arity
  60. object baseTypes
  61. object boundVariables

    Returns the set of all bound variables occurring in the given argument.

  62. object clauseSubsumption
  63. object constants

    Returns the set of non-logical constants occuring in the given argument.

  64. object containedNames
  65. object expressionDepth
  66. object expressionSize
  67. object freeVariables

    Returns the set of free variables in the given argument.

  68. object isConstructorForm
  69. object isGround
  70. object isInVNF

    A lambda term is in variable-normal form (VNF) if different binders bind different variables, and bound variables are disjoint from the free ones.

  71. object longNormalForm
  72. object normalize
  73. object preExpr

    Intermediate representation for expressions without explicit types.

    Intermediate representation for expressions without explicit types.

    The main application is during parsing: the gapt.formats.babel.BabelParser produces pre-expressions.

    This representation is intended to be as simple as possible, all higher-level constructs (such as <-> or ∀) are already desugared into simply-typed lambda terms.

    It differs from the "real" lambda calculus in gapt.expr in three major ways:

    1. There are type meta-variables.
    2. There are type annotations.
    3. Free variables, bound variables, and constants are not distinguished; they are all stored as "identifiers".
  74. object rename

    get a new variable/constant (similar to the current and) different from all variables/constants in the blackList, returns this variable if this variable is not in the blackList.

  75. object replacementContext

    Creates a lambda expression that designates positions to be replaced.

  76. object subTerms

    Returns the set of all subterms of the given lambda term.

  77. object syntacticMGU
  78. object syntacticMatching
  79. object toImplications
  80. object toVNF

    Transforms an expression into an alpha-equivalent expression in variable-normal form, where no two binders bind the same variable, and the bound variables are disjoint from the free ones.

  81. object typeVariables
  82. object variables

    Returns the set of all variables occurring in the given argument (including bound variables).

Inherited from AnyRef

Inherited from Any

Ungrouped