if __name__ == "__main__":
	L = []
	eq = 0
	total = 0
	print "#"," ".join(sys.argv)
	for line in open(sys.argv[1]):
		line = line.strip()
		if line == "":
			if L[0] == "illegal":
				L = []
				continue
			total += 1
			target = json.loads(L[3], object_hook=ascii_encode_dict)
			target_DRSnode = DRSnode()
			target_DRSnode.unserialization(target)

			simplify_temporal(target_DRSnode)
			#normal_variables(target_DRSnode)
			
			L[3] = json.dumps(target_DRSnode.serialization())

			print "\n".join(L)
			print 

			L = []
		else:
			if line[0] == "#":
				continue
			L.append(line)
	
Esempio n. 2
0
	node_merge = get_merge(node_lam)
	node_d

if __name__ == "__main__":
	L = []
	eq = 0
	total = 0
	for line in open(sys.argv[1]):
		line = line.strip()
		if line == "":
			#print "\n".join(L)
			#print
			total += 1
			target = json.loads(L[3], object_hook=ascii_encode_dict)
			target_DRSnode = DRSnode()
			target_DRSnode.unserialization(target)
			normal_variables(target_DRSnode)
			target = json.dumps(target_DRSnode.serialization())

			source = json.loads(L[5], object_hook=ascii_encode_dict)
			source_DRSnode = DRSnode()
			source_DRSnode.unserialization(source)
			source_DRSnode = tc1(source_DRSnode, "x")
			change = json.dumps(source_DRSnode.serialization())

			#l = ""
			#for i in range(len(target)):
			#	if target[i] == change[i]:
			#		l += target[i]
			#	else:
			#		break