let stringify_unop op rop rtype =
let (is_int, is_flt, is_bool) = (matches "Integer", matches "Float", matches "Boolean") in
let is_type = (is_int rtype, is_flt rtype, is_bool rtype) in
let type_capital = match is_type with
| (true, _, _) -> "INTEGER"
| (_, true, _) -> "FLOAT"
| (_, _, true) -> "BOOLEAN"
| (_, _, _) -> raise(Failure "Imcompatible type with unop") in
match op with
| Ast.Arithmetic(Ast.Neg) -> "NEG_"^type_capital^"( "^rop^" )"
| Ast.CombTest(Ast.Not) -> "NOT_"^type_capital^"( "^rop^" )"
| _ -> raise (Failure "Unknown operator")