ua.gradsoft.termware.debug
Class DebugStubRunHelper

java.lang.Object
  extended by ua.gradsoft.termware.debug.DebugStubRunHelper

public class DebugStubRunHelper
extends Object

Helper class to run debug stub.

Author:
rssh

Constructor Summary
DebugStubRunHelper()
           
 
Method Summary
static boolean runConditionDebugStub(Class<? extends ConditionDebugStub> stubClass, TermSystem ts, Term t, TransformationContext ctx)
          run condition debug stub.
static void runSetFactsDebugStub(Class<? extends SetFactsDebugStub> stubClass, TermSystem ts, Term t, TransformationContext ctx)
          run action debug stub.
static Term runSubstitutionDebugStub(Class<? extends SubstitutionDebugStub> stubClass, Term t, Substitution s)
          run substitution debug stub.
static boolean runUnificationDebugStub(Class<? extends UnificationDebugStub> stubClass, Term t, Term p, Substitution s)
          run unification debug stub.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DebugStubRunHelper

public DebugStubRunHelper()
Method Detail

runUnificationDebugStub

public static boolean runUnificationDebugStub(Class<? extends UnificationDebugStub> stubClass,
                                              Term t,
                                              Term p,
                                              Substitution s)
                                       throws TermWareException
run unification debug stub.

Parameters:
stubClass - - generated class of stub.
t - - term to unify.
p - - pattern to unify
s - - substitution.
Returns:
result of unification.
Throws:
TermWareException

runSubstitutionDebugStub

public static Term runSubstitutionDebugStub(Class<? extends SubstitutionDebugStub> stubClass,
                                            Term t,
                                            Substitution s)
                                     throws TermWareException
run substitution debug stub.

Parameters:
stubClass - - generated class of stub.
t - - term to substitute.
s - - substitution.
Returns:
substituted term
Throws:
TermWareException

runSetFactsDebugStub

public static void runSetFactsDebugStub(Class<? extends SetFactsDebugStub> stubClass,
                                        TermSystem ts,
                                        Term t,
                                        TransformationContext ctx)
                                 throws TermWareException
run action debug stub.

Parameters:
stubClass - - generated class of stub.
ts - - term system, in which we call facts.
t - - action term.
ctx - - transformation context
Throws:
TermWareException

runConditionDebugStub

public static boolean runConditionDebugStub(Class<? extends ConditionDebugStub> stubClass,
                                            TermSystem ts,
                                            Term t,
                                            TransformationContext ctx)
                                     throws TermWareException
run condition debug stub.

Parameters:
stubClass - - generated class of stub.
ts - - term system, in which we call facts.
t - - condition term.
ctx - - transformation context
Returns:
result of condition check.
Throws:
TermWareException