for x in ag.domain.relations: ag.domain.all_relations.append((x, ag.domain.relations[x])) for (x, y) in ag.domain.concepts: ag.domain.all_relations.append( (x.atom.relname, len(x.atom.args))) ivy_logic.sig = ag.domain.sig # TODO: make this an environment f.close() else: # print "creating new" ag = ivy_new() if files: fn, f = files.pop(0) if not fn.endswith('.ivy') and not fn.endswith('.dfy'): usage() try: # print "loading file %s" % fn with iu.SourceFile(fn): ivy_load_file(f, ag) except IvyError as e: if not hasattr(e, 'filename'): e.filename = fn print repr(e) sys.exit(1) return ag if __name__ == "__main__": with ivy_module.Module(): ui_main_loop(ivy_init())
def analyze_state(ag,state,clauses): # print "cex: {}".format(clauses) ag.states = [] analyze_state_rec(ag,state) state.clauses.extend(clauses) ui.ui_main_loop(ag)
def analyze_state(ag, state, clauses): # print "cex: {}".format(clauses) ag.states = [] analyze_state_rec(ag, state) state.clauses.extend(clauses) ui.ui_main_loop(ag)
for x in ag.domain.relations: ag.domain.all_relations.append((x,ag.domain.relations[x])) for (x,y) in ag.domain.concepts: ag.domain.all_relations.append((x.atom.relname,len(x.atom.args))) ivy_logic.sig = ag.domain.sig # TODO: make this an environment f.close() else: # print "creating new" ag = ivy_new() if files: fn,f = files.pop(0) if not fn.endswith('.ivy') and not fn.endswith('.dfy'): usage() try: # print "loading file %s" % fn with iu.SourceFile(fn): ivy_load_file(f,ag) except IvyError as e: if not hasattr(e,'filename'): e.filename = fn print repr(e) sys.exit(1) return ag if __name__ == "__main__": with ivy_module.Module(): ui_main_loop(ivy_init())