--- /dev/null
+package com.example.furt.myapplication;
+
+//Regole di introduzione per la deduzione top-down: la formula รจ sempre applicabile, per cui la regola si limita
+//a chiamare la callback e restituire il sottoalbero di nodi conseguente all'applicazione della regola
+public class RuleIntroduction implements IntroductionRule
+{
+ int priority;
+ Node tempRule;
+ String ruleName;
+ public RuleIntroduction(String name,int p)
+ {
+ ruleName=name; priority=p;
+ }
+ public Node createNodes(askFormula ask)
+ {
+ Formula C=ask.Ask();
+ for (Node n:tempRule.Children)
+ {
+ if (n.F.toString().equals(" ")) //undefined formula
+ n.F=C;
+ n.ruleName=ruleName;
+ }
+ tempRule.ruleName=ruleName;
+ return tempRule;
+ }
+ public int getPriority()
+ {
+ return priority;
+ }
+}