Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Why3
why3
Commits
d9d7df85
Commit
d9d7df85
authored
Mar 17, 2012
by
Andrei Paskevich
Browse files
bring back constructor indexes for SMT provers
parent
8bc86e68
Changes
3
Hide whitespace changes
Inline
Side-by-side
drivers/tptp.drv
View file @
d9d7df85
...
...
@@ -32,6 +32,7 @@ transformation "encoding_tptp"
theory BuiltIn
syntax predicate (=) "(%1 = %2)"
meta "eliminate_algebraic" "no_index"
end
(*
...
...
drivers/vampire.drv
View file @
d9d7df85
...
...
@@ -34,6 +34,7 @@ transformation "encoding_tptp"
theory BuiltIn
syntax predicate (=) "(%1 = %2)"
meta "eliminate_algebraic" "no_index"
end
(*
...
...
src/transform/eliminate_algebraic.ml
View file @
d9d7df85
...
...
@@ -101,9 +101,7 @@ type state = {
keep_t
:
bool
;
(* keep algebraic type definitions *)
keep_e
:
bool
;
(* keep monomorphic enumeration types *)
keep_r
:
bool
;
(* keep non-recursive records *)
(*
in_smt : bool; (* generate indexing funcitons *)
*)
no_ind
:
bool
;
(* do not generate indexing funcitons *)
}
let
empty_state
=
{
...
...
@@ -113,9 +111,7 @@ let empty_state = {
keep_t
=
false
;
keep_e
=
false
;
keep_r
=
false
;
(*
in_smt = false;
*)
no_ind
=
false
;
}
let
uncompiled
=
"eliminate_algebraic: compile_match required"
...
...
@@ -284,10 +280,7 @@ let add_discriminator (state,task) ts ty csl =
let
add_indexer
acc
ts
ty
=
function
|
[
_
]
->
acc
|
_
when
(
fst
acc
)
.
keep_t
->
acc
(*
(* FIXME? swap the two following cases *)
| csl when (fst acc).in_smt -> add_indexer acc ts ty csl
*)
|
csl
when
not
((
fst
acc
)
.
no_ind
)
->
add_indexer
acc
ts
ty
csl
|
csl
when
List
.
length
csl
<=
16
->
add_discriminator
acc
ts
ty
csl
|
_
->
acc
...
...
@@ -448,9 +441,7 @@ let eliminate_algebraic = Trans.compose compile_match
|
[
MAstr
"keep_types"
]
->
{
st
with
keep_t
=
true
}
|
[
MAstr
"keep_enums"
]
->
{
st
with
keep_e
=
true
}
|
[
MAstr
"keep_recs"
]
->
{
st
with
keep_r
=
true
}
(*
| [MAstr "index_cs"] -> { st with in_smt = true }
*)
|
[
MAstr
"no_index"
]
->
{
st
with
no_ind
=
true
}
|
_
->
raise
(
Invalid_argument
"meta eliminate_algebraic"
)
in
let
st
=
List
.
fold_left
check
st
ml
in
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment