Commits

Pierre Carbonnelle  committed 09b0f56

test negation of conjunctions

  • Participants
  • Parent commits 0db7753

Comments (0)

Files changed (1)

File pyDatalog/examples/test.py

         +p(a, b)
         assert ask(~p(X, b)) == None
         assert ask(~p(X, c)) == set([()])
+        assert(ask(~(p(X,c) & p(X,a)))) == set([()])
+        assert(ask(p(X,b) & ~(p(X,c) & p(X,a)))) == set([('a',)])
+        assert(ask(~(p(X,c) & p(X,a)) & p(X,b))) == set([('a',)])
+        assert(ask(~(p(X,b) & p(X,a) & p(X,b)))) == set([()])
 
     pyDatalog.load("""
         + even(0)