Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
why3
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
125
Issues
125
List
Boards
Labels
Service Desk
Milestones
Merge Requests
15
Merge Requests
15
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Why3
why3
Commits
2ecd8583
Commit
2ecd8583
authored
Nov 21, 2012
by
Jean-Christophe Filliâtre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Coq tactic: Paolo's patch to handle opaque constants
parent
e58be120
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
src/coq-tactic/why3tac.ml
src/coq-tactic/why3tac.ml
+11
-3
No files found.
src/coq-tactic/why3tac.ml
View file @
2ecd8583
...
...
@@ -425,8 +425,16 @@ let rec tr_arith_constant t = match kind_of_term t with
|
_
->
raise
NotArithConstant
let
body_of_constant
c
=
if
Reductionops
.
is_transparent
(
ConstKey
c
)
then
CoqCompat
.
body_of_constant
(
Global
.
lookup_constant
c
)
else
None
let
rec
tr_type
dep
tvm
env
t
=
let
t
=
Reductionops
.
nf_betadeltaiota
env
Evd
.
empty
t
in
let
t
=
Reductionops
.
clos_norm_flags
(
Closure
.
RedFlags
.
red_add_transparent
Closure
.
betadeltaiota
(
Conv_oracle
.
get_transp_state
()
))
env
Evd
.
empty
t
in
if
is_constant
t
coq_Z
then
Ty
.
ty_int
else
if
is_constant
t
coq_R
then
...
...
@@ -492,7 +500,7 @@ and tr_global_ts dep env r =
let
(
_
,
vars
)
,
_
,
t
=
decomp_type_quantifiers
env
ty
in
if
not
(
is_Set
t
)
&&
not
(
is_Type
t
)
then
raise
NotFO
;
let
id
=
preid_of_id
(
Nametab
.
basename_of_global
r
)
in
let
ts
=
match
CoqCompat
.
body_of_constant
(
Global
.
lookup_constant
c
)
with
let
ts
=
match
body_of_constant
c
with
|
Some
b
->
let
b
=
force
b
in
let
tvm
,
env
,
t
=
decomp_type_lambdas
Idmap
.
empty
env
vars
b
in
...
...
@@ -640,7 +648,7 @@ and make_one_ls dep env r =
add_poly_arity
ls
vars
and
decompose_definition
dep
env
c
=
let
dl
=
match
CoqCompat
.
body_of_constant
(
Global
.
lookup_constant
c
)
with
let
dl
=
match
body_of_constant
c
with
|
None
->
[
ConstRef
c
,
None
]
|
Some
b
->
...
...
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