counts the number of features in this expression for statistic purposes
counts the number of features in this expression for statistic purposes
uses a SAT solver to determine whether two expressions are equivalent.
uses a SAT solver to determine whether two expressions are equivalent.
for performance reasons, it checks pointer equivalence first, but won't use the recursive equals on aexpr (there should only be few cases when equals is more accurate than eq, which are not worth the performance overhead)
evaluate the expression for a given feature selection (all features not provided are assumed deselected)
evaluate the expression for a given feature selection (all features not provided are assumed deselected)
features provided as a list of names (how they would be created with createDefinedExternal)
evaluates to true or false
frees the space occupied by this bdd in the bdd library.
frees the space occupied by this bdd in the bdd library. This is done without any safety-measures! If there is any reference to this FeatureExpression left, and its reference to the (cleared) bdd is used, there might be an exception or undefined behavior.
Iterator[Array[(Byte,String)]] Returns a iterator.
Iterator[Array[(Byte,String)]] Returns a iterator. Each element of the iterator is a clause of the CNF formula. Each element of the clause-array is a single feature. The feature is given as tuple (a,b): a==0 means the feature is negated, b is the name of the feature.
If this expr is a simple concatenation of SingleFeatureExpressions (and their negations), then this method returns the expression as a set of singleFeatureExpr that occur as enabled (disabled).
If this expr is a simple concatenation of SingleFeatureExpressions (and their negations), then this method returns the expression as a set of singleFeatureExpr that occur as enabled (disabled). If the expression is more complex, None is returned.
x.
x.isSatisfiable(fm) is short for x.and(fm).isSatisfiable but is faster because FM is cached
alternative implementation of issatisfiable that uses a different CNF conversion with more variables but possibly fewer clauses
alternative implementation of issatisfiable that uses a different CNF conversion with more variables but possibly fewer clauses
the difference is only relevant when dimacs-feature models are involved
heuristic to determine whether a feature expression is small (may be used to decide whether to inline it or not)
heuristic to determine whether a feature expression is small (may be used to decide whether to inline it or not)
use with care
FM -> X is tautology if FM.
FM -> X is tautology if FM.implies(X).isTautology or !FM.and.(x.not).isSatisfiable
not final for optimization purposes
Prints the textual representation of this formula on a Writer.
Prints the textual representation of this formula on a Writer. The result shall be equivalent to p.print(toTextExpr), but it should avoid consuming so much temporary space.
the output Writer
Converts this formula to a textual expression.
Converts this formula to a textual expression.
Converts this formula to a textual expression.
Converts this formula to a textual expression.
unique existential quantification over feature "feature".
unique existential quantification over feature "feature".
This has the effect of substituting the feature by true and false respectively and returning the xor of both: this[feature->True] xor this[feature->False]
It can be seen as identifying under which condition the feature matters for the result of the formula