package compile
- Alphabetic
- Public
- All
Type Members
-
case class
ADT(name: String, constructors: List[CONS] = Nil) extends DECL with Product with Serializable
abstract data types: name -> id%%(args) | ...
abstract data types: name -> id%%(args) | ... | id(args) name and id's ADT and CONS respectively but using implicit conversions in Program, they can also be strings anonymous record types are not permitted
-
case class
ADTRec(adts: List[ADT]) extends DECL with Product with Serializable
a group of mutually recursive abstract data types
-
case class
ALIST(elems: List[EXP]) extends EXP with Product with Serializable
a list
-
case class
AND(left: EXP, right: EXP) extends EXP with Product with Serializable
conjunction
-
case class
APPLY(fun: String, args: EXP*) extends EXP with Product with Serializable
function application
-
case class
ARECORD(tp: String, fields: List[FIELD]) extends EXP with Product with Serializable
record value
-
case class
ARG(name: String, tp: EXP) extends Product with Serializable
auxiliary class for arguments of a FUNCTION
-
case class
AT(l: EXP, index: EXP) extends EXP with Product with Serializable
element of a list at a given index
-
case class
Binder(name: String, argument: Option[CatRef], bound: CatRef, scope: CatRef) extends Constructor with Product with Serializable
a binder with some argument types and a typed bound variable we assume that the LF types of all binders are of the form {x:a} (b x -> s) -> c or (b -> s) -> c where a, b, s, c are atomic
- case class BuiltinType(e: EXP) extends Type with Product with Serializable
-
case class
CASE(pattern: EXP, body: EXP) extends Product with Serializable
auxiliary class for cases in a MATCH
-
case class
COMMENT(text: String) extends DECL with Product with Serializable
comments
-
case class
CONCAT(left: EXP, right: EXP) extends EXP with Product with Serializable
concatenation of lists
-
case class
CONS(name: String, args: List[EXP] = Nil) extends Product with Serializable
auxiliary class for constructors of an ADT
-
case class
CONSHEAD(name: String) extends Product with Serializable
auxiliary class for constructors of an ADT as f of ("x" :: "type", ...)
-
case class
CatRef(target: String) extends Product with Serializable
a reference to a type (family); possible type arguments are erased
-
case class
Category(name: String, constructors: List[Constructor]) extends Product with Serializable
a type (family) with constructors; possible type arguments are erased
-
class
Compiler extends Program
an example backend that transforms a LogicSyntax L into the SML code that represents and validates L-theories
-
case class
Connective(name: String, arguments: List[CatRef]) extends Constructor with Product with Serializable
also works as a constructor for formulas, i.e.
also works as a constructor for formulas, i.e. true : bool, false : bool, has no args in that case
-
case class
ConstantSymbol(pattern: String, name: String, arguments: List[CatRef]) extends Constructor with Product with Serializable
a (Connective-like) constructor declared in a pattern body with some argument types
-
abstract
class
Constructor extends AnyRef
constructor for a Category
- case class Context(vars: List[(String, Type)]) extends Product with Serializable
-
sealed abstract
class
DECL extends AnyRef
declarations of a simple functional language
-
case class
DECLHEAD(name: String) extends Product with Serializable
auxiliary class for constructing DECL's as name keyword arguments
auxiliary class for constructing DECL's as name keyword arguments
- name
the name of the declaration works with EXPConversions.stringToDECLHEAD
-
case class
Declaration(pattern: String, arguments: List[CatRef]) extends Product with Serializable
a pragmatic declaration with some argument types
-
case class
EQUAL(left: EXP, right: EXP) extends EXP with Product with Serializable
equality
-
case class
ERROR(name: String, msg: EXP) extends EXP with Product with Serializable
throwing of an exception
-
case class
EXCEPTION(name: String) extends DECL with Product with Serializable
exception declaration; all exception take a single string argument
-
sealed abstract
class
EXP extends AnyRef
expressions of a simple functional language
-
case class
FIELD(name: String, value: EXP) extends Product with Serializable
auxiliary class for records types and values
-
case class
FUNCTION(name: String)(args: ARG*)(ret: EXP)(body: EXP) extends DECL with Product with Serializable
function definition
-
case class
FUNCTIONRec(funs: List[FUNCTION]) extends DECL with Product with Serializable
a group of mutually recursive functions
-
case class
FUNCTYPE(args: List[ARG], ret: EXP) extends Product with Serializable
auxiliary class for function types
-
case class
FUNCVALUE(args: List[ARG], ret: EXP, body: EXP) extends Product with Serializable
auxiliary class for anonymous functions
-
abstract
class
FuncLang[A] extends AnyRef
a simple functional language represented as transformation functions from declarations and expressions to strings
- case class FunctionalType(args: List[EXP], ret: EXP) extends Type with Product with Serializable
-
case class
ID(name: String) extends EXP with Product with Serializable
identifiers the empty identifier ID("") is reserved: it refers to the current declaration, which is useful in recursive ADT and FUNCTION definitions
-
case class
IF(cond: EXP, thn: EXP, els: EXP) extends EXP with Product with Serializable
if then else
-
case class
INT(value: Int) extends EXP with Product with Serializable
integer literals
-
case class
LENGTH(l: EXP) extends EXP with Product with Serializable
length of a list
-
case class
LIST(tp: EXP) extends EXP with Product with Serializable
type of lists
-
case class
LogicSyntax(cats: List[Category], form: CatRef, decls: List[Declaration]) extends Product with Serializable
a logic syntax consists of some categories (one of which is the category of formulas) and declarations
- class LogicWriter extends AnyRef
-
case class
MAP(l: EXP, fun: ID) extends EXP with Product with Serializable
map over a list
-
case class
MATCH(arg: EXP, cases: List[CASE]) extends EXP with Product with Serializable
pattern matching
-
case class
OPTION(tp: EXP) extends EXP with Product with Serializable
type of options
-
case class
OR(left: EXP, right: EXP) extends EXP with Product with Serializable
disjunction
-
case class
PLUS(left: EXP, right: EXP) extends EXP with Product with Serializable
addition
-
case class
PROD(tps: List[EXP]) extends EXP with Product with Serializable
product type
-
case class
PROJ(exp: EXP, proj: Int) extends EXP with Product with Serializable
projection out of a product
-
abstract
class
Program extends AnyRef
convenience class for writing a program inside Scala concrete syntax
-
case class
RECORD(name: String, fields: List[FIELD] = Nil) extends DECL with Product with Serializable
record type declaration: RECORD(n) c1 :: A1 ...
record type declaration: RECORD(n) c1 :: A1 ... ^ cN :: AN anonymous record types are not permitted
-
case class
SELECT(record: EXP, field: String) extends EXP with Product with Serializable
selection from a record
-
case class
SOME(elem: EXP) extends EXP with Product with Serializable
a defined option
-
case class
STRING(value: String) extends EXP with Product with Serializable
string literals
-
case class
STRINGCONCAT(left: EXP, right: EXP) extends EXP with Product with Serializable
concatenation of strings
- case class SyntaxError(msg: String) extends Throwable with Product with Serializable
-
case class
TIMES(left: EXP, right: EXP) extends EXP with Product with Serializable
multiplication
-
case class
TUPLE(tps: List[EXP]) extends EXP with Product with Serializable
tuple
-
case class
TYPEDEF(name: String, df: EXP) extends DECL with Product with Serializable
type definition
- class Theory2LogicSyntax extends AnyRef
- sealed abstract class Type extends AnyRef
-
case class
UNOPTION(sm: EXP) extends EXP with Product with Serializable
unsafe access of the optional element (.get)
- case class Unsupported(msg: String) extends Throwable with Product with Serializable
Value Members
-
object
BOOLS extends EXP with Product with Serializable
type of booleans
- object Compiler
-
object
DECL
An incomplete type checker for expressions
-
object
EXP
An incomplete type checker for expressions
-
object
EXPConversions
useful implicit conversions
- object ErrorType extends Type with Product with Serializable
-
object
Haskell extends FuncLang[String]
Haskell as an implementation of a FuncLang
-
object
INTS extends EXP with Product with Serializable
type of integers
- object KindOfTypes extends Type with Product with Serializable
-
object
NONE extends EXP with Product with Serializable
the empty option
- object PL
- object SFOL
-
object
SML extends FuncLang[String]
SML as an implementation of a FuncLang
-
object
STRINGS extends EXP with Product with Serializable
type of strings
-
object
TestProgram extends Program
An example program
-
object
VariableSymbol extends Constructor with Product with Serializable
a bound variable