Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
why3
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
81
Issues
81
List
Boards
Labels
Milestones
Merge Requests
8
Merge Requests
8
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Why3
why3
Commits
d2c5647b
Commit
d2c5647b
authored
Oct 24, 2014
by
MARCHE Claude
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
emit warning when axiom does not contains any local abstract symbol
parent
dec6495c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
1 deletion
+30
-1
src/core/theory.ml
src/core/theory.ml
+20
-1
tests/dubious_axioms.why
tests/dubious_axioms.why
+10
-0
No files found.
src/core/theory.ml
View file @
d2c5647b
...
...
@@ -426,6 +426,23 @@ let check_decl_opacity d = match d.d_node with
"inductive predicates cannot have opaque type parameters"
in
List
.
iter
check
dl
let
warn_dubious_axiom
uc
k
p
syms
=
match
k
with
|
Plemma
|
Pgoal
|
Pskip
->
()
|
Paxiom
->
try
Sid
.
iter
(
fun
id
->
if
Sid
.
mem
id
uc
.
uc_local
then
match
(
Ident
.
Mid
.
find
id
uc
.
uc_known
)
.
d_node
with
|
Dtype
{
ts_def
=
None
}
|
Dparam
_
->
raise
Exit
|
_
->
()
)
syms
;
Warning
.
emit
?
loc
:
p
.
id_loc
"axiom %s does not contain any local abstract symbol"
p
.
id_string
with
Exit
->
()
let
add_decl
uc
d
=
check_decl_opacity
d
;
(* we don't care about tasks *)
let
uc
=
add_tdecl
uc
(
create_decl
d
)
in
...
...
@@ -435,7 +452,9 @@ let add_decl uc d =
|
Dparam
ls
->
add_symbol
add_ls
ls
.
ls_name
ls
uc
|
Dlogic
dl
->
List
.
fold_left
add_logic
uc
dl
|
Dind
(
_
,
dl
)
->
List
.
fold_left
add_ind
uc
dl
|
Dprop
p
->
add_prop
uc
p
|
Dprop
((
k
,
pr
,_
)
as
p
)
->
warn_dubious_axiom
uc
k
pr
.
pr_name
d
.
d_syms
;
add_prop
uc
p
(** Declaration constructors + add_decl *)
...
...
tests/dubious_axioms.why
0 → 100644
View file @
d2c5647b
theory T
use import int.Int
axiom a : 1 = 2
end
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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