# Path: misc/io.py
# def write(filename, string):
#   with open(filename, 'w') as f:
#     f.write(string)


from misc.io import write
# http://www.fast-downward.org/TranslatorOutputFormat

def write_version(version=3):
  return 'begin_version\n%s\nend_version'%version

def write_action_costs(action_costs=False):
  return 'begin_metric\n%s\nend_metric'%int(action_costs)

###########################################################################

def write_variable(v):
  s = 'begin_variable\n' \
      '%s\n' \
      '%s\n' \
      '%s'%(v.name, v.axiom_layer, len(v.values))

# Path: misc/io.py
# def write(filename, string):
#   with open(filename, 'w') as f:
#     f.write(string)


# Path: sas/retired/downward.py
from misc.io import write

# http://www.fast-downward.org/TranslatorOutputFormat

def write_version(version=3):
  return 'begin_version\n%s\nend_version'%version

def write_action_costs(action_costs=False):
  return 'begin_metric\n%s\nend_metric'%int(action_costs)

###########################################################################

def write_variable(v):
  s = 'begin_variable\n' \
      '%s\n' \
      '%s\n' \
      '%s'%(v.name, v.axiom_layer, len(v.values))

  for val in v.values: