When the inference method is set to Backward, use this statement to identify the variable for which the inference engine is to solve.
The GoalVariable statement, when required, must appear immediately after the Variables(...) section of the ruleset.
RuleSet <nameOfRuleSet> ( <Processing Options Statement>* // Zero or more statements variables { <Variable Declaration Statement>+ // One or more statements } void main() using Backward(goalVariable=<variableName>) { } . . . } |
Specifies the variable for which the backward chaining inference engine is to solve. GoalVariable is a required statement when using Backward is specified. For other inference methods, the statement must not be used.
Syntax
void main() using Backward(goalVariable=<variableName>) { }
Parameters
Example
ruleset <nameOfRuleSet> { InferenceMethod(Backward) variables { Diagnosis string("unknown"); ... } void main() using Backward(goalVariable=Diagnosis) { // The backward chaining inference engine // tries to determine the diagnosis. . . . } |