public class TraleSLDBridge extends LogicProgrammingBridge
Modifier and Type | Field and Description |
---|---|
static boolean |
VERBOSE |
currentID, selectedID, skipFlag, skipID, stepIDConv, waitingForReturnFromSkip
kahina
Constructor and Description |
---|
TraleSLDBridge(TraleSLDInstance kahina) |
Modifier and Type | Method and Description |
---|---|
void |
fail(int externalStepID)
Called to indicate that the fail port of the procedure box with the given
ID has been reached.
|
void |
finished(int extID) |
TraleSLDStep |
generateStep() |
void |
registerAppropriateFeature(java.lang.String type,
java.lang.String feature,
java.lang.String typeRest) |
void |
registerChartEdge(int externalEdgeID,
int left,
int right,
java.lang.String ruleName) |
void |
registerEdgeDependency(int motherID,
int daughterID) |
void |
registerEdgeRetrieval(int daughterID) |
void |
registerMessage(int extID,
java.lang.String key,
java.lang.String grisuMessage) |
void |
registerMessage(int extID,
java.lang.String key,
java.lang.String varName,
java.lang.String type,
java.lang.String grisuMessage) |
void |
registerMessage(int extID,
java.lang.String key,
java.lang.String varName,
java.lang.String tag,
java.lang.String type,
java.lang.String grisuMessage) |
void |
registerProspectiveEdge(int ruleApplicationExtID,
java.lang.String ruleName,
int leftmostDaughter)
Called by
registerRuleApplication(int, String, int, String) to
register the first prospective edge of a rule application, and directly
via the Jasper interface to register any subsequent prospective edge of
that rule application. |
void |
registerRuleApplication(int extID,
java.lang.String ruleName,
int leftmostDaughter,
java.lang.String consoleMessage) |
void |
registerSubtype(java.lang.String type,
java.lang.String subtype) |
void |
signatureFinished() |
void |
step(int extID,
java.lang.String stepType,
java.lang.String nodeLabel,
java.lang.String consoleMessage)
For each new procedure box that is created, this method or one of its
variants must first be called.
|
call, canSkipOrAutocomplete, convertStepID, deregister, end, exception, exit, exit, exit, getAction, getBridgeState, getParentCandidateID, isPaused, isQueryRoot, linkNodes, maybeUpdateStepCount, performBreakAction, performCompleteAction, performCreepAction, performFailAction, performSkipAction, processControlEvent, processEvent, processSelectionEvent, processSystemEvent, processWarnEvent, redo, registerLayer, registerStepSourceCodeLocation, select, selectIfPaused, setBridgeState, setParentCandidateID, step, step, virtualRedo, warning
public static final boolean VERBOSE
public TraleSLDBridge(TraleSLDInstance kahina)
public void registerSubtype(java.lang.String type, java.lang.String subtype)
public void registerAppropriateFeature(java.lang.String type, java.lang.String feature, java.lang.String typeRest)
public void signatureFinished()
public void step(int extID, java.lang.String stepType, java.lang.String nodeLabel, java.lang.String consoleMessage)
LogicProgrammingBridge
LogicProgrammingBridge.call(int)
for
historic reasons and for flexibility, e.g. it can be overloaded with
various arguments representing all kinds of information about a step
without touching the call method. Note however that information about a
step that is not absolutely central, such as source code locations,
should be sent to Kahina using specialized methods following the call to
the step method.step
in class LogicProgrammingBridge
extID
- An ID identifying the procedure box uniquely.stepType
- A string identifying the type of the step, e.g. a Prolog
predicate identifier such as append/3
. Will be used
for categorizing and counting steps in the profiler.nodeLabel
- A full description of the step, such as
append([1,2],[3,4],X)
. Will be used for labeling nodes
in the control flow graph.consoleMessage
- A more extensive description of the (type of) the step, such
as a prose description of what append/3
does. Will be
displayed in the message console.public void registerProspectiveEdge(int ruleApplicationExtID, java.lang.String ruleName, int leftmostDaughter)
registerRuleApplication(int, String, int, String)
to
register the first prospective edge of a rule application, and directly
via the Jasper interface to register any subsequent prospective edge of
that rule application.leftmostDaughter
- pass -1
to not register a leftmost daughterpublic void registerEdgeRetrieval(int daughterID)
public void registerRuleApplication(int extID, java.lang.String ruleName, int leftmostDaughter, java.lang.String consoleMessage)
public void registerChartEdge(int externalEdgeID, int left, int right, java.lang.String ruleName)
public void registerEdgeDependency(int motherID, int daughterID)
public void registerMessage(int extID, java.lang.String key, java.lang.String grisuMessage)
public void registerMessage(int extID, java.lang.String key, java.lang.String varName, java.lang.String type, java.lang.String grisuMessage)
public void registerMessage(int extID, java.lang.String key, java.lang.String varName, java.lang.String tag, java.lang.String type, java.lang.String grisuMessage)
public void fail(int externalStepID)
LogicProgrammingBridge
fail
in class LogicProgrammingBridge
public void finished(int extID)
public TraleSLDStep generateStep()
generateStep
in class LogicProgrammingBridge