mit-plv / coqutil Goto Github PK
View Code? Open in Web Editor NEWCoq library for tactics, basic definitions, sets, maps
License: MIT License
Coq library for tactics, basic definitions, sets, maps
License: MIT License
As sign extension goes from one word size to another word size, shouldn't it be a derived function from a word of one size to a word of another size?
If we want to use coqutil in fiat-crypto, we need some subset (and target) of it that builds with Coq 8.9.
In Coq 8.12, build failures are documented in #38
In Coq 8.11, build failures are documented in #40
In Coq 8.10, there's at least one issue with lia in List.v, Ltac2 does not exist, and neither does Coq.micromega.ZifyClasses
In Coq 8.9, skipn_cons
and Z.div_mod_to_equations
don't exist
The Coq team released Coq 8.17+rc1
on December 29th, 2022 and plans to release Coq 8.17.0 around March 7th, 2023.
The corresponding Coq Platform release 2023.03
should be released before April 14th, 2023.
It can be delayed in case of difficulties until June 30, 2023, but this should be an exception.
This issue is to inform you that the opam package we are currently testing in Coq Platform CI works fine with Coq 8.17+rc1
.
Coq Platform CI is currently testing opam package coq-coqutil.0.0.2
from official repository https://coq.inria.fr/opam/released/packages/coq-coqutil/coq-coqutil.0.0.2/opam.
In case this is the version you want to see in Coq Platform, there is nothing to do for you - please just close this issue.
In case you would prefer to see an updated or an older version in the upcoming Coq Platform 2023.03
, please inform us as soon as possible and before March 21st, 2023!
The working branch of Coq Platform, can be found here main.
It contains package pick ~8.17~2023.03+preview1
which already supports Coq version 8.17+rc1
and contains already working (possibly patched / commit pinned) Coq Platform packages.
In case you want to select a different version, please don't close this issue, even after creating the new tag and/or opam package.
We will close the issue after updating Coq Platform.
This is a measure of 'double book keeping' in order to avoid that we ship the wrong version.
In any case, Coq Platform won't be released before this issue is closed!
Thanks!
P.S.: this issue has been created automatically based on CI status.
CC: coq/platform#335
LittleEndian.combine should not inline tuple.to_list. It could just take a list as input and have a simpler type.
I see
coq_makefile -f _CoqProject INSTALLDEFAULTROOT = coqutil /home/jgross/Documents/repos/fiat-crypto/bedrock2/deps/coqutil/src/coqutil/Macros/symmetry.v /home/jgross/Docu
ments/repos/fiat-crypto/bedrock2/deps/coqutil/src/coqutil/Macros/unique.v /home/jgross/Documents/repos/fiat-crypto/bedrock2/deps/coqutil/src/coqutil/Macros/subst.v /hom
e/jgross/Documents/repos/fiat-crypto/bedrock2/deps/coqutil/src/coqutil/Word/Interface.v /home/jgross/Documents/repos/fiat-crypto/bedrock2/deps/coqutil/src/coqutil/Word/
LittleEndian.v /home/jgross/Documents/repos/fiat-crypto/bedrock2/deps/coqutil/src/coqutil/Word/Properties.v /home/jgross/Documents/repos/fiat-crypto/bedrock2/deps/coqut
il/src/coqutil/Word/Naive.v /home/jgross/Documents/repos/fiat-crypto/bedrock2/deps/coqutil/src/coqutil/Map/Interface.v /home/jgross/Documents/repos/fiat-crypto/bedrock2
/deps/coqutil/src/coqutil/Map/Solver.v /home/jgross/Documents/repos/fiat-crypto/bedrock2/deps/coqutil/src/coqutil/Map/SlowGoals.v /home/jgross/Documents/repos/fiat-cryp
to/bedrock2/deps/coqutil/src/coqutil/Map/Z_keyed_SortedListMap.v /home/jgross/Documents/repos/fiat-crypto/bedrock2/deps/coqutil/src/coqutil/Map/SortedList.v /home/jgros
s/Documents/repos/fiat-crypto/bedrock2/deps/coqutil/src/coqutil/Map/Funext.v /home/jgross/Documents/repos/fiat-crypto/bedrock2/deps/coqutil/src/coqutil/Map/SortedListWo
rd.v /home/jgross/Documents/repos/fiat-crypto/bedrock2/deps/coqutil/src/coqutil/Map/SortedListString.v /home/jgross/Documents/repos/fiat-crypto/bedrock2/deps/coqutil/sr
c/coqutil/Map/TestLemmas.v /home/jgross/Documents/repos/fiat-crypto/bedrock2/deps/coqutil/src/coqutil/Map/Properties.v /home/jgross/Documents/repos/fiat-crypto/bedrock2
/deps/coqutil/src/coqutil/Map/Empty_set_keyed_map.v /home/jgross/Documents/repos/fiat-crypto/bedrock2/deps/coqutil/src/coqutil/Map/SortedListString_test.v /home/jgross/
Documents/repos/fiat-crypto/bedrock2/deps/coqutil/src/coqutil/Map/TestGoals.v /home/jgross/Documents/repos/fiat-crypto/bedrock2/deps/coqutil/src/coqutil/Z/PushPullMod.v
/home/jgross/Documents/repos/fiat-crypto/bedrock2/deps/coqutil/src/coqutil/Z/ZLib.v /home/jgross/Documents/repos/fiat-crypto/bedrock2/deps/coqutil/src/coqutil/Z/bitbla
st.v /home/jgross/Documents/repos/fiat-crypto/bedrock2/deps/coqutil/src/coqutil/Z/div_to_equations.v /home/jgross/Documents/repos/fiat-crypto/bedrock2/deps/coqutil/src/
coqutil/Z/HexNotation.v /home/jgross/Documents/repos/fiat-crypto/bedrock2/deps/coqutil/src/coqutil/Z/Lia.v /home/jgross/Documents/repos/fiat-crypto/bedrock2/deps/coquti
l/src/coqutil/Z/div_mod_to_equations.v /home/jgross/Documents/repos/fiat-crypto/bedrock2/deps/coqutil/src/coqutil/Z/BitOps.v /home/jgross/Documents/repos/fiat-crypto/be
drock2/deps/coqutil/src/coqutil/Tactics/rdelta.v /home/jgross/Documents/repos/fiat-crypto/bedrock2/deps/coqutil/src/coqutil/Tactics/syntactic_unify.v /home/jgross/Docum
ents/repos/fiat-crypto/bedrock2/deps/coqutil/src/coqutil/Tactics/letexists.v /home/jgross/Documents/repos/fiat-crypto/bedrock2/deps/coqutil/src/coqutil/Tactics/autoforw
ard.v /home/jgross/Documents/repos/fiat-crypto/bedrock2/deps/coqutil/src/coqutil/Tactics/Tactics.v /home/jgross/Documents/repos/fiat-crypto/bedrock2/deps/coqutil/src/co
qutil/Tactics/destr.v /home/jgross/Documents/repos/fiat-crypto/bedrock2/deps/coqutil/src/coqutil/Tactics/eabstract.v /home/jgross/Documents/repos/fiat-crypto/bedrock2/d
eps/coqutil/src/coqutil/Tactics/simpl_rewrite.v /home/jgross/Documents/repos/fiat-crypto/bedrock2/deps/coqutil/src/coqutil/sanity.v /home/jgross/Documents/repos/fiat-cr
ypto/bedrock2/deps/coqutil/src/coqutil/dlet.v /home/jgross/Documents/repos/fiat-crypto/bedrock2/deps/coqutil/src/coqutil/Decidable.v /home/jgross/Documents/repos/fiat-c
rypto/bedrock2/deps/coqutil/src/coqutil/Datatypes/PropSet.v /home/jgross/Documents/repos/fiat-crypto/bedrock2/deps/coqutil/src/coqutil/Datatypes/PrimitivePair.v /home/j
gross/Documents/repos/fiat-crypto/bedrock2/deps/coqutil/src/coqutil/Datatypes/HList.v /home/jgross/Documents/repos/fiat-crypto/bedrock2/deps/coqutil/src/coqutil/Datatyp
es/String.v /home/jgross/Documents/repos/fiat-crypto/bedrock2/deps/coqutil/src/coqutil/Datatypes/Prod.v /home/jgross/Documents/repos/fiat-crypto/bedrock2/deps/coqutil/s
rc/coqutil/Datatypes/List.v /home/jgross/Documents/repos/fiat-crypto/bedrock2/deps/coqutil/src/coqutil/Datatypes/Option.v -o Makefile.coq.all
every time I run make, and it's a bit unpleasant. Please suppress the output, at least whenever VERBOSE
is empty.
(You can copy this snipped to allow conditional showing/hiding:
VERBOSE?=
SHOW := $(if $(VERBOSE),@true "",@echo "")
HIDE := $(if $(VERBOSE),,@)
and then do
foo:
$(SHOW)short description
$(HIDE)verbose actual command
The Coq team released Coq 8.18.0
on September 7th, 2023.
The corresponding Coq Platform release 2023.10
should be released before November 30th, 2023.
It can be delayed in case of difficulties until January 15th, 2023, but this should be an exception.
This issue is to inform you that the opam package we are currently testing in Coq Platform CI works fine with Coq 8.18.0
.
Coq Platform CI is currently testing opam package coq-coqutil.0.0.3
from official repository https://coq.inria.fr/opam/released/packages/coq-coqutil/coq-coqutil.0.0.3/opam.
In case this is the version you want to see in Coq Platform, there is nothing to do for you - please just close this issue.
In case you would prefer to see an updated or an older version in the upcoming Coq Platform 2023.10
, please inform us as soon as possible and before October 31st, 2023!
The working branch of Coq Platform, can be found here main.
It contains package pick ~8.18+beta1
which already supports Coq version 8.18.0
and contains already working (possibly patched / commit pinned) Coq Platform packages.
In case you want to select a different version, please don't close this issue, even after creating the new tag and/or opam package.
We will close the issue after updating Coq Platform.
This is a measure of 'double book keeping' in order to avoid that we ship the wrong version.
In any case, Coq Platform won't be released before this issue is closed!
Thanks!
P.S.: this issue has been created automatically based on CI status.
CC: coq/platform#372
map solver tests take a while compared to rest of the repo
I have the feeling that using tuples in that file was an unfortunate choice and benefits almost nothing; getting rid of it would be a clear improvement. @samuelgruetter do you agree? If so, plan:
LittleEndian.combine
and LittleEndian.split
in terms of LittleEndianList.combine
and LittleEndianList.split
LittleEndianList
-> LittleEndian
across all repositories (but we get most of the benefit even if we don't do this)Thoughts?
supersedes #34
The Coq team released Coq 8.16+rc1
on June 01, 2022.
The corresponding Coq Platform release 2022.09
should be released before September 15, 2022.
It can be delayed in case of difficulties until October 15, 2022, but this should be an exception.
This issue is to inform you that the opam package we are currently testing in Coq Platform CI works fine with Coq 8.16+rc1
.
Coq Platform CI is currently testing opam package coq-coqutil.0.0.1
from official repository https://coq.inria.fr/opam/released/packages/coq-coqutil/coq-coqutil.0.0.1/opam.
In case this is the version you want to see in Coq Platform, there is nothing to do for you - please just close this issue.
In case you would prefer to see an updated or an older version in the upcoming Coq Platform 2022.09
, please inform us as soon as possible and before August 31, 2022!
The working branch of Coq Platform, can be found here main.
It contains package pick ~8.16+rc1~2022.09~preview1
which already supports Coq version 8.16+rc1
and contains already working (possibly patched / commit pinned) Coq Platform packages.
In case you want to select a different version, please don't close this issue, even after creating the new tag and/or opam package.
We will close the issue after updating Coq Platform.
This is a measure of 'double book keeping' in order to avoid that we ship the wrong version.
In any case, Coq Platform won't be released before this issue is closed!
Thanks!
P.S.: this issue has been created automatically based on CI status.
CC: coq/platform#274
We can fix the first one with
diff --git a/Makefile b/Makefile
index d87b01a..a84f2b5 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
default_target: all
-.PHONY: clean force all install uninstall
+.PHONY: clean force all install uninstall validate
# absolute paths so that emacs compile mode knows where to find error
# use cygpath -m because Coq on Windows cannot handle cygwin paths
@@ -31,3 +31,6 @@ install::
uninstall::
$(MAKE) -f Makefile.coq.all uninstall
+
+validate:
+ $(MAKE) -f Makefile.coq.all validate
but the second is a bug in Coq coq/coq#12066 that coqutil hits because it's using absolute paths.
Quoting Enrico in coq/opam#914 (comment):
For a .dev package I believe it is fine, but if you want to put it under released at some point please craft a more precise description of it.
This is in no way urgent, but it's possible we'll at some point want to release fiat-crypto, and if the released fiat-crypto depends on coqutil via bedrock2, this will then be a blocker for releasing fiat-crypto on opam.
Please add an AUTHORS file and a LICENSE file; I cannot create an opam package if I don't know which authors to list and what license to use.
coqchk gives:
CONTEXT SUMMARY
===============
* Theory: Set is predicative
* Axioms:
Coq.ssr.ssrunder.Under_rel.Over_rel
Coq.ssr.ssrunder.Under_rel.Under_rel_from_rel
Coq.ssr.ssrunder.Under_rel.over_rel
Coq.Logic.FunctionalExtensionality.functional_extensionality_dep
coqutil.Map.SortedList.TODO_andres
Coq.ssr.ssrunder.Under_rel.over_rel_done
Coq.ssr.ssrunder.Under_rel.Under_rel
Coq.Logic.PropExtensionality.propositional_extensionality
Coq.ssr.ssrunder.Under_rel.Under_relE
coqutil.Map.SortedListString.TODO_andres
Coq.ssr.ssrunder.Under_rel.under_rel_done
* Constants/Inductives relying on type-in-type: <none>
* Constants/Inductives relying on unsafe (co)fixpoints: <none>
* Inductives whose positivity is assumed: <none>
You can ignore the ssr.ssrunder ones (coq/coq#5030), but it'd be nice to remove the other ones.
Should any/all/most of the fiat-crypto src/Util
directory be migrated to coqutil? (Currently this directory is more-or-less replicated across fiat, rewriter, and fiat-crypto, with fiat-crypto containing the most complete and up-to-date version.)
An incomplete list of tactics, roughly in order from most-used to least-used:
match
subject to various conditions such as "only this type of variable", "only terms which contain no matches inside themselves", "only in the hyps", "only in the conclusion", "only variables" (with intelligent insertion of equations)assumption
, auto
, lia
, etc))[https://github.com/mit-plv/fiat-crypto/blob/master/src/Util/Tactics/SpecializeBy.v]pose
and assert
which are suitable for use in repeat
blocks by ensuring that they don't pose duplicatesiff
, and
, produnderneath binders in a way that preserves the binders, e.g., turning
forall x y, P x y /\ Q x yinto
forall x y, P x yand
forall x y, Q x y`set
or subst
on all evarssubst
that works modulo relationssubst
on all local definitionstransparent assert
etransitivity
that accepts argumentsdestruct
that attempts to work with convoy-pattern terms appearing in the goalespecialize
tac_on_subterms
, to be used as e.g. tac_on_subterms ring_simplify
intros *
tryif
for returning constrsreplace_with_vm_compute
for getting around vm_compute
not inserting castsif
statementsAn incomplete list of other utilities:
Z
, including automation for:
lia
, nia
, or lra
at the leavesZ.modulo
, which is factored into a tacticsubst
which will solve linear equations in variables over Z
to substituteZ.testbit
nat
, list
, N
, Q
, MSetsreflect
culminating in a general tactic for turning boolean equality hypotheses into propositionsstring
, including
Show
, ShowLevel
(for printing with precedence), and ShowLines
(printing to lists of strings rather than single strings, for better efficiency) and theory around themwf
and more factsArg
module (maybe this should be split off to a separate project and added on opam? (perhaps to be combined with the method for extracting main functions and executables in OCaml and Haskell?)eq
N
s into primesx = x
with eq_refl
when equality on x
is decidableLet_In
constant for not inlining let ... in ...
and a monad around thisinversion_sigma
) for option
, nat
, list
, prod
, prod
with primitive projections, sum
, primitive projection versions of sig
, sigT
, etc, sumbool
Prop
soption (list _)
and list (option _)
We have
Line 45 in 4216302
Lines 30 to 32 in 4216302
Line 28 in 4216302
Line 3 in 4216302
make install
invariably regenerates Makefile.coq.notest
. I'd like this to not be the case.
This breaks testing fiat-crypto's make install target on docker: https://github.com/mit-plv/fiat-crypto/actions/runs/6909719309/job/18801575975?pr=1733#step:18:3269
The Coq team released Coq 8.19.0
on January 24th, 2024.
The corresponding Coq Platform release 2024.01
should be released before April 30th, 2024.
It can be delayed in case of difficulties until May 15th, 2024, but this should be an exception.
This issue is to inform you that to our (possibly a few days old) best knowledge the latest released version of your project (0.0.4) does not work with Coq 8.19.0
.
We tried to remove version restrictions in opam files and possibly make or configure files, but this did not suffice.
Please note that in Coq Platform CI (unlike Coq CI) we test only released / tagged versions. Coq CI appears to test this project, but has some special handling for your project which makes it difficult to retrieve the commit it tests for your project.
Could you please create a tag and opam package, or communicate us any existing tag that works with Coq branch v8.19, preferably before March 31st, 2024?
In case we might have to delay the Coq Platform release cause of issues with your project, we would prefer to be informed about the situation as early as possible.
In case the tag and opam package are available before March 31st, 2024, it will be included in an early Coq Platform beta release of the for Coq 8.19.0.
The working branch of Coq Platform, can be found here main.
It contains package pick ~8.19~2024.01+beta1
which already supports Coq version 8.19.0
and contains already working (possibly patched / commit pinned) Coq Platform packages.
Please don't close this issue, even after creating the new tag and/or opam package.
We will close the issue after updating Coq Platform.
This is a measure of 'double book keeping' in order to avoid that we ship the wrong version.
In any case, Coq Platform won't be released before this issue is closed!
Thanks!
P.S.: this issue has been created automatically based on CI status.
CC: coq/platform#405
Fiat Crypto no longer builds with the newest version of coqutil. What happened?
I get an email from GitHub actions every time the tested branch fails to update, probably because I'm the person who last edited the .yml file. @samuelgruetter could you edit it, so I stop getting these emails and they go to someone who can make better use of them instead?
This is currently blocking mit-plv/fiat-crypto#686 (cc @jadephilipoom )
If I do
Require Import Coq.extraction.Extraction.
Require Import coqutil.Map.SortedListString.
Extraction Language OCaml.
Recursive Extraction coqutil.Map.SortedListString.map.
I get:
type __ = Obj.t
type bool =
| True
| False
(** val negb : bool -> bool **)
let negb = function
| True -> False
| False -> True
type 'a option =
| Some of 'a
| None
type ('a, 'b) prod =
| Pair of 'a * 'b
(** val fst : ('a1, 'a2) prod -> 'a1 **)
let fst = function
| Pair (x, _) -> x
type 'a list =
| Nil
| Cons of 'a * 'a list
type comparison =
| Eq
| Lt
| Gt
(** val eqb : bool -> bool -> bool **)
let eqb b1 b2 =
match b1 with
| True -> b2
| False -> (match b2 with
| True -> False
| False -> True)
(** val fold_right : ('a2 -> 'a1 -> 'a1) -> 'a1 -> 'a2 list -> 'a1 **)
let rec fold_right f a0 = function
| Nil -> a0
| Cons (b, t) -> f b (fold_right f a0 t)
(** val find : ('a1 -> bool) -> 'a1 list -> 'a1 option **)
let rec find f = function
| Nil -> None
| Cons (x, tl) -> (match f x with
| True -> Some x
| False -> find f tl)
type positive =
| XI of positive
| XO of positive
| XH
type n =
| N0
| Npos of positive
module Pos =
struct
(** val succ : positive -> positive **)
let rec succ = function
| XI p -> XO (succ p)
| XO p -> XI p
| XH -> XO XH
(** val add : positive -> positive -> positive **)
let rec add x y =
match x with
| XI p ->
(match y with
| XI q -> XO (add_carry p q)
| XO q -> XI (add p q)
| XH -> XO (succ p))
| XO p ->
(match y with
| XI q -> XI (add p q)
| XO q -> XO (add p q)
| XH -> XI p)
| XH -> (match y with
| XI q -> XO (succ q)
| XO q -> XI q
| XH -> XO XH)
(** val add_carry : positive -> positive -> positive **)
and add_carry x y =
match x with
| XI p ->
(match y with
| XI q -> XI (add_carry p q)
| XO q -> XO (add_carry p q)
| XH -> XI (succ p))
| XO p ->
(match y with
| XI q -> XO (add_carry p q)
| XO q -> XI (add p q)
| XH -> XO (succ p))
| XH -> (match y with
| XI q -> XI (succ q)
| XO q -> XO (succ q)
| XH -> XI XH)
(** val mul : positive -> positive -> positive **)
let rec mul x y =
match x with
| XI p -> add y (XO (mul p y))
| XO p -> XO (mul p y)
| XH -> y
(** val compare_cont : comparison -> positive -> positive -> comparison **)
let rec compare_cont r x y =
match x with
| XI p ->
(match y with
| XI q -> compare_cont r p q
| XO q -> compare_cont Gt p q
| XH -> Gt)
| XO p ->
(match y with
| XI q -> compare_cont Lt p q
| XO q -> compare_cont r p q
| XH -> Gt)
| XH -> (match y with
| XH -> r
| _ -> Lt)
(** val compare : positive -> positive -> comparison **)
let compare =
compare_cont Eq
end
module N =
struct
(** val compare : n -> n -> comparison **)
let compare n0 m =
match n0 with
| N0 -> (match m with
| N0 -> Eq
| Npos _ -> Lt)
| Npos n' -> (match m with
| N0 -> Gt
| Npos m' -> Pos.compare n' m')
(** val ltb : n -> n -> bool **)
let ltb x y =
match compare x y with
| Lt -> True
| _ -> False
end
module Coq_N =
struct
(** val add : n -> n -> n **)
let add n0 m =
match n0 with
| N0 -> m
| Npos p -> (match m with
| N0 -> n0
| Npos q -> Npos (Pos.add p q))
(** val mul : n -> n -> n **)
let mul n0 m =
match n0 with
| N0 -> N0
| Npos p -> (match m with
| N0 -> N0
| Npos q -> Npos (Pos.mul p q))
end
type ascii =
| Ascii of bool * bool * bool * bool * bool * bool * bool * bool
(** val eqb0 : ascii -> ascii -> bool **)
let eqb0 a b =
let Ascii (a0, a1, a2, a3, a4, a5, a6, a7) = a in
let Ascii (b0, b1, b2, b3, b4, b5, b6, b7) = b in
(match match match match match match match eqb a0 b0 with
| True -> eqb a1 b1
| False -> False with
| True -> eqb a2 b2
| False -> False with
| True -> eqb a3 b3
| False -> False with
| True -> eqb a4 b4
| False -> False with
| True -> eqb a5 b5
| False -> False with
| True -> eqb a6 b6
| False -> False with
| True -> eqb a7 b7
| False -> False)
(** val n_of_digits : bool list -> n **)
let rec n_of_digits = function
| Nil -> N0
| Cons (b, l') ->
Coq_N.add (match b with
| True -> Npos XH
| False -> N0) (Coq_N.mul (Npos (XO XH)) (n_of_digits l'))
(** val n_of_ascii : ascii -> n **)
let n_of_ascii = function
| Ascii (a0, a1, a2, a3, a4, a5, a6, a7) ->
n_of_digits (Cons (a0, (Cons (a1, (Cons (a2, (Cons (a3, (Cons (a4, (Cons (a5,
(Cons (a6, (Cons (a7, Nil))))))))))))))))
type string =
| EmptyString
| String of ascii * string
module Coq_map =
struct
type ('key, 'value) map = { get : (__ -> 'key -> 'value option); empty :
__; put : (__ -> 'key -> 'value -> __);
remove : (__ -> 'key -> __);
fold : (__ -> (__ -> 'key -> 'value -> __) -> __ ->
__ -> __) }
end
module Coq_parameters =
struct
type parameters =
__ -> __ -> bool
(* singleton inductive, whose constructor was Build_parameters *)
type key = __
type value = __
(** val ltb : parameters -> key -> key -> bool **)
let ltb parameters0 =
parameters0
end
(** val eqb1 :
Coq_parameters.parameters -> Coq_parameters.key -> Coq_parameters.key -> bool **)
let eqb1 p k1 k2 =
match negb (Coq_parameters.ltb p k1 k2) with
| True -> negb (Coq_parameters.ltb p k2 k1)
| False -> False
(** val put0 :
Coq_parameters.parameters -> (Coq_parameters.key, Coq_parameters.value) prod
list -> Coq_parameters.key -> Coq_parameters.value -> (Coq_parameters.key,
Coq_parameters.value) prod list **)
let rec put0 p m k v =
match m with
| Nil -> Cons ((Pair (k, v)), Nil)
| Cons (y, m') ->
let Pair (k', v') = y in
(match Coq_parameters.ltb p k k' with
| True -> Cons ((Pair (k, v)), m)
| False ->
(match Coq_parameters.ltb p k' k with
| True -> Cons ((Pair (k', v')), (put0 p m' k v))
| False -> Cons ((Pair (k, v)), m')))
(** val remove0 :
Coq_parameters.parameters -> (Coq_parameters.key, Coq_parameters.value) prod
list -> Coq_parameters.key -> (Coq_parameters.key, Coq_parameters.value) prod
list **)
let rec remove0 p m k =
match m with
| Nil -> Nil
| Cons (y, m') ->
let Pair (k', v') = y in
(match Coq_parameters.ltb p k k' with
| True -> m
| False ->
(match Coq_parameters.ltb p k' k with
| True -> Cons ((Pair (k', v')), (remove0 p m' k))
| False -> m'))
type rep =
(Coq_parameters.key, Coq_parameters.value) prod list
(* singleton inductive, whose constructor was Build_rep *)
(** val value0 :
Coq_parameters.parameters -> rep -> (Coq_parameters.key, Coq_parameters.value)
prod list **)
let value0 _ r =
r
(** val map0 :
Coq_parameters.parameters -> (Coq_parameters.key, Coq_parameters.value)
Coq_map.map **)
let map0 p =
let wrapped_put = fun m k v -> put0 p (value0 p m) k v in
let wrapped_remove = fun m k -> remove0 p (value0 p m) k in
{ Coq_map.get = (fun m k ->
match find (fun p0 -> eqb1 p k (fst p0)) (value0 p (Obj.magic m)) with
| Some p0 -> let Pair (_, v) = p0 in Some v
| None -> None); Coq_map.empty = (Obj.magic Nil); Coq_map.put =
(Obj.magic wrapped_put); Coq_map.remove = (Obj.magic wrapped_remove);
Coq_map.fold = (fun _ f r0 m ->
fold_right (fun pat r -> let Pair (k, v) = pat in f r k v) r0
(value0 p (Obj.magic m))) }
module Ascii =
struct
(** val ltb : ascii -> ascii -> bool **)
let ltb c d =
N.ltb (n_of_ascii c) (n_of_ascii d)
end
(** val ltb0 : string -> string -> bool **)
let rec ltb0 a b =
match a with
| EmptyString -> (match b with
| EmptyString -> False
| String (_, _) -> True)
| String (x, a') ->
(match b with
| EmptyString -> False
| String (y, b') ->
(match eqb0 x y with
| True -> ltb0 a' b'
| False -> Ascii.ltb x y))
(** val build_parameters : Coq_parameters.parameters **)
let build_parameters =
Obj.magic ltb0
(** val map1 : (Coq_parameters.key, Coq_parameters.value) Coq_map.map **)
let map1 =
map0 build_parameters
Running ocamlc foo.ml
gives:
File "foo.ml", line 356, characters 4-8:
Error: The type of this expression, ('_weak1, '_weak2) Coq_map.map,
contains type variables that cannot be generalized
Hi folks, I see your makefile has:
# absolute paths so that emacs compile mode knows where to find error
# use cygpath -m because Coq on Windows cannot handle cygwin paths
SRCDIR := $(shell cygpath -m "$$(pwd)" 2>/dev/null || pwd)/src
then you do
@$(COQ_MAKEFILE) $(ALL_VS) -o Makefile.coq.all
with the above files, being absolute paths.
Using absolute paths is really not supported by coq_makefile (paths should be relative to the flags given in _CoqProject) , it works because coqdep implements some (fragile magic) but we'd like to get rid of it.
What is this stuff about emacs needing absolute paths? cc @samuelgruetter
COQC /home/runner/work/coqutil/coqutil/src/coqutil/Datatypes/ListSet.v
Error: Tactic failure: Proof search failed.
Please fix, or revert 4986e26. This breaks fiat-crypto's opam package CI
It's breaking the bedrock2 dev package (because coqutil.dev gets source from coqutil tested branch)
alternatively you can change the dev package to use master
Should https://github.com/mit-plv/bedrock2/blob/master/bedrock2/src/bedrock2/ZnWords.v be adapted to hook into the zify mechanism a la https://github.com/coq/coq/blob/master/theories/micromega/ZifyUint63.v and be integrated into coqutil?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.