コード例 #1
0
def backward(rules, query, *pmode):
    global known, kbase                                # avoid extra args
    kbase = rules
    known = Index().init([(['true'],['true'])]) 
    try:
        for proof in AND(query, [], [(None, (None, {}))], 0):
            topenv = proof[0][1][1]
            report(kbase, topenv, query, pmode, proof[1:])
        print 'no (more) solutions  [backwrd7.py]'
    except stop_proof: pass
コード例 #2
0
ファイル: backwrd7.py プロジェクト: improve100/python-scripts
def backward(rules, query, *pmode):
    global known, kbase                                # avoid extra args
    backwrd1.kbase = rules                             # for rule browsing
    known, kbase = [['true']], rules                   # local to module
    try:
        for proof in AND(query, [], [(None, (None, {}))], 0):
            topenv = proof[0][1][1]
            report(topenv, query, pmode, proof[1:])
        print 'no (more) solutions  [backwrd7.py]'
    except stop_proof: pass
コード例 #3
0
def backward(rules, query, *pmode):
    global known, kbase  # avoid extra args
    kbase = rules
    known = Index().init([(['true'], ['true'])])
    try:
        for proof in AND(query, [], [(None, (None, {}))], 0):
            topenv = proof[0][1][1]
            report(kbase, topenv, query, pmode, proof[1:])
        print 'no (more) solutions  [backwrd7.py]'
    except stop_proof:
        pass