From 9da90a540b3316dc7d9d980f3a35158cbe9743dc Mon Sep 17 00:00:00 2001 From: Karolis Petrauskas Date: Sat, 27 May 2023 23:11:06 +0300 Subject: [PATCH 01/44] Dune: deps, isabelle. Signed-off-by: Karolis Petrauskas --- deps/isabelle/Makefile | 21 +++++++++++++++++++++ deps/isabelle/dune | 7 +++++++ 2 files changed, 28 insertions(+) create mode 100644 deps/isabelle/Makefile create mode 100644 deps/isabelle/dune diff --git a/deps/isabelle/Makefile b/deps/isabelle/Makefile new file mode 100644 index 00000000..92a2af93 --- /dev/null +++ b/deps/isabelle/Makefile @@ -0,0 +1,21 @@ +ISABELLE_VSN:=Isabelle2011-1 +ISABELLE_TGZ:=$(ISABELLE_VSN)_bundle_x86-linux.tar.gz +ISABELLE_URL:=http://isabelle.in.tum.de/website-$(ISABELLE_VSN)/dist/$(ISABELLE_TGZ) +ISABELLE_DIR:=Isabelle +ISABELLE_EXE:=$(shell pwd)/$(ISABELLE_DIR)/bin/isabelle +ISABELLE_OUT:=$(shell pwd)/$(ISABELLE_DIR)/heaps + +all: $(ISABELLE_DIR) + +$(ISABELLE_TGZ): + wget -q $(ISABELLE_URL) + +$(ISABELLE_DIR): $(ISABELLE_TGZ) + tar -xzf $< + mv $(ISABELLE_VSN) $(ISABELLE_DIR) + cd $(ISABELLE_DIR) && rm -rf contrib/ProofGeneral* doc heaps/*/HOL lib/{classes,fonts,logo} + cd $(ISABELLE_DIR) && echo "ISABELLE_OUTPUT=$(ISABELLE_OUT)" >> etc/settings + cd $(ISABELLE_DIR) && cp -r $(DUNE_SOURCEROOT)/isabelle src/TLA+ + cd $(ISABELLE_DIR)/src/TLA+ && $(ISABELLE_EXE) usedir -b Pure TLA+ + +.PHONY: all diff --git a/deps/isabelle/dune b/deps/isabelle/dune new file mode 100644 index 00000000..f33867cc --- /dev/null +++ b/deps/isabelle/dune @@ -0,0 +1,7 @@ +; Download the Isabelle and build the TLA+ theory with it. +; The source code for the TLA+ theory is in the $PROJECT_ROOT/isabelle directory. +; The generated heaps (Pure and TLA+) are in Isabelle/heaps/polyml-*/. +(rule + (deps "Makefile") + (targets "Isabelle") + (action (run "make" "-C" "."))) From a2cccbcdd45f46a232c338e60bb0e657e7b758ef Mon Sep 17 00:00:00 2001 From: Karolis Petrauskas Date: Sat, 27 May 2023 23:29:43 +0300 Subject: [PATCH 02/44] Dune: deps, zenon. Signed-off-by: Karolis Petrauskas --- deps/README.md | 1 + deps/zenon/Makefile | 6 ++++++ deps/zenon/dune | 5 +++++ 3 files changed, 12 insertions(+) create mode 100644 deps/README.md create mode 100644 deps/zenon/Makefile create mode 100644 deps/zenon/dune diff --git a/deps/README.md b/deps/README.md new file mode 100644 index 00000000..5fc81339 --- /dev/null +++ b/deps/README.md @@ -0,0 +1 @@ +Here we build all the dependencies / backends. diff --git a/deps/zenon/Makefile b/deps/zenon/Makefile new file mode 100644 index 00000000..de2d3da3 --- /dev/null +++ b/deps/zenon/Makefile @@ -0,0 +1,6 @@ +ZENON_SRC:=$(DUNE_SOURCEROOT)/zenon +TARGET_DIR:=$(shell pwd) + +all: + cd $(ZENON_SRC) && ./configure -coqc : -prefix "$(TARGET_DIR)" + make -C $(ZENON_SRC) all install diff --git a/deps/zenon/dune b/deps/zenon/dune new file mode 100644 index 00000000..e963b5c8 --- /dev/null +++ b/deps/zenon/dune @@ -0,0 +1,5 @@ +; Build the zenon prover, the source is at $PROJECT_ROOT/zenon. +(rule + (deps "Makefile") + (targets "bin") + (action (run "make" "-C" "."))) From 113b1bfab20930135b38c7f40db4f4960d5e56fa Mon Sep 17 00:00:00 2001 From: Karolis Petrauskas Date: Tue, 30 May 2023 10:18:50 +0300 Subject: [PATCH 03/44] Trying to make dune install work for deps. Signed-off-by: Karolis Petrauskas --- deps/isabelle/Makefile | 5 ++++- deps/isabelle/dune | 11 +++++++++-- deps/zenon/Makefile | 1 + deps/zenon/dune | 6 +++++- dune-project | 14 ++++++++++++++ src/dune | 1 + 6 files changed, 34 insertions(+), 4 deletions(-) diff --git a/deps/isabelle/Makefile b/deps/isabelle/Makefile index 92a2af93..9af056c4 100644 --- a/deps/isabelle/Makefile +++ b/deps/isabelle/Makefile @@ -10,12 +10,15 @@ all: $(ISABELLE_DIR) $(ISABELLE_TGZ): wget -q $(ISABELLE_URL) -$(ISABELLE_DIR): $(ISABELLE_TGZ) +.PRECIOUS: $(ISABELLE_DIR).sexp +$(ISABELLE_DIR).sexp: $(ISABELLE_TGZ) + rm -rf $(ISABELLE_DIR) $(ISABELLE_DIR).sexp tar -xzf $< mv $(ISABELLE_VSN) $(ISABELLE_DIR) cd $(ISABELLE_DIR) && rm -rf contrib/ProofGeneral* doc heaps/*/HOL lib/{classes,fonts,logo} cd $(ISABELLE_DIR) && echo "ISABELLE_OUTPUT=$(ISABELLE_OUT)" >> etc/settings cd $(ISABELLE_DIR) && cp -r $(DUNE_SOURCEROOT)/isabelle src/TLA+ cd $(ISABELLE_DIR)/src/TLA+ && $(ISABELLE_EXE) usedir -b Pure TLA+ + (echo "(" && (find $(ISABELLE_DIR) -type f) && echo ")") > $(ISABELLE_DIR).sexp .PHONY: all diff --git a/deps/isabelle/dune b/deps/isabelle/dune index f33867cc..29588693 100644 --- a/deps/isabelle/dune +++ b/deps/isabelle/dune @@ -3,5 +3,12 @@ ; The generated heaps (Pure and TLA+) are in Isabelle/heaps/polyml-*/. (rule (deps "Makefile") - (targets "Isabelle") - (action (run "make" "-C" "."))) + (targets (dir "Isabelle") "Isabelle.sexp") + (action (run "make" "-C" "." "Isabelle.sexp"))) + +(data_only_dirs Isabelle) + +; Blocked by +; (install +; (section lib) +; (dirs "Isabelle")) diff --git a/deps/zenon/Makefile b/deps/zenon/Makefile index de2d3da3..069d1b18 100644 --- a/deps/zenon/Makefile +++ b/deps/zenon/Makefile @@ -4,3 +4,4 @@ TARGET_DIR:=$(shell pwd) all: cd $(ZENON_SRC) && ./configure -coqc : -prefix "$(TARGET_DIR)" make -C $(ZENON_SRC) all install + cp bin/zenon ./ diff --git a/deps/zenon/dune b/deps/zenon/dune index e963b5c8..4bb29b4d 100644 --- a/deps/zenon/dune +++ b/deps/zenon/dune @@ -1,5 +1,9 @@ ; Build the zenon prover, the source is at $PROJECT_ROOT/zenon. (rule (deps "Makefile") - (targets "bin") + (targets zenon) (action (run "make" "-C" "."))) + +(install + (section libexec) + (files zenon)) diff --git a/dune-project b/dune-project index 3c48133a..c8f40321 100644 --- a/dune-project +++ b/dune-project @@ -1 +1,15 @@ (lang dune 3.7) + +(using directory-targets 0.1) + +(name tlapm) + +(generate_opam_files true) + +(source (github tlaplus/tlapm)) + +(package + (name tlapm) + (synopsis "TLA+ Proof Manager") + (description "TLA+ Proof Manager") + (depends ocaml dune)) diff --git a/src/dune b/src/dune index 1aeb6f3c..154f5a15 100644 --- a/src/dune +++ b/src/dune @@ -1,5 +1,6 @@ (executable (name tlapm) + (public_name tlapm) (libraries unix str) (foreign_stubs (language c) (names sysconf_stubs))) From 9eb565aedefe910f4f53915eb1a1ea06e2d29c75 Mon Sep 17 00:00:00 2001 From: Karolis Petrauskas Date: Tue, 30 May 2023 23:55:31 +0300 Subject: [PATCH 04/44] deps: z3 and ls4. Signed-off-by: Karolis Petrauskas --- deps/isabelle/dune | 2 +- deps/ls4/Makefile | 24 ++++++++++++++++++++++++ deps/ls4/dune | 9 +++++++++ deps/ls4/ls4.patch | 20 ++++++++++++++++++++ deps/z3/Makefile | 20 ++++++++++++++++++++ deps/z3/dune | 9 +++++++++ 6 files changed, 83 insertions(+), 1 deletion(-) create mode 100644 deps/ls4/Makefile create mode 100644 deps/ls4/dune create mode 100644 deps/ls4/ls4.patch create mode 100644 deps/z3/Makefile create mode 100644 deps/z3/dune diff --git a/deps/isabelle/dune b/deps/isabelle/dune index 29588693..bd23329e 100644 --- a/deps/isabelle/dune +++ b/deps/isabelle/dune @@ -8,7 +8,7 @@ (data_only_dirs Isabelle) -; Blocked by +; TODO: Blocked by ; (install ; (section lib) ; (dirs "Isabelle")) diff --git a/deps/ls4/Makefile b/deps/ls4/Makefile new file mode 100644 index 00000000..a9232c91 --- /dev/null +++ b/deps/ls4/Makefile @@ -0,0 +1,24 @@ +LS4_VERS=1.0 +LS4_URL_PREFIX=https://github.com/quickbeam123/ls4/archive +LS4_BASE_NAME=ls4-$(LS4_VERS) + +all: ls4 + +v$(LS4_VERS).zip: + wget $(LS4_URL_PREFIX)/$@ + +$(LS4_BASE_NAME): v$(LS4_VERS).zip + rm -rf $@ + unzip $< + touch $@ # To avoid rebuilds. + ( set -x && patch -p0 Date: Wed, 31 May 2023 00:33:53 +0300 Subject: [PATCH 05/44] deps: translate utility. Signed-off-by: Karolis Petrauskas --- translate/dune | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 translate/dune diff --git a/translate/dune b/translate/dune new file mode 100644 index 00000000..3bdfad6a --- /dev/null +++ b/translate/dune @@ -0,0 +1,15 @@ +(executable + (name main) + (public_name translate) + (modules_without_implementation fotypes)) + +(install ; It has to be installed under 2 names for some reason. + (section bin) + (files (main.exe as ptl_to_trp))) + +(ocamllex folex) +(ocamlyacc foyacc) + +(env + (dev + (flags (:standard -w +a-4-7-9-21-26-27-29-30-32..42-44-45-48-50-52-60-66..70)))) From 451b04e22c004abee4a88bb28c7cff8d675a6c73 Mon Sep 17 00:00:00 2001 From: Karolis Petrauskas Date: Wed, 31 May 2023 00:42:18 +0300 Subject: [PATCH 06/44] install emacs mode. Signed-off-by: Karolis Petrauskas --- misc/tla_mode/dune | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 misc/tla_mode/dune diff --git a/misc/tla_mode/dune b/misc/tla_mode/dune new file mode 100644 index 00000000..77f700d1 --- /dev/null +++ b/misc/tla_mode/dune @@ -0,0 +1,3 @@ +(install + (section lib) + (files ("tla-mode.el" as "emacs/tla-mode/tla-mode.el"))) From 040a5c3a512168ba4cbd57b623db8a5c7b518221 Mon Sep 17 00:00:00 2001 From: Karolis Petrauskas Date: Wed, 31 May 2023 01:21:08 +0300 Subject: [PATCH 07/44] install: library. Signed-off-by: Karolis Petrauskas --- deps/ls4/dune | 2 +- deps/z3/dune | 2 +- deps/zenon/dune | 2 +- library/dune | 3 +++ 4 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 library/dune diff --git a/deps/ls4/dune b/deps/ls4/dune index d52ca9eb..78d887c7 100644 --- a/deps/ls4/dune +++ b/deps/ls4/dune @@ -6,4 +6,4 @@ (install (section libexec) - (files ls4)) + (files (ls4 as bin/ls4))) diff --git a/deps/z3/dune b/deps/z3/dune index fd395a5f..110133bb 100644 --- a/deps/z3/dune +++ b/deps/z3/dune @@ -6,4 +6,4 @@ (install (section libexec) - (files z3)) + (files (z3 as bin/z3))) diff --git a/deps/zenon/dune b/deps/zenon/dune index 4bb29b4d..bc08624e 100644 --- a/deps/zenon/dune +++ b/deps/zenon/dune @@ -6,4 +6,4 @@ (install (section libexec) - (files zenon)) + (files (zenon as bin/zenon))) diff --git a/library/dune b/library/dune new file mode 100644 index 00000000..7dd2a2df --- /dev/null +++ b/library/dune @@ -0,0 +1,3 @@ +(install + (section lib) + (files (glob_files "*.tla"))) From fc7a310bc6255c658e926bc0c39662ab3674aa92 Mon Sep 17 00:00:00 2001 From: Karolis Petrauskas Date: Wed, 31 May 2023 18:35:34 +0300 Subject: [PATCH 08/44] Try ocaml 4.08.2 instead of 4.08.1. Signed-off-by: Karolis Petrauskas --- .github/workflows/ocaml_versions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ocaml_versions.py b/.github/workflows/ocaml_versions.py index d7229ea9..18ba5cc2 100644 --- a/.github/workflows/ocaml_versions.py +++ b/.github/workflows/ocaml_versions.py @@ -3,7 +3,7 @@ OCAML_VERSIONS = [ - '4.08.1', + '4.08.2', '4.13.0', '4.14.0', ] From 7826decf1a909cddac5d67a6586eeb1121328c82 Mon Sep 17 00:00:00 2001 From: Karolis Petrauskas Date: Wed, 31 May 2023 18:46:10 +0300 Subject: [PATCH 09/44] Revert "Try ocaml 4.08.2 instead of 4.08.1." This reverts commit fc7a310bc6255c658e926bc0c39662ab3674aa92. Signed-off-by: Karolis Petrauskas --- .github/workflows/ocaml_versions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ocaml_versions.py b/.github/workflows/ocaml_versions.py index 18ba5cc2..d7229ea9 100644 --- a/.github/workflows/ocaml_versions.py +++ b/.github/workflows/ocaml_versions.py @@ -3,7 +3,7 @@ OCAML_VERSIONS = [ - '4.08.2', + '4.08.1', '4.13.0', '4.14.0', ] From 9fe5a8d200105895ae44b60b1565425db762cdc5 Mon Sep 17 00:00:00 2001 From: Karolis Petrauskas Date: Fri, 2 Jun 2023 00:05:10 +0300 Subject: [PATCH 10/44] Use dune-site to locate backends (partial). Signed-off-by: Karolis Petrauskas --- deps/isabelle/Makefile | 8 ++++++++ deps/isabelle/dune | 7 +++---- deps/ls4/dune | 2 +- deps/z3/dune | 2 +- deps/zenon/dune | 2 +- dune-project | 3 +++ src/.depend | 9 +++++++-- src/Makefile | 2 ++ src/dune | 9 ++++++++- src/dune_site_mock/setup_paths.ml | 4 ++++ src/dune_site_mock/setup_paths.mli | 4 ++++ src/dune_site_mock/setup_paths.mlt | 3 +++ src/tlapm.ml | 4 ++++ 13 files changed, 49 insertions(+), 10 deletions(-) create mode 100644 src/dune_site_mock/setup_paths.ml create mode 100644 src/dune_site_mock/setup_paths.mli create mode 100644 src/dune_site_mock/setup_paths.mlt diff --git a/deps/isabelle/Makefile b/deps/isabelle/Makefile index 9af056c4..3e866514 100644 --- a/deps/isabelle/Makefile +++ b/deps/isabelle/Makefile @@ -19,6 +19,14 @@ $(ISABELLE_DIR).sexp: $(ISABELLE_TGZ) cd $(ISABELLE_DIR) && echo "ISABELLE_OUTPUT=$(ISABELLE_OUT)" >> etc/settings cd $(ISABELLE_DIR) && cp -r $(DUNE_SOURCEROOT)/isabelle src/TLA+ cd $(ISABELLE_DIR)/src/TLA+ && $(ISABELLE_EXE) usedir -b Pure TLA+ + # ... + # TODO: Workaround BEGIN, until https://github.com/ocaml/dune/issues/7831 is resolved. + # Here we remove symlinks to directories, because dune install fails on them for now. + cd $(ISABELLE_DIR) && rm ./contrib/jre1.6.0_27_x86-linux/jre1.6.0_27/man/ja + cd $(ISABELLE_DIR) && rm ./contrib/polyml-5.4.0/src + cd $(ISABELLE_DIR) && rm ./contrib/polyml && mv ./contrib/polyml-5.4.0 ./contrib/polyml + # TODO: Workaround END + # (echo "(" && (find $(ISABELLE_DIR) -type f) && echo ")") > $(ISABELLE_DIR).sexp .PHONY: all diff --git a/deps/isabelle/dune b/deps/isabelle/dune index bd23329e..d58ab2ad 100644 --- a/deps/isabelle/dune +++ b/deps/isabelle/dune @@ -8,7 +8,6 @@ (data_only_dirs Isabelle) -; TODO: Blocked by -; (install -; (section lib) -; (dirs "Isabelle")) +(install + (section (site (tlapm backends))) + (dirs "Isabelle")) diff --git a/deps/ls4/dune b/deps/ls4/dune index 78d887c7..27c9bebd 100644 --- a/deps/ls4/dune +++ b/deps/ls4/dune @@ -5,5 +5,5 @@ (action (run "make" "-C" "." "ls4"))) (install - (section libexec) + (section (site (tlapm backends))) (files (ls4 as bin/ls4))) diff --git a/deps/z3/dune b/deps/z3/dune index 110133bb..9b422175 100644 --- a/deps/z3/dune +++ b/deps/z3/dune @@ -5,5 +5,5 @@ (action (run "make" "-C" "." "z3"))) (install - (section libexec) + (section (site (tlapm backends))) (files (z3 as bin/z3))) diff --git a/deps/zenon/dune b/deps/zenon/dune index bc08624e..32cf6d69 100644 --- a/deps/zenon/dune +++ b/deps/zenon/dune @@ -5,5 +5,5 @@ (action (run "make" "-C" "."))) (install - (section libexec) + (section (site (tlapm backends))) (files (zenon as bin/zenon))) diff --git a/dune-project b/dune-project index c8f40321..361a3120 100644 --- a/dune-project +++ b/dune-project @@ -1,5 +1,7 @@ (lang dune 3.7) +(using dune_site 0.1) + (using directory-targets 0.1) (name tlapm) @@ -12,4 +14,5 @@ (name tlapm) (synopsis "TLA+ Proof Manager") (description "TLA+ Proof Manager") + (sites (lib backends)) ; will contain all the provers, approx lib/tlapm/backends/. (depends ocaml dune)) diff --git a/src/.depend b/src/.depend index 387ff075..16c52237 100644 --- a/src/.depend +++ b/src/.depend @@ -663,7 +663,6 @@ proof/p_visit.cmo: proof/p_visit.mlt \ proof/p_t.cmi \ util/ext.cmi \ expr.cmi \ - errors.cmi \ util/deque.cmi \ proof/p_visit.cmi proof/p_visit.cmx: proof/p_visit.mlt \ @@ -671,7 +670,6 @@ proof/p_visit.cmx: proof/p_visit.mlt \ proof/p_t.cmx \ util/ext.cmx \ expr.cmx \ - errors.cmx \ util/deque.cmx \ proof/p_visit.cmi proof/p_gen.cmo: proof/p_gen.mlt \ @@ -1836,6 +1834,10 @@ module.cmx: module.mlt \ module/m_elab.cmx \ module/m_dep.cmx \ module.cmi +dune_site_mock/setup_paths.cmo: dune_site_mock/setup_paths.mlt \ + dune_site_mock/setup_paths.cmi +dune_site_mock/setup_paths.cmx: dune_site_mock/setup_paths.mlt \ + dune_site_mock/setup_paths.cmi tlapm_args.cmo: tlapm_args.mlt \ version.cmi \ params.cmi \ @@ -1857,6 +1859,7 @@ tlapm.cmo: tlapm.mlt \ tlapm_args.cmi \ tla_parser.cmi \ util/timing.cmi \ + dune_site_mock/setup_paths.cmi \ backend/schedule.cmi \ util/property.cmi \ proof.cmi \ @@ -1882,6 +1885,7 @@ tlapm.cmx: tlapm.mlt \ tlapm_args.cmx \ tla_parser.cmx \ util/timing.cmx \ + dune_site_mock/setup_paths.cmx \ backend/schedule.cmx \ util/property.cmx \ proof.cmx \ @@ -2217,5 +2221,6 @@ module.cmi : \ expr.cmi \ util/deque.cmi \ ctx.cmi +dune_site_mock/setup_paths.cmi : tlapm_args.cmi : tlapm.cmi : diff --git a/src/Makefile b/src/Makefile index 38d8d8cf..54082f56 100644 --- a/src/Makefile +++ b/src/Makefile @@ -139,10 +139,12 @@ MODULES = \ backend \ ${MODULE_PACK} \ module \ + dune_site_mock/setup_paths \ tlapm_args \ tlapm INC0 = \ + -I ../dune_site_mock \ -I ../backend \ -I ../frontend \ -I ../expr \ diff --git a/src/dune b/src/dune index 154f5a15..5730b927 100644 --- a/src/dune +++ b/src/dune @@ -1,11 +1,18 @@ (executable (name tlapm) (public_name tlapm) - (libraries unix str) + (modules (:standard setup_paths)) + (libraries unix str dune-site) (foreign_stubs (language c) (names sysconf_stubs))) (ocamllex alexer) +(generate_sites_module + (module setup_paths) + (sites tlapm)) + +(dirs (:standard \ dune_site_mock)) ; To avoid including the mocked Setup_paths module. + (include_subdirs unqualified) (env diff --git a/src/dune_site_mock/setup_paths.ml b/src/dune_site_mock/setup_paths.ml new file mode 100644 index 00000000..95ce37ff --- /dev/null +++ b/src/dune_site_mock/setup_paths.ml @@ -0,0 +1,4 @@ + +module Sites = struct + let backends : string list = [] +end diff --git a/src/dune_site_mock/setup_paths.mli b/src/dune_site_mock/setup_paths.mli new file mode 100644 index 00000000..e6e7ca13 --- /dev/null +++ b/src/dune_site_mock/setup_paths.mli @@ -0,0 +1,4 @@ + +module Sites: sig + val backends : string list +end diff --git a/src/dune_site_mock/setup_paths.mlt b/src/dune_site_mock/setup_paths.mlt new file mode 100644 index 00000000..4de8fdf7 --- /dev/null +++ b/src/dune_site_mock/setup_paths.mlt @@ -0,0 +1,3 @@ +(* + * Copyright (C) 2008-2013 INRIA and Microsoft Corporation + *) diff --git a/src/tlapm.ml b/src/tlapm.ml index c7ab1dc6..7cd4141d 100644 --- a/src/tlapm.ml +++ b/src/tlapm.ml @@ -583,6 +583,10 @@ let init () = end; exit 3 +let () = (* TODO: Handle it properly. *) + let x = Setup_paths.Sites.backends in + let _ = List.map (fun u -> (Printf.printf "TODO: path=%s\n" u)) x in + Printf.printf("TODO: paths printed.\n") exception Stacktrace;; From 5638f17a648e48c7fa906df90fa65bb0ecaaad38 Mon Sep 17 00:00:00 2001 From: Karolis Petrauskas Date: Mon, 5 Jun 2023 18:15:26 +0300 Subject: [PATCH 11/44] Run tests with dune (except the mlt files). Signed-off-by: Karolis Petrauskas --- .gitignore | 1 + src/dune_site_mock/setup_paths.ml | 6 +++++- src/params.ml | 26 ++++++++++++++++++++------ src/tlapm.ml | 5 ----- test/TOOLS/do_junit_tests | 15 ++++++++++++++- test/TOOLS/do_soundness_tests | 16 +++++++++++++++- test/TOOLS/do_tests | 20 ++++++++++++++++---- test/dune | 11 +++++++++++ 8 files changed, 82 insertions(+), 18 deletions(-) create mode 100644 test/dune diff --git a/.gitignore b/.gitignore index 447b185d..22595cb8 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ /_build/ /.vscode/ +/tlapm.opam /Makefile /config.log diff --git a/src/dune_site_mock/setup_paths.ml b/src/dune_site_mock/setup_paths.ml index 95ce37ff..33418f9d 100644 --- a/src/dune_site_mock/setup_paths.ml +++ b/src/dune_site_mock/setup_paths.ml @@ -1,4 +1,8 @@ - +(* +This file is used as a mock for the Setup_paths module generated by dune-site during the dune-based build. +In the make-based setup we will retain the approach to find the backend proovers via the PATH environment variable. +Hence this file inicates (by returning empty list) the absense of the dune-site-based paths, thus a fallback to PATH. +*) module Sites = struct let backends : string list = [] end diff --git a/src/params.ml b/src/params.ml index d3d785f4..a265180c 100644 --- a/src/params.ml +++ b/src/params.ml @@ -68,12 +68,26 @@ type executable = type exec = executable ref -let mydir = Filename.dirname Sys.executable_name -let auxdir = Filename.concat library_path "bin" -let extrapath = sprintf ":%s:%s" mydir auxdir +(* If the backends site is not available ([]), then look for executables in the PATH, + otherwise we are in the dune-based build and should look for the backends in the + specified site locations. *) +let path = + match Setup_paths.Sites.backends with + | [] -> + let mydir = Filename.dirname Sys.executable_name in + let auxdir = Filename.concat library_path "bin" in + let extrapath = sprintf ":%s:%s" mydir auxdir in + let path = Sys.getenv "PATH" in + sprintf "%s%s" path extrapath + | backends_site -> + let site_bin bs = Filename.concat bs "bin" in + let site_isa bs = Filename.concat (Filename.concat bs "Isabelle") "bin" in + let site_paths bs = [site_bin bs; site_isa bs] in + let path_elems = List.concat (List.map site_paths backends_site) in + sprintf "%s:%s" (String.concat ":" path_elems) (Sys.getenv "PATH") + let path_prefix = - let path = Sys.getenv "PATH" in - sprintf "PATH='%s%s';" path extrapath + sprintf "PATH='%s';" path let get_exec e = match !e with @@ -100,7 +114,7 @@ let get_exec e = let msg1 = sprintf "Executable %S not found" exec in let msg2 = if Filename.is_relative exec - then sprintf " in this PATH:\n%s%s\n" (Sys.getenv "PATH") extrapath + then sprintf " in this PATH:\n%s\n" path else "." in let msg = msg1 ^ msg2 in diff --git a/src/tlapm.ml b/src/tlapm.ml index 7cd4141d..a127ccf5 100644 --- a/src/tlapm.ml +++ b/src/tlapm.ml @@ -583,11 +583,6 @@ let init () = end; exit 3 -let () = (* TODO: Handle it properly. *) - let x = Setup_paths.Sites.backends in - let _ = List.map (fun u -> (Printf.printf "TODO: path=%s\n" u)) x in - Printf.printf("TODO: paths printed.\n") - exception Stacktrace;; Sys.set_signal diff --git a/test/TOOLS/do_junit_tests b/test/TOOLS/do_junit_tests index 0d70420f..91c01713 100755 --- a/test/TOOLS/do_junit_tests +++ b/test/TOOLS/do_junit_tests @@ -3,7 +3,20 @@ BASEDIR="`pwd`" TOOLDIR="$BASEDIR/TOOLS" -export TLAPM="pkill -f cvc3 | $BASEDIR/../tlapm --stretch 10 --threads 4 -I $BASEDIR/../library" + +if [ -z "$USE_TLAPM" ]; then + TLAPM_BIN=$BASEDIR/../tlapm +else + TLAPM_BIN="`realpath $USE_TLAPM`" +fi + +if [ -z "$USE_LIB" ]; then + LIBRARY_DIR=$BASEDIR/../library +else + LIBRARY_DIR="`realpath $USE_LIB`" +fi + +export TLAPM="pkill -f cvc3 | $TLAPM_BIN --stretch 10 --threads 4 -I $LIBRARY_DIR" # create output folder juDIR=$BASEDIR/test_reports/tmp diff --git a/test/TOOLS/do_soundness_tests b/test/TOOLS/do_soundness_tests index 4855fb0f..ea7e41a2 100755 --- a/test/TOOLS/do_soundness_tests +++ b/test/TOOLS/do_soundness_tests @@ -3,7 +3,21 @@ BASEDIR="`pwd`" TOOLDIR="$BASEDIR/TOOLS" -export TLAPM="$BASEDIR/../tlapm --threads 4 -I $BASEDIR/../library" + +if [ -z "$USE_TLAPM" ]; then + TLAPM_BIN=$BASEDIR/../tlapm +else + TLAPM_BIN="`realpath $USE_TLAPM`" +fi + +if [ -z "$USE_LIB" ]; then + LIBRARY_DIR=$BASEDIR/../library +else + LIBRARY_DIR="`realpath $USE_LIB`" +fi + + +export TLAPM="$TLAPM_BIN --threads 4 -I $LIBRARY_DIR" # create output folder juDIR=$BASEDIR/test_reports/tmp diff --git a/test/TOOLS/do_tests b/test/TOOLS/do_tests index a44bd521..e3c08d20 100755 --- a/test/TOOLS/do_tests +++ b/test/TOOLS/do_tests @@ -4,13 +4,25 @@ BASEDIR="`pwd`" TOOLDIR="$BASEDIR/TOOLS" -ARGS="$BASEDIR/../library" -if [ "$1" = "smt_tests" ] - then export ARGS="$ARGS --method smt" +if [ -z "$USE_TLAPM" ]; then + TLAPM_BIN=$BASEDIR/../tlapm +else + TLAPM_BIN="`realpath $USE_TLAPM`" fi -export TLAPM="$BASEDIR/../tlapm -I $ARGS" +if [ -z "$USE_LIB" ]; then + LIBRARY_DIR=$BASEDIR/../library +else + LIBRARY_DIR="`realpath $USE_LIB`" +fi + +ARGS="-I $LIBRARY_DIR" +if [ "$1" = "smt_tests" ]; then + ARGS="$ARGS --method smt" +fi + +export TLAPM="$TLAPM_BIN $ARGS" export STRETCH=${STRETCH:-5} export LOGFILE="$BASEDIR/tests.log" export PATH=$BASEDIR/lib/tlaps/bin/:$PATH diff --git a/test/dune b/test/dune new file mode 100644 index 00000000..0f255254 --- /dev/null +++ b/test/dune @@ -0,0 +1,11 @@ +(rule + (alias runtest) + (deps + (alias_rec ../deps/all) + (alias_rec ../src/all) + (glob_files_rec "*.tla") + (source_tree "TOOLS")) + (action + (setenv USE_TLAPM %{exe:../src/tlapm.exe} + (setenv USE_LIB ../library + (run "./TOOLS/do_tests" "."))))) From 8bc06c3e4f08698de284a6b153ba83f95f5149d8 Mon Sep 17 00:00:00 2001 From: Karolis Petrauskas Date: Mon, 5 Jun 2023 22:35:06 +0300 Subject: [PATCH 12/44] Able to run the testcases selectively. Signed-off-by: Karolis Petrauskas --- test/Makefile.dune | 13 +++++++++++++ test/dune | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 test/Makefile.dune diff --git a/test/Makefile.dune b/test/Makefile.dune new file mode 100644 index 00000000..a95a51e0 --- /dev/null +++ b/test/Makefile.dune @@ -0,0 +1,13 @@ +# +# See test logs in ../_build/default/test/tests.log +# +TEST_DIRS=$(shell find . -type d | grep -v 'TOOLS') +TEST_FILES=$(shell find . -name '*.tla') + +all: + dune runtest -f + +$(TEST_DIRS) $(TEST_FILES): + env TEST_CASE=$@ dune runtest -f + +.PHONY: all $(TEST_DIRS) $(TEST_FILES) diff --git a/test/dune b/test/dune index 0f255254..dff698f2 100644 --- a/test/dune +++ b/test/dune @@ -8,4 +8,4 @@ (action (setenv USE_TLAPM %{exe:../src/tlapm.exe} (setenv USE_LIB ../library - (run "./TOOLS/do_tests" "."))))) + (run "./TOOLS/do_tests" %{env:TEST_CASE=.}))))) From 2422f4e26e29d86b8824c795e179fdfc630deb88 Mon Sep 17 00:00:00 2001 From: Karolis Petrauskas Date: Tue, 6 Jun 2023 13:34:57 +0300 Subject: [PATCH 13/44] Fix the existing build. Signed-off-by: Karolis Petrauskas --- src/.depend | 14 +++++++------- src/Makefile | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/.depend b/src/.depend index 16c52237..c59d7e6e 100644 --- a/src/.depend +++ b/src/.depend @@ -40,9 +40,14 @@ toolbox_msg.cmx: toolbox_msg.mlt \ loc.cmx \ util/ext.cmx \ toolbox_msg.cmi +dune_site_mock/setup_paths.cmo: dune_site_mock/setup_paths.mlt \ + dune_site_mock/setup_paths.cmi +dune_site_mock/setup_paths.cmx: dune_site_mock/setup_paths.mlt \ + dune_site_mock/setup_paths.cmi params.cmo: params.mlt \ version.cmi \ sysconf.cmi \ + dune_site_mock/setup_paths.cmi \ method.cmi \ util/ext.cmi \ config.cmi \ @@ -50,6 +55,7 @@ params.cmo: params.mlt \ params.cmx: params.mlt \ version.cmx \ sysconf.cmx \ + dune_site_mock/setup_paths.cmx \ method.cmx \ util/ext.cmx \ config.cmx \ @@ -1834,10 +1840,6 @@ module.cmx: module.mlt \ module/m_elab.cmx \ module/m_dep.cmx \ module.cmi -dune_site_mock/setup_paths.cmo: dune_site_mock/setup_paths.mlt \ - dune_site_mock/setup_paths.cmi -dune_site_mock/setup_paths.cmx: dune_site_mock/setup_paths.mlt \ - dune_site_mock/setup_paths.cmi tlapm_args.cmo: tlapm_args.mlt \ version.cmi \ params.cmi \ @@ -1859,7 +1861,6 @@ tlapm.cmo: tlapm.mlt \ tlapm_args.cmi \ tla_parser.cmi \ util/timing.cmi \ - dune_site_mock/setup_paths.cmi \ backend/schedule.cmi \ util/property.cmi \ proof.cmi \ @@ -1885,7 +1886,6 @@ tlapm.cmx: tlapm.mlt \ tlapm_args.cmx \ tla_parser.cmx \ util/timing.cmx \ - dune_site_mock/setup_paths.cmx \ backend/schedule.cmx \ util/property.cmx \ proof.cmx \ @@ -1914,6 +1914,7 @@ version.cmi : loc.cmi : toolbox_msg.cmi : \ loc.cmi +dune_site_mock/setup_paths.cmi : params.cmi : \ method.cmi pars/error.cmi : \ @@ -2221,6 +2222,5 @@ module.cmi : \ expr.cmi \ util/deque.cmi \ ctx.cmi -dune_site_mock/setup_paths.cmi : tlapm_args.cmi : tlapm.cmi : diff --git a/src/Makefile b/src/Makefile index 54082f56..136e41d0 100644 --- a/src/Makefile +++ b/src/Makefile @@ -112,6 +112,7 @@ MODULES = \ version \ loc \ toolbox_msg \ + dune_site_mock/setup_paths \ params \ ${PARS_PACK} \ pars \ @@ -139,7 +140,6 @@ MODULES = \ backend \ ${MODULE_PACK} \ module \ - dune_site_mock/setup_paths \ tlapm_args \ tlapm From 1892e1003c884a126481b5c79cbeac1f19a11790 Mon Sep 17 00:00:00 2001 From: Karolis Petrauskas Date: Tue, 6 Jun 2023 13:35:17 +0300 Subject: [PATCH 14/44] Fix a warning. Signed-off-by: Karolis Petrauskas --- src/backend/fpfile.ml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/backend/fpfile.ml b/src/backend/fpfile.ml index 96edfa95..d15243b8 100644 --- a/src/backend/fpfile.ml +++ b/src/backend/fpfile.ml @@ -9,6 +9,16 @@ open Ext +exception FpFileOlderMagicNumber +exception FpFileCorrupted + +let () = + Printexc.register_printer + (function + | FpFileOlderMagicNumber -> Some "fingerprint file with an older magic number" + | FpFileCorrupted -> Some "corrupted fingerprint file" + | _ -> None + ) module V13 = struct @@ -540,8 +550,8 @@ let load_fingerprints_aux file = let ic = open_in_bin file in let magic = Marshal.from_channel ic in if magic = old_magic_number then - failwith "fingerprint file with an older magic number"; - if magic <> magic_number then failwith "corrupted fingerprint file"; + raise(FpFileOlderMagicNumber); + if magic <> magic_number then raise(FpFileCorrupted); let v = Marshal.from_channel ic in if v >= FPunknown () then Errors.fatal "fingerprint file is from a newer version of tlapm"; @@ -602,14 +612,14 @@ let load_fingerprints file = with e1 -> let error_str_1 = (Printexc.to_string e1) in let moved_filename_msg = begin match e1 with - | Failure "fingerprint file with an older magic number" -> + | FpFileOlderMagicNumber -> let renamed_file_name = file ^ ".old" in (* if renaming fails, then the exception is not caught *) Sys.rename file renamed_file_name; Printf.sprintf "so moved fingerprints file by appending `.old` (%s -> %s)" file renamed_file_name - | Failure "corrupted fingerprint file" -> + | FpFileCorrupted -> let renamed_file_name = file ^ ".corrupted" in (* if renaming fails, then the exception is not caught *) Sys.rename file renamed_file_name; From 3c21d96639069aaf404036b85736138ced4ab2e9 Mon Sep 17 00:00:00 2001 From: Karolis Petrauskas Date: Wed, 7 Jun 2023 00:28:54 +0300 Subject: [PATCH 15/44] Use stdlib site for the library TLA files. Signed-off-by: Karolis Petrauskas --- dune-project | 7 ++++++- library/dune | 2 +- src/dune_site_mock/setup_paths.ml | 1 + src/dune_site_mock/setup_paths.mli | 1 + src/params.ml | 7 +++++-- 5 files changed, 14 insertions(+), 4 deletions(-) diff --git a/dune-project b/dune-project index 361a3120..98fb892d 100644 --- a/dune-project +++ b/dune-project @@ -14,5 +14,10 @@ (name tlapm) (synopsis "TLA+ Proof Manager") (description "TLA+ Proof Manager") - (sites (lib backends)) ; will contain all the provers, approx lib/tlapm/backends/. + (sites + (lib backends) ; will contain all the provers, approx lib/tlapm/backends/. + (lib stdlib)) ; TLA files composing the StdLib. (depends ocaml dune)) + +; TODO: https://github.com/ocaml/dune/tree/main/example/with-configure-step.t +; to derive the current os to name the release? \ No newline at end of file diff --git a/library/dune b/library/dune index 7dd2a2df..9b2e33cd 100644 --- a/library/dune +++ b/library/dune @@ -1,3 +1,3 @@ (install - (section lib) + (section (site (tlapm stdlib))) (files (glob_files "*.tla"))) diff --git a/src/dune_site_mock/setup_paths.ml b/src/dune_site_mock/setup_paths.ml index 33418f9d..2d93789a 100644 --- a/src/dune_site_mock/setup_paths.ml +++ b/src/dune_site_mock/setup_paths.ml @@ -5,4 +5,5 @@ Hence this file inicates (by returning empty list) the absense of the dune-site- *) module Sites = struct let backends : string list = [] + let stdlib : string list = [] end diff --git a/src/dune_site_mock/setup_paths.mli b/src/dune_site_mock/setup_paths.mli index e6e7ca13..2ef92535 100644 --- a/src/dune_site_mock/setup_paths.mli +++ b/src/dune_site_mock/setup_paths.mli @@ -1,4 +1,5 @@ module Sites: sig val backends : string list + val stdlib : string list end diff --git a/src/params.ml b/src/params.ml index a265180c..a2a89740 100644 --- a/src/params.ml +++ b/src/params.ml @@ -51,7 +51,7 @@ let noproving = ref false (* Don't send any obligation to the back-ends. *) let printallobs = ref false (* print unnormalized and normalized versions of obligations in toolbox mode *) - +(* The default library path. The relative paths (-I +some) are based on this. *) let library_path = let d = Sys.executable_name in let d = Filename.dirname (Filename.dirname d) in @@ -253,7 +253,10 @@ let set_smt_logic logic = smt_logic := logic let max_threads = ref nprocs -let rev_search_path = ref [library_path] +(* The actual list if paths at which the library TLA files are searched. *) +let rev_search_path = ref (library_path :: Setup_paths.Sites.stdlib) + +(* Additional paths are added to the search list by keeping the base path as the first one. *) let add_search_dir dir = let dir = if dir.[0] = '+' From ca5e8fd0fc1326ee62c015e2967f85e211fbaa81 Mon Sep 17 00:00:00 2001 From: Karolis Petrauskas Date: Wed, 7 Jun 2023 14:17:05 +0300 Subject: [PATCH 16/44] github actions are now passing when rinning them locally. E.g. `gh act --secret GITHUB_TOKEN=.. --reuse` Signed-off-by: Karolis Petrauskas --- .github/workflows/main.yml | 4 ++++ .github/workflows/pr.yml | 4 ++++ .github/workflows/release.yml | 8 ++++++++ 3 files changed, 16 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index de469638..81402a76 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,6 +18,10 @@ jobs: '2', ] steps: + - name: Install deps + run: | + sudo apt-get update + sudo apt-get install --yes time - name: Set up Python uses: actions/setup-python@v2 with: diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 3600e441..9b9ae480 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -22,6 +22,10 @@ jobs: '2', ] steps: + - name: Install deps + run: | + sudo apt-get update + sudo apt-get install --yes time - name: Set up Python uses: actions/setup-python@v2 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1463e9e7..0650458f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,6 +21,10 @@ jobs: name: Create Github Release runs-on: ubuntu-latest steps: + - name: Install deps + run: | + sudo apt-get update + sudo apt-get install --yes time - name: Get current date id: date run: | @@ -67,6 +71,10 @@ jobs: '2', ] steps: + - name: Install deps + run: | + sudo apt-get update + sudo apt-get install --yes time - name: Set up Python uses: actions/setup-python@v2 with: From 6f80041c04671c9afb020df7536c904d1f7e2525 Mon Sep 17 00:00:00 2001 From: Karolis Petrauskas Date: Thu, 8 Jun 2023 11:59:12 +0300 Subject: [PATCH 17/44] Restore execution permissions after dune install. Signed-off-by: Karolis Petrauskas --- .gitignore | 2 ++ Makefile.dune | 31 ++++++++++++++++++++++ deps/Makefile.post-install | 3 +++ deps/dune | 3 +++ deps/isabelle/Makefile | 53 +++++++++++++++++++++++++++----------- deps/isabelle/dune | 10 ++++--- dune-project | 2 +- 7 files changed, 84 insertions(+), 20 deletions(-) create mode 100644 Makefile.dune create mode 100644 deps/Makefile.post-install create mode 100644 deps/dune diff --git a/.gitignore b/.gitignore index 22595cb8..75b5622d 100644 --- a/.gitignore +++ b/.gitignore @@ -11,8 +11,10 @@ .DS_Store /_build/ +/_build_cache/ /.vscode/ /tlapm.opam +/tlaps-*.tar.gz /Makefile /config.log diff --git a/Makefile.dune b/Makefile.dune new file mode 100644 index 00000000..566d29e2 --- /dev/null +++ b/Makefile.dune @@ -0,0 +1,31 @@ +RELEASE_NAME:=tlaps-$(shell git describe --tags)-$(shell uname -m)-$(shell uname -s | tr '[:upper:]' '[:lower:]') + +PREFIX?=$(OPAM_SWITCH_PREFIX) + +all: build + +opam-deps: + # TODO: opam install ./ --deps-only + opam install --yes dune dune-site + +build: + dune build + +check: test + +test: + dune runtest + +install: + dune install --prefix=$(PREFIX) + make -f $(PREFIX)/lib/tlapm/Makefile.post-install -C $(PREFIX)/lib/tlapm/ + +release: + rm -rf $(RELEASE_NAME) $(RELEASE_NAME).tar.gz + dune install --relocatable --prefix $(RELEASE_NAME) + make -C $(RELEASE_NAME)/lib/tlapm -f Makefile.post-install + tar -czf $(RELEASE_NAME).tar.gz $(RELEASE_NAME) + rm -rf $(RELEASE_NAME) + +.PHONY: all build check test install release + diff --git a/deps/Makefile.post-install b/deps/Makefile.post-install new file mode 100644 index 00000000..700a9ebe --- /dev/null +++ b/deps/Makefile.post-install @@ -0,0 +1,3 @@ +all: + chmod +x backends/bin/* + make -C backends -f Isabelle.post-install diff --git a/deps/dune b/deps/dune new file mode 100644 index 00000000..29f053f6 --- /dev/null +++ b/deps/dune @@ -0,0 +1,3 @@ +(install + (section lib) + (files Makefile.post-install)) diff --git a/deps/isabelle/Makefile b/deps/isabelle/Makefile index 3e866514..4c0e500e 100644 --- a/deps/isabelle/Makefile +++ b/deps/isabelle/Makefile @@ -5,28 +5,51 @@ ISABELLE_DIR:=Isabelle ISABELLE_EXE:=$(shell pwd)/$(ISABELLE_DIR)/bin/isabelle ISABELLE_OUT:=$(shell pwd)/$(ISABELLE_DIR)/heaps +# Some defaults, for the case if makefile is called not by the dune build system. +INSIDE_DUNE?=tmp +DUNE_SOURCEROOT?=../../ +CACHE_DIR:=$(INSIDE_DUNE)/../../_build_cache + + all: $(ISABELLE_DIR) -$(ISABELLE_TGZ): - wget -q $(ISABELLE_URL) +$(CACHE_DIR)/$(ISABELLE_TGZ): + mkdir -p $(CACHE_DIR) + cd $(CACHE_DIR) && wget -q $(ISABELLE_URL) + +$(ISABELLE_TGZ): $(CACHE_DIR)/$(ISABELLE_TGZ) + rm -f $@ + ln -s $< $@ -.PRECIOUS: $(ISABELLE_DIR).sexp -$(ISABELLE_DIR).sexp: $(ISABELLE_TGZ) - rm -rf $(ISABELLE_DIR) $(ISABELLE_DIR).sexp +.PRECIOUS: $(ISABELLE_DIR) +$(ISABELLE_DIR): $(ISABELLE_TGZ) + rm -rf $(ISABELLE_DIR) tar -xzf $< mv $(ISABELLE_VSN) $(ISABELLE_DIR) cd $(ISABELLE_DIR) && rm -rf contrib/ProofGeneral* doc heaps/*/HOL lib/{classes,fonts,logo} - cd $(ISABELLE_DIR) && echo "ISABELLE_OUTPUT=$(ISABELLE_OUT)" >> etc/settings + cd $(ISABELLE_DIR) && cp etc/settings etc/settings.orig && echo "ISABELLE_OUTPUT=$(ISABELLE_OUT)" >> etc/settings cd $(ISABELLE_DIR) && cp -r $(DUNE_SOURCEROOT)/isabelle src/TLA+ cd $(ISABELLE_DIR)/src/TLA+ && $(ISABELLE_EXE) usedir -b Pure TLA+ - # ... - # TODO: Workaround BEGIN, until https://github.com/ocaml/dune/issues/7831 is resolved. - # Here we remove symlinks to directories, because dune install fails on them for now. - cd $(ISABELLE_DIR) && rm ./contrib/jre1.6.0_27_x86-linux/jre1.6.0_27/man/ja - cd $(ISABELLE_DIR) && rm ./contrib/polyml-5.4.0/src - cd $(ISABELLE_DIR) && rm ./contrib/polyml && mv ./contrib/polyml-5.4.0 ./contrib/polyml - # TODO: Workaround END - # - (echo "(" && (find $(ISABELLE_DIR) -type f) && echo ")") > $(ISABELLE_DIR).sexp + cd $(ISABELLE_DIR) && rm etc/settings && mv etc/settings.orig etc/settings + +.PRECIOUS: $(ISABELLE_DIR).tar.gz +$(ISABELLE_DIR).tar.gz: $(ISABELLE_DIR) + tar -czf $@ $< + +# TODO: This is is a workaround to eliminate symlinks to directories +# until https://github.com/ocaml/dune/issues/7831 is resolved. +.PRECIOUS: $(ISABELLE_DIR).no-links +$(ISABELLE_DIR).no-links: $(ISABELLE_DIR) + rm -rf $@ + cd $< && rm ./contrib/jre1.6.0_27_x86-linux/jre1.6.0_27/man/ja + cd $< && rm ./contrib/polyml-5.4.0/src + cd $< && rm ./contrib/polyml && mv ./contrib/polyml-5.4.0 ./contrib/polyml + touch $@ + +# TODO: This is a workaround, because the dune install removes all the executable +# flags (or sets on all the files). Here we generate a script to restore the flags. +Isabelle.post-install: $(ISABELLE_DIR).no-links + echo "FILES=$(shell find $(ISABELLE_DIR) -type f -executable)" > $@ + echo "all:\n\t chmod +x \$$(FILES)" >> $@ .PHONY: all diff --git a/deps/isabelle/dune b/deps/isabelle/dune index d58ab2ad..6a4eb0c5 100644 --- a/deps/isabelle/dune +++ b/deps/isabelle/dune @@ -3,11 +3,13 @@ ; The generated heaps (Pure and TLA+) are in Isabelle/heaps/polyml-*/. (rule (deps "Makefile") - (targets (dir "Isabelle") "Isabelle.sexp") - (action (run "make" "-C" "." "Isabelle.sexp"))) + (targets (dir Isabelle) "Isabelle.no-links" "Isabelle.post-install") + (action (run "make" "-C" "." "Isabelle.no-links" "Isabelle.post-install"))) -(data_only_dirs Isabelle) +(install + (section (site (tlapm backends))) + (dirs Isabelle)) (install (section (site (tlapm backends))) - (dirs "Isabelle")) + (files ("Isabelle.post-install" as "Isabelle.post-install"))) diff --git a/dune-project b/dune-project index 98fb892d..8816b1e2 100644 --- a/dune-project +++ b/dune-project @@ -20,4 +20,4 @@ (depends ocaml dune)) ; TODO: https://github.com/ocaml/dune/tree/main/example/with-configure-step.t -; to derive the current os to name the release? \ No newline at end of file +; to derive the current os to name the release? From e14db51fa57a0c7dffdf72c013ff53da57ff3000 Mon Sep 17 00:00:00 2001 From: Karolis Petrauskas Date: Thu, 8 Jun 2023 17:25:03 +0300 Subject: [PATCH 18/44] Attempt to make 'opam install .' work. Signed-off-by: Karolis Petrauskas --- Makefile.dune | 5 ++++- deps/ls4/Makefile | 2 +- deps/z3/Makefile | 2 +- deps/zenon/Makefile | 5 +++-- dune | 1 + dune-project | 20 +++++++++++++++++++- src/dune | 8 ++++---- translate/dune | 8 ++++---- zenon/regression/examples/data/TLAPS.tla | 2 +- 9 files changed, 38 insertions(+), 15 deletions(-) create mode 100644 dune diff --git a/Makefile.dune b/Makefile.dune index 566d29e2..5dddc630 100644 --- a/Makefile.dune +++ b/Makefile.dune @@ -10,6 +10,9 @@ opam-deps: build: dune build + if [ -z "`grep 'Makefile.post-install' tlapm.opam`" ] ; then \ + sed -i '/"dune" "install"/a \ \ ["%{make}%" "-C" "%{lib}%/tlapm" "-f" "Makefile.post-install"]' tlapm.opam; \ + fi check: test @@ -18,7 +21,7 @@ test: install: dune install --prefix=$(PREFIX) - make -f $(PREFIX)/lib/tlapm/Makefile.post-install -C $(PREFIX)/lib/tlapm/ + make -C $(PREFIX)/lib/tlapm/ -f Makefile.post-install release: rm -rf $(RELEASE_NAME) $(RELEASE_NAME).tar.gz diff --git a/deps/ls4/Makefile b/deps/ls4/Makefile index a9232c91..9bb1d66a 100644 --- a/deps/ls4/Makefile +++ b/deps/ls4/Makefile @@ -16,7 +16,7 @@ $(LS4_BASE_NAME): v$(LS4_VERS).zip make -C $(LS4_BASE_NAME)/core ls4: $(LS4_BASE_NAME) - cp $ Date: Thu, 8 Jun 2023 18:36:23 +0300 Subject: [PATCH 19/44] Make target to install opam deps. Signed-off-by: Karolis Petrauskas --- .gitignore | 1 - Makefile.dune | 3 +-- dune-project | 2 +- tlapm.opam | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 52 insertions(+), 4 deletions(-) create mode 100644 tlapm.opam diff --git a/.gitignore b/.gitignore index 75b5622d..ce05914c 100644 --- a/.gitignore +++ b/.gitignore @@ -13,7 +13,6 @@ /_build/ /_build_cache/ /.vscode/ -/tlapm.opam /tlaps-*.tar.gz /Makefile diff --git a/Makefile.dune b/Makefile.dune index 5dddc630..48965471 100644 --- a/Makefile.dune +++ b/Makefile.dune @@ -5,8 +5,7 @@ PREFIX?=$(OPAM_SWITCH_PREFIX) all: build opam-deps: - # TODO: opam install ./ --deps-only - opam install --yes dune dune-site + opam install ./ --deps-only build: dune build diff --git a/dune-project b/dune-project index d0b83ba7..86f47e74 100644 --- a/dune-project +++ b/dune-project @@ -35,7 +35,7 @@ (sites (lib backends) ; will contain all the provers, approx lib/tlapm/backends/. (lib stdlib)) ; TLA files composing the StdLib. - (depends ocaml dune dune-site)) + (depends ocaml dune-site)) ; TODO: https://github.com/ocaml/dune/tree/main/example/with-configure-step.t ; to derive the current os to name the release? diff --git a/tlapm.opam b/tlapm.opam new file mode 100644 index 00000000..75f5fde1 --- /dev/null +++ b/tlapm.opam @@ -0,0 +1,50 @@ +# This file is generated by dune, edit dune-project instead +opam-version: "2.0" +synopsis: "TLA+ Proof Manager" +description: "TLA+ Proof Manager" +maintainer: [ + "Kaustuv Chaudhuri" + "Denis Cousineau" + "Damien Doligez" + "Leslie Lamport" + "Tomer Libal" + "Stephan Merz" + "Jean-Baptiste Tristan" + "Hernan Vanzetto" +] +authors: [ + "Kaustuv Chaudhuri" + "Denis Cousineau" + "Damien Doligez" + "Leslie Lamport" + "Tomer Libal" + "Stephan Merz" + "Jean-Baptiste Tristan" + "Hernan Vanzetto" +] +homepage: "https://github.com/tlaplus/tlapm" +bug-reports: "https://github.com/tlaplus/tlapm/issues" +depends: [ + "dune" {>= "3.7"} + "ocaml" + "dune-site" + "odoc" {with-doc} +] +build: [ + ["dune" "subst"] {dev} + [ + "dune" + "build" + "-p" + name + "-j" + jobs + "--promote-install-files=false" + "@install" + "@runtest" {with-test} + "@doc" {with-doc} + ] + ["dune" "install" "-p" name "--create-install-files" name] + ["%{make}%" "-C" "%{lib}%/tlapm" "-f" "Makefile.post-install"] +] +dev-repo: "git+https://github.com/tlaplus/tlapm.git" From e3128d6e703e95ec599f481179bfd97306019c9c Mon Sep 17 00:00:00 2001 From: Karolis Petrauskas Date: Thu, 8 Jun 2023 18:46:46 +0300 Subject: [PATCH 20/44] Cleanup. Signed-off-by: Karolis Petrauskas --- dune-project | 3 --- 1 file changed, 3 deletions(-) diff --git a/dune-project b/dune-project index 86f47e74..aca5f45c 100644 --- a/dune-project +++ b/dune-project @@ -36,6 +36,3 @@ (lib backends) ; will contain all the provers, approx lib/tlapm/backends/. (lib stdlib)) ; TLA files composing the StdLib. (depends ocaml dune-site)) - -; TODO: https://github.com/ocaml/dune/tree/main/example/with-configure-step.t -; to derive the current os to name the release? From 0eb54fb45380cdbded33a6abec256ec24ac6d2d8 Mon Sep 17 00:00:00 2001 From: Karolis Petrauskas Date: Wed, 14 Jun 2023 23:14:51 +0300 Subject: [PATCH 21/44] Update src/params.ml Co-authored-by: Damien Doligez Signed-off-by: Karolis Petrauskas --- src/params.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/params.ml b/src/params.ml index a2a89740..f4980bb1 100644 --- a/src/params.ml +++ b/src/params.ml @@ -253,7 +253,7 @@ let set_smt_logic logic = smt_logic := logic let max_threads = ref nprocs -(* The actual list if paths at which the library TLA files are searched. *) +(* The actual list of paths at which the library TLA files are searched. *) let rev_search_path = ref (library_path :: Setup_paths.Sites.stdlib) (* Additional paths are added to the search list by keeping the base path as the first one. *) From 94e1392713d00eeb011a3e282ca88f41b4c9ae7a Mon Sep 17 00:00:00 2001 From: Karolis Petrauskas Date: Wed, 14 Jun 2023 23:09:19 +0300 Subject: [PATCH 22/44] The old build system removed. Signed-off-by: Karolis Petrauskas --- .gitignore | 24 +- Makefile.dune => Makefile | 5 +- configure | 3366 -------------------- src/.depend | 2226 ------------- src/.ocamldebug | 1 - src/Makefile | 240 -- src/backend/Makefile | 5 - src/config.mli | 4 - src/config.mlt | 4 - src/dune | 2 - src/dune_site_mock/setup_paths.ml | 9 - src/dune_site_mock/setup_paths.mli | 5 - src/dune_site_mock/setup_paths.mlt | 3 - src/expr/Makefile | 5 - src/module/Makefile | 5 - src/params.ml | 2 +- src/pars/Makefile | 5 - src/proof/Makefile | 5 - src/smt/Makefile | 5 - src/tlapm.ml | 2 +- src/util/Makefile | 5 - test/Makefile | 52 +- test/Makefile.dune | 13 - tools/Makefile.in | 224 -- tools/aclocal.m4 | 174 - tools/config.guess | 1533 --------- tools/config.ml.in | 8 - tools/config.sub | 1693 ---------- tools/configure.ac.in | 88 - tools/installer/install-ocaml-3.11.1.sh | 54 - tools/installer/install-ocaml-3.11.2.sh | 54 - tools/installer/tlaps-release.sh.in | 650 ---- tools/installer/tlaps-source-release.sh.in | 43 - tools/load.ml.in | 18 - 34 files changed, 16 insertions(+), 10516 deletions(-) rename Makefile.dune => Makefile (91%) delete mode 100755 configure delete mode 100644 src/.depend delete mode 100644 src/.ocamldebug delete mode 100644 src/Makefile delete mode 100644 src/backend/Makefile delete mode 100644 src/config.mli delete mode 100644 src/config.mlt delete mode 100644 src/dune_site_mock/setup_paths.ml delete mode 100644 src/dune_site_mock/setup_paths.mli delete mode 100644 src/dune_site_mock/setup_paths.mlt delete mode 100644 src/expr/Makefile delete mode 100644 src/module/Makefile delete mode 100644 src/pars/Makefile delete mode 100644 src/proof/Makefile delete mode 100644 src/smt/Makefile delete mode 100644 src/util/Makefile delete mode 100644 test/Makefile.dune delete mode 100644 tools/Makefile.in delete mode 100644 tools/aclocal.m4 delete mode 100755 tools/config.guess delete mode 100644 tools/config.ml.in delete mode 100755 tools/config.sub delete mode 100644 tools/configure.ac.in delete mode 100755 tools/installer/install-ocaml-3.11.1.sh delete mode 100644 tools/installer/install-ocaml-3.11.2.sh delete mode 100644 tools/installer/tlaps-release.sh.in delete mode 100644 tools/installer/tlaps-source-release.sh.in delete mode 100644 tools/load.ml.in diff --git a/.gitignore b/.gitignore index ce05914c..52e72259 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ *.err *.out *.toolbox +*.tlacache *.tlaps *.log .DS_Store @@ -15,28 +16,5 @@ /.vscode/ /tlaps-*.tar.gz -/Makefile -/config.log -/config.status -/src/alexer.ml -/src/config.ml -/src/load.ml -/src/tlapm.native -# directories created when building the installer -/tlaps-*-x86_64-linux-gnu/ -/tlaps-*-i386-darwin/ -# generated installer files -/tools/installer/tlaps-*-x86_64-linux-gnu-inst.bin -/tools/installer/tlaps-*-i386-darwin-inst.bin -# generated release scripts -/tools/installer/tlaps-release.sh -/tools/installer/tlaps-source-release.sh -# `tlapm` binary -tlapm -# installation for testing, -# created by the installer -/test/bin/ -/test/lib/ - __pycache__/ *.pyc diff --git a/Makefile.dune b/Makefile similarity index 91% rename from Makefile.dune rename to Makefile index 48965471..d6c1e50f 100644 --- a/Makefile.dune +++ b/Makefile @@ -29,5 +29,8 @@ release: tar -czf $(RELEASE_NAME).tar.gz $(RELEASE_NAME) rm -rf $(RELEASE_NAME) -.PHONY: all build check test install release +clean: + dune clean + +.PHONY: all build check test install release clean diff --git a/configure b/configure deleted file mode 100755 index aeec13c3..00000000 --- a/configure +++ /dev/null @@ -1,3366 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for TLA+ Proof System 1.5.0. -# -# Report bugs to . -# -# -# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. -# -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -# Use a proper internal environment variable to ensure we don't fall - # into an infinite loop, continuously re-executing ourselves. - if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then - _as_can_reexec=no; export _as_can_reexec; - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -as_fn_exit 255 - fi - # We don't want this to propagate to other subprocesses. - { _as_can_reexec=; unset _as_can_reexec;} -if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi -" - as_required="as_fn_return () { (exit \$1); } -as_fn_success () { as_fn_return 0; } -as_fn_failure () { as_fn_return 1; } -as_fn_ret_success () { return 0; } -as_fn_ret_failure () { return 1; } - -exitcode=0 -as_fn_success || { exitcode=1; echo as_fn_success failed.; } -as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } -as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } -as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : - -else - exitcode=1; echo positional parameters were not saved. -fi -test x\$exitcode = x0 || exit 1 -test -x / || exit 1" - as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO - as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO - eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1" - if (eval "$as_required") 2>/dev/null; then : - as_have_required=yes -else - as_have_required=no -fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : - -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - as_found=: - case $as_dir in #( - /*) - for as_base in sh bash ksh sh5; do - # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : - CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : - break 2 -fi -fi - done;; - esac - as_found=false -done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } -IFS=$as_save_IFS - - - if test "x$CONFIG_SHELL" != x; then : - export CONFIG_SHELL - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -exit 255 -fi - - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." - else - $as_echo "$0: Please tell bug-autoconf@gnu.org and -$0: tlaps-devel@lists.gforge.inria.fr about your system, -$0: including any error possibly output before this -$0: message. Then install a modern shell, or manually run -$0: the script under such a shell if you do have one." - fi - exit 1 -fi -fi -fi -SHELL=${CONFIG_SHELL-/bin/sh} -export SHELL -# Unset more variables known to interfere with behavior of common tools. -CLICOLOR_FORCE= GREP_OPTIONS= -unset CLICOLOR_FORCE GREP_OPTIONS - -## --------------------- ## -## M4sh Shell Functions. ## -## --------------------- ## -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p - -# as_fn_executable_p FILE -# ----------------------- -# Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} # as_fn_executable_p -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - - - as_lineno_1=$LINENO as_lineno_1a=$LINENO - as_lineno_2=$LINENO as_lineno_2a=$LINENO - eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && - test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { - # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - - # If we had to re-execute with $CONFIG_SHELL, we're ensured to have - # already done that, so ensure we don't try to do so again and fall - # in an infinite loop. This has already happened in practice. - _as_can_reexec=no; export _as_can_reexec - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -test -n "$DJDIR" || exec 7<&0 &1 - -# Name of the host. -# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIBOBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= - -# Identity of this package. -PACKAGE_NAME='TLA+ Proof System' -PACKAGE_TARNAME='tlaps' -PACKAGE_VERSION='1.5.0' -PACKAGE_STRING='TLA+ Proof System 1.5.0' -PACKAGE_BUGREPORT='tlaps-devel@lists.gforge.inria.fr' -PACKAGE_URL='' - -ac_subst_vars='LTLIBOBJS -LIBOBJS -INSTALL_DATA -INSTALL_SCRIPT -INSTALL_PROGRAM -AWK -OCAMLCVER -OCAMLC -WGET -TAR -enable_debugging -enable_profiling -EXE -host_os -host_vendor -host_cpu -host -build_os -build_vendor -build_cpu -build -VERSION -RELEASEVERSION -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_URL -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME -PATH_SEPARATOR -SHELL' -ac_subst_files='' -ac_user_opts=' -enable_option_checking -enable_profiling -enable_debugging -' - ac_precious_vars='build_alias -host_alias -target_alias' - - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -includedir='${prefix}/include' -oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' - -ac_prev= -ac_dashdash= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option - ac_prev= - continue - fi - - case $ac_option in - *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *=) ac_optarg= ;; - *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) - datadir=$ac_optarg ;; - - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; - - -enable-* | --enable-*) - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=\$ac_optarg ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=\$ac_optarg ;; - - -without-* | --without-*) - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=no ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) as_fn_error $? "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information" - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - case $ac_envvar in #( - '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; - esac - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error $? "missing argument to $ac_option" -fi - -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac -fi - -# Check all directory arguments for consistency. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir -do - eval ac_val=\$$ac_var - # Remove trailing slashes. - case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; - esac - # Be sure to have absolute directory names. - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error $? "working directory cannot be determined" -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error $? "pwd does not report name of working directory" - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures TLA+ Proof System 1.5.0 to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking ...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/tlaps] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF - -System types: - --build=BUILD configure for building on BUILD [guessed] - --host=HOST cross-compile to build programs to run on HOST [BUILD] -_ACEOF -fi - -if test -n "$ac_init_help"; then - case $ac_init_help in - short | recursive ) echo "Configuration of TLA+ Proof System 1.5.0:";; - esac - cat <<\_ACEOF - -Optional Features: - --disable-option-checking ignore unrecognized --enable/--with options - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-profiling compile with profiling [disabled] - --enable-debugging compile with debugging symbols [disabled] - -Report bugs to . -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -TLA+ Proof System configure 1.5.0 -generated by GNU Autoconf 2.69 - -Copyright (C) 2012 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit -fi - -## ------------------------ ## -## Autoconf initialization. ## -## ------------------------ ## -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by TLA+ Proof System $as_me 1.5.0, which was -generated by GNU Autoconf 2.69. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" - done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; - 2) - as_fn_append ac_configure_args1 " '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - as_fn_append ac_configure_args " '$ac_arg'" - ;; - esac - done -done -{ ac_configure_args0=; unset ac_configure_args0;} -{ ac_configure_args1=; unset ac_configure_args1;} - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - $as_echo "## ---------------- ## -## Cache variables. ## -## ---------------- ##" - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo - - $as_echo "## ----------------- ## -## Output variables. ## -## ----------------- ##" - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## -## File substitutions. ## -## ------------------- ##" - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then - $as_echo "## ----------- ## -## confdefs.h. ## -## ----------- ##" - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -$as_echo "/* confdefs.h */" > confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE -if test -n "$CONFIG_SITE"; then - # We do not want a PATH search for config.site. - case $CONFIG_SITE in #(( - -*) ac_site_file1=./$CONFIG_SITE;; - */*) ac_site_file1=$CONFIG_SITE;; - *) ac_site_file1=./$CONFIG_SITE;; - esac -elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site -else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site -fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" -do - test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" \ - || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5; } - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special files - # actually), so we avoid doing that. DJGPP emulates it as a regular file. - if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 -fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - - -ac_aux_dir= -for ac_dir in ${srcdir}/tools "$srcdir"/${srcdir}/tools; do - if test -f "$ac_dir/install-sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f "$ac_dir/install.sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - as_fn_error $? "cannot find install-sh, install.sh, or shtool in ${srcdir}/tools \"$srcdir\"/${srcdir}/tools" "$LINENO" 5 -fi - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - - - -VERSION='1.5.0' -RELEASEVERSION='1.4.4' - - - -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -if ${ac_cv_build+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` -test "x$ac_build_alias" = x && - as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } -if ${ac_cv_host+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build -else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - -case $host_os in - *mingw* ) - EXE=".exe" ;; - *cygwin* ) - EXE=".exe";; - * ) - EXE="" ;; -esac -case $host_os in - *darwin* ) - host_os=darwin ;; -esac - - - -# Check whether --enable-profiling was given. -if test "${enable_profiling+set}" = set; then : - enableval=$enable_profiling; -else - enable_profiling=no -fi - - - -# Check whether --enable-debugging was given. -if test "${enable_debugging+set}" = set; then : - enableval=$enable_debugging; -else - enable_debugging=no -fi - - - - -# Extract the first word of "tar gtar", so it can be a program name with args. -set dummy tar gtar; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_TAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $TAR in - [\\/]* | ?:[\\/]*) - ac_cv_path_TAR="$TAR" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_path_TAR" && ac_cv_path_TAR="no" - ;; -esac -fi -TAR=$ac_cv_path_TAR -if test -n "$TAR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5 -$as_echo "$TAR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -if test "x$TAR" = xno; then : - as_fn_error $? "Cannot find tar" "$LINENO" 5 -fi - -for ac_prog in wget curl -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_WGET+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $WGET in - [\\/]* | ?:[\\/]*) - ac_cv_path_WGET="$WGET" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_WGET="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -WGET=$ac_cv_path_WGET -if test -n "$WGET"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WGET" >&5 -$as_echo "$WGET" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$WGET" && break -done -test -n "$WGET" || WGET="no" - -if test "x$WGET" = xno; then : - as_fn_error $? "Cannot find a URL fetching program (curl or wget)" "$LINENO" 5 -fi -case "$WGET" in - *curl* ) - as_fn_append WGET " -L -O" ;; - *wget* ) - as_fn_append WGET " -q" ;; -esac - -for ac_prog in ocamlc.opt -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_OCAMLC+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $OCAMLC in - [\\/]* | ?:[\\/]*) - ac_cv_path_OCAMLC="$OCAMLC" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in no -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_OCAMLC="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -OCAMLC=$ac_cv_path_OCAMLC -if test -n "$OCAMLC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLC" >&5 -$as_echo "$OCAMLC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$OCAMLC" && break -done -test -n "$OCAMLC" || OCAMLC="ocamlc" - -if test "x$OCAMLC" = xno; then : - as_fn_error $? "Cannot find ocamlc" "$LINENO" 5 -fi -OCAMLCVER="`$OCAMLC -version`" - -for ac_prog in gawk mawk nawk awk -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AWK+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AWK="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -$as_echo "$AWK" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AWK" && break -done - - - - - # Used to indicate true or false condition - ax_compare_version=false - - # Convert the two version strings to be compared into a format that - # allows a simple string comparison. The end result is that a version - # string of the form 1.12.5-r617 will be converted to the form - # 0001001200050617. In other words, each number is zero padded to four - # digits, and non digits are removed. - - ax_compare_version_A=`echo "$OCAMLCVER" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ - -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ - -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ - -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ - -e 's/[^0-9]//g'` - - - ax_compare_version_B=`echo "3.12.0" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ - -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ - -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ - -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ - -e 's/[^0-9]//g'` - - - ax_compare_version=`echo "x$ax_compare_version_A -x$ax_compare_version_B" | sed 's/^ *//' | sort -r | sed "s/x${ax_compare_version_A}/true/;s/x${ax_compare_version_B}/false/;1q"` - - - - if test "$ax_compare_version" = "true" ; then - : - else as_fn_error $? "OCaml version >= 3.12.0 required" "$LINENO" 5 - - fi - - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -# Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } -if test -z "$INSTALL"; then -if ${ac_cv_path_install+:} false; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in #(( - ./ | .// | /[cC]/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - fi - done - done - ;; -esac - - done -IFS=$as_save_IFS - -rm -rf conftest.one conftest.two conftest.dir - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - - -ac_config_files="$ac_config_files Makefile:tools/Makefile.in" - -ac_config_files="$ac_config_files src/config.ml:tools/config.ml.in" - -ac_config_files="$ac_config_files src/load.ml:tools/load.ml.in" - -ac_config_files="$ac_config_files tools/installer/tlaps-release.sh:tools/installer/tlaps-release.sh.in" - -ac_config_files="$ac_config_files tools/installer/tlaps-source-release.sh:tools/installer/tlaps-source-release.sh.in" - - -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \. - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - if test "x$cache_file" != "x/dev/null"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} - if test ! -f "$cache_file" || test -h "$cache_file"; then - cat confcache >"$cache_file" - else - case $cache_file in #( - */* | ?:*) - mv -f confcache "$cache_file"$$ && - mv -f "$cache_file"$$ "$cache_file" ;; #( - *) - mv -f confcache "$cache_file" ;; - esac - fi - fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -# Transform confdefs.h into DEFS. -# Protect against shell expansion while executing Makefile rules. -# Protect against Makefile macro expansion. -# -# If the first sed substitution is executed (which looks for macros that -# take arguments), then branch to the quote section. Otherwise, -# look for a macro that doesn't take arguments. -ac_script=' -:mline -/\\$/{ - N - s,\\\n,, - b mline -} -t clear -:clear -s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g -t quote -s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g -t quote -b any -:quote -s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g -s/\[/\\&/g -s/\]/\\&/g -s/\$/$$/g -H -:any -${ - g - s/^\n// - s/\n/ /g - p -} -' -DEFS=`sed -n "$ac_script" confdefs.h` - - -ac_libobjs= -ac_ltlibobjs= -U= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" - as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - - -: "${CONFIG_STATUS=./config.status}" -ac_write_fail=0 -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -as_write_fail=0 -cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false - -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - - -# as_fn_executable_p FILE -# ----------------------- -# Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} # as_fn_executable_p -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -_ASEOF -test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# Save the log message, to keep $0 and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by TLA+ Proof System $as_me 1.5.0, which was -generated by GNU Autoconf 2.69. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; -esac - - - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# Files that config.status was made for. -config_files="$ac_config_files" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions -from templates according to the current configuration. Unless the files -and actions are specified as TAGs, all are instantiated by default. - -Usage: $0 [OPTION]... [TAG]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - --config print configuration, then exit - -q, --quiet, --silent - do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - -Configuration files: -$config_files - -Report bugs to ." - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" -ac_cs_version="\\ -TLA+ Proof System config.status 1.5.0 -configured by $0, generated by GNU Autoconf 2.69, - with options \\"\$ac_cs_config\\" - -Copyright (C) 2012 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -INSTALL='$INSTALL' -AWK='$AWK' -test -n "\$AWK" || AWK=awk -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=?*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - --*=) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg= - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; - --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - '') as_fn_error $? "missing file argument" ;; - esac - as_fn_append CONFIG_FILES " '$ac_optarg'" - ac_need_defaults=false;; - --he | --h | --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) as_fn_error $? "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; - - *) as_fn_append ac_config_targets " $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -if \$ac_cs_recheck; then - set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion - shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' - export CONFIG_SHELL - exec "\$@" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - $as_echo "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile:tools/Makefile.in" ;; - "src/config.ml") CONFIG_FILES="$CONFIG_FILES src/config.ml:tools/config.ml.in" ;; - "src/load.ml") CONFIG_FILES="$CONFIG_FILES src/load.ml:tools/load.ml.in" ;; - "tools/installer/tlaps-release.sh") CONFIG_FILES="$CONFIG_FILES tools/installer/tlaps-release.sh:tools/installer/tlaps-release.sh.in" ;; - "tools/installer/tlaps-source-release.sh") CONFIG_FILES="$CONFIG_FILES tools/installer/tlaps-source-release.sh:tools/installer/tlaps-source-release.sh.in" ;; - - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= ac_tmp= - trap 'exit_status=$? - : "${ac_tmp:=$tmp}" - { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status -' 0 - trap 'as_fn_exit 1' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 -ac_tmp=$tmp - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=`echo X | tr X '\015'` -# On cygwin, bash can eat \r inside `` if the user requested igncr. -# But we know of no other shell where ac_cr would be empty at this -# point, so we can use a bashism as a fallback. -if test "x$ac_cr" = x; then - eval ac_cr=\$\'\\r\' -fi -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$ac_tmp/subs1.awk" && -_ACEOF - - -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done -rm -f conf$$subs.sh - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\)..*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\)..*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' >$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} - -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ - || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 -_ACEOF - -# VPATH may cause trouble with some makes, so we remove sole $(srcdir), -# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ -h -s/// -s/^/:/ -s/[ ]*$/:/ -s/:\$(srcdir):/:/g -s/:\${srcdir}:/:/g -s/:@srcdir@:/:/g -s/^:*// -s/:*$// -x -s/\(=[ ]*\).*/\1/ -G -s/\n// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -fi # test -n "$CONFIG_FILES" - - -eval set X " :F $CONFIG_FILES " -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$ac_tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - as_fn_append ac_file_inputs " '$ac_f'" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} - fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$ac_tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; - esac -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_sed_extra="$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -s&@INSTALL@&$ac_INSTALL&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ - >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ - "$ac_tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&2;} - - rm -f "$ac_tmp/stdin" - case $ac_file in - -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; - *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; - esac \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - ;; - - - - esac - -done # for ac_tag - - -as_fn_exit 0 -_ACEOF -ac_clean_files=$ac_clean_files_save - -test $ac_write_fail = 0 || - as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit 1 -fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} -fi - - -chmod +x tools/installer/tlaps-release.sh -chmod +x tools/installer/tlaps-source-release.sh - -if test "$silent" != yes; then : - cat <.depend - for i in ${ML} ${MLI}; do \ - ocamldep -I `dirname $$i` ${INC} $$i \ - | sed -e 's/^\([^.]*\).\(cm[ox]\) *:/\1.\2: \1.mlt/' >>.depend; \ - done -include .depend diff --git a/src/backend/Makefile b/src/backend/Makefile deleted file mode 100644 index 98a5f545..00000000 --- a/src/backend/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -.PHONY: default -default: all - -%: - cd ../.. && ${MAKE} SILENT=yes $@ diff --git a/src/config.mli b/src/config.mli deleted file mode 100644 index bad43d39..00000000 --- a/src/config.mli +++ /dev/null @@ -1,4 +0,0 @@ -(* Copyright (C) 2011 INRIA and Microsoft Corporation *) -val ocaml_version: string -val debug: bool -val exe: string diff --git a/src/config.mlt b/src/config.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/config.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/dune b/src/dune index cb8ecf90..058769b5 100644 --- a/src/dune +++ b/src/dune @@ -15,7 +15,5 @@ (module setup_paths) (sites tlapm)) -(dirs (:standard \ dune_site_mock)) ; To avoid including the mocked Setup_paths module. - (include_subdirs unqualified) diff --git a/src/dune_site_mock/setup_paths.ml b/src/dune_site_mock/setup_paths.ml deleted file mode 100644 index 2d93789a..00000000 --- a/src/dune_site_mock/setup_paths.ml +++ /dev/null @@ -1,9 +0,0 @@ -(* -This file is used as a mock for the Setup_paths module generated by dune-site during the dune-based build. -In the make-based setup we will retain the approach to find the backend proovers via the PATH environment variable. -Hence this file inicates (by returning empty list) the absense of the dune-site-based paths, thus a fallback to PATH. -*) -module Sites = struct - let backends : string list = [] - let stdlib : string list = [] -end diff --git a/src/dune_site_mock/setup_paths.mli b/src/dune_site_mock/setup_paths.mli deleted file mode 100644 index 2ef92535..00000000 --- a/src/dune_site_mock/setup_paths.mli +++ /dev/null @@ -1,5 +0,0 @@ - -module Sites: sig - val backends : string list - val stdlib : string list -end diff --git a/src/dune_site_mock/setup_paths.mlt b/src/dune_site_mock/setup_paths.mlt deleted file mode 100644 index 4de8fdf7..00000000 --- a/src/dune_site_mock/setup_paths.mlt +++ /dev/null @@ -1,3 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) diff --git a/src/expr/Makefile b/src/expr/Makefile deleted file mode 100644 index 98a5f545..00000000 --- a/src/expr/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -.PHONY: default -default: all - -%: - cd ../.. && ${MAKE} SILENT=yes $@ diff --git a/src/module/Makefile b/src/module/Makefile deleted file mode 100644 index 98a5f545..00000000 --- a/src/module/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -.PHONY: default -default: all - -%: - cd ../.. && ${MAKE} SILENT=yes $@ diff --git a/src/params.ml b/src/params.ml index f4980bb1..257543ec 100644 --- a/src/params.ml +++ b/src/params.ml @@ -429,7 +429,7 @@ let external_tool_config force (name, tool) = let configuration toolbox force = let lines = [ "version == \"" ^ rawversion () ^ "\"" - ; "built_with == \"OCaml " ^ Config.ocaml_version ^ "\"" + ; "built_with == \"OCaml " ^ Sys.ocaml_version ^ "\"" ; "tlapm_executable == \"" ^ Sys.executable_name ^ "\"" ; "max_threads == " ^ string_of_int !max_threads ; "library_path == \"" ^ String.escaped library_path ^ "\"" ] diff --git a/src/pars/Makefile b/src/pars/Makefile deleted file mode 100644 index 98a5f545..00000000 --- a/src/pars/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -.PHONY: default -default: all - -%: - cd ../.. && ${MAKE} SILENT=yes $@ diff --git a/src/proof/Makefile b/src/proof/Makefile deleted file mode 100644 index 98a5f545..00000000 --- a/src/proof/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -.PHONY: default -default: all - -%: - cd ../.. && ${MAKE} SILENT=yes $@ diff --git a/src/smt/Makefile b/src/smt/Makefile deleted file mode 100644 index 98a5f545..00000000 --- a/src/smt/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -.PHONY: default -default: all - -%: - cd ../.. && ${MAKE} SILENT=yes $@ diff --git a/src/tlapm.ml b/src/tlapm.ml index a127ccf5..2544bd42 100644 --- a/src/tlapm.ml +++ b/src/tlapm.ml @@ -552,7 +552,7 @@ let init () = Random.self_init(); Printexc.record_backtrace true; Format.pp_set_max_indent Format.err_formatter 35; - if Config.debug then + if Params.debugging "main" then main (Tlapm_args.init ()) else try main (Tlapm_args.init ()) with diff --git a/src/util/Makefile b/src/util/Makefile deleted file mode 100644 index 98a5f545..00000000 --- a/src/util/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -.PHONY: default -default: all - -%: - cd ../.. && ${MAKE} SILENT=yes $@ diff --git a/test/Makefile b/test/Makefile index 1c2c40a3..a95a51e0 100644 --- a/test/Makefile +++ b/test/Makefile @@ -1,47 +1,13 @@ -# Copyright (C) 2011 INRIA and Microsoft Corporation +# +# See test logs in ../_build/default/test/tests.log +# +TEST_DIRS=$(shell find . -type d | grep -v 'TOOLS') +TEST_FILES=$(shell find . -name '*.tla') -.PHONY: default -default: fast - -.PHONY: all all: - ./TOOLS/do_tests . - -.PHONY: partial -partial: - ./TOOLS/do_tests "${SUB}" - -.PHONY: fast -fast: - ./TOOLS/do_tests fast - -.PHONY: medium -medium: - ./TOOLS/do_tests medium - -.PHONY: slow -slow: - ./TOOLS/do_tests slow - -.PHONY: stest -stest: - ./TOOLS/do_soundness_tests soundness_tests - -.PHONY: junit -junit: - ./TOOLS/do_junit_tests regression_tests + dune runtest -f -.PHONY: smt -smt: - ./TOOLS/do_tests smt_tests +$(TEST_DIRS) $(TEST_FILES): + env TEST_CASE=$@ dune runtest -f -clean: - find . \( \ - -name '*.tlaps' \ - -o -name '*.tla.out' \ - -o -name '*.tla.err' \ - -o -name '.tlacache' \ - -o -name '__tlacache__' \ - \) \ - -prune -exec rm -rf '{}' \; - rm -f tests.log +.PHONY: all $(TEST_DIRS) $(TEST_FILES) diff --git a/test/Makefile.dune b/test/Makefile.dune deleted file mode 100644 index a95a51e0..00000000 --- a/test/Makefile.dune +++ /dev/null @@ -1,13 +0,0 @@ -# -# See test logs in ../_build/default/test/tests.log -# -TEST_DIRS=$(shell find . -type d | grep -v 'TOOLS') -TEST_FILES=$(shell find . -name '*.tla') - -all: - dune runtest -f - -$(TEST_DIRS) $(TEST_FILES): - env TEST_CASE=$@ dune runtest -f - -.PHONY: all $(TEST_DIRS) $(TEST_FILES) diff --git a/tools/Makefile.in b/tools/Makefile.in deleted file mode 100644 index a59eff1f..00000000 --- a/tools/Makefile.in +++ /dev/null @@ -1,224 +0,0 @@ -# Copyright (C) 2008 INRIA and Microsoft Corporation - -INSTALL = @INSTALL@ - -prefix = @prefix@ -exec_prefix = @exec_prefix@ - -srcdir = @srcdir@ -VPATH = @srcdir@ - -bindir = @bindir@ -LIBPATH = @libdir@/tlaps - -all: check-configure tlapm@EXE@ - -.PHONY:check-configure -check-configure: configure - @if test "${srcdir}/configure" -nt "${srcdir}/Makefile" ; then \ - echo "WARNING! ${srcdir}/configure is more recent than ${srcdir}/Makefile" ; \ - echo "Running ${srcdir}/configure again..." ; \ - ${MAKE} same-justconf CONFIGARGS="--silent" ; \ - echo "Finished ${srcdir}/configure; 'make' will now exit." ; \ - echo "Please run 'make' again to continue." ; \ - exit 1 ; \ - fi - -.PHONY: tlapm@EXE@ -tlapm@EXE@: - rm -f tlapm@EXE@ - ${MAKE} -C src tlapm.native - cp src/tlapm.native tlapm@EXE@ - -.PHONY: utest -utest: - : ----------------------- unit tests ---------------------- - ${MAKE} -C src utest - RESOURCE_FOLDER=test/resources/ src/tlapm.byte --version - -.PHONY: test -test: - : ----------------------- unit tests ---------------------- - ${MAKE} -C src clean >/dev/null 2>&1 - ${MAKE} -C src utest - RESOURCE_FOLDER=test/resources/ src/tlapm.byte --version - ${MAKE} -C src clean >/dev/null 2>&1 - : --------------------fast regression tests ------------------- - ${MAKE} tlapm >/dev/null 2>&1 - cd test && ${MAKE} - ${MAKE} clean >/dev/null 2>&1 - -.PHONY: jtest -jtest: - : ----------------------- unit tests ---------------------- - ${MAKE} -C src clean >/dev/null 2>&1 - ${MAKE} -C src utest - Jenkins=1 RESOURCE_FOLDER=test/resources/ src/tlapm.byte --version - ${MAKE} -C src clean >/dev/null 2>&1 - : -------------------- soundness tests ------------------- - ${MAKE} tlapm >/dev/null 2>&1 - cd test && ${MAKE} stest - : -------------------- regression tests ------------------- - cd test && ${MAKE} junit - ${MAKE} clean >/dev/null 2>&1 - -.PHONY: testall -testall: - cd test && ${MAKE} all - -.PHONY: clean -clean: - ${MAKE} -C src clean - rm -f tlapm@EXE@ - -.PHONY: distclean -distclean: clean - rm -f config.* - rm -rf autom4te.* - rm -f Makefile myocamlbuild.ml src/config.ml src/load.ml - rm -f tools/installer/tlaps-release.sh - rm -f tools/installer/tlaps-source-release.sh - - -FORMATTING_FILE_TYPES = \ - -e thy \ - -e ml -e mli -e mll -e mlt \ - -e pxd -e pxi -e py -e pyx \ - -e sh \ - -e tla -FORMATTING_FILE_REGEX = \ - '\.(ml|mli|mll|mlt|pxd|pxi|pyx|sh|thy|tla)$$' - - -# Formatting rules below require the packages: -# - `coreutils` (contains `gexpand`, `gtr`) -# - `moreutils` (contains `sponge`) -# - `ag` -# - `as-tree` -# - `fd` - - -.PHONY: format_tab_space_dryrun -# detect and print Isabelle, OCaml, Python, Shell, TLA+ files with: -# - trailing blanks (\t and \s) -# - leading tabs (\t) -# - tabs (\t) -# - CR characters -format_tab_space_dryrun: - @echo $$'\nsearching for files with extensions:\n' - @echo ${FORMATTING_FILE_REGEX} - @echo $$'\nfiles that contain tabs within leading blanks:\n' - ag --file-search-regex ${FORMATTING_FILE_REGEX} \ - --files-with-matches \ - '^\s*\t' . \ - | as-tree - @echo $$'\nfiles that contain tabs anywhere:\n' - ag --file-search-regex ${FORMATTING_FILE_REGEX} \ - --files-with-matches '\t' . \ - | as-tree - @echo $$'\nfiles that contain trailing blank space:\n' - ag --file-search-regex ${FORMATTING_FILE_REGEX} \ - --files-with-matches '( |\t)$$' . \ - | as-tree - @echo $$'\nany files that contain CR:\n' - ag --files-with-matches $$'\r' . | as-tree - - -.PHONY: expand_tabs -expand_tabs: - @echo $$'\nreplace each tab by 4 spaces\n' - time fd -t f ${FORMATTING_FILE_TYPES} \ - --exec bash -c \ - "gexpand -i -t 4 {} \ - | sponge {}" ';' - - -.PHONY: rm_cr -# `sponge` is not used in this case, -# because in case the Python script -# finds any `\r` outside of `\r\n`, -# it raises an exception, and then -# the file should remain unchanged. -rm_cr: - @echo $$'\nremove CR characters' - time fd -t f ${FORMATTING_FILE_TYPES} \ - --exec bash -c \ - "python tools/change_blank_space.py \ - --rm-cr {}" ';' - - -.PHONY: rm_trailing -rm_trailing: - @echo $$'\nremove trailing blank space' - time fd -t f ${FORMATTING_FILE_TYPES} \ - --exec bash -c \ - "python tools/change_blank_space.py \ - --rm-trailing-blank {}" ';' - - -.PHONY: allinstall -allinstall: all - ${MAKE} install - -.PHONY: install -install: - mkdir -p -m 0755 ${bindir} - ${INSTALL} -s -m 0755 tlapm@EXE@ ${bindir} - @if test "x${SILENT}" != xyes ; then \ - echo '' ; \ - echo 'The TLA+ Proof Manager (tlapm@EXE@) has been installed to' ; \ - echo '' ; \ - echo ' ' ${bindir} ; \ - echo '' ; \ - if test "no`which tlapm`" = "no" ; then \ - echo '' ; \ - echo "WARNING: ${bindir} is not in your PATH" ; \ - fi ; \ - fi - mkdir -p -m 0755 ${LIBPATH} - ${INSTALL} -m 0644 library/*.tla ${LIBPATH} - @TAR@ -cf - examples | ( cd ${LIBPATH} && @TAR@ -xf - ) - -.PHONY: uninstall -uninstall: - rm -f ${bindir}/tlapm@EXE@ - if test -n "`ls -A ${LIBPATH}`"; \ - then rm -rf ${LIBPATH} ; \ - fi - -.PHONY: newversion -newversion: - ocaml str.cma unix.cma tools/newversion.ml ${NEWVERARGS} - -.PHONY: release -release: - ocaml str.cma unix.cma tools/newversion.ml -release ${NEWVERARGS} - -.PHONY: sameversion -sameversion: - ${MAKE} newversion NEWVERARGS="-same" - -.PHONY: same -same: - @ ${MAKE} same-justconf CONFIGARGS="--silent" \ - && ${MAKE} SILENT=yes all - -.PHONY: same-justconf -same-justconf: - ./configure ${CONFIGARGS} \ - --prefix @prefix@ \ - --enable-debugging=@enable_debugging@ \ - --enable-profiling=@enable_profiling@ - -.PHONY: same-full -same-full: - @ ${MAKE} newversion NEWVERARGS="-quiet -same" \ - && ${MAKE} same-justconf CONFIGARGS="--silent" \ - && ${MAKE} SILENT=yes all - -.PHONY: emacs -emacs: - svn --force export svn+ssh://${MSR_SVN_USER}@svn.msr-inria.inria.fr/var/lib/svn/repository/tla/trunk/misc/tla_mode doc/web/tla_mode - -.PHONY: web -web: same-justconf emacs diff --git a/tools/aclocal.m4 b/tools/aclocal.m4 deleted file mode 100644 index 3f33ad1b..00000000 --- a/tools/aclocal.m4 +++ /dev/null @@ -1,174 +0,0 @@ -# =========================================================================== -# http://www.nongnu.org/autoconf-archive/ax_compare_version.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_COMPARE_VERSION(VERSION_A, OP, VERSION_B, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) -# -# DESCRIPTION -# -# This macro compares two version strings. Due to the various number of -# minor-version numbers that can exist, and the fact that string -# comparisons are not compatible with numeric comparisons, this is not -# necessarily trivial to do in a autoconf script. This macro makes doing -# these comparisons easy. -# -# The six basic comparisons are available, as well as checking equality -# limited to a certain number of minor-version levels. -# -# The operator OP determines what type of comparison to do, and can be one -# of: -# -# eq - equal (test A == B) -# ne - not equal (test A != B) -# le - less than or equal (test A <= B) -# ge - greater than or equal (test A >= B) -# lt - less than (test A < B) -# gt - greater than (test A > B) -# -# Additionally, the eq and ne operator can have a number after it to limit -# the test to that number of minor versions. -# -# eq0 - equal up to the length of the shorter version -# ne0 - not equal up to the length of the shorter version -# eqN - equal up to N sub-version levels -# neN - not equal up to N sub-version levels -# -# When the condition is true, shell commands ACTION-IF-TRUE are run, -# otherwise shell commands ACTION-IF-FALSE are run. The environment -# variable 'ax_compare_version' is always set to either 'true' or 'false' -# as well. -# -# Examples: -# -# AX_COMPARE_VERSION([3.15.7],[lt],[3.15.8]) -# AX_COMPARE_VERSION([3.15],[lt],[3.15.8]) -# -# would both be true. -# -# AX_COMPARE_VERSION([3.15.7],[eq],[3.15.8]) -# AX_COMPARE_VERSION([3.15],[gt],[3.15.8]) -# -# would both be false. -# -# AX_COMPARE_VERSION([3.15.7],[eq2],[3.15.8]) -# -# would be true because it is only comparing two minor versions. -# -# AX_COMPARE_VERSION([3.15.7],[eq0],[3.15]) -# -# would be true because it is only comparing the lesser number of minor -# versions of the two values. -# -# Note: The characters that separate the version numbers do not matter. An -# empty string is the same as version 0. OP is evaluated by autoconf, not -# configure, so must be a string, not a variable. -# -# The author would like to acknowledge Guido Draheim whose advice about -# the m4_case and m4_ifvaln functions make this macro only include the -# portions necessary to perform the specific comparison specified by the -# OP argument in the final configure script. -# -# LICENSE -# -# Copyright (c) 2008 Tim Toolan -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. - -dnl ######################################################################### -AC_DEFUN([AX_COMPARE_VERSION], [ - AC_REQUIRE([AC_PROG_AWK]) - - # Used to indicate true or false condition - ax_compare_version=false - - # Convert the two version strings to be compared into a format that - # allows a simple string comparison. The end result is that a version - # string of the form 1.12.5-r617 will be converted to the form - # 0001001200050617. In other words, each number is zero padded to four - # digits, and non digits are removed. - AS_VAR_PUSHDEF([A],[ax_compare_version_A]) - A=`echo "$1" | sed -e 's/\([[0-9]]*\)/Z\1Z/g' \ - -e 's/Z\([[0-9]]\)Z/Z0\1Z/g' \ - -e 's/Z\([[0-9]][[0-9]]\)Z/Z0\1Z/g' \ - -e 's/Z\([[0-9]][[0-9]][[0-9]]\)Z/Z0\1Z/g' \ - -e 's/[[^0-9]]//g'` - - AS_VAR_PUSHDEF([B],[ax_compare_version_B]) - B=`echo "$3" | sed -e 's/\([[0-9]]*\)/Z\1Z/g' \ - -e 's/Z\([[0-9]]\)Z/Z0\1Z/g' \ - -e 's/Z\([[0-9]][[0-9]]\)Z/Z0\1Z/g' \ - -e 's/Z\([[0-9]][[0-9]][[0-9]]\)Z/Z0\1Z/g' \ - -e 's/[[^0-9]]//g'` - - dnl # In the case of le, ge, lt, and gt, the strings are sorted as necessary - dnl # then the first line is used to determine if the condition is true. - dnl # The sed right after the echo is to remove any indented white space. - m4_case(m4_tolower($2), - [lt],[ - ax_compare_version=`echo "x$A -x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/false/;s/x${B}/true/;1q"` - ], - [gt],[ - ax_compare_version=`echo "x$A -x$B" | sed 's/^ *//' | sort | sed "s/x${A}/false/;s/x${B}/true/;1q"` - ], - [le],[ - ax_compare_version=`echo "x$A -x$B" | sed 's/^ *//' | sort | sed "s/x${A}/true/;s/x${B}/false/;1q"` - ], - [ge],[ - ax_compare_version=`echo "x$A -x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/true/;s/x${B}/false/;1q"` - ],[ - dnl Split the operator from the subversion count if present. - m4_bmatch(m4_substr($2,2), - [0],[ - # A count of zero means use the length of the shorter version. - # Determine the number of characters in A and B. - ax_compare_version_len_A=`echo "$A" | $AWK '{print(length)}'` - ax_compare_version_len_B=`echo "$B" | $AWK '{print(length)}'` - - # Set A to no more than B's length and B to no more than A's length. - A=`echo "$A" | sed "s/\(.\{$ax_compare_version_len_B\}\).*/\1/"` - B=`echo "$B" | sed "s/\(.\{$ax_compare_version_len_A\}\).*/\1/"` - ], - [[0-9]+],[ - # A count greater than zero means use only that many subversions - A=`echo "$A" | sed "s/\(\([[0-9]]\{4\}\)\{m4_substr($2,2)\}\).*/\1/"` - B=`echo "$B" | sed "s/\(\([[0-9]]\{4\}\)\{m4_substr($2,2)\}\).*/\1/"` - ], - [.+],[ - AC_WARNING( - [illegal OP numeric parameter: $2]) - ],[]) - - # Pad zeros at end of numbers to make same length. - ax_compare_version_tmp_A="$A`echo $B | sed 's/./0/g'`" - B="$B`echo $A | sed 's/./0/g'`" - A="$ax_compare_version_tmp_A" - - # Check for equality or inequality as necessary. - m4_case(m4_tolower(m4_substr($2,0,2)), - [eq],[ - test "x$A" = "x$B" && ax_compare_version=true - ], - [ne],[ - test "x$A" != "x$B" && ax_compare_version=true - ],[ - AC_WARNING([illegal OP parameter: $2]) - ]) - ]) - - AS_VAR_POPDEF([A])dnl - AS_VAR_POPDEF([B])dnl - - dnl # Execute ACTION-IF-TRUE / ACTION-IF-FALSE. - if test "$ax_compare_version" = "true" ; then - m4_ifvaln([$4],[$4],[:])dnl - m4_ifvaln([$5],[else $5])dnl - fi -]) dnl AX_COMPARE_VERSION diff --git a/tools/config.guess b/tools/config.guess deleted file mode 100755 index e3a2116a..00000000 --- a/tools/config.guess +++ /dev/null @@ -1,1533 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 -# Free Software Foundation, Inc. - -timestamp='2009-06-10' - -# This file is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner . -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. -# -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. -# -# The plan is that this can be called by configure scripts if you -# don't specify an explicit build system type. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system \`$me' is run on. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.guess ($timestamp) - -Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - -trap 'exit 1' 1 2 15 - -# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -# compiler to aid in system detection is discouraged as it requires -# temporary files to be created and, as you can see below, it is a -# headache to deal with in a portable fashion. - -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. - -# Portable tmp directory creation inspired by the Autoconf team. - -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -# Note: order is significant - the case branches are not exclusive. - -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward - # compatibility and a consistent mechanism for selecting the - # object file format. - # - # Note: NetBSD doesn't particularly care about the vendor - # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; - sh5el) machine=sh5le-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ELF__ - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # The OS release - # Debian GNU/NetBSD machines have a different userland, and - # thus, need a distinct triplet. However, they do not need - # kernel version information, so it can be replaced with a - # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in - Debian*) - release='-gnu' - ;; - *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" - exit ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} - exit ;; - *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit ;; - *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} - exit ;; - macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} - exit ;; - *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} - exit ;; - alpha:OSF1:*:*) - case $UNAME_RELEASE in - *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - ;; - *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` - ;; - esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") - UNAME_MACHINE="alpha" ;; - "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; - "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; - "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; - "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; - "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; - "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; - "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; - "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; - "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; - "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; - "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; - esac - # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos - exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos - exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; - *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; - *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; - DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; - DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; - s390x:SunOS:*:*) - echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - eval $set_cc_for_build - SUN_ARCH="i386" - # If there is a compiler, see if it is configured for 64-bit objects. - # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. - # This test works for both compilers. - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - SUN_ARCH="x86_64" - fi - fi - echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac - exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; - m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} - exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && - dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`$dummy $dummyarg` && - { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} - exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] - then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] - then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else - echo i586-dg-dgux${UNAME_RELEASE} - fi - exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` - then - echo "$SYSTEM_NAME" - else - echo rs6000-ibm-aix3.2.5 - fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit ;; - *:AIX:*:[456]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac - fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - - #define _HPUX_SOURCE - #include - #include - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` - test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac - if [ ${HP_ARCH} = "hppa2.0w" ] - then - eval $set_cc_for_build - - # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating - # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler - # generating 64-bit code. GNU and HP use different nomenclature: - # - # $ CC_FOR_BUILD=cc ./config.guess - # => hppa2.0w-hp-hpux11.23 - # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess - # => hppa64-hp-hpux11.23 - - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep -q __LP64__ - then - HP_ARCH="hppa2.0w" - else - HP_ARCH="hppa64" - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} - exit ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd - exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi - exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - esac - exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit ;; - *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 - exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit ;; - *:Interix*:[3456]*) - case ${UNAME_MACHINE} in - x86) - echo i586-pc-interix${UNAME_RELEASE} - exit ;; - EM64T | authenticamd | genuineintel) - echo x86_64-unknown-interix${UNAME_RELEASE} - exit ;; - IA64) - echo ia64-unknown-interix${UNAME_RELEASE} - exit ;; - esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit ;; - 8664:Windows_NT:*) - echo x86_64-pc-mks - exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix - exit ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin - exit ;; - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - *:GNU:*:*) - # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit ;; - *:GNU/*:*:*) - # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu - exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix - exit ;; - arm*:Linux:*:*) - eval $set_cc_for_build - if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_EABI__ - then - echo ${UNAME_MACHINE}-unknown-linux-gnu - else - echo ${UNAME_MACHINE}-unknown-linux-gnueabi - fi - exit ;; - avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - cris:Linux:*:*) - echo cris-axis-linux-gnu - exit ;; - crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu - exit ;; - frv:Linux:*:*) - echo frv-unknown-linux-gnu - exit ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - mips:Linux:*:* | mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef ${UNAME_MACHINE} - #undef ${UNAME_MACHINE}el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=${UNAME_MACHINE}el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=${UNAME_MACHINE} - #else - CPU= - #endif - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - or32:Linux:*:*) - echo or32-unknown-linux-gnu - exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu - exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit ;; - padre:Linux:*:*) - echo sparc-unknown-linux-gnu - exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; - esac - exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu - exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux - exit ;; - sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu - exit ;; - x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu - exit ;; - xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent - # problems with other programs or directories called `ld' in the path. - # Set LC_ALL=C to ensure ld outputs messages in English. - ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ - | sed -ne '/supported targets:/!d - s/[ ][ ]*/ /g - s/.*supported targets: *// - s/ .*// - p'` - case "$ld_supported_targets" in - elf32-i386) - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" - ;; - esac - # Determine whether the default compiler is a.out or elf - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - #ifdef __ELF__ - # ifdef __GLIBC__ - # if __GLIBC__ >= 2 - LIBC=gnu - # else - LIBC=gnulibc1 - # endif - # else - LIBC=gnulibc1 - # endif - #else - #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) - LIBC=gnu - #else - LIBC=gnuaout - #endif - #endif - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^LIBC/{ - s: ::g - p - }'`" - test x"${LIBC}" != x && { - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" - exit - } - test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } - ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 - exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx - exit ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop - exit ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos - exit ;; - i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable - exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi - exit ;; - i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi - exit ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i586. - # Note: whatever this is, it MUST be the same as what config.sub - # prints for the "djgpp" host, or else GDB configury will decide that - # this is a cross-build. - echo i586-pc-msdosdjgpp - exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi - exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; - M68*:*:R3V[5678]*:*) - test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; - 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; - NCR*:*:4.2:* | MPRAS*:*:4.2:*) - OS_REL='.3' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; - i*86:VOS:*:*) - # From Paul.Green@stratus.com. - echo ${UNAME_MACHINE}-stratus-vos - exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi - exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; - BePC:Haiku:*:*) # Haiku running on Intel PC compatible. - echo i586-pc-haiku - exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} - exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} - exit ;; - SX-7:SUPER-UX:*:*) - echo sx7-nec-superux${UNAME_RELEASE} - exit ;; - SX-8:SUPER-UX:*:*) - echo sx8-nec-superux${UNAME_RELEASE} - exit ;; - SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux${UNAME_RELEASE} - exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - unknown) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit ;; - *:QNX:*:4*) - echo i386-pc-qnx - exit ;; - NSE-?:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} - exit ;; - NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} - exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "$cputype" = "386"; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 - exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; - *:ITS:*:*) - echo pdp10-unknown-its - exit ;; - SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} - exit ;; - *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit ;; - *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; - esac ;; - *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; - i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' - exit ;; - i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos - exit ;; - i*86:AROS:*:*) - echo ${UNAME_MACHINE}-pc-aros - exit ;; -esac - -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi - -cat >&2 < in order to provide the needed -information to handle your system. - -config.guess timestamp = $timestamp - -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` - -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` - -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} -EOF - -exit 1 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/tools/config.ml.in b/tools/config.ml.in deleted file mode 100644 index f5e9d4cc..00000000 --- a/tools/config.ml.in +++ /dev/null @@ -1,8 +0,0 @@ -(* -*- mode: tuareg; -*- *) -(* variables provided by configure *) - -let ocaml_version = "@OCAMLCVER@" ;; - -let debug = "@enable_debugging@" = "yes" ;; - -let exe = "@EXE@" ;; diff --git a/tools/config.sub b/tools/config.sub deleted file mode 100755 index eb0389a6..00000000 --- a/tools/config.sub +++ /dev/null @@ -1,1693 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 -# Free Software Foundation, Inc. - -timestamp='2009-06-11' - -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# This file is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. -# -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS - -Canonicalize a configuration name. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.sub ($timestamp) - -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo $1 - exit ;; - - * ) - break ;; - esac -done - -case $# in - 0) echo "$me: missing argument$help" >&2 - exit 1;; - 1) ;; - *) echo "$me: too many arguments$help" >&2 - exit 1;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ - uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ - kopensolaris*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray) - os= - basic_machine=$1 - ;; - -bluegene*) - os=-cnk - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco6) - os=-sco5v6 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` - ;; - -psos*) - os=-psos - ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ - | bfin \ - | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | fido | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ - | ip2k | iq2000 \ - | lm32 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep | metag \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ - | mips64r5900 | mips64r5900el \ - | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | moxie \ - | mt \ - | msp430 \ - | nios | nios2 \ - | ns16k | ns32k \ - | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ - | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu | strongarm \ - | tahoe | thumb | tic4x | tic80 | tron \ - | v850 | v850e \ - | we32k \ - | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ - | z8k | z80) - basic_machine=$basic_machine-unknown - ;; - m6811 | m68hc11 | m6812 | m68hc12) - # Motorola 68HC11/12. - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; - ms1) - basic_machine=mt-unknown - ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ - | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* | iq2000-* \ - | lm32-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64octeon-* | mips64octeonel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64r5900-* | mips64r5900el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | nios-* | nios2-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ - | romp-* | rs6000-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ - | tron-* \ - | v850-* | v850e-* | vax-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ - | xstormy16-* | xtensa*-* \ - | ymp-* \ - | z8k-* | z80-*) - ;; - # Recognize the basic CPU types without company name, with glob match. - xtensa*) - basic_machine=$basic_machine-unknown - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-unknown - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aros) - basic_machine=i386-pc - os=-aros - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - blackfin) - basic_machine=bfin-unknown - os=-linux - ;; - blackfin-*) - basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - bluegene*) - basic_machine=powerpc-ibm - os=-cnk - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - cegcc) - basic_machine=arm-unknown - os=-cegcc - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16) - basic_machine=cr16-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 - ;; - decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - dicos) - basic_machine=i686-pc - os=-dicos - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppa-next) - os=-nextstep3 - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? - i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - i386-vsta | vsta) - basic_machine=i386-unknown - os=-vsta - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - m68knommu) - basic_machine=m68k-unknown - os=-linux - ;; - m68knommu-*) - basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - mingw32) - basic_machine=i386-pc - os=-mingw32 - ;; - mingw32ce) - basic_machine=arm-unknown - os=-mingw32ce - ;; - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; - next | m*-next ) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - parisc) - basic_machine=hppa-unknown - os=-linux - ;; - parisc-*) - basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; - pentium4) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium4-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc) basic_machine=powerpc-unknown - ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64) basic_machine=powerpc64-unknown - ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; - rdos) - basic_machine=i386-pc - os=-rdos - ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm - ;; - sa29200) - basic_machine=a29k-amd - os=-udi - ;; - sb1) - basic_machine=mipsisa64sb1-unknown - ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; - sde) - basic_machine=mipsisa32-sde - os=-elf - ;; - sei) - basic_machine=mips-sei - os=-seiux - ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; - sh5el) - basic_machine=sh5le-unknown - ;; - sh64) - basic_machine=sh64-unknown - ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - st2000) - basic_machine=m68k-tandem - ;; - stratus) - basic_machine=i860-stratus - os=-sysv4 - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - sv1) - basic_machine=sv1-cray - os=-unicos - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - t3e) - basic_machine=alphaev5-cray - os=-unicos - ;; - t90) - basic_machine=t90-cray - os=-unicos - ;; - tic54x | c54x*) - basic_machine=tic54x-unknown - os=-coff - ;; - tic55x | c55x*) - basic_machine=tic55x-unknown - os=-coff - ;; - tic6x | c6x*) - basic_machine=tic6x-unknown - os=-coff - ;; - tile*) - basic_machine=tile-unknown - os=-linux-gnu - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - toad1) - basic_machine=pdp10-xkl - os=-tops20 - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - tpf) - basic_machine=s390x-ibm - os=-tpf - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=-none - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; - xbox) - basic_machine=i686-pc - os=-mingw32 - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - ymp) - basic_machine=ymp-cray - os=-unicos - ;; - z8k-*-coff) - basic_machine=z8k-unknown - os=-sim - ;; - z80-*-coff) - basic_machine=z80-unknown - os=-sim - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - w89k) - basic_machine=hppa1.1-winbond - ;; - op50n) - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - romp) - basic_machine=romp-ibm - ;; - mmix) - basic_machine=mmix-knuth - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - mac | mpw | mac-mpw) - basic_machine=m68k-apple - ;; - pmac | pmac-mpw) - basic_machine=powerpc-apple - ;; - *-unknown) - # Make sure to match an already-canonicalized machine name. - ;; - *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -svr4*) - os=-sysv4 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ - | -kopensolaris* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* | -cegcc* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) - ;; - *) - os=-nto$os - ;; - esac - ;; - -nto-qnx*) - ;; - -nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; - -linux-dietlibc) - os=-linux-dietlibc - ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -opened*) - os=-openedition - ;; - -os400*) - os=-os400 - ;; - -wince*) - os=-wince - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -atheos*) - os=-atheos - ;; - -syllable*) - os=-syllable - ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -nova*) - os=-rtmk-nova - ;; - -ns2 ) - os=-nextstep2 - ;; - -nsk*) - os=-nsk - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -tpf*) - os=-tpf - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -ose*) - os=-ose - ;; - -es1800*) - os=-ose - ;; - -xenix) - os=-xenix - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint - ;; - -aros*) - os=-aros - ;; - -kaos*) - os=-kaos - ;; - -zvmoe) - os=-zvmoe - ;; - -dicos*) - os=-dicos - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - score-*) - os=-elf - ;; - spu-*) - os=-elf - ;; - *-acorn) - os=-riscix1.2 - ;; - arm*-rebel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; - c4x-* | tic4x-*) - os=-coff - ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 - ;; - m68*-cisco) - os=-aout - ;; - mep-*) - os=-elf - ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - or32-*) - os=-coff - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-be) - os=-beos - ;; - *-haiku) - os=-haiku - ;; - *-ibm) - os=-aix - ;; - *-knuth) - os=-mmixware - ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next ) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-next) - os=-nextstep3 - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f30[01]-fujitsu | f700-fujitsu) - os=-uxpv - ;; - *-rom68k) - os=-coff - ;; - *-*bug) - os=-coff - ;; - *-apple) - os=-macos - ;; - *-atari*) - os=-mint - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -cnk*|-aix*) - vendor=ibm - ;; - -beos*) - vendor=be - ;; - -hpux*) - vendor=hp - ;; - -mpeix*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs* | -opened*) - vendor=ibm - ;; - -os400*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -tpf*) - vendor=ibm - ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi - ;; - -mpw* | -macos*) - vendor=apple - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - vendor=atari - ;; - -vos*) - vendor=stratus - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; -esac - -echo $basic_machine$os -exit - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/tools/configure.ac.in b/tools/configure.ac.in deleted file mode 100644 index 9d042c0f..00000000 --- a/tools/configure.ac.in +++ /dev/null @@ -1,88 +0,0 @@ -AC_INIT(TLA+ Proof System,@VERSION@,tlaps-devel@lists.gforge.inria.fr,tlaps) - -dnl Not really needed: -dnl AC_PREREQ(2.64) - -AC_CONFIG_AUX_DIR(${srcdir}/tools) - -VERSION='@VERSION@' -RELEASEVERSION='@RELEASEVERSION@' -AC_SUBST(RELEASEVERSION) -AC_SUBST(VERSION) - -AC_CANONICAL_HOST -case $host_os in - *mingw* ) - EXE=".exe" ;; - *cygwin* ) - EXE=".exe";; - * ) - EXE="" ;; -esac -case $host_os in - *darwin* ) - AS_VAR_SET(host_os,[darwin]) ;; -esac -AC_SUBST(EXE) -AC_SUBST(host_os) - -AC_ARG_ENABLE([profiling], - [AS_HELP_STRING([--enable-profiling], - [compile with profiling [disabled]])],,[enable_profiling=no]) -AC_SUBST(enable_profiling) - -AC_ARG_ENABLE([debugging], - [AS_HELP_STRING([--enable-debugging], - [compile with debugging symbols [disabled]])],,[enable_debugging=no]) -AC_SUBST(enable_debugging) - -dnl AC_PROG_SED - -AC_PATH_PROG(TAR,tar gtar,no) -AS_IF([test "x$TAR" = xno], [AC_MSG_ERROR(Cannot find tar)]) - -AC_PATH_PROGS(WGET,wget curl,no) -AS_IF([test "x$WGET" = xno], [AC_MSG_ERROR([Cannot find a URL fetching program (curl or wget)])]) -case "$WGET" in - *curl* ) - AS_VAR_APPEND(WGET,[" -L -O"]) ;; - *wget* ) - AS_VAR_APPEND(WGET,[" -q"]) ;; -esac - -AC_PATH_PROGS(OCAMLC,ocamlc.opt,ocamlc,no) -AS_IF([test "x$OCAMLC" = xno],[AC_MSG_ERROR(Cannot find ocamlc)]) -OCAMLCVER=["`$OCAMLC -version`"] -AC_SUBST(OCAMLCVER) -AX_COMPARE_VERSION([$OCAMLCVER],[ge],[3.12.0],, - AC_MSG_ERROR(OCaml version >= 3.12.0 required) -) - -AC_PROG_INSTALL - -AC_CONFIG_FILES([Makefile:tools/Makefile.in]) -AC_CONFIG_FILES([src/config.ml:tools/config.ml.in]) -AC_CONFIG_FILES([src/load.ml:tools/load.ml.in]) -AC_CONFIG_FILES([tools/installer/tlaps-release.sh:tools/installer/tlaps-release.sh.in]) -AC_CONFIG_FILES([tools/installer/tlaps-source-release.sh:tools/installer/tlaps-source-release.sh.in]) - -AC_OUTPUT - -chmod +x tools/installer/tlaps-release.sh -chmod +x tools/installer/tlaps-source-release.sh - -AS_IF([test "$silent" != yes],[cat <ocamldoc/remove_DEBUG <<\EOF -#!/bin/sh -echo "# 1 \"$1\"" -LC_ALL=C sed -e '/DEBUG/c\ -(* DEBUG statement removed *)' "$1" -EOF - make world.opt - make install - touch .built -fi - -cat <ocamldoc/remove_DEBUG <<\EOF -# #!/bin/sh -# echo "# 1 \"$1\"" -# LC_ALL=C sed -e '/DEBUG/c\ -# (* DEBUG statement removed *)' "$1" -# EOF - make world.opt - make install - touch .built -fi - -cat <&2 - exit 3 -} - -OLDPWD="`pwd`" - -TLAPSVER="$(echo "tlaps-@VERSION@" | sed -e 's/ /_/g')-@host_cpu@-@host_os@" - -case "@EXE@" in - "") TARGET_FILE="$TLAPSVER-inst.bin";; - *) TARGET_FILE="$TLAPSVER-inst@EXE@";; -esac -TARGET="$OLDPWD/$TARGET_FILE" -GIT_BRANCH="`git rev-parse --abbrev-ref HEAD`" -PS_DIR="$(pwd)/../.." -PM_DIR="$(pwd)/../.." - -cat < - # checks for already-downloaded file, downloads if needed, - # and prints corresponding message. - # Note: changes the current directory to $DOWNDIR - cd "$DOWNDIR" - if test -f "$3" ; then - echo " [x] $1 ALREADY downloaded" - else - @WGET@ "$2/$3" - echo " [x] $1 distribution downloaded" - fi -} - -################################################################################ - -TLAPSDIR="$PS_DIR/$TLAPSVER" -DOWNDIR="$TLAPSDIR/download" -BUILDDIR="$TLAPSDIR/build" -INSTDIR="$TLAPSDIR/install" - -banner "Setting up directories" -rm -rf "$BUILDDIR" "$INSTDIR" -mkdir -p "$DOWNDIR" -echo " [x] Created $DOWNDIR" -mkdir -p "$BUILDDIR" -echo " [x] Created $BUILDDIR" -mkdir -p "$INSTDIR" -echo " [x] Created $INSTDIR" - -################################################################################ - -ISABELLE=Isabelle2011-1 -banner "Downloading and packaging $ISABELLE" - -case "@host_os@" in - *linux*) ISA_ARCHIVE="${ISABELLE}_bundle_x86-linux.tar.gz" - ISA_ARCHIVE_TYPE=tgz - ADD_GMP_DLL=false - ;; - *cygwin*) ISA_ARCHIVE="${ISABELLE}_bundle_x86-cygwin.tar.gz" - ISA_ARCHIVE_TYPE=tgz - ADD_GMP_DLL=true - ;; - *darwin*) ISA_ARCHIVE="${ISABELLE}.dmg" - ISA_ARCHIVE_TYPE=dmg - ADD_GMP_DLL=false - ;; - *) echo "unknown architecture: @host_os@" >&2; exit 3;; -esac - -mkdir -p "$INSTDIR/lib/tlaps" - -download "$ISABELLE" "http://isabelle.in.tum.de/website-$ISABELLE/dist" \ - "$ISA_ARCHIVE" - -case "$ISA_ARCHIVE_TYPE" in - tgz) tar -C "$INSTDIR/lib/tlaps" -xzf "$ISA_ARCHIVE";; - dmg) hdiutil attach "$ISA_ARCHIVE" -quiet -readonly -nobrowse \ - -mountpoint "$DOWNDIR/dmg" - cp -a "$DOWNDIR/dmg/$ISABELLE.app/Contents/Resources/$ISABELLE" \ - "$INSTDIR/lib/tlaps/" - hdiutil detach "$DOWNDIR/dmg" -quiet - ;; - *) echo "unknown archive type: $ISA_ARCHIVE_TYPE" >&2; exit 3;; -esac -if $ADD_GMP_DLL; then - ( - cd $INSTDIR/lib/tlaps/$ISABELLE/contrib/polyml-5.4.0/x86-cygwin - git_export "$PS_DIR/misc" cyggmp-3.dll - ) -fi -echo " [x] $ISABELLE extracted" - -cd "$INSTDIR/lib/tlaps" -ISABELLE_DELETEDS=$(echo $ISABELLE/contrib/ProofGeneral* $ISABELLE/doc $ISABELLE/heaps/*/HOL $ISABELLE/lib/{classes,fonts,logo}) -rm -rf $ISABELLE_DELETEDS -echo $ISABELLE_DELETEDS | xargs -n 1 echo ' [x] Trimmed' -cat >"$ISABELLE/README.TLAPS" < - $(date +%Y/%m/%d) -EOF - -ln -s -f "$ISABELLE" Isabelle - -mkdir -p bin -cd bin -ln -s -f "../$ISABELLE/bin/isabelle" -ln -s -f "../$ISABELLE/bin/isabelle-process" - -################################################################################ - -banner "Exporting Isabelle/TLA+" - -mkdir -p "$INSTDIR/lib/tlaps" -cd "$INSTDIR/lib/tlaps" - -mkdir isabelle-tmp && ( - cd isabelle-tmp && - git_export "$PS_DIR" isabelle && mv isabelle ../TLA+ -) && rmdir isabelle-tmp -echo " [x] Exported" - -################################################################################ - -banner "Exporting and building Zenon" - -cd "$BUILDDIR" - -git_export "$PS_DIR" zenon -echo " [x] Exported" - -( set -x - cd zenon - ./configure -coqc : -bindir "$INSTDIR/lib/tlaps/bin" \ - -libdir "$INSTDIR/lib/tlaps" - make - make install -) > zenon-build.log 2>&1 -echo " [x] Built" - -################################################################################ - -# CVC4_VERS=1.5 -# CVC4=CVC4-$CVC4_VERS -# banner "Downloading and packaging $CVC4" - -# case "@host_os@" in -# *linux*) CVC_DIR=https://tla.msr-inria.inria.fr/tlaps/dist/cvc4 -# CVC_FILE=cvc4-1.5-x86_64-linux-opt -# ;; -# *cygwin*) CVC_DIR=https://tla.msr-inria.inria.fr/tlaps/dist/cvc4 -# CVC_FILE=cvc4-1.5-win32-opt.exe -# ;; -# *darwin*) CVC_DIR=https://tla.msr-inria.inria.fr/tlaps/dist/cvc4 -# CVC_FILE=cvc4-1.5-x86_64-macos-10.12-opt -# ;; -# *) echo "unknown architecture: @host_os@" >&2; exit 3;; -# esac - -# mkdir -p "$INSTDIR/lib/tlaps/bin" - -# cd "$DOWNDIR" -# if test -f "$CVC_FILE" ; then -# echo " [x] $CVC4 ALREADY downloaded" -# else -# @WGET@ "$CVC_DIR/$CVC_FILE" -# echo " [x] $CVC4 distribution downloaded" -# fi - -# chmod +x "$CVC_FILE" -# cp "$CVC_FILE" "$INSTDIR/lib/tlaps/bin/cvc4"@EXE@ - -# echo " [x] $CVC4 extracted" - -################################################################################ - -Z3_VERS=4.8.9 -Z3=Z3-$Z3_VERS -banner "Downloading and packaging $Z3" - -Z3_DIR=https://github.com/Z3Prover/z3/releases/download/z3-${Z3_VERS} -case "@host_os@" in - *linux*) Z3_FILE=z3-${Z3_VERS}-x64-ubuntu-16.04 - ;; - *cygwin*) Z3_FILE=z3-${Z3_VERS}-x86-win - ;; - *darwin*) Z3_FILE=z3-${Z3_VERS}-x64-osx-10.14.6 - ;; - *) echo "unknown architecture: @host_os@" >&2; exit 3;; -esac - -mkdir -p "$INSTDIR/lib/tlaps/bin" - -download "$Z3" "$Z3_DIR" "$Z3_FILE".zip - -unzip -q -o "$Z3_FILE".zip -cp "$Z3_FILE"/bin/z3@EXE@ "$INSTDIR"/lib/tlaps/bin/ -chmod a+x "$INSTDIR"/lib/tlaps/bin/z3@EXE@ - -echo " [x] $Z3 extracted" - -################################################################################ - -LS4_VERS=1.0 -LS4="LS4-$LS4_VERS" -LS4_FILE="v$LS4_VERS.zip" -banner "Downloading and building $LS4" - -download "$LS4" "https://github.com/quickbeam123/ls4/archive" "$LS4_FILE" - -cd "$BUILDDIR" - -unzip -q -d ls4 "$DOWNDIR/$LS4_FILE" - -( set -x - patch -p0 < ls4-build.log 2>&1 -echo " [x] Built" - -################################################################################ - -banner "Exporting and building the 'translate' utility" - -cd "$BUILDDIR" - -git_export "$PS_DIR" translate -echo " [x] Exported" - -( set -x - cd translate - ./buildb.sh - mkdir -p "$INSTDIR/lib/tlaps/bin" - cp translate.bin "$INSTDIR/lib/tlaps/bin/translate@EXE@" - cp translate.bin "$INSTDIR/lib/tlaps/bin/ptl_to_trp@EXE@" -) > translate-build.log 2>&1 -echo " [x] Built" - -################################################################################ - -banner "Exporting and building the TLA+ Proof Manager (tlapm)" - -cd "$BUILDDIR" - -(mkdir tlapm && cd tlapm && git_export "$PM_DIR" .) -echo " [x] Exported" - -( set -x - cd tlapm - ./configure --prefix "$INSTDIR" - make all install -) > tlapm-build.log 2>&1 -echo " [x] Built" - -################################################################################ - -banner "Exporting tla-mode" - -cd "$INSTDIR" - -mkdir -p lib/tlaps/emacs -(cd lib/tlaps/emacs && git_export "$PS_DIR/misc" tla_mode) -echo " [x] Exported" - -################################################################################ - -banner "Creating the uninstaller" - -UNINST_FILE=un-inst@EXE@ -UNINSTALLER="$INSTDIR/lib/tlaps/$UNINST_FILE" - -UNINSTALLER_SOURCE="$BUILDDIR/uninstall.ml" -cat > "$UNINSTALLER_SOURCE" < "/" - | head :: rest -> - List.fold_left Filename.concat head rest - -let fatal_error fmt = - output_string Stdlib.stderr "FATAL ERROR: " ; - kfprintf - (fun _ -> - output_string Stdlib.stderr "\\n\\n *** ABORT ***.\\n" ; - flush Stdlib.stderr ; - Stdlib.exit 2) - Stdlib.stderr fmt - -let rm_ifempty path = try begin - let d = opendir path in - let rec spin k = - try ignore (readdir d) ; spin (k + 1) with End_of_file -> k in - if spin 0 = 2 then verbose_rmdir path -end with _ -> () - -let rm_f path = - try verbose_unlink path with _ -> () - -let rec rm_rf dir = try begin - let d = opendir dir in - let rec spin () = - try begin - match readdir d with - | "." | ".." -> spin () - | ent -> - let ent = Filename.concat dir ent in - let st = lstat ent in - begin match st.st_kind with - | S_DIR -> rm_rf ent - | _ -> rm_f ent - end ; - spin () - end with - | End_of_file -> closedir d - in - spin () ; - verbose_rmdir dir -end with _ -> () - -let () = - printf "Uninstalling the TLA+ Proof System\\n" ; - printf "version @VERSION@ from:\\n" ; - printf " %s\\n" output_dir ; - flush_all () ; - rm_f (path [ output_dir ; "bin" ; "tlapm@EXE@" ]) ; - rm_ifempty (path [ output_dir ; "bin" ]) ; - rm_rf (path [ output_dir ; "lib" ; "tlaps" ]) ; - rm_ifempty (path [ output_dir ; "lib" ; "tlaps" ]) ; - rm_ifempty (path [ output_dir ; "lib" ]) ; - rm_ifempty (path [ output_dir ]) ; - printf "Done.\\n" ; - flush_all () - -EOF - -ocamlopt -o "$UNINSTALLER" unix.cmxa "$UNINSTALLER_SOURCE" - -################################################################################ - -banner "Creating $TLAPSVER.tar.gz" - -cd "$INSTDIR" -rm -f "../$TLAPSVER.tar.gz" - -tar --create --gzip --file="../$TLAPSVER.tar.gz" * - -################################################################################ - -banner "Assembling $TARGET" - -cd "$TLAPSDIR" - -TAR_SIZE=$(wc -c < "$TLAPSVER.tar.gz") -if test $? -ne 0 ; then - cat < "$SOURCE" < - output_string Pervasives.stderr "\\n\\n *** ABORT ***.\\n" ; - flush Pervasives.stderr ; - Pervasives.exit 2) - Pervasives.stderr fmt - -let () = - Arg.parse [ "-d", Arg.Set_string output_dir, "Set the install directory" ] - (fun arg -> fatal_error "Bad arguments %S" arg) - "$TARGET_FILE [-d DIR]" - -let () = - if Filename.is_relative !output_dir then - output_dir := Filename.concat (getcwd ()) !output_dir - -let fails fn = - try (fn () ; false) - with ex -> - Printf.eprintf "\nEXCEPTION: %s\n%!" (Printexc.to_string ex) ; - true - -let path ents = match ents with - | [] -> "/" - | head :: rest -> - List.fold_left Filename.concat head rest - -let maybe_unlink fn = - if Sys.file_exists fn then unlink fn else () - -let () = - printf "Installing the TLA+ Proof System\\n\\n" ; - printf " Version: @VERSION@\\n" ; - printf "Destination: %s\\n\\n" !output_dir ; - flush_all () ; - let old_uninst = path [ !output_dir ; "lib" ; "tlaps" ; "$UNINST_FILE" ] in - if Sys.file_exists old_uninst then begin - printf "\\nThere appears to be an installation of TLAPS already in %s.\\n" - !output_dir ; - printf "Running its uninstaller...\\n" ; - flush_all () ; - let unret = Sys.command old_uninst in - if unret <> 0 then - eprintf "Error in running the old uninstaller! Continuing anyway...\\n" ; - flush_all () ; - end ; - if Sys.command ("mkdir -p " ^ !output_dir) <> 0 then - fatal_error "Cannot create %s." !output_dir ; - let ost = lstat !output_dir in - if ost.st_kind != S_DIR then - fatal_error "%s already exists but is not a directory." !output_dir ; - if fails begin fun () -> - let p = path [ !output_dir ; ".test" ] in - let f = open_out p in - close_out f ; maybe_unlink p - end then - fatal_error "Cannot write to %s." !output_dir ; - printf "Extracting ... " ; - flush_all () ; - let tar_cmd = - Printf.sprintf "tail -c ${TAR_SIZE} \\"%s\\" | tar -xzp -C %s -f -" - Sys.executable_name !output_dir in - if Sys.command tar_cmd <> 0 then - fatal_error "Could not extract into %s." !output_dir ; - printf "done.\\n" ; - printf "Compiling Isabelle theories.\\n" ; - flush_all () ; - let isabelle_settings_file = - path [ !output_dir ; "lib" ; "tlaps" ; "Isabelle" ; "etc" ; "settings" ] in - let isabelle_settings = input_file ~bin:true isabelle_settings_file in - let isabelle_settings_modified = - replace_first - (regexp "^ISABELLE_HOME_USER=.*\$") - ("ISABELLE_HOME_USER=" ^ path [ !output_dir ; "lib" ; "tlaps" ]) - (Bytes.to_string isabelle_settings) in - if (Bytes.to_string isabelle_settings) = isabelle_settings_modified then - fatal_error "Could not modify %s." isabelle_settings_file ; - let isabelle_settings_modified2 = - replace_first - (regexp "^ML_PLATFORM=\"\\\\\$ISABELLE_PLATFORM\"\$") - "ML_PLATFORM=\"\${ISABELLE_PLATFORM64:-\$ISABELLE_PLATFORM}\"" - isabelle_settings_modified in - if isabelle_settings_modified = isabelle_settings_modified2 then - fatal_error "Could not modify %s." isabelle_settings_file ; - if fails begin fun () -> - let f = open_out_bin isabelle_settings_file in - output_string f isabelle_settings_modified2 ; - close_out f - end then - fatal_error "Could not overwrite %s." isabelle_settings_file ; - let pure_cmd = Printf.sprintf - "cd %s && ../../bin/isabelle make" - (path [ !output_dir ; "lib" ; "tlaps" ; "Isabelle" ; "src" ; "Pure" ]) in - if Sys.command pure_cmd <> 0 then - fatal_error "Could not compile Isabelle/Pure" ; - let tla_plus_cmd = Printf.sprintf - "cd %s && ../Isabelle/bin/isabelle usedir -b Pure TLA+" - (path [ !output_dir ; "lib" ; "tlaps" ; "TLA+" ]) in - if Sys.command tla_plus_cmd <> 0 then - fatal_error "Could not compile Isabelle/TLA+" ; - printf "Finished compiling Isabelle theories.\\n" ; - printf "Performing a self-test ... " ; - flush_all () ; - if fails begin fun () -> - let cmd = Printf.sprintf - "cd %s/lib/tlaps; %s/bin/tlapm@EXE@ -C -I +examples/cantor Cantor1.tla > Cantor1.log 2>&1" - !output_dir !output_dir in - if Sys.command cmd <> 0 then - failwith "self-test failed" ; - maybe_unlink (path [!output_dir ; "lib/tlaps/Cantor1.log"]) ; - end then - fatal_error "Self-test unsuccessful!" ; - printf "done.\\n" ; - printf "\\nAll done.\\n\\n" ; - flush_all () ; - printf "REMEMBER to add %s to your \$PATH\\n" - (path [ !output_dir ; "bin" ]) ; - printf "You will also need to add\\n %!"; - let p = path [ !output_dir ; "lib"; "tlaps" ] in - begin match Sys.os_type with - | "Cygwin" -> - let cmd = sprintf "cygpath -d %s\\n" (Filename.quote p) in - ignore (Sys.command cmd); - | _ -> printf "%s\\n" p; - end; - printf "to the toolbox's library path \\ - (File->Preferences->TLA+ Preferences->Add Directory)\\n\\n"; - flush_all () - -EOF - -ocamlopt -w -3 -o "$TARGET" unix.cmxa str.cmxa "$SOURCE" -strip "$TARGET" || exit 0 -cat "$TLAPSVER.tar.gz" >> "$TARGET" -rm -f "$TLAPSVER.tar.gz" - -################################################################################ - -cat < Date: Thu, 15 Jun 2023 00:15:01 +0300 Subject: [PATCH 23/44] Split tlapm to a lib and exec, only execs support inline tests. Signed-off-by: Karolis Petrauskas --- src/dune | 13 +- src/tlapm.ml | 589 +--------------------------------------------- src/tlapm_lib.ml | 585 +++++++++++++++++++++++++++++++++++++++++++++ src/tlapm_lib.mli | 5 + 4 files changed, 604 insertions(+), 588 deletions(-) create mode 100644 src/tlapm_lib.ml create mode 100644 src/tlapm_lib.mli diff --git a/src/dune b/src/dune index 058769b5..476986b3 100644 --- a/src/dune +++ b/src/dune @@ -5,9 +5,16 @@ (executable (name tlapm) (public_name tlapm) - (modules (:standard setup_paths)) - (libraries unix str dune-site) - (foreign_stubs (language c) (names sysconf_stubs))) + (modules tlapm) + (libraries tlapm_lib)) + +(library + (name tlapm_lib) + (modules (:standard \ tlapm test_schedule why3_interface abstractor)) + (libraries unix str dune-site) + (foreign_stubs (language c) (names sysconf_stubs)) + (inline_tests) + (preprocess (pps ppx_inline_test))) (ocamllex alexer) diff --git a/src/tlapm.ml b/src/tlapm.ml index 2544bd42..82e93eb2 100644 --- a/src/tlapm.ml +++ b/src/tlapm.ml @@ -1,591 +1,10 @@ -(* Driver. - -Copyright (C) 2008-2010 INRIA and Microsoft Corporation -*) -open Ext -open Property -open Util.Coll - - -module P = Tla_parser.P - -open Proof.T - -open Module.T - -module Clocks = struct - include Timing - - let parsing = new_clock "parsing" - let print = new_clock "formatting" - let elab = new_clock "analysis" - let gen = new_clock "generation" - let prep = new_clock "simplification" - let backend = new_clock "interaction" - let check = new_clock "checking" - let fp_loading = new_clock "fp_loading" - let fp_saving = new_clock "fp_saving" - let fp_compute = new_clock "fp_compute" - - - let pad_left md str = Printf.sprintf "%*s" md str - - let report () = - let clocks = - [ total "total"; parsing; elab; gen; prep; print; backend; check; - fp_loading; fp_saving; fp_compute; ambient ] - in - let max_desc_width = - List.fold_left (fun mx cl -> max mx (String.length cl.desc)) 0 clocks - in - let clocks = - List.map (fun cl -> {cl with desc = pad_left max_desc_width cl.desc}) - clocks - in - Util.printf "(* %s | time (seconds) *)" - (pad_left max_desc_width "operation"); - Util.printf "(* %s-+--------------- *)" (String.make max_desc_width '-'); - List.iter begin - fun cl -> Util.printf "(* %s *)%!" (string_of_clock cl) - end (List.tl clocks); - Util.printf "(* %s-+--------------- *)" (String.make max_desc_width '-'); - Util.printf "(* %s *)" (string_of_clock (List.hd clocks)); - -end - - -let mkdir_tlaps t = - let cachedir = !Params.cachedir in - let tlapsdir = cachedir ^ "/" ^ t.core.name.core ^ ".tlaps" in - if not (Sys.file_exists cachedir) then begin - try - Unix.mkdir cachedir 0o777 - with error -> - let error_msg = Printexc.to_string error in - Errors.err "Could not create the \ - cache directory at the path \ - `%s`. Please ensure that if \ - a path is given via the \ - command-line parameter \ - `--cache-dir`, or via the \ - variable `TLAPM_CACHE_DIR` of \ - the runtime environment, \ - that a directory at that path \ - can be created. \n\ - The error message from calling \ - `Unix.mkdir` is:\n%s" - cachedir error_msg - end; - if not (Sys.file_exists tlapsdir) then Unix.mkdir tlapsdir 0o777; - (cachedir, tlapsdir) - - -let handle_abort _ = - if !Params.verbose then - Util.eprintf ~prefix:"FATAL: " ">>> Interrupted -- aborting <<<" ; - if !Params.stats then - Clocks.report () ; - Stdlib.exit 255 - - -module IntSet = Set.Make (struct type t = int let compare = (-) end) - -let modules_list : string list ref = ref [] - - -let print_proved_obligation (ob: Proof.T.obligation) = - if !Params.verbose then - Util.printf - ~at:ob.Proof.T.obl - ~prefix:"[INFO]: " - "@[Attempted to prove or check:@,%a@]@." - Proof.Fmt.pp_print_obligation ob - - -let print_proved_obligations - (proved: Proof.T.obligation list ref) - (obs: Proof.T.obligation array) - (tla_module: Module.T.mule): unit = - List.iter print_proved_obligation !proved - - -let print_unproved_obligation (ob: Proof.T.obligation) = - Util.eprintf - ~at:ob.Proof.T.obl - ~prefix:"[ERROR]: " - "@[Could not prove or check:@,%a@]@." - Proof.Fmt.pp_print_obligation ob - - -let print_unproved_obligations - (unproved: Proof.T.obligation list ref) - (obs: Proof.T.obligation array) - (tla_module: Module.T.mule): unit = - List.iter print_unproved_obligation !unproved; - let n_unproved = List.length !unproved in - let n_obligations = Array.length obs in - let s = if n_obligations > 1 then "s" else "" in - let n_neg = string_of_int n_unproved in - let n_all = string_of_int n_obligations in - if n_unproved <> 0 then begin - Util.eprintf - ~at:tla_module "%s" - ~prefix:"[ERROR]: " - (n_neg ^ "/" ^ n_all ^ " obligation" ^ s ^ " failed."); - Util.eprintf - "There were backend errors processing module `%S`." - tla_module.core.name.core; - if not !Params.toolbox then - failwith "backend errors: there are unproved obligations" - end else begin - Util.eprintf - ~at:tla_module "%s" - ~prefix:"[INFO]: " - ("All " ^ n_all ^ " obligation" ^ s ^ " proved.") - end - - -(* Note that when process_obs is called, all obligations have id fields *) -let process_obs - (t: Module.T.mule) - (obs: Proof.T.obligation array) - (modname: string) - (thyf: string) - (fpf: string): - unit = - (* initialize table of treated obligations *) - let treated = ref IntSet.empty in - (* initialize table of proved obligations *) - let proved_ids = ref IntSet.empty in - let record - (success: bool) - (ob: Proof.T.obligation): - unit = - (* the number `obl_id \in Nat` that identifies the obligation `ob` *) - let obl_id = Option.get ob.id in - (* store the obligation id number in the internal table `treated` *) - treated := IntSet.add obl_id !treated; - (* if the prover (frontend or backend) succeeded, *) - if success then (* then store the obligation id number in - the internal table `proved_ids` - *) - proved_ids := IntSet.add obl_id !proved_ids; - in - let collect_untreated_obligations - (untreated: Proof.T.obligation list ref): - unit = - (* Store in the `list ref` `untreated` all the obligations that - are not in the `IntSet` `treated`. - *) - let f ob = - let obl_id = Option.get ob.id in - if not (IntSet.mem obl_id !treated) then - untreated := ob :: !untreated; - in - Array.iter f obs - in - let collect_proved_obligations - (proved: Proof.T.obligation list ref): - unit = - let f ob = begin - let obl_id = Option.get ob.id in - if (IntSet.mem obl_id !proved_ids) then - proved := ob :: !proved - end - in - Array.iter f obs - in - let collect_unproved_obligations - (unproved: Proof.T.obligation list ref): - unit = - let f ob = begin - let obl_id = Option.get ob.id in - if not (IntSet.mem obl_id !proved_ids) then - unproved := ob :: !unproved - end - in - Array.iter f obs - in - Clocks.start Clocks.backend ; - (* initialize file for output of fingerprints - (saves fingerprints file history) - *) - let fpout = Fpfile.fp_init fpf !modules_list in - let thyout = Isabelle.thy_init modname thyf in - let _ = Errors.get_warnings () in - (* prepare proof tasks *) - let tasks = - try - let f = Prep.make_task fpout thyout record in - Array.to_list (Array.map f obs) - with Exit -> [] - in - (* proving *) - Schedule.run !Params.max_threads tasks; - Isabelle.thy_close thyf thyout; - (* close fingerprints file *) - Fpfile.fp_close_and_consolidate fpf fpout; - Clocks.stop (); - (* `--noproving` command line option or TLA+ Toolbox has sent "stop" *) - if not (!Params.noproving || (Toolbox.is_stopped ())) then begin - (* Check proof results for each obligation, output summary *) - if !Params.toolbox then begin - let untreated = ref [] in - collect_untreated_obligations untreated; - let result = - let c = Types.Cantwork "unexpected error" in - let fail = Types.RFail (Some c) in - Types.NTriv (fail, Method.Fail) - in - let f ob = - Toolbox.print_new_res ob result "" None - in - List.iter f !untreated - end; - (* Printing of proved and unproved obligations *) - let proved = ref [] in - let unproved = ref [] in - collect_proved_obligations proved; - collect_unproved_obligations unproved; - print_proved_obligations proved obs t; - print_unproved_obligations unproved obs t - end - - -let add_id i ob = {ob with id = Some (i+1)} - - -let toolbox_consider ob = - let loc = Option.get (Util.query_locus ob.Proof.T.obl) in - !Params.tb_sl <= Loc.line loc.Loc.start - && Loc.line loc.Loc.stop <= !Params.tb_el - -let toolbox_clean arr = - if !Params.toolbox - then List.filter toolbox_consider (Array.to_list arr) - else Array.to_list arr - - -let process_module - mcx - (t: Module.T.mule) = - modules_list := t.core.name.core :: !modules_list; - if t.core.important then begin - let (_, tlapsdir) = mkdir_tlaps t in - Params.output_dir := tlapsdir; - end; - (* names of theory and fingerprint files *) - (* Theory file name *) - let thyf: string = Filename.concat - !Params.output_dir (t.core.name.core ^ ".thy") - (* Fingerprints output file name *) - and fpf: string = Filename.concat - !Params.output_dir "fingerprints" - in - (* file for output of fingerprints *) - (Params.fpf_out: string option ref) := Some fpf; - (* cases of module (stage: Module.T.stage) = - | Special - | Final _ - | Parsed | Flat - *) - let (mcx, t) = match t.core.stage with - | Special -> (mcx, t) - | Final _ -> - if Params.debugging "rep" && t.core.important then begin - Clocks.start Clocks.print ; - Module.Fmt.pp_print_module - (Deque.empty, Ctx.dot) Format.std_formatter t ; - Format.printf "\n%!" ; - Clocks.stop () ; - end ; - (mcx, t) - | _ -> - if !Params.verbose then begin - Util.printf "(* processing module %S *)" t.core.name.core - end ; - Clocks.start Clocks.elab ; - (* Normalize the proofs in order to get proof obligations *) - let (mcx, t, summ) = Module.Elab.normalize mcx Deque.empty t in - (* - List.iter - (fun u -> Module.Fmt.pp_print_module - (Deque.empty, Ctx.dot) Format.std_formatter (snd u)) - (Sm.bindings mcx); - *) - (* - let _ = Sm.iter - (fun f u -> Printf.printf "Module: %s\n" u.core.name.core) - mcx in - *) - Clocks.stop () ; - if Params.debugging "rep" && t.core.important then begin - Clocks.start Clocks.print ; - Module.Fmt.pp_print_module - (Deque.empty, Ctx.dot) - Format.std_formatter t ; - Format.printf "\n%!" ; - Clocks.stop () ; - end ; - if !Params.stats && t.core.important then begin - Util.printf - "(* module %S: %d total %s *)" - t.core.name.core - summ.sum_total - (Util.plural summ.sum_total "obligation") - end ; - - (* managing the fingerprints (erasing or loading) *) - (* `--cleanfp` command line option *) - if !Params.cleanfp && t.core.important then begin - try - Sys.remove fpf; - Util.printf "(* fingerprints file %S removed *)%!" fpf - with _ -> - if Sys.file_exists fpf then - Util.printf "%s%s" ( - "(* did not succeed in removing " ^ - "fingerprints file %S *)%!") fpf - end - else begin - (* file for input of fingerprints *) - let fpf_in = begin - match !Params.fpf_in with - | Some f -> f (* `--usefp` command line option *) - | None -> fpf (* same as file for output of fingerprints *) - end in - if Sys.file_exists fpf_in - && (summ.sum_total <> 0) - && t.core.important - then begin - if !Params.no_fp then - Util.printf "(* will not use fingerprints \ - (because of option `--nofp`), \ - but will now load fingerprints from \ - the file `%s`, in order to overwrite with \ - the new fingerprints, and then save \ - the results at the end. *)%!" - fpf_in - else - Util.printf - "(* loading fingerprints in %S *)%!" - fpf_in; - Clocks.start Clocks.fp_loading; - (* load fingerprints from input file *) - Backend.Fpfile.load_fingerprints fpf_in; - Params.fp_loaded := true; - Params.fp_original_number := Backend.Fpfile.get_length (); - Clocks.stop () - end - end; - - flush stdout ; - Clocks.start Clocks.prep ; - let fin = match t.core.stage with - | Final fin -> fin - | _ -> Errors.bug ~at:t - "normalization didn't produce a finalized module" - in - let obs = Array.mapi add_id fin.final_obs in (* add obligation ids *) - let obs = toolbox_clean obs in (* only consider specified obligations *) - let fin = { - fin with final_obs = Array.of_list obs ; - final_status = (Incomplete, summ) } in - t.core.stage <- Final fin ; - Module.Save.store_module ~clock:Clocks.elab t ; - (mcx, t) - in - if !Params.summary && t.core.important then - Module.Fmt.summary t ; - begin match t.core.stage with - | Final fin when t.core.important - (* Array.length fin.final_obs > 0 *) - -> - if !Params.verbose then - Util.printf "(* module %S: %d unique obligations *)" - t.core.name.core - (Array.length fin.final_obs) ; - - if (!Params.toolbox) then begin - let f ob = - Backend.Toolbox.toolbox_print - ob - "to be proved" - None - None - 0. - None - !Params.printallobs None "" None - in - (* prints the list of obligations which have to be proved *) - Array.iter f fin.final_obs; - (* prints total number of obligations *) - Backend.Toolbox.print_ob_number - (Array.length fin.final_obs) ; - end; - - let missing = - match fin.final_status with - | (Incomplete, miss) -> snd (miss.sum_absent) - | _ -> [] - in - - begin - if not !Params.suppress_all then - process_obs t fin.final_obs - t.core.name.core thyf fpf; - - (** Added by HV. It collects all facts and definitions used in the - current proof tree into a one-line proof. *) - if Params.debugging "oneline" && t.core.important then begin - Util.eprintf "One-line proof:\n"; - match Module.Gen.collect_usables t with - | None -> Util.eprintf " OBVIOUS" - | Some u -> - let s = Util.sprintf "@[%a@]" - (Proof.Fmt.pp_print_usable (Deque.empty,Ctx.dot)) u in - let s = Str.global_replace (Str.regexp "?") "" s in - Util.eprintf " BY @[%s@]@.\n" s - end else (); - - let wrap x = { core = x; props = [] } in - let dummy_seq = { - Expr.T.context = Deque.empty; - Expr.T.active = wrap (Expr.T.String ""); - } in - let dummy_ob: Proof.T.obligation = { - id = None; - obl = wrap dummy_seq; - fingerprint = None; - kind = Ob_main; - } in - Array.fill fin.final_obs 0 (Array.length fin.final_obs) dummy_ob; - - if t.core.important && not (Toolbox.is_stopped ()) then begin - Clocks.start Clocks.check ; - let modname = t.core.name.core in - let nmiss = List.length missing in - if !Params.check then - Std.finally Clocks.stop Isabelle.recheck (modname, nmiss, thyf) - end; - Clocks.stop (); - (mcx, t) - end - | _ -> (mcx, t) - end - -let read_new_modules mcx fs = - (* Read the files with names in the list of strings `fs`. *) - List.fold_left begin - fun (mcx, mods) fn -> - let mule = - Module.Save.parse_file ~clock:Clocks.parsing - (Util.locate fn Loc.unknown) - in - (* set a flag for each module of the new modules that it is important *) - mule.core.important <- true ; - let mcx = Sm.add mule.core.name.core mule mcx in - (* `mcx` is a mapping from names of already loaded modules and - modules loaded by the function `read_new_modules`, to modules - (values of type `mule`) - - `mods` is a list of module (values of type `mule`) that are loaded by - the function `read_new_modules`. - *) - (mcx, mule :: mods) - end (mcx, []) fs - - -let print_modules mcx = - print_string "\nModules loaded so far:\n"; - Sm.iter (fun name mule -> Printf.printf "Module name: \"%s\"\n" name) mcx - -let append_ext_if_not_tla filename = - if Filename.check_suffix filename ".tla" then - filename - else - filename ^ ".tla" - - -let map_paths_to_filenames paths = - let basenames = List.map Filename.basename paths in - List.map append_ext_if_not_tla basenames - - let main fs = - Params.input_files := map_paths_to_filenames fs; - let () = - List.iter begin - fun s -> - ignore (Sys.signal s (Sys.Signal_handle handle_abort)) - end [Sys.sigint ; Sys.sigabrt ; Sys.sigterm] in - let () = Format.pp_set_max_indent Format.std_formatter 2_000_000 in - let mcx = Module.Standard.initctx in - (* reads the new modules and return both the map:name->module with the new - * module and a list of the new modules*) - (* The module names (or file names) in the list `fs` are those listed on - the command line. Each file is read by the function `read_new_modules . - Submodules are read below. - *) - let (mcx, mods) = read_new_modules mcx fs in - (* print_modules mcx; *) - if List.length mods = 0 then begin - Util.eprintf ~prefix:"FATAL: " "could not read any modules successfully!" ; - failwith "fatal error: could not read any modules"; - end else begin - (* load the transitive closure over extends of all modules *) - (* TODO: load also modules that occur in `INSTANCE` statements from extended modules. *) - let mcx = Module.Save.complete_load ~clock:Clocks.parsing mcx in - (* flatten the modules *) - let (mcx, mods) = Module.Dep.schedule mcx in - let f mcx m = - (* processing the proofs in the commandline modules *) - let (mcx, m) = process_module mcx m in - Sm.add m.core.name.core m mcx - in - ignore (List.fold_left f mcx mods) - end ; - if !Params.stats then Clocks.report () - - -let init () = - Random.self_init(); - Printexc.record_backtrace true; - Format.pp_set_max_indent Format.err_formatter 35; - if Params.debugging "main" then - main (Tlapm_args.init ()) - else - try main (Tlapm_args.init ()) with - | Errors.Fatal -> - Util.eprintf "tlapm: Exiting because of the above error."; - exit 0; - | e -> - let backtrace = Printexc.get_backtrace () in - Format.pp_print_flush Format.std_formatter (); - Format.pp_print_flush Format.err_formatter (); - Stdlib.flush stdout; - Stdlib.flush stderr; - let error = (Printexc.to_string e) ^ "\n" ^ backtrace in - Util.eprintf ~prefix:"FATAL:" " tlapm ending abnormally with %s" error; - let config = Params.print_config_toolbox false in - begin match !Errors.loc, !Errors.msg with - | Some l, Some m -> Backend.Toolbox.print_message (l ^ "\n\n" ^ m) - | None, Some m -> Backend.Toolbox.print_message m - | _, _ -> - let msg = - Printf.sprintf - "Oops, this seems to be a bug in TLAPM.\n\ - Please give feedback to developers.\n\n\n %s\n%s" - error config - in - let url = "http://tla.msr-inria.inria.fr/bugs" in - Backend.Toolbox.print_message_url msg url; - end; - exit 3 + Tlapm_lib.main fs; exception Stacktrace;; -Sys.set_signal +let () = + Sys.set_signal Sys.sigusr1 (Sys.Signal_handle (fun _ -> raise Stacktrace)); -init () + Tlapm_lib.init (); diff --git a/src/tlapm_lib.ml b/src/tlapm_lib.ml new file mode 100644 index 00000000..a129ff73 --- /dev/null +++ b/src/tlapm_lib.ml @@ -0,0 +1,585 @@ +(* Driver. + +Copyright (C) 2008-2010 INRIA and Microsoft Corporation +*) +open Ext +open Property +open Util.Coll + + +module P = Tla_parser.P + +open Proof.T + +open Module.T + +module Clocks = struct + include Timing + + let parsing = new_clock "parsing" + let print = new_clock "formatting" + let elab = new_clock "analysis" + let gen = new_clock "generation" + let prep = new_clock "simplification" + let backend = new_clock "interaction" + let check = new_clock "checking" + let fp_loading = new_clock "fp_loading" + let fp_saving = new_clock "fp_saving" + let fp_compute = new_clock "fp_compute" + + + let pad_left md str = Printf.sprintf "%*s" md str + + let report () = + let clocks = + [ total "total"; parsing; elab; gen; prep; print; backend; check; + fp_loading; fp_saving; fp_compute; ambient ] + in + let max_desc_width = + List.fold_left (fun mx cl -> max mx (String.length cl.desc)) 0 clocks + in + let clocks = + List.map (fun cl -> {cl with desc = pad_left max_desc_width cl.desc}) + clocks + in + Util.printf "(* %s | time (seconds) *)" + (pad_left max_desc_width "operation"); + Util.printf "(* %s-+--------------- *)" (String.make max_desc_width '-'); + List.iter begin + fun cl -> Util.printf "(* %s *)%!" (string_of_clock cl) + end (List.tl clocks); + Util.printf "(* %s-+--------------- *)" (String.make max_desc_width '-'); + Util.printf "(* %s *)" (string_of_clock (List.hd clocks)); + +end + + +let mkdir_tlaps t = + let cachedir = !Params.cachedir in + let tlapsdir = cachedir ^ "/" ^ t.core.name.core ^ ".tlaps" in + if not (Sys.file_exists cachedir) then begin + try + Unix.mkdir cachedir 0o777 + with error -> + let error_msg = Printexc.to_string error in + Errors.err "Could not create the \ + cache directory at the path \ + `%s`. Please ensure that if \ + a path is given via the \ + command-line parameter \ + `--cache-dir`, or via the \ + variable `TLAPM_CACHE_DIR` of \ + the runtime environment, \ + that a directory at that path \ + can be created. \n\ + The error message from calling \ + `Unix.mkdir` is:\n%s" + cachedir error_msg + end; + if not (Sys.file_exists tlapsdir) then Unix.mkdir tlapsdir 0o777; + (cachedir, tlapsdir) + + +let handle_abort _ = + if !Params.verbose then + Util.eprintf ~prefix:"FATAL: " ">>> Interrupted -- aborting <<<" ; + if !Params.stats then + Clocks.report () ; + Stdlib.exit 255 + + +module IntSet = Set.Make (struct type t = int let compare = (-) end) + +let modules_list : string list ref = ref [] + + +let print_proved_obligation (ob: Proof.T.obligation) = + if !Params.verbose then + Util.printf + ~at:ob.Proof.T.obl + ~prefix:"[INFO]: " + "@[Attempted to prove or check:@,%a@]@." + Proof.Fmt.pp_print_obligation ob + + +let print_proved_obligations + (proved: Proof.T.obligation list ref) + (obs: Proof.T.obligation array) + (tla_module: Module.T.mule): unit = + List.iter print_proved_obligation !proved + + +let print_unproved_obligation (ob: Proof.T.obligation) = + Util.eprintf + ~at:ob.Proof.T.obl + ~prefix:"[ERROR]: " + "@[Could not prove or check:@,%a@]@." + Proof.Fmt.pp_print_obligation ob + + +let print_unproved_obligations + (unproved: Proof.T.obligation list ref) + (obs: Proof.T.obligation array) + (tla_module: Module.T.mule): unit = + List.iter print_unproved_obligation !unproved; + let n_unproved = List.length !unproved in + let n_obligations = Array.length obs in + let s = if n_obligations > 1 then "s" else "" in + let n_neg = string_of_int n_unproved in + let n_all = string_of_int n_obligations in + if n_unproved <> 0 then begin + Util.eprintf + ~at:tla_module "%s" + ~prefix:"[ERROR]: " + (n_neg ^ "/" ^ n_all ^ " obligation" ^ s ^ " failed."); + Util.eprintf + "There were backend errors processing module `%S`." + tla_module.core.name.core; + if not !Params.toolbox then + failwith "backend errors: there are unproved obligations" + end else begin + Util.eprintf + ~at:tla_module "%s" + ~prefix:"[INFO]: " + ("All " ^ n_all ^ " obligation" ^ s ^ " proved.") + end + + +(* Note that when process_obs is called, all obligations have id fields *) +let process_obs + (t: Module.T.mule) + (obs: Proof.T.obligation array) + (modname: string) + (thyf: string) + (fpf: string): + unit = + (* initialize table of treated obligations *) + let treated = ref IntSet.empty in + (* initialize table of proved obligations *) + let proved_ids = ref IntSet.empty in + let record + (success: bool) + (ob: Proof.T.obligation): + unit = + (* the number `obl_id \in Nat` that identifies the obligation `ob` *) + let obl_id = Option.get ob.id in + (* store the obligation id number in the internal table `treated` *) + treated := IntSet.add obl_id !treated; + (* if the prover (frontend or backend) succeeded, *) + if success then (* then store the obligation id number in + the internal table `proved_ids` + *) + proved_ids := IntSet.add obl_id !proved_ids; + in + let collect_untreated_obligations + (untreated: Proof.T.obligation list ref): + unit = + (* Store in the `list ref` `untreated` all the obligations that + are not in the `IntSet` `treated`. + *) + let f ob = + let obl_id = Option.get ob.id in + if not (IntSet.mem obl_id !treated) then + untreated := ob :: !untreated; + in + Array.iter f obs + in + let collect_proved_obligations + (proved: Proof.T.obligation list ref): + unit = + let f ob = begin + let obl_id = Option.get ob.id in + if (IntSet.mem obl_id !proved_ids) then + proved := ob :: !proved + end + in + Array.iter f obs + in + let collect_unproved_obligations + (unproved: Proof.T.obligation list ref): + unit = + let f ob = begin + let obl_id = Option.get ob.id in + if not (IntSet.mem obl_id !proved_ids) then + unproved := ob :: !unproved + end + in + Array.iter f obs + in + Clocks.start Clocks.backend ; + (* initialize file for output of fingerprints + (saves fingerprints file history) + *) + let fpout = Fpfile.fp_init fpf !modules_list in + let thyout = Isabelle.thy_init modname thyf in + let _ = Errors.get_warnings () in + (* prepare proof tasks *) + let tasks = + try + let f = Prep.make_task fpout thyout record in + Array.to_list (Array.map f obs) + with Exit -> [] + in + (* proving *) + Schedule.run !Params.max_threads tasks; + Isabelle.thy_close thyf thyout; + (* close fingerprints file *) + Fpfile.fp_close_and_consolidate fpf fpout; + Clocks.stop (); + (* `--noproving` command line option or TLA+ Toolbox has sent "stop" *) + if not (!Params.noproving || (Toolbox.is_stopped ())) then begin + (* Check proof results for each obligation, output summary *) + if !Params.toolbox then begin + let untreated = ref [] in + collect_untreated_obligations untreated; + let result = + let c = Types.Cantwork "unexpected error" in + let fail = Types.RFail (Some c) in + Types.NTriv (fail, Method.Fail) + in + let f ob = + Toolbox.print_new_res ob result "" None + in + List.iter f !untreated + end; + (* Printing of proved and unproved obligations *) + let proved = ref [] in + let unproved = ref [] in + collect_proved_obligations proved; + collect_unproved_obligations unproved; + print_proved_obligations proved obs t; + print_unproved_obligations unproved obs t + end + + +let add_id i ob = {ob with id = Some (i+1)} + + +let toolbox_consider ob = + let loc = Option.get (Util.query_locus ob.Proof.T.obl) in + !Params.tb_sl <= Loc.line loc.Loc.start + && Loc.line loc.Loc.stop <= !Params.tb_el + +let toolbox_clean arr = + if !Params.toolbox + then List.filter toolbox_consider (Array.to_list arr) + else Array.to_list arr + + +let process_module + mcx + (t: Module.T.mule) = + modules_list := t.core.name.core :: !modules_list; + if t.core.important then begin + let (_, tlapsdir) = mkdir_tlaps t in + Params.output_dir := tlapsdir; + end; + (* names of theory and fingerprint files *) + (* Theory file name *) + let thyf: string = Filename.concat + !Params.output_dir (t.core.name.core ^ ".thy") + (* Fingerprints output file name *) + and fpf: string = Filename.concat + !Params.output_dir "fingerprints" + in + (* file for output of fingerprints *) + (Params.fpf_out: string option ref) := Some fpf; + (* cases of module (stage: Module.T.stage) = + | Special + | Final _ + | Parsed | Flat + *) + let (mcx, t) = match t.core.stage with + | Special -> (mcx, t) + | Final _ -> + if Params.debugging "rep" && t.core.important then begin + Clocks.start Clocks.print ; + Module.Fmt.pp_print_module + (Deque.empty, Ctx.dot) Format.std_formatter t ; + Format.printf "\n%!" ; + Clocks.stop () ; + end ; + (mcx, t) + | _ -> + if !Params.verbose then begin + Util.printf "(* processing module %S *)" t.core.name.core + end ; + Clocks.start Clocks.elab ; + (* Normalize the proofs in order to get proof obligations *) + let (mcx, t, summ) = Module.Elab.normalize mcx Deque.empty t in + (* + List.iter + (fun u -> Module.Fmt.pp_print_module + (Deque.empty, Ctx.dot) Format.std_formatter (snd u)) + (Sm.bindings mcx); + *) + (* + let _ = Sm.iter + (fun f u -> Printf.printf "Module: %s\n" u.core.name.core) + mcx in + *) + Clocks.stop () ; + if Params.debugging "rep" && t.core.important then begin + Clocks.start Clocks.print ; + Module.Fmt.pp_print_module + (Deque.empty, Ctx.dot) + Format.std_formatter t ; + Format.printf "\n%!" ; + Clocks.stop () ; + end ; + if !Params.stats && t.core.important then begin + Util.printf + "(* module %S: %d total %s *)" + t.core.name.core + summ.sum_total + (Util.plural summ.sum_total "obligation") + end ; + + (* managing the fingerprints (erasing or loading) *) + (* `--cleanfp` command line option *) + if !Params.cleanfp && t.core.important then begin + try + Sys.remove fpf; + Util.printf "(* fingerprints file %S removed *)%!" fpf + with _ -> + if Sys.file_exists fpf then + Util.printf "%s%s" ( + "(* did not succeed in removing " ^ + "fingerprints file %S *)%!") fpf + end + else begin + (* file for input of fingerprints *) + let fpf_in = begin + match !Params.fpf_in with + | Some f -> f (* `--usefp` command line option *) + | None -> fpf (* same as file for output of fingerprints *) + end in + if Sys.file_exists fpf_in + && (summ.sum_total <> 0) + && t.core.important + then begin + if !Params.no_fp then + Util.printf "(* will not use fingerprints \ + (because of option `--nofp`), \ + but will now load fingerprints from \ + the file `%s`, in order to overwrite with \ + the new fingerprints, and then save \ + the results at the end. *)%!" + fpf_in + else + Util.printf + "(* loading fingerprints in %S *)%!" + fpf_in; + Clocks.start Clocks.fp_loading; + (* load fingerprints from input file *) + Backend.Fpfile.load_fingerprints fpf_in; + Params.fp_loaded := true; + Params.fp_original_number := Backend.Fpfile.get_length (); + Clocks.stop () + end + end; + + flush stdout ; + Clocks.start Clocks.prep ; + let fin = match t.core.stage with + | Final fin -> fin + | _ -> Errors.bug ~at:t + "normalization didn't produce a finalized module" + in + let obs = Array.mapi add_id fin.final_obs in (* add obligation ids *) + let obs = toolbox_clean obs in (* only consider specified obligations *) + let fin = { + fin with final_obs = Array.of_list obs ; + final_status = (Incomplete, summ) } in + t.core.stage <- Final fin ; + Module.Save.store_module ~clock:Clocks.elab t ; + (mcx, t) + in + if !Params.summary && t.core.important then + Module.Fmt.summary t ; + begin match t.core.stage with + | Final fin when t.core.important + (* Array.length fin.final_obs > 0 *) + -> + if !Params.verbose then + Util.printf "(* module %S: %d unique obligations *)" + t.core.name.core + (Array.length fin.final_obs) ; + + if (!Params.toolbox) then begin + let f ob = + Backend.Toolbox.toolbox_print + ob + "to be proved" + None + None + 0. + None + !Params.printallobs None "" None + in + (* prints the list of obligations which have to be proved *) + Array.iter f fin.final_obs; + (* prints total number of obligations *) + Backend.Toolbox.print_ob_number + (Array.length fin.final_obs) ; + end; + + let missing = + match fin.final_status with + | (Incomplete, miss) -> snd (miss.sum_absent) + | _ -> [] + in + + begin + if not !Params.suppress_all then + process_obs t fin.final_obs + t.core.name.core thyf fpf; + + (** Added by HV. It collects all facts and definitions used in the + current proof tree into a one-line proof. *) + if Params.debugging "oneline" && t.core.important then begin + Util.eprintf "One-line proof:\n"; + match Module.Gen.collect_usables t with + | None -> Util.eprintf " OBVIOUS" + | Some u -> + let s = Util.sprintf "@[%a@]" + (Proof.Fmt.pp_print_usable (Deque.empty,Ctx.dot)) u in + let s = Str.global_replace (Str.regexp "?") "" s in + Util.eprintf " BY @[%s@]@.\n" s + end else (); + + let wrap x = { core = x; props = [] } in + let dummy_seq = { + Expr.T.context = Deque.empty; + Expr.T.active = wrap (Expr.T.String ""); + } in + let dummy_ob: Proof.T.obligation = { + id = None; + obl = wrap dummy_seq; + fingerprint = None; + kind = Ob_main; + } in + Array.fill fin.final_obs 0 (Array.length fin.final_obs) dummy_ob; + + if t.core.important && not (Toolbox.is_stopped ()) then begin + Clocks.start Clocks.check ; + let modname = t.core.name.core in + let nmiss = List.length missing in + if !Params.check then + Std.finally Clocks.stop Isabelle.recheck (modname, nmiss, thyf) + end; + Clocks.stop (); + (mcx, t) + end + | _ -> (mcx, t) + end + +let read_new_modules mcx fs = + (* Read the files with names in the list of strings `fs`. *) + List.fold_left begin + fun (mcx, mods) fn -> + let mule = + Module.Save.parse_file ~clock:Clocks.parsing + (Util.locate fn Loc.unknown) + in + (* set a flag for each module of the new modules that it is important *) + mule.core.important <- true ; + let mcx = Sm.add mule.core.name.core mule mcx in + (* `mcx` is a mapping from names of already loaded modules and + modules loaded by the function `read_new_modules`, to modules + (values of type `mule`) + + `mods` is a list of module (values of type `mule`) that are loaded by + the function `read_new_modules`. + *) + (mcx, mule :: mods) + end (mcx, []) fs + + +let print_modules mcx = + print_string "\nModules loaded so far:\n"; + Sm.iter (fun name mule -> Printf.printf "Module name: \"%s\"\n" name) mcx + +let append_ext_if_not_tla filename = + if Filename.check_suffix filename ".tla" then + filename + else + filename ^ ".tla" + + +let map_paths_to_filenames paths = + let basenames = List.map Filename.basename paths in + List.map append_ext_if_not_tla basenames + + +let main fs = + Params.input_files := map_paths_to_filenames fs; + let () = + List.iter begin + fun s -> + ignore (Sys.signal s (Sys.Signal_handle handle_abort)) + end [Sys.sigint ; Sys.sigabrt ; Sys.sigterm] in + let () = Format.pp_set_max_indent Format.std_formatter 2_000_000 in + let mcx = Module.Standard.initctx in + (* reads the new modules and return both the map:name->module with the new + * module and a list of the new modules*) + (* The module names (or file names) in the list `fs` are those listed on + the command line. Each file is read by the function `read_new_modules . + Submodules are read below. + *) + let (mcx, mods) = read_new_modules mcx fs in + (* print_modules mcx; *) + if List.length mods = 0 then begin + Util.eprintf ~prefix:"FATAL: " "could not read any modules successfully!" ; + failwith "fatal error: could not read any modules"; + end else begin + (* load the transitive closure over extends of all modules *) + (* TODO: load also modules that occur in `INSTANCE` statements from extended modules. *) + let mcx = Module.Save.complete_load ~clock:Clocks.parsing mcx in + (* flatten the modules *) + let (mcx, mods) = Module.Dep.schedule mcx in + let f mcx m = + (* processing the proofs in the commandline modules *) + let (mcx, m) = process_module mcx m in + Sm.add m.core.name.core m mcx + in + ignore (List.fold_left f mcx mods) + end ; + if !Params.stats then Clocks.report () + + +let init () = + Random.self_init(); + Printexc.record_backtrace true; + Format.pp_set_max_indent Format.err_formatter 35; + if Params.debugging "main" then + main (Tlapm_args.init ()) + else + try main (Tlapm_args.init ()) with + | Errors.Fatal -> + Util.eprintf "tlapm: Exiting because of the above error."; + exit 0; + | e -> + let backtrace = Printexc.get_backtrace () in + Format.pp_print_flush Format.std_formatter (); + Format.pp_print_flush Format.err_formatter (); + Stdlib.flush stdout; + Stdlib.flush stderr; + let error = (Printexc.to_string e) ^ "\n" ^ backtrace in + Util.eprintf ~prefix:"FATAL:" " tlapm ending abnormally with %s" error; + let config = Params.print_config_toolbox false in + begin match !Errors.loc, !Errors.msg with + | Some l, Some m -> Backend.Toolbox.print_message (l ^ "\n\n" ^ m) + | None, Some m -> Backend.Toolbox.print_message m + | _, _ -> + let msg = + Printf.sprintf + "Oops, this seems to be a bug in TLAPM.\n\ + Please give feedback to developers.\n\n\n %s\n%s" + error config + in + let url = "http://tla.msr-inria.inria.fr/bugs" in + Backend.Toolbox.print_message_url msg url; + end; + exit 3 + diff --git a/src/tlapm_lib.mli b/src/tlapm_lib.mli new file mode 100644 index 00000000..4b76d1c9 --- /dev/null +++ b/src/tlapm_lib.mli @@ -0,0 +1,5 @@ +(* + * Copyright (C) 2008-2010 INRIA and Microsoft Corporation + *) + val main: string list -> unit + val init: unit -> unit From f8b47ebbd04ab3f10aafe2dca82b9b86cb340b7f Mon Sep 17 00:00:00 2001 From: Karolis Petrauskas Date: Thu, 15 Jun 2023 23:17:38 +0300 Subject: [PATCH 24/44] All the kaputt tests ported to ppx_inline_tests. Signed-off-by: Karolis Petrauskas --- .github/workflows/main.yml | 3 - .github/workflows/pr.yml | 3 - .github/workflows/release.yml | 3 - Makefile | 5 +- src/dune | 8 +- src/expr/e_elab.ml | 72 +++++++++++++++++ src/expr/e_elab.mlt | 143 ---------------------------------- src/expr/e_tla_norm.ml | 37 +++++++++ src/expr/e_tla_norm.mlt | 64 --------------- src/module/m_dep.ml | 70 +++++++++++++++++ src/module/m_dep.mlt | 102 ------------------------ src/module/m_save.ml | 42 ++++++++++ src/module/m_save.mlt | 68 ---------------- 13 files changed, 230 insertions(+), 390 deletions(-) delete mode 100644 src/expr/e_elab.mlt delete mode 100644 src/expr/e_tla_norm.mlt delete mode 100644 src/module/m_dep.mlt delete mode 100644 src/module/m_save.mlt diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 81402a76..eae53e64 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -52,9 +52,6 @@ jobs: run: | ./tools/installer/\ ${{ env.INSTALLER }} -d . - - name: Install dependencies for testing - run: | - opam install kaputt - name: Run a subset of `tlapm` tests run: | eval $(opam env) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 9b9ae480..76207155 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -61,9 +61,6 @@ jobs: run: | ./tools/installer/\ ${{ env.INSTALLER }} -d . - - name: Install dependencies for testing - run: | - opam install kaputt - name: Run a subset of `tlapm` tests run: | eval $(opam env) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0650458f..d44412d8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -127,9 +127,6 @@ jobs: run: | ./tools/installer/\ ${{ env.INSTALLER }} -d . - - name: Install dependencies for testing - run: | - opam install kaputt - name: Run a subset of `tlapm` tests run: | eval $(opam env) diff --git a/Makefile b/Makefile index d6c1e50f..a40e4c25 100644 --- a/Makefile +++ b/Makefile @@ -18,6 +18,9 @@ check: test test: dune runtest +test-inline: + dune runtest src + install: dune install --prefix=$(PREFIX) make -C $(PREFIX)/lib/tlapm/ -f Makefile.post-install @@ -32,5 +35,5 @@ release: clean: dune clean -.PHONY: all build check test install release clean +.PHONY: all build check test test-inline install release clean diff --git a/src/dune b/src/dune index 476986b3..87acf27e 100644 --- a/src/dune +++ b/src/dune @@ -11,10 +11,12 @@ (library (name tlapm_lib) (modules (:standard \ tlapm test_schedule why3_interface abstractor)) - (libraries unix str dune-site) + (libraries + unix str dune-site ; main deps. + sexplib) ; for inline tests only (ppx_assert). (foreign_stubs (language c) (names sysconf_stubs)) - (inline_tests) - (preprocess (pps ppx_inline_test))) + (inline_tests (deps "../test/resources/module/m_save/TLC.tla")) + (preprocess (pps ppx_inline_test ppx_assert))) (ocamllex alexer) diff --git a/src/expr/e_elab.ml b/src/expr/e_elab.ml index d7bf4f3c..13a42bc4 100644 --- a/src/expr/e_elab.ml +++ b/src/expr/e_elab.ml @@ -210,3 +210,75 @@ let replace_at scx e r = will_replace := Some r.core; let res = replace_at_aux scx e in will_replace := None; res + + +let%test_module _ = (module struct + let sexp_of_string = Sexplib.Std.sexp_of_string + let compare_string = Base.compare_string + + let parse_expr = Tla_parser.P.use (E_parser.expr true) + let nullctx = (Deque.empty, Ctx.dot) + + let create_expression str = + let (flex, _) = Alexer.lex_string str in + match Tla_parser.P.run parse_expr ~init:Tla_parser.init ~source:flex with + | Some e -> e + | None -> failwith "cannot parse test string" + + let prn_exp exp = + Tla_parser.Fu.pp_print_minimal + Format.str_formatter (E_fmt.fmt_expr nullctx exp); + Format.flush_str_formatter () + + let prn_str str = str + + let%test_unit "test_case_1" = + let (flex, _) = Alexer.lex_string "[f EXCEPT ![0] = 0, ![1] = 1][0] = f[0]" in + match Tla_parser.P.run parse_expr ~init:Tla_parser.init ~source:flex with + | Some e -> () + | None -> failwith "cannot parse test string" + + let%test_unit "t1" = + let test_case = create_expression "[f EXCEPT ![0] = 0, ![1] = 1]" in + let target_case = create_expression "[[f EXCEPT ![0] = 0] EXCEPT ![1] = 1]" in + [%test_eq: string] (prn_exp target_case) (prn_exp (normalize Deque.empty test_case)) + + let%test_unit "t2" = + let test_case = create_expression "[[f EXCEPT ![0] = 10, ![1] = 1] EXCEPT ![0] = 0]" in + let target_case = create_expression "[[[f EXCEPT ![0] = 10] EXCEPT ![1] = 1] EXCEPT ![0] = 0]" in + [%test_eq: string] (prn_exp target_case) (prn_exp (normalize Deque.empty test_case)) + + let%test_unit "t3" = + let test_case = create_expression "[f EXCEPT ![0] = ([f EXCEPT ![0] = 1, ![1] = 0][1])]" in + let target_case = create_expression "[f EXCEPT ![0] = ([[f EXCEPT ![0] = 1] EXCEPT ![1] = 0][1])]" in + [%test_eq: string] (prn_exp target_case) (prn_exp (normalize Deque.empty test_case)) + + let%test_unit "t4" = + let test_case = create_expression "[f EXCEPT ![([f EXCEPT ![0] = 1, ![1] = 0][1])] = 2]" in + let target_case = create_expression "[f EXCEPT ![([[f EXCEPT ![0] = 1] EXCEPT ![1] = 0][1])] = 2]" in + [%test_eq: string] (prn_exp target_case) (prn_exp (normalize Deque.empty test_case)) + + let%test_unit "t5" = + let test_case = create_expression "[f EXCEPT !.a = 3, !.b = 2, !.c = 1]" in + let target_case = create_expression "[[[f EXCEPT !.a = 3] EXCEPT !.b = 2] EXCEPT !.c = 1]" in + [%test_eq: string] (prn_exp target_case) (prn_exp (normalize Deque.empty test_case)) + + let%test_unit "t6" = + let test_string = "[[arr EXCEPT ![x][y] = foo] EXCEPT ![u][v] = bar]" in + let test_case = create_expression test_string in + let target_case = create_expression + "[[arr EXCEPT ![x] = [arr[x] EXCEPT ![y] = foo]] EXCEPT ![u] = \ + [[arr EXCEPT ![x] = [arr[x] EXCEPT ![y] = foo]][u] EXCEPT ![v] = bar]]" in + [%test_eq: string] (prn_exp target_case) (prn_exp (normalize Deque.empty test_case)) + + (* + let%test_unit "t7" [@tags "disabled"] = (* doesnt work because we need to anonimie the created expressions from the parser*) + let test_string = "f[x]'" in + let test_case = create_expression test_string in + let target_case = create_expression "f'[x']" in + (* let x = normalize Deque.empty test_case in + Printf.eprintf "compare: %d\n" (Pervasives.compare x target_case); *) + [%test_eq: string] (prn_exp target_case) (prn_exp (normalize Deque.empty test_case)) + *) + +end) diff --git a/src/expr/e_elab.mlt b/src/expr/e_elab.mlt deleted file mode 100644 index 3a113cfc..00000000 --- a/src/expr/e_elab.mlt +++ /dev/null @@ -1,143 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - -open Kaputt.Abbreviations;; - - -let title_suite = "e_elab - " - -let title_except_normalize = title_suite ^ "except_normalize should " - -let title_en_group = title_except_normalize - ^ "normalize correctly exceptions of the form " - -(* auxiliary definitions *) -let parse_expr = Tla_parser.P.use (E_parser.expr true);; -let nullctx = (Deque.empty, Ctx.dot);; - - -(* The expression will be parsed from this string *) -let (flex, _) = Alexer.lex_string "[f EXCEPT ![0] = 0, ![1] = 1][0] = f[0]";; - -(* e is the expression *) -let test_case_1 = - match Tla_parser.P.run parse_expr ~init:Tla_parser.init ~source:flex with - | Some e -> e - | None -> failwith "cannot parse test string" -;; - -let create_expression str = - let (flex, _) = Alexer.lex_string str in - match Tla_parser.P.run parse_expr ~init:Tla_parser.init ~source:flex with - | Some e -> e - | None -> failwith "cannot parse test string" - -let prn_exp exp = - Tla_parser.Fu.pp_print_minimal - Format.str_formatter (E_fmt.fmt_expr nullctx exp); - Format.flush_str_formatter () - -let prn_str str = str - -let t1 = - let test_string = "[f EXCEPT ![0] = 0, ![1] = 1]" in - let test_case = create_expression test_string in - let target_case = create_expression - "[[f EXCEPT ![0] = 0] EXCEPT ![1] = 1]" in - (* let x = normalize Deque.empty test_case in - Printf.eprintf "compare: %d\n" (Pervasives.compare x target_case); *) - Test.make_simple_test - ~title:(title_en_group ^ test_string) - ( fun () -> - Assert.equal (prn_exp target_case) - (prn_exp (normalize Deque.empty test_case))) - -let t2 = - let test_string = "[[f EXCEPT ![0] = 10, ![1] = 1] EXCEPT ![0] = 0]" in - let test_case = create_expression test_string in - let target_case = create_expression - "[[[f EXCEPT ![0] = 10] EXCEPT ![1] = 1] EXCEPT ![0] = 0]" in - Test.make_simple_test - ~title:(title_en_group ^ test_string) - ( fun () -> - Assert.equal (prn_exp target_case) - (prn_exp (normalize Deque.empty test_case))) - -let t3 = - let test_string = "[f EXCEPT ![0] = ([f EXCEPT ![0] = 1, ![1] = 0][1])]" in - let test_case = create_expression test_string in - let target_case = create_expression - "[f EXCEPT ![0] = ([[f EXCEPT ![0] = 1] EXCEPT ![1] = 0][1])]" in - Test.make_simple_test - ~title:(title_en_group ^ test_string) - ( fun () -> - Assert.equal (prn_exp target_case) - (prn_exp (normalize Deque.empty test_case))) - -let t4 = - let test_string = "[f EXCEPT ![([f EXCEPT ![0] = 1, ![1] = 0][1])] = 2]" in - let test_case = create_expression test_string in - let target_case = create_expression - "[f EXCEPT ![([[f EXCEPT ![0] = 1] EXCEPT ![1] = 0][1])] = 2]" in - Test.make_simple_test - ~title:(title_en_group ^ test_string) - ( fun () -> - Assert.equal (prn_exp target_case) - (prn_exp (normalize Deque.empty test_case))) - -let t5 = - let test_string = "[f EXCEPT !.a = 3, !.b = 2, !.c = 1]" in - let test_case = create_expression test_string in - let target_case = create_expression - "[[[f EXCEPT !.a = 3] EXCEPT !.b = 2] EXCEPT !.c = 1]" in - Test.make_simple_test - ~title:(title_en_group ^ test_string) - ( fun () -> - Assert.equal (prn_exp target_case) - (prn_exp (normalize Deque.empty test_case))) - -let t6 = - let test_string = "[[arr EXCEPT ![x][y] = foo] EXCEPT ![u][v] = bar]" in - let test_case = create_expression test_string in - let target_case = create_expression - "[[arr EXCEPT ![x] = [arr[x] EXCEPT ![y] = foo]] EXCEPT ![u] = \ - [[arr EXCEPT ![x] = [arr[x] EXCEPT ![y] = foo]][u] EXCEPT ![v] = bar]]" in - Test.make_simple_test - ~title:(title_en_group ^ test_string) - ( fun () -> - Assert.equal ~prn:prn_str (prn_exp target_case) - (prn_exp (normalize Deque.empty test_case))) - -let title_prime_normalize = title_suite ^ "prime_normalize should " - -let title_pr_group = title_prime_normalize - ^ "normalize correctly primed expressions of the form " - -let t7 = (* doesnt work because we need to anonimie the created expressions from -the parser*) - let test_string = "f[x]'" in - let test_case = create_expression test_string in - let target_case = create_expression - "f'[x']" in - (* let x = normalize Deque.empty test_case in - Printf.eprintf "compare: %d\n" (Pervasives.compare x target_case); *) - Test.make_simple_test - ~title:(title_pr_group ^ test_string) - ( fun () -> - Assert.equal (prn_exp target_case) - (prn_exp (normalize Deque.empty test_case))) - -(* determines the kind of output for kaputt *) -let kaputt_output = - try match Sys.getenv "Jenkins" with - | "1" -> Test.Xml_junit_output (open_out "test/test_reports/expr/junit_e_elab.xml") - | _ -> Test.Text_output stdout - with Not_found -> Test.Text_output stdout - -let () = Test.run_tests ~output:kaputt_output [t1;t2;t3;t4;t5;t6] - -(* Now let us print e *) -(*Tla_parser.Fu.pp_print_minimal Format.std_formatter (E_fmt.fmt_expr nullctx e);; -Format.print_newline ();;*) -(* vim : set ft=ocaml : *) diff --git a/src/expr/e_tla_norm.ml b/src/expr/e_tla_norm.ml index 246a55ea..10b57479 100644 --- a/src/expr/e_tla_norm.ml +++ b/src/expr/e_tla_norm.ml @@ -128,3 +128,40 @@ let expand_action = | _ -> super#expr scx e end in fun scx e -> visitor#expr scx e + + +let%test_module _ = (module struct + let sexp_of_string = Sexplib.Std.sexp_of_string + let compare_string = Base.compare_string + + let parse_expr = Tla_parser.P.use (E_parser.expr true);; + let nullctx = (Deque.empty, Ctx.dot);; + + let create_expression str = + let (flex, _) = Alexer.lex_string str in + match Tla_parser.P.run parse_expr ~init:Tla_parser.init ~source:flex with + | Some e -> e + | None -> failwith "cannot parse test string" + + let prn_exp exp = + Tla_parser.Fu.pp_print_minimal + Format.str_formatter (E_fmt.fmt_expr nullctx exp); + Format.flush_str_formatter () + + let prn_str str = str + + let%test_unit "t1" = + let test_string = "WF_f(A)" in + let test_case = create_expression test_string in + let target_string = "<>[]ENABLED<>_f => []<><>_f" in + let target_case = create_expression target_string in + [%test_eq: string] (prn_exp target_case) (prn_exp (expand_fairness ((),Deque.empty) test_case)) + + let%test_unit "t2" = + let test_string = "SF_f(A)" in + let test_case = create_expression test_string in + let target_string = "[]<>ENABLED<>_f => []<><>_f" in + let target_case = create_expression target_string in + [%test_eq: string] (prn_exp target_case) (prn_exp (expand_fairness ((),Deque.empty) test_case)) + +end) diff --git a/src/expr/e_tla_norm.mlt b/src/expr/e_tla_norm.mlt deleted file mode 100644 index 968511ac..00000000 --- a/src/expr/e_tla_norm.mlt +++ /dev/null @@ -1,64 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - -open Kaputt.Abbreviations;; - - -let title_suite = "tla_norm - " - -let title_fairness_group = title_suite - ^ "normalize correctly fairness " - -(* auxiliary definitions *) -let parse_expr = Tla_parser.P.use (E_parser.expr true);; -let nullctx = (Deque.empty, Ctx.dot);; - -let create_expression str = - let (flex, _) = Alexer.lex_string str in - match Tla_parser.P.run parse_expr ~init:Tla_parser.init ~source:flex with - | Some e -> e - | None -> failwith "cannot parse test string" - -let prn_exp exp = - Tla_parser.Fu.pp_print_minimal - Format.str_formatter (E_fmt.fmt_expr nullctx exp); - Format.flush_str_formatter () - -let prn_str str = str - -let t1 = - let test_string = "WF_f(A)" in - let test_case = create_expression test_string in - let target_string = "<>[]ENABLED<>_f => []<><>_f" in - let target_case = create_expression target_string in - Test.make_simple_test - ~title:(title_fairness_group ^ test_string) - ( fun () -> - Assert.equal (prn_exp target_case) - (prn_exp (expand_fairness ((),Deque.empty) test_case))) - -let t2 = - let test_string = "SF_f(A)" in - let test_case = create_expression test_string in - let target_string = "[]<>ENABLED<>_f => []<><>_f" in - let target_case = create_expression target_string in - Test.make_simple_test - ~title:(title_fairness_group ^ test_string) - ( fun () -> - Assert.equal (prn_exp target_case) - (prn_exp (expand_fairness ((),Deque.empty) test_case))) - -(* determines the kind of output for kaputt *) -let kaputt_output = - try match Sys.getenv "Jenkins" with - | "1" -> Test.Xml_junit_output (open_out "test/test_reports/expr/junit_e_tla_norm.xml") - | _ -> Test.Text_output stdout - with Not_found -> Test.Text_output stdout - -let () = Test.run_tests ~output:kaputt_output [t1;t2] - -(* Now let us print e *) -(*Tla_parser.Fu.pp_print_minimal Format.std_formatter (E_fmt.fmt_expr nullctx e);; -Format.print_newline ();;*) -(* vim : set ft=ocaml : *) diff --git a/src/module/m_dep.ml b/src/module/m_dep.ml index 89925e69..2e269218 100644 --- a/src/module/m_dep.ml +++ b/src/module/m_dep.ml @@ -92,3 +92,73 @@ let schedule mcx = end (Sm.empty, []) order in let order = List.rev order in (mc, order) + + +let%test_module _ = (module struct + let sexp_of_string = Sexplib.Std.sexp_of_string + let sexp_of_list = Sexplib.Std.sexp_of_list + let sexp_of_int = Sexplib.Std.sexp_of_int + let compare_string = Base.compare_string + let compare_list = Base.compare_list + let compare_int = Base.compare_int + + module B = Builtin + + let stloc = + { Loc.file = "" ; + Loc.start = Loc.dummy ; + Loc.stop = Loc.dummy } + + let stm x = Util.locate x stloc + let st = stm () + + let nullary what op = + Definition (Operator (what @@ st, Apply (Internal op @@ st, []) @@ st) + @@ st, Builtin, Visible, Export) @@ st + + let create_test_case ls = + List.fold_left begin + fun acc (nm,depls,df) -> + let m = begin + stm { + name = noprops nm ; + extendees = List.map (function x -> noprops x) depls ; + instancees = [] ; + defdepth = 0 ; + important = true ; + body = [ noprops (Variables [noprops df]) ]; + stage = Parsed ; + } + end in + Sm.add m.core.name.core m acc + end Sm.empty ls + + let cmd (_,modlist) n = List.flatten ( + List.map (function + | {core=Variables(varlist);props=_} + -> List.map (function x -> x.core) varlist + | _ -> failwith "not supported" + ) ((List.nth modlist n).core.body)) + + let asrt = ["A";"B";"C"] + + let%test_unit "t1" = + let test_case_list = [("a",[],"A");("b",["a"],"B");("c",["b";"a"],"C")] in + let test_case = create_test_case test_case_list in + [%test_eq: int] 3 (List.length (cmd (schedule test_case) 2)); + [%test_eq: string list] asrt (cmd (schedule test_case) 2 ) + + let%test_unit "t2" = + let test_case_list = [("a",[],"A");("b",["a"],"B");("c",["a";"b"],"C")] in + let test_case = create_test_case test_case_list in + [%test_eq: int] 3 (List.length (cmd (schedule test_case) 2)); + [%test_eq: string list] asrt (cmd (schedule test_case) 2 ) + + let%test "t3" = (* display dependency on local modules even if they have the same name as standard ones *) + let test_case_list = [("a",["TLC"],"B")] in + let test_case = create_test_case test_case_list in + Hs.exists + (fun x -> x.core = "TLC") + (let (e, _, _) = (external_deps (Sm.find "a" test_case)) in e) + +end) diff --git a/src/module/m_dep.mlt b/src/module/m_dep.mlt deleted file mode 100644 index c24a3d88..00000000 --- a/src/module/m_dep.mlt +++ /dev/null @@ -1,102 +0,0 @@ -(* - * module/dep.mlt --- tests for modules dependencies - * - * - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - -open Kaputt.Abbreviations;; - -module B = Builtin - -let stloc = - { Loc.file = "" ; - Loc.start = Loc.dummy ; - Loc.stop = Loc.dummy } - -let stm x = Util.locate x stloc -let st = stm () - -let nullary what op = - Definition (Operator (what @@ st, Apply (Internal op @@ st, []) @@ st) - @@ st, Builtin, Visible, Export) @@ st - -let title_suite = "m_dep - " - -let create_test_case ls = - List.fold_left begin - fun acc (nm,depls,df) -> - let m = begin - stm { - name = noprops nm ; - extendees = List.map (function x -> noprops x) depls ; - instancees = [] ; - defdepth = 0 ; - important = true ; - body = [ noprops (Variables [noprops df]) ]; - stage = Parsed ; - } - end in - Sm.add m.core.name.core m acc - end Sm.empty ls - -let id x = x - -let equal_list_string = Assert.make_equal_list (=) (id) - -let title_schedule = title_suite ^ "schedule should" - -let title_schd_group1 = title_schedule - ^ " compute correctly the extends relation over diamond shape for " - -let cmd (_,modlist) n = List.flatten ( - List.map (function - | {core=Variables(varlist);props=_} - -> List.map (function x -> x.core) varlist - | _ -> failwith "not supported" - ) ((List.nth modlist n).core.body)) -let asrt = ["A";"B";"C"] -let t1 = - let test_case_list = [("a",[],"A");("b",["a"],"B");("c",["b";"a"],"C")] in - let test_case = create_test_case test_case_list in - Test.make_simple_test - ~title:(title_schd_group1 ^ "c extends b before a and b extends a") - ( fun () -> - Assert.equal_int 3 (List.length (cmd (schedule test_case) 2)); - equal_list_string asrt (cmd (schedule test_case) 2 ) ) - -let t2 = - let test_case_list = [("a",[],"A");("b",["a"],"B");("c",["a";"b"],"C")] in - let test_case = create_test_case test_case_list in - Test.make_simple_test - ~title:(title_schd_group1 ^ "c extends a before b and b extends a") - ( fun () -> - Assert.equal_int 3 (List.length (cmd (schedule test_case) 2)); - equal_list_string asrt (cmd (schedule test_case) 2 ) ) - -let title_external_deps = title_suite ^ "external_deps should" - -let t3 = - let t3_str = " display dependency on local modules even if they have the same name as standard ones" in - let test_case_list = [("a",["TLC"],"B")] in - let test_case = create_test_case test_case_list in - Test.make_simple_test - ~title:(title_external_deps ^ t3_str) - ( fun () -> - Assert.is_true ( - Hs.exists (fun x -> x.core = "TLC") - (let (e, _, _) = (external_deps (Sm.find "a" test_case)) - in e) - ) - ) - -(* determines the kind of output for kaputt *) -let kaputt_output = - try match Sys.getenv "Jenkins" with - | "1" -> Test.Xml_junit_output (open_out "test/test_reports/module/junit_m_dep.xml") - | _ -> Test.Text_output stdout - with Not_found -> Test.Text_output stdout - -let () = Test.run_tests ~output:kaputt_output [t1;t2;t3] - -(* vim : set ft=ocaml : *) diff --git a/src/module/m_save.ml b/src/module/m_save.ml index 3aea57d1..5953fe1f 100644 --- a/src/module/m_save.ml +++ b/src/module/m_save.ml @@ -314,3 +314,45 @@ let store_module ?clock mule = mule.core.name.core fnx end () else () + + +let%test_module _ = (module struct + + let stloc = + { Loc.file = "" ; + Loc.start = Loc.dummy ; + Loc.stop = Loc.dummy } + let stm x = Util.locate x stloc + let create_test_case ls = + List.fold_left begin + fun acc (nm,depls,df) -> + let m = begin + stm { + name = noprops nm ; + extendees = List.map (function x -> noprops x) depls ; + instancees = [] ; + defdepth = 0 ; + important = true ; + body = [ noprops (Variables [noprops df]) ]; + stage = Parsed ; + } + end in + Sm.add m.core.name.core m acc + end M_standard.initctx ls + + let%test "t1: load external modules correctly for external modules which has the same name as a standard module - load local module" = + let test_case_list = [("a",["TLC"],"B")] in + let test_case = create_test_case test_case_list in + let rfold = List.fold_left Filename.concat ".." ["test"; "resources"; "module"; "m_save"] in + (List.exists + (function + | {core = Variables ls} -> List.exists (fun x -> x.core = "m_save_t1") ls + | _ -> false ) + (Sm.find "TLC" (complete_load ~root:rfold test_case)).core.body) + + let%test "t2: load external modules correctly for external modules which has the same name as a standard module - load standard module" = + let test_case_list = [("a",["TLC"],"B")] in + let test_case = create_test_case test_case_list in + (Sm.mem "TLC" (complete_load test_case)) + +end) diff --git a/src/module/m_save.mlt b/src/module/m_save.mlt deleted file mode 100644 index c577ac92..00000000 --- a/src/module/m_save.mlt +++ /dev/null @@ -1,68 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) -open Kaputt.Abbreviations;; - -let title_suite = "m_save - " - -let title_complete_load = title_suite ^ "complete_load should" - -let stloc = - { Loc.file = "" ; - Loc.start = Loc.dummy ; - Loc.stop = Loc.dummy } -let stm x = Util.locate x stloc -let create_test_case ls = - List.fold_left begin - fun acc (nm,depls,df) -> - let m = begin - stm { - name = noprops nm ; - extendees = List.map (function x -> noprops x) depls ; - instancees = [] ; - defdepth = 0 ; - important = true ; - body = [ noprops (Variables [noprops df]) ]; - stage = Parsed ; - } - end in - Sm.add m.core.name.core m acc - end M_standard.initctx ls - -let title_load_external_modules = title_complete_load ^ - " load external modules correctly for external modules which has the same name as a standard module" - -let t1 = - let test_case_list = [("a",["TLC"],"B")] in - let test_case = create_test_case test_case_list in - Test.make_simple_test - ~title:(title_load_external_modules ^ " - load local module") - ( fun () -> - let rfold = (Filename.concat (Filename.concat (Sys.getenv "RESOURCE_FOLDER") "module") "m_save") in - Assert.is_true (List.exists (function - | {core = Variables ls} -> List.exists (fun x -> x.core = "m_save_t1") ls - | _ -> false ) - (Sm.find "TLC" (complete_load ~root:rfold test_case)).core.body) - ) - -let t2 = - let test_case_list = [("a",["TLC"],"B")] in - let test_case = create_test_case test_case_list in - Test.make_simple_test - ~title:(title_load_external_modules ^ " - load standard module") - ( fun () -> - Assert.is_true - (Sm.mem "TLC" (complete_load test_case)) - ) - -(* determines the kind of output for kaputt *) -let kaputt_output = - try match Sys.getenv "Jenkins" with - | "1" -> Test.Xml_junit_output (open_out - "test/test_reports/module/junit_m_save.xml") - | _ -> Test.Text_output stdout - with Not_found -> Test.Text_output stdout - -let () = Test.run_tests ~output:kaputt_output [t1;t2] - -(* vim : set ft=ocaml : *) From 5153bf30962891f30fec4cb2af919003ead69ce6 Mon Sep 17 00:00:00 2001 From: Karolis Petrauskas Date: Thu, 15 Jun 2023 23:21:02 +0300 Subject: [PATCH 25/44] Empty mlt (kaputt) files are not used anymore. Signed-off-by: Karolis Petrauskas --- src/abstractor.mlt | 4 ---- src/alexer.mlt | 3 --- src/backend.mlt | 3 --- src/backend/fingerprints.mlt | 4 ---- src/backend/fpfile.mlt | 4 ---- src/backend/isabelle.mlt | 4 ---- src/backend/ls4.mlt | 0 src/backend/prep.mlt | 4 ---- src/backend/schedule.mlt | 4 ---- src/backend/smt.mlt | 4 ---- src/backend/test_schedule.mlt | 4 ---- src/backend/toolbox.mlt | 4 ---- src/backend/types.mlt | 4 ---- src/backend/zenon.mlt | 4 ---- src/builtin.mlt | 4 ---- src/ctx.mlt | 4 ---- src/dumpfp.mlt | 4 ---- src/errors.mlt | 4 ---- src/expr.mlt | 4 ---- src/expr/e_action.mlt | 0 src/expr/e_anon.mlt | 4 ---- src/expr/e_constness.mlt | 4 ---- src/expr/e_deref.mlt | 4 ---- src/expr/e_eq.mlt | 4 ---- src/expr/e_fmt.mlt | 4 ---- src/expr/e_leibniz.mlt | 0 src/expr/e_level_comparison.mlt | 0 src/expr/e_levels.mlt | 0 src/expr/e_parser.mlt | 4 ---- src/expr/e_subst.mlt | 4 ---- src/expr/e_substitutive.mlt | 0 src/expr/e_t.mlt | 4 ---- src/expr/e_temporal_props.mlt | 0 src/expr/e_visit.mlt | 4 ---- src/frontend/action.mlt | 4 ---- src/frontend/coalesce.mlt | 0 src/frontend/pltl.mlt | 4 ---- src/frontend/symbol_commute.mlt | 0 src/isabelle_keywords.mlt | 4 ---- src/load.mlt | 4 ---- src/loc.mlt | 4 ---- src/method.mlt | 4 ---- src/method_old.mlt | 4 ---- src/method_prs.mlt | 4 ---- src/module.mlt | 4 ---- src/module/m_elab.mlt | 4 ---- src/module/m_flatten.mlt | 4 ---- src/module/m_fmt.mlt | 4 ---- src/module/m_gen.mlt | 4 ---- src/module/m_globalness.mlt | 0 src/module/m_parser.mlt | 4 ---- src/module/m_standard.mlt | 4 ---- src/module/m_subst.mlt | 0 src/module/m_t.mlt | 4 ---- src/module/m_visit.mlt | 0 src/optable.mlt | 4 ---- src/params.mlt | 4 ---- src/pars.mlt | 4 ---- src/pars/error.mlt | 4 ---- src/pars/intf.mlt | 4 ---- src/pars/lazyList.mlt | 4 ---- src/pars/pco.mlt | 4 ---- src/proof.mlt | 4 ---- src/proof/p_anon.mlt | 4 ---- src/proof/p_fmt.mlt | 4 ---- src/proof/p_gen.mlt | 4 ---- src/proof/p_parser.mlt | 4 ---- src/proof/p_simplify.mlt | 4 ---- src/proof/p_subst.mlt | 4 ---- src/proof/p_t.mlt | 4 ---- src/proof/p_visit.mlt | 4 ---- src/release_version.mlt | 4 ---- src/revision.mlt | 4 ---- src/smt/axioms.mlt | 3 --- src/smt/boolify.mlt | 3 --- src/smt/ectx.mlt | 3 --- src/smt/fmt.mlt | 3 --- src/smt/preprocess.mlt | 3 --- src/smt/rewrite.mlt | 3 --- src/smt/rewrite_arith.mlt | 3 --- src/smt/rewrite_trivial.mlt | 3 --- src/smt/smtcommons.mlt | 3 --- src/sysconf.mlt | 4 ---- src/system.mlt | 4 ---- src/tla_parser.mlt | 4 ---- src/tlapm.mlt | 4 ---- src/tlapm_args.mlt | 4 ---- src/toolbox_msg.mlt | 4 ---- src/typesystem/typ_c.mlt | 3 --- src/typesystem/typ_cg1.mlt | 3 --- src/typesystem/typ_cg2.mlt | 3 --- src/typesystem/typ_e.mlt | 3 --- src/typesystem/typ_impgraph.mlt | 3 --- src/typesystem/typ_system.mlt | 3 --- src/typesystem/typ_t.mlt | 3 --- src/typesystem/why3_interface.mlt | 3 --- src/util/deque.mlt | 4 ---- src/util/ext.mlt | 4 ---- src/util/fmtutil.mlt | 4 ---- src/util/property.mlt | 4 ---- src/util/timing.mlt | 4 ---- src/util/util.mlt | 4 ---- src/util/worklist.mlt | 4 ---- src/version.mlt | 4 ---- 104 files changed, 349 deletions(-) delete mode 100644 src/abstractor.mlt delete mode 100644 src/alexer.mlt delete mode 100644 src/backend.mlt delete mode 100644 src/backend/fingerprints.mlt delete mode 100644 src/backend/fpfile.mlt delete mode 100644 src/backend/isabelle.mlt delete mode 100644 src/backend/ls4.mlt delete mode 100644 src/backend/prep.mlt delete mode 100644 src/backend/schedule.mlt delete mode 100644 src/backend/smt.mlt delete mode 100644 src/backend/test_schedule.mlt delete mode 100644 src/backend/toolbox.mlt delete mode 100644 src/backend/types.mlt delete mode 100644 src/backend/zenon.mlt delete mode 100644 src/builtin.mlt delete mode 100644 src/ctx.mlt delete mode 100644 src/dumpfp.mlt delete mode 100644 src/errors.mlt delete mode 100644 src/expr.mlt delete mode 100644 src/expr/e_action.mlt delete mode 100644 src/expr/e_anon.mlt delete mode 100644 src/expr/e_constness.mlt delete mode 100644 src/expr/e_deref.mlt delete mode 100644 src/expr/e_eq.mlt delete mode 100644 src/expr/e_fmt.mlt delete mode 100644 src/expr/e_leibniz.mlt delete mode 100644 src/expr/e_level_comparison.mlt delete mode 100644 src/expr/e_levels.mlt delete mode 100644 src/expr/e_parser.mlt delete mode 100644 src/expr/e_subst.mlt delete mode 100644 src/expr/e_substitutive.mlt delete mode 100644 src/expr/e_t.mlt delete mode 100644 src/expr/e_temporal_props.mlt delete mode 100644 src/expr/e_visit.mlt delete mode 100644 src/frontend/action.mlt delete mode 100644 src/frontend/coalesce.mlt delete mode 100644 src/frontend/pltl.mlt delete mode 100644 src/frontend/symbol_commute.mlt delete mode 100644 src/isabelle_keywords.mlt delete mode 100644 src/load.mlt delete mode 100644 src/loc.mlt delete mode 100644 src/method.mlt delete mode 100644 src/method_old.mlt delete mode 100644 src/method_prs.mlt delete mode 100644 src/module.mlt delete mode 100644 src/module/m_elab.mlt delete mode 100644 src/module/m_flatten.mlt delete mode 100644 src/module/m_fmt.mlt delete mode 100644 src/module/m_gen.mlt delete mode 100644 src/module/m_globalness.mlt delete mode 100644 src/module/m_parser.mlt delete mode 100644 src/module/m_standard.mlt delete mode 100644 src/module/m_subst.mlt delete mode 100644 src/module/m_t.mlt delete mode 100644 src/module/m_visit.mlt delete mode 100644 src/optable.mlt delete mode 100644 src/params.mlt delete mode 100644 src/pars.mlt delete mode 100644 src/pars/error.mlt delete mode 100644 src/pars/intf.mlt delete mode 100644 src/pars/lazyList.mlt delete mode 100644 src/pars/pco.mlt delete mode 100644 src/proof.mlt delete mode 100644 src/proof/p_anon.mlt delete mode 100644 src/proof/p_fmt.mlt delete mode 100644 src/proof/p_gen.mlt delete mode 100644 src/proof/p_parser.mlt delete mode 100644 src/proof/p_simplify.mlt delete mode 100644 src/proof/p_subst.mlt delete mode 100644 src/proof/p_t.mlt delete mode 100644 src/proof/p_visit.mlt delete mode 100644 src/release_version.mlt delete mode 100644 src/revision.mlt delete mode 100644 src/smt/axioms.mlt delete mode 100644 src/smt/boolify.mlt delete mode 100644 src/smt/ectx.mlt delete mode 100644 src/smt/fmt.mlt delete mode 100644 src/smt/preprocess.mlt delete mode 100644 src/smt/rewrite.mlt delete mode 100644 src/smt/rewrite_arith.mlt delete mode 100644 src/smt/rewrite_trivial.mlt delete mode 100644 src/smt/smtcommons.mlt delete mode 100644 src/sysconf.mlt delete mode 100644 src/system.mlt delete mode 100644 src/tla_parser.mlt delete mode 100644 src/tlapm.mlt delete mode 100644 src/tlapm_args.mlt delete mode 100644 src/toolbox_msg.mlt delete mode 100644 src/typesystem/typ_c.mlt delete mode 100644 src/typesystem/typ_cg1.mlt delete mode 100644 src/typesystem/typ_cg2.mlt delete mode 100644 src/typesystem/typ_e.mlt delete mode 100644 src/typesystem/typ_impgraph.mlt delete mode 100644 src/typesystem/typ_system.mlt delete mode 100644 src/typesystem/typ_t.mlt delete mode 100644 src/typesystem/why3_interface.mlt delete mode 100644 src/util/deque.mlt delete mode 100644 src/util/ext.mlt delete mode 100644 src/util/fmtutil.mlt delete mode 100644 src/util/property.mlt delete mode 100644 src/util/timing.mlt delete mode 100644 src/util/util.mlt delete mode 100644 src/util/worklist.mlt delete mode 100644 src/version.mlt diff --git a/src/abstractor.mlt b/src/abstractor.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/abstractor.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/alexer.mlt b/src/alexer.mlt deleted file mode 100644 index 4de8fdf7..00000000 --- a/src/alexer.mlt +++ /dev/null @@ -1,3 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) diff --git a/src/backend.mlt b/src/backend.mlt deleted file mode 100644 index 4de8fdf7..00000000 --- a/src/backend.mlt +++ /dev/null @@ -1,3 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) diff --git a/src/backend/fingerprints.mlt b/src/backend/fingerprints.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/backend/fingerprints.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/backend/fpfile.mlt b/src/backend/fpfile.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/backend/fpfile.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/backend/isabelle.mlt b/src/backend/isabelle.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/backend/isabelle.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/backend/ls4.mlt b/src/backend/ls4.mlt deleted file mode 100644 index e69de29b..00000000 diff --git a/src/backend/prep.mlt b/src/backend/prep.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/backend/prep.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/backend/schedule.mlt b/src/backend/schedule.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/backend/schedule.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/backend/smt.mlt b/src/backend/smt.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/backend/smt.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/backend/test_schedule.mlt b/src/backend/test_schedule.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/backend/test_schedule.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/backend/toolbox.mlt b/src/backend/toolbox.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/backend/toolbox.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/backend/types.mlt b/src/backend/types.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/backend/types.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/backend/zenon.mlt b/src/backend/zenon.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/backend/zenon.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/builtin.mlt b/src/builtin.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/builtin.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/ctx.mlt b/src/ctx.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/ctx.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/dumpfp.mlt b/src/dumpfp.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/dumpfp.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/errors.mlt b/src/errors.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/errors.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/expr.mlt b/src/expr.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/expr.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/expr/e_action.mlt b/src/expr/e_action.mlt deleted file mode 100644 index e69de29b..00000000 diff --git a/src/expr/e_anon.mlt b/src/expr/e_anon.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/expr/e_anon.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/expr/e_constness.mlt b/src/expr/e_constness.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/expr/e_constness.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/expr/e_deref.mlt b/src/expr/e_deref.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/expr/e_deref.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/expr/e_eq.mlt b/src/expr/e_eq.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/expr/e_eq.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/expr/e_fmt.mlt b/src/expr/e_fmt.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/expr/e_fmt.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/expr/e_leibniz.mlt b/src/expr/e_leibniz.mlt deleted file mode 100644 index e69de29b..00000000 diff --git a/src/expr/e_level_comparison.mlt b/src/expr/e_level_comparison.mlt deleted file mode 100644 index e69de29b..00000000 diff --git a/src/expr/e_levels.mlt b/src/expr/e_levels.mlt deleted file mode 100644 index e69de29b..00000000 diff --git a/src/expr/e_parser.mlt b/src/expr/e_parser.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/expr/e_parser.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/expr/e_subst.mlt b/src/expr/e_subst.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/expr/e_subst.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/expr/e_substitutive.mlt b/src/expr/e_substitutive.mlt deleted file mode 100644 index e69de29b..00000000 diff --git a/src/expr/e_t.mlt b/src/expr/e_t.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/expr/e_t.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/expr/e_temporal_props.mlt b/src/expr/e_temporal_props.mlt deleted file mode 100644 index e69de29b..00000000 diff --git a/src/expr/e_visit.mlt b/src/expr/e_visit.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/expr/e_visit.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/frontend/action.mlt b/src/frontend/action.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/frontend/action.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/frontend/coalesce.mlt b/src/frontend/coalesce.mlt deleted file mode 100644 index e69de29b..00000000 diff --git a/src/frontend/pltl.mlt b/src/frontend/pltl.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/frontend/pltl.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/frontend/symbol_commute.mlt b/src/frontend/symbol_commute.mlt deleted file mode 100644 index e69de29b..00000000 diff --git a/src/isabelle_keywords.mlt b/src/isabelle_keywords.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/isabelle_keywords.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/load.mlt b/src/load.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/load.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/loc.mlt b/src/loc.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/loc.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/method.mlt b/src/method.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/method.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/method_old.mlt b/src/method_old.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/method_old.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/method_prs.mlt b/src/method_prs.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/method_prs.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/module.mlt b/src/module.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/module.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/module/m_elab.mlt b/src/module/m_elab.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/module/m_elab.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/module/m_flatten.mlt b/src/module/m_flatten.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/module/m_flatten.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/module/m_fmt.mlt b/src/module/m_fmt.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/module/m_fmt.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/module/m_gen.mlt b/src/module/m_gen.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/module/m_gen.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/module/m_globalness.mlt b/src/module/m_globalness.mlt deleted file mode 100644 index e69de29b..00000000 diff --git a/src/module/m_parser.mlt b/src/module/m_parser.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/module/m_parser.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/module/m_standard.mlt b/src/module/m_standard.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/module/m_standard.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/module/m_subst.mlt b/src/module/m_subst.mlt deleted file mode 100644 index e69de29b..00000000 diff --git a/src/module/m_t.mlt b/src/module/m_t.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/module/m_t.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/module/m_visit.mlt b/src/module/m_visit.mlt deleted file mode 100644 index e69de29b..00000000 diff --git a/src/optable.mlt b/src/optable.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/optable.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/params.mlt b/src/params.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/params.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/pars.mlt b/src/pars.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/pars.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/pars/error.mlt b/src/pars/error.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/pars/error.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/pars/intf.mlt b/src/pars/intf.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/pars/intf.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/pars/lazyList.mlt b/src/pars/lazyList.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/pars/lazyList.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/pars/pco.mlt b/src/pars/pco.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/pars/pco.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/proof.mlt b/src/proof.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/proof.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/proof/p_anon.mlt b/src/proof/p_anon.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/proof/p_anon.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/proof/p_fmt.mlt b/src/proof/p_fmt.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/proof/p_fmt.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/proof/p_gen.mlt b/src/proof/p_gen.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/proof/p_gen.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/proof/p_parser.mlt b/src/proof/p_parser.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/proof/p_parser.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/proof/p_simplify.mlt b/src/proof/p_simplify.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/proof/p_simplify.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/proof/p_subst.mlt b/src/proof/p_subst.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/proof/p_subst.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/proof/p_t.mlt b/src/proof/p_t.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/proof/p_t.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/proof/p_visit.mlt b/src/proof/p_visit.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/proof/p_visit.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/release_version.mlt b/src/release_version.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/release_version.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/revision.mlt b/src/revision.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/revision.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/smt/axioms.mlt b/src/smt/axioms.mlt deleted file mode 100644 index 4de8fdf7..00000000 --- a/src/smt/axioms.mlt +++ /dev/null @@ -1,3 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) diff --git a/src/smt/boolify.mlt b/src/smt/boolify.mlt deleted file mode 100644 index 4de8fdf7..00000000 --- a/src/smt/boolify.mlt +++ /dev/null @@ -1,3 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) diff --git a/src/smt/ectx.mlt b/src/smt/ectx.mlt deleted file mode 100644 index 4de8fdf7..00000000 --- a/src/smt/ectx.mlt +++ /dev/null @@ -1,3 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) diff --git a/src/smt/fmt.mlt b/src/smt/fmt.mlt deleted file mode 100644 index 4de8fdf7..00000000 --- a/src/smt/fmt.mlt +++ /dev/null @@ -1,3 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) diff --git a/src/smt/preprocess.mlt b/src/smt/preprocess.mlt deleted file mode 100644 index 4de8fdf7..00000000 --- a/src/smt/preprocess.mlt +++ /dev/null @@ -1,3 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) diff --git a/src/smt/rewrite.mlt b/src/smt/rewrite.mlt deleted file mode 100644 index 4de8fdf7..00000000 --- a/src/smt/rewrite.mlt +++ /dev/null @@ -1,3 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) diff --git a/src/smt/rewrite_arith.mlt b/src/smt/rewrite_arith.mlt deleted file mode 100644 index 4de8fdf7..00000000 --- a/src/smt/rewrite_arith.mlt +++ /dev/null @@ -1,3 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) diff --git a/src/smt/rewrite_trivial.mlt b/src/smt/rewrite_trivial.mlt deleted file mode 100644 index 4de8fdf7..00000000 --- a/src/smt/rewrite_trivial.mlt +++ /dev/null @@ -1,3 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) diff --git a/src/smt/smtcommons.mlt b/src/smt/smtcommons.mlt deleted file mode 100644 index 4de8fdf7..00000000 --- a/src/smt/smtcommons.mlt +++ /dev/null @@ -1,3 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) diff --git a/src/sysconf.mlt b/src/sysconf.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/sysconf.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/system.mlt b/src/system.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/system.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/tla_parser.mlt b/src/tla_parser.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/tla_parser.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/tlapm.mlt b/src/tlapm.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/tlapm.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/tlapm_args.mlt b/src/tlapm_args.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/tlapm_args.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/toolbox_msg.mlt b/src/toolbox_msg.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/toolbox_msg.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/typesystem/typ_c.mlt b/src/typesystem/typ_c.mlt deleted file mode 100644 index 4de8fdf7..00000000 --- a/src/typesystem/typ_c.mlt +++ /dev/null @@ -1,3 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) diff --git a/src/typesystem/typ_cg1.mlt b/src/typesystem/typ_cg1.mlt deleted file mode 100644 index 4de8fdf7..00000000 --- a/src/typesystem/typ_cg1.mlt +++ /dev/null @@ -1,3 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) diff --git a/src/typesystem/typ_cg2.mlt b/src/typesystem/typ_cg2.mlt deleted file mode 100644 index 4de8fdf7..00000000 --- a/src/typesystem/typ_cg2.mlt +++ /dev/null @@ -1,3 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) diff --git a/src/typesystem/typ_e.mlt b/src/typesystem/typ_e.mlt deleted file mode 100644 index 4de8fdf7..00000000 --- a/src/typesystem/typ_e.mlt +++ /dev/null @@ -1,3 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) diff --git a/src/typesystem/typ_impgraph.mlt b/src/typesystem/typ_impgraph.mlt deleted file mode 100644 index 4de8fdf7..00000000 --- a/src/typesystem/typ_impgraph.mlt +++ /dev/null @@ -1,3 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) diff --git a/src/typesystem/typ_system.mlt b/src/typesystem/typ_system.mlt deleted file mode 100644 index 4de8fdf7..00000000 --- a/src/typesystem/typ_system.mlt +++ /dev/null @@ -1,3 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) diff --git a/src/typesystem/typ_t.mlt b/src/typesystem/typ_t.mlt deleted file mode 100644 index 4de8fdf7..00000000 --- a/src/typesystem/typ_t.mlt +++ /dev/null @@ -1,3 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) diff --git a/src/typesystem/why3_interface.mlt b/src/typesystem/why3_interface.mlt deleted file mode 100644 index 4de8fdf7..00000000 --- a/src/typesystem/why3_interface.mlt +++ /dev/null @@ -1,3 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) diff --git a/src/util/deque.mlt b/src/util/deque.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/util/deque.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/util/ext.mlt b/src/util/ext.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/util/ext.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/util/fmtutil.mlt b/src/util/fmtutil.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/util/fmtutil.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/util/property.mlt b/src/util/property.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/util/property.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/util/timing.mlt b/src/util/timing.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/util/timing.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/util/util.mlt b/src/util/util.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/util/util.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/util/worklist.mlt b/src/util/worklist.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/util/worklist.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - diff --git a/src/version.mlt b/src/version.mlt deleted file mode 100644 index 2c9c90a2..00000000 --- a/src/version.mlt +++ /dev/null @@ -1,4 +0,0 @@ -(* - * Copyright (C) 2008-2013 INRIA and Microsoft Corporation - *) - From 60142c785e89f9919d36dfb872a8a5ec7d5cc76b Mon Sep 17 00:00:00 2001 From: Karolis Petrauskas Date: Sat, 17 Jun 2023 20:47:29 +0300 Subject: [PATCH 26/44] deps/z3: support different OS types. Signed-off-by: Karolis Petrauskas --- deps/z3/Makefile | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/deps/z3/Makefile b/deps/z3/Makefile index 43b8ae67..aacfd1f9 100644 --- a/deps/z3/Makefile +++ b/deps/z3/Makefile @@ -1,6 +1,20 @@ +OS_TYPE=$(patsubst CYGWIN%,Cygwin,$(shell uname)) + Z3_VERS=4.8.9 Z3_URL_PREFIX=https://github.com/Z3Prover/z3/releases/download/z3-$(Z3_VERS) -Z3_BASE_NAME=z3-${Z3_VERS}-x64-ubuntu-16.04 + +ifeq ($(OS_TYPE),Linux) + Z3_BASE_NAME=z3-${Z3_VERS}-x64-ubuntu-16.04 + Z3_EXEC=z3 +endif +ifeq ($(OS_TYPE),Darwin) + Z3_BASE_NAME=z3-${Z3_VERS}-x64-osx-10.14.6 + Z3_EXEC=z3 +endif +ifeq ($(OS_TYPE),Cygwin) + Z3_BASE_NAME=z3-${Z3_VERS}-x86-win + Z3_EXEC=z3.exe +endif all: z3 @@ -12,7 +26,7 @@ $(Z3_BASE_NAME): $(Z3_BASE_NAME).zip unzip $< z3: $(Z3_BASE_NAME) - cp -f $ Date: Sat, 17 Jun 2023 21:02:18 +0300 Subject: [PATCH 27/44] deps/z3: support different OS types. Signed-off-by: Karolis Petrauskas --- deps/z3/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/deps/z3/Makefile b/deps/z3/Makefile index aacfd1f9..91918cec 100644 --- a/deps/z3/Makefile +++ b/deps/z3/Makefile @@ -27,6 +27,7 @@ $(Z3_BASE_NAME): $(Z3_BASE_NAME).zip z3: $(Z3_BASE_NAME) cp -f $ Date: Sat, 17 Jun 2023 21:12:05 +0300 Subject: [PATCH 28/44] deps/ls4: support different OS types. Signed-off-by: Karolis Petrauskas --- deps/ls4/Makefile | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/deps/ls4/Makefile b/deps/ls4/Makefile index 9bb1d66a..a4df8aab 100644 --- a/deps/ls4/Makefile +++ b/deps/ls4/Makefile @@ -1,7 +1,19 @@ +OS_TYPE=$(patsubst CYGWIN%,Cygwin,$(shell uname)) + LS4_VERS=1.0 LS4_URL_PREFIX=https://github.com/quickbeam123/ls4/archive LS4_BASE_NAME=ls4-$(LS4_VERS) +ifeq ($(OS_TYPE),Linux) + LS4_EXEC=ls4 +endif +ifeq ($(OS_TYPE),Darwin) + LS4_EXEC=ls4 +endif +ifeq ($(OS_TYPE),Cygwin) + LS4_EXEC=ls4.exe +endif + all: ls4 v$(LS4_VERS).zip: @@ -16,7 +28,7 @@ $(LS4_BASE_NAME): v$(LS4_VERS).zip make -C $(LS4_BASE_NAME)/core ls4: $(LS4_BASE_NAME) - cp -f $ Date: Sat, 17 Jun 2023 22:09:14 +0300 Subject: [PATCH 29/44] deps/zenon: support different OS types. Signed-off-by: Karolis Petrauskas --- deps/zenon/Makefile | 29 ++++++++++++++++++++++++----- deps/zenon/dune | 4 ++-- deps/zenon/zenon-src | 1 + 3 files changed, 27 insertions(+), 7 deletions(-) create mode 120000 deps/zenon/zenon-src diff --git a/deps/zenon/Makefile b/deps/zenon/Makefile index 444fd739..b4aeddbe 100644 --- a/deps/zenon/Makefile +++ b/deps/zenon/Makefile @@ -1,8 +1,27 @@ -ZENON_SRC:=$(DUNE_SOURCEROOT)/zenon -TARGET_DIR:=$(shell pwd) +OS_TYPE=$(patsubst CYGWIN%,Cygwin,$(shell uname)) -all: - cd $(ZENON_SRC) && ./configure -coqc : -prefix "$(TARGET_DIR)" +ZENON_SRC=zenon-src + +ifeq ($(OS_TYPE),Linux) + ZENON_EXEC=zenon +endif +ifeq ($(OS_TYPE),Darwin) + ZENON_EXEC=zenon +endif +ifeq ($(OS_TYPE),Cygwin) + ZENON_EXEC=zenon.exe +endif + +all: zenon + +zenon: + TARGET_DIR=$(shell pwd) && cd $(ZENON_SRC) && ./configure -coqc : -prefix "$${TARGET_DIR}/zenon-install" make -C $(ZENON_SRC) all make -C $(ZENON_SRC) install - cp -vf $(TARGET_DIR)/bin/zenon ./ + cp -vf zenon-install/bin/$(ZENON_EXEC) $@ + +clean: + rm -rf zenon zenon-install + make -C $(ZENON_SRC) clean + +.PHONY: all clean diff --git a/deps/zenon/dune b/deps/zenon/dune index 32cf6d69..a6d1aa45 100644 --- a/deps/zenon/dune +++ b/deps/zenon/dune @@ -1,8 +1,8 @@ ; Build the zenon prover, the source is at $PROJECT_ROOT/zenon. (rule - (deps "Makefile") + (deps "Makefile" (source_tree "zenon-src")) (targets zenon) - (action (run "make" "-C" "."))) + (action (run "make" "-C" "." "zenon"))) (install (section (site (tlapm backends))) diff --git a/deps/zenon/zenon-src b/deps/zenon/zenon-src new file mode 120000 index 00000000..d84477a7 --- /dev/null +++ b/deps/zenon/zenon-src @@ -0,0 +1 @@ +../../zenon \ No newline at end of file From f0d05f94642ac5081cbbcfae92fe8827209288a5 Mon Sep 17 00:00:00 2001 From: Karolis Petrauskas Date: Sat, 17 Jun 2023 22:12:55 +0300 Subject: [PATCH 30/44] deps/zenon: support different OS types. Signed-off-by: Karolis Petrauskas --- deps/zenon/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/deps/zenon/Makefile b/deps/zenon/Makefile index b4aeddbe..a6f14ace 100644 --- a/deps/zenon/Makefile +++ b/deps/zenon/Makefile @@ -23,5 +23,6 @@ zenon: clean: rm -rf zenon zenon-install make -C $(ZENON_SRC) clean + rm -f $(ZENON_SRC)/config.ml .PHONY: all clean From 7823ec65c2c59b603aa09447ac76e3052825f1bb Mon Sep 17 00:00:00 2001 From: Karolis Petrauskas Date: Sat, 17 Jun 2023 22:17:47 +0300 Subject: [PATCH 31/44] deps/zenon: support different OS types. Signed-off-by: Karolis Petrauskas --- deps/zenon/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deps/zenon/Makefile b/deps/zenon/Makefile index a6f14ace..753b51d1 100644 --- a/deps/zenon/Makefile +++ b/deps/zenon/Makefile @@ -2,6 +2,7 @@ OS_TYPE=$(patsubst CYGWIN%,Cygwin,$(shell uname)) ZENON_SRC=zenon-src +# While the values are the same in all OS types, we keep them here to state supported OS types. ifeq ($(OS_TYPE),Linux) ZENON_EXEC=zenon endif @@ -9,7 +10,7 @@ ifeq ($(OS_TYPE),Darwin) ZENON_EXEC=zenon endif ifeq ($(OS_TYPE),Cygwin) - ZENON_EXEC=zenon.exe + ZENON_EXEC=zenon endif all: zenon From 76457b3890e43e27c79ca62bf72a4aab6e0ec242 Mon Sep 17 00:00:00 2001 From: Karolis Petrauskas Date: Sun, 18 Jun 2023 09:04:24 +0300 Subject: [PATCH 32/44] deps/isabelle: support different OS types. Co-authored-by: Slava Pozdniakov Signed-off-by: Karolis Petrauskas --- Makefile | 2 +- deps/isabelle/Makefile | 81 ++++++++++++++++++++++++++----------- deps/isabelle/dune | 4 +- deps/isabelle/theories/TLA+ | 1 + 4 files changed, 61 insertions(+), 27 deletions(-) create mode 120000 deps/isabelle/theories/TLA+ diff --git a/Makefile b/Makefile index a40e4c25..3ca7b81d 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -RELEASE_NAME:=tlaps-$(shell git describe --tags)-$(shell uname -m)-$(shell uname -s | tr '[:upper:]' '[:lower:]') +RELEASE_NAME=tlaps-$(shell git describe --tags)-$(shell uname -m)-$(shell uname -s | tr '[:upper:]' '[:lower:]') PREFIX?=$(OPAM_SWITCH_PREFIX) diff --git a/deps/isabelle/Makefile b/deps/isabelle/Makefile index 4c0e500e..c4033b9e 100644 --- a/deps/isabelle/Makefile +++ b/deps/isabelle/Makefile @@ -1,45 +1,75 @@ -ISABELLE_VSN:=Isabelle2011-1 -ISABELLE_TGZ:=$(ISABELLE_VSN)_bundle_x86-linux.tar.gz -ISABELLE_URL:=http://isabelle.in.tum.de/website-$(ISABELLE_VSN)/dist/$(ISABELLE_TGZ) -ISABELLE_DIR:=Isabelle -ISABELLE_EXE:=$(shell pwd)/$(ISABELLE_DIR)/bin/isabelle -ISABELLE_OUT:=$(shell pwd)/$(ISABELLE_DIR)/heaps +OS_TYPE=$(patsubst CYGWIN%,Cygwin,$(shell uname)) + +ISABELLE_VSN=Isabelle2011-1 + +ifeq ($(OS_TYPE),Linux) + ISABELLE_ARCHIVE=$(ISABELLE_VSN)_bundle_x86-linux.tar.gz + ISABELLE_ARCHIVE_TYPE=tgz +endif +ifeq ($(OS_TYPE),Darwin) + ISABELLE_ARCHIVE=$(ISABELLE_VSN).dmg + ISABELLE_ARCHIVE_TYPE=dmg +endif +ifeq ($(OS_TYPE),Cygwin) + ISABELLE_ARCHIVE=$(ISABELLE_VSN)_bundle_x86-cygwin.tar.gz + ISABELLE_ARCHIVE_TYPE=tgz +endif + +ISABELLE_URL=http://isabelle.in.tum.de/website-$(ISABELLE_VSN)/dist/$(ISABELLE_ARCHIVE) +ISABELLE_DIR=Isabelle # Some defaults, for the case if makefile is called not by the dune build system. -INSIDE_DUNE?=tmp -DUNE_SOURCEROOT?=../../ -CACHE_DIR:=$(INSIDE_DUNE)/../../_build_cache +PROJECT_ROOT=../.. +CACHE_DIR=$(PROJECT_ROOT)/_build_cache -all: $(ISABELLE_DIR) +all: $(ISABELLE_DIR) $(ISABELLE_DIR)/src/TLA+ $(ISABELLE_DIR).no-links Isabelle.post-install -$(CACHE_DIR)/$(ISABELLE_TGZ): +# Download the isabelle archive to the cache. +$(CACHE_DIR)/$(ISABELLE_ARCHIVE): mkdir -p $(CACHE_DIR) cd $(CACHE_DIR) && wget -q $(ISABELLE_URL) -$(ISABELLE_TGZ): $(CACHE_DIR)/$(ISABELLE_TGZ) +# Take the Isabelle archive from the cache. +$(ISABELLE_ARCHIVE): $(CACHE_DIR)/$(ISABELLE_ARCHIVE) rm -f $@ ln -s $< $@ -.PRECIOUS: $(ISABELLE_DIR) -$(ISABELLE_DIR): $(ISABELLE_TGZ) +# Extract the isabelle archive. +$(ISABELLE_DIR): $(ISABELLE_ARCHIVE) +ifeq ($(ISABELLE_ARCHIVE_TYPE),tgz) rm -rf $(ISABELLE_DIR) tar -xzf $< mv $(ISABELLE_VSN) $(ISABELLE_DIR) - cd $(ISABELLE_DIR) && rm -rf contrib/ProofGeneral* doc heaps/*/HOL lib/{classes,fonts,logo} - cd $(ISABELLE_DIR) && cp etc/settings etc/settings.orig && echo "ISABELLE_OUTPUT=$(ISABELLE_OUT)" >> etc/settings - cd $(ISABELLE_DIR) && cp -r $(DUNE_SOURCEROOT)/isabelle src/TLA+ - cd $(ISABELLE_DIR)/src/TLA+ && $(ISABELLE_EXE) usedir -b Pure TLA+ - cd $(ISABELLE_DIR) && rm etc/settings && mv etc/settings.orig etc/settings +endif +ifeq ($(ISABELLE_ARCHIVE_TYPE),dmg) + rm -rf isabelle-dmg + hdiutil attach "$<" -quiet -readonly -nobrowse -mountpoint "$(shell pwd)/isabelle-dmg" + cp -a "isabelle-dmg/$(ISABELLE_VSN).app/Contents/Resources/$(ISABELLE_VSN)" "$@" + hdiutil detach "$(shell pwd)" -quiet +endif -.PRECIOUS: $(ISABELLE_DIR).tar.gz -$(ISABELLE_DIR).tar.gz: $(ISABELLE_DIR) - tar -czf $@ $< +# Build the TLA+ theory. +.PRECIOUS: $(ISABELLE_DIR)/src/TLA+ +$(ISABELLE_DIR)/src/TLA+: $(ISABELLE_DIR) + cd $(ISABELLE_DIR) \ + && rm -rf contrib/ProofGeneral* doc heaps/*/HOL lib/{classes,fonts,logo} + cd $(ISABELLE_DIR) \ + && HEAPS_PATH=$(shell pwd)/$(ISABELLE_DIR)/heaps \ + && cp etc/settings etc/settings.orig \ + && echo "ISABELLE_OUTPUT=$$HEAPS_PATH" >> etc/settings + mkdir -p $(ISABELLE_DIR)/src/TLA+ \ + && cp -a theories/TLA+/* $(ISABELLE_DIR)/src/TLA+/ + cd $(ISABELLE_DIR)/src/TLA+ \ + && ../../bin/isabelle usedir -b Pure TLA+ + cd $(ISABELLE_DIR) \ + && rm etc/settings \ + && mv etc/settings.orig etc/settings # TODO: This is is a workaround to eliminate symlinks to directories # until https://github.com/ocaml/dune/issues/7831 is resolved. .PRECIOUS: $(ISABELLE_DIR).no-links -$(ISABELLE_DIR).no-links: $(ISABELLE_DIR) +$(ISABELLE_DIR).no-links: $(ISABELLE_DIR) $(ISABELLE_DIR)/src/TLA+ rm -rf $@ cd $< && rm ./contrib/jre1.6.0_27_x86-linux/jre1.6.0_27/man/ja cd $< && rm ./contrib/polyml-5.4.0/src @@ -52,4 +82,7 @@ Isabelle.post-install: $(ISABELLE_DIR).no-links echo "FILES=$(shell find $(ISABELLE_DIR) -type f -executable)" > $@ echo "all:\n\t chmod +x \$$(FILES)" >> $@ -.PHONY: all +clean: + rm -rf $(ISABELLE_ARCHIVE) $(ISABELLE_DIR) $(ISABELLE_DIR).no-links Isabelle.post-install + +.PHONY: all clean diff --git a/deps/isabelle/dune b/deps/isabelle/dune index 6a4eb0c5..963365f8 100644 --- a/deps/isabelle/dune +++ b/deps/isabelle/dune @@ -2,9 +2,9 @@ ; The source code for the TLA+ theory is in the $PROJECT_ROOT/isabelle directory. ; The generated heaps (Pure and TLA+) are in Isabelle/heaps/polyml-*/. (rule - (deps "Makefile") + (deps "Makefile" (source_tree theories)) (targets (dir Isabelle) "Isabelle.no-links" "Isabelle.post-install") - (action (run "make" "-C" "." "Isabelle.no-links" "Isabelle.post-install"))) + (action (run "make" "-C" "." "PROJECT_ROOT=%{project_root}" "Isabelle.no-links" "Isabelle.post-install"))) (install (section (site (tlapm backends))) diff --git a/deps/isabelle/theories/TLA+ b/deps/isabelle/theories/TLA+ new file mode 120000 index 00000000..0dbabb87 --- /dev/null +++ b/deps/isabelle/theories/TLA+ @@ -0,0 +1 @@ +../../../isabelle \ No newline at end of file From 31b16ac733a89840ed524078fca6acc99f481e9c Mon Sep 17 00:00:00 2001 From: Karolis Petrauskas Date: Sun, 18 Jun 2023 09:07:32 +0300 Subject: [PATCH 33/44] deps/isabelle: support different OS types. Signed-off-by: Karolis Petrauskas --- deps/isabelle/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deps/isabelle/Makefile b/deps/isabelle/Makefile index c4033b9e..426d2d2c 100644 --- a/deps/isabelle/Makefile +++ b/deps/isabelle/Makefile @@ -46,7 +46,8 @@ ifeq ($(ISABELLE_ARCHIVE_TYPE),dmg) rm -rf isabelle-dmg hdiutil attach "$<" -quiet -readonly -nobrowse -mountpoint "$(shell pwd)/isabelle-dmg" cp -a "isabelle-dmg/$(ISABELLE_VSN).app/Contents/Resources/$(ISABELLE_VSN)" "$@" - hdiutil detach "$(shell pwd)" -quiet + hdiutil detach "$(shell pwd)/isabelle-dmg" -quiet + rm -rf isabelle-dmg endif # Build the TLA+ theory. From 153684e6e0d7478a84473fcf8071895afe24ab3f Mon Sep 17 00:00:00 2001 From: Karolis Petrauskas Date: Sun, 18 Jun 2023 11:17:18 +0300 Subject: [PATCH 34/44] Remove a link to TLAPS in isabelle, it was broken before. Signed-off-by: Karolis Petrauskas --- Makefile | 5 ++++- zenon/regression/examples/data/TLAPS.tla | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) delete mode 120000 zenon/regression/examples/data/TLAPS.tla diff --git a/Makefile b/Makefile index 3ca7b81d..0e0dd963 100644 --- a/Makefile +++ b/Makefile @@ -21,6 +21,9 @@ test: test-inline: dune runtest src +test-fast-basic: + make -C test fast/basic + install: dune install --prefix=$(PREFIX) make -C $(PREFIX)/lib/tlapm/ -f Makefile.post-install @@ -35,5 +38,5 @@ release: clean: dune clean -.PHONY: all build check test test-inline install release clean +.PHONY: all build check test test-inline test-fast-basic install release clean diff --git a/zenon/regression/examples/data/TLAPS.tla b/zenon/regression/examples/data/TLAPS.tla deleted file mode 120000 index 513800d1..00000000 --- a/zenon/regression/examples/data/TLAPS.tla +++ /dev/null @@ -1 +0,0 @@ -../../../../library/TLAPS.tla \ No newline at end of file From b2ae61106c7c195a0521f983dace0283dc90945c Mon Sep 17 00:00:00 2001 From: Karolis Petrauskas Date: Sun, 18 Jun 2023 12:00:57 +0300 Subject: [PATCH 35/44] Avoid using realpath. Signed-off-by: Karolis Petrauskas --- test/TOOLS/do_junit_tests | 12 +----------- test/TOOLS/do_soundness_tests | 13 +------------ test/TOOLS/do_tests | 12 +----------- test/TOOLS/env_setup | 18 ++++++++++++++++++ 4 files changed, 21 insertions(+), 34 deletions(-) create mode 100755 test/TOOLS/env_setup diff --git a/test/TOOLS/do_junit_tests b/test/TOOLS/do_junit_tests index 91c01713..deb3941e 100755 --- a/test/TOOLS/do_junit_tests +++ b/test/TOOLS/do_junit_tests @@ -4,17 +4,7 @@ BASEDIR="`pwd`" TOOLDIR="$BASEDIR/TOOLS" -if [ -z "$USE_TLAPM" ]; then - TLAPM_BIN=$BASEDIR/../tlapm -else - TLAPM_BIN="`realpath $USE_TLAPM`" -fi - -if [ -z "$USE_LIB" ]; then - LIBRARY_DIR=$BASEDIR/../library -else - LIBRARY_DIR="`realpath $USE_LIB`" -fi +. $TOOLDIR/env_setup export TLAPM="pkill -f cvc3 | $TLAPM_BIN --stretch 10 --threads 4 -I $LIBRARY_DIR" diff --git a/test/TOOLS/do_soundness_tests b/test/TOOLS/do_soundness_tests index ea7e41a2..ce44850b 100755 --- a/test/TOOLS/do_soundness_tests +++ b/test/TOOLS/do_soundness_tests @@ -4,18 +4,7 @@ BASEDIR="`pwd`" TOOLDIR="$BASEDIR/TOOLS" -if [ -z "$USE_TLAPM" ]; then - TLAPM_BIN=$BASEDIR/../tlapm -else - TLAPM_BIN="`realpath $USE_TLAPM`" -fi - -if [ -z "$USE_LIB" ]; then - LIBRARY_DIR=$BASEDIR/../library -else - LIBRARY_DIR="`realpath $USE_LIB`" -fi - +. $TOOLDIR/env_setup export TLAPM="$TLAPM_BIN --threads 4 -I $LIBRARY_DIR" diff --git a/test/TOOLS/do_tests b/test/TOOLS/do_tests index e3c08d20..630e1704 100755 --- a/test/TOOLS/do_tests +++ b/test/TOOLS/do_tests @@ -5,17 +5,7 @@ BASEDIR="`pwd`" TOOLDIR="$BASEDIR/TOOLS" -if [ -z "$USE_TLAPM" ]; then - TLAPM_BIN=$BASEDIR/../tlapm -else - TLAPM_BIN="`realpath $USE_TLAPM`" -fi - -if [ -z "$USE_LIB" ]; then - LIBRARY_DIR=$BASEDIR/../library -else - LIBRARY_DIR="`realpath $USE_LIB`" -fi +. $TOOLDIR/env_setup ARGS="-I $LIBRARY_DIR" if [ "$1" = "smt_tests" ]; then diff --git a/test/TOOLS/env_setup b/test/TOOLS/env_setup new file mode 100755 index 00000000..9acb6074 --- /dev/null +++ b/test/TOOLS/env_setup @@ -0,0 +1,18 @@ +#!/bin/sh + +# To avoid using realpath, it is unavailable on older MacOS. +abspath() { + (cd "$(dirname $1)" && echo "$(pwd)/$(basename $1)") +} + +if [ -z "$USE_TLAPM" ]; then + TLAPM_BIN=$BASEDIR/../tlapm +else + TLAPM_BIN="$(abspath $USE_TLAPM)" +fi + +if [ -z "$USE_LIB" ]; then + LIBRARY_DIR=$BASEDIR/../library +else + LIBRARY_DIR="$(abspath $USE_LIB)" +fi From 1351c235e1d39a2f1464365cfc1b6ddd52da3aa0 Mon Sep 17 00:00:00 2001 From: Karolis Petrauskas Date: Sun, 18 Jun 2023 12:10:20 +0300 Subject: [PATCH 36/44] Update package deps. Signed-off-by: Karolis Petrauskas --- dune-project | 9 +++++++-- tlapm.opam | 5 ++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/dune-project b/dune-project index aca5f45c..bca5063a 100644 --- a/dune-project +++ b/dune-project @@ -1,4 +1,4 @@ -(lang dune 3.7) +(lang dune 3.8) (using dune_site 0.1) @@ -35,4 +35,9 @@ (sites (lib backends) ; will contain all the provers, approx lib/tlapm/backends/. (lib stdlib)) ; TLA files composing the StdLib. - (depends ocaml dune-site)) + (depends + ocaml + dune-site + sexplib + ppx_inline_test + ppx_assert)) diff --git a/tlapm.opam b/tlapm.opam index 75f5fde1..00e79dd4 100644 --- a/tlapm.opam +++ b/tlapm.opam @@ -25,9 +25,12 @@ authors: [ homepage: "https://github.com/tlaplus/tlapm" bug-reports: "https://github.com/tlaplus/tlapm/issues" depends: [ - "dune" {>= "3.7"} + "dune" {>= "3.8"} "ocaml" "dune-site" + "sexplib" + "ppx_inline_test" + "ppx_assert" "odoc" {with-doc} ] build: [ From b1c72f3f66a1fb504aba87c15d0f4e03f5855e9b Mon Sep 17 00:00:00 2001 From: Karolis Petrauskas Date: Sun, 18 Jun 2023 18:10:06 +0300 Subject: [PATCH 37/44] Github actions, partially updated. Signed-off-by: Karolis Petrauskas --- .github/workflows/main.yml | 32 ++++++++++---------------- .github/workflows/pr.yml | 34 +++++++++++----------------- .github/workflows/release.yml | 29 +++++++++--------------- .github/workflows/setup_shell_env.py | 3 ++- Makefile | 19 +++++++++++++--- 5 files changed, 54 insertions(+), 63 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index eae53e64..c01dc056 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -19,6 +19,7 @@ jobs: ] steps: - name: Install deps + if: matrix.operating-system == 'ubuntu-latest' run: | sudo apt-get update sudo apt-get install --yes time @@ -38,38 +39,29 @@ jobs: - uses: ocaml/setup-ocaml@v2 with: ocaml-compiler: ${{ env.OCAML_VERSION }} + # - uses: actions/cache@v3 + # id: cache + # with: + # path: _build_cache + # key: ${{ runner.os }}_build_cache - name: Build installer of TLAPS run: | eval $(opam env) - ./configure - cd tools/installer - ./tlaps-release.sh - - name: Define TLAPS-related env vars - run: | - python .github/workflows/setup_shell_env.py \ - >> $GITHUB_ENV - - name: Run installer of TLAPS - run: | - ./tools/installer/\ - ${{ env.INSTALLER }} -d . + opam install ./ --deps-only --yes + make + make release - name: Run a subset of `tlapm` tests run: | eval $(opam env) - PATH=$(pwd)/bin:$(pwd)/lib/tlaps/bin:$PATH make test + make test-inline test-fast-basic - name: Run all `tlapm` tests if: >- matrix.operating-system == 'ubuntu-latest' && matrix.ocaml-compiler == '2' run: | - ls -lah eval $(opam env) - ocaml --version - make - PATH=$(pwd)/bin:$(pwd)/lib/tlaps/bin:$PATH which tlapm - PATH=$(pwd)/bin:$(pwd)/lib/tlaps/bin:$PATH which zenon - PATH=$(pwd)/bin:$(pwd)/lib/tlaps/bin:$PATH tlapm --version - PATH=$(pwd)/bin:$(pwd)/lib/tlaps/bin:$PATH make testall + make test - name: Print Test Results if: matrix.operating-system == 'ubuntu-latest' run: | - cat test/tests.log + cat _build/default/test/tests.log diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 76207155..baafc9af 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -1,4 +1,4 @@ -name: Build and Package TLA Proof Manager +name: Build on PR on: pull_request: push: @@ -23,6 +23,7 @@ jobs: ] steps: - name: Install deps + if: matrix.operating-system == 'ubuntu-latest' run: | sudo apt-get update sudo apt-get install --yes time @@ -42,35 +43,26 @@ jobs: - uses: ocaml/setup-ocaml@v2 with: ocaml-compiler: ${{ env.OCAML_VERSION }} - - name: Define TLAPS-related env vars - run: | - python .github/workflows/setup_shell_env.py \ - >> $GITHUB_ENV - - uses: actions/cache@v2 - id: cache - with: - path: ${{ env.DOWNLOADS }} - key: ${{ env.DOWNLOADS }} + # - uses: actions/cache@v3 + # id: cache + # with: + # path: _build_cache + # key: ${{ runner.os }}_build_cache - name: Build installer of TLAPS run: | eval $(opam env) - ./configure - cd tools/installer - ./tlaps-release.sh - - name: Run installer of TLAPS - run: | - ./tools/installer/\ - ${{ env.INSTALLER }} -d . + opam install ./ --deps-only --yes + make + make release - name: Run a subset of `tlapm` tests run: | eval $(opam env) - PATH=$(pwd)/bin:$(pwd)/lib/tlaps/bin:$PATH make test + make test-inline test-fast-basic - name: Run all `tlapm` tests run: | eval $(opam env) - make - PATH=$(pwd)/bin:$(pwd)/lib/tlaps/bin:$PATH make testall + make test - name: Print Test Results if: matrix.operating-system == 'ubuntu-latest' run: | - cat test/tests.log + cat _build/default/test/tests.log diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d44412d8..3baba2f4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,10 +21,6 @@ jobs: name: Create Github Release runs-on: ubuntu-latest steps: - - name: Install deps - run: | - sudo apt-get update - sudo apt-get install --yes time - name: Get current date id: date run: | @@ -72,6 +68,7 @@ jobs: ] steps: - name: Install deps + if: matrix.operating-system == 'ubuntu-latest' run: | sudo apt-get update sudo apt-get install --yes time @@ -112,25 +109,21 @@ jobs: run: | python .github/workflows/setup_shell_env.py \ >> $GITHUB_ENV - - uses: actions/cache@v2 - id: cache - with: - path: ${{ env.DOWNLOADS }} - key: ${{ env.DOWNLOADS }} + # - uses: actions/cache@v3 + # id: cache + # with: + # path: _build_cache + # key: ${{ runner.os }}_build_cache - name: Build installer of TLAPS run: | eval $(opam env) - ./configure - cd tools/installer - ./tlaps-release.sh - - name: Run installer of TLAPS - run: | - ./tools/installer/\ - ${{ env.INSTALLER }} -d . + opam install ./ --deps-only --yes + make + make release - name: Run a subset of `tlapm` tests run: | eval $(opam env) - PATH=$(pwd)/bin:$(pwd)/lib/tlaps/bin:$PATH make test + make test-inline test-fast-basic - name: Upload Release Asset if: matrix.ocaml-compiler == '2' id: upload-release-asset @@ -139,6 +132,6 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.get_release_info.outputs.upload_url }} - asset_path: tools/installer/${{ env.INSTALLER }} + asset_path: ${{ env.INSTALLER }} asset_name: ${{ env.INSTALLER }} asset_content_type: application/octet-stream diff --git a/.github/workflows/setup_shell_env.py b/.github/workflows/setup_shell_env.py index 64351e86..0447a372 100644 --- a/.github/workflows/setup_shell_env.py +++ b/.github/workflows/setup_shell_env.py @@ -13,6 +13,7 @@ def _main(): print(shell_definitions) +# TODO: Decide, how TLAPM version should be extracted. def _env_vars(tlapm_version: str) -> dict: """Return values for environment variables.""" if sys.platform == 'darwin': @@ -24,7 +25,7 @@ def _env_vars(tlapm_version: str) -> dict: 'unexpected operating system: ' f'{sys.platform = }') downloads = f'tlaps-{tlapm_version}-{tail}' - installer = f'{downloads}-inst.bin' + installer = f'{downloads}.tar.gz' return dict( TLAPM_VERSION=tlapm_version, INSTALLER=installer, diff --git a/Makefile b/Makefile index 0e0dd963..10ef9945 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,19 @@ -RELEASE_NAME=tlaps-$(shell git describe --tags)-$(shell uname -m)-$(shell uname -s | tr '[:upper:]' '[:lower:]') - -PREFIX?=$(OPAM_SWITCH_PREFIX) +OS_TYPE=$(patsubst CYGWIN%,Cygwin,$(shell uname)) + +ifeq ($(OS_TYPE),Linux) + HOST_OS=linux-gnu +endif +ifeq ($(OS_TYPE),Darwin) + HOST_OS=darwin +endif +ifeq ($(OS_TYPE),Cygwin) + HOST_OS=cygwin +endif +HOST_CPU=$(shell uname -m) +RELEASE_VERSION=$(shell git describe --tags) +RELEASE_NAME=tlaps-$(RELEASE_VERSION)-$(HOST_CPU)-$(HOST_OS) + +PREFIX=$(OPAM_SWITCH_PREFIX) all: build From 629bccda01b339a60c0256517d78655ae5a05f97 Mon Sep 17 00:00:00 2001 From: Karolis Petrauskas Date: Thu, 22 Jun 2023 23:08:07 +0300 Subject: [PATCH 38/44] Isabelle: set 64 bit arh explicitly. Signed-off-by: Karolis Petrauskas --- Makefile | 5 ++++- deps/isabelle/Makefile | 8 ++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 10ef9945..7777a924 100644 --- a/Makefile +++ b/Makefile @@ -34,6 +34,9 @@ test: test-inline: dune runtest src +test-fast: + make -C test fast + test-fast-basic: make -C test fast/basic @@ -51,5 +54,5 @@ release: clean: dune clean -.PHONY: all build check test test-inline test-fast-basic install release clean +.PHONY: all build check test test-inline test-fast test-fast-basic install release clean diff --git a/deps/isabelle/Makefile b/deps/isabelle/Makefile index 426d2d2c..0bd2ad3f 100644 --- a/deps/isabelle/Makefile +++ b/deps/isabelle/Makefile @@ -1,4 +1,5 @@ OS_TYPE=$(patsubst CYGWIN%,Cygwin,$(shell uname)) +HOST_CPU=$(shell uname -m) ISABELLE_VSN=Isabelle2011-1 @@ -57,15 +58,18 @@ $(ISABELLE_DIR)/src/TLA+: $(ISABELLE_DIR) && rm -rf contrib/ProofGeneral* doc heaps/*/HOL lib/{classes,fonts,logo} cd $(ISABELLE_DIR) \ && HEAPS_PATH=$(shell pwd)/$(ISABELLE_DIR)/heaps \ - && cp etc/settings etc/settings.orig \ + && if [ "$(HOST_CPU)" = "x86_64" ] ; then sed -i 's/^ML_PLATFORM=.*$$/ML_PLATFORM="$${ISABELLE_PLATFORM64:-$$ISABELLE_PLATFORM}"/' etc/settings ; fi \ + && cp etc/settings etc/settings.target \ && echo "ISABELLE_OUTPUT=$$HEAPS_PATH" >> etc/settings mkdir -p $(ISABELLE_DIR)/src/TLA+ \ && cp -a theories/TLA+/* $(ISABELLE_DIR)/src/TLA+/ + cd $(ISABELLE_DIR)/src/Pure \ + && ../../bin/isabelle make cd $(ISABELLE_DIR)/src/TLA+ \ && ../../bin/isabelle usedir -b Pure TLA+ cd $(ISABELLE_DIR) \ && rm etc/settings \ - && mv etc/settings.orig etc/settings + && mv etc/settings.target etc/settings # TODO: This is is a workaround to eliminate symlinks to directories # until https://github.com/ocaml/dune/issues/7831 is resolved. From 4536bfe5d30c301fb11bed58d6252275018a16af Mon Sep 17 00:00:00 2001 From: Karolis Petrauskas Date: Fri, 23 Jun 2023 00:22:15 +0300 Subject: [PATCH 39/44] Take version from the dune's build-info. Signed-off-by: Karolis Petrauskas --- dune-project | 1 + src/dune | 4 ++-- src/params.ml | 4 +++- src/release_version.ml | 2 -- src/release_version.mli | 6 ------ src/tlapm_args.ml | 4 ++-- src/version.ml | 2 -- src/version.mli | 6 ------ tlapm.opam | 1 + 9 files changed, 9 insertions(+), 21 deletions(-) delete mode 100644 src/release_version.ml delete mode 100644 src/release_version.mli delete mode 100644 src/version.ml delete mode 100644 src/version.mli diff --git a/dune-project b/dune-project index bca5063a..c0503ecb 100644 --- a/dune-project +++ b/dune-project @@ -38,6 +38,7 @@ (depends ocaml dune-site + dune-build-info sexplib ppx_inline_test ppx_assert)) diff --git a/src/dune b/src/dune index 87acf27e..73f8c71c 100644 --- a/src/dune +++ b/src/dune @@ -12,8 +12,8 @@ (name tlapm_lib) (modules (:standard \ tlapm test_schedule why3_interface abstractor)) (libraries - unix str dune-site ; main deps. - sexplib) ; for inline tests only (ppx_assert). + unix str dune-site dune-build-info ; main deps. + sexplib) ; for inline tests only (ppx_assert). (foreign_stubs (language c) (names sysconf_stubs)) (inline_tests (deps "../test/resources/module/m_save/TLC.tla")) (preprocess (pps ppx_inline_test ppx_assert))) diff --git a/src/params.ml b/src/params.ml index 257543ec..483ee30a 100644 --- a/src/params.ml +++ b/src/params.ml @@ -12,7 +12,9 @@ let self_sum = Digest.file Sys.executable_name (* must be a function because it must not be computed before all the modules are loaded. *) let rawversion () = - sprintf "%d.%d.%d" Version.major Version.minor Version.micro + match Build_info.V1.version () with + | None -> "development" + | Some v -> Build_info.V1.Version.to_string v let debug_flags : (string, unit) Hashtbl.t = Hashtbl.create 3 diff --git a/src/release_version.ml b/src/release_version.ml deleted file mode 100644 index dc6adee0..00000000 --- a/src/release_version.ml +++ /dev/null @@ -1,2 +0,0 @@ -(* AUTOMATICALLY GENERATED by tools/newversion.ml -- DO NOT EDIT *) -let (major,minor,micro) = (1,4,4);; diff --git a/src/release_version.mli b/src/release_version.mli deleted file mode 100644 index 21d23f58..00000000 --- a/src/release_version.mli +++ /dev/null @@ -1,6 +0,0 @@ -(* - * Copyright (C) 2011 INRIA and Microsoft Corporation - *) -val major: int -val minor: int -val micro: int diff --git a/src/tlapm_args.ml b/src/tlapm_args.ml index a2b88844..156f32a9 100644 --- a/src/tlapm_args.ml +++ b/src/tlapm_args.ml @@ -252,8 +252,8 @@ let init () = end ; check_zenon_ver () ; if !Params.toolbox then begin - Printf.printf "\n\\* TLAPM version %d.%d.%d\n" - Version.major Version.minor Version.micro; + Printf.printf "\n\\* TLAPM version %s\n" + (Params.rawversion ()); let tm = Unix.localtime (Unix.gettimeofday ()) in Printf.printf "\\* launched at %04d-%02d-%02d %02d:%02d:%02d" (tm.Unix.tm_year + 1900) (tm.Unix.tm_mon + 1) tm.Unix.tm_mday diff --git a/src/version.ml b/src/version.ml deleted file mode 100644 index 712a47d0..00000000 --- a/src/version.ml +++ /dev/null @@ -1,2 +0,0 @@ -(* AUTOMATICALLY GENERATED by tools/newversion.ml -- DO NOT EDIT *) -let (major,minor,micro) = (1,5,0);; diff --git a/src/version.mli b/src/version.mli deleted file mode 100644 index 21d23f58..00000000 --- a/src/version.mli +++ /dev/null @@ -1,6 +0,0 @@ -(* - * Copyright (C) 2011 INRIA and Microsoft Corporation - *) -val major: int -val minor: int -val micro: int diff --git a/tlapm.opam b/tlapm.opam index 00e79dd4..8f767455 100644 --- a/tlapm.opam +++ b/tlapm.opam @@ -28,6 +28,7 @@ depends: [ "dune" {>= "3.8"} "ocaml" "dune-site" + "dune-build-info" "sexplib" "ppx_inline_test" "ppx_assert" From d00ee1dbb43577a52f6924e77986c7a787d1fa23 Mon Sep 17 00:00:00 2001 From: Karolis Petrauskas Date: Fri, 23 Jun 2023 01:08:49 +0300 Subject: [PATCH 40/44] Use `tlapm --version` for the GH release workflow. Signed-off-by: Karolis Petrauskas --- .github/workflows/release.yml | 9 ++-- .github/workflows/setup_shell_env.py | 48 --------------------- .github/workflows/tlapm_version.py | 62 ---------------------------- Makefile | 12 ++++-- src/dune | 3 +- 5 files changed, 13 insertions(+), 121 deletions(-) delete mode 100644 .github/workflows/setup_shell_env.py delete mode 100644 .github/workflows/tlapm_version.py diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3baba2f4..fc13aec1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -105,10 +105,6 @@ jobs: - uses: ocaml/setup-ocaml@v2 with: ocaml-compiler: ${{ env.OCAML_VERSION }} - - name: Define TLAPS-related env vars - run: | - python .github/workflows/setup_shell_env.py \ - >> $GITHUB_ENV # - uses: actions/cache@v3 # id: cache # with: @@ -120,6 +116,7 @@ jobs: opam install ./ --deps-only --yes make make release + echo "TLAPM_RELEASE_FILE=$(make release-print-file)" >> "$GITHUB_ENV" - name: Run a subset of `tlapm` tests run: | eval $(opam env) @@ -132,6 +129,6 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.get_release_info.outputs.upload_url }} - asset_path: ${{ env.INSTALLER }} - asset_name: ${{ env.INSTALLER }} + asset_path: ${{ env.TLAPM_RELEASE_FILE }} + asset_name: ${{ env.TLAPM_RELEASE_FILE }} asset_content_type: application/octet-stream diff --git a/.github/workflows/setup_shell_env.py b/.github/workflows/setup_shell_env.py deleted file mode 100644 index 0447a372..00000000 --- a/.github/workflows/setup_shell_env.py +++ /dev/null @@ -1,48 +0,0 @@ -"""Define environment variables for CI testing.""" -import sys - -import tlapm_version as _version - - -def _main(): - """Entry point.""" - tlapm_version = _version.tlapm_version_string() - env_vars = _env_vars(tlapm_version) - shell_definitions = _make_shell_definitions( - env_vars) - print(shell_definitions) - - -# TODO: Decide, how TLAPM version should be extracted. -def _env_vars(tlapm_version: str) -> dict: - """Return values for environment variables.""" - if sys.platform == 'darwin': - tail = 'i386-darwin' - elif sys.platform == 'linux': - tail = 'x86_64-linux-gnu' - else: - raise ValueError( - 'unexpected operating system: ' - f'{sys.platform = }') - downloads = f'tlaps-{tlapm_version}-{tail}' - installer = f'{downloads}.tar.gz' - return dict( - TLAPM_VERSION=tlapm_version, - INSTALLER=installer, - DOWNLOADS=downloads) - - -def _make_shell_definitions(kv: dict) -> str: - """Return assignments to shell variables. - - For example, given the argument - `kv=dict(NAME='value')`, - returns the string`"NAME='value'"`. - """ - return '\n'.join( - f"{name}='{value}'" - for name, value in kv.items()) - - -if __name__ == '__main__': - _main() diff --git a/.github/workflows/tlapm_version.py b/.github/workflows/tlapm_version.py deleted file mode 100644 index 5dc42108..00000000 --- a/.github/workflows/tlapm_version.py +++ /dev/null @@ -1,62 +0,0 @@ -"""Print `tlapm` version string `X.Y.Z`.""" - - -# The environment constants -# `INSTALLER` and `DOWNLOADS` in -# `main.yml` and similar YAML files -# are used before the file `tlapm` has -# been installed. -# -# So running `tlapm --version` to -# obtain the version of `tlapm` is -# impossible. This is one reason why -# the version of `tlapm` is read -# from the OCaml source. - - -VERSION_FILE = 'src/version.ml' - # ASSUMPTION: This file contains - # exactly one line that starts - # with the `_PREFIX` defined below. -_PREFIX = 'let (major,minor,micro)' - - -def _print_tlapm_version(): - """Print `tlapm` version.""" - print(_tlapm_version_string()) - - -def tlapm_version_string() -> str: - """Return `tlapm` version string.""" - tlapm_version = _read_tlapm_version( - VERSION_FILE) - return '.'.join(map( - str, tlapm_version)) - - -def _read_tlapm_version( - filepath: - str - ) -> tuple[int, ...]: - """Return `tlapm` version. - - The version of `tlapm` is read from - the OCaml file at `filepath`. - """ - with open(filepath, 'r') as fd: - text = fd.read() - lines = text.splitlines() - def is_version_line(line): - return line.startswith(_PREFIX) - version_line, *rest = filter( - is_version_line, - lines) - if rest: - raise ValueError(rest) - version = version_line.split('=')[-1] - version = version.rstrip(';') - return eval(version) - - -if __name__ == '__main__': - _print_tlapm_version() diff --git a/Makefile b/Makefile index 7777a924..7a53671e 100644 --- a/Makefile +++ b/Makefile @@ -10,8 +10,9 @@ ifeq ($(OS_TYPE),Cygwin) HOST_OS=cygwin endif HOST_CPU=$(shell uname -m) -RELEASE_VERSION=$(shell git describe --tags) +RELEASE_VERSION=$(shell ./src/tlapm.exe --version) RELEASE_NAME=tlaps-$(RELEASE_VERSION)-$(HOST_CPU)-$(HOST_OS) +RELEASE_FILE=$(RELEASE_NAME).tar.gz PREFIX=$(OPAM_SWITCH_PREFIX) @@ -45,14 +46,17 @@ install: make -C $(PREFIX)/lib/tlapm/ -f Makefile.post-install release: - rm -rf $(RELEASE_NAME) $(RELEASE_NAME).tar.gz + rm -rf $(RELEASE_NAME) $(RELEASE_FILE) dune install --relocatable --prefix $(RELEASE_NAME) make -C $(RELEASE_NAME)/lib/tlapm -f Makefile.post-install - tar -czf $(RELEASE_NAME).tar.gz $(RELEASE_NAME) + tar -czf $(RELEASE_FILE) $(RELEASE_NAME) rm -rf $(RELEASE_NAME) +release-print-file: + @echo $(RELEASE_FILE) + clean: dune clean -.PHONY: all build check test test-inline test-fast test-fast-basic install release clean +.PHONY: all build check test test-inline test-fast test-fast-basic install release release-print-file clean diff --git a/src/dune b/src/dune index 73f8c71c..11c8cadb 100644 --- a/src/dune +++ b/src/dune @@ -6,7 +6,8 @@ (name tlapm) (public_name tlapm) (modules tlapm) - (libraries tlapm_lib)) + (libraries tlapm_lib) + (promote (until-clean))) ; Required to get `tlapm --version` during a release. (library (name tlapm_lib) From 4a0e42b1d063340e4f6b772b2e32db4f9ca02b7e Mon Sep 17 00:00:00 2001 From: Karolis Petrauskas Date: Fri, 23 Jun 2023 02:06:27 +0300 Subject: [PATCH 41/44] Make build more portable. Co-authored-by: Dominykas Bartkus Signed-off-by: Karolis Petrauskas --- .github/workflows/release.yml | 2 +- Makefile | 31 ++++++++++++++++++++----------- deps/isabelle/Makefile | 13 ++++++++----- 3 files changed, 29 insertions(+), 17 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fc13aec1..5de22a38 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -129,6 +129,6 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.get_release_info.outputs.upload_url }} - asset_path: ${{ env.TLAPM_RELEASE_FILE }} + asset_path: _build/${{ env.TLAPM_RELEASE_FILE }} asset_name: ${{ env.TLAPM_RELEASE_FILE }} asset_content_type: application/octet-stream diff --git a/Makefile b/Makefile index 7a53671e..136bc8ce 100644 --- a/Makefile +++ b/Makefile @@ -10,8 +10,7 @@ ifeq ($(OS_TYPE),Cygwin) HOST_OS=cygwin endif HOST_CPU=$(shell uname -m) -RELEASE_VERSION=$(shell ./src/tlapm.exe --version) -RELEASE_NAME=tlaps-$(RELEASE_VERSION)-$(HOST_CPU)-$(HOST_OS) +RELEASE_NAME=tlaps-$$RELEASE_VERSION-$(HOST_CPU)-$(HOST_OS) RELEASE_FILE=$(RELEASE_NAME).tar.gz PREFIX=$(OPAM_SWITCH_PREFIX) @@ -19,12 +18,15 @@ PREFIX=$(OPAM_SWITCH_PREFIX) all: build opam-deps: - opam install ./ --deps-only + opam install ./ --deps-only --yes --working-dir build: dune build if [ -z "`grep 'Makefile.post-install' tlapm.opam`" ] ; then \ - sed -i '/"dune" "install"/a \ \ ["%{make}%" "-C" "%{lib}%/tlapm" "-f" "Makefile.post-install"]' tlapm.opam; \ + rm -f tlapm.opam.tmp && \ + mv tlapm.opam tlapm.opam.tmp && \ + cat tlapm.opam.tmp | awk '/"dune" "install"/{print; print " [\"%{make}%\" \"-C\" \"%{lib}%/tlapm\" \"-f\" \"Makefile.post-install\"]" ; next} //{print}' > tlapm.opam && \ + rm -f tlapm.opam.tmp ; \ fi check: test @@ -46,17 +48,24 @@ install: make -C $(PREFIX)/lib/tlapm/ -f Makefile.post-install release: - rm -rf $(RELEASE_NAME) $(RELEASE_FILE) - dune install --relocatable --prefix $(RELEASE_NAME) - make -C $(RELEASE_NAME)/lib/tlapm -f Makefile.post-install - tar -czf $(RELEASE_FILE) $(RELEASE_NAME) - rm -rf $(RELEASE_NAME) + rm -rf _build/tlaps-release-dir + dune install --relocatable --prefix _build/tlaps-release-dir + RELEASE_VERSION="$$(_build/tlaps-release-dir/bin/tlapm --version)" \ + && rm -rf _build/$(RELEASE_FILE) \ + && make -C _build/tlaps-release-dir/lib/tlapm -f Makefile.post-install \ + && mv _build/tlaps-release-dir _build/$(RELEASE_NAME) \ + && (cd _build/ && tar -czf $(RELEASE_FILE) $(RELEASE_NAME)) \ + && rm -rf _build/$(RELEASE_NAME) \ + && echo $$RELEASE_VERSION > _build/tlaps-release-version + +release-print-version: + @cat _build/tlaps-release-version release-print-file: - @echo $(RELEASE_FILE) + @RELEASE_VERSION="$$(cat _build/tlaps-release-version)" && echo $(RELEASE_FILE) clean: dune clean -.PHONY: all build check test test-inline test-fast test-fast-basic install release release-print-file clean +.PHONY: all build check test test-inline test-fast test-fast-basic install release release-print-version release-print-file clean diff --git a/deps/isabelle/Makefile b/deps/isabelle/Makefile index 0bd2ad3f..aa78d541 100644 --- a/deps/isabelle/Makefile +++ b/deps/isabelle/Makefile @@ -6,14 +6,17 @@ ISABELLE_VSN=Isabelle2011-1 ifeq ($(OS_TYPE),Linux) ISABELLE_ARCHIVE=$(ISABELLE_VSN)_bundle_x86-linux.tar.gz ISABELLE_ARCHIVE_TYPE=tgz + FIND_EXEC=-executable endif ifeq ($(OS_TYPE),Darwin) ISABELLE_ARCHIVE=$(ISABELLE_VSN).dmg ISABELLE_ARCHIVE_TYPE=dmg + FIND_EXEC=-perm +111 endif ifeq ($(OS_TYPE),Cygwin) ISABELLE_ARCHIVE=$(ISABELLE_VSN)_bundle_x86-cygwin.tar.gz ISABELLE_ARCHIVE_TYPE=tgz + FIND_EXEC=-executable endif ISABELLE_URL=http://isabelle.in.tum.de/website-$(ISABELLE_VSN)/dist/$(ISABELLE_ARCHIVE) @@ -58,7 +61,7 @@ $(ISABELLE_DIR)/src/TLA+: $(ISABELLE_DIR) && rm -rf contrib/ProofGeneral* doc heaps/*/HOL lib/{classes,fonts,logo} cd $(ISABELLE_DIR) \ && HEAPS_PATH=$(shell pwd)/$(ISABELLE_DIR)/heaps \ - && if [ "$(HOST_CPU)" = "x86_64" ] ; then sed -i 's/^ML_PLATFORM=.*$$/ML_PLATFORM="$${ISABELLE_PLATFORM64:-$$ISABELLE_PLATFORM}"/' etc/settings ; fi \ + && if [ "$(HOST_CPU)" = "x86_64" ] ; then sed -i -e 's/^ML_PLATFORM=.*$$/ML_PLATFORM="$${ISABELLE_PLATFORM64:-$$ISABELLE_PLATFORM}"/' etc/settings ; fi \ && cp etc/settings etc/settings.target \ && echo "ISABELLE_OUTPUT=$$HEAPS_PATH" >> etc/settings mkdir -p $(ISABELLE_DIR)/src/TLA+ \ @@ -76,15 +79,15 @@ $(ISABELLE_DIR)/src/TLA+: $(ISABELLE_DIR) .PRECIOUS: $(ISABELLE_DIR).no-links $(ISABELLE_DIR).no-links: $(ISABELLE_DIR) $(ISABELLE_DIR)/src/TLA+ rm -rf $@ - cd $< && rm ./contrib/jre1.6.0_27_x86-linux/jre1.6.0_27/man/ja - cd $< && rm ./contrib/polyml-5.4.0/src - cd $< && rm ./contrib/polyml && mv ./contrib/polyml-5.4.0 ./contrib/polyml + cd $< && rm -f ./contrib/jre1.6.0_27_x86-linux/jre1.6.0_27/man/ja + cd $< && rm -f ./contrib/polyml-5.4.0/src + cd $< && rm -f ./contrib/polyml && mv ./contrib/polyml-5.4.0 ./contrib/polyml touch $@ # TODO: This is a workaround, because the dune install removes all the executable # flags (or sets on all the files). Here we generate a script to restore the flags. Isabelle.post-install: $(ISABELLE_DIR).no-links - echo "FILES=$(shell find $(ISABELLE_DIR) -type f -executable)" > $@ + echo "FILES=$(shell find $(ISABELLE_DIR) -type f $(FIND_EXEC))" > $@ echo "all:\n\t chmod +x \$$(FILES)" >> $@ clean: From 620b9dcef89fd23b0a1a91d882e5015625981730 Mon Sep 17 00:00:00 2001 From: Karolis Petrauskas Date: Sat, 24 Jun 2023 18:44:09 +0300 Subject: [PATCH 42/44] Run a short test during the release. Signed-off-by: Karolis Petrauskas --- Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 136bc8ce..2347b49b 100644 --- a/Makefile +++ b/Makefile @@ -48,11 +48,15 @@ install: make -C $(PREFIX)/lib/tlapm/ -f Makefile.post-install release: - rm -rf _build/tlaps-release-dir + rm -rf _build/tlaps-release-dir _build/tlaps-release-version dune install --relocatable --prefix _build/tlaps-release-dir + make -C _build/tlaps-release-dir/lib/tlapm -f Makefile.post-install + cd test && env \ + USE_TLAPM=../_build/tlaps-release-dir/bin/tlapm \ + USE_LIB=../_build/tlaps-release-dir/lib/tlapm/stdlib \ + ./TOOLS/do_tests fast/basic RELEASE_VERSION="$$(_build/tlaps-release-dir/bin/tlapm --version)" \ && rm -rf _build/$(RELEASE_FILE) \ - && make -C _build/tlaps-release-dir/lib/tlapm -f Makefile.post-install \ && mv _build/tlaps-release-dir _build/$(RELEASE_NAME) \ && (cd _build/ && tar -czf $(RELEASE_FILE) $(RELEASE_NAME)) \ && rm -rf _build/$(RELEASE_NAME) \ From 41c36d1eb8c517971ff5b37652cf5819315ebdfa Mon Sep 17 00:00:00 2001 From: Karolis Petrauskas Date: Sun, 25 Jun 2023 20:26:51 +0300 Subject: [PATCH 43/44] Use an opam.template to customize the build step for opam. Signed-off-by: Karolis Petrauskas --- Makefile | 6 ------ tlapm.opam | 4 ++-- tlapm.opam.template | 17 +++++++++++++++++ 3 files changed, 19 insertions(+), 8 deletions(-) create mode 100644 tlapm.opam.template diff --git a/Makefile b/Makefile index 2347b49b..ff83fe9b 100644 --- a/Makefile +++ b/Makefile @@ -22,12 +22,6 @@ opam-deps: build: dune build - if [ -z "`grep 'Makefile.post-install' tlapm.opam`" ] ; then \ - rm -f tlapm.opam.tmp && \ - mv tlapm.opam tlapm.opam.tmp && \ - cat tlapm.opam.tmp | awk '/"dune" "install"/{print; print " [\"%{make}%\" \"-C\" \"%{lib}%/tlapm\" \"-f\" \"Makefile.post-install\"]" ; next} //{print}' > tlapm.opam && \ - rm -f tlapm.opam.tmp ; \ - fi check: test diff --git a/tlapm.opam b/tlapm.opam index 8f767455..b83e8eed 100644 --- a/tlapm.opam +++ b/tlapm.opam @@ -34,7 +34,8 @@ depends: [ "ppx_assert" "odoc" {with-doc} ] -build: [ +dev-repo: "git+https://github.com/tlaplus/tlapm.git" +build: [ # This is to override the build step, add the invocation of `Makefile.post-install`. ["dune" "subst"] {dev} [ "dune" @@ -51,4 +52,3 @@ build: [ ["dune" "install" "-p" name "--create-install-files" name] ["%{make}%" "-C" "%{lib}%/tlapm" "-f" "Makefile.post-install"] ] -dev-repo: "git+https://github.com/tlaplus/tlapm.git" diff --git a/tlapm.opam.template b/tlapm.opam.template new file mode 100644 index 00000000..b44cc29a --- /dev/null +++ b/tlapm.opam.template @@ -0,0 +1,17 @@ +build: [ # This is to override the build step, add the invocation of `Makefile.post-install`. + ["dune" "subst"] {dev} + [ + "dune" + "build" + "-p" + name + "-j" + jobs + "--promote-install-files=false" + "@install" + "@runtest" {with-test} + "@doc" {with-doc} + ] + ["dune" "install" "-p" name "--create-install-files" name] + ["%{make}%" "-C" "%{lib}%/tlapm" "-f" "Makefile.post-install"] +] From 2bd1f823c65db8e58730b2f333882a27c9a902fe Mon Sep 17 00:00:00 2001 From: Karolis Petrauskas Date: Fri, 13 Oct 2023 22:30:43 +0300 Subject: [PATCH 44/44] Build/install procedures updated. Signed-off-by: Karolis Petrauskas --- INSTALL | 82 --------------------------------------- INSTALL.md | 112 +++++++++++++++++++++++++++++++++++++++++++++++++++++ Makefile | 3 ++ README.md | 2 +- 4 files changed, 116 insertions(+), 83 deletions(-) delete mode 100644 INSTALL create mode 100644 INSTALL.md diff --git a/INSTALL b/INSTALL deleted file mode 100644 index 64d3e01d..00000000 --- a/INSTALL +++ /dev/null @@ -1,82 +0,0 @@ -Installing the TLA+ Proof Manager (tlapm) -========================================= - -Copyright (C) 2008-2010 INRIA and Microsoft Corporation - -0. Dependencies ---------------- - - - A UNIX-like system. The following are known to work: - - * Any modern UNIX - * Cygwin under Windows - * OS X - - - Objective Caml (OCaml) version 3.10.2 or later. - - Try one of the following: - - a. Use a precompiled binary package for your operating system. - - b. Build it from the official source. - - c. Use GODI: http://godi.camlcity.org/godi/index.html - - d. On most modern Linux distributions, OCaml is already packaged. - Here are the commands for some of the more popular Linux - distributions: - - Debian and Ubuntu: - apt-get install ocaml - Redhat, Mandriva, and SuSE: - yum install ocaml - Gentoo: - emerge ocaml - Arch Linux: - pacman install ocaml - - - Zenon. See instructions in zenon/INSTALL - - - Isabelle/TLA+. See instructions in TLA+/INSTALL - - -1. Installation ---------------- - -A standard 'configure' script is provided to generate a Makefile. Run -it as: - - % ./configure - -This will install tlapm in the default local install directory on your -operating system, usually /usr/local. This directory is represented -by ${prefix}. - -If you want to install it to a different location, such as ${HOME}, -run 'configure' as follows: - - % ./configure --prefix=${HOME} - -If you want to install it in-place, run: - - % ./configure --prefix=`pwd` - -(Remember to add `pwd`/bin to your $PATH.) - -If 'configure' completes successfully, then run: - - % make all install - -This will build the PM, copy the binary 'tlapm' (or 'tlapm.exe') to -${prefix}/bin, and copy some program data to ${prefix}/share/tlaps. - - -2. Uninstallation ------------------ - -To uninstall 'tlapm', run: - - % make uninstall - -This will remove the 'tlapm' binary from ${prefix}/bin and any data -belonging to tlapm from ${prefix}/share/tlaps. diff --git a/INSTALL.md b/INSTALL.md new file mode 100644 index 00000000..0bf4e924 --- /dev/null +++ b/INSTALL.md @@ -0,0 +1,112 @@ + +# Installing the TLA+ Proof Manager (tlapm) + +Copyright (C) 2008-2010 INRIA and Microsoft Corporation + +## 0. Dependencies + + - A UNIX-like system. The following are known to work: + + * Any modern UNIX + * WSL under Windows + * OS X + + - Objective Caml (OCaml) version 4.08.1 or later. + + Typically installed using `opam` (). + + - Zenon. + + Built during the TLAPM build procedure. + + - Isabelle/TLA+. + + Downloaded and built during the TLAPM build procedure. + +## 1. Installation + +### 1.1. Debian / Ubuntu + +#### 1.1.1. Setup the environment + +Setup required OS packages: + +```{bash} +sudo apt install opam zlib1g-dev gawk time +``` + +Initialize the OPAM. Add `--disable-sandboxing` option if running this on the docker or sandboxing is not supported for other reasons. + +```{bash} +opam init +``` + +Install the desired OCAML version. The second command is required to setup the ocaml for the current shell session. + +```{bash} +opam switch create 5.1.0 +eval $(opam env --switch=5.1.0) +``` + +#### 1.1.2. Build and install TLAPM + +Clone the TLAPM source code + +```{bash} +git clone https://github.com/tlaplus/tlapm +cd tlapm +``` + +Install the dependencies via OPAM. A helper `make` target is present for that: + +```{bash} +make opam-deps +``` + +Compile the embedded dependencies and TLAPM: + +```{bash} +make +``` + +Install it under the `~/.opam/` folder: + +```{bash} +make install +``` + +Now you can invoke `tlapm` in either way: + + - `opam exec -- tlapm --help` (locates it using the current selected opam switch); + - `~/.opam/5.1.0/bin/tlapm --help`. + + +#### 1.1.3. Running the tests +To run the test suite, invoke: +```{bash} +make test +``` + +#### 1.1.4. Development environment + +To setup the development environment, run the following in addition to the above steps: + +```{bash} +make opam-deps-dev +``` + +Then view/edit the code e.g. using VSCode with the `OCaml Platform` extension installed. + + +#### 1.1.5. Testing the build/install procedures + +The above instructions were tested with + +```{bash} +docker run -it --rm debian bash +apt install sudo +adduser u1 +usermod -aG sudo u1 +su - u1 +# Then run the commands above. +``` diff --git a/Makefile b/Makefile index ff83fe9b..402f5f26 100644 --- a/Makefile +++ b/Makefile @@ -20,6 +20,9 @@ all: build opam-deps: opam install ./ --deps-only --yes --working-dir +opam-deps-dev: + opam install ocamlformat ocaml-lsp-server + build: dune build diff --git a/README.md b/README.md index a3555218..eeea7b26 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ License: 2-clause BSD, portions under LGPL2.1+LE Installation ------------ -For installation instructions, see the file `INSTALL` in this directory. +For installation instructions, see the file [INSTALL.md](INSTALL.md) in this directory. Use