File tree 3 files changed +12
-5
lines changed
3 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,11 @@ let parse_cmdline () =
38
38
with Parse_command. Exit_parse_command i -> exit i
39
39
40
40
let () =
41
- Options. set_exit_on_error false ;
41
+ (* Currently, the main function of [Solving_loop] calls the [exit] function in
42
+ case of recoverable error, which is not supported in Javascript. We
43
+ turn off this feature as we do not support it correctly. See issue
44
+ https://github.com/OCamlPro/alt-ergo/issues/1250 *)
45
+ AltErgoLib.Options. set_exit_on_error false ;
42
46
register_input () ;
43
47
parse_cmdline () ;
44
48
AltErgoLib.Printer. init_colors () ;
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ let exec worker file options =
64
64
let solve () =
65
65
let options =
66
66
{(Worker_interface. init_options () ) with
67
- input_format= Some Native ;
67
+ input_format = None ;
68
68
file = Some " try-alt-ergo" ;
69
69
debug = Some true ;
70
70
verbose = Some true ;
@@ -82,7 +82,10 @@ let solve () =
82
82
diagnostic = Some [" Timeout" ]});
83
83
(
84
84
let file = String. split_on_char '\n' ! file in
85
- let json_file = Worker_interface. file_to_json None (Some 42 ) file in
85
+ let json_file =
86
+ Worker_interface. file_to_json
87
+ (Some (" dummy" ^ ! extension)) (Some 42 ) file
88
+ in
86
89
Firebug. console##log json_file;
87
90
let json_options = Worker_interface. options_to_json options in
88
91
Firebug. console##log json_options;
Original file line number Diff line number Diff line change @@ -54,7 +54,6 @@ let create_buffer () =
54
54
buf, output
55
55
56
56
let main worker_id filename filecontent =
57
- let filename = match filename with | Some f -> f | None -> " <worker>" in
58
57
try
59
58
(* Create buffer for each formatter
60
59
The content of this buffers are then retrieved and send as results *)
@@ -163,7 +162,7 @@ let () =
163
162
at_exit Options.Output. close_all;
164
163
Worker. set_onmessage (fun (json_file , json_options ) ->
165
164
Lwt_js_events. async (fun () ->
166
- let filename , worker_id, filecontent =
165
+ let filename_opt , worker_id, filecontent =
167
166
Worker_interface. file_from_json json_file
168
167
in
169
168
let filecontent = String. concat " \n " filecontent in
@@ -174,6 +173,7 @@ let () =
174
173
Options. set_exit_on_error false ;
175
174
176
175
(* Run the worker on the input file (filecontent) *)
176
+ let filename = Option. get filename_opt in
177
177
let results = main worker_id filename filecontent in
178
178
179
179
(* Convert results and returns them *)
You can’t perform that action at this time.
0 commit comments