sig
  type block_ctxt =
      Stmt_block of Cil_types.stmt
    | Body
    | Then_with_else
    | Other
  class type extensible_printer_type =
    object
      val mutable force_brace : bool
      val mutable is_ghost : bool
      val mutable logic_printer_enabled : bool
      val mutable verbose : bool
      method allocation :
        isloop:bool -> Format.formatter -> Cil_types.allocation -> unit
      method annotated_stmt :
        Cil_types.stmt -> Format.formatter -> Cil_types.stmt -> unit
      method assigns :
        string -> Format.formatter -> Cil_types.assigns -> unit
      method assumes :
        Format.formatter -> Cil_types.identified_predicate -> unit
      method attribute : Format.formatter -> Cil_types.attribute -> bool
      method attributes : Format.formatter -> Cil_types.attributes -> unit
      method attrparam : Format.formatter -> Cil_types.attrparam -> unit
      method behavior : Format.formatter -> Cil_types.funbehavior -> unit
      method binop : Format.formatter -> Cil_types.binop -> unit
      method block : Format.formatter -> Cil_types.block -> unit
      method builtin_logic_info :
        Format.formatter -> Cil_types.builtin_logic_info -> unit
      method code_annotation :
        Format.formatter -> Cil_types.code_annotation -> unit
      method compinfo : Format.formatter -> Cil_types.compinfo -> unit
      method complete_behaviors : Format.formatter -> string list -> unit
      method constant : Format.formatter -> Cil_types.constant -> unit
      method private current_behavior : Cil_types.funbehavior option
      method private current_function : Cil_types.varinfo option
      method private current_stmt : Cil_types.stmt option
      method decreases : Format.formatter -> Cil_types.variant -> unit
      method disjoint_behaviors : Format.formatter -> string list -> unit
      method exp : Format.formatter -> Cil_types.exp -> unit
      method extended : Format.formatter -> Cil_types.acsl_extension -> unit
      method field : Format.formatter -> Cil_types.fieldinfo -> unit
      method fieldinfo : Format.formatter -> Cil_types.fieldinfo -> unit
      method file : Format.formatter -> Cil_types.file -> unit
      method fkind : Format.formatter -> Cil_types.fkind -> unit
      method force_brace :
        (Format.formatter -> '-> unit) -> Format.formatter -> '-> unit
      method from : string -> Format.formatter -> Cil_types.from -> unit
      method fundec : Format.formatter -> Cil_types.fundec -> unit
      method funspec : Format.formatter -> Cil_types.funspec -> unit
      method private get_instr_terminator : unit -> string
      method global : Format.formatter -> Cil_types.global -> unit
      method global_annotation :
        Format.formatter -> Cil_types.global_annotation -> unit
      method private has_annot : bool
      method identified_predicate :
        Format.formatter -> Cil_types.identified_predicate -> unit
      method identified_term :
        Format.formatter -> Cil_types.identified_term -> unit
      method ikind : Format.formatter -> Cil_types.ikind -> unit
      method private in_ghost_if_needed :
        Format.formatter ->
        bool ->
        ?break_ghost:bool ->
        post_fmt:((Format.formatter -> unit) -> unit, Format.formatter, unit)
                 Pervasives.format ->
        ?block:bool -> (unit -> unit) -> unit
      method init : Format.formatter -> Cil_types.init -> unit
      method initinfo : Format.formatter -> Cil_types.initinfo -> unit
      method private inline_block :
        Printer_api.block_ctxt -> Cil_types.block -> bool
      method instr : Format.formatter -> Cil_types.instr -> unit
      method label : Format.formatter -> Cil_types.label -> unit
      method line_directive :
        ?forcefile:bool -> Format.formatter -> Cil_types.location -> unit
      method location : Format.formatter -> Cil_types.location -> unit
      method logic_builtin_label :
        Format.formatter -> Cil_types.logic_builtin_label -> unit
      method logic_constant :
        Format.formatter -> Cil_types.logic_constant -> unit
      method logic_ctor_info :
        Format.formatter -> Cil_types.logic_ctor_info -> unit
      method logic_info : Format.formatter -> Cil_types.logic_info -> unit
      method logic_label : Format.formatter -> Cil_types.logic_label -> unit
      method logic_type :
        (Format.formatter -> unit) option ->
        Format.formatter -> Cil_types.logic_type -> unit
      method logic_type_def :
        Format.formatter -> Cil_types.logic_type_def -> unit
      method logic_type_info :
        Format.formatter -> Cil_types.logic_type_info -> unit
      method logic_var : Format.formatter -> Cil_types.logic_var -> unit
      method lval : Format.formatter -> Cil_types.lval -> unit
      method private may_be_skipped : Cil_types.stmt -> bool
      method model_field : Format.formatter -> Cil_types.model_info -> unit
      method model_info : Format.formatter -> Cil_types.model_info -> unit
      method next_stmt :
        Cil_types.stmt -> Format.formatter -> Cil_types.stmt -> unit
      method offset : Format.formatter -> Cil_types.offset -> unit
      method private opt_funspec :
        Format.formatter -> Cil_types.funspec -> unit
      method post_cond :
        Format.formatter ->
        Cil_types.termination_kind * Cil_types.identified_predicate -> unit
      method pp_acsl_keyword : Format.formatter -> string -> unit
      method pp_close_annotation :
        ?block:bool -> ?suf:Pretty_utils.sformat -> Format.formatter -> unit
      method pp_keyword : Format.formatter -> string -> unit
      method pp_open_annotation :
        ?block:bool -> ?pre:Pretty_utils.sformat -> Format.formatter -> unit
      method predicate : Format.formatter -> Cil_types.predicate -> unit
      method predicate_node :
        Format.formatter -> Cil_types.predicate_node -> unit
      method quantifiers : Format.formatter -> Cil_types.quantifiers -> unit
      method relation : Format.formatter -> Cil_types.relation -> unit
      method private require_braces :
        Printer_api.block_ctxt -> Cil_types.block -> bool
      method requires :
        Format.formatter -> Cil_types.identified_predicate -> unit
      method reset : unit -> unit
      method private set_instr_terminator : string -> unit
      method short_extended :
        Format.formatter -> Cil_types.acsl_extension -> unit
      method stmt : Format.formatter -> Cil_types.stmt -> unit
      method private stmt_has_annot : Cil_types.stmt -> bool
      method stmt_labels : Format.formatter -> Cil_types.stmt -> unit
      method stmtkind :
        Cil_types.attributes ->
        Cil_types.stmt -> Format.formatter -> Cil_types.stmtkind -> unit
      method storage : Format.formatter -> Cil_types.storage -> unit
      method term : Format.formatter -> Cil_types.term -> unit
      method term_binop : Format.formatter -> Cil_types.binop -> unit
      method term_lhost : Format.formatter -> Cil_types.term_lhost -> unit
      method term_lval : Format.formatter -> Cil_types.term_lval -> unit
      method term_node : Format.formatter -> Cil_types.term -> unit
      method term_offset : Format.formatter -> Cil_types.term_offset -> unit
      method terminates :
        Format.formatter -> Cil_types.identified_predicate -> unit
      method typ :
        ?fundecl:Cil_types.varinfo ->
        (Format.formatter -> unit) option ->
        Format.formatter -> Cil_types.typ -> unit
      method unop : Format.formatter -> Cil_types.unop -> unit
      method variant : Format.formatter -> Cil_types.variant -> unit
      method varinfo : Format.formatter -> Cil_types.varinfo -> unit
      method varname : Format.formatter -> string -> unit
      method vdecl : Format.formatter -> Cil_types.varinfo -> unit
      method without_annot :
        (Format.formatter -> '-> unit) -> Format.formatter -> '-> unit
    end
  type line_directive_style =
      Line_comment
    | Line_comment_sparse
    | Line_preprocessor_input
    | Line_preprocessor_output
  type state = {
    mutable line_directive_style : Printer_api.line_directive_style option;
    mutable print_cil_input : bool;
    mutable print_cil_as_is : bool;
    mutable line_length : int;
    mutable warn_truncate : bool;
  }
  module type S_pp =
    sig
      val pp_varname : Format.formatter -> string -> unit
      val pp_location : Format.formatter -> Cil_types.location -> unit
      val pp_constant : Format.formatter -> Cil_types.constant -> unit
      val pp_storage : Format.formatter -> Cil_types.storage -> unit
      val pp_ikind : Format.formatter -> Cil_types.ikind -> unit
      val pp_fkind : Format.formatter -> Cil_types.fkind -> unit
      val pp_typ : Format.formatter -> Cil_types.typ -> unit
      val pp_exp : Format.formatter -> Cil_types.exp -> unit
      val pp_varinfo : Format.formatter -> Cil_types.varinfo -> unit
      val pp_lval : Format.formatter -> Cil_types.lval -> unit
      val pp_field : Format.formatter -> Cil_types.fieldinfo -> unit
      val pp_offset : Format.formatter -> Cil_types.offset -> unit
      val pp_init : Format.formatter -> Cil_types.init -> unit
      val pp_binop : Format.formatter -> Cil_types.binop -> unit
      val pp_unop : Format.formatter -> Cil_types.unop -> unit
      val pp_attribute : Format.formatter -> Cil_types.attribute -> unit
      val pp_attrparam : Format.formatter -> Cil_types.attrparam -> unit
      val pp_attributes : Format.formatter -> Cil_types.attributes -> unit
      val pp_instr : Format.formatter -> Cil_types.instr -> unit
      val pp_label : Format.formatter -> Cil_types.label -> unit
      val pp_stmt : Format.formatter -> Cil_types.stmt -> unit
      val pp_block : Format.formatter -> Cil_types.block -> unit
      val pp_global : Format.formatter -> Cil_types.global -> unit
      val pp_file : Format.formatter -> Cil_types.file -> unit
      val pp_compinfo : Format.formatter -> Cil_types.compinfo -> unit
      val pp_logic_type_info :
        Format.formatter -> Cil_types.logic_type_info -> unit
      val pp_logic_ctor_info :
        Format.formatter -> Cil_types.logic_ctor_info -> unit
      val pp_initinfo : Format.formatter -> Cil_types.initinfo -> unit
      val pp_logic_info : Format.formatter -> Cil_types.logic_info -> unit
      val pp_logic_constant :
        Format.formatter -> Cil_types.logic_constant -> unit
      val pp_fundec : Format.formatter -> Cil_types.fundec -> unit
      val pp_relation : Format.formatter -> Cil_types.relation -> unit
      val pp_model_info : Format.formatter -> Cil_types.model_info -> unit
      val pp_term_lval : Format.formatter -> Cil_types.term_lval -> unit
      val pp_term_lhost : Format.formatter -> Cil_types.term_lhost -> unit
      val pp_logic_var : Format.formatter -> Cil_types.logic_var -> unit
      val pp_logic_type : Format.formatter -> Cil_types.logic_type -> unit
      val pp_identified_term :
        Format.formatter -> Cil_types.identified_term -> unit
      val pp_term : Format.formatter -> Cil_types.term -> unit
      val pp_model_field : Format.formatter -> Cil_types.model_info -> unit
      val pp_term_offset : Format.formatter -> Cil_types.term_offset -> unit
      val pp_logic_builtin_label :
        Format.formatter -> Cil_types.logic_builtin_label -> unit
      val pp_logic_label : Format.formatter -> Cil_types.logic_label -> unit
      val pp_builtin_logic_info :
        Format.formatter -> Cil_types.builtin_logic_info -> unit
      val pp_extended : Format.formatter -> Cil_types.acsl_extension -> unit
      val pp_short_extended :
        Format.formatter -> Cil_types.acsl_extension -> unit
      val pp_predicate_node :
        Format.formatter -> Cil_types.predicate_node -> unit
      val pp_predicate : Format.formatter -> Cil_types.predicate -> unit
      val pp_identified_predicate :
        Format.formatter -> Cil_types.identified_predicate -> unit
      val pp_code_annotation :
        Format.formatter -> Cil_types.code_annotation -> unit
      val pp_funspec : Format.formatter -> Cil_types.funspec -> unit
      val pp_behavior : Format.formatter -> Cil_types.funbehavior -> unit
      val pp_global_annotation :
        Format.formatter -> Cil_types.global_annotation -> unit
      val pp_decreases : Format.formatter -> Cil_types.variant -> unit
      val pp_variant : Format.formatter -> Cil_types.variant -> unit
      val pp_from : Format.formatter -> Cil_types.from -> unit
      val pp_assigns : Format.formatter -> Cil_types.assigns -> unit
      val pp_allocation : Format.formatter -> Cil_types.allocation -> unit
      val pp_loop_from : Format.formatter -> Cil_types.from -> unit
      val pp_loop_assigns : Format.formatter -> Cil_types.assigns -> unit
      val pp_loop_allocation :
        Format.formatter -> Cil_types.allocation -> unit
      val pp_post_cond :
        Format.formatter ->
        Cil_types.termination_kind * Cil_types.identified_predicate -> unit
      val pp_full_assigns :
        string -> Format.formatter -> Cil_types.assigns -> unit
      val without_annot :
        (Format.formatter -> '-> unit) -> Format.formatter -> '-> unit
      val force_brace :
        (Format.formatter -> '-> unit) -> Format.formatter -> '-> unit
    end
  module type S =
    sig
      val pp_varname : Format.formatter -> string -> unit
      val pp_location : Format.formatter -> Cil_types.location -> unit
      val pp_constant : Format.formatter -> Cil_types.constant -> unit
      val pp_storage : Format.formatter -> Cil_types.storage -> unit
      val pp_ikind : Format.formatter -> Cil_types.ikind -> unit
      val pp_fkind : Format.formatter -> Cil_types.fkind -> unit
      val pp_typ : Format.formatter -> Cil_types.typ -> unit
      val pp_exp : Format.formatter -> Cil_types.exp -> unit
      val pp_varinfo : Format.formatter -> Cil_types.varinfo -> unit
      val pp_lval : Format.formatter -> Cil_types.lval -> unit
      val pp_field : Format.formatter -> Cil_types.fieldinfo -> unit
      val pp_offset : Format.formatter -> Cil_types.offset -> unit
      val pp_init : Format.formatter -> Cil_types.init -> unit
      val pp_binop : Format.formatter -> Cil_types.binop -> unit
      val pp_unop : Format.formatter -> Cil_types.unop -> unit
      val pp_attribute : Format.formatter -> Cil_types.attribute -> unit
      val pp_attrparam : Format.formatter -> Cil_types.attrparam -> unit
      val pp_attributes : Format.formatter -> Cil_types.attributes -> unit
      val pp_instr : Format.formatter -> Cil_types.instr -> unit
      val pp_label : Format.formatter -> Cil_types.label -> unit
      val pp_stmt : Format.formatter -> Cil_types.stmt -> unit
      val pp_block : Format.formatter -> Cil_types.block -> unit
      val pp_global : Format.formatter -> Cil_types.global -> unit
      val pp_file : Format.formatter -> Cil_types.file -> unit
      val pp_compinfo : Format.formatter -> Cil_types.compinfo -> unit
      val pp_logic_type_info :
        Format.formatter -> Cil_types.logic_type_info -> unit
      val pp_logic_ctor_info :
        Format.formatter -> Cil_types.logic_ctor_info -> unit
      val pp_initinfo : Format.formatter -> Cil_types.initinfo -> unit
      val pp_logic_info : Format.formatter -> Cil_types.logic_info -> unit
      val pp_logic_constant :
        Format.formatter -> Cil_types.logic_constant -> unit
      val pp_fundec : Format.formatter -> Cil_types.fundec -> unit
      val pp_relation : Format.formatter -> Cil_types.relation -> unit
      val pp_model_info : Format.formatter -> Cil_types.model_info -> unit
      val pp_term_lval : Format.formatter -> Cil_types.term_lval -> unit
      val pp_term_lhost : Format.formatter -> Cil_types.term_lhost -> unit
      val pp_logic_var : Format.formatter -> Cil_types.logic_var -> unit
      val pp_logic_type : Format.formatter -> Cil_types.logic_type -> unit
      val pp_identified_term :
        Format.formatter -> Cil_types.identified_term -> unit
      val pp_term : Format.formatter -> Cil_types.term -> unit
      val pp_model_field : Format.formatter -> Cil_types.model_info -> unit
      val pp_term_offset : Format.formatter -> Cil_types.term_offset -> unit
      val pp_logic_builtin_label :
        Format.formatter -> Cil_types.logic_builtin_label -> unit
      val pp_logic_label : Format.formatter -> Cil_types.logic_label -> unit
      val pp_builtin_logic_info :
        Format.formatter -> Cil_types.builtin_logic_info -> unit
      val pp_extended : Format.formatter -> Cil_types.acsl_extension -> unit
      val pp_short_extended :
        Format.formatter -> Cil_types.acsl_extension -> unit
      val pp_predicate_node :
        Format.formatter -> Cil_types.predicate_node -> unit
      val pp_predicate : Format.formatter -> Cil_types.predicate -> unit
      val pp_identified_predicate :
        Format.formatter -> Cil_types.identified_predicate -> unit
      val pp_code_annotation :
        Format.formatter -> Cil_types.code_annotation -> unit
      val pp_funspec : Format.formatter -> Cil_types.funspec -> unit
      val pp_behavior : Format.formatter -> Cil_types.funbehavior -> unit
      val pp_global_annotation :
        Format.formatter -> Cil_types.global_annotation -> unit
      val pp_decreases : Format.formatter -> Cil_types.variant -> unit
      val pp_variant : Format.formatter -> Cil_types.variant -> unit
      val pp_from : Format.formatter -> Cil_types.from -> unit
      val pp_assigns : Format.formatter -> Cil_types.assigns -> unit
      val pp_allocation : Format.formatter -> Cil_types.allocation -> unit
      val pp_loop_from : Format.formatter -> Cil_types.from -> unit
      val pp_loop_assigns : Format.formatter -> Cil_types.assigns -> unit
      val pp_loop_allocation :
        Format.formatter -> Cil_types.allocation -> unit
      val pp_post_cond :
        Format.formatter ->
        Cil_types.termination_kind * Cil_types.identified_predicate -> unit
      val pp_full_assigns :
        string -> Format.formatter -> Cil_types.assigns -> unit
      val without_annot :
        (Format.formatter -> '-> unit) -> Format.formatter -> '-> unit
      val force_brace :
        (Format.formatter -> '-> unit) -> Format.formatter -> '-> unit
      class extensible_printer : unit -> extensible_printer_type
      module type PrinterClass =
        sig class printer : extensible_printer_type end
      module type PrinterExtension =
        functor (X : PrinterClass-> PrinterClass
      val update_printer : (module Printer_api.S.PrinterExtension-> unit
      val current_printer : unit -> (module Printer_api.S.PrinterClass)
      val set_printer : (module Printer_api.S.PrinterClass-> unit
    end
end