parser = argparse.ArgumentParser()
    parser.add_argument('path',help='name of a zitser test, e.g., id1284')
    parser.add_argument('cfile',help='name of c file that is part of the test')
    parser.add_argument('cfunction',help='name of function in c file')
    parser.add_argument('--open',help='only show open proof obligations',action='store_true')
    parser.add_argument('--violations',help='only show proof obligations that are violated',
                            action='store_true')
    parser.add_argument('--predicate',help='only show proof obligations of this type')
    args = parser.parse_args()
    return args

if __name__ == '__main__':

    args = parse()

    cpath = UF.get_zitser_testpath(args.path)
    
    if not os.path.isdir(cpath):
        print(UP.cpath_not_found_err_msg(cpath))
        exit(1)

    if not os.path.isfile(os.path.join(cpath,args.cfile)):
        print(UP.cfile_not_found_err_msg(cpath,args.cfile))
        exit(1)

    sempath = os.path.join(cpath,'semantics')
    if not os.path.isdir(sempath):
        print(UP.semantics_not_found_err_msg(cpath))
        exit(1)
        
    cfapp = CApplication(sempath,args.cfile)
Exemple #2
0
if __name__ == '__main__':

    projectstats = {}  # project -> (linecount, clinecount, cfuncount)

    ppoprojecttotals = {}  # project -> dm -> dmtotal
    spoprojecttotals = {}
    ppotagtotals = {}  # tag -> dm -> dmtotal
    spotagtotals = {}
    nosummary = []
    analysistimes = {}

    dsmethods = RP.get_dsmethods([])

    for p in testcases:
        path = UF.get_zitser_testpath(p)
        results = UF.read_project_summary_results(path)
        if results is None:
            nosummary.append(p)
            continue
        pd = results
        try:
            ppod = pd['tagresults']['ppos']
            spod = pd['tagresults']['spos']
            ppoprojecttotals[p] = {}
            spoprojecttotals[p] = {}
        except:
            print('Problem with ' + str(p))
            continue
        if 'stats' in pd:
            projectstats[p] = pd['stats']