Packages

sealed trait Context extends BabelSignature

Captures constants, types, definitions, and background theory used in a proof.

Each of these different kinds of information is stored in a separate Context.Facet of the context. Each modification or addition to the context is recorded as an Context.Update. Adding information is only possible by adding it as an Context.Update. (Basically a Context is an extensible LCF-style kernel.)

There are several inferences in our LK proofs for which it is not enough that are syntactically valid: An induction inference might follow the syntactical scheme of an induction inference and satisfy the eigenvariable criterion, however if it excludes a constructor of the inductive type, then it still allows us to prove non-theorems. The same is also true for definition rules and theory axioms.

Hence we store all information necessary to validate these inferences inside a Context object. For completeness, it also includes the collection of constant symbols.

Having this information available is also important for a second reason: it allows us make decisions based on the current context:

  • The induction tactic uses the information about inductive types to create the necessary subgoals.
  • The Babel parser uses the information about constants to decide whether a free identifier is a variable or a constant, and if it is a constant, what type it should have.
  • The unfold tactic uses the information about definitions to unfold them.
  • The inductive prover can automatically generate random instances for base types.
  • gapt.proofs.expansion.ExpansionProofToLK uses the information about the background theory to produce LK proofs modulo the background theory.
Source
Context.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Context
  2. BabelSignature
  3. AnyRef
  4. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def state: State
  2. abstract def toImmutable: ImmutableContext
  3. abstract def updates: List[Update]

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def +(update: Update): ImmutableContext

    Adds an element to the context.

    Adds an element to the context.

    If this is not a valid addition, then an exception is thrown.

  4. def ++(updates: Traversable[Update]): ImmutableContext
  5. def ->[B](y: B): (Context, B)
    Implicit
    This member is added by an implicit conversion from Context to ArrowAssoc[Context] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  6. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  7. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  8. def check[T](t: T)(implicit arg0: Checkable[T]): Unit
  9. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate() @throws( ... )
  10. def constant(name: String, params: List[Ty]): Option[Const]

    Returns Some(const) if (name,params) defines a constant.

  11. def constant(name: String): Option[Const]

    Returns Some(const) if name is a constant.

  12. def constants: Iterable[Const]
  13. def contains(defn: Definition): Boolean

    Returns true iff the context contains the definition defn (the definitional expansion has to match as well).

  14. def defaultTypeToI: Boolean
    Definition Classes
    ContextBabelSignature
  15. def definition(c: Const): Option[Expr]

    Returns Some(expandedDefinition) if c is a defined constant.

  16. def definitions: Map[Const, Expr]
  17. def ensuring(cond: (Context) ⇒ Boolean, msg: ⇒ Any): Context
    Implicit
    This member is added by an implicit conversion from Context to Ensuring[Context] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  18. def ensuring(cond: (Context) ⇒ Boolean): Context
    Implicit
    This member is added by an implicit conversion from Context to Ensuring[Context] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  19. def ensuring(cond: Boolean, msg: ⇒ Any): Context
    Implicit
    This member is added by an implicit conversion from Context to Ensuring[Context] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  20. def ensuring(cond: Boolean): Context
    Implicit
    This member is added by an implicit conversion from Context to Ensuring[Context] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  21. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  22. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  23. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from Context to StringFormat[Context] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  24. def get[T](implicit arg0: Facet[T]): T

    Gets a facet of this context, initializing it if it is not present yet.

  25. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  26. def getConstructors(ty: TBase): Option[Vector[Const]]

    Returns Some(ctrs) if name is an inductive type with constructors ctrs.

  27. def getConstructors(ty: Ty): Option[Vector[Const]]

    Returns Some(ctrs) if name is an inductive type with constructors ctrs.

  28. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  29. def isDefEq(a: Expr, b: Expr): Boolean
  30. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  31. def isType(ty: TBase): Boolean

    Returns true iff ty is a defined base type.

  32. def names: Iterable[String]
  33. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  34. def newMutable: MutableContext
  35. def newNameGenerator: NameGenerator
  36. def normalize(expression: Expr): Expr

    Normalizes an expression with the reduction rules stored in this context.

  37. def normalizer: Normalizer
  38. def notationsForConst(const: ConstName): List[Notation]
    Definition Classes
    ContextBabelSignature
  39. def notationsForToken(token: Token): Option[Notation]
    Definition Classes
    ContextBabelSignature
  40. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  41. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  42. def reductionRules: Iterable[ReductionRule]

    Returns a collection of all (expression-level) reduction rules of this context.

  43. def signatureLookup(s: String): VarConst

    Decides whether the symbol with the given identifier should be a variable or constant, and what its type should be.

    Decides whether the symbol with the given identifier should be a variable or constant, and what its type should be.

    s

    The name of the symbol.

    returns

    Either IsVar(type) or IsConst(type).

    Definition Classes
    ContextBabelSignature
  44. def skolemDef(skSym: Const): Option[Expr]

    Returns the Skolem definition of skSym.

    Returns the Skolem definition of skSym. See gapt.expr.hol.SkolemFunctions.

  45. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  46. def toReadonly: ReadonlyMutableContext
  47. def toString(): String
    Definition Classes
    Context → AnyRef → Any
  48. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  49. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  50. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  51. def whnf(expression: Expr): Expr
  52. def [B](y: B): (Context, B)
    Implicit
    This member is added by an implicit conversion from Context to ArrowAssoc[Context] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Shadowed Implicit Value Members

  1. def +(other: String): String
    Implicit
    This member is added by an implicit conversion from Context to any2stringadd[Context] performed by method any2stringadd in scala.Predef.
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (context: any2stringadd[Context]).+(other)
    Definition Classes
    any2stringadd

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from BabelSignature

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from Context to any2stringadd[Context]

Inherited by implicit conversion StringFormat from Context to StringFormat[Context]

Inherited by implicit conversion Ensuring from Context to Ensuring[Context]

Inherited by implicit conversion ArrowAssoc from Context to ArrowAssoc[Context]

Ungrouped