kodkod.engine
Class TrivialFormulaException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by kodkod.engine.TrivialFormulaException
All Implemented Interfaces:
java.io.Serializable

public final class TrivialFormulaException
extends java.lang.Exception

Thrown when a reduction is found to be trivially (un)satisfiable with respect to given Bounds.

Author:
Emina Torlak
See Also:
Serialized Form
invariant:
reduction is a subtree of reduction that has caused it to simplify to a constant
skolems holds any skolem constants generated during translation
specfield:
formula: Formula
reduction: reduction.*children
skolems: formula.^children & Decl -> lone Relation
bounds: Bounds
formulaValue: BooleanConstant // the value to which the reduction simplified

Constructor Summary
TrivialFormulaException(Formula reduction, BooleanConstant formulaValue, Bounds bounds, java.util.Map<Decl,Relation> skolems)
          Constructs a new TrivialFormulaException caused by the specified reduction.
 
Method Summary
 Bounds bounds()
          Return this.bounds.
 BooleanConstant formulaValue()
          Returns the value to which this.formula is trivially reducible.
 Formula reduction()
          Returns this.reduction.
 java.util.Map<Decl,Relation> skolems()
          If the options with which this.formula was translated specified skolemization, returns a map from existentially quantified declarations in this.formula to their corrensponding skolem constants.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TrivialFormulaException

public TrivialFormulaException(Formula reduction,
                               BooleanConstant formulaValue,
                               Bounds bounds,
                               java.util.Map<Decl,Relation> skolems)
Constructs a new TrivialFormulaException caused by the specified reduction. That is, the reduction has caused its parent reduction to simplify to the given value when translated using the given Bounds.

effects:
this.reduction' = reduction && this.bounds' = bounds && this.formulaValue' = formulaValue
requires:
reduction != null && bounds != null && formulaValue != null
Method Detail

reduction

public Formula reduction()
Returns this.reduction.

Returns:
this.reduction

bounds

public Bounds bounds()
Return this.bounds.

Returns:
this.bounds

formulaValue

public BooleanConstant formulaValue()
Returns the value to which this.formula is trivially reducible.

Returns:
this.formulaValue

skolems

public java.util.Map<Decl,Relation> skolems()
If the options with which this.formula was translated specified skolemization, returns a map from existentially quantified declarations in this.formula to their corrensponding skolem constants. Otherwise returns null.

Returns:
this.skolems