Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 7779e1d035
Fetching contributors…

Cannot retrieve contributors at this time

220 lines (168 sloc) 3.059 kB
Q(id,descr) :- Test(id,descr).
?-Q(id,descr).
/
Q(id,descr) :- Test(id,descr).
R(id,descr) :- Q(id,descr).
?-R(id,descr).
/
Q(id,descr) :- Test(id,descr).
?-Q(descr, id).
/
Q(descr,id) :- Test(id,descr).
?-Q(id).
/
Q(id,descr) :- Test(id,descr).
?-Q(id).
/
Q(id,descr) :- Test(id,descr).
?-Q(descr).
/
Q(id,descr) :- Test(id,descr).
?-Q(descr, id).
/
Q(y,x) :- Test(x,y).
?-Q(a,b).
/
Q(x,y) :- Test(y,x).
R(x,x) :- Q(x,y).
?-R(a,b).
/
Q(x,y) :- Test(y,x).
R(y,x) :- Q(y,x).
?-R(a,b).
/
Q(x,y) :- Test(x,y).
?-Q(a,b).
/
Q(x,y) :- Test(x,y).
?-Q(a,b).
/
Q(x,y) :- Test(x,y).
?-Q(b).
/
Q(x,y) :- Test(x,y) and x=1.
?-Q(b,c).
/
Q(x) :- Test(x,y) and Test(x,e).
?-Q(b).
/
Q(x,y,e) :- Test(x,y) and Test(x,e).
?-Q(b,c,d).
/
Q(x) :- Test(x,x).
?-Q(b).
/
Q(x,y,z,a,b) :- Names(x,y,z) and Marks(x,a,b).
?-Q(a,b,c,d,e).
/
Q(x,y,z,a,b,u,i) :- Names(x,y,z) and Marks(x,a,b) and Names(x,u,i).
?-Q(a,b,c,d,e,f,g).
/
Q(x,a,b):-Names(x,y,z) and Marks(x,a,b) and b = 75.
?-Q(x,a,b).
/
Q(x,a,b):-Marks(x,a,b).
?-Q(x,a,b).
/
Q(x,y,z,a,b,u,i) :- Names(x,y,z) and Marks(x,a,b) and Names(x,u,i) and b = 75 and x = 1.
?-Q(a,b,c,d,e,f,g).
/
N(x,y,z) :- Names(x,y,z) and x = 1.
M(x,y,z) :- Marks(x,y,z) and z = 75.
Q(x,a,b,c,d) :- N(x,a,b) and M(x,c,d).
?-Q(x,a,b,c,d).
/
Q(x,a,b):-Names(x,y,z) and Marks(x,a,b) and not b = 75.
?-Q(x,a,b).
/
Q(y):-Student(x,z,a) and not Enroll(x,y,b) and z=200.
R(x):-Enroll(a,x,b) and not Q(x).
?-R(x).
/
Q(id,descr) :- Test(id,descr).
R(id,descr) :- Q(id,descr).
?-R(x,y,x).
/
Q(id,descr) :- Test(id,descr).
R(id,descr) :- Q(id,descr,id).
?-R(x,y).
/
Q(y):-Student(x,z,a) and not Enroll(x,y,b) and Enroll(c,y,d) and not b=100.
R(x):-Enroll(a,x,b) and not Q(x).
?-R(x).
/
Q(x,a,b):-Names(x,y,z) and Marks(x,a,b) and b = 75.
?-Q(x,a,b).
/
Q(x,a,b):-Names(x,y,z) and Marks(x,a,b) and 75 = b.
?-Q(x,a,b).
/
Q(y):-Enroll(a,y,b) and y = 100.
?-Q(y).
/
Q(y):-Enroll(a,y,b) and not y = 100.
?-Q(y).
/
Q(id,descr) :- Test(id,descr).
R(id,descr) :- Q(id,descr).
?-R(x,y,x).
/
Q(id,descr) :- Test(id,descr).
R(id,descr) :- Q(id,descr,id).
?-R(x,y).
/
Q(a,b,c) :- Test(a,b,c).
?-Q(id,descr,c).
/
Q(x,y):-Marks(x,y,x).
?-Q(x,y).
/
Q(x,y,z):-Marks(x,y,z).
R(x,z):-Q(x,z,x).
?-R(x,y).
/
Q(x,y,z):-Names(x,y,z) and not Marks(x,a,x).
?-Q(x,a,b).
/
Q(x,y,z):-Marks(x,y,z).
?-Q(x,y,x).
/
Q(x,y,z):-Marks(x,y,z) and x = z.
?-Q(x,y,z).
/
Q(x,y,z):-Marks(x,y,z) and not x = z.
?-Q(x,y,z).
/
Q(x,y,z):-Names(x,y,z) and not Marks(x,a,b) and x = b.
?-Q(x,a,b).
/
Q(x,y,z):-Names(x,y,z) and not Marks(x,a,b) and not x = b.
?-Q(x,a,b).
/
Q(x,y,z):-Names(x,y,z) and Marks(x,a,b) and x = b.
?-Q(x,a,b).
/
Q(x,y,z):-Names(x,y,z) and Marks(x,a,b) and not x = b.
?-Q(x,a,b).
/
Q(x,y,z):-Marks(x,y,z) and z < 50.
?-Q(x,y,z).
/
Q(x,y,z):-Marks(x,y,z) and z >= 50.
?-Q(x,y,z).
/
Q(x,y,z):-Marks(x,y,z) and x < z.
?-Q(x,y,z).
/
Q(x,y,z):-Marks(x,y,z) and not x < z.
?-Q(x,y,z).
/
Q(x,y,z):-Marks(x,y,z) and z <> 50.
?-Q(x,y,z).
/
Q(x,y,z):-Marks(x,y,z) and not z <> 50.
?-Q(x,y,z).
/
Q(x,y,z):-Marks(x,y,z) and z = 50.
?-Q(x,y,z).
/
Jump to Line
Something went wrong with that request. Please try again.