Commit e5c887c7 authored by MARCHE Claude's avatar MARCHE Claude

Merge branch 'master' into new_system

# Conflicts:
#	Makefile.in
#	Version
#	examples/avl/priority_queue/why3session.xml
#	examples/avl/priority_queue/why3shapes.gz
#	examples/avl/tables/why3session.xml
#	examples/avl/tables/why3shapes.gz
#	examples/binomial_heap/why3session.xml
#	examples/binomial_heap/why3shapes.gz
#	examples/bitcount/why3session.xml
#	examples/bitcount/why3shapes.gz
#	examples/counting_sort/why3session.xml
#	examples/counting_sort/why3shapes.gz
#	examples/dijkstra/why3shapes.gz
#	examples/double_wp/compiler/why3session.xml
#	examples/double_wp/compiler/why3shapes.gz
#	examples/double_wp/specs/why3session.xml
#	examples/double_wp/specs/why3shapes.gz
#	examples/dyck/why3session.xml
#	examples/dyck/why3shapes.gz
#	examples/euler001/why3session.xml
#	examples/euler001/why3shapes.gz
#	examples/euler011/why3session.xml
#	examples/euler011/why3shapes.gz
#	examples/finger_trees/why3session.xml
#	examples/finger_trees/why3shapes.gz
#	examples/hashtbl_impl/why3shapes.gz
#	examples/inverse_in_place/why3session.xml
#	examples/inverse_in_place/why3shapes.gz
#	examples/knuth_prime_numbers/why3session.xml
#	examples/knuth_prime_numbers/why3shapes.gz
#	examples/koda_ruskey/why3session.xml
#	examples/koda_ruskey/why3shapes.gz
#	examples/linear_probing/why3session.xml
#	examples/linear_probing/why3shapes.gz
#	examples/linked_list_rev/why3session.xml
#	examples/linked_list_rev/why3shapes.gz
#	examples/logic/triangle_inequality/why3session.xml
#	examples/logic/triangle_inequality/why3shapes.gz
#	examples/max_matrix/why3session.xml
#	examples/max_matrix/why3shapes.gz
#	examples/maximum_subarray/why3session.xml
#	examples/maximum_subarray/why3shapes.gz
#	examples/mergesort_list/why3session.xml
#	examples/mergesort_list/why3shapes.gz
#	examples/power/why3session.xml
#	examples/power/why3shapes.gz
#	examples/quicksort/why3session.xml
#	examples/quicksort/why3shapes.gz
#	examples/register_allocation/why3session.xml
#	examples/register_allocation/why3shapes.gz
#	examples/ropes/why3session.xml
#	examples/ropes/why3shapes.gz
#	examples/schorr_waite/why3session.xml
#	examples/schorr_waite/why3shapes.gz
#	examples/schorr_waite_via_recursion/why3session.xml
#	examples/schorr_waite_via_recursion/why3shapes.gz
#	examples/stdlib/array/why3session.xml
#	examples/tests-provers/bv/why3session.xml
#	examples/tests-provers/div/why3session.xml
#	examples/to_port/dijkstra.mlw
#	examples/to_port/dijkstra/why3session.xml
#	examples/to_port/hashtbl_impl/why3session.xml
#	examples/verifythis_2015_relaxed_prefix/why3session.xml
#	examples/verifythis_2015_relaxed_prefix/why3shapes.gz
#	examples/verifythis_2016_tree_traversal/why3session.xml
#	examples/verifythis_2016_tree_traversal/why3shapes.gz
#	examples/vstte12_combinators/why3session.xml
#	examples/vstte12_combinators/why3shapes.gz
#	examples/vstte12_ring_buffer/why3session.xml
#	examples/vstte12_ring_buffer/why3shapes.gz
#	examples/vstte12_two_way_sort/why3session.xml
#	examples/vstte12_two_way_sort/why3shapes.gz
#	src/core/ident.ml
#	src/core/pretty.ml
#	src/core/pretty.mli
#	src/core/trans.ml
#	src/ide/gmain.ml
#	src/parser/lexer.mli
#	src/parser/lexer.mll
#	src/parser/parser.mly
#	src/parser/typing.ml
#	src/parser/typing.mli
#	src/session/session.ml
#	src/session/session_scheduler.ml
#	src/session/session_scheduler.mli
#	src/tools/why3replay.ml
#	src/transform/introduction.ml
#	src/util/pp.mli
#	src/util/strings.ml
#	src/why3session/why3session_html.ml
#	src/whyml/mlw_interp.ml
parents d754ddee d6bd47f9
...@@ -84,9 +84,15 @@ why3.conf ...@@ -84,9 +84,15 @@ why3.conf
/bin/why3session.opt /bin/why3session.opt
/bin/why3session.byte /bin/why3session.byte
/bin/why3session /bin/why3session
/bin/why3shell.opt
/bin/why3shell.byte
/bin/why3shell
/bin/why3wc.opt /bin/why3wc.opt
/bin/why3wc.byte /bin/why3wc.byte
/bin/why3wc /bin/why3wc
/bin/why3webserver.opt
/bin/why3webserver.byte
/bin/why3webserver
# /doc/ # /doc/
/doc/version.tex /doc/version.tex
...@@ -199,6 +205,7 @@ pvsbin/ ...@@ -199,6 +205,7 @@ pvsbin/
/src/util/config.ml /src/util/config.ml
/src/util/lexlib.ml /src/util/lexlib.ml
/src/util/rc.ml /src/util/rc.ml
/src/util/json_lexer.ml
/src/util/json_parser.mli /src/util/json_parser.mli
/src/util/json_parser.ml /src/util/json_parser.ml
...@@ -210,6 +217,10 @@ pvsbin/ ...@@ -210,6 +217,10 @@ pvsbin/
# /src/tools # /src/tools
/src/tools/why3wc.ml /src/tools/why3wc.ml
# /src/ide
/src/ide/why3_js.byte
/src/ide/why3_js.js
# /plugins/tptp/ # /plugins/tptp/
/plugins/tptp/tptp_lexer.ml /plugins/tptp/tptp_lexer.ml
/plugins/tptp/tptp_parser.ml /plugins/tptp/tptp_parser.ml
......
...@@ -20,6 +20,7 @@ Claude Marché <claude.marche@inria.fr> <cmarche@dispater.(none)> ...@@ -20,6 +20,7 @@ Claude Marché <claude.marche@inria.fr> <cmarche@dispater.(none)>
Claude Marché <claude.marche@inria.fr> <cmarche@orcus.(none)> Claude Marché <claude.marche@inria.fr> <cmarche@orcus.(none)>
Claude Marché <claude.marche@inria.fr> <cmarche@belzebuth.(none)> Claude Marché <claude.marche@inria.fr> <cmarche@belzebuth.(none)>
Guillaume Melquiond <guillaume.melquiond@inria.fr> <melquion@moloch.saclay.inria.fr> Guillaume Melquiond <guillaume.melquiond@inria.fr> <melquion@moloch.saclay.inria.fr>
Kim Nguyễn <kim.nguyen@lri.fr> <kn@lri.fr>
Thi-Minh-Tuyen Nguyen <thi-minh-tuyen.nguyen@inria.fr> <nguyen@lri.fr> Thi-Minh-Tuyen Nguyen <thi-minh-tuyen.nguyen@inria.fr> <nguyen@lri.fr>
Thi-Minh-Tuyen Nguyen <thi-minh-tuyen.nguyen@inria.fr> <nguyen@acces.lri.fr> Thi-Minh-Tuyen Nguyen <thi-minh-tuyen.nguyen@inria.fr> <nguyen@acces.lri.fr>
Thi-Minh-Tuyen Nguyen <thi-minh-tuyen.nguyen@inria.fr> <nguyenthiminhtuyen@minhtuyen.local> Thi-Minh-Tuyen Nguyen <thi-minh-tuyen.nguyen@inria.fr> <nguyenthiminhtuyen@minhtuyen.local>
......
* marks an incompatible change * marks an incompatible change
Version 0.88.0, October 6, 2017
===============================
Language Language
o two new forms of type declarations: integer range types and o two new forms of type declarations: integer range types and
floating-point types. To denote constants in such types, integer floating-point types. To denote constants in such types, integer
constants and real constants can be cast to such types. This constants and real constants can be cast to such types. This
support is exploited in drivers for provers that support bitvector support is exploited in drivers for provers that support bitvector
theories (CVC4, Z3) and floating-point theory (Z3). theories (CVC4, Z3) and floating-point theory (Z3).
More details in the manual, section 7.2.4 "Theories" More details in the manual, section 7.2.4 "Theories".
* a quote character (') inside an identifier must either be at the * a quote character (') inside an identifier must either be at the
end, or be followed by either a digit, the underscore character end, or be followed by either a digit, the underscore character
(_) or another quote. Identifiers with a quote followed by a (_) or another quote. Identifiers with a quote followed by a
...@@ -15,19 +18,18 @@ Language ...@@ -15,19 +18,18 @@ Language
Standard library Standard library
o new theory ieee_float formalizing floating-point arithmetic, o new theory ieee_float formalizing floating-point arithmetic,
conformant to IEEE-754, mapped to SMT-LIB FP theory. compliant to IEEE-754, mapped to SMT-LIB FP theory.
User features User features
o proof strategies: why3 config now generates default proof strategies o proof strategies: why3 config now generates default proof strategies
using the installed provers. These are available under name "Auto using the installed provers. These are available under name "Auto
level 0", "Auto level 1" and "Auto level 2" in why3 ide. More level 0", "Auto level 1" and "Auto level 2" in why3 ide.
details in the manual, section 10.6 "Proof Strategies" More details in the manual, section 10.6 "Proof Strategies".
o counterexamples: better support for array o counterexamples: better support for array values, support for
values, support for floating-point values, support for Z3 in floating-point values, support for Z3 in addition to CVC4.
addition to CVC4. More details in the manual, section 6.3.5 "Displaying Counterexamples".
More details in the manual, section 6.3.5 "Displaying Counterexamples"
Provers
Prover support
o support for Isabelle 2017 o support for Isabelle 2017
* discarded support for Isabelle 2016 (2016-1 still supported) * discarded support for Isabelle 2016 (2016-1 still supported)
o support for Coq 8.6.1 (released Jul 25, 2017) o support for Coq 8.6.1 (released Jul 25, 2017)
...@@ -40,11 +42,11 @@ Prover support ...@@ -40,11 +42,11 @@ Prover support
Version 0.87.3, January 12, 2017 Version 0.87.3, January 12, 2017
================================ ================================
bug fixes Bug fixes
o fixed OCaml extraction with respect to ghost parameters o fixed OCaml extraction with respect to ghost parameters
o assorted bug fixes o assorted bug fixes
provers Provers
o support for Alt-Ergo 1.30 (released Nov 21, 2016) o support for Alt-Ergo 1.30 (released Nov 21, 2016)
o support for Coq 8.6 (released Dec 8, 2016) o support for Coq 8.6 (released Dec 8, 2016)
o support for Gappa 1.3 (released Jul 20, 2016) o support for Gappa 1.3 (released Jul 20, 2016)
...@@ -55,14 +57,14 @@ provers ...@@ -55,14 +57,14 @@ provers
Version 0.87.2, September 1, 2016 Version 0.87.2, September 1, 2016
================================= =================================
bug fixes Bug fixes
o improved well-formedness of extracted OCaml code o improved well-formedness of extracted OCaml code
o assorted bug fixes o assorted bug fixes
Version 0.87.1, May 27, 2016 Version 0.87.1, May 27, 2016
============================ ============================
bug fixes Bug fixes
o assorted bug fixes o assorted bug fixes
Version 0.87.0, March 15, 2016 Version 0.87.0, March 15, 2016
......
...@@ -149,7 +149,10 @@ GENERATED = ...@@ -149,7 +149,10 @@ GENERATED =
############## ##############
LIBGENERATED = src/util/config.ml \ LIBGENERATED = src/util/config.ml \
src/util/rc.ml src/util/lexlib.ml src/parser/lexer.ml \ src/util/rc.ml src/util/lexlib.ml \
src/util/json_parser.mli src/util/json_parser.ml \
src/util/json_lexer.ml \
src/parser/lexer.ml \
src/parser/parser.mli src/parser/parser.ml \ src/parser/parser.mli src/parser/parser.ml \
src/driver/driver_parser.mli src/driver/driver_parser.ml \ src/driver/driver_parser.mli src/driver/driver_parser.ml \
src/driver/driver_lexer.ml \ src/driver/driver_lexer.ml \
...@@ -161,11 +164,13 @@ LIBGENERATED = src/util/config.ml \ ...@@ -161,11 +164,13 @@ LIBGENERATED = src/util/config.ml \
LIB_UTIL = config bigInt util opt lists strings \ LIB_UTIL = config bigInt util opt lists strings \
pp extmap extset exthtbl weakhtbl \ pp extmap extset exthtbl weakhtbl \
hashcons stdlib exn_printer json debug loc lexlib print_tree \ hashcons stdlib exn_printer \
json_base json_parser json_lexer \
debug loc lexlib print_tree \
cmdline warning sysutil rc plugin bigInt number pqueue cmdline warning sysutil rc plugin bigInt number pqueue
LIB_CORE = ident ty term pattern decl coercion theory \ LIB_CORE = ident ty term pattern decl coercion theory \
task pretty dterm env trans printer model_parser task pretty_sig pretty dterm env trans printer model_parser
LIB_DRIVER = prove_client call_provers driver_ast driver_parser driver_lexer driver \ LIB_DRIVER = prove_client call_provers driver_ast driver_parser driver_lexer driver \
whyconf autodetection \ whyconf autodetection \
...@@ -190,14 +195,18 @@ LIB_TRANSFORM = simplify_formula inlining split_goal induction \ ...@@ -190,14 +195,18 @@ LIB_TRANSFORM = simplify_formula inlining split_goal induction \
eliminate_epsilon intro_projections_counterexmp \ eliminate_epsilon intro_projections_counterexmp \
intro_vc_vars_counterexmp prepare_for_counterexmp \ intro_vc_vars_counterexmp prepare_for_counterexmp \
instantiate_predicate smoke_detector \ instantiate_predicate smoke_detector \
induction_pr prop_curry eliminate_literal induction_pr prop_curry eliminate_literal \
args_wrapper generic_arg_trans_utils case apply \
ind_itp destruct cut
LIB_PRINTER = cntexmp_printer alt_ergo why3printer smtv1 smtv2 coq\ LIB_PRINTER = cntexmp_printer alt_ergo why3printer smtv1 smtv2 coq\
pvs isabelle \ pvs isabelle \
simplify gappa cvc3 yices mathematica simplify gappa cvc3 yices mathematica
LIB_SESSION = compress xml termcode session session_tools strategy \ LIB_SESSION = compress xml termcode session_itp \
strategy_parser session_scheduler strategy strategy_parser controller_itp \
server_utils itp_communication \
itp_server json_util
LIBMODULES = $(addprefix src/util/, $(LIB_UTIL)) \ LIBMODULES = $(addprefix src/util/, $(LIB_UTIL)) \
$(addprefix src/core/, $(LIB_CORE)) \ $(addprefix src/core/, $(LIB_CORE)) \
...@@ -517,8 +526,8 @@ bin/why3prove.opt: lib/why3/why3.cmxa src/tools/why3prove.cmx ...@@ -517,8 +526,8 @@ bin/why3prove.opt: lib/why3/why3.cmxa src/tools/why3prove.cmx
bin/why3prove.byte: lib/why3/why3.cma src/tools/why3prove.cmo bin/why3prove.byte: lib/why3/why3.cma src/tools/why3prove.cmo
bin/why3realize.opt: lib/why3/why3.cmxa src/tools/why3realize.cmx bin/why3realize.opt: lib/why3/why3.cmxa src/tools/why3realize.cmx
bin/why3realize.byte: lib/why3/why3.cma src/tools/why3realize.cmo bin/why3realize.byte: lib/why3/why3.cma src/tools/why3realize.cmo
bin/why3replay.opt: lib/why3/why3.cmxa src/tools/why3replay.cmx bin/why3replay.opt: lib/why3/why3.cmxa src/tools/unix_scheduler.cmx src/tools/why3replay.cmx
bin/why3replay.byte: lib/why3/why3.cma src/tools/why3replay.cmo bin/why3replay.byte: lib/why3/why3.cma src/tools/unix_scheduler.cmo src/tools/why3replay.cmo
bin/why3wc.opt: src/tools/why3wc.cmx bin/why3wc.opt: src/tools/why3wc.cmx
bin/why3wc.byte: src/tools/why3wc.cmo bin/why3wc.byte: src/tools/why3wc.cmo
...@@ -700,7 +709,7 @@ xml-validate-local: ...@@ -700,7 +709,7 @@ xml-validate-local:
ifeq (@enable_ide@,yes) ifeq (@enable_ide@,yes)
IDE_FILES = gconfig gmain IDE_FILES = gconfig ide_utils why3ide
IDEMODULES = $(addprefix src/ide/, $(IDE_FILES)) IDEMODULES = $(addprefix src/ide/, $(IDE_FILES))
...@@ -751,14 +760,63 @@ install_local:: bin/why3ide ...@@ -751,14 +760,63 @@ install_local:: bin/why3ide
endif endif
###############
# WEBSERV
###############
WEBSERV_FILES = wserver why3web
WEBSERVMODULES = $(addprefix src/ide/, $(WEBSERV_FILES))
WEBSERVDEP = $(addsuffix .dep, $(WEBSERVMODULES))
WEBSERVCMO = $(addsuffix .cmo, $(WEBSERVMODULES))
WEBSERVCMX = $(addsuffix .cmx, $(WEBSERVMODULES))
$(WEBSERVDEP): DEPFLAGS += -I src/ide
$(WEBSERVCMO) $(WEBSERVCMX): INCLUDES += -I src/ide
# build targets
byte: bin/why3webserver.byte
opt: bin/why3webserver.opt
bin/why3webserver.opt: lib/why3/why3.cmxa $(WEBSERVCMX)
$(SHOW) 'Linking $@'
$(HIDE)$(OCAMLOPT) $(OFLAGS) -o $@ $(OLINKFLAGS) $^
bin/why3webserver.byte: lib/why3/why3.cma $(WEBSERVCMO)
$(SHOW) 'Linking $@'
$(HIDE)$(OCAMLC) $(BFLAGS) -o $@ $(BLINKFLAGS) -custom $^
# depend and clean targets
ifneq "$(MAKECMDGOALS:clean%=clean)" "clean"
-include $(WEBSERVDEP)
endif
depend: $(WEBSERVDEP)
CLEANDIRS += src/ide
clean_old_install::
rm -f $(BINDIR)/why3webserver$(EXE)
install_no_local::
$(INSTALL) bin/why3webserver.@OCAMLBEST@ $(TOOLDIR)/why3webserver$(EXE)
install_local:: bin/why3webserver
############### ###############
# Session # Session
############### ###############
SESSION_FILES = why3session_lib why3session_copy why3session_info \ SESSION_FILES = why3session_lib why3session_info \
why3session_latex why3session_html why3session_rm \ why3session_html why3session_latex \
why3session_output why3session_run why3session_csv \
why3session_main why3session_main
# TODO: why3session_copy why3session_rm why3session_csv why3session_run
# why3session_output
SESSIONMODULES = $(addprefix src/why3session/, $(SESSION_FILES)) SESSIONMODULES = $(addprefix src/why3session/, $(SESSION_FILES))
...@@ -800,6 +858,50 @@ install_no_local:: ...@@ -800,6 +858,50 @@ install_no_local::
install_local:: bin/why3session install_local:: bin/why3session
###############
# Why3 Shell
###############
SHELL_FILES = unix_scheduler why3shell
SHELLMODULES = $(addprefix src/tools/, $(SHELL_FILES))
SHELLDEP = $(addsuffix .dep, $(SHELLMODULES))
SHELLCMO = $(addsuffix .cmo, $(SHELLMODULES))
SHELLCMX = $(addsuffix .cmx, $(SHELLMODULES))
$(SHELLDEP): DEPFLAGS += -I src/tools
$(SHELLCMO) $(SHELLCMX): INCLUDES += -I src/tools
# build targets
byte: bin/why3shell.byte
opt: bin/why3shell.opt
bin/why3shell.opt: lib/why3/why3.cmxa $(SHELLCMX)
$(SHOW) 'Linking $@'
$(HIDE)$(OCAMLOPT) $(OFLAGS) -o $@ $(OLINKFLAGS) $^
bin/why3shell.byte: lib/why3/why3.cma $(SHELLCMO)
$(SHOW) 'Linking $@'
$(HIDE)$(OCAMLC) $(BFLAGS) -o $@ $(BLINKFLAGS) $^
# depend and clean targets
ifneq "$(MAKECMDGOALS:clean%=clean)" "clean"
-include $(SHELLDEP)
endif
depend: $(SHELLDEP)
clean_old_install::
rm -f $(BINDIR)/why3shell$(EXE)
install_no_local::
$(INSTALL) bin/why3shell.@OCAMLBEST@ $(TOOLDIR)/why3shell$(EXE)
install_local:: bin/why3shell
############## ##############
# Coq plugin # Coq plugin
...@@ -1557,7 +1659,6 @@ src/trywhy3/trywhy3.js: src/trywhy3/trywhy3.byte src/trywhy3/why3_worker.js src/ ...@@ -1557,7 +1659,6 @@ src/trywhy3/trywhy3.js: src/trywhy3/trywhy3.byte src/trywhy3/why3_worker.js src/
src/trywhy3/trywhy3.byte: src/trywhy3/worker_proto.cmo src/trywhy3/trywhy3.cmo src/trywhy3/trywhy3.byte: src/trywhy3/worker_proto.cmo src/trywhy3/trywhy3.cmo
$(JSOCAMLC) $(BFLAGS) -o $@ -linkpkg $(BLINKFLAGS) $^ $(JSOCAMLC) $(BFLAGS) -o $@ -linkpkg $(BLINKFLAGS) $^
src/trywhy3/why3_worker.js: src/trywhy3/why3_worker.byte src/trywhy3/why3_worker.js: src/trywhy3/why3_worker.byte
js_of_ocaml $(JSOO_DEBUG) --extern-fs -I . -I src/trywhy3 --file=trywhy3.conf:/ \ js_of_ocaml $(JSOO_DEBUG) --extern-fs -I . -I src/trywhy3 --file=trywhy3.conf:/ \
--file=try_alt_ergo.drv:/ \ --file=try_alt_ergo.drv:/ \
...@@ -1567,7 +1668,6 @@ src/trywhy3/why3_worker.js: src/trywhy3/why3_worker.byte ...@@ -1567,7 +1668,6 @@ src/trywhy3/why3_worker.js: src/trywhy3/why3_worker.byte
src/trywhy3/why3_worker.byte: $(TRYWHY3CMO) src/trywhy3/worker_proto.cmo src/trywhy3/why3_worker.cmo src/trywhy3/why3_worker.byte: $(TRYWHY3CMO) src/trywhy3/worker_proto.cmo src/trywhy3/why3_worker.cmo
$(JSOCAMLC) $(BFLAGS) -o $@ -linkpkg $(BLINKFLAGS) $^ $(JSOCAMLC) $(BFLAGS) -o $@ -linkpkg $(BLINKFLAGS) $^
src/trywhy3/alt_ergo_worker.js: src/trywhy3/alt_ergo_worker.byte src/trywhy3/alt_ergo_worker.js: src/trywhy3/alt_ergo_worker.byte
js_of_ocaml $(JSOO_DEBUG) +weak.js +nat.js +dynlink.js +toplevel.js $< js_of_ocaml $(JSOO_DEBUG) +weak.js +nat.js +dynlink.js +toplevel.js $<
...@@ -1592,6 +1692,30 @@ clean:: ...@@ -1592,6 +1692,30 @@ clean::
CLEANDIRS += src/trywhy3 CLEANDIRS += src/trywhy3
#########
# why3webserver and full web/js interface
#########
ifeq (@HASJSOFOCAML,yes)
JSOCAMLCW=ocamlfind ocamlc -package js_of_ocaml -package js_of_ocaml.ppx \
-I src/ide
src/ide/why3_js.cmo: src/ide/why3_js.ml lib/why3/why3.cma
$(JSOCAMLCW) $(BFLAGS) -c $<
src/ide/why3_js.byte: lib/why3/why3.cma src/ide/why3_js.cmo
$(JSOCAMLCW) $(BFLAGS) -o $@ -linkpkg $(BLINKFLAGS) $^
src/ide/why3_js.js: src/ide/why3_js.byte
js_of_ocaml +weak.js +nat.js +dynlink.js +toplevel.js $<
opt: lib/why3/why3.cma bin/why3webserver.opt src/ide/why3_js.js
byte: lib/why3/why3.cma bin/why3webserver.byte src/ide/why3_js.js
endif
######## ########
# bench # bench
######## ########
...@@ -1619,6 +1743,10 @@ bench:: bin/why3.@OCAMLBEST@ bin/why3config.@OCAMLBEST@ plugins $(TOOLS) \ ...@@ -1619,6 +1743,10 @@ bench:: bin/why3.@OCAMLBEST@ bin/why3config.@OCAMLBEST@ plugins $(TOOLS) \
# test targets # test targets
############### ###############
test-itp.opt: src/printer/itp.ml lib/why3/why3.cmxa
$(if $(QUIET),@echo 'Ocamlopt $<' &&) \
$(OCAMLOPT) -o $@ -I lib/why3 $(INCLUDES) $(EXTCMXA) lib/why3/why3.cmxa $<
test-api-logic.byte: examples/use_api/logic.ml lib/why3/why3.cma test-api-logic.byte: examples/use_api/logic.ml lib/why3/why3.cma
$(SHOW) 'Ocaml $<' $(SHOW) 'Ocaml $<'
$(HIDE)ocaml -I lib/why3 $(INCLUDES) $(EXTCMA) lib/why3/why3.cma $< > /dev/null \ $(HIDE)ocaml -I lib/why3 $(INCLUDES) $(EXTCMA) lib/why3/why3.cma $< > /dev/null \
...@@ -1773,9 +1901,13 @@ MODULESTODOC = \ ...@@ -1773,9 +1901,13 @@ MODULESTODOC = \
util/extmap util/extset util/exthtbl \ util/extmap util/extset util/exthtbl \
util/weakhtbl util/stdlib util/rc util/debug \ util/weakhtbl util/stdlib util/rc util/debug \
core/ident core/ty core/term core/decl core/coercion core/theory \ core/ident core/ty core/term core/decl core/coercion core/theory \
core/env core/task \ core/env core/task core/trans \
driver/whyconf driver/call_provers driver/driver \ driver/whyconf driver/call_provers driver/driver \
session/session session/session_tools session/session_scheduler transform/args_wrapper \
session/session_itp session/controller_itp \
session/itp_communication session/itp_server \
whyml/mlw_ty whyml/mlw_expr whyml/mlw_decl whyml/mlw_module \
whyml/mlw_wp
FILESTODOC = $(addsuffix .mli, $(addprefix src/, $(MODULESTODOC))) FILESTODOC = $(addsuffix .mli, $(addprefix src/, $(MODULESTODOC)))
...@@ -1918,7 +2050,7 @@ clean:: ...@@ -1918,7 +2050,7 @@ clean::
# the generic rule cannot be applied since ocaml would confuse # the generic rule cannot be applied since ocaml would confuse
# lib/why3/why3extract.cmi for the interface (!!!) # lib/why3/why3extract.cmi for the interface (!!!)
# same for ocaml/lablgtk2/gMain.cmi on case-insensitive filesystems # same for ocaml/lablgtk2/gMain.cmi on case-insensitive filesystems
src/tools/why3extract.cmx src/ide/gmain.cmx: %.cmx: %.ml src/tools/why3extract.cmx: %.cmx: %.ml
$(SHOW) 'Ocamlopt $<' $(SHOW) 'Ocamlopt $<'
$(HIDE)$(OCAMLOPT) -c $(OFLAGS) $< $(HIDE)$(OCAMLOPT) -c $(OFLAGS) $<
......
# Why version
VERSION=0.90+git VERSION=0.90+git
...@@ -476,6 +476,18 @@ dnl AC_CHECK_PROG(enable_ide,lablgtk2,yes,no) not always available (Win32) ...@@ -476,6 +476,18 @@ dnl AC_CHECK_PROG(enable_ide,lablgtk2,yes,no) not always available (Win32)
dnl AC_CHECK_PROG(OCAMLWEB,ocamlweb,ocamlweb,true) dnl AC_CHECK_PROG(OCAMLWEB,ocamlweb,ocamlweb,true)
# js_of_ocaml
JSOFOCAML=$(ocamlfind query js_of_ocaml)
if test -z "$JSOFCAML"; then
HASJSOFOCAML=no
reason_jsofocaml=" (js_of_ocaml not found)"
else
HASJSOFOCAML=yes
fi
# Coq # Coq
enable_coq_support=yes enable_coq_support=yes
...@@ -770,6 +782,8 @@ AC_SUBST(enable_ide) ...@@ -770,6 +782,8 @@ AC_SUBST(enable_ide)
AC_SUBST(LABLGTK2LIB) AC_SUBST(LABLGTK2LIB)
AC_SUBST(LABLGTK2PKG) AC_SUBST(LABLGTK2PKG)
AC_SUBST(HASJSOFOCAML)
AC_SUBST(META_OCAMLGRAPH) AC_SUBST(META_OCAMLGRAPH)
AC_SUBST(enable_zarith) AC_SUBST(enable_zarith)
...@@ -860,7 +874,8 @@ echo " Library path : $OCAMLLIB" ...@@ -860,7 +874,8 @@ echo " Library path : $OCAMLLIB"
echo " Native compilation : $enable_native_code" echo " Native compilation : $enable_native_code"
echo " Profiling : $enable_profiling" echo " Profiling : $enable_profiling"
echo "Components" echo "Components"
echo " IDE command : $enable_ide$reason_ide" echo " GTK IDE : $enable_ide$reason_ide"
echo " Web IDE : $HASJSOFOCAML$reason_jsofocaml"
echo " GMP arithmetic : $enable_zarith$reason_zarith" echo " GMP arithmetic : $enable_zarith$reason_zarith"
echo " Compressed sessions : $enable_zip$reason_zip" echo " Compressed sessions : $enable_zip$reason_zip"
echo " MenhirLib support : $enable_menhirLib$reason_menhirLib" echo " MenhirLib support : $enable_menhirLib$reason_menhirLib"
......
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
%BEGIN LATEX %BEGIN LATEX
\begin{LARGE} \begin{LARGE}
%END LATEX %END LATEX
Version \whyversion{}, January 2017 Version \whyversion{}, October 2017
%BEGIN LATEX %BEGIN LATEX
\end{LARGE} \end{LARGE}
%END LATEX %END LATEX
......
module Exp
use import ieee_float.Float64
use import real.Abs
use import real.ExpLog
use import real.Real
val ( +. ) (x y : t) : t
requires {t'isFinite x}
requires {t'isFinite y}
requires {"expl:no_overflow" t'isFinite (x .+ y)}
ensures {result = x .+ y}
val ( *. ) (x y : t) : t
requires {t'isFinite x}
requires {t'isFinite y}
requires {"expl:no_overflow" t'isFinite (x .* y)}
ensures {result = x .* y}
let my_exp (x: t) : t
requires { t'isFinite x}
requires { .- (1.0:t) .<= x .<= (1.0:t)}
requires {abs (t'real x) <= 1.0}
ensures { abs (t'real result - exp (t'real x)) <= 0x1p-4} (* 1 * 2 ^ - 4 *)
=
assert {
let x = t'real x in
abs(0.9890365552 + 1.130258690*x +
0.5540440796*x*x - exp(x)) <= 0x0.FFFFp-4};
(0x1.FA62FFD643D6Ep-1:t) +. (0x1.2158A22D91DE9p0:t) *. x +.
(0x1.1BABAA64D94DBp-1:t) *. x *. x
end
...@@ -38,7 +38,7 @@ ML=$(patsubst %,%.ml,$(MLALL)) ...@@ -38,7 +38,7 @@ ML=$(patsubst %,%.ml,$(MLALL))
CMX=$(patsubst %,%.cmx,$(MLALL)) CMX=$(patsubst %,%.cmx,$(MLALL))
OCAMLC=ocamlopt.opt OCAMLC=ocamlopt.opt
INCLUDES=-I $(BD) $(INCLUDEALL) -I ../../../plugins/tptp INCLUDES=-I $(BD) $(INCLUDEALL) -I ../../../plugins/tptp
LIBS=unix.cmxa nums.cmxa $(BIGINTLIB).cmxa dynlink.cmxa str.cmxa menhirLib.cmx zip.cmxa why3.cmxa why3extract.cmxa tptp_ast.cmx tptp_typing.cmx tptp_parser.cmx tptp_lexer.cmx LIBS=unix.cmxa $(BIGINTLIB).cmxa dynlink.cmxa str.cmxa menhirLib.cmx zip.cmxa why3.cmxa why3extract.cmxa tptp_ast.cmx tptp_typing.cmx tptp_parser.cmx tptp_lexer.cmx
LIBSOLD=$(BD)/why3__BuiltIn.cmx $(BD)/int__Int.cmx $(BD)/array__Array.cmx LIBSOLD=$(BD)/why3__BuiltIn.cmx $(BD)/int__Int.cmx $(BD)/array__Array.cmx
WHY3FLAGS=-L . --debug ignore_unused_vars WHY3FLAGS=-L . --debug ignore_unused_vars
MLFLAGS= MLFLAGS=
......
This diff is collapsed.
This diff is collapsed.
...@@ -2,16 +2,19 @@ ...@@ -2,16 +2,19 @@
<!DOCTYPE why3session PUBLIC "-//Why3//proof session v5//EN" <!DOCTYPE why3session PUBLIC "-//Why3//proof session v5//EN"
"http://why3.lri.fr/why3session.dtd"> "http://why3.lri.fr/why3session.dtd">
<why3session shape_version="4"> <why3session shape_version="4">
<prover id="0" name="PolyPaver" version="0.3" timelimit="3600" memlimit="1000"/> <prover id="0" name="PolyPaver" version="0.3" timelimit="3600" steplimit="0" memlimit="1000"/>
<file name="../polypaver.why" expanded="true"> <file name="../polypaver.why">
<theory name="Test" sum="2676ef260e99a1019e7c4dfb35399b4f" expanded="true"> <theory name="TestReal" sum="237f987f3ba27b23cd7c92d0aee93cf7">
<goal name="add1" expanded="true"> <goal name="add1">
<proof prover="0" edited="polypaver-Test-add1_1.tptp"><result status="unknown" time="0.01"/></proof> <proof prover="0"><result status="unknown" time="0.01"/></proof>
</goal> </goal>
<goal name="add2" expanded="true"> <goal name="add2">
<proof prover="0" timelimit="5"><result status="unknown" time="0.01"/></proof> <proof prover="0" timelimit="5"><result status="unknown" time="0.01"/></proof>
</goal> </goal>
<goal name="g1" expanded="true"> <goal name="exp_hyp" proved="true">
<proof prover="0" timelimit="120"><result status="valid" time="16.23"/></proof>
</goal>
<goal name="g1" proved="true">
<proof prover="0"><result status="valid" time="626.99"/></proof> <proof prover="0"><result status="valid" time="626.99"/></proof>
</goal> </goal>
</theory> </theory>
......
...@@ -53,10 +53,9 @@ let provers = ...@@ -53,10 +53,9 @@ let provers =
provers provers
[] []
let dummy_keygen ?parent () = ()
(* a dummy keygen function for sessions *)
(* create an empty session in the current directory *) (* create an empty session in the current directory *)
let session = Session_itp.empty_session "."
(*
let env_session,_,_ = let env_session,_,_ =
let dummy_session : unit Session.session = Session.create_session "." in let dummy_session : unit Session.session = Session.create_session "." in
let ctxt = Session.mk_update_context let ctxt = Session.mk_update_context
...@@ -64,43 +63,47 @@ let env_session,_,_ = ...@@ -64,43 +63,47 @@ let env_session,_,_ =
dummy_keygen dummy_keygen
in in
Session.update_session ~ctxt dummy_session env config Session.update_session ~ctxt dummy_session env config
*)
(* creates a controller on top of this session *)
let controller = Controller_itp.create_controller config env session
(* adds a file in the new session *) (* adds a file in the new session *)
let file : unit Session.file = let file : Session_itp.file =
let file_name = "examples/logic/hello_proof.why" in let file_name = "examples/logic/hello_proof.why" in
try try
Session.add_file ~keygen:dummy_keygen env_session file_name Controller_itp.add_file controller file_name;
Session_itp.get_file session file_name
with e -> with e ->
eprintf "@[Error while reading file@ '%s':@ %a@.@]" file_name eprintf "@[Error while reading file@ '%s':@ %a@.@]" file_name
Exn_printer.exn_printer e; Exn_printer.exn_printer e;
exit 1 exit 1