Helper class for propositional logic.
For simplicity, the logic is not general, but operates directly on lists of features
(see \FeaturePhp\Model\Feature and \FeaturePhp\Model\ConstraintSolver).
A formula is expressed by nested calls to the connectives, e.g.
Logic::equiv(Logic::is(...), Logic::is(...)).
Every formula (a feature constraint) is a closure expecting a variable assignment
(a list of features).
This way a complex formula can be built, stored and later evaluated for a given
variable assignment.
| package | Default |
|---|
_and() : callable
Formulas can be supplied variadically.
callable_or() : callable
Formulas can be supplied variadically.
callableequiv(callable $constraintA, callable $constraintB) : callable
callable
callable
callableimplies(callable $constraintA, callable $constraintB) : callable
callable
callable
callableis(\FeaturePhp\Helper\Feature $feature) : callable
\FeaturePhp\Helper\Feature
callablenot(callable $constraint) : callable
callable
callable