| Copyright | (c) Sebastian Graf 2018 |
|---|---|
| License | ISC |
| Maintainer | sgraf1337@gmail.com |
| Portability | portable |
| Safe Haskell | None |
| Language | Haskell2010 |
Datafix.ProblemBuilder
Description
Builds a DataFlowProblem 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.
- data ProblemBuilder m a
- buildProblem :: forall m. MonadDependency m => Denotation (Domain m) -> (Node, Node, DataFlowProblem m)
Documentation
data ProblemBuilder m a Source #
Constructs a build plan for a DataFlowProblem by tracking allocation of
Nodes mapping to ChangeDetectors and transfer functions.
Instances
| Monad (ProblemBuilder m) Source # | |
| Functor (ProblemBuilder m) Source # | |
| Applicative (ProblemBuilder m) Source # | |
| MonadDependency m => MonadDatafix (ProblemBuilder m) Source # | |
| type DepM (ProblemBuilder m) Source # | |
buildProblem :: forall m. MonadDependency m => Denotation (Domain m) -> (Node, Node, DataFlowProblem m) Source #
(root, max, dfp) = buildProblem builder executes the build plan specified
by builder and returns the resulting DataFlowProblem dfp, as well as
the root Node denoting the transfer function returned by the
ProblemBuilder action and the maximum node of the problem as a proof for
its denseness.