コード例 #1
0
def bool2board(name):
    
    M = readFile(name)

    if M[0][0]=='UNSAT':
        print 'UNSAT PROBLEM'
        return

    B = generateBoardFromMinisatExtendedOutput(M)

    # check no 1's in margin
    
    printBoard(B)
コード例 #2
0
def checkResults(name1, name2):

    M1 = readFile(name1)
    M2 = readFile(name2)

    if M2[0][0] == "UNSAT":
        print "UNSAT PROBLEM"
        return

    B1 = generateBoardFromInput(M1)  # read Input file

    B2 = generateBoardFromMinisatExtendedOutput(M2)  # read Result

    compare(B1, B2)  # add * for new checkers (and ! for errors)
    n = len(B2) * 2

    print "-" * n
    printBoard(B1)
    print "-" * n
    print "  "
    print "-" * n
    printBoard(B2)
    print "-" * n