unique-logic-tf: Solve simple simultaneous equations
Solve a number of equations simultaneously. This is not Computer Algebra, better think of a kind of type inference algorithm or logic programming with only one allowed solution.
Only one solution is computed. Simultaneous equations with multiple solutions are not allowed. However, variables may remain undefined. The solver may optionally check for consistency. It does not do so by default since with floating point numbers or symbolic expressions even simple rules may not be consistent.
The modules ordered with respect to abstraction level are:
UniqueLogic.ST.TF.System: Construct and solve sets of functional dependencies. Example:
assignment3 (+) a b c
means dependencya+b -> c
.UniqueLogic.ST.TF.Rule: Combine functional dependencies to rules that can apply in multiple directions. Example:
add a b c
means relationa+b = c
which resolves to dependenciesa+b -> c, c-a -> b, c-b -> a
. For an executable example see UniqueLogic.ST.TF.Example.Rule.UniqueLogic.ST.TF.Expression: Allows to write rules using arithmetic operators. It creates temporary variables automatically. Example:
(a+b)*c =:= d
resolves toa+b = x, x*c = d
. For an executable example see UniqueLogic.ST.TF.Example.Expression.UniqueLogic.ST.TF.System.Simple: Provides specialised functions from UniqueLogic.ST.TF.System for the case of a system without labels and consistency checks.
UniqueLogic.ST.TF.System.Label: Provides a custom constructor for variables. When creating a variable you decide whether and how an assignment to this variable shall be logged. There is an example that shows how to solve a logic system using symbolic expressions. The naming and logging allows us to observe shared intermediate results. For an executable example see UniqueLogic.ST.TF.Example.Label.
By using more sophisticated monad transformers, we can check the equations for consistency, report inconsistencies and how they arised. We demonstrate that in UniqueLogic.ST.TF.Example.Verify.
This variant of the package requires type families.
Modules
[Index] [Quick Jump]
Downloads
- unique-logic-tf-0.5.1.tar.gz [browse] (Cabal source package)
- Package description (revised from the package)
Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
Versions [RSS] | 0.4, 0.4.0.1, 0.4.1, 0.4.1.1, 0.4.1.2, 0.5, 0.5.0.1, 0.5.0.2, 0.5.1 |
---|---|
Change log | Changes.md |
Dependencies | base (>=4 && <5), containers (>=0.4 && <0.8), data-ref (>=0.0 && <0.2), semigroups (>=0.1 && <1.0), transformers (>=0.4 && <0.7), utility-ht (>=0.0.9 && <0.1) [details] |
Tested with | ghc ==7.4.2 |
License | BSD-3-Clause |
Author | Henning Thielemann |
Maintainer | Henning Thielemann <haskell@henning-thielemann.de> |
Revised | Revision 3 made by HenningThielemann at 2024-10-26T18:12:38Z |
Category | Logic programming |
Home page | http://hub.darcs.net/thielema/unique-logic-tf/ |
Source repo | this: darcs get http://hub.darcs.net/thielema/unique-logic-tf/ --tag 0.5.1 head: darcs get http://hub.darcs.net/thielema/unique-logic-tf/ |
Uploaded | by HenningThielemann at 2019-01-22T12:03:42Z |
Distributions | LTSHaskell:0.5.1, NixOS:0.5.1, Stackage:0.5.1 |
Reverse Dependencies | 1 direct, 0 indirect [details] |
Downloads | 6118 total (25 in the last 30 days) |
Rating | (no votes yet) [estimated by Bayesian average] |
Your Rating | |
Status | Docs available [build log] Last success reported on 2019-01-22 [all 1 reports] |