Esempio n. 1
0
def check_checks():
    p = problem.last_problem[0]
    rep = rep_graph.mk_graph_slice(p)
    proof = search.last_proof[0]
    checks = check.proof_checks(p, proof)
    all_hyps = set([hyp for (_, hyp, _) in checks] + [hyp for (hyps, _, _) in checks for hyp in hyps])
    results = [try_interpret_hyp(rep, hyp) for hyp in all_hyps]
    return [r[1] for r in results if r]
Esempio n. 2
0
def check_checks():
    p = problem.last_problem[0]
    rep = rep_graph.mk_graph_slice(p)
    proof = search.last_proof[0]
    checks = check.proof_checks(p, proof)
    all_hyps = set([hyp for (_, hyp, _) in checks] +
                   [hyp for (hyps, _, _) in checks for hyp in hyps])
    results = [try_interpret_hyp(rep, hyp) for hyp in all_hyps]
    return [r[1] for r in results if r]
Esempio n. 3
0
def proof_failed_groups(p=None, proof=None):
    if p == None:
        p = problem.last_problem[0]
    if proof == None:
        proof = search.last_proof[0]
    checks = check.proof_checks(p, proof)
    groups = check.proof_check_groups(checks)
    failed = []
    for group in groups:
        rep = rep_graph.mk_graph_slice(p)
        (res, el) = check.test_hyp_group(rep, group)
        if not res:
            failed.append(group)
            print "Failed element: %s" % el
    failed_nms = set([s for group in failed for (_, _, s) in group])
    print "Failed: %s" % failed_nms
    return failed
Esempio n. 4
0
def proof_failed_groups(p=None, proof=None):
    if p == None:
        p = problem.last_problem[0]
    if proof == None:
        proof = search.last_proof[0]
    checks = check.proof_checks(p, proof)
    groups = check.proof_check_groups(checks)
    failed = []
    for group in groups:
        rep = rep_graph.mk_graph_slice(p)
        (res, el) = check.test_hyp_group(rep, group)
        if not res:
            failed.append(group)
            print 'Failed element: %s' % el
    failed_nms = set([s for group in failed for (_, _, s) in group])
    print 'Failed: %s' % failed_nms
    return failed