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
d2e6abc4
Commit
d2e6abc4
authored
Mar 31, 2015
by
Stefan Berghofer
Committed by
MARCHE Claude
Apr 08, 2015
Browse files
Check that name of Why3 file matches theory name
parent
6c26fe96
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/isabelle/why3.ML
View file @
d2e6abc4
...
...
@@ -640,11 +640,20 @@ fun close incomplete thy =
|
_
=>
err_no_env
()
)
|>
Sign
.
parent_path
;
fun
process_decls
consts
types
x
=
elem
"theory"
(
fn
atts
=>
fun
process_decls
consts
types
x
path
=
elem
"theory"
(
fn
atts
=>
(
fn
imports
::
xs
=>
elem
"realized"
(
fn
_
=>
fn
rs
=>
fn
thy
=>
let
val
thyname
=
get_name
atts
;
val
realize
=
get_bool
"realize"
atts
;
val
_
=
realize
orelse
Path
.
is_basic
path
andalso
let
val
(
path'
,
ext
)
=
Path
.
split_ext
path
in
Path
.
implode
path'
=
Context
.
theory_name
thy
andalso
ext
=
"xml"
end
orelse
error
"Name of Why3 file does not match name of theory"
;
val
(
ds
,
thy'
)
=
thy
|>
Sign
.
add_path
thyname
|>
init_decls
thyname
consts
types
|>
...
...
@@ -781,11 +790,11 @@ fun show_status thy sel =
(**** commands ****)
fun
why3_open
((
files
,
consts
)
,
types
)
thy
=
let
val
([{
lines
,
...
}
:
Token
.
file
]
,
thy'
)
=
files
thy
;
let
val
([{
src_path
,
lines
,
...
}
:
Token
.
file
]
,
thy'
)
=
files
thy
;
in
process_decls
(
map
(
apsnd
(
Sign
.
intern_const
thy
))
consts
)
(
map
(
apsnd
(
Sign
.
intern_type
thy
))
types
)
(
parse_xml
(
cat_lines
lines
))
thy'
(
parse_xml
(
cat_lines
lines
))
src_path
thy'
end
;
fun
prove_vc
vc_name
lthy
=
...
...
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