diff --git a/integraal/integraal-explanation/src/main/java/fr/boreal/explanation/tracker_gri/explainers/AbstractStaticGRIBasedExplainer_TrackerGRI.java b/integraal/integraal-explanation/src/main/java/fr/boreal/explanation/tracker_gri/explainers/AbstractStaticGRIBasedExplainer_TrackerGRI.java index 2fdb5d0fca7cd927a217aa9eb96fd37b49b99374..55b6631803852d31cec3e356df511f34624c8d85 100644 --- a/integraal/integraal-explanation/src/main/java/fr/boreal/explanation/tracker_gri/explainers/AbstractStaticGRIBasedExplainer_TrackerGRI.java +++ b/integraal/integraal-explanation/src/main/java/fr/boreal/explanation/tracker_gri/explainers/AbstractStaticGRIBasedExplainer_TrackerGRI.java @@ -46,6 +46,22 @@ public abstract class AbstractStaticGRIBasedExplainer_TrackerGRI<ExplanationType */ GRIRuleTransformer ruleTransformer = GRIRuleTransformer.instance(); Predicate<Atom> belongsToInitialFactbase; + /** + * Sets the initial KB and compute the GRI + * + * @param inputKB the current kb + */ + public AbstractStaticGRIBasedExplainer_TrackerGRI(KnowledgeBase inputKB) { + this.inputKB = inputKB; + + this.intialAtoms = new HashSet<Atom>(); + inputKB.getFactBase().getAtoms().forEach(intialAtoms::add); + + var trackedChase = DefaultChaseForExplanations.chaseForTracker(this.inputKB); + this.griKBChase = trackedChase.chase(); + this.griTracker = trackedChase.tracker(); + } + /** * Sets the initial KB and compute the GRI * @@ -60,6 +76,7 @@ public abstract class AbstractStaticGRIBasedExplainer_TrackerGRI<ExplanationType var trackedChase = DefaultChaseForExplanations.chaseForTracker(this.inputKB); this.griKBChase = trackedChase.chase(); this.griTracker = trackedChase.tracker(); + this.solver=solver; } public void pipeline() {