object preExpr
Intermediate representation for expressions without explicit types.
The main application is during parsing: the at.logic.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 at.logic.gapt.expr in three major ways:
- There are type meta-variables.
- There are type annotations.
- Free variables, bound variables, and constants are not distinguished; they are all stored as "identifiers".
- Source
- preExpr.scala
Linear Supertypes
Content Hierarchy
Ordering
- Alphabetic
- By Inheritance
Inherited
- preExpr
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- All
Type Members
- case class Abs (v: Ident, sub: Expr) extends Expr with Product with Serializable
- case class App (a: Expr, b: Expr) extends Expr with Product with Serializable
- case class ArrType (a: Type, b: Type) extends Type with Product with Serializable
- case class BaseType (name: String) extends Type with Product with Serializable
- type Elab[X] = StateT[ElabResult, ElabState, X]
- case class ElabError (loc: Option[Location], msg: String, expected: Option[Type], actual: Type, assg: ElabState) extends Product with Serializable
- type ElabResult[X] = Either[ElabError, X]
- type ElabState = Map[MetaTypeIdx, Type]
- sealed trait Expr extends AnyRef
- case class Ident (name: String, ty: Type) extends Expr with Product with Serializable
- case class LocAnnotation (expr: Expr, loc: Location) extends Expr with Product with Serializable
- case class Location (begin: Int, end: Int) extends Product with Serializable
- case class MetaType (idx: MetaTypeIdx) extends Type with Product with Serializable
- class MetaTypeIdx extends AnyRef
- case class Mismatch (t1: Type, t2: Type, assg: Map[MetaTypeIdx, Type]) extends UnificationError with Product with Serializable
- case class OccursCheck (t1: MetaType, t2: Type, assg: Map[MetaTypeIdx, Type]) extends UnificationError with Product with Serializable
- case class Quoted (e: LambdaExpression, ty: Type, fvs: Map[String, Type]) extends Expr with Product with Serializable
- class ReadablePrinter extends AnyRef
- sealed trait Type extends AnyRef
- case class TypeAnnotation (expr: Expr, ty: Type) extends Expr with Product with Serializable
- trait UnificationError extends AnyRef
- case class VarType (name: String) extends Type with Product with Serializable
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def All: (Ident, Expr) ⇒ Expr
- def And: (Expr, Expr) ⇒ Expr
- def Bicond(a: Expr, b: Expr): Expr
- def BinaryConn(c: MonomorphicLogicalC): (Expr, Expr) ⇒ Expr
- def Bool: BaseType
- def Bottom: Quoted
- def Eq(a: Expr, b: Expr): App
- def Ex: (Ident, Expr) ⇒ Expr
- def Imp: (Expr, Expr) ⇒ Expr
- def Neg: (Expr) ⇒ Expr
- def Or: (Expr, Expr) ⇒ Expr
- def Quant(name: String): (Ident, Expr) ⇒ Expr
- def QuoteBlackbox(e: LambdaExpression): Quoted
- def QuoteWhitebox(e: LambdaExpression): Quoted
- def Top: Quoted
- def UnaryConn(c: MonomorphicLogicalC): (Expr) ⇒ Expr
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
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 freeIdentifers(expr: Expr): Set[String]
- def freeMetas(t: Type): Set[MetaTypeIdx]
- def freshMetaType(): MetaType
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- def infer(expr: Expr, env: Map[String, () ⇒ Type])(implicit loc: Option[Location]): Elab[Type]
- def infers(exprs: Seq[Expr], env: Map[String, () ⇒ Type])(implicit loc: Option[Location]): Elab[List[Type]]
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def liftTypeMono(t: Ty): Type
- def liftTypePoly(t: Ty): Type
- def locOf(expr: Expr): Option[Location]
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- def solve(eqs: List[(Type, Type)], assg: Map[MetaTypeIdx, Type]): Either[UnificationError, Map[MetaTypeIdx, Type]]
- def subst(t: Type, assg: Map[MetaTypeIdx, Type]): Type
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- def toRealExpr(expr: Expr, sig: BabelSignature): Either[ElabError, LambdaExpression]
- def toRealExpr(expr: Expr, assg: Map[MetaTypeIdx, Type], bound: Set[String]): LambdaExpression
- def toRealExprs(expr: Seq[Expr], sig: BabelSignature): Either[ElabError, Seq[LambdaExpression]]
- def toRealType(ty: Type, assg: Map[MetaTypeIdx, Type]): Ty
-
def
toString(): String
- Definition Classes
- AnyRef → Any
- def unify(a: Type, b: Type, mkErr: (UnificationError) ⇒ ElabError): Elab[Unit]
-
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( ... )