Ejemplo n.º 1
0
Archivo: main.py Proyecto: Auzzy/school
def run(file_name, func_name):
	program_text = open(file_name,'r').read()
	user_mod = load_module(splitext(basename(file_name))[0],file_name)
	user_func = getattr(user_mod,func_name)

	input_dict = run_DART(program_text,user_func)
	results = run_Daikon(program_text,user_func,input_dict)

	print_results(results)
Ejemplo n.º 2
0
def run(file_name, func_name):
    program_text = open(file_name, 'r').read()
    user_mod = load_module(splitext(basename(file_name))[0], file_name)
    user_func = getattr(user_mod, func_name)

    input_dict = run_DART(program_text, user_func)
    results = run_Daikon(program_text, user_func, input_dict)

    print
    print

    print_results(results)
Ejemplo n.º 3
0
		section = traces[label]
		#print label

		results[label] = {}
		results[label]["return types"] = detect_return(section)
		#print
		results[label]["variable ranges"] = detect_ranges(section)
		#print
		results[label]["variable ordering"] = detect_ordering(section)
		#print
		results[label]["builtin functions"] = detect_funcs(section)
		#print
	
	#print "function return types: " + str({return_type for label in results for return_type in results[label]["return types"]})

	"""
	from report import print_results
	print_results(results)
	"""

	return results

if __name__=="__main__":
	from traces import *
	#detect(traces)
	#detect(traces2)
	results = detect(traces3)
	
	from report import print_results
	print_results(results)