abc/src/bdd/cudd/cuddEssent.c
/**Function********************************************************************

  Synopsis    [Returns true iff the first argument precedes the second in
  the clause order.]

  Description [Returns true iff the first argument precedes the second
  in the clause order.  A clause precedes another if its first lieral
  precedes the first literal of the other, or if the first literals
  are the same, and its second literal precedes the second literal of
  the other clause.  A literal precedes another if it has a higher
  index, of if it has the same index, but it has lower phase.  Phase 0
  is the positive phase, and it is lower than Phase 1 (negative
  phase).]

  SideEffects [None]

  SeeAlso     [equalp]

******************************************************************************/
Function
Synopsis    [Returns true iff the first argument precedes the second in
the clause order.]

Description [Returns true iff the first argument precedes the second
in the clause order.  A clause precedes another if its first lieral
precedes the first literal of the other, or if the first literals
are the same, and its second literal precedes the second literal of
the other clause.  A literal precedes another if it has a higher
index, of if it has the same index, but it has lower phase.  Phase 0
is the positive phase, and it is lower than Phase 1 (negative
phase).]




Function Synopsis [ Returns true iff the first argument precedes the second in the clause order . ] Description [ Returns true iff the first argument precedes the second in the clause order . A clause precedes another if its first lieral precedes the first literal of the other or if the first literals are the same and its second literal precedes the second literal of the other clause . A literal precedes another if it has a higher index of if it has the same index but it has lower phase . Phase 0 is the positive phase and it is lower than Phase 1 ( negative phase ) . ]
static int
beforep(
  DdHalfWord var1a,
  short phase1a,
  DdHalfWord var1b,
  short phase1b,
  DdHalfWord var2a,
  short phase2a,
  DdHalfWord var2b,
  short phase2b)
{
    return(var1a > var2a || (var1a == var2a &&
           (phase1a < phase2a || (phase1a == phase2a &&
            (var1b > var2b || (var1b == var2b && phase1b < phase2b))))));
}
static int beforep ( DdHalfWord var1a , short phase1a , DdHalfWord var1b , short phase1b , DdHalfWord var2a , short phase2a , DdHalfWord var2b , short phase2b ) { return ( var1a > var2a || ( var1a == var2a && ( phase1a < phase2a || ( phase1a == phase2a && ( var1b > var2b || ( var1b == var2b && phase1b < phase2b ) ) ) ) ) ) ; }
Function
Synopsis    [Returns true iff the first argument precedes the second in
the clause order.]
Function Synopsis [ Returns true iff the first argument precedes the second in the clause order . ]