| Copyright | (c) Sebastian Graf 2017-2020 |
|---|---|
| License | ISC |
| Maintainer | sgraf1337@gmail.com |
| Portability | portable |
| Safe Haskell | None |
| Language | Haskell2010 |
Datafix.FrameworkBuilder
Description
Builds a DataFlowFramework for a Denotational 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
Nodes mapping to ChangeDetectors 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 maximum node of the problem as a proof for
its denseness.