|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.opencyc.constraintsolver.RuleEvaluator
RuleEvaluator object evaluates constraint rules for the parent ConstraintProblem object. Although all rules may be evaluated by asking the OpenCyc KB, some rules having evaluatable predicates and functions may be efficiently evaluated locally
Copyright 2001 Cycorp, Inc., license is open source GNU LGPL.
THIS SOFTWARE AND KNOWLEDGE BASE CONTENT ARE PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OPENCYC ORGANIZATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE AND KNOWLEDGE BASE CONTENT, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
UnitTest#testConstraintProblem
Field Summary | |
protected CycConstant |
and
Cached reference to #$and logical operator. |
protected ConstraintProblem |
constraintProblem
Reference to the parent ConstraintProblem object. |
protected CycConstant |
different
Cached reference to #$different predicate. |
protected CycConstant |
not
Cached reference to #$not logical operator. |
protected CycConstant |
numericallyEqual
Cached reference to #$numericallyEqual predicate. |
protected CycConstant |
or
Cached reference to #$or logical operator. |
protected CycConstant |
plusFn
Cached reference to #$PlusFn function. |
protected int |
verbosity
Sets verbosity of the constraint solver output. |
Constructor Summary | |
RuleEvaluator(ConstraintProblem constraintProblem)
Constructs a new RuleEvaluator object for the parent ConstraintProblem. |
Method Summary | |
boolean |
ask(ConstraintRule rule)
Return true iff the instantiated constraint rule is proven true, otherwise return false |
void |
initialize()
Initializes this instance once the parent ConstraintProblem object creates a CycAccess object. |
void |
setVerbosity(int verbosity)
Sets verbosity of the constraint solver output. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected ConstraintProblem constraintProblem
protected int verbosity
protected CycConstant numericallyEqual
protected CycConstant and
protected CycConstant or
protected CycConstant not
protected CycConstant different
protected CycConstant plusFn
Constructor Detail |
public RuleEvaluator(ConstraintProblem constraintProblem)
constraintProblem
- the parent constraint problemMethod Detail |
public void initialize()
public boolean ask(ConstraintRule rule) throws java.io.IOException, CycApiException
rule
- the instantiated constraint rule to be evaluatedpublic void setVerbosity(int verbosity)
verbosity
- 0 --> quiet ... 9 -> maximum diagnostic input
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |