Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
SSTG Syntax Definitions
- type Program = GenProgram Name Var
- type Lit = GenLit Name Var
- type Atom = GenAtom Name Var
- type PrimFun = GenPrimFun Name Var
- type Expr = GenExpr Name Var
- type Alt = GenAlt Name Var
- type AltCon = GenAltCon Name Var
- type Binding = GenBinding Name Var
- type BindRhs = GenBindRhs Name Var
- type ConTag = GenConTag Name
- type DataCon = GenDataCon Name
- type Type = GenType Name
- type TyBinder = GenTyBinder Name
- type Coercion = GenCoercion Name
- type TyCon = GenTyCon Name
- type AlgTyRhs = GenAlgTyRhs Name
- newtype GenProgram bnd var = Program [GenBinding bnd var]
- data NameSpace
- data Name = Name String (Maybe String) NameSpace Int
- data Var = Var Name (GenType Name)
- data GenLit bnd var
- = MachChar Char (GenType bnd)
- | MachStr String (GenType bnd)
- | MachInt Int (GenType bnd)
- | MachWord Int (GenType bnd)
- | MachFloat Rational (GenType bnd)
- | MachDouble Rational (GenType bnd)
- | MachNullAddr (GenType bnd)
- | MachLabel String (Maybe Int) (GenType bnd)
- | BlankAddr
- | AddrLit Int
- | SymLit var
- | SymLitEval (GenPrimFun bnd var) [GenLit bnd var]
- data GenAtom bnd var
- data GenPrimFun bnd var = PrimFun bnd (GenType bnd)
- data GenExpr bnd var
- data GenAlt bnd var = Alt (GenAltCon bnd var) [var] (GenExpr bnd var)
- data GenAltCon bnd var
- = DataAlt (GenDataCon bnd)
- | LitAlt (GenLit bnd var)
- | Default
- data GenBinding bnd var = Binding RecForm [(var, GenBindRhs bnd var)]
- data RecForm
- data GenBindRhs bnd var
- = ConForm (GenDataCon bnd) [GenAtom bnd var]
- | FunForm [var] (GenExpr bnd var)
- data GenConTag bnd = ConTag bnd Int
- data GenDataCon bnd = DataCon (GenConTag bnd) (GenType bnd) [GenType bnd]
- data GenType bnd
- data GenTyBinder bnd
- = NamedTyBndr bnd (GenType bnd)
- | AnonTyBndr (GenType bnd)
- data TyLit
- data GenCoercion bnd = Coercion (GenType bnd) (GenType bnd)
- data GenTyCon bnd
- = FunTyCon bnd
- | AlgTyCon bnd (GenAlgTyRhs bnd)
- | SynonymTyCon bnd
- | FamilyTyCon bnd
- | PrimTyCon bnd
- | Promoted bnd (GenDataCon bnd)
- | TcTyCon bnd
- data GenAlgTyRhs bnd
- = AbstractTyCon Bool
- | DataTyCon [GenConTag bnd]
- | TupleTyCon (GenConTag bnd)
- | NewTyCon (GenConTag bnd)
Documentation
type DataCon = GenDataCon Name Source #
type TyBinder = GenTyBinder Name Source #
type Coercion = GenCoercion Name Source #
type AlgTyRhs = GenAlgTyRhs Name Source #
newtype GenProgram bnd var Source #
A Program is defined as a list of bindings. The bnd
is an identifier
that determines a unique binder to the var
. In practice, these are defined
to be Name
and Var
respectively.
Program [GenBinding bnd var] |
Variables, data constructors, type variables, and type constructors.
Literals are largely augmented from the original GHC implementation, with
additional annotations to denote BlankAddr
for lifting, AddrLit
for
value deriviation, SymLit
for symbolic literals, and SymLitEval
to
represent symbolic literal evaluation, as literal manipulation functions
are defined in the Haskell Prelude, and thus outside of scope for us.
MachChar Char (GenType bnd) | |
MachStr String (GenType bnd) | |
MachInt Int (GenType bnd) | |
MachWord Int (GenType bnd) | |
MachFloat Rational (GenType bnd) | |
MachDouble Rational (GenType bnd) | |
MachNullAddr (GenType bnd) | |
MachLabel String (Maybe Int) (GenType bnd) | |
BlankAddr | |
AddrLit Int | |
SymLit var | |
SymLitEval (GenPrimFun bnd var) [GenLit bnd var] |
data GenPrimFun bnd var Source #
Primitive functions.
Eq bnd => Eq (GenPrimFun bnd var) Source # | |
Read bnd => Read (GenPrimFun bnd var) Source # | |
Show bnd => Show (GenPrimFun bnd var) Source # | |
Expressions closely correspond to their representation in GHC.
data GenAltCon bnd var Source #
Alt Constructor
DataAlt (GenDataCon bnd) | |
LitAlt (GenLit bnd var) | |
Default |
Recursive?
data GenBindRhs bnd var Source #
BindRhs
taken straight from STG can be either in constructor form, or
function form. Empty parameter list denotes a thunk.
ConForm (GenDataCon bnd) [GenAtom bnd var] | |
FunForm [var] (GenExpr bnd var) |
Data Constructor tag that uniquely identifiers data constructors.
data GenDataCon bnd Source #
Data Constructor consists of its tag, the type that corresponds to its ADT, and a list of paramters it takes.
Eq bnd => Eq (GenDataCon bnd) Source # | |
Read bnd => Read (GenDataCon bnd) Source # | |
Show bnd => Show (GenDataCon bnd) Source # | |
Types are information that are useful to keep during symbolic execution in order to generate correct feeds into the SMT solver. Overapproxmation is currently performed, and is likely to be cut back in the future.
data GenTyBinder bnd Source #
Type binder for ForAllTy
.
NamedTyBndr bnd (GenType bnd) | |
AnonTyBndr (GenType bnd) |
Eq bnd => Eq (GenTyBinder bnd) Source # | |
Read bnd => Read (GenTyBinder bnd) Source # | |
Show bnd => Show (GenTyBinder bnd) Source # | |
Type
literal.
data GenCoercion bnd Source #
Coercion. I have no idea what this does :)
Eq bnd => Eq (GenCoercion bnd) Source # | |
Read bnd => Read (GenCoercion bnd) Source # | |
Show bnd => Show (GenCoercion bnd) Source # | |
Type constructor.
FunTyCon bnd | |
AlgTyCon bnd (GenAlgTyRhs bnd) | |
SynonymTyCon bnd | |
FamilyTyCon bnd | |
PrimTyCon bnd | |
Promoted bnd (GenDataCon bnd) | |
TcTyCon bnd |
data GenAlgTyRhs bnd Source #
ADT RHS.
AbstractTyCon Bool | |
DataTyCon [GenConTag bnd] | |
TupleTyCon (GenConTag bnd) | |
NewTyCon (GenConTag bnd) |
Eq bnd => Eq (GenAlgTyRhs bnd) Source # | |
Read bnd => Read (GenAlgTyRhs bnd) Source # | |
Show bnd => Show (GenAlgTyRhs bnd) Source # | |