예제 #1
0
파일: regrtest.py 프로젝트: gowthamk/DOrder
def runtest(filep, expected_status):
    file = filep[0]
    collect = int(filep[1])
    lqualifs = common.str_to_bool(filep[2])
    status = dsolve.gen_quals(file, False, lqualifs, collect)
    if status != 0:
        print "Qualgen failed on %s" % file
        sys.exit(2)
    start = time.time()
    status = dsolve.solve_quals(file, False, True, [" -v 0 "])
    if status == 2: sys.exit(2)
    print "%f seconds" % (time.time() - start)

    ok = (status == expected_status)
    if ok:
        print "\033[1;32mSUCCESS!\033[1;0m\n"
    else:
        print "\033[1;31mFAILURE :(\033[1;0m\n"
    return (file, ok)
예제 #2
0
파일: regrtest.py 프로젝트: gowthamk/DOrder
def runtest(filep, expected_status):
  file = filep[0]
  collect = int(filep[1])
  lqualifs = common.str_to_bool(filep[2])
  status = dsolve.gen_quals(file, False, lqualifs, collect)
  if status != 0: 
    print "Qualgen failed on %s" % file
    sys.exit(2)
  start = time.time()
  status = dsolve.solve_quals(file, False, True, [" -v 0 "])
  if status == 2: sys.exit(2)
  print "%f seconds" % (time.time() - start)

  ok = (status == expected_status)
  if ok:
    print "\033[1;32mSUCCESS!\033[1;0m\n"
  else:
    print "\033[1;31mFAILURE :(\033[1;0m\n"
  return (file, ok)
예제 #3
0
def runtest(file, norecrefs):
    expected_stats = 0
    include = "../../theories"
    status = dsolve.gen_quals(file, True, "-I " + include)
    if status != 0:
        print "Qualgen failed on %s" % file
        sys.exit(2)
    start = time.time()
    flags = ["-v", "0", "-no-simple", "-no-timing", "-I", include]
    if norecrefs:
        flags += ["-no-recrefs"]
    status = dsolve.solve_quals(file, True, False, True, flags)
    if status == 2: sys.exit(2)
    print "%f seconds" % (time.time() - start)

    ok = (status == expected_status)
    if ok:
        print "\033[1;32mSUCCESS!\033[1;0m\n"
    else:
        print "\033[1;31mFAILURE :(\033[1;0m\n"
    return (file, ok)
예제 #4
0
def runtest(file, norecrefs):
  expected_stats = 0
  include = "../../theories"
  status = dsolve.gen_quals(file, True, "-I " + include)
  if status != 0: 
    print "Qualgen failed on %s" % file
    sys.exit(2)
  start = time.time()
  flags = ["-v", "0", "-no-simple", "-no-timing", "-I", include]
  if norecrefs:
    flags += ["-no-recrefs"]
  status = dsolve.solve_quals(file, True, False, True, flags)
  if status == 2: sys.exit(2)
  print "%f seconds" % (time.time() - start)

  ok = (status == expected_status)
  if ok:
    print "\033[1;32mSUCCESS!\033[1;0m\n"
  else:
    print "\033[1;31mFAILURE :(\033[1;0m\n"
  return (file, ok)
예제 #5
0
def runtest(file, expected_status):
  include = "theories"
  status = dsolve.gen_quals(file, False, "-I " + include)
  if status != 0: 
    print "Qualgen failed on %s" % file
    sys.exit(2)
  start = time.time()
  status = dsolve.solve_quals(file, True, False, True, ["-v", "0", "-fix", "-simpguard", "-no-simple", "-no-timing", "-I", include])
  #if status == 2: sys.exit(2)
  print "%f seconds" % (time.time() - start)

  ok = (status == expected_status)
  if ok:
    print "\033[1;32mSUCCESS!\033[1;0m\n"
  else:
    print "\033[1;31mFAILURE :(\033[1;0m\n"
  if ok:
    (_, _, f) = file.rpartition("/")
    os.system("mv /tmp/fix.in.fq %s/%s.in.fq" % (dstdir, f))
    os.system("mv /tmp/fix.out.fq %s/%s.out.fq" % (dstdir, f))
  return (file, ok)
예제 #6
0
def runtest(file, expected_status):
    include = "theories"
    status = dsolve.gen_quals(file, False, "-I " + include)
    if status != 0:
        print "Qualgen failed on %s" % file
        sys.exit(2)
    start = time.time()
    status = dsolve.solve_quals(file, True, False, True, [
        "-v", "0", "-fix", "-simpguard", "-no-simple", "-no-timing", "-I",
        include
    ])
    #if status == 2: sys.exit(2)
    print "%f seconds" % (time.time() - start)

    ok = (status == expected_status)
    if ok:
        print "\033[1;32mSUCCESS!\033[1;0m\n"
    else:
        print "\033[1;31mFAILURE :(\033[1;0m\n"
    if ok:
        (_, _, f) = file.rpartition("/")
        os.system("mv /tmp/fix.in.fq %s/%s.in.fq" % (dstdir, f))
        os.system("mv /tmp/fix.out.fq %s/%s.out.fq" % (dstdir, f))
    return (file, ok)
예제 #7
0
# ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION
# TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.

import common, sys, time
import itertools as it
import dsolve


def run(file):
    start = time.time()
    status = dsolve.solve_quals(file, True, True, [" -v 0 "])
    if status == 2: sys.exit(2)
    end = time.time() - start
    print "%f seconds" % (end)

    return end


file = sys.argv[1]

status = dsolve.gen_quals(file, True, False, 4)
if status != 0:
    print "Qualgen failed on %s" % file
    sys.exit(2)

trials = 3
times = [run(file) for i in range(0, trials)]
avg = sum(times) / trials

print "\nAverage time: %f" % (avg)
예제 #8
0
# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
# AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
# ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION
# TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.

import common, sys, time
import itertools as it
import dsolve

def run(file):
  start = time.time()
  status = dsolve.solve_quals(file, True, True, [" -v 0 "])
  if status == 2: sys.exit(2)
  end = time.time() - start
  print "%f seconds" % (end)

  return end

file = sys.argv[1]

status = dsolve.gen_quals(file, True, False, 4)
if status != 0: 
  print "Qualgen failed on %s" % file
  sys.exit(2)

trials = 3
times  = [run(file) for i in range(0, trials)]
avg    = sum(times) / trials

print "\nAverage time: %f" % (avg)