01: package org.mandarax.reference;
02:
03: /*
04: * Copyright (C) 1999-2004 <A href="http://www-ist.massey.ac.nz/JBDietrich" target="_top">Jens Dietrich</a>
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public
08: * License as published by the Free Software Foundation; either
09: * version 2 of the License, or (at your option) any later version.
10: *
11: * This library is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: * Lesser General Public License for more details.
15: *
16: * You should have received a copy of the GNU Lesser General Public
17: * License along with this library; if not, write to the Free Software
18: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19: */
20:
21: import java.io.Serializable;
22: import org.mandarax.kernel.*;
23: import org.mandarax.util.logging.LogCategories;
24:
25: /**
26: * Algorithm used by the inference engines to evaluate 'semantic' clauses
27: * and terms.
28: * @author <A href="http://www-ist.massey.ac.nz/JBDietrich" target="_top">Jens Dietrich</A>
29: * @version 3.4 <7 March 05>
30: * @since 2.0
31: */
32: public interface SemanticEvaluationPolicy extends LogCategories,
33: Serializable {
34:
35: /**
36: * Try to execute literals in the clause, and remove those literals if the
37: * result ist true. E.g., the result of performing +[]-[L1,L2,2<4,L3]
38: * would be +[]-[L1,L2,2<4,L3].
39: * This method is used in the actual proof.
40: * @param c a clause
41: * @param session a session object
42: * @param logOn indicates whether we should log
43: * @return another clause
44: */
45: Clause evaluate(Clause c, Session session, boolean logOn);
46:
47: /**
48: * Try to execute a complex term.
49: * This method is used when applying unification in renamings
50: * in the process of result set building.
51: * @param ct a complex term
52: * @param cs the clause set (context object)
53: * @param session a session object
54: * @param logOn indicates whether we should log
55: * @return the term
56: */
57: Term evaluate(ComplexTerm c, ClauseSet cs, Session session,
58: boolean logOn);
59:
60: /**
61: * Try to unify two terms by evaluating them and comparing the results.
62: * @param t1 the first term
63: * @param t2 the second term
64: * @param session a session object
65: * @return a boolean - true if the terms represent the same object
66: * @param logOn indicates whether we should log
67: */
68: boolean evaluateAndCompare(Term t1, Term t2, Session session,
69: boolean logOn);
70: }
|