Project

General

Profile

« Previous | Next » 

Revision 7ee5f69e

Added by LĂ©lio Brun 9 months ago

corrections on loggers + spec in AST

View differences:

src/compiler_common.ml
72 72
    
73 73

  
74 74
let expand_automata decls =
75
  Log.report ~level:1 (fun fmt -> fprintf fmt ".. expanding automata@ ");
75
  Log.report ~level:1 (fun fmt -> fprintf fmt "@ .. expanding automata@ ");
76 76
  try
77 77
    Automata.expand_decls decls
78 78
  with (Error.Error (loc, err)) as exc ->
......
82 82
    raise exc
83 83

  
84 84
let check_stateless_decls decls =
85
  Log.report ~level:1 (fun fmt -> fprintf fmt ".. checking stateless/stateful status@ ");
85
  Log.report ~level:1 (fun fmt -> fprintf fmt "@ .. checking stateless/stateful status@ ");
86 86
  try
87 87
    Stateless.check_prog decls
88 88
  with (Stateless.Error (loc, err)) as exc ->
......
92 92
    raise exc
93 93

  
94 94
let force_stateful_decls decls =
95
  Log.report ~level:1 (fun fmt -> fprintf fmt ".. forcing stateful status@ ");
95
  Log.report ~level:1 (fun fmt -> fprintf fmt "@ .. forcing stateful status@ ");
96 96
  try
97 97
    Stateless.force_prog decls
98 98
  with (Stateless.Error (loc, err)) as exc ->
......
102 102
    raise exc
103 103

  
104 104
let type_decls env decls =  
105
  Log.report ~level:1 (fun fmt -> fprintf fmt ".. typing@ ");
105
  Log.report ~level:1 (fun fmt -> fprintf fmt "@ @[<v 2>.. typing@ ");
106 106
  let new_env = 
107
    begin
108
      try
109
	Typing.type_prog env decls
110
      with (Types.Error (loc,err)) as exc ->
111
	eprintf "Typing error: %a%a@."
112
	  Types.pp_error err
113
	  Location.pp_loc loc;
114
	raise exc
115
    end 
107
    try
108
      Typing.type_prog env decls
109
    with Types.Error (loc,err) as exc ->
110
      eprintf "Typing error: %a%a@."
111
        Types.pp_error err
112
        Location.pp_loc loc;
113
      raise exc
116 114
  in
115
  Log.report ~level:1 (fun fmt -> fprintf fmt "@]");
117 116
  if !Options.print_types || !Options.verbose_level > 2 then
118 117
    Log.report ~level:1 (fun fmt -> fprintf fmt "@[<v 2>  %a@]@ " Corelang.pp_prog_type decls);
119 118
  new_env
120 119
      
121 120
let clock_decls env decls = 
122
  Log.report ~level:1 (fun fmt -> fprintf fmt ".. clock calculus@ ");
121
  Log.report ~level:1 (fun fmt -> fprintf fmt "@ @[<v 2>.. clock calculus@ ");
123 122
  let new_env =
124
    begin
125
      try
126
	Clock_calculus.clock_prog env decls
127
      with (Clocks.Error (loc,err)) as exc ->
128
	eprintf "Clock calculus error: %a%a@." Clocks.pp_error err Location.pp_loc loc;
129
	raise exc
130
    end
123
    try
124
      Clock_calculus.clock_prog env decls
125
    with (Clocks.Error (loc,err)) as exc ->
126
      eprintf "Clock calculus error: %a%a@." Clocks.pp_error err Location.pp_loc loc;
127
      raise exc
131 128
  in
129
  Log.report ~level:1 (fun fmt -> fprintf fmt "@]");
132 130
  if !Options.print_clocks  || !Options.verbose_level > 2 then
133 131
    Log.report ~level:1 (fun fmt -> fprintf fmt "@[<v 2>  %a@]@ " Corelang.pp_prog_clock decls);
134 132
  new_env

Also available in: Unified diff