LLVM M.D.Source codeContentsIndex
MD.Syntax.GDSA
MaintainerPaul Govereau <govereau@cs.harvard.edu>
Description
Abstract syntax for GDSA programs and symbolic values.
Synopsis
module MD.Syntax.Enum
data GBlock = GBlock {
label :: Label
loopHeader :: Maybe (Label, Label, [Ident])
phis :: [(Ident, Type, [(Label, Term)])]
rules :: [RR]
pre' :: [Label]
suc' :: [Label]
mem_in :: Int
mem_out :: Int
control :: Control
}
type Label = Int
data RR = RR {
rrIdent :: Ident
rrTerm :: Term
}
data Control
= Ret Term
| Seq Label
| MBr Term Type Label [(Term, Label)]
data Term
= Atom Atom
| Proj PI Term
| GetElemPtr Type Term [Term]
| BinOp Opr String Type Term Term
| Conv ConvOp Type Term Type
| Select Term Term Term
| Alloc Type Integer Term
| Load Type Term Term
| Store Type Term Term Term
| Call Term [Term] Term
| Phi Type [PhiArm]
| Mu Type Ident Ident
| Omega {
variable :: Ident
vartype :: Type
condition :: Term
sequences :: [Sequence]
}
data PhiArm = PhiArm {
guard :: [Term]
value :: Term
}
data PI
= Val
| Mem
data Sequence = SeqRules String Term Term
fvs :: Term -> [Ident]
fvs_arm :: PhiArm -> [Ident]
fivs :: Term -> [Ident]
checkAndPrint :: Term -> Term -> IO ()
chkEq :: Term -> Term -> Maybe (Term, Term)
chkArms :: [PhiArm] -> [PhiArm] -> Maybe (Term, Term)
chkS :: [Sequence] -> [Sequence] -> Maybe (Term, Term)
chkL :: [Term] -> [Term] -> Maybe (Term, Term)
shphi :: (Ident, Type, [(Label, Term)]) -> String
data Ident
= Ident String
| Z Ident
| N Ident
| P Ident
data Atom
= Null
| Undef
| Int Integer
| Float Float
| Var Ident
data Type
= I Integer
| F32
| F64
| F128
| F80
| F128_PPC
| Void
| Label
| MetaData
| Opaque
| TypeName Ident
| Array {
num_elements :: Integer
base_type :: Type
}
| Vector {
num_elements :: Integer
base_type :: Type
}
| Struct {
element_types :: [Type]
}
| PStruct {
element_types :: [Type]
}
| Pointer {
base_type :: Type
}
| FunTy {
return_type :: Type
var_args :: Bool
argments :: [(Type, [Attr])]
}
| ST
Documentation
module MD.Syntax.Enum
data GBlock Source
GDSA blocks
Constructors
GBlock
label :: Label
loopHeader :: Maybe (Label, Label, [Ident])
phis :: [(Ident, Type, [(Label, Term)])]
rules :: [RR]
pre' :: [Label]
suc' :: [Label]
mem_in :: Int
mem_out :: Int
control :: Control
show/hide Instances
type Label = IntSource
data RR Source
Constructors
RR
rrIdent :: Ident
rrTerm :: Term
show/hide Instances
Eq RR
Show RR
data Control Source
Constructors
Ret Term
Seq Label
MBr Term Type Label [(Term, Label)]
show/hide Instances
Show Control
data Term Source
Constructors
Atom Atom
Proj PI Term
GetElemPtr Type Term [Term]
BinOp Opr String Type Term Term
Conv ConvOp Type Term Type
Select Term Term Term
Alloc Type Integer Term
Load Type Term Term
Store Type Term Term Term
Call Term [Term] Term
Phi Type [PhiArm]
Mu Type Ident Ident
Omega
variable :: Ident
vartype :: Type
condition :: Term
sequences :: [Sequence]
show/hide Instances
Eq Term
Ord Term
Show Term
data PhiArm Source
Constructors
PhiArm
guard :: [Term]
value :: Term
show/hide Instances
Eq PhiArm
Ord PhiArm
Show PhiArm
data PI Source
Constructors
Val
Mem
show/hide Instances
Eq PI
Ord PI
Show PI
data Sequence Source
Constructors
SeqRules String Term Term
show/hide Instances
fvs :: Term -> [Ident]Source
free variables
fvs_arm :: PhiArm -> [Ident]Source
fivs :: Term -> [Ident]Source
free inductive variables
checkAndPrint :: Term -> Term -> IO ()Source
chkEq :: Term -> Term -> Maybe (Term, Term)Source
chkArms :: [PhiArm] -> [PhiArm] -> Maybe (Term, Term)Source
chkS :: [Sequence] -> [Sequence] -> Maybe (Term, Term)Source
chkL :: [Term] -> [Term] -> Maybe (Term, Term)Source
shphi :: (Ident, Type, [(Label, Term)]) -> StringSource
data Ident Source
Constructors
Ident String
Z Ident
N Ident
P Ident
show/hide Instances
Eq Ident
Ord Ident
Show Ident
data Atom Source
Constructors
Null
Undef
Int Integer
Float Float
Var Ident
show/hide Instances
Eq Atom
Ord Atom
Show Atom
data Type Source
LLVM Types These types are also used in the symbolc form, and for that we add a state variable type ST.
Constructors
I Integer
F32
F64
F128
F80
F128_PPC
Void
Label
MetaData
Opaque
TypeName Ident
Array
num_elements :: Integer
base_type :: Type
Vector
num_elements :: Integer
base_type :: Type
Struct
element_types :: [Type]
PStruct
element_types :: [Type]
Pointer
base_type :: Type
FunTy
return_type :: Type
var_args :: Bool
argments :: [(Type, [Attr])]
STGDSA state variable type
show/hide Instances
Eq Type
Ord Type
Show Type
Produced by Haddock version 2.6.0