📄 semanticssupport.java
字号:
/*
* Copyright (C) 1999-2004 <A href="http://www-ist.massey.ac.nz/JBDietrich" target="_top">Jens Dietrich</a>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package org.mandarax.kernel;
/**
* Interface for objects that may support semantic evaluation.
* E.g., a term 'plus(2,3)' with the plus function from the mandarax integer
* lib and the two constant terms wrapping the Integer instances 2 and 3
* can be evaluated (performed) using the semantics of the respective java operator
* or method, the evaluation will yield 5 (or more precisely, a constant
* term wrapping the Integer instance 5).
* <br>
* In a similar manner, a fact such as 4<plus(2,3) can be evaluated, the result is
* a boolean (true in this case). On the other hand, a term like plus(2,x) or a term
* like 4<plus(2,x) (with x being a variable term) cannot be evaluated, besides the class
* AutoFacts class provides a certain generalization for this case.
* <br>
* The kind of semantic used depends on the object. Since we use java as a platform,
* at the end it is always the meaning objects have through the implementation of
* their classes. Somethimes, the actual computation might be deligated to other systems,
* like to the relational model in case of functions integrating SQL databases,
* or to C++ objects in case of functions and predicates using CORBA.
* @see org.mandarax.util.AutoFacts
* @see org.mandarax.sql.SQLFunction
* @see org.mandarax.sql.SQLPredicate
* @see org.mandarax.kernel.meta.JFunction
* @see org.mandarax.kernel.meta.JPredicate
* @author <A href="http://www-ist.massey.ac.nz/JBDietrich" target="_top">Jens Dietrich</A>
* @version 3.4 <7 March 05>
* @since 1.6
*/
public interface SemanticsSupport {
/**
* Indicates whether the object (usually a term or a clause set) can be performed
* using the java semantics.
* @return a boolean
*/
public boolean isExecutable();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -