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

Rebase of Optim Alt-Ergo #553

Closed
wants to merge 81 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
c74ca18
change version to models
ACoquereau Oct 9, 2020
98772b3
models generation: add some examples
May 28, 2020
5dacb94
check sat handled on the lowest possible level, need to work on unsat…
Jul 2, 2020
3bca712
first prototype for models in Why3, lots of hard coded stuff that nee…
ACoquereau Sep 1, 2020
963a5b9
Change interpretation option, use mdl-formatter to compute but not pr…
ACoquereau Dec 17, 2020
16a9f12
Move the printing of counterexample from uf.ml to models.ml
ACoquereau Oct 16, 2020
dceb732
Prototype of printer for records in smt format
ACoquereau Oct 16, 2020
483e561
Directly use rep of bool value for counterexamples
ACoquereau Oct 16, 2020
687b6bb
fix destr list rev
ACoquereau Oct 16, 2020
5d787fd
Clean choose_adequate_model for boolean constant
ACoquereau Oct 19, 2020
ee6f0c9
Add `fast` option that disable greedier instantiation phase
ACoquereau Dec 17, 2020
b995c0f
remove greedier and get_fast in fun_sat
Jan 19, 2021
d8bca6b
Prototype to output constraint as model if output is set to why3
ACoquereau Nov 13, 2020
e4e1a2e
Remove `why3-counter-example` option, use `-o why3` instead
ACoquereau Nov 19, 2020
e55d960
Code cleaning and addition of functions printing with cascade of ite
ACoquereau Nov 19, 2020
a7fd0bb
fix compatibility for ocaml version < 4.07
ACoquereau Nov 20, 2020
489a161
Fix printing of some type in smtlib2 output format
ACoquereau Nov 20, 2020
463ce8d
Add support for record constuctor use in model
ACoquereau Nov 24, 2020
1bd990e
Add option dummy-value for interpretation that output _ instead of du…
ACoquereau Nov 25, 2020
a644b8d
Fix pp_term and assert output prototype
ACoquereau Nov 25, 2020
55301df
reeplace dummy_value with use_underscore option
ACoquereau Nov 26, 2020
d3f99ce
remove fast option, use `--instantiation-heuristic=normal` instead
ACoquereau Dec 17, 2020
c175989
Copy print expr code in models for better management of named expr
ACoquereau Dec 17, 2020
f8aa8fa
[models] add case-split on internal bool terms
Dec 19, 2020
02b104d
Type Expr.view should remain "private"
Dec 28, 2020
ac9e7d2
auto set option "fm_cross_limit = -1" (ie. infinity) if models-gen is…
Jan 7, 2021
304e0af
Fix use_underscore_interpretation option
ACoquereau Jan 8, 2021
9712103
Remove deadcode from models and mv models.ml in frontend
ACoquereau Jan 8, 2021
81e9b01
remove unused models-generation code (all, complete and default models)
Jan 8, 2021
6b364cf
remove functions related to old model
ACoquereau Jan 8, 2021
c47dfec
clean unused code
Jan 8, 2021
a987dd3
fix linter
Jan 9, 2021
ab8bb1a
Fix frontend output in case of timeout
ACoquereau Jan 8, 2021
5afaff6
Clean models, remove old native output, and remove ref for records
ACoquereau Jan 8, 2021
5042209
Move profile module from Models module to structures
ACoquereau Jan 8, 2021
1afd75f
Fix printing of constraints in why3 output when constraints are func…
ACoquereau Jan 15, 2021
66af011
Fix declare-fun command in models
ACoquereau Feb 9, 2021
be9794d
Lists.ml: new function partition_map more generic than List.partition
iguerNL May 1, 2021
6a7f41e
working examples for linear optimization feature
iguerNL May 1, 2021
3eb3ab9
New option `--objectives-in-model` to show optimized expressions in '…
iguerNL May 1, 2021
c5ab9ef
Theory: harden 'compute_concrete_model' function
iguerNL May 1, 2021
70da092
Push the test 'get_case_split_policy() == origin' into Theory.do_case…
iguerNL May 1, 2021
3610394
CS: functions return all the env instead of just 'gamma_finite'.
iguerNL May 1, 2021
ac7fbdd
Refactoring to reduce "printing unbounded values" patch in uf.ml.
iguerNL May 1, 2021
da2783a
reintroduce debug traces in satml
iguerNL May 1, 2021
eab5339
Theory.query: simple test to deactivate TCP for both FunSat and CDCL
iguerNL May 1, 2021
b839235
Frontend: new syntax for optimisation constraints, with their ordering.
iguerNL May 1, 2021
8a4967b
Fix expr.ml: purify inside Optimize _ as well
iguerNL May 1, 2021
d5cc003
prepare CS to return 'Unbounded' in case of optimization requests.
iguerNL May 1, 2021
8dc07da
Infrastructure in theories for CS with optimized values
iguerNL May 1, 2021
f6c1445
Detect optimization directives (predicates) in Theory and update env
iguerNL May 1, 2021
dce2768
IntervalCalculus: Produce optimized splits for LIA and LRA
iguerNL May 1, 2021
211b54f
update SMT2 model output with '(objectives ...)' section
iguerNL May 1, 2021
5ea4ef0
Fun_sat: refactor the way models are handled/printed
iguerNL May 1, 2021
1a61b24
satML: add missing case-split strategies
iguerNL May 1, 2021
3db692a
satML: implement models generation.
iguerNL May 1, 2021
5a0e246
UF: fix model_extraction: arguments of function may be interpreted
iguerNL May 1, 2021
75c303f
Print models of arrays (home made syntax)
iguerNL May 1, 2021
9d37328
Models: re-introduce removed invariant check
iguerNL May 1, 2021
7d1a860
Models: don't "assert false" when seeing an AC symbols in 'assign_next'
iguerNL May 1, 2021
8a2e111
Fix printing of status when in interpretation mode and add clean fmt …
ACoquereau Jan 18, 2021
4f75ac2
Correctly handle Case-split backtrack when having Optimization constr…
iguerNL May 1, 2021
9d3d34e
Handling disjunctions in optimization
iguerNL May 1, 2021
1766c11
Translate minimize/maximize from psmt2-frontend to Alt-Ergo
iguerNL May 1, 2021
9b61fae
fix translate ordering in pstm2_to_alt_ergo
iguerNL May 1, 2021
4325df2
fix translate from SMT2 to AE
iguerNL May 1, 2021
88d0255
re-implement all-models feature differently
iguerNL May 1, 2021
eaeaba6
pprinting models of functions: print models of args instead of args
iguerNL May 1, 2021
ed979ed
compute model of terms starting from the smallest one
iguerNL May 1, 2021
6dd3cd4
Models: export the map of term |-> get-value(term) computed in UF
iguerNL May 1, 2021
7030c1f
optim:re-set timelimit when trying to find a better min in other bran…
iguerNL May 1, 2021
3c963b2
Fix printing in models by usin Printer functions
ACoquereau Feb 23, 2021
10d6574
Print why3 parsable variable name when it's a fresh
ACoquereau Feb 23, 2021
b89c678
Fix new options in output section in the manpage
ACoquereau Feb 25, 2021
2322087
Add timeout-as-unknown option
ACoquereau Feb 25, 2021
564ac1c
Fix fresh names in ite
ACoquereau Feb 25, 2021
bb55438
bugfix in bitv.ml: fresh vars should be attached to syntactic terms
iguerNL May 1, 2021
bebfd62
Accumulate facts when calling SAT.assume
iguerNL May 1, 2021
5e557ae
Add ability to enable Cube-Test bounds inference (done if --no-fm is …
iguerNL May 1, 2021
7366af6
remove useless debug messages + lint
iguerNL May 1, 2021
09430b3
Fix JS worker
Halbaroth Mar 13, 2023
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
1 change: 1 addition & 0 deletions alt-ergo-lib.opam
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# This file is generated by dune, edit dune-project instead
opam-version: "2.0"
version: "dev"
synopsis: "The Alt-Ergo SMT prover library"
description: """
This is the core library used in the Alt-Ergo SMT solver.
Expand Down
1 change: 1 addition & 0 deletions alt-ergo-parsers.opam
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# This file is generated by dune, edit dune-project instead
opam-version: "2.0"
version: "dev"
synopsis: "The Alt-Ergo SMT prover parser library"
description: """
This is the parser library used in the Alt-Ergo SMT solver.
Expand Down
1 change: 1 addition & 0 deletions alt-ergo.opam
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# This file is generated by dune, edit dune-project instead
opam-version: "2.0"
version: "dev"
synopsis: "The Alt-Ergo SMT prover"
description: """
Alt-Ergo is an automatic theorem prover of mathematical formulas. It was developed at LRI, and is now maintained at OCamlPro.
Expand Down
1 change: 1 addition & 0 deletions altgr-ergo.opam
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# This file is generated by dune, edit dune-project instead
opam-version: "2.0"
version: "dev"
synopsis: "The GUI for the Alt-Ergo SMT prover"
description: """
Altgr-Ergo is the graphical interface for the Alt-Ergo SMT prover.
Expand Down
1 change: 1 addition & 0 deletions dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
(generate_opam_files true)

(name alt-ergo)
(version dev)
(authors "Alt-Ergo developers")
(maintainers "Alt-Ergo developers")
(source (github OCamlPro/alt-ergo))
Expand Down
13 changes: 13 additions & 0 deletions examples/optim-examples/bug-disj.ae
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
logic m1, m2, ae : prop
logic A, M, S : int

axiom a1:
if ae then A = 0 else A = 1

axiom a2:
if (m1 or m2) then M = 0 else M = 1

goal g:
S = A + M ->
minimize(S, 1) ->
false
12 changes: 12 additions & 0 deletions examples/optim-examples/bug-disj.smt2
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
logic m1, m2, ae : prop
logic x, y : int

axiom a1:
x = if ae then 0 else 1

axiom a2:
y = if (m1 or m2) then 0 else 1

goal g:
minimize(x + y, 1) ->
false
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
logic x, y, z : int

axiom a: 0 <= x <= 33

axiom a: minimize (z, 3)
axiom a: maximize (x, 1)
axiom a: maximize (y, 2)

goal g:
1 <= z <= 11 ->
0 <= y <= 10 ->
false
14 changes: 14 additions & 0 deletions examples/optim-examples/challenge.ae
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
logic x : int
logic y : int
logic P : int -> prop
logic Q : prop

goal g:
maximize(x,1) ->
maximize(y,2) ->

P(x) -> (* just to introduce x and set its max to +infinity *)
(Q and (0 <= y <= 10)) or (not Q and (1000 <= y <= 1000)) ->

(*x <= 50 ->*)
false
38 changes: 38 additions & 0 deletions examples/optim-examples/disj-1.ae
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
logic x, y : int
logic p, q : int -> prop

(*
goal g: (* max is 200 *)
maximize(x, 1) ->
0 <= x <= 1000 ->
((x <= 50) or (x <= 200)) ->
false
*)

(*
goal g: (* max is 200 *)
maximize(x, 1) ->
((y >= 10) or (y <= 200)) ->
false
*)


(*
goal g:
maximize(x, 1) ->
(p(x) or q(x))
*)

(*
goal g: (* max is x = 50, y = 500 *)
maximize(x, 1) ->
maximize(y, 2) ->
((x <= 50 and y <= 300) or (x = 50 and y <= 500)) ->
false
*)

goal g: (* max is x = 50, y = 500 *)
maximize(x, 1) ->
maximize(y, 2) ->
((x <= 40 and y <= 500) or (x <= 50 and y <= 300)) ->
false
14 changes: 14 additions & 0 deletions examples/optim-examples/incrementality.ae
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
logic x, y, z, t,u : int

goal g:
maximize(x, 1) ->
minimize(y, 2) ->
maximize(z, 3) ->
0 <= x <= 10 ->
0 <= y - 2 * x <= 100 ->
0 <= z <= x * y ->
10 < t ->
-50 <= u <= 40 ->
maximize(u, 4) ->

false
13 changes: 13 additions & 0 deletions examples/optim-examples/issue-6.ae
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
logic x, y : int
logic f : int -> int

goal g:
maximize(f(x), 1) ->
maximize(x, 2) ->
maximize(y, 3) ->
maximize(f(y), 4) ->
f(y) >= 20 ->
x > y ->
0 <= x ->
0 <= f(x) <= 10 ->
false
11 changes: 11 additions & 0 deletions examples/optim-examples/issue-7-b.ae
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
logic x : int
logic f : int -> int
logic P : int -> prop

goal g:
maximize(x,1) ->
maximize(f(x), 2) ->
P(x) ->
0 <= f(x) <= 100 ->
1 <= x <= 5 -> (* ordering of constraints is important *)
false
12 changes: 12 additions & 0 deletions examples/optim-examples/issue-7.ae
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
logic x, y : int
logic f : int -> int
logic P : int -> prop

goal g:
P(x) ->
0 <= f(x) <= 100 ->
f(y) = 50 ->
x = 1 -> (* ordering of constraints is important *)
maximize(x,1) ->
maximize(f(x), 2) ->
false
20 changes: 20 additions & 0 deletions examples/optim-examples/micro.ae
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
goal g1 :
forall x : int.
forall z : int.
maximize(x,1) ->
maximize(z,2) ->
2 * x <= 125 ->
0 <= z <= 10 ->
false

(* z is a "don't care" in this second example, because y is already
unbounded. (although y and z are independant *)

goal g :
forall y : int.
minimize(y,1) ->
3 * y <= 125 ->
forall z : int.
maximize(z,2) ->
0 <= z <= 10 ->
false
4 changes: 4 additions & 0 deletions examples/optim-examples/nano_unbounded.ae
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
goal g :
forall x : int.
maximize(x,1) ->
x >= 0 -> false
Loading