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)
)





AndXor MinValue BCDEx3 ToOrAnd ToTruthTable Diagram DiagramGateName Load logicvardef Minus RadixFromIndex Or Realization To2LayerNor To2LayerAndXor Solve Save ShortestInputsForDistinguishTwoStates AutoAssignInputAndStateVariables CreateCompactTableWithFullSimplification To2layerOrAnd Compatibility FullTable Full string() AdjustLogicVariableCount ShannonExpansion Substitute var() Zero

Search This Website :

 
Buy website traffic cheap