Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get rid of the legacy frontend finally! #1251

Merged
merged 12 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## unreleased

### SMT-LIB support

- Remove the legacy frontend and AB-Why3 plugin

## v2.6.0

### Command-line interface
Expand Down
14 changes: 4 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ SPHINXBUILD = sphinx-build
# This excludes:
# - .ml files generated by menhir or ocamllex
# (since they reside in dune specific directory)
GENERATED_LINKS=alt-ergo alt-ergo.js alt-ergo-worker.js AB-Why3-plugin.cma AB-Why3-plugin.cmxs fm-simplex-plugin.cma fm-simplex-plugin.cmxs
GENERATED_LINKS=alt-ergo alt-ergo.js alt-ergo-worker.js fm-simplex-plugin.cma fm-simplex-plugin.cmxs
GENERATED=$(GENERATED_LINKS)


Expand All @@ -62,8 +62,7 @@ clean: generated-clean dune-clean ocamldot-clean
distclean: makefile-distclean release-distclean

# declare these aliases as phony
.PHONY: world conf clean distclean alt-ergo-lib \
alt-ergo-parsers alt-ergo
.PHONY: world conf clean distclean alt-ergo-lib alt-ergo

# =================
# Build rules (dev)
Expand All @@ -83,10 +82,6 @@ fm-simplex:
$(DUNE) build $(DUNE_FLAGS) @$(PLUGINS_DIR)/fm-simplex/all
$(DUNE) build $(DUNE_FLAGS) @install

AB-Why3:
$(DUNE) build $(DUNE_FLAGS) @$(PLUGINS_DIR)/AB-Why3/all
$(DUNE) build $(DUNE_FLAGS) alt-ergo-plugin-ab-why3.install

plugins:
$(DUNE) build $(DUNE_FLAGS) @$(PLUGINS_DIR)/all

Expand All @@ -99,7 +94,7 @@ all:

# declare these targets as phony to avoid name clashes with existing directories,
# particularly the "plugins" target
.PHONY: lib bin fm-simplex AB-Why3 plugins all
.PHONY: lib bin fm-simplex plugins all

# =====================
# Build rules (release)
Expand Down Expand Up @@ -241,7 +236,7 @@ lock:
./alt-ergo-lib.opam.locked

dev-switch:
opam switch create . --deps-only --ignore-constraints-on alt-ergo-lib,alt-ergo-parsers
opam switch create . --deps-only --ignore-constraints-on alt-ergo-lib

js-deps:
opam install \
Expand Down Expand Up @@ -295,7 +290,6 @@ FILES_DEST=public-release/$(PUBLIC_RELEASE)
tests \
alt-ergo.opam \
alt-ergo-lib.opam \
alt-ergo-parsers.opam \
dune-project \
Makefile \
README.md \
Expand Down
49 changes: 0 additions & 49 deletions alt-ergo-parsers.opam

This file was deleted.

8 changes: 0 additions & 8 deletions alt-ergo-parsers.opam.template

This file was deleted.

44 changes: 0 additions & 44 deletions alt-ergo-plugin-ab-why3.opam

This file was deleted.

5 changes: 0 additions & 5 deletions alt-ergo-plugin-ab-why3.opam.template

This file was deleted.

1 change: 0 additions & 1 deletion alt-ergo.opam
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ depends: [
"ocaml" {>= "4.08.1"}
"dune" {>= "3.14"}
"alt-ergo-lib" {= version}
"alt-ergo-parsers" {= version}
"menhir"
"dune-site"
"cmdliner" {>= "1.1.0"}
Expand Down
15 changes: 1 addition & 14 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,27 +27,14 @@ let
];
};

alt-ergo-parsers = ocamlPackages.buildDunePackage rec {
pname = "alt-ergo-parsers";
inherit version src;

minimalOCamlVersion = "4.08";
duneVersion = "3";

nativeBuildInputs = [ ocamlPackages.menhir ];
propagatedBuildInputs = [ alt-ergo-lib ] ++ (with ocamlPackages; [
psmt2-frontend
]);
};

