class Analyser extends AnyRef
Analyses for typed lambda calculus expressions. A simple free variable analysis plus name and type analysis. There are two versions of the latter here: one (tipe) that constructs an explicit environment separate from the AST, and one (tipe2) that represents names by references to the nodes of their binding lambda expressions.
- Source
- Analyser.scala
- Alphabetic
- By Inheritance
- Analyser
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new Analyser()
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
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
checkType(e: Exp, tipe: (Exp) ⇒ Type): Messages
Check that the type of
eis its expected type or unknown.Check that the type of
eis its expected type or unknown. If not, return an error.tipeis used to obtain the type. -
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
decl: (Var) ⇒ Option[Lam]
The declaration (if any) of an identifier use.
-
val
env: (Exp) ⇒ Seq[(Idn, Type)]
The environment of an expression is the list of variable names that are visible in that expression and their types.
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
val
errors: (Exp) ⇒ Messages
The semantic error messages for a given tree.
The semantic error messages for a given tree. This one uses the
tipeattribute. -
val
errors2: (Exp) ⇒ Messages
The semantic error messages for a given tree.
The semantic error messages for a given tree. This one uses the
tipe2attribute. -
val
exptipe: (Exp) ⇒ Type
The expected type of an expression.
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
val
fv: (Exp) ⇒ Set[Idn]
The variables that are free in the given expression.
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
lookup(name: Idn): (Exp) ⇒ Option[Lam]
For a given variable reference, return the lambda node that binds it if there is one, otherwise return None.
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
val
tipe: (Exp) ⇒ Type
The type of an expression.
The type of an expression. Checks constituent names and types. Uses the env attribute to get the bound variables and their types.
-
val
tipe2: (Exp) ⇒ Type
The type of an expression.
The type of an expression. Checks constituent names and types. Uses the lookup attribute to get the lambda node that binds a name. For other cases it behaves like tipe.
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
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( ... )