Beispiel #1
0
def grandfather(x, y):
    z = var()
    return conde((grandparents(x, y), Male(x)))
Beispiel #2
0
def grandmother(x, y):
    z = var()
    return conde((grandparents(x, y), Female(x)))
Beispiel #3
0
def grandmother(x, y):
    temp = var()
    return conde((mother(x, temp), parent(temp, y)))
Beispiel #4
0
def test_rs1_47():
    x = var()
    eq(("olive", "oil"), run(0, x,
                             conde((unify("olive", x),),
                                   (unify("oil", x),))))
Beispiel #5
0
def grandparent(x, z):
    y = var()
    return conde((parent(x, y), parent(y, z)))
Beispiel #6
0
def sibling(x, y):
    temp = var()
    return conde((parent(temp, x), parent(temp, y)))
Beispiel #7
0
def sibling(x, y):
    z = var()
    return conde((parents(z, x), parents(z, y)))
Beispiel #8
0
def sibling(a, b):
    p = var()
    return conde((parent(p, a), parent(p, b)))
Beispiel #9
0
def sibling(a, b):
    p = var()
    return conde((parent(p, a), parent(p, b)))
Beispiel #10
0
def uncle(m, y):
    z = var()
    x = var()
    return conde((Father(x, z), Father(x, m), Father(z, y), Male(m)))
Beispiel #11
0
def grandparent(gparent, child):
    p = var()
    return conde((parent(gparent, p), parent(p, child)))
Beispiel #12
0
def parent(p, child):
    return conde([father(p, child)], [mother(p, child)])
Beispiel #13
0
 def teacupo(x):
     return conde((unify("tea", x),),
                  (unify("cup", x),))
Beispiel #14
0
def parent(p, child):
    return conde([father(p, child)], [mother(p, child)])
Beispiel #15
0
def brother(x, y):
    z = var()
    return conde((parents(z, x), parents(z, y), Male(x)))
Beispiel #16
0
def grandparent(gparent, child):
    p = var()
    return conde((parent(gparent, p), parent(p, child)))
Beispiel #17
0
def sister(x, y):
    z = var()
    return conde((parents(z, x), parents(z, y), Female(x)))
Beispiel #18
0
def grandparent(x, z):
    y = var()
    return conde((parent(x,y), parent(y,z)))
Beispiel #19
0
def aunty(x, y):
    z = var()
    return conde((uncle(z, y), Couple(z, x), Female(x)))
Beispiel #20
0
def grandparent(x, y):
    temp = var()
    return conde((parent(x, temp), parent(temp, y)))
Beispiel #21
0
def parents(x, y):
    return conde([Father(x, y)], [Mother(x, y)])
Beispiel #22
0
def uncle(x, y):
    temp = var()
    return conde((father(temp, x), grandparent(temp, y)))
Beispiel #23
0
def grandparents(x, y):
    z = var()
    return conde((parents(x, z), parents(z, y)))
Beispiel #24
0
def parent(x, y):
    return conde([father(x, y)], [mother(x, y)])
Beispiel #25
0
 def son(father, boy):
     return conde((parent(father, boy), male(boy)))