-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is the plugin presented in the following paper: Pierre Roux, Mohamed Iguernlala, Sylvain Conchon: A Non-linear Arithmetic Procedure for Control-Command Software Verification. TACAS 2018 In particular, it enables to solve goals like: logic v__0 : real logic v_x0 : real logic v_x1 : real logic v_x2 : real goal g: 6.04 * v_x0 * v_x0 + (- (9.65)) * v_x0 * v_x1 + (- (2.26)) * v_x0 * v_x2 + 11.36 * v_x1 * v_x1 + 2.67 * v_x1 * v_x2 + 3.76 * v_x2 * v_x2 <= 1.0 and v__0 <= 1.0 and (- (1.0)) <= v__0 -> 6.04 * (0.9379 * v_x0 + (- (0.0381)) * v_x1 + (- (0.0414)) * v_x2 + 0.0237 * v__0) * (0.9379 * v_x0 + (- (0.0381)) * v_x1 + (- (0.0414)) * v_x2 + 0.0237 * v__0) + (- (9.65)) * (0.9379 * v_x0 + (- (0.0381)) * v_x1 + (- (0.0414)) * v_x2 + 0.0237 * v__0) * ((- (0.0404)) * v_x0 + 0.968 * v_x1 + (- (0.0179)) * v_x2 + 0.0143 * v__0) + (- (2.26)) * (0.9379 * v_x0 + (- (0.0381)) * v_x1 + (- (0.0414)) * v_x2 + 0.0237 * v__0) * (0.0142 * v_x0 + (- (0.0197)) * v_x1 + 0.9823 * v_x2 + 0.0077 * v__0) + 11.36 * ((- (0.0404)) * v_x0 + 0.968 * v_x1 + (- (0.0179)) * v_x2 + 0.0143 * v__0) * ((- (0.0404)) * v_x0 + 0.968 * v_x1 + (- (0.0179)) * v_x2 + 0.0143 * v__0) + 2.67 * ((- (0.0404)) * v_x0 + 0.968 * v_x1 + (- (0.0179)) * v_x2 + 0.0143 * v__0) * (0.0142 * v_x0 + (- (0.0197)) * v_x1 + 0.9823 * v_x2 + 0.0077 * v__0) + 3.76 * (0.0142 * v_x0 + (- (0.0197)) * v_x1 + 0.9823 * v_x2 + 0.0077 * v__0) * (0.0142 * v_x0 + (- (0.0197)) * v_x1 + 0.9823 * v_x2 + 0.0077 * v__0) <= 1.0 that are out of reach of most SMT solvers. This goals come from verification of the following linear controller: typedef struct { double x0, x1, x2; } state; /*@ predicate inv(state *s) = 6.04 * s->x0 * s->x0 - 9.65 * s->x0 * s->x1 @ - 2.26 * s->x0 * s->x2 + 11.36 * s->x1 * s->x1 @ + 2.67 * s->x1 * s->x2 + 3.76 * s->x2 * s->x2 <= 1; */ /*@ requires \valid(s) && inv(s) && -1 <= in0 <= 1; @ ensures inv(s); */ void step(state *s, double in0) { double pre_x0 = s->x0, pre_x1 = s->x1, pre_x2 = s->x2; s->x0 = 0.9379 * pre_x0 - 0.0381 * pre_x1 - 0.0414 * pre_x2 + 0.0237 * in0; s->x1 = -0.0404 * pre_x0 + 0.968 * pre_x1 - 0.0179 * pre_x2 + 0.0143 * in0; s->x2 = 0.0142 * pre_x0 - 0.0197 * pre_x1 + 0.9823 * pre_x2 + 0.0077 * in0; }
- Loading branch information
Showing
31 changed files
with
731 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# This file is generated by dune, edit dune-project instead | ||
opam-version: "2.0" | ||
version: "dev" | ||
synopsis: "The Alt-Ergo SMT prover: OSDP PLugin" | ||
description: """ | ||
This is the OSDP plugin for 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/ | ||
|
||
The OSDP plugin relies on the OSDP library to attempt to solve goals | ||
with polynomial inequalities using SDP (SemiDefinite Programming) | ||
numerical solvers as backend. Despite the numerical solvers providing | ||
only approximate solutions, the OSDP library performs an a-posteriori | ||
rigorous check to ensure soundness. The ValidSDP library provides a | ||
Coq verified version of this soundness check. | ||
|
||
To use, run alt-ergo with option | ||
alt-ergo --polynomial-plugin osdp-plugin.cmxs""" | ||
maintainer: ["Alt-Ergo developers"] | ||
authors: ["Alt-Ergo developers"] | ||
license: "LGPL-3" | ||
homepage: "https://alt-ergo.ocamlpro.com/" | ||
doc: "https://ocamlpro.github.io/alt-ergo" | ||
bug-reports: "https://github.com/OCamlPro/alt-ergo/issues" | ||
depends: [ | ||
"ocaml" {>= "4.05.0"} | ||
"dune" {>= "2.9" & >= "2.9"} | ||
"dune-configurator" | ||
"alt-ergo" | ||
"alt-ergo-lib" {= version} | ||
"alt-ergo" | ||
"osdp" {>= "1.0.0"} | ||
"odoc" {with-doc} | ||
] | ||
|
||
build: [ | ||
["ocaml" "unix.cma" "configure.ml" name "--prefix" prefix "--libdir" lib "--mandir" man] | ||
["dune" "subst"] {dev} | ||
["dune" "build" "-p" name "-j" jobs] | ||
] | ||
dev-repo: "git+https://github.com/OCamlPro/alt-ergo.git" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# This part comes from the template. Please edit alt-ergo-osdp.opam.template | ||
# and not alt-ergo-osdp.opam which is generated by dune | ||
|
||
license: [ | ||
"LGPL-3" | ||
] | ||
|
||
build: [ | ||
["ocaml" "unix.cma" "configure.ml" name "--prefix" prefix "--libdir" lib "--mandir" man] | ||
["dune" "subst"] {pinned} | ||
["dune" "build" "-p" name "-j" jobs] | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.