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
db54e313
Commit
db54e313
authored
2 years ago
by
François Bobot
Committed by
Michele Alberti
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[Marabou] Also split premises to create different tasks.
The axiom a \/ b gives two different tasks.
parent
de6352b1
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/transformations/split.ml
+41
-0
41 additions, 0 deletions
src/transformations/split.ml
src/transformations/split.mli
+6
-5
6 additions, 5 deletions
src/transformations/split.mli
src/verification.ml
+1
-1
1 addition, 1 deletion
src/verification.ml
tests/marabou.t
+6
-0
6 additions, 0 deletions
tests/marabou.t
with
54 additions
and
6 deletions
src/transformations/split.ml
0 → 100644
+
41
−
0
View file @
db54e313
(**************************************************************************)
(* *)
(* This file is part of CAISAR. *)
(* *)
(* Copyright (C) 2022 *)
(* CEA (Commissariat à l'énergie atomique et aux énergies *)
(* alternatives) *)
(* *)
(* You can redistribute it and/or modify it under the terms of the GNU *)
(* Lesser General Public License as published by the Free Software *)
(* Foundation, version 2.1. *)
(* *)
(* It is distributed in the hope that it will be useful, *)
(* but WITHOUT ANY WARRANTY; without even the implied warranty of *)
(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *)
(* GNU Lesser General Public License for more details. *)
(* *)
(* See the GNU Lesser General Public License version 2.1 *)
(* for more details (enclosed in the file licenses/LGPLv2.1). *)
(* *)
(**************************************************************************)
open
Base
open
Why3
let
split_generic
filter_prop_kind
=
Trans
.
decl_l
(
fun
d
->
match
d
.
d_node
with
|
Dprop
(
k
,
pr
,
t
)
when
filter_prop_kind
k
->
let
l
=
match
k
with
|
Paxiom
|
Plemma
->
Split_goal
.
split_neg_full
t
|
Pgoal
->
Split_goal
.
split_pos_full
t
in
List
.
map
l
~
f
:
(
fun
t
->
[
Decl
.
create_prop_decl
k
pr
t
])
|
_
->
[
[
d
]
])
None
let
split_premises
=
split_generic
(
function
Paxiom
->
true
|
_
->
false
)
let
split_all
=
split_generic
(
fun
_
->
true
)
This diff is collapsed.
Click to expand it.
src/transformations/split
_disjunction
.ml
→
src/transformations/split.ml
i
+
6
−
5
View file @
db54e313
...
@@ -20,10 +20,11 @@
...
@@ -20,10 +20,11 @@
(* *)
(* *)
(**************************************************************************)
(**************************************************************************)
open
Base
open
Why3
open
Why3
let
split_disjunction
=
val
split_premises
:
Task
.
task
Trans
.
tlist
Trans
.
goal_l
(
fun
pr
t
->
(** Split disjunctions appearing in axioms into different tasks. *)
let
l
=
Split_goal
.
split_neg_full
t
in
List
.
map
l
~
f
:
(
fun
t
->
[
Decl
.
create_prop_decl
Pgoal
pr
t
]))
val
split_all
:
Task
.
task
Trans
.
tlist
(** Split disjunctions appearing in premises, and conjunctions appearing in the
goal, into different tasks. *)
This diff is collapsed.
Click to expand it.
src/verification.ml
+
1
−
1
View file @
db54e313
...
@@ -168,7 +168,7 @@ let answer_generic limit config prover config_prover driver task =
...
@@ -168,7 +168,7 @@ let answer_generic limit config prover config_prover driver task =
let
tasks
=
let
tasks
=
(* We make [tasks] as a list (ie, conjunction) of disjunctions. *)
(* We make [tasks] as a list (ie, conjunction) of disjunctions. *)
match
prover
with
match
prover
with
|
Prover
.
Marabou
->
Trans
.
apply
Split
_goal
.
split_
goal_fu
ll
task_prepared
|
Prover
.
Marabou
->
Trans
.
apply
Split
.
split_
a
ll
task_prepared
|
_
->
[
task_prepared
]
|
_
->
[
task_prepared
]
in
in
let
command
=
Whyconf
.
get_complete_command
~
with_steps
:
false
config_prover
in
let
command
=
Whyconf
.
get_complete_command
~
with_steps
:
false
config_prover
in
...
...
This diff is collapsed.
Click to expand it.
tests/marabou.t
+
6
−
0
View file @
db54e313
...
@@ -37,8 +37,14 @@ Test verify
...
@@ -37,8 +37,14 @@ Test verify
>
(
0.0
:
t
)
.<
x1
.<
(
0.5
:
t
)
/\
(
0.5
:
t
)
.<
x2
.<
(
1.0
:
t
)
->
>
(
0.0
:
t
)
.<
x1
.<
(
0.5
:
t
)
/\
(
0.5
:
t
)
.<
x2
.<
(
1.0
:
t
)
->
>
let
(
y1
,
y2
,
_
,
_
,
_
)
=
net_apply
x1
x2
x3
x4
x5
in
>
let
(
y1
,
y2
,
_
,
_
,
_
)
=
net_apply
x1
x2
x3
x4
x5
in
>
y2
.<
y1
\/
y1
.<
y2
>
y2
.<
y1
\/
y1
.<
y2
>
>
goal
J:
forall
x1
x2
x3
x4
x5
.
>
((
0.0
:
t
)
.<
x1
.<
(
0.5
:
t
)
\
/ (0.75:t) .< x1 .< (1.0:t)) /
\
(
0.5
:
t
)
.<
x2
.<
(
1.0
:
t
)
->
>
let
(
y1
,
y2
,
_
,
_
,
_
)
=
net_apply
x1
x2
x3
x4
x5
in
>
y2
.<
y1
\/
y1
.<
y2
>
end
>
end
>
EOF
>
EOF
[
caisar
]
Goal
G:
Unknown
()
[
caisar
]
Goal
G:
Unknown
()
[
caisar
]
Goal
H:
Unknown
()
[
caisar
]
Goal
H:
Unknown
()
[
caisar
]
Goal
I:
Unknown
()
[
caisar
]
Goal
I:
Unknown
()
[
caisar
]
Goal
J:
Unknown
()
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