Logo Search packages:      
Sourcecode: lbt version File versions  Download package

static class Ltl& LtlIff::construct ( bool  iff,
class Ltl l,
class Ltl r 
) [inline, static]

Optimizing constructor

Parameters:
iff flag: equivalence instead of exclusive disjunction
l the left-hand-side formula
r the right-hand-side formula
Returns:
an equivalent formula

Definition at line 343 of file Ltl.h.

References LtlConstant::construct(), Ltl::getKind(), Ltl::insert(), and Ltl::negClone().

Referenced by readFormula().

                                       {
    if (l.getKind () == Ltl::Constant)
      return bool (static_cast<class LtlConstant&>(l)) == iff
      ? r
      : r.negClone ();
    if (r.getKind () == Ltl::Constant)
      return bool (static_cast<class LtlConstant&>(r)) == iff
      ? l
      : l.negClone ();
    if (&l == &r)
      return LtlConstant::construct (iff);
    return &l < &r
      ? insert (*new class LtlIff (iff, l, r))
      : insert (*new class LtlIff (iff, r, l));
  }


Generated by  Doxygen 1.6.0   Back to index