class 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 Facet of the context. Each modification or addition to the context is recorded as an Update. Adding information is only possible by adding it as an 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.
- at.logic.gapt.proofs.expansion.ExpansionProofToLK uses the information about the background theory to produce LK proofs modulo the background theory.
- Source
- Context.scala
- Alphabetic
- By Inheritance
- Context
- BabelSignature
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
+(update: Update): Context
Adds an element to the context.
Adds an element to the context.
If this is not a valid addition, then an exception is thrown.
- def ++(updates: Traversable[Update]): Context
- def ->[B](y: B): (Context, B)
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- def axioms: Set[HOLSequent]
- def check[T](t: T)(implicit arg0: Checkable[T]): Unit
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
constant(name: String): Option[Const]
Returns Some(const) if name is a constant.
- def constants: Iterable[Const]
-
def
contains(defn: Definition): Boolean
Returns true iff the context contains the definition defn (the definitional expansion has to match as well).
-
def
definition(name: String): Option[LambdaExpression]
Returns Some(expandedDefinition) if name is a defined constant.
-
def
definition(c: Const): Option[LambdaExpression]
Returns Some(expandedDefinition) if c is a defined constant.
- def definitions: Map[Const, LambdaExpression]
- def ensuring(cond: (Context) ⇒ Boolean, msg: ⇒ Any): Context
- def ensuring(cond: (Context) ⇒ Boolean): Context
- def ensuring(cond: Boolean, msg: ⇒ Any): Context
- def ensuring(cond: Boolean): Context
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
- def formatted(fmtstr: String): String
-
def
get[T](implicit arg0: Facet[T]): T
Gets a facet of this context, initializing it if it is not present yet.
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
getConstructors(ty: TBase): Option[Vector[Const]]
Returns Some(ctrs) if name is an inductive type with constructors ctrs.
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isType(ty: TBase): Boolean
Returns true iff ty is a defined base type.
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
normalize(expression: LambdaExpression): LambdaExpression
Normalizes an expression with the reduction rules stored in this context.
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
def
reductionRules: Iterable[ReductionRule]
Returns a collection of all (expression-level) reduction rules of this context.
-
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
- Context → BabelSignature
-
def
skolemDef(skSym: Const): Option[LambdaExpression]
Returns the Skolem definition of skSym.
Returns the Skolem definition of skSym. See at.logic.gapt.expr.hol.SkolemFunctions.
- val state: State
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- Context → AnyRef → Any
- val updates: List[Update]
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
- def →[B](y: B): (Context, B)
Shadowed Implicit Value Members
-
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