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
2b0a6470
Commit
2b0a6470
authored
4 years ago
by
Michele Alberti
Browse files
Options
Downloads
Patches
Plain Diff
Add support for properties between vars.
parent
94f49c63
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
property.ml
+6
-1
6 additions, 1 deletion
property.ml
property_parser.mly
+3
-1
3 additions, 1 deletion
property_parser.mly
property_syntax.mli
+2
-1
2 additions, 1 deletion
property_syntax.mli
solver.ml
+3
-1
3 additions, 1 deletion
solver.ml
with
14 additions
and
4 deletions
property.ml
+
6
−
1
View file @
2b0a6470
...
@@ -77,11 +77,16 @@ let rec repr t =
...
@@ -77,11 +77,16 @@ let rec repr t =
|
Float
f
->
Format
.
sprintf
"float %f"
f
|
Float
f
->
Format
.
sprintf
"float %f"
f
in
in
match
t
with
match
t
with
|
Atomic
(
var
,
cop
,
cst
)
->
|
Atomic
_cst
(
var
,
cop
,
cst
)
->
let
var_s
=
string_of_var
var
in
let
var_s
=
string_of_var
var
in
let
cop_s
=
string_of_cop
cop
in
let
cop_s
=
string_of_cop
cop
in
let
cst_s
=
string_of_cst
cst
in
let
cst_s
=
string_of_cst
cst
in
Format
.
sprintf
"%s %s %s"
var_s
cop_s
cst_s
Format
.
sprintf
"%s %s %s"
var_s
cop_s
cst_s
|
Atomic_var
(
var1
,
cop
,
var2
)
->
let
var1_s
=
string_of_var
var1
in
let
cop_s
=
string_of_cop
cop
in
let
var2_s
=
string_of_var
var2
in
Format
.
sprintf
"%s %s %s"
var1_s
cop_s
var2_s
|
And
(
p1
,
p2
)
->
|
And
(
p1
,
p2
)
->
Format
.
sprintf
"And (%s, %s)"
(
repr
p1
)
(
repr
p2
)
Format
.
sprintf
"And (%s, %s)"
(
repr
p1
)
(
repr
p2
)
...
...
This diff is collapsed.
Click to expand it.
property_parser.mly
+
3
−
1
View file @
2b0a6470
...
@@ -27,7 +27,9 @@ main:
...
@@ -27,7 +27,9 @@ main:
property
:
property
:
|
var
cop
cst
|
var
cop
cst
{
Atomic
(
$
1
,
$
2
,
$
3
)
}
{
Atomic_cst
(
$
1
,
$
2
,
$
3
)
}
|
var
cop
var
{
Atomic_var
(
$
1
,
$
2
,
$
3
)
}
var
:
var
:
|
i
=
INPUT
|
i
=
INPUT
...
...
This diff is collapsed.
Click to expand it.
property_syntax.mli
+
2
−
1
View file @
2b0a6470
...
@@ -15,5 +15,6 @@ type cst =
...
@@ -15,5 +15,6 @@ type cst =
|
Float
of
float
|
Float
of
float
type
t
=
type
t
=
|
Atomic
of
var
*
cop
*
cst
|
Atomic_cst
of
var
*
cop
*
cst
|
Atomic_var
of
var
*
cop
*
var
|
And
of
t
*
t
|
And
of
t
*
t
This diff is collapsed.
Click to expand it.
solver.ml
+
3
−
1
View file @
2b0a6470
...
@@ -33,8 +33,10 @@ let rec pp_property_marabou property =
...
@@ -33,8 +33,10 @@ let rec pp_property_marabou property =
|
Float
f
->
Stdlib
.
string_of_float
f
|
Float
f
->
Stdlib
.
string_of_float
f
in
in
match
property
with
match
property
with
|
Atomic
((
Input
v
|
Output
v
)
,
cop
,
cst
)
->
|
Atomic
_cst
((
Input
v
|
Output
v
)
,
cop
,
cst
)
->
Format
.
sprintf
"%s %s %s"
v
(
string_of_cop
cop
)
(
string_of_cst
cst
)
Format
.
sprintf
"%s %s %s"
v
(
string_of_cop
cop
)
(
string_of_cst
cst
)
|
Atomic_var
((
Input
v1
|
Output
v1
)
,
cop
,
(
Input
v2
|
Output
v2
))
->
Format
.
sprintf
"%s %s %s"
v1
(
string_of_cop
cop
)
v2
|
And
(
p1
,
p2
)
->
|
And
(
p1
,
p2
)
->
let
s1
=
pp_property_marabou
p1
in
let
s1
=
pp_property_marabou
p1
in
let
s2
=
pp_property_marabou
p2
in
let
s2
=
pp_property_marabou
p2
in
...
...
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