CSc 4340, Fall 2009
Project Phase 1 Test Cases
--------------------------

Good DRC Queries

{ x | p(x,y) }

{x | x >= y}

{x,y | p(x,y) and x>=y }

{x | (exists x)(p(x,y) and x <> 20) }

{ x,y | not(p(x,y) or q(z)) }

{ x | p(x) and p(y) and p(z) or q(a) or z > 20 }

{ q,s | (exists r,t,u,v,w,x,y,z)(
          employee(q,r,s,t,u,v,w,x,y,z) and 
         (forall l,m,n,o,p)(not (dependent(l,m,n,o,p)) or t<>l) )}

{ q,s | (exists r,t,u,v,w,x,y,z)(
          employee(q,r,s,t,u,v,w,x,y,z) and 
          not ((exists m,n,o,p)(dependent(t,m,n,o,p))) ) }

{ i,k,s,u,v | (exists h,q,r,t,w,x,y,z,l,o)(
                projects(h,i,'Stafford',k) and 
                employee(q,r,s,t,u,v,w,x,y,z) and 
                department(l,k,t,o) ) }

{name | (exists cno,a,b,c)(
          customers(cno,name,a,b,c) and
          (exists d,e,f,g,h,i,j,k)(
              orders(d,cno,e,f,g) and
              orders(h,cno,i,j,k) and
              d<>h) and
           not ((exists d1,e1,f1,g1,d2,e2,f2,g2,d3,e3,f3,g3)(
                    orders(d1,cno,e1,f1,g1) and
                    orders(d2,cno,e2,f2,g2) and
                    orders(d3,cno,e3,f3,g3) and
                    d1<>d2 and d2<>d3 and d1<>d3
                ))
         ) }

{ N | (exists P,R)(parts(P,N,R) and
        (exists S1,S2,S3,C1,C2,C3)(
          supplies(S1,P,C1) and supplies(S2,P,C2) and 
          supplies(S3,P,C3) and S1<>S2 and S2<>S3 and S1<>S3)
      )
}

{ N | (exists P,R)(parts(P,N,R) and
        (exists S,C,A)(suppliers(S,'Yosemite Sham',A) and supplies(S,P,C)) and
        not ((exists S,C,A,Q,D)(suppliers(S,'Yosemite Sham',A) and
                               supplies(S,P,C) and supplies(S,Q,D) and C < D)))
}

{X | male(X) and not((exists Y)(marriages(X,Y))) and
                 not((exists Y)(marriages(Y,X))) }

{ A1,A2 | (exists M1,M2)(
            actors(M1,A1) and actors(M2,A2) and
            not ((exists M,V)(actors(M,A1) and actors(V,A2) and
                                 not (actors(M,A2)))) and
            not ((exists M,V)(actors(M,A2) and actors(V,A1) and
                                 not (actors(M,A1)))) and
            A1<A2
                        )}


Bad DRC Queries

{x | (exists x)p(x,y) }

{ x | (exists x y z)(p(x,y,z,u) and q(20,20)) }

{ | (exists x)(p(x)) }

{x,y | (exists )(p(x,y,'tom')) }

{x,y | p(x,y) >= 20 }

{ A1,A2 | (exists M1,M2)(
            actors(M1,A1) and actors(M2,A2) and
            not (extsis M,V)(actors(M,A1) and actors(V,A2) and
                                 not actors(M,A2)) and
            not (extsis M,V)(actors(M,A2) and actors(V,A1) and
                                 not actors(M,A1)) and
                        )}