![JAR search and dependency download from the Maven repository](/logo.png)
CompilerRuntime.Rule Maven / Gradle / Ivy
package CompilerRuntime;
import java.util.concurrent.Callable;
import org.coreasm.engine.absstorage.Element;
import org.coreasm.engine.absstorage.RuleBackgroundElement;
/**
* An interface representing a CoreASM Rule
* @author Markus Brenner
*
*/
public abstract class Rule extends Element implements Callable {
protected Element agent;
protected java.util.ArrayList params;
protected CompilerRuntime.LocalStack localStack;
protected CompilerRuntime.EvalStack evalStack;
@Override
public String getBackground(){
return RuleBackgroundElement.RULE_BACKGROUND_NAME;
}
public void clearResults(){
localStack = new CompilerRuntime.LocalStack();
evalStack = new CompilerRuntime.EvalStack();
}
public void setAgent(Element a){
this.agent = a;
}
public Element getAgent(){
return this.agent;
}
public void initRule(java.util.ArrayList params, CompilerRuntime.LocalStack ls){
this.evalStack = new CompilerRuntime.EvalStack();
this.params = new java.util.ArrayList(params);
if(ls == null){
this.localStack = new CompilerRuntime.LocalStack();
}
else{
this.localStack = ls;
}
}
public Rule getUpdateResponsible(){
return this;
}
public abstract Rule getCopy();
public abstract int parameterCount();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy