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
fa7682df
Commit
fa7682df
authored
2 years ago
by
Julien Girard-Satabin
Browse files
Options
Downloads
Patches
Plain Diff
[SAVer] Removed printer and simplified driver.
parent
1cf513ad
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
config/drivers/saver.drv
+0
-30
0 additions, 30 deletions
config/drivers/saver.drv
src/main.ml
+1
-2
1 addition, 2 deletions
src/main.ml
src/printers/saver.ml
+0
-113
0 additions, 113 deletions
src/printers/saver.ml
with
1 addition
and
145 deletions
config/drivers/saver.drv
+
0
−
30
View file @
fa7682df
(* Why3 drivers for SAVER *)
(* Why3 drivers for SAVER *)
printer "saver"
filename "%f-%t-%g.why"
valid "Result = [Tt]rue"
invalid "Result = [Ff]alse"
timeout "Result = [Tt]imeout"
unknown "Result = [Uu]nknown" ""
transformation "inline_trivial"
transformation "introduce_premises"
transformation "eliminate_builtin"
transformation "simplify_formula"
theory BuiltIn
theory BuiltIn
syntax type int "int"
syntax type int "int"
syntax type real "real"
syntax type real "real"
...
@@ -163,23 +150,6 @@ theory real.RealInfix
...
@@ -163,23 +150,6 @@ theory real.RealInfix
end
end
theory Bool
syntax type bool "bool"
syntax function True "true"
syntax function False "false"
end
theory Tuple0
syntax type tuple0 "unit"
syntax function Tuple0 "void"
end
theory algebra.AC
meta AC function op
remove prop Comm
remove prop Assoc
end
theory ieee_float.Float64
theory ieee_float.Float64
syntax predicate is_not_nan ""
syntax predicate is_not_nan ""
remove allprops
remove allprops
...
...
This diff is collapsed.
Click to expand it.
src/main.ml
+
1
−
2
View file @
fa7682df
...
@@ -15,8 +15,7 @@ let () =
...
@@ -15,8 +15,7 @@ let () =
let
()
=
let
()
=
Pyrat
.
init
()
;
Pyrat
.
init
()
;
Marabou
.
init
()
;
Marabou
.
init
()
Saver
.
init
()
(* -- Logs. *)
(* -- Logs. *)
...
...
This diff is collapsed.
Click to expand it.
src/printers/saver.ml
deleted
100644 → 0
+
0
−
113
View file @
1cf513ad
(**************************************************************************)
(* *)
(* This file is part of CAISAR. *)
(* *)
(**************************************************************************)
type
info
=
{
info_syn
:
Why3
.
Printer
.
syntax_map
;
variables
:
string
Why3
.
Term
.
Hls
.
t
;
}
let
number_format
=
{
Why3
.
Number
.
long_int_support
=
`Default
;
Why3
.
Number
.
negative_int_support
=
`Default
;
Why3
.
Number
.
dec_int_support
=
`Default
;
Why3
.
Number
.
hex_int_support
=
`Unsupported
;
Why3
.
Number
.
oct_int_support
=
`Unsupported
;
Why3
.
Number
.
bin_int_support
=
`Unsupported
;
Why3
.
Number
.
negative_real_support
=
`Default
;
Why3
.
Number
.
dec_real_support
=
`Default
;
Why3
.
Number
.
hex_real_support
=
`Unsupported
;
Why3
.
Number
.
frac_real_support
=
`Unsupported
(
fun
_
_
->
assert
false
);
}
let
rec
print_term
info
fmt
t
=
let
open
Why3
in
match
t
.
Term
.
t_node
with
|
Tbinop
((
Timplies
|
Tiff
)
,
_
,
_
)
|
Tnot
_
|
Ttrue
|
Tfalse
|
Tvar
_
|
Tlet
_
|
Tif
_
|
Tcase
_
|
Tquant
_
|
Teps
_
|
Tbinop
(
Tor
,
_
,
_
)
->
Printer
.
unsupportedTerm
t
"Not supported by SAVER"
|
Tbinop
(
Tand
,
_
,
_
)
->
assert
false
(* Should appear only at top-level. *)
|
Tconst
c
->
Constant
.(
print
number_format
unsupported_escape
)
fmt
c
|
Tapp
(
ls
,
l
)
->
(
match
Printer
.
query_syntax
info
.
info_syn
ls
.
ls_name
with
|
Some
s
->
(* Only print constants in a csv-like manner when
* encountering an equality. Constant is expected to
* be on the right side of the declaration *)
if
String
.
contains
s
'
=
'
then
print_term
info
fmt
(
List
.
nth
l
1
)
else
()
|
None
->
()
)
let
rec
print_top_level_term
info
fmt
t
=
let
open
Why3
in
(* Don't print things we don't know. *)
let
t_is_known
=
Term
.
t_s_all
(
fun
_
->
true
)
(
fun
ls
->
Ident
.
Mid
.
mem
ls
.
ls_name
info
.
info_syn
||
Term
.
Hls
.
mem
info
.
variables
ls
)
in
match
t
.
Term
.
t_node
with
|
Tquant
_
->
()
|
Tbinop
(
Tand
,
t1
,
t2
)
->
if
t_is_known
t1
&&
t_is_known
t2
then
Fmt
.
pf
fmt
"%a%a"
(
print_top_level_term
info
)
t1
(
print_top_level_term
info
)
t2
|
_
->
if
t_is_known
t
then
Fmt
.
pf
fmt
",%a"
(
print_term
info
)
t
let
print_decl
info
fmt
d
=
let
open
Why3
in
match
d
.
Decl
.
d_node
with
|
Dtype
_
->
()
|
Ddata
_
->
()
|
Dparam
_
->
()
|
Dlogic
_
->
()
|
Dind
_
->
()
|
Dprop
(
Decl
.
Plemma
,
_
,
_
)
->
assert
false
|
Dprop
(
Decl
.
Paxiom
,
_
,
f
)
->
print_top_level_term
info
fmt
f
|
Dprop
(
Decl
.
Pgoal
,
_
,
f
)
->
print_top_level_term
info
fmt
f
let
rec
print_tdecl
info
fmt
task
=
let
open
Why3
in
match
task
with
|
None
->
()
|
Some
{
Task
.
task_prev
;
task_decl
;
_
}
->
(
print_tdecl
info
fmt
task_prev
;
match
task_decl
.
Theory
.
td_node
with
|
Use
_
|
Clone
_
->
()
|
Meta
(
meta
,
l
)
when
Theory
.
meta_equal
meta
Native_nn_prover
.
meta_input
->
(
match
l
with
|
[
MAls
ls
;
MAint
i
]
->
Term
.
Hls
.
add
info
.
variables
ls
(
Fmt
.
str
"x%i"
i
)
|
_
->
assert
false
)
|
Meta
(
meta
,
l
)
when
Theory
.
meta_equal
meta
Native_nn_prover
.
meta_output
->
(
match
l
with
|
[
MAls
ls
;
MAint
i
]
->
Term
.
Hls
.
add
info
.
variables
ls
(
Fmt
.
str
"y%i"
i
)
|
_
->
assert
false
)
|
Meta
(
_
,
_
)
->
()
|
Decl
d
->
print_decl
info
fmt
d
)
let
print_task
args
?
old
:_
fmt
task
=
let
open
Why3
in
let
info
=
{
info_syn
=
Discriminate
.
get_syntax_map
task
;
variables
=
Term
.
Hls
.
create
10
;
}
in
Printer
.
print_prelude
fmt
args
.
Printer
.
prelude
;
Format
.
fprintf
fmt
"# 1 3
\n
1"
;
print_tdecl
info
fmt
task
let
init
()
=
Why3
.
Printer
.
register_printer
~
desc
:
"Printer for the SAVer prover."
"saver"
print_task
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