Search in sources :

Example 11 with Chase

use of fr.lirmm.graphik.graal.api.forward_chaining.Chase in project graal by graphik-team.

the class DefaultKnowledgeBase method semiSaturate.

@Override
public void semiSaturate() throws KnowledgeBaseException {
    if (!this.isSemiSaturated) {
        this.compileRule();
        Chase chase = new BreadthFirstChase(this.ruleCompilation.getSaturation(), this.store);
        chase.setProfiler(this.getProfiler());
        try {
            chase.next();
        } catch (ChaseException e) {
            throw new KnowledgeBaseException(e);
        }
        this.isSemiSaturated = true;
    }
}
Also used : BreadthFirstChase(fr.lirmm.graphik.graal.forward_chaining.BreadthFirstChase) KnowledgeBaseException(fr.lirmm.graphik.graal.api.kb.KnowledgeBaseException) ChaseException(fr.lirmm.graphik.graal.api.forward_chaining.ChaseException) Chase(fr.lirmm.graphik.graal.api.forward_chaining.Chase) BreadthFirstChase(fr.lirmm.graphik.graal.forward_chaining.BreadthFirstChase)

Example 12 with Chase

use of fr.lirmm.graphik.graal.api.forward_chaining.Chase in project graal by graphik-team.

the class StaticChase method executeChase.

public static void executeChase(AtomSet atomSet, Iterable<Rule> ruleSet, RuleApplier<Rule, AtomSet> ruleApplier) throws ChaseException {
    Chase chase = new SccChase<AtomSet>(ruleSet.iterator(), atomSet, ruleApplier);
    chase.execute();
}
Also used : Chase(fr.lirmm.graphik.graal.api.forward_chaining.Chase)

Example 13 with Chase

use of fr.lirmm.graphik.graal.api.forward_chaining.Chase in project graal by graphik-team.

the class StaticChase method executeChase.

public static void executeChase(AtomSet atomSet, Iterable<Rule> ruleSet) throws ChaseException {
    Chase chase = new SccChase<AtomSet>(ruleSet.iterator(), atomSet);
    chase.execute();
}
Also used : Chase(fr.lirmm.graphik.graal.api.forward_chaining.Chase)

Example 14 with Chase

use of fr.lirmm.graphik.graal.api.forward_chaining.Chase in project graal by graphik-team.

the class StaticChase method executeOneStepChase.

public static void executeOneStepChase(AtomSet atomSet, Iterable<Rule> ruleSet) throws ChaseException {
    Chase chase = new SccChase<AtomSet>(ruleSet.iterator(), atomSet);
    chase.next();
}
Also used : Chase(fr.lirmm.graphik.graal.api.forward_chaining.Chase)

Aggregations

Chase (fr.lirmm.graphik.graal.api.forward_chaining.Chase)14 Atom (fr.lirmm.graphik.graal.api.core.Atom)5 Rule (fr.lirmm.graphik.graal.api.core.Rule)5 Theory (org.junit.experimental.theories.Theory)5 ChaseException (fr.lirmm.graphik.graal.api.forward_chaining.ChaseException)4 LinkedList (java.util.LinkedList)4 DefaultGraphOfRuleDependencies (fr.lirmm.graphik.graal.core.grd.DefaultGraphOfRuleDependencies)3 GraphOfRuleDependencies (fr.lirmm.graphik.graal.api.core.GraphOfRuleDependencies)2 RuleSet (fr.lirmm.graphik.graal.api.core.RuleSet)2 LinkedListRuleSet (fr.lirmm.graphik.graal.core.ruleset.LinkedListRuleSet)2 BreadthFirstChase (fr.lirmm.graphik.graal.forward_chaining.BreadthFirstChase)2 AtomSet (fr.lirmm.graphik.graal.api.core.AtomSet)1 AtomSetException (fr.lirmm.graphik.graal.api.core.AtomSetException)1 ConjunctiveQuery (fr.lirmm.graphik.graal.api.core.ConjunctiveQuery)1 InMemoryAtomSet (fr.lirmm.graphik.graal.api.core.InMemoryAtomSet)1 Ontology (fr.lirmm.graphik.graal.api.core.Ontology)1 AbstractChase (fr.lirmm.graphik.graal.api.forward_chaining.AbstractChase)1 RuleApplicationException (fr.lirmm.graphik.graal.api.forward_chaining.RuleApplicationException)1 HomomorphismException (fr.lirmm.graphik.graal.api.homomorphism.HomomorphismException)1 KnowledgeBaseException (fr.lirmm.graphik.graal.api.kb.KnowledgeBaseException)1