Copyright | (c) Sebastian Graf 2017-2020 |
---|---|
License | ISC |
Maintainer | sgraf1337@gmail.com |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Builds a DataFlowFramework
for a Denotation
al formulation in terms of
MonadDatafix
. Effectively reduces descriptions from Datafix.Denotational
to ones from Datafix.Explicit, so that solvers such as Datafix.Worklist
only have to provide an interpreter for MonadDependency
.
Synopsis
- data FrameworkBuilder m a
- buildFramework :: forall m a. MonadDependency m => (forall md. (MonadDatafix md, DepM md ~ m) => md a) -> (a, Node, DataFlowFramework m)
Documentation
data FrameworkBuilder m a Source #
Constructs a build plan for a DataFlowFramework
by tracking allocation of
Node
s mapping to ChangeDetector
s and transfer functions.
Instances
buildFramework :: forall m a. MonadDependency m => (forall md. (MonadDatafix md, DepM md ~ m) => md a) -> (a, Node, DataFlowFramework m) Source #
(root, max, dff) = buildFramework builder
executes the build plan specified
by builder
and returns the resulting DataFlowFramework
dff
, as well as
the root
Node
denoting the transfer function returned by the
FrameworkBuilder
action and the max
imum node of the problem as a proof for
its denseness.