Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Why3
why3
Commits
2c78bda7
Commit
2c78bda7
authored
Jan 03, 2017
by
Guillaume Melquiond
Browse files
Adapt plugin to Coq 8.6.
parent
df9875a9
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Makefile.in
View file @
2c78bda7
...
...
@@ -760,7 +760,7 @@ COQPDEP = $(addsuffix .dep, $(COQPMODULES))
COQPCMO
=
$(
addsuffix
.cmo,
$(COQPMODULES)
)
COQPCMX
=
$(
addsuffix
.cmx,
$(COQPMODULES)
)
COQPTREES
=
ker
ne
l
interp intf lib library parsing pretyping pr
oofs printing
tactics toplevel
COQPTREES
=
engi
ne interp intf
kernel
lib library
ltac
parsing pretyping pr
inting proofs
tactics toplevel
COQPINCLUDES
=
-I
src/coq-tactic
-I
$(COQCAMLPLIB)
$(
addprefix
-I
@COQLIB@/,
$(COQPTREES)
)
@ZIPINCLUDE@
$(COQPDEP)
:
DEPFLAGS += -I src/coq-tactic
...
...
@@ -786,14 +786,20 @@ src/coq-tactic/why3tac.ml: src/coq-tactic/why3tac.ml4
$(SHOW)
'Camlp $<'
$(HIDE)$(COQCAMLP)
pr_dump.cmo @COQPPLIBS@ pa_macro.cmo
-D
@coq_compat_version@
-impl
$^
-o
$@
COQRTAC
=
-R
lib/coq-tactic Why3
-R
lib/coq Why3
ifeq
(@coq_compat_version@,COQ86)
COQRTAC
+=
-I
lib/coq-tactic
endif
src/coq-tactic/.why3-vo-byte
:
lib/coq-tactic/Why3.v lib/coq/BuiltIn.vo lib/coq-tactic/why3tac.cma
$(SHOW)
'Coqc $<'
$(HIDE)WHY3CONFIG
=
""
$(COQC)
-byte
-R
lib/coq-tactic Why3
-R
lib/coq Why3
$<
&&
\
$(HIDE)WHY3CONFIG
=
""
$(COQC)
-byte
$(COQRTAC)
$<
&&
\
touch
src/coq-tactic/.why3-vo-byte
src/coq-tactic/.why3-vo-opt
:
lib/coq-tactic/Why3.v lib/coq/BuiltIn.vo lib/coq-tactic/why3tac.cmxs
$(SHOW)
'Coqc $<'
$(HIDE)WHY3CONFIG
=
""
$(COQC)
-opt
-R
lib/coq-tactic Why3
-R
lib/coq Why3
$<
&&
\
$(HIDE)WHY3CONFIG
=
""
$(COQC)
-opt
$(COQRTAC)
$<
&&
\
touch
src/coq-tactic/.why3-vo-opt
# depend and clean targets
...
...
@@ -1570,10 +1576,10 @@ test-session.opt: examples/use_api/create_session.ml lib/why3/why3.cmxa
@
rm
-f
test-session.opt why3session.xml why3shapes why3shapes.gz
test-coq-tactic.byte
:
src/coq-tactic/.why3-vo-byte
$(COQC)
-byte
-R
lib/coq-tactic Why3
-R
lib/coq Why3
bench/coq-tactic/test.v
$(COQC)
-byte
$(COQRTAC)
bench/coq-tactic/test.v
test-coq-tactic.opt
:
src/coq-tactic/.why3-vo-opt
$(COQC)
-opt
-R
lib/coq-tactic Why3
-R
lib/coq Why3
bench/coq-tactic/test.v
$(COQC)
-opt
$(COQRTAC)
bench/coq-tactic/test.v
#only test the compilation of runstrat
test-runstrat.byte
:
lib/why3/why3.cma lib/why3/META
...
...
configure.in
View file @
2c78bda7
...
...
@@ -525,11 +525,16 @@ if test "$enable_coq_support" = yes; then
COQPPLIBS="$COQLIB/parsing/grammar.cma"
AC_MSG_RESULT($COQVERSION)
;;
8.5*
|trunk
)
8.5*)
coq_compat_version="COQ85"
COQPPLIBS="$OCAMLLIB/unix.cma $OCAMLLIB/threads/threads.cma $COQLIB/grammar/grammar.cma"
AC_MSG_RESULT($COQVERSION)
;;
8.6*|trunk)
coq_compat_version="COQ86"
COQPPLIBS="$OCAMLLIB/unix.cma $OCAMLLIB/threads/threads.cma $COQLIB/grammar/grammar.cma"
AC_MSG_RESULT($COQVERSION)
;;
*)
enable_coq_support=no
AC_MSG_WARN(You need Coq 8.4 or later; Coq discarded)
...
...
lib/coq/bv/BV_Gen.v.COQ86
0 → 100644
View file @
2c78bda7
This diff is collapsed.
Click to expand it.
lib/coq/map/Occ.v
View file @
2c78bda7
...
...
@@ -57,7 +57,7 @@ Proof.
intros
a
a_WT
v
m
l
u
h1
.
assert
(
u
-
l
<=
0
)
%
Z
as
h1
'
by
omega
.
unfold
occ
.
destruct
(
u
-
l
)
%
Z
;
try
eas
y
.
destruct
(
u
-
l
)
%
Z
;
try
reflexivit
y
.
now
elim
h1
'
.
Qed
.
...
...
share/provers-detection-data.conf
View file @
2c78bda7
...
...
@@ -491,6 +491,18 @@ version_ok = "7.0"
command
=
"%l/why3-cpulimit %t %m -s %e -noprompt"
driver
=
"drivers/mathematica.drv"
# Coq 8.6: do not limit memory
[
ITP
coq
]
name
=
"Coq"
compile_time_support
=
true
exec
=
"coqtop -batch"
version_switch
=
"-v"
version_regexp
=
"The Coq Proof Assistant, version \\([^ \n]+\\)"
version_ok
=
"8.6"
command
=
"%e -I %l/coq-tactic -R %l/coq-tactic Why3 -R %l/coq Why3 -l %f"
driver
=
"drivers/coq.drv"
editor
=
"coqide"
# Coq 8.5: do not limit memory
[
ITP
coq
]
name
=
"Coq"
...
...
@@ -498,6 +510,8 @@ compile_time_support = true
exec
=
"coqtop -batch"
version_switch
=
"-v"
version_regexp
=
"The Coq Proof Assistant, version \\([^ \n]+\\)"
version_ok
=
"8.5pl3"
version_ok
=
"8.5pl2"
version_ok
=
"8.5pl1"
version_ok
=
"8.5"
command
=
"%e -R %l/coq-tactic Why3 -R %l/coq Why3 -l %f"
...
...
src/coq-tactic/why3tac.ml4
View file @
2c78bda7
...
...
@@ -58,12 +58,24 @@ let is_global c t =
| VarRef id, Var id' -> id = id'
| _ -> false
let push_named = Environ.push_named
let betadeltaiota = Closure.betadeltaiota
module RedFlags = Closure.RedFlags
ELSE
open Universes
open Globnames
open Vars
IFDEF COQ85 THEN
open Errors
ELSE
open CErrors
open Stdarg
END
let declare_summary name freeze unfreeze init =
Summary.declare_summary name
...
...
@@ -112,6 +124,34 @@ let find_reference t1 t2 =
let is_global c t = is_global (Lazy.force c) t
IFDEF COQ85 THEN
let push_named = Environ.push_named
let betadeltaiota = Closure.betadeltaiota
module RedFlags = Closure.RedFlags
ELSE
let push_named (id, c, t) env =
Environ.push_named
(match c with
| None -> Context.Named.Declaration.LocalAssum (id, t)
| Some b -> Context.Named.Declaration.LocalDef (id, b, t))
env
let pf_hyps gl =
List.map (function
| Context.Named.Declaration.LocalAssum (id, t) -> (id, None, t)
| Context.Named.Declaration.LocalDef (id, b, t) -> (id, Some b, t))
(pf_hyps gl)
let betadeltaiota = CClosure.all
module RedFlags = CClosure.RedFlags
END
DECLARE PLUGIN "why3tac"
END
...
...
@@ -260,7 +300,7 @@ let coq_rename_vars env vars =
let coq_rename_var env na t =
let avoid = ids_of_named_context (Environ.named_context env) in
let id = next_name_away na avoid in
id,
Environ.
push_named (id, None, t) env
id, push_named (id, None, t) env
let preid_of_id id = Ident.id_fresh (string_of_id id)
...
...
@@ -524,8 +564,8 @@ let rec tr_arith_constant dep t = match kind_of_term t with
let rec tr_type dep tvm env evd t =
let t = Reductionops.clos_norm_flags
(
Closure.
RedFlags.red_add_transparent
Closure.
betadeltaiota (get_transp_state env))
(RedFlags.red_add_transparent
betadeltaiota (get_transp_state env))
env evd t in
if is_global coq_Z t then
Ty.ty_int
...
...
@@ -1358,7 +1398,9 @@ let why3tac ?(timelimit=timelimit) s gl =
| StepLimitExceeded -> error "Step Limit Exceeded"
| HighFailure -> error ("Prover failure\n" ^ res.pr_output ^ "\n")
IFDEF COQ85 THEN
IFDEF COQ84 THEN
ELSE
let why3tac ?timelimit s = Proofview.V82.tactic (why3tac ?timelimit s)
...
...
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