Search in sources :

Example 6 with Store

use of fr.lirmm.graphik.graal.api.store.Store in project graal by graphik-team.

the class StoreTest method bugConcurrentModificationException.

@Theory
public void bugConcurrentModificationException(InMemoryAtomSet store) throws IteratorException, RuleApplicationException, AtomSetException {
    Assume.assumeTrue(store instanceof Store);
    Rule r = DlgpParser.parseRule("<T>(Z,W), <P>(Y,W) :- <P>(X,Y).");
    store.addAll(DlgpParser.parseAtomSet("<P>(a,a)."));
    try {
        DefaultRuleApplier<InMemoryAtomSet> applier = new DefaultRuleApplier<InMemoryAtomSet>();
        applier.apply(r, store);
        applier.apply(r, store);
    } catch (Exception e) {
        Assert.fail();
    }
}
Also used : InMemoryAtomSet(fr.lirmm.graphik.graal.api.core.InMemoryAtomSet) RdbmsStore(fr.lirmm.graphik.graal.store.rdbms.RdbmsStore) Store(fr.lirmm.graphik.graal.api.store.Store) TripleStore(fr.lirmm.graphik.graal.api.store.TripleStore) Rule(fr.lirmm.graphik.graal.api.core.Rule) RuleApplicationException(fr.lirmm.graphik.graal.api.forward_chaining.RuleApplicationException) AtomSetException(fr.lirmm.graphik.graal.api.core.AtomSetException) SQLException(java.sql.SQLException) HomomorphismException(fr.lirmm.graphik.graal.api.homomorphism.HomomorphismException) ParseException(fr.lirmm.graphik.graal.api.io.ParseException) IteratorException(fr.lirmm.graphik.util.stream.IteratorException) DefaultRuleApplier(fr.lirmm.graphik.graal.forward_chaining.rule_applier.DefaultRuleApplier) Theory(org.junit.experimental.theories.Theory)

Aggregations

Store (fr.lirmm.graphik.graal.api.store.Store)6 TripleStore (fr.lirmm.graphik.graal.api.store.TripleStore)3 RdbmsStore (fr.lirmm.graphik.graal.store.rdbms.RdbmsStore)3 Theory (org.junit.experimental.theories.Theory)3 AtomSetException (fr.lirmm.graphik.graal.api.core.AtomSetException)2 InMemoryAtomSet (fr.lirmm.graphik.graal.api.core.InMemoryAtomSet)2 Term (fr.lirmm.graphik.graal.api.core.Term)2 IteratorException (fr.lirmm.graphik.util.stream.IteratorException)2 Atom (fr.lirmm.graphik.graal.api.core.Atom)1 Constant (fr.lirmm.graphik.graal.api.core.Constant)1 Predicate (fr.lirmm.graphik.graal.api.core.Predicate)1 Rule (fr.lirmm.graphik.graal.api.core.Rule)1 Substitution (fr.lirmm.graphik.graal.api.core.Substitution)1 Variable (fr.lirmm.graphik.graal.api.core.Variable)1 RuleApplicationException (fr.lirmm.graphik.graal.api.forward_chaining.RuleApplicationException)1 HomomorphismException (fr.lirmm.graphik.graal.api.homomorphism.HomomorphismException)1 ParseException (fr.lirmm.graphik.graal.api.io.ParseException)1 KnowledgeBase (fr.lirmm.graphik.graal.api.kb.KnowledgeBase)1 DefaultInMemoryGraphStore (fr.lirmm.graphik.graal.core.atomset.graph.DefaultInMemoryGraphStore)1 DefaultRuleApplier (fr.lirmm.graphik.graal.forward_chaining.rule_applier.DefaultRuleApplier)1