|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectua.gradsoft.termware.TransformationContext
public class TransformationContext
Context of term transformation.
| Constructor Summary | |
|---|---|
TransformationContext()
Creates a new instance of TransformationContext |
|
| Method Summary | |
|---|---|
Substitution |
getCurrentSubstitution()
return substitutions for currently-evaluated term. |
IEnv |
getEnv()
return environment for writing output and error messages. |
boolean |
isChanged()
|
boolean |
isStop()
get stop flag for currently-evaluated term. |
Substitution |
newCurrentSubstitution()
|
void |
setChanged(boolean changed)
|
void |
setEnv(IEnv env)
set environment |
void |
setStop(boolean stop)
set current stop flag |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TransformationContext()
| Method Detail |
|---|
public Substitution getCurrentSubstitution()
class MyFacts extends DefaultFacts {
..
void setPropositionalVariabel(TransformationContext ctx, Term t,int x) throws TermWareException
{
if (!t.isX) {
throw new AssertException("setPropositionalVariable must receive propositional variable as argument");
}
Substitution s=ctx.getCurrentSubstitution();
if (s!=null) s.put(t,ITermFactory.createInt(x));
}
in multi-threading environment can refer to thread-local storage.
public Substitution newCurrentSubstitution()
public boolean isStop()
public void setStop(boolean stop)
public boolean isChanged()
public void setChanged(boolean changed)
public IEnv getEnv()
public void setEnv(IEnv env)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||