let print_program (x:program) =
let s tag value = match value with
| None -> ""
| Some x -> sprintf "\t%s:%s" tag x
in
sprintf "@PG\tID:%s%s%s%s%s%s"
x.id
(s "PN" x.name)
(s "CL" x.command_line)
(s "PP" x.previous_id)
(s "DS" x.description)
(s "VN" x.version)