alt-ergo = ocamlPackages.buildDunePackage {
pname = "alt-ergo";
inherit version src;

minimalOCamlVersion = "4.08";
duneVersion = "3";

buildInputs = [ alt-ergo-parsers ] ++ (with ocamlPackages; [
buildInputs = (with ocamlPackages; [
cmdliner
dune-site
]);
Expand Down
8 changes: 1 addition & 7 deletions docs/sphinx_docs/Install/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Alt-ergo is available on [opam], the ocaml package manager with the following co
opam install alt-ergo
```

This command will install the Alt-ergo library `alt-ergo-lib` and the parsers `alt-ergo-parsers`, as well as other librairies detailled in [dependencies](#dependencies).
This command will install the Alt-ergo library `alt-ergo-lib`, as well as other librairies detailled in [dependencies](#dependencies).

Since version 2.6.0, Alt-Ergo is compatible with opam 2.2 installations using both Cygwin and MSYS2 on Windows. To setup opam on Windows, please follow the instructions [here](https://ocamlpro.com/blog/2024_07_01_opam_2_2_0_releases/).

Expand Down Expand Up @@ -83,12 +83,6 @@ Note: these are somewhat obsolete; nowadays you can just use `dune`

2. Install with `make install-lib`

#### Alt-Ergo parsers

1. Compile with `make alt-ergo-parsers`

2. Install with `make install-parsers`

#### Alt-Ergo binary

1. Compile with `make alt-ergo`
Expand Down
10 changes: 0 additions & 10 deletions docs/sphinx_docs/Plugins/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,6 @@ be registered in the `(alt-ergo plugins)` site using
to be available as an option to `--inequalities-plugin`.
```

## AB why3 plugin (**deprecated**)

```{warning}
The AB Why3 plugin requires the use of the `--frontend legacy` option, which is
deprecated and will be removed in the next version of Alt-Ergo.

If you are using this plugin and would like it to be available in new versions
of Alt-Ergo, please contact [the Alt-Ergo developers](mailto:alt-ergo@ocamlpro.com).
```

```{toctree}
:maxdepth: 2

Expand Down
18 changes: 0 additions & 18 deletions docs/sphinx_docs/Usage/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,24 +40,6 @@ Alt-Ergo supports file extensions:

See the [SMT-LIB language] and [Alt-ergo native language] sections for more information about the format of the input files.

### Frontend option

The `--frontend` option lets you select the frontend used to parse and type the input file. Since version 2.5.0,
Alt-Ergo integrates two frontends:
- The `dolmen` frontend is the default frontend, powered by the
[Dolmen](https://github.com/Gbury/dolmen) library. The native and SMT-LIB
languages are both supported by this frontend.
- The `legacy` frontend is the historical frontend of Alt-Ergo supporting the
native language. You can select it with the `--frontend legacy` option. The
legacy frontend is deprecated, and will be removed in a future release.

```{admonition} Note

The `legacy` frontend has limited support for the SMT-LIB language, but many
SMT-LIB features will not work with the `legacy` frontend. Use the (default)
`dolmen` frontend for SMT-LIB inputs.
```

### Preludes

Preludes can be passed to Alt-Ergo as follows:
Expand Down
39 changes: 0 additions & 39 deletions dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ See more details on https://alt-ergo.ocamlpro.com/")
(ocaml (>= 4.08.1))
dune
(alt-ergo-lib (= :version))
(alt-ergo-parsers (= :version))
menhir
dune-site
(cmdliner (>= 1.1.0))
Expand All @@ -38,29 +37,6 @@ See more details on https://alt-ergo.ocamlpro.com/")
(sites (share preludes) (lib plugins))
)

(package
(name alt-ergo-parsers)
(synopsis "The Alt-Ergo SMT prover parser library")
(description "\
This is the parser library used in the Alt-Ergo SMT solver.

Alt-Ergo is an automatic theorem prover of mathematical formulas. It was developed at LRI, and is now maintained at OCamlPro.

See more details on http://alt-ergo.ocamlpro.com/"
)
(license "LicenseRef-OcamlPro-Non-Commercial")

(depends
(ocaml (>= 4.08.1))
dune
(alt-ergo-lib (= :version))
(psmt2-frontend (>= 0.4))
menhir
stdlib-shims
(odoc :with-doc)
)
)

(package
(name alt-ergo-lib)
(synopsis "The Alt-Ergo SMT prover library")
Expand Down Expand Up @@ -97,18 +73,3 @@ See more details on http://alt-ergo.ocamlpro.com/"
(result (< 1.5))
)
)

(package
(name alt-ergo-plugin-ab-why3)
(synopsis "An experimental Why3 frontend for Alt-Ergo")
(description "\
An experimental front-end that parses a subset of Why3's logic. More
precisely, this front-end targets proof obligations generated by the
Atelier-B framework in Why3 format. It should be used with a prelude
defining the B Set theory.")
(license "LGPL-2.1-only")

(depends
(alt-ergo (= :version))
(alt-ergo-lib (= :version))
(alt-ergo-parsers (= :version))))
Loading
Loading