# call Hyst to convert all models to other formats
# execution: python hyst_all_benchmarks.py
#
# http://verivital.com/hyst/

from subprocess import call

def toolToToolExt( tool ):
	return {
		'd' : 'drh',
		'f1.2.2b' : 'flow',
		'h' : 'hycreate',
		'hsim' : 'hsim'
		}[tool]

tools = ["d", "f1.2.2b", "h", "hsim"]

benchmarks = ["Chemical_Akzo\Chemical_Akzo", "E5\E5", "Hires\Hires", "OREGO\OREGO", "Pleiades\Pleiades", "Pollution\Pollution", "Ring_modulator\Ring_modulator", "Rober\Rober", "Small_Circuit\small_circuit_03", "VDPOL\VDPOL"]

# call Hyst on all benchmarks with all output tool formats
# example, this will create for instance: call(["java", "-jar", "Hyst.jar", "-v", "-d", "Hires\Hires.xml", "Hires\Hires.cfg", "-o", "Hires\Hires_hyst.drh"])
#
for tool in tools:
	for benchmark in benchmarks:
		call(["java", "-jar", "Hyst.jar", "-v", "-" + tool, benchmark + ".xml", benchmark + ".cfg", "-o", benchmark + "_hyst." + toolToToolExt(tool)])
