Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
caisar
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pub
caisar
Commits
f674765a
Commit
f674765a
authored
1 year ago
by
François Bobot
Browse files
Options
Downloads
Patches
Plain Diff
[NN_prover] Keep only used inputs
parent
1ca16546
No related branches found
No related tags found
No related merge requests found
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/transformations/native_nn_prover.ml
+14
-29
14 additions, 29 deletions
src/transformations/native_nn_prover.ml
tests/acasxu.t
+152
-440
152 additions, 440 deletions
tests/acasxu.t
with
166 additions
and
469 deletions
src/transformations/native_nn_prover.ml
+
14
−
29
View file @
f674765a
...
...
@@ -276,35 +276,10 @@ let abstract_nn_term env =
let
output_vars
,
goal
=
create_output_vars
goal
in
let
pr
=
Why3
.
Decl
.
create_prsymbol
(
Why3
.
Ident
.
id_clone
pr
.
pr_name
)
in
let
decl
=
Why3
.
Decl
.
create_prop_decl
Pgoal
pr
goal
in
(* Add default lower and upper bounds for each input variable. *)
let
task
=
Why3
.
Term
.
Mls
.
fold_left
(
fun
task
ls
_
->
let
task
=
Why3
.
Task
.
add_prop_decl
task
Paxiom
(
Why3
.
Decl
.
create_prsymbol
(
Why3
.
Ident
.
id_fresh
"default_lower_bound"
))
(
Why3
.
Term
.
ps_app
th_float64
.
le
[
Utils
.
term_of_float
env
(
-.
Float
.
max_finite_value
);
Why3
.
Term
.
fs_app
ls
[]
th_float64
.
ty
;
])
in
let
task
=
Why3
.
Task
.
add_prop_decl
task
Paxiom
(
Why3
.
Decl
.
create_prsymbol
(
Why3
.
Ident
.
id_fresh
"default_upper_bound"
))
(
Why3
.
Term
.
ps_app
th_float64
.
le
[
Why3
.
Term
.
fs_app
ls
[]
th_float64
.
ty
;
Utils
.
term_of_float
env
Float
.
max_finite_value
;
])
in
task
)
task
input_vars
in
(* Add meta for outputs. Again, for each output variable, add the meta
first, then its actual declaration. *)
(* Again, for each output variable, add the meta first, then its actual
declaration. *)
(* Add meta for outputs *)
let
task
=
Why3
.
Term
.
Mterm
.
fold_left
(
fun
task
_
(
index
,
output_var
)
->
...
...
@@ -320,6 +295,16 @@ let abstract_nn_term env =
(
fun
acc
term
(
index
,
_
)
->
{
index
;
term
}
::
acc
)
[]
output_vars
in
let
used_ls
=
List
.
fold
~
f
:
(
fun
acc
out
->
Why3
.
Term
.
t_s_fold
(
fun
acc
_
->
acc
)
(
fun
acc
ls
->
Why3
.
Term
.
Sls
.
add
ls
acc
)
acc
out
.
term
)
~
init
:
Why3
.
Term
.
Sls
.
empty
output_vars
in
let
input_vars
=
Why3
.
Term
.
Sls
.
inter
input_vars
used_ls
in
let
_
,
input_vars
=
Why3
.
Term
.
Mls
.
mapi_fold
(
fun
_
()
i
->
(
i
+
1
,
i
))
input_vars
0
in
...
...
This diff is collapsed.
Click to expand it.
tests/acasxu.t
+
152
−
440
View file @
f674765a
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment