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

[WIP] OptimAE #776

Closed
wants to merge 42 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
b26c5dd
working examples for linear optimization feature
iguerNL May 1, 2021
7b97719
New option `--objectives-in-model` to show optimized expressions in '…
iguerNL May 1, 2021
c299944
Theory: harden 'compute_concrete_model' function
iguerNL May 1, 2021
e69d34e
Push the test 'get_case_split_policy() == origin' into Theory.do_case…
iguerNL May 1, 2021
772a682
CS: functions return all the env instead of just 'gamma_finite'.
iguerNL May 1, 2021
b4348e2
Refactoring to reduce "printing unbounded values" patch in uf.ml.
iguerNL May 1, 2021
3f778b2
reintroduce debug traces in satml
iguerNL May 1, 2021
9c2263b
Theory.query: simple test to deactivate TCP for both FunSat and CDCL
iguerNL May 1, 2021
2bfa13c
begin-optim-alt: Frontend: new syntax for optimisation constraints, w…
iguerNL May 1, 2021
28b8447
Fix expr.ml: purify inside Optimize _ as well
iguerNL May 1, 2021
0429b64
prepare CS to return 'Unbounded' in case of optimization requests.
iguerNL May 1, 2021
f5d8209
Infrastructure in theories for CS with optimized values
iguerNL May 1, 2021
ad9d782
Detect optimization directives (predicates) in Theory and update env
iguerNL May 1, 2021
1b740fe
IntervalCalculus: Produce optimized splits for LIA and LRA
iguerNL May 1, 2021
3a8cdad
update SMT2 model output with '(objectives ...)' section
iguerNL May 1, 2021
6b48f91
Fun_sat: refactor the way models are handled/printed
iguerNL May 1, 2021
48cd803
satML: add missing case-split strategies
iguerNL May 1, 2021
73e400d
satML: implement models generation.
iguerNL May 1, 2021
14b46b8
UF: fix model_extraction: arguments of function may be interpreted
iguerNL May 1, 2021
9b9e110
Print models of arrays (home made syntax)
iguerNL May 1, 2021
a06e01f
Models: re-introduce removed invariant check
iguerNL May 1, 2021
296309c
Models: don't "assert false" when seeing an AC symbols in 'assign_next'
iguerNL May 1, 2021
0325706
Fix printing of status when in interpretation mode and add clean fmt …
ACoquereau Jan 18, 2021
12714f1
Correctly handle Case-split backtrack when having Optimization constr…
iguerNL May 1, 2021
70e3514
Handling disjunctions in optimization
iguerNL May 1, 2021
9e6e63c
Translate minimize/maximize from psmt2-frontend to Alt-Ergo
iguerNL May 1, 2021
230c928
fix translate ordering in pstm2_to_alt_ergo
iguerNL May 1, 2021
a1698d0
fix translate from SMT2 to AE
iguerNL May 1, 2021
f73a383
re-implement all-models feature differently
iguerNL May 1, 2021
a7ad6b9
compute model of terms starting from the smallest one
iguerNL May 1, 2021
4a0d2a7
Models: export the map of term |-> get-value(term) computed in UF
iguerNL May 1, 2021
3e679a2
optim:re-set timelimit when trying to find a better min in other bran…
iguerNL May 1, 2021
105fa4a
Fix new options in output section in the manpage
ACoquereau Feb 25, 2021
9f8ed84
Add timeout-as-unknown option
ACoquereau Feb 25, 2021
f437e21
Don't run ocp-indent on mly files. See the issue
Halbaroth Aug 29, 2023
5272ea9
Fix indentation in the legacy parser
Halbaroth Aug 29, 2023
61b7d1a
Fix indentation in the legacy lexer
Halbaroth Aug 29, 2023
3254796
Print always smtlib comments in the models
Halbaroth Aug 29, 2023
9f2449b
Negative tests
Halbaroth Sep 15, 2023
f9e74fe
Fix the js worker
Halbaroth Sep 15, 2023
9f556cf
Remove gui artefact
Halbaroth Sep 15, 2023
19fa24a
Rebase artefacts
Halbaroth Sep 18, 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
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
Loading