MutableContext

gapt.proofs.context.mutable.MutableContext
See theMutableContext companion object

Attributes

Companion
object
Source
MutableContext.scala
Graph
Supertypes
trait Context
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def ++=(updates: Iterable[Update]): Unit

Attributes

Source
MutableContext.scala
def +=(update: Update): Unit

Attributes

Source
MutableContext.scala
def addDefinition(by: Expr, name: => String, reuse: Boolean): Const

Attributes

Source
MutableContext.scala
def addSkolemSym(defn: Expr, name: => String, reuse: Boolean): Const

Attributes

Source
MutableContext.scala

Attributes

Source
MutableContext.scala
def ctx_=(newCtx: ImmutableContext): Unit

Attributes

Source
MutableContext.scala
override def state: State

Retrieves the context's current state.

Retrieves the context's current state.

Attributes

Returns

The context's current state.

Definition Classes
Source
MutableContext.scala

Converts this context into an immutable context.

Converts this context into an immutable context.

Attributes

Returns

A new immutable context that equals this context at the time of calling this method.

Definition Classes
Source
MutableContext.scala
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Context -> Any
Source
MutableContext.scala
override def updates: List[Update]

Retrieves the updates that have been applied to this context.

Retrieves the updates that have been applied to this context.

Attributes

Returns

A list of updates with newer updates occurring before older ones.

Definition Classes
Source
MutableContext.scala

Inherited methods

def +(update: Update): ImmutableContext

Applies an update to this context.

Applies an update to this context.

Value parameters

update

The update to be applied to this context.

Attributes

Returns

An immutable context obtained by converting this context to an immutable context and by applying the update to that context.

Inherited from:
Context
Source
Context.scala

Applies several updates to the context.

Applies several updates to the context.

Value parameters

updates

The updates to be applied to the context.

Attributes

Returns

An immutable context obtained by applying iteratively applying the updates from left to right.

Inherited from:
Context
Source
Context.scala
def check[T : Checkable](t: T): Unit

Checks an object with respect to this context.

Checks an object with respect to this context.

This method checks whether a given object is correctly constructed according to this context. For example for a type to check against a context the base types occurring in that type must all be declared in the context.

Type parameters

T

The type of object to be checked.

Value parameters

t

The object to be checked.

Attributes

Inherited from:
Context
Source
Context.scala

Retrieves all expression-level conditional reduction rules.

Retrieves all expression-level conditional reduction rules.

Attributes

Returns

Returns all the expression-level conditional reduction rules currently stored in this context.

Inherited from:
Context
Source
Context.scala
def constant(name: String, params: List[Ty]): Option[Const]

Retrieves constants by name and type parameters.

Retrieves constants by name and type parameters.

Value parameters

name

The name for which a constant is to be looked up.

params

The type parameters for which a constant is to be looked up.

Attributes

Returns

Returns Some ( c ) if the context currently contains a constant c with name name and type parameters params. Otherwise None is returned.

Inherited from:
Context
Source
Context.scala
def constant(name: String): Option[Const]

Retrieves constants by name.

Retrieves constants by name.

Value parameters

name

The name for which a constant is to be looked up.

Attributes

Returns

Returns Some( c ) where c.name equals name if the context currently contains such a constant c, otherwise None is retured.

Inherited from:
Context
Source
Context.scala

Retrieves all the constants defined in this context.

Retrieves all the constants defined in this context.

Attributes

Returns

A list of all the constants that are currently defined in this context.

Inherited from:
Context
Source
Context.scala

Checks whether the context contains a given definition.

Checks whether the context contains a given definition.

Value parameters

defn

The definition that is to be checked.

Attributes

Returns

Returns true if the given definition is an instance of a definition stored in this context.

Inherited from:
Context
Source
Context.scala

Attributes

Inherited from:
Context
Source
Context.scala

Looks up the definition of a constant.

Looks up the definition of a constant.

Value parameters

c

The constant with type arguments args whose definition is to be looked up.

Attributes

Returns

If the constant c has a definition, then Some( definition ) is returned where definition is obtained from the definition of c by instantiating the type variables according to args.

Inherited from:
Context
Source
Context.scala

