Commit da6022c4 authored by MARCHE Claude's avatar MARCHE Claude

adding support for compressed files. Needs splitting the library into

two parts: why3 and why3session.

(The Coq tactic does not include why3session)
parent 957b8118
......@@ -179,6 +179,7 @@ pvsbin/
# /src/session
/src/session/xml.ml
/src/session/compress.ml
# /src/tools
/src/tools/why3wc.ml
......
......@@ -63,7 +63,7 @@ EMACS = @EMACS@
#PSVIEWER = @PSVIEWER@
#PDFVIEWER = @PDFVIEWER@
INCLUDES =
INCLUDES = @ZIPINCLUDE@
OFLAGS = -w Aer-41-44-45 -dtypes -g -I lib/why3 $(INCLUDES)
BFLAGS = -w Aer-41-44-45 -dtypes -g -I lib/why3 $(INCLUDES)
......@@ -77,7 +77,7 @@ endif
# external libraries common to all binaries
EXTOBJS =
EXTLIBS = str unix nums dynlink
EXTLIBS = str unix nums dynlink @ZIPLIB@
EXTCMA = $(addsuffix .cma,$(EXTLIBS)) $(addsuffix .cmo,$(EXTOBJS))
EXTCMXA = $(addsuffix .cmxa,$(EXTLIBS)) $(addsuffix .cmx,$(EXTOBJS))
......@@ -108,10 +108,12 @@ LIBGENERATED = src/util/config.ml \
src/util/rc.ml src/parser/lexer.ml \
src/parser/parser.mli src/parser/parser.ml \
src/driver/driver_parser.mli src/driver/driver_parser.ml \
src/driver/driver_lexer.ml src/session/xml.ml \
lib/ocaml/why3__BigInt_compat.ml
src/driver/driver_lexer.ml \
src/session/compress.ml src/session/xml.ml \
lib/ocaml/why3__BigInt_compat.ml
LIB_UTIL = config bigInt util opt lists strings extmap extset exthtbl weakhtbl \
LIB_UTIL = config bigInt util opt lists strings \
extmap extset exthtbl weakhtbl \
hashcons stdlib exn_printer pp debug loc print_tree \
cmdline warning sysutil rc plugin bigInt number pqueue
......@@ -137,8 +139,6 @@ LIB_TRANSFORM = simplify_formula inlining split_goal induction \
LIB_PRINTER = alt_ergo why3printer smtv1 smtv2 coq pvs isabelle \
simplify gappa cvc3 yices mathematica
LIB_SESSION = xml termcode session session_tools session_scheduler
LIB_WHYML = mlw_ty mlw_expr mlw_decl mlw_pretty mlw_wp mlw_module \
mlw_dexpr mlw_typing mlw_driver mlw_ocaml \
mlw_main mlw_interp
......@@ -149,21 +149,36 @@ LIBMODULES = $(addprefix src/util/, $(LIB_UTIL)) \
$(addprefix src/driver/, $(LIB_DRIVER)) \
$(addprefix src/transform/, $(LIB_TRANSFORM)) \
$(addprefix src/printer/, $(LIB_PRINTER)) \
$(addprefix src/session/, $(LIB_SESSION)) \
$(addprefix src/whyml/, $(LIB_WHYML))
LIBDIRS = util core parser driver transform printer session whyml
LIB_SESSION = compress xml termcode session session_tools session_scheduler
LIBSESSIONMODULES = $(addprefix src/session/, $(LIB_SESSION))
LIBDIRS = util core parser driver transform printer whyml
LIBINCLUDES = $(addprefix -I src/, $(LIBDIRS))
LIBSESSIONDIRS = session
LIBSESSIONINCLUDES = $(addprefix -I src/, $(LIBSESSIONDIRS))
LIBDEP = $(addsuffix .dep, $(LIBMODULES))
LIBCMO = $(addsuffix .cmo, $(LIBMODULES))
LIBCMX = $(addsuffix .cmx, $(LIBMODULES))
LIBSESSIONDEP = $(addsuffix .dep, $(LIBSESSIONMODULES))
LIBSESSIONCMO = $(addsuffix .cmo, $(LIBSESSIONMODULES))
LIBSESSIONCMX = $(addsuffix .cmx, $(LIBSESSIONMODULES))
$(LIBDEP): DEPFLAGS += $(LIBINCLUDES)
$(LIBCMO) $(LIBCMX): INCLUDES += $(LIBINCLUDES)
$(LIBCMX): OFLAGS += -for-pack Why3
$(LIBSESSIONDEP): DEPFLAGS += $(LIBSESSIONINCLUDES)
$(LIBSESSIONCMO) $(LIBSESSIONCMX): INCLUDES += $(LIBSESSIONINCLUDES)
$(LIBSESSIONCMX): OFLAGS += -for-pack Why3session
$(LIBDEP): $(LIBGENERATED)
$(LIBSESSIONDEP): $(LIBGENERATED)
# Zarith
......@@ -182,6 +197,23 @@ endif
clean::
rm -f lib/ocaml/why3__BigInt_compat.ml
# Ocamlzip
ifeq (@enable_zip@,yes)
src/session/compress.ml: config.status src/session/compress_z.ml
cp src/session/compress_z.ml $@
else
src/session/compress.ml: config.status src/session/compress_none.ml
cp src/session/compress_none.ml $@
endif
clean::
rm -f src/session/compress.ml
# build targets
byte: lib/why3/why3.cma
......@@ -203,13 +235,32 @@ lib/why3/why3.cmx: $(LIBCMX)
$(if $(QUIET),@echo 'Linking $@' &&) \
$(OCAMLOPT) $(OFLAGS) -pack -o $@ $^
byte: lib/why3/why3session.cma
opt: lib/why3/why3session.cmxa
lib/why3/why3session.cma: lib/why3/why3session.cmo
$(if $(QUIET),@echo 'Linking $@' &&) \
$(OCAMLC) -a $(BFLAGS) -o $@ $^
lib/why3/why3session.cmxa: lib/why3/why3session.cmx
$(if $(QUIET),@echo 'Linking $@' &&) \
$(OCAMLOPT) -a $(OFLAGS) -o $@ $^
lib/why3/why3session.cmo: $(LIBSESSIONCMO)
$(if $(QUIET),@echo 'Linking $@' &&) \
$(OCAMLC) $(BFLAGS) -pack -o $@ $^
lib/why3/why3session.cmx: $(LIBSESSIONCMX)
$(if $(QUIET),@echo 'Linking $@' &&) \
$(OCAMLOPT) $(OFLAGS) -pack -o $@ $^
# clean and depend
ifneq "$(MAKECMDGOALS)" "clean"
include $(LIBDEP)
include $(LIBDEP) $(LIBSESSIONDEP)
endif
depend: $(LIBDEP)
depend: $(LIBDEP) $(LIBSESSIONDEP)
LIBSDIRS = src $(addprefix src/, $(LIBDIRS))
LIBCLEAN = $(addsuffix /*.cm[iox], $(LIBSDIRS)) \
......@@ -734,11 +785,11 @@ opt: bin/why3ide.opt
bin/why3ide.opt bin/why3ide.byte: INCLUDES += -I @LABLGTK2LIB@
bin/why3ide.opt bin/why3ide.byte: EXTLIBS += lablgtk lablgtksourceview2
bin/why3ide.opt: lib/why3/why3.cmxa src/ide/resetgc.o $(IDECMX)
bin/why3ide.opt: lib/why3/why3.cmxa lib/why3/why3session.cmxa src/ide/resetgc.o $(IDECMX)
$(if $(QUIET),@echo 'Linking $@' &&) \
$(OCAMLOPT) $(OFLAGS) -o $@ $(OLINKFLAGS) $^
bin/why3ide.byte: lib/why3/why3.cma src/ide/resetgc.o $(IDECMO)
bin/why3ide.byte: lib/why3/why3.cma lib/why3/why3session.cma src/ide/resetgc.o $(IDECMO)
$(if $(QUIET),@echo 'Linking $@' &&) \
$(OCAMLC) $(BFLAGS) -o $@ $(BLINKFLAGS) -custom $^
......@@ -772,6 +823,63 @@ install_local:: bin/why3ide
endif
# <<<<<<< HEAD
# =======
# ###############
# # Replayer
# ###############
# REPLAYER_FILES = replay
# REPLAYERMODULES = $(addprefix src/why3replayer/, $(REPLAYER_FILES))
# REPLAYERDEP = $(addsuffix .dep, $(REPLAYERMODULES))
# REPLAYERCMO = $(addsuffix .cmo, $(REPLAYERMODULES))
# REPLAYERCMX = $(addsuffix .cmx, $(REPLAYERMODULES))
# $(REPLAYERDEP): DEPFLAGS += -I src/why3replayer
# $(REPLAYERCMO) $(REPLAYERCMX): INCLUDES += -I src/why3replayer
# # build targets
# byte: bin/why3replayer.byte
# opt: bin/why3replayer.opt
# bin/why3replayer.opt: lib/why3/why3.cmxa lib/why3/why3session.cmxa $(REPLAYERCMX)
# $(if $(QUIET),@echo 'Linking $@' &&) \
# $(OCAMLOPT) $(OFLAGS) -o $@ $(OLINKFLAGS) $^
# bin/why3replayer.byte: lib/why3/why3.cma lib/why3/why3session.cma $(REPLAYERCMO)
# $(if $(QUIET),@echo 'Linking $@' &&) \
# $(OCAMLC) $(BFLAGS) -o $@ $(BLINKFLAGS) $^
# bin/why3replayer: bin/why3replayer.@OCAMLBEST@
# ln -sf why3replayer.@OCAMLBEST@ $@
# # depend and clean targets
# ifneq "$(MAKECMDGOALS)" "clean"
# include $(REPLAYERDEP)
# endif
# depend: $(REPLAYERDEP)
# clean::
# rm -f src/why3replayer/*.cm[iox] src/why3replayer/*.o
# rm -f src/why3replayer/*.annot src/why3replayer/*.dep src/why3replayer/*~
# rm -f bin/why3replayer.byte bin/why3replayer.opt bin/why3replayer
# clean_old_install::
# rm -f $(BINDIR)/why3replayer$(EXE)
# install_no_local::
# cp -f bin/why3replayer.@OCAMLBEST@ $(BINDIR)/why3replayer$(EXE)
# install_local:: bin/why3replayer
# >>>>>>> adding support for compressed files. Needs splitting the library into
###############
# Session
###############
......@@ -779,7 +887,7 @@ endif
SESSION_FILES = why3session_lib why3session_copy why3session_info \
why3session_latex why3session_html why3session_rm \
why3session_output why3session_run why3session_csv \
why3session
why3session_main
SESSIONMODULES = $(addprefix src/why3session/, $(SESSION_FILES))
......@@ -795,11 +903,11 @@ $(SESSIONCMO) $(SESSIONCMX): INCLUDES += -I src/why3session
byte: bin/why3session.byte
opt: bin/why3session.opt
bin/why3session.opt: lib/why3/why3.cmxa $(SESSIONCMX)
bin/why3session.opt: lib/why3/why3.cmxa lib/why3/why3session.cmxa $(SESSIONCMX)
$(if $(QUIET),@echo 'Linking $@' &&) \
$(OCAMLOPT) $(OFLAGS) -o $@ $(OLINKFLAGS) $^
bin/why3session.byte: lib/why3/why3.cma $(SESSIONCMO)
bin/why3session.byte: lib/why3/why3.cma lib/why3/why3session.cma $(SESSIONCMO)
$(if $(QUIET),@echo 'Linking $@' &&) \
$(OCAMLC) $(BFLAGS) -o $@ $(BLINKFLAGS) $^
......@@ -904,7 +1012,7 @@ COQPCMO = $(addsuffix .cmo, $(COQPMODULES))
COQPCMX = $(addsuffix .cmx, $(COQPMODULES))
COQPTREES = kernel lib interp parsing proofs pretyping tactics library toplevel
COQPINCLUDES = -I src/coq-tactic -I +camlp5 $(addprefix -I @COQLIB@/, $(COQPTREES))
COQPINCLUDES = -I src/coq-tactic -I +camlp5 $(addprefix -I @COQLIB@/, $(COQPTREES)) @ZIPINCLUDE@
$(COQPDEP): DEPFLAGS += -I src/coq-tactic
$(COQPCMO) $(COQPCMX): INCLUDES += $(COQPINCLUDES)
......@@ -1345,7 +1453,7 @@ OCAMLLIBS_CMO = $(addsuffix .cmo, $(OCAMLLIBS_MODULES))
OCAMLLIBS_CMX = $(addsuffix .cmx, $(OCAMLLIBS_MODULES))
$(OCAMLLIBS_DEP): DEPFLAGS += -I src/util -I lib/ocaml @BIGINTINCLUDE@
$(OCAMLLIBS_CMO) $(OCAMLLIBS_CMX): INCLUDES += -I src/util -I lib/ocaml @BIGINTINCLUDE@
$(OCAMLLIBS_CMO) $(OCAMLLIBS_CMX): INCLUDES += -I src/util -I lib/ocaml @BIGINTINCLUDE@
$(OCAMLLIBS_CMX): OFLAGS += -for-pack Why3extract
ifneq "$(MAKECMDGOALS)" "clean"
......@@ -1646,16 +1754,16 @@ test-api-mlw.opt: examples/use_api/mlw.ml lib/why3/why3.cmxa
#test-shape: lib/why3/why3.cma
# ocaml -I lib/why3 $(INCLUDES) $(EXTCMA) $? examples/test_shape.ml
test-session.byte: examples/use_api/create_session.ml lib/why3/why3.cma
test-session.byte: examples/use_api/create_session.ml lib/why3/why3.cma lib/why3/why3session.cma
$(if $(QUIET),@echo 'Ocaml $<' &&) \
ocaml -I lib/why3 $(INCLUDES) $(EXTCMA) lib/why3/why3.cma $< > /dev/null\
ocaml -I lib/why3 $(INCLUDES) $(EXTCMA) lib/why3/why3.cma lib/why3/why3session.cma $< > /dev/null\
|| (rm -f why3session.xml; \
printf "Test of Why3 API calls for Session module failed. Please fix it"; exit 2)
@rm -f why3session.xml
test-session.opt: examples/use_api/create_session.ml lib/why3/why3.cmxa
test-session.opt: examples/use_api/create_session.ml lib/why3/why3.cmxa lib/why3/why3session.cmxa
$(if $(QUIET),@echo 'Ocamlopt $<' &&) \
($(OCAMLOPT) -o $@ -I lib/why3 $(INCLUDES) $(EXTCMXA) lib/why3/why3.cmxa $< \
($(OCAMLOPT) -o $@ -I lib/why3 $(INCLUDES) $(EXTCMXA) lib/why3/why3.cmxa lib/why3/why3session.cmxa $< \
&& ./test-session.opt > /dev/null) \
|| (rm -f test-session.opt why3session.xml; \
printf "Test of Why3 API calls for Session module failed. Please fix it"; exit 2)
......
......@@ -72,6 +72,13 @@ AC_ARG_ENABLE(zarith,
enable_zarith=yes)
# Ocamlzip
AC_ARG_ENABLE(zip,
AS_HELP_STRING([--enable-zip], [use LZ compression to store session files]),,
enable_zip=yes)
# IDE
AC_ARG_ENABLE(ide,
......@@ -365,6 +372,33 @@ else
fi
# checking for Ocamlzip
if test "$enable_zip" = yes; then
if test "$USEOCAMLFIND" = yes; then
ZIPINCLUDE=$(ocamlfind query zip)
fi
if test -n "$ZIPINCLUDE"; then
echo "ocamlfind found ocamlzip in $ZIPINCLUDE"
ZIPINCLUDE="-I $ZIPINCLUDE"
else
AC_CHECK_FILE($OCAMLLIB/zip/zip.cma,,enable_zip=no)
if test "$enable_zip" = no; then
AC_MSG_WARN([Lib Ocamlzip not found, sessions files will not be compressed.])
reason_zip=" (ocamlzip not found)"
else
ZIPINCLUDE="-I +zip"
fi
fi
fi
if test "$enable_zip" = yes; then
ZIPLIB=zip
else
ZIPLIB=
fi
# checking for lablgtk2
if test "$enable_ide" = yes ; then
if test "$USEOCAMLFIND" = yes; then
......@@ -710,6 +744,10 @@ AC_SUBST(enable_zarith)
AC_SUBST(BIGINTINCLUDE)
AC_SUBST(BIGINTLIB)
AC_SUBST(enable_zip)
AC_SUBST(ZIPINCLUDE)
AC_SUBST(ZIPLIB)
AC_SUBST(enable_coq_tactic)
AC_SUBST(enable_coq_libs)
AC_SUBST(enable_coq_fp_libs)
......@@ -781,6 +819,7 @@ echo " Library path : $OCAMLLIB"
echo " Native compilation : $enable_native_code"
echo " Profiling : $enable_profiling"
echo "Zarith : $enable_zarith$reason_zarith"
echo "Ocamlzip : $enable_zip$reason_zip"
echo "IDE : $enable_ide$reason_ide"
echo "Bench tool : $enable_bench$reason_bench"
echo "Documentation : $enable_doc$reason_doc"
......
......@@ -483,8 +483,9 @@ One can run provers on those tasks exactly as we did above.
\section{Proof Sessions}
See the example \verb|examples/use_api/create_session.ml| of the distribution for
an illustration on how to manipulate proof sessions from an OCaml program.
See the example \verb|examples/use_api/create_session.ml| of the
distribution for an illustration on how to manipulate proof sessions
from an OCaml program.
\section{ML Programs}
......
......@@ -23,6 +23,8 @@ open Format
(* opening the Why3 library *)
open Why3
(* opening the Why3 session library *)
open Why3session
(* access to the Why configuration *)
......
......@@ -3,3 +3,9 @@ version = "@VERSION@"
archive(byte) = "why3.cma"
archive(native) = "why3.cmxa"
requires = "str unix num dynlink"
description = "Why3 session library"
version = "@VERSION@"
archive(byte) = "why3session.cma"
archive(native) = "why3session.cmxa"
requires = "str unix num dynlink @ZIPLIB@ why3"
(* This file is a stub for ocamldep. Do not delete it. *)
......@@ -10,9 +10,11 @@
(********************************************************************)
open Format
open Why3
open Rc
open Whyconf
open Why3session
let debug = Debug.register_info_flag "ide_info"
~desc:"Print@ why3ide@ debugging@ messages."
......
......@@ -10,6 +10,7 @@
(********************************************************************)
open Why3
open Why3session
type t =
{ mutable window_width : int;
......
......@@ -17,6 +17,9 @@ open Whyconf
open Gconfig
open Stdlib
open Debug
open Why3session
module C = Whyconf
external reset_gc : unit -> unit = "ml_reset_gc"
......
val compression_supported : bool
module type S = sig
type out_channel
val open_out: string -> out_channel
val output_char: out_channel -> char -> unit
val output: out_channel -> string -> int -> int -> unit
val output_string: out_channel -> string -> unit
val close_out: out_channel -> unit
type in_channel
val open_in: string -> in_channel
val input: in_channel -> string -> int -> int -> int
val really_input: in_channel -> string -> int -> int -> unit
val input_char: in_channel -> char
val close_in: in_channel -> unit
end
module Compress_z : S
module Compress_none : S
let compression_supported = false
module type S = sig
type out_channel
val open_out: string -> out_channel
val output_char: out_channel -> char -> unit
val output: out_channel -> string -> int -> int -> unit
val output_string: out_channel -> string -> unit
val close_out: out_channel -> unit
type in_channel
val open_in: string -> in_channel
val input: in_channel -> string -> int -> int -> int
val really_input: in_channel -> string -> int -> int -> unit
val input_char: in_channel -> char
val close_in: in_channel -> unit
end
module Compress_none = Pervasives
module Compress_z = Pervasives
let compression_supported = true
module type S = sig
type out_channel
val open_out: string -> out_channel
val output_char: out_channel -> char -> unit
val output: out_channel -> string -> int -> int -> unit
val output_string: out_channel -> string -> unit
val close_out: out_channel -> unit
type in_channel
val open_in: string -> in_channel
val input: in_channel -> string -> int -> int -> int
val really_input: in_channel -> string -> int -> int -> unit
val input_char: in_channel -> char
val close_in: in_channel -> unit
end
module Compress_none = Pervasives
module Compress_z = struct
type out_channel = Gzip.out_channel
let open_out fn = Gzip.open_out ~level:6 fn
let output_char = Gzip.output_char
let output = Gzip.output
let output_string ch s = output ch s 0 (String.length s)
let close_out = Gzip.close_out
type in_channel = Gzip.in_channel
let open_in = Gzip.open_in
let input = Gzip.input
let really_input = Gzip.really_input
let input_char = Gzip.input_char
let close_in = Gzip.close_in
end
This diff is collapsed.
......@@ -9,6 +9,8 @@
(* *)
(********************************************************************)
open Why3
(** Proof sessions
Define all the functions needed for managing a session:
......
......@@ -10,10 +10,10 @@
(********************************************************************)
open Format
open Why3
open Session
open Debug
let debug = register_info_flag "scheduler"
let debug = Debug.register_info_flag "scheduler"
~desc:"Print@ debugging@ messages@ about@ scheduling@ of@ prover@ calls@ \
and@ transformation@ applications."
......@@ -151,7 +151,7 @@ let set_maximum_running_proofs max sched =
sched.maximum_running_proofs <- max
let init max =
dprintf debug "[Sched] init scheduler max=%i@." max;
Debug.dprintf debug "[Sched] init scheduler max=%i@." max;
{ actions_queue = Queue.create ();
maximum_running_proofs = max;
running_proofs = [];
......@@ -165,7 +165,7 @@ let init max =
(* timeout handler *)
let timeout_handler t =
dprintf debug "[Sched] Timeout handler called@.";
Debug.dprintf debug "[Sched] Timeout handler called@.";
assert (not t.timeout_handler_running);
t.timeout_handler_running <- true;
(** Check if some action ended *)
......@@ -189,7 +189,7 @@ let timeout_handler t =
begin try
let (callback,pre_call) = Queue.pop t.proof_attempts_queue in
callback Running;
dprintf debug "[Sched] proof attempts started@.";
Debug.dprintf debug "[Sched] proof attempts started@.";
let call = pre_call () in
(Check_prover(callback,call))::l
with Queue.Empty -> l
......@@ -204,7 +204,7 @@ let timeout_handler t =
let continue =
match l with
| [] ->
dprintf debug "[Sched] Timeout handler stopped@.";
Debug.dprintf debug "[Sched] Timeout handler stopped@.";
false
| _ -> true
in
......@@ -219,17 +219,17 @@ let run_timeout_handler t =
if t.timeout_handler_activated then () else
begin
t.timeout_handler_activated <- true;
dprintf debug "[Sched] Timeout handler started@.";
Debug.dprintf debug "[Sched] Timeout handler started@.";
O.timeout ~ms:100 (fun () -> timeout_handler t)
end
let schedule_any_timeout t callback =
dprintf debug "[Sched] schedule a new timeout@.";
Debug.dprintf debug "[Sched] schedule a new timeout@.";
t.running_proofs <- (Any_timeout callback) :: t.running_proofs;
run_timeout_handler t
let schedule_check t callback =
dprintf debug "[Sched] add a new check@.";
Debug.dprintf debug "[Sched] add a new check@.";
t.running_check <- callback :: t.running_check;
run_timeout_handler t
......@@ -261,7 +261,7 @@ let idle_handler t =
true
with Queue.Empty ->
t.idle_handler_activated <- false;
dprintf debug "[Sched] idle_handler stopped@.";
Debug.dprintf debug "[Sched] idle_handler stopped@.";
false
| e when not (Debug.test_flag Debug.stack_trace) ->
Format.eprintf "@[Exception raise in Session.idle_handler:@ %a@.@]"
......@@ -274,7 +274,7 @@ let run_idle_handler t =
if t.idle_handler_activated then () else
begin
t.idle_handler_activated <- true;
dprintf debug "[Sched] idle_handler started@.";
Debug.dprintf debug "[Sched] idle_handler started@.";
O.idle (fun () -> idle_handler t)
end
......@@ -305,7 +305,7 @@ let cancel_scheduled_proofs t =
let schedule_proof_attempt ~timelimit ~memlimit ?old ~inplace
~command ~driver ~callback t goal =
dprintf debug "[Sched] Scheduling a new proof attempt (goal : %a)@."
Debug.dprintf debug "[Sched] Scheduling a new proof attempt (goal : %a)@."
(fun fmt g -> Format.pp_print_string fmt
(Task.task_goal g).Decl.pr_name.Ident.id_string) goal;
callback Scheduled;
......@@ -316,7 +316,7 @@ let schedule_proof_attempt ~timelimit ~memlimit ?old ~inplace
run_idle_handler t
let schedule_edition t command filename callback =
dprintf debug "[Sched] Scheduling an edition@.";
Debug.dprintf debug "[Sched] Scheduling an edition@.";
let precall =
Call_provers.call_on_file ~command ~regexps:[] ~timeregexps:[]
~exitcodes:[(0,Call_provers.Unknown "")] ~redirect:false filename
......@@ -326,7 +326,7 @@ let schedule_edition t command filename callback =
run_timeout_handler t
let schedule_delayed_action t callback =
dprintf debug "[Sched] Scheduling a delayed action@.";
Debug.dprintf debug "[Sched] Scheduling a delayed action@.";
Queue.push (Action_delayed callback) t.actions_queue;
run_idle_handler t
......@@ -339,7 +339,7 @@ let update_session ?release ~allow_obsolete old_session env whyconf =
let (env_session,_,_) as res =
update_session ?release
~keygen:O.create ~allow_obsolete old_session env whyconf in
dprintf debug "Init_session@\n";
Debug.dprintf debug "Init_session@\n";
init_session env_session.session;
res
......@@ -722,7 +722,7 @@ let rec goal_iter_proof_attempt_with_release ~release f g =
if release then release_task g
let check_all ?(release=false) ?filter eS eT ~callback =
dprintf debug "[Sched] check all@.%a@." print_session eS.session;
Debug.dprintf debug "[Sched] check all@.%a@." print_session eS.session;
let todo = Todo.create [] push_report callback in
Todo.start todo;
let check_top_goal g =
......@@ -889,7 +889,7 @@ let edit_proof_v3 eS sched ~default_editor callback a =
with Not_found -> default_editor
in
let file = update_edit_external_proof eS a in
dprintf debug "[Editing] goal %s with command '%s' on file %s@."
Debug.dprintf debug "[Editing] goal %s with command '%s' on file %s@."
a.proof_parent.goal_name.Ident.id_string editor file;
schedule_edition sched editor file (fun res -> callback a res)
......
......@@ -9,6 +9,8 @@
(* *)
(********************************************************************)
open Why3
(** Scheduling operations on sessions and calls to provers *)
(*** One module for calling callback when it's time to *)
......
......@@ -9,6 +9,7 @@
(* *)
(********************************************************************)
open Why3
open Whyconf
open Session
......
......@@ -11,6 +11,7 @@
(** Generic tools that can be applied on sessions *)
open Why3
open Session
val unknown_to_known_provers :
......
......@@ -9,6 +9,7 @@
(* *)
(********************************************************************)
open Why3
open Term
(*******************************)
......@@ -112,6 +113,7 @@ let get_id s i =
get_name s b i
(*
let store_id s i =
let b = Buffer.create 17 in
try while !i < String.length s do
......@@ -130,6 +132,7 @@ let store_id s i =
Hashtbl.add reverse_ident_table id !reverse_dict_count;
incr reverse_dict_count;
id
*)
(* {2 Shapes} *)
......
......@@ -9,6 +9,8 @@
(* *)
(********************************************************************)
open Why3
(** Explanations *)
val goal_expl_task:
......