Advanced.MatchLogicFunction
Back to table
/*
Advanced-Analysis
Advanced.MatchLogicFunction
[list(var()) permutationMatrixList]=Advanced.MatchLogicFunction(LogicFunction F, LogicFunction G, bool fullMatch=false);
F : a logic object
G : a logic object
fullMatch : false for only matching (F,G). true for matching (F,G) and (F, Not(G)).
permutationMatrixList : a list of permutation matrix, in the form of var()
Match two logic functions F and G, and return the permutation matrices if they are in the similar family. If fullMatch=true, then it also consider the case F and !G.
Two logic functions are comparable, is the key condition for the matching problem.
The standard SOP canonical form or the POS canonical form is comparable, but with the very heavy computation.
In the simplest form, we may have the ROBDD recently which is said comparable.
At here, we provide one more choice, with the algorithm using the Simplification.Canonical(). By using this module, the logic function will be simplifing into a very stable form. Therefore, we compare these stable forms to see whether they are in the similar family.
*/
//-------------------------------------------------------------------
// examples
P=AndOr()
{
1,2 ;
-1,3 ;
-1,-2,3 ;
-1,-2,-3 ;
1,2,3 ;
}
[f1]=Advanced.MatchLogicFunction(P,Not(P),true);
Print(f1);
//-------------------------------------------------------------------
// result
f1 = list(
var(1,2,3)
,
var(-2,-1,3)
)
MatchLogicFunction IsBiUnateFunctionTo IsInverse IsNegativeUnateFunctionTo IsZeroFunction BDD binary() binary binaryioset ToVariableInvertedFunction Diagram Dimacs logicvardef minterm() Minus Nor RadixToIndex One MaxSAT ShortestInputsForDistinguishTwoStates GetExcitationTable To2layerOrAnd Fast ROBDD DontCare string() Normalization ShrinkLogicFunction var() Zero
The website is simply translated by using the Google Translate. Please inform us if you find the wrong/funny/weird translation.