Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Symbolic STG Execution Models
- newtype SymbolicT s a = SymbolicT {
- run :: s -> (s, a)
- data State = State {
- state_status :: Status
- state_stack :: Stack
- state_heap :: Heap
- state_globals :: Globals
- state_code :: Code
- state_names :: [Name]
- state_paths :: PathCons
- state_links :: SymLinks
- data Symbol = Symbol Var (Maybe (Expr, Locals))
- data Status = Status {}
- newtype Stack = Stack [Frame]
- data Frame
- = CaseFrame Var [Alt] Locals
- | ApplyFrame [Atom] Locals
- | UpdateFrame MemAddr
- newtype MemAddr = MemAddr Int
- data Value
- newtype Locals = Locals (Map Name Value)
- data Heap = Heap (Map MemAddr HeapObj) MemAddr
- data HeapObj
- newtype Globals = Globals (Map Name Value)
- data Code
- type PathCons = [PathCond]
- data PathCond = PathCond (AltCon, [Var]) Expr Locals Bool
- newtype SymLinks = SymLinks (Map Name Name)
- nameOccStr :: Name -> String
- nameUnique :: Name -> Int
- varName :: Var -> Name
- memAddrInt :: MemAddr -> Int
- lookupLocals :: Var -> Locals -> Maybe Value
- insertLocals :: Var -> Value -> Locals -> Locals
- insertLocalsList :: [(Var, Value)] -> Locals -> Locals
- lookupHeap :: MemAddr -> Heap -> Maybe HeapObj
- allocHeap :: HeapObj -> Heap -> (Heap, MemAddr)
- allocHeapList :: [HeapObj] -> Heap -> (Heap, [MemAddr])
- insertHeap :: MemAddr -> HeapObj -> Heap -> Heap
- insertHeapList :: [(MemAddr, HeapObj)] -> Heap -> Heap
- lookupGlobals :: Var -> Globals -> Maybe Value
- insertGlobals :: Var -> Value -> Globals -> Globals
- insertGlobalsList :: [(Var, Value)] -> Globals -> Globals
- lookupValue :: Var -> Locals -> Globals -> Maybe Value
- vlookupHeap :: Var -> Locals -> Globals -> Heap -> Maybe (MemAddr, HeapObj)
- memAddrType :: MemAddr -> Heap -> Maybe Type
Documentation
newtype SymbolicT s a Source #
Symbolic Transformation represents transformations applied to some State`(s). This is useful in allowing us to transfer from different actions within the engine.
State
contains the information necessary to perform symbolic execution.
Eval/Apply graph reduction semantics are used.
State | |
|
Symbolic variables. The Maybe (Expr, Locals)
can be used to trace the
source from which the symbolic variable was generated. For instance, this is
useful during symbolic function application.
State status.
Execution stack used in graph reduction semnatics.
Frames of a stack.
Memory address for things on the Heap
.
Heap objects.
Globals are statically loaded at the time when a State
is loaded.
However, because uninterpreted / out-of-scope variables are made symbolic
at runtime, it can be modified during execution.
Evaluation of the current expression. We are either evaluating, or ready
to return with some Value
.
Path conditions denote logical paths taken in program execution thus far.
Symbolic link tables helps keep track of what names went to what, what?