Retrieves all the definitions of this context.

Retrieves all the definitions of this context.

Attributes

Returns

The current definitions saved by this context i.e. a map associating constants with expressions.

Inherited from:
Context
Source
Context.scala
def get[T : Facet]: T

Retrieves a facet of this context.

Retrieves a facet of this context.

Type parameters

T

The facet's type.

Attributes

Returns

Returns the facet associated with the given type. If this facet is not present yet, it is initialized and its initial value is returned.

Inherited from:
Context
Source
Context.scala

Looks up inductive type constructors for a given base type.

Looks up inductive type constructors for a given base type.

Value parameters

ty

The base type whose type constructors are to be looked up.

Attributes

Returns

Returns Some( ctrs ) if ty is an inductive type having constructors ctrs, otherwise None is returned.

Inherited from:
Context
Source
Context.scala

Retrieves inductive type constructors for a given type.

Retrieves inductive type constructors for a given type.

Value parameters

ty

The type whose inductive type constructors are to be looked up.

Attributes

Returns

Returns Some( ctrs ) if ty is an inductive type having constructors ctrs, otherwise None is returned.

Inherited from:
Context
Source
Context.scala
def isDefEq(a: Expr, b: Expr): Boolean

Checks if two expressions normalize to the same expression.

Checks if two expressions normalize to the same expression.

Value parameters

a

An expression to be checked.

b

An expression to be checked.

Attributes

Returns

Returns true if and only if a and b normalize to the same expression in this context.

Inherited from:
Context
Source
Context.scala
def isType(ty: TBase): Boolean

Checks whether the given base type is defined in this context.

Checks whether the given base type is defined in this context.

Value parameters

ty

The base type that is to be checked.

Attributes

Returns

true if ty is defined in this context, false otherwise.

Inherited from:
Context
Source
Context.scala

Retrieves all the names declared in this context.

Retrieves all the names declared in this context.

Attributes

Returns

All the names currently declared in this context.

Inherited from:
Context
Source
Context.scala

Converts this context into a mutable context.

Converts this context into a mutable context.

Attributes

Returns

A new mutable context that equals this context at the time of calling this method.

Inherited from:
Context
Source
Context.scala

Creates a new name generator for this context.

Creates a new name generator for this context.

Attributes

Returns

A new name generator that avoids all the names currently defined in the context.

Inherited from:
Context
Source
Context.scala
def normalize(expression: Expr): Expr

Normalizes an expression.

Normalizes an expression.

Value parameters

expression

The expression to be normalized.

Attributes

Returns

An expression obtained by normalizing expression according to the reduction rules currently stored in this context.

Inherited from:
Context
Source
Context.scala

The context's normalizer.

The context's normalizer.

Attributes

Returns

The context's normalizer.

Inherited from:
Context
Source
Context.scala

Attributes

Inherited from:
Context
Source
Context.scala

Attributes

Inherited from:
Context
Source
Context.scala

Retrieves all expression-level reduction rules.

Retrieves all expression-level reduction rules.

Attributes

Returns

Returns all the expression-level reduction rules currently stored in this context.

Inherited from:
Context
Source
Context.scala

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.

Value parameters

s

The name of the symbol.

Attributes

Returns

Either IsVar(type) or IsConst(type).

Inherited from:
Context
Source
Context.scala
def skolemDef(skSym: Const): Option[Expr]

Retrieves the skolem definition of a constant.

Retrieves the skolem definition of a constant.

Value parameters

skSym

The constant whose definition is to be looked up.

Attributes

Returns

Returns Some(definition) if the constant skSym is a skolem function with definition definition.

Inherited from:
Context
Source
Context.scala

Converts this context to a read-only context.

Converts this context to a read-only context.

Attributes

Returns

A new read-only context that is equal to this context at the time of invoking this method.

Inherited from:
Context
Source
Context.scala
def whnf(expression: Expr): Expr

Reduces an expression to WHNF.

Reduces an expression to WHNF.

Value parameters

expression

The expression to be reduced to WHNF.

Attributes

Returns

An expression reduced to WHNF according to the reduction rules currently stored in this context.

Inherited from:
Context
Source
Context.scala