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
5e51326c
Commit
5e51326c
authored
Nov 22, 2013
by
Jean-Christophe Filliâtre
Browse files
fixed incorrect assumptions in realization code
parent
5f9c7c7d
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/printer/coq.ml
View file @
5e51326c
...
...
@@ -981,13 +981,18 @@ let print_task printer_args realize ?old fmt task =
|
_
->
assert
false
)
Mid
.
empty
task
in
(* 2 cases: goal is clone T with [] or goal is a real goal *)
let
realized_theories
=
match
task
with
|
None
->
assert
false
let
rec
upd_realized_theories
=
function
|
Some
{
Task
.
task_decl
=
{
Theory
.
td_node
=
Theory
.
Decl
{
Decl
.
d_node
=
Decl
.
Dprop
(
Decl
.
Pgoal
,
_
,
_
)
}}}
->
realized_theories
|
Some
{
Task
.
task_decl
=
{
Theory
.
td_node
=
Theory
.
Clone
(
th
,_
)
}}
->
Sid
.
iter
(
fun
id
->
ignore
(
id_unique
iprinter
id
))
th
.
Theory
.
th_local
;
Mid
.
remove
th
.
Theory
.
th_name
realized_theories
|
_
->
realized_theories
in
Sid
.
iter
(
fun
id
->
ignore
(
id_unique
iprinter
id
))
th
.
Theory
.
th_local
;
Mid
.
remove
th
.
Theory
.
th_name
realized_theories
|
Some
{
Task
.
task_decl
=
{
Theory
.
td_node
=
Theory
.
Meta
_
};
Task
.
task_prev
=
task
}
->
upd_realized_theories
task
|
_
->
assert
false
in
let
realized_theories
=
upd_realized_theories
task
in
let
realized_theories'
=
Mid
.
map
(
fun
(
th
,
s
)
->
fprintf
fmt
"Require %s.@
\n
"
s
;
th
)
realized_theories
in
let
realized_symbols
=
Task
.
used_symbols
realized_theories'
in
...
...
src/printer/pvs.ml
View file @
5e51326c
...
...
@@ -833,21 +833,21 @@ let print_task printer_args realize ?old fmt task =
|
_
->
assert
false
)
Mid
.
empty
task
in
(* two cases: task is clone T with [] or task is a real goal *)
let
thname
,
thpath
,
realized_theories
=
match
task
with
|
None
->
assert
false
let
rec
upd_realized_theories
=
function
|
Some
{
Task
.
task_decl
=
{
Theory
.
td_node
=
Theory
.
Decl
{
Decl
.
d_node
=
Decl
.
Dprop
(
Decl
.
Pgoal
,
pr
,
_
)
}}}
->
id_unique
thprinter
pr
.
pr_name
,
[]
,
realized_theories
|
Some
{
Task
.
task_decl
=
{
Theory
.
td_node
=
Theory
.
Clone
(
th
,_
)
}}
->
Sid
.
iter
(
fun
id
->
ignore
(
id_unique
iprinter
id
))
th
.
Theory
.
th_local
;
let
id
=
th
.
Theory
.
th_name
in
id_unique
thprinter
id
,
th
.
Theory
.
th_path
,
Mid
.
remove
id
realized_theories
|
Some
{
Task
.
task_decl
=
{
Theory
.
td_node
=
td
}
}
->
let
name
=
match
td
with
|
Theory
.
Decl
{
Decl
.
d_node
=
Dprop
(
_
,
pr
,
_
)
}
->
id_unique
thprinter
pr
.
pr_name
|
_
->
"goal"
in
name
,
[]
,
realized_theories
in
let
id
=
th
.
Theory
.
th_name
in
id_unique
thprinter
id
,
th
.
Theory
.
th_path
,
Mid
.
remove
id
realized_theories
|
Some
{
Task
.
task_decl
=
{
Theory
.
td_node
=
Theory
.
Meta
_
};
Task
.
task_prev
=
task
}
->
upd_realized_theories
task
|
_
->
assert
false
in
let
thname
,
thpath
,
realized_theories
=
upd_realized_theories
task
in
(* make names as stable as possible by first printing all identifiers *)
let
realized_theories'
=
Mid
.
map
fst
realized_theories
in
let
realized_symbols
=
Task
.
used_symbols
realized_theories'
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