Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • iris/iris
  • jeehoon.kang/iris-coq
  • amintimany/iris-coq
  • dfrumin/iris-coq
  • Villetaneuse/iris
  • gares/iris
  • shiatsumat/iris
  • Blaisorblade/iris
  • jihgfee/iris-coq
  • mrhaandi/iris
  • tlsomers/iris
  • Quarkbeast/iris-coq
  • janno/iris
  • amaurremi/iris-coq
  • proux/iris
  • tchajed/iris
  • herbelin/iris-coq
  • msammler/iris-coq
  • maximedenes/iris-coq
  • bpeters/iris
  • haidang/iris
  • lepigre/iris
  • lczch/iris
  • simonspies/iris
  • gpirlea/iris
  • dkhalanskiyjb/iris
  • gmalecha/iris
  • germanD/iris
  • aa755/iris
  • jules/iris
  • abeln/iris
  • simonfv/iris
  • atrieu/iris
  • arthuraa/iris
  • simonh/iris
  • jung/iris
  • mattam82/iris
  • Armael/iris
  • adamAndMath/iris
  • gmevel/iris
  • snyke7/iris
  • johannes/iris
  • NiklasM/iris
  • simonspies/iris-parametric-index
  • svancollem/iris
  • proux1/iris
  • wmansky/iris
  • LukeXuan/iris
  • ivanbakel/iris
  • SkySkimmer/iris
  • tjhance/iris
  • yiyunliu/iris
  • Lee-Janggun/iris
  • thomas-lamiaux/iris
  • dongjae/iris
  • dnezam/iris
  • Tragicus/iris
  • clef-men/iris
  • ffengyu/iris
59 results
Show changes
Commits on Source (1367)
...@@ -22,3 +22,6 @@ Makefile.coq.conf ...@@ -22,3 +22,6 @@ Makefile.coq.conf
.Makefile.coq.d .Makefile.coq.d
Makefile.package.* Makefile.package.*
.Makefile.package.* .Makefile.package.*
_opam
_build
*.install
...@@ -5,6 +5,9 @@ stages: ...@@ -5,6 +5,9 @@ stages:
variables: variables:
CPU_CORES: "10" CPU_CORES: "10"
OCAML: "ocaml-variants.4.14.0+options ocaml-option-flambda"
# Avoid needlessly increasing our TCB with native_compute
COQEXTRAFLAGS: "-native-compiler no"
.only_branches: &only_branches .only_branches: &only_branches
only: only:
...@@ -41,60 +44,49 @@ variables: ...@@ -41,60 +44,49 @@ variables:
## Build jobs ## Build jobs
build-coq.dev: # The newest version runs with timing.
build-coq.8.20.1:
<<: *template <<: *template
<<: *branches_and_mr
variables: variables:
# Pinning a commit to avoid constant re-builds in MR pipelines OPAM_PINS: "coq version 8.20.1"
COQ_REV: "f16b7c75bcc8651e43ec1f0c8ae6744748665213"
OPAM_PINS: "coq-core.dev git git+https://github.com/coq/coq#$COQ_REV coq-stdlib.dev git git+https://github.com/coq/coq#$COQ_REV coq.dev git git+https://github.com/coq/coq#$COQ_REV"
MANGLE_NAMES: "1"
build-coq.8.14.dev:
<<: *template
variables:
OPAM_PINS: "coq version 8.14.dev"
MANGLE_NAMES: "1"
DENY_WARNINGS: "1"
build-coq.8.13.2:
<<: *template
interruptible: false
variables:
OPAM_PINS: "coq version 8.13.2"
DENY_WARNINGS: "1" DENY_WARNINGS: "1"
MANGLE_NAMES: "1"
OPAM_PKG: "1" OPAM_PKG: "1"
DOC_DIR: "coqdoc@center.mpi-sws.org:iris" DOC_DIR: "coqdoc@center.mpi-sws.org:iris"
DOC_OPTS: "--external https://plv.mpi-sws.org/coqdoc/stdpp/ stdpp" DOC_OPTS: "--external https://plv.mpi-sws.org/coqdoc/stdpp/ stdpp"
tags: tags:
- fp-timing - fp-timing
interruptible: false
build-coq.8.12.2: # The newest version also runs in MRs, without timing.
build-coq.8.20.1-mr:
<<: *template <<: *template
<<: *branches_and_mr <<: *only_mr
variables: variables:
OPAM_PINS: "coq version 8.12.2" OPAM_PINS: "coq version 8.20.1"
DENY_WARNINGS: "1" DENY_WARNINGS: "1"
MANGLE_NAMES: "1"
# Nightly job with a known-to-work Coq version # Also ensure Dune works.
# (so failures must be caused by std++) build-coq.8.20.1-dune:
trigger-stdpp.dev-coq.8.13.1:
<<: *template <<: *template
<<: *branches_and_mr
variables: variables:
STDPP_REPO: "iris/stdpp" OPAM_PINS: "coq version 8.20.1 dune version 3.15.2"
OPAM_PINS: "coq version 8.13.1 git+https://gitlab.mpi-sws.org/$STDPP_REPO#$STDPP_REV" MAKE_TARGET: "dune"
except:
only: # The oldest version runs in MRs, without name mangling.
- triggers build-coq.8.19.2:
- schedules <<: *template
- api <<: *branches_and_mr
variables:
OPAM_PINS: "coq version 8.19.2"
# Nightly job with latest Coq beta branch trigger-stdpp.dev:
trigger-stdpp.dev-coq.8.14.dev:
<<: *template <<: *template
variables: variables:
STDPP_REPO: "iris/stdpp" STDPP_REPO: "iris/stdpp"
OPAM_PINS: "coq version 8.14.dev git+https://gitlab.mpi-sws.org/$STDPP_REPO#$STDPP_REV" OPAM_PINS: "coq version $NIGHTLY_COQ git+https://gitlab.mpi-sws.org/$STDPP_REPO#$STDPP_REV"
CI_COQCHK: "1" CI_COQCHK: "1"
except: except:
only: only:
......
This diff is collapsed.
...@@ -42,6 +42,9 @@ requests are easier to review, and will typically be merged more quickly ...@@ -42,6 +42,9 @@ requests are easier to review, and will typically be merged more quickly
(because it avoids blocking the whole merge request on a single (because it avoids blocking the whole merge request on a single
discussion). discussion).
Please follow the coding style laid out in our [style
guide](docs/style_guide.md).
## How to update the std++ dependency ## How to update the std++ dependency
* Do the change in std++, push it. * Do the change in std++, push it.
......
...@@ -3,6 +3,12 @@ all: Makefile.coq ...@@ -3,6 +3,12 @@ all: Makefile.coq
+@$(MAKE) -f Makefile.coq all +@$(MAKE) -f Makefile.coq all
.PHONY: all .PHONY: all
# Build with dune.
# This exists only for CI; you should just call `dune build` directly instead.
dune:
@dune build --display=short
.PHONY: dune
# Permit local customization # Permit local customization
-include Makefile.local -include Makefile.local
......
...@@ -4,18 +4,23 @@ NO_TEST:= ...@@ -4,18 +4,23 @@ NO_TEST:=
# use MAKE_REF=1 to generate new reference files # use MAKE_REF=1 to generate new reference files
MAKE_REF:= MAKE_REF:=
# Only test reference output on known versions of Coq, to avoid blocking
# Coq CI when they change the printing a little.
# Need to make this a lazy variable (`=` instead of `:=`) since COQ_VERSION is only set later.
COQ_REF=$(shell echo "$(COQ_VERSION)" | grep -E "^8\.(20)\." -q && echo 1)
# Run tests interleaved with main build. They have to be in the same target for this. # Run tests interleaved with main build. They have to be in the same target for this.
real-all: style $(if $(NO_TEST),,test) real-all: style $(if $(NO_TEST),,test)
style: $(VFILES) coq-lint.sh style: $(VFILES) coq-lint.sh
# Make sure everything imports the options, and all Instance/Argument/Hint are qualified. # Make sure everything imports the options, and some general linting.
$(SHOW)"COQLINT" $(SHOW)"COQLINT"
$(HIDE)for FILE in $(VFILES); do \ $(HIDE)for FILE in $(VFILES); do \
if ! fgrep -q 'From iris.prelude Require Import options.' "$$FILE"; then echo "ERROR: $$FILE does not import 'options'."; echo; exit 1; fi ; \ if ! grep -F -q 'From iris.prelude Require Import options.' "$$FILE"; then echo "ERROR: $$FILE does not import 'options'."; echo; exit 1; fi ; \
./coq-lint.sh "$$FILE" || exit 1; \ ./coq-lint.sh "$$FILE" || exit 1; \
done done
# Make sure main Iris does not import other Iris packages. # Make sure main Iris does not import other Iris packages.
$(HIDE)if egrep 'iris\.(heap_lang|deprecated|staging)' --include "*.v" -R iris; then echo "ERROR: Iris may not import modules from other Iris packages (see above for violations)."; echo; exit 1; fi $(HIDE)if grep -E 'iris\.(heap_lang|deprecated|unstable)' --include "*.v" -R iris; then echo "ERROR: Iris may not import modules from other Iris packages (see above for violations)."; echo; exit 1; fi
.PHONY: style .PHONY: style
# the test suite # the test suite
...@@ -26,8 +31,6 @@ test: $(TESTFILES:.v=.vo) ...@@ -26,8 +31,6 @@ test: $(TESTFILES:.v=.vo)
.PHONY: test .PHONY: test
COQ_TEST=$(COQTOP) $(COQDEBUG) -batch -test-mode COQ_TEST=$(COQTOP) $(COQDEBUG) -batch -test-mode
# Need to make this a lazy variable (`=` instead of `:=`) since COQ_VERSION is only set later.
COQ_MINOR_VERSION=$(shell echo "$(COQ_VERSION)" | egrep '^[0-9]+\.[0-9]+\b' -o)
tests/.coqdeps.d: $(TESTFILES) tests/.coqdeps.d: $(TESTFILES)
$(SHOW)'COQDEP TESTFILES' $(SHOW)'COQDEP TESTFILES'
...@@ -37,21 +40,22 @@ tests/.coqdeps.d: $(TESTFILES) ...@@ -37,21 +40,22 @@ tests/.coqdeps.d: $(TESTFILES)
# Main test script (comments out-of-line because macOS otherwise barfs?!?) # Main test script (comments out-of-line because macOS otherwise barfs?!?)
# - Determine reference file (`REF`). # - Determine reference file (`REF`).
# - Print user-visible status line. # - Print user-visible status line.
# - unset env vars that change Coq's output
# - Dump Coq output into a temporary file. # - Dump Coq output into a temporary file.
# - Run `sed -i` on that file in a way that works on macOS. # - Run `sed -i` on that file in a way that works on macOS.
# - Either compare the result with the reference file, or move it over the reference file. # - Either compare the result with the reference file, or move it over the reference file.
# - Cleanup, and mark as done for make. # - Cleanup, and mark as done for make.
$(TESTFILES:.v=.vo): %.vo: %.v $(if $(MAKE_REF),,%.ref) $(NORMALIZER) $(TESTFILES:.v=.vo): %.vo: %.v $(if $(MAKE_REF),,%.ref) $(NORMALIZER)
$(HIDE)if test -f $*".$(COQ_MINOR_VERSION).ref"; then \ $(HIDE)REF=$*".ref" && \
REF=$*".$(COQ_MINOR_VERSION).ref"; \ echo "COQTEST$(if $(COQ_REF),$(if $(MAKE_REF), [make ref],), [ref ignored]) $< (ref: $$REF)" && \
else \
REF=$*".ref"; \
fi && \
echo "COQTEST$(if $(MAKE_REF), [make ref],) $< (ref: $$REF)" && \
TMPFILE="$$(mktemp)" && \ TMPFILE="$$(mktemp)" && \
unset OCAMLRUNPARAM && \
$(TIMER) $(COQ_TEST) $(COQFLAGS) $(COQLIBS) -load-vernac-source $< > "$$TMPFILE" && \ $(TIMER) $(COQ_TEST) $(COQFLAGS) $(COQLIBS) -load-vernac-source $< > "$$TMPFILE" && \
sed -f $(NORMALIZER) "$$TMPFILE" > "$$TMPFILE".new && \ sed -E -f $(NORMALIZER) "$$TMPFILE" > "$$TMPFILE".new && \
mv "$$TMPFILE".new "$$TMPFILE" && \ mv "$$TMPFILE".new "$$TMPFILE" && \
$(if $(MAKE_REF),mv "$$TMPFILE" "$$REF",diff --strip-trailing-cr -u "$$REF" "$$TMPFILE") && \ $(if $(COQ_REF),\
$(if $(MAKE_REF),mv "$$TMPFILE" "$$REF",diff --strip-trailing-cr -u "$$REF" "$$TMPFILE"), \
true \
) && \
rm -f "$$TMPFILE" && \ rm -f "$$TMPFILE" && \
touch $@ touch $@
This file has [moved](docs/proof_mode.md).
# IRIS COQ DEVELOPMENT [[coqdoc]](https://plv.mpi-sws.org/coqdoc/iris/) # Iris Coq Development [[coqdoc]](https://plv.mpi-sws.org/coqdoc/iris/)
This is the Coq development of the [Iris Project](http://iris-project.org), This is the Coq development of the [Iris Project](http://iris-project.org),
which includes [MoSeL](http://iris-project.org/mosel/), a general proof mode which includes [MoSeL](http://iris-project.org/mosel/), a general proof mode
...@@ -30,13 +30,15 @@ Importing Iris has some side effects as the library sets some global options. ...@@ -30,13 +30,15 @@ Importing Iris has some side effects as the library sets some global options.
This version is known to compile with: This version is known to compile with:
- Coq 8.12.2 / 8.13.2 - Coq 8.19.2 / 8.20.1
- A development version of [std++](https://gitlab.mpi-sws.org/iris/stdpp) - A development version of [std++](https://gitlab.mpi-sws.org/iris/stdpp)
If you need to work with Coq 8.9 or Coq 8.10, you can use the Generally we always aim to support the last two stable Coq releases. Support for
[iris-3.3 branch](https://gitlab.mpi-sws.org/iris/iris/tree/iris-3.3). older versions will be dropped when it is convenient.
For a version compatible with Coq 8.11, check out the
[iris-3.4 branch](https://gitlab.mpi-sws.org/iris/iris/tree/iris-3.4). If you need to work with older versions of Coq, you can check out the
[tags](https://gitlab.mpi-sws.org/iris/iris/-/tags) for old Iris releases that
still support them.
### Working *with* Iris ### Working *with* Iris
...@@ -65,7 +67,7 @@ We do not guarantee backwards-compatibility, so upgrading Iris may break your ...@@ -65,7 +67,7 @@ We do not guarantee backwards-compatibility, so upgrading Iris may break your
Iris-using developments. If you want to be notified of breaking changes, please Iris-using developments. If you want to be notified of breaking changes, please
let us know your account name on the let us know your account name on the
[MPI-SWS GitLab](https://gitlab.mpi-sws.org/) so we can add you to the [MPI-SWS GitLab](https://gitlab.mpi-sws.org/) so we can add you to the
notification group. Note that this excludes the "staging" and "deprecated" notification group. Note that this excludes the "unstable" and "deprecated"
packages (see below). packages (see below).
#### Use of Iris in submitted artifacts #### Use of Iris in submitted artifacts
...@@ -124,7 +126,7 @@ modules in separate folders. ...@@ -124,7 +126,7 @@ modules in separate folders.
constructions within this language, e.g., parallel composition. constructions within this language, e.g., parallel composition.
For more examples of using Iris and heap_lang, have a look at the For more examples of using Iris and heap_lang, have a look at the
[Iris Examples](https://gitlab.mpi-sws.org/iris/examples). [Iris Examples](https://gitlab.mpi-sws.org/iris/examples).
* The [iris_staging](iris_staging) package contains libraries that are not yet * The [iris_unstable](iris_unstable) package contains libraries that are not yet
ready for inclusion in Iris proper. For each library, there is a corresponding ready for inclusion in Iris proper. For each library, there is a corresponding
"tracking issue" in the Iris issue tracker (also linked from the library "tracking issue" in the Iris issue tracker (also linked from the library
itself) which tracks the work that still needs to be done before moving the itself) which tracks the work that still needs to be done before moving the
...@@ -138,6 +140,9 @@ modules in separate folders. ...@@ -138,6 +140,9 @@ modules in separate folders.
infrastructure. These modules are not installed by `make install`, and should infrastructure. These modules are not installed by `make install`, and should
not be imported. not be imported.
Note that the unstable and deprecated packages are not released, so they only
exist in the development version of Iris.
## Case Studies ## Case Studies
The following is a (probably incomplete) list of case studies that use Iris, and The following is a (probably incomplete) list of case studies that use Iris, and
...@@ -160,6 +165,7 @@ that should be compatible with this version: ...@@ -160,6 +165,7 @@ that should be compatible with this version:
Getting along with Iris in Coq: Getting along with Iris in Coq:
* The coding style is documented in the [style guide](docs/style_guide.md).
* Iris proof patterns and conventions are documented in the * Iris proof patterns and conventions are documented in the
[proof guide](docs/proof_guide.md). [proof guide](docs/proof_guide.md).
* Various notions of equality and logical entailment in Iris and their Coq * Various notions of equality and logical entailment in Iris and their Coq
...@@ -172,10 +178,9 @@ Getting along with Iris in Coq: ...@@ -172,10 +178,9 @@ Getting along with Iris in Coq:
Contacting the developers: Contacting the developers:
* Discussion about the Iris Coq development happens on the mailing list * Discussion about the Iris Coq development happens in the [Iris
[iris-club@lists.mpi-sws.org](https://lists.mpi-sws.org/listinfo/iris-club) Chat](https://iris-project.org/chat.html). This is also the right place to ask
and in the [Iris Chat](https://iris-project.org/chat.html). This is also the questions.
right place to ask questions.
* If you want to report a bug, please use the * If you want to report a bug, please use the
[issue tracker](https://gitlab.mpi-sws.org/iris/iris/issues), which requires [issue tracker](https://gitlab.mpi-sws.org/iris/iris/issues), which requires
an MPI-SWS GitLab account. The [chat page](https://iris-project.org/chat.html) an MPI-SWS GitLab account. The [chat page](https://iris-project.org/chat.html)
......
...@@ -8,13 +8,20 @@ ...@@ -8,13 +8,20 @@
-Q iris/base_logic iris.base_logic -Q iris/base_logic iris.base_logic
-Q iris/program_logic iris.program_logic -Q iris/program_logic iris.program_logic
-Q iris_heap_lang iris.heap_lang -Q iris_heap_lang iris.heap_lang
-Q iris_staging iris.staging -Q iris_unstable iris.unstable
-Q iris_deprecated iris.deprecated -Q iris_deprecated iris.deprecated
# Custom flags (to be kept in sync with the dune file at the root of the repo).
# We sometimes want to locally override notation, and there is no good way to do that with scopes. # We sometimes want to locally override notation, and there is no good way to do that with scopes.
-arg -w -arg -notation-overridden -arg -w -arg -notation-overridden
# Cannot use non-canonical projections as it causes massive unification failures # Cannot use non-canonical projections as it causes massive unification failures
# (https://github.com/coq/coq/issues/6294). # (https://github.com/coq/coq/issues/6294).
-arg -w -arg -redundant-canonical-projection -arg -w -arg -redundant-canonical-projection
# Warning seems incorrect, see https://gitlab.mpi-sws.org/iris/stdpp/-/issues/216
-arg -w -arg -notation-incompatible-prefix
# We can't do this migration yet until we require Coq 9.0
-arg -w -arg -deprecated-from-Coq
-arg -w -arg -deprecated-dirpath-Coq
iris/prelude/options.v iris/prelude/options.v
iris/prelude/prelude.v iris/prelude/prelude.v
...@@ -47,12 +54,15 @@ iris/algebra/ufrac.v ...@@ -47,12 +54,15 @@ iris/algebra/ufrac.v
iris/algebra/reservation_map.v iris/algebra/reservation_map.v
iris/algebra/dyn_reservation_map.v iris/algebra/dyn_reservation_map.v
iris/algebra/max_prefix_list.v iris/algebra/max_prefix_list.v
iris/algebra/mra.v
iris/algebra/lib/excl_auth.v iris/algebra/lib/excl_auth.v
iris/algebra/lib/frac_auth.v iris/algebra/lib/frac_auth.v
iris/algebra/lib/ufrac_auth.v iris/algebra/lib/ufrac_auth.v
iris/algebra/lib/frac_agree.v iris/algebra/lib/dfrac_agree.v
iris/algebra/lib/gmap_view.v iris/algebra/lib/gmap_view.v
iris/algebra/lib/mono_nat.v iris/algebra/lib/mono_nat.v
iris/algebra/lib/mono_Z.v
iris/algebra/lib/mono_list.v
iris/algebra/lib/gset_bij.v iris/algebra/lib/gset_bij.v
iris/si_logic/siprop.v iris/si_logic/siprop.v
iris/si_logic/bi.v iris/si_logic/bi.v
...@@ -72,8 +82,10 @@ iris/bi/monpred.v ...@@ -72,8 +82,10 @@ iris/bi/monpred.v
iris/bi/embedding.v iris/bi/embedding.v
iris/bi/weakestpre.v iris/bi/weakestpre.v
iris/bi/telescopes.v iris/bi/telescopes.v
iris/bi/lib/cmra.v
iris/bi/lib/counterexamples.v iris/bi/lib/counterexamples.v
iris/bi/lib/fixpoint.v iris/bi/lib/fixpoint_mono.v
iris/bi/lib/fixpoint_banach.v
iris/bi/lib/fractional.v iris/bi/lib/fractional.v
iris/bi/lib/laterable.v iris/bi/lib/laterable.v
iris/bi/lib/atomic.v iris/bi/lib/atomic.v
...@@ -103,6 +115,8 @@ iris/base_logic/lib/ghost_var.v ...@@ -103,6 +115,8 @@ iris/base_logic/lib/ghost_var.v
iris/base_logic/lib/mono_nat.v iris/base_logic/lib/mono_nat.v
iris/base_logic/lib/gset_bij.v iris/base_logic/lib/gset_bij.v
iris/base_logic/lib/ghost_map.v iris/base_logic/lib/ghost_map.v
iris/base_logic/lib/later_credits.v
iris/base_logic/lib/token.v
iris/program_logic/adequacy.v iris/program_logic/adequacy.v
iris/program_logic/lifting.v iris/program_logic/lifting.v
iris/program_logic/weakestpre.v iris/program_logic/weakestpre.v
...@@ -130,13 +144,15 @@ iris/proofmode/sel_patterns.v ...@@ -130,13 +144,15 @@ iris/proofmode/sel_patterns.v
iris/proofmode/tactics.v iris/proofmode/tactics.v
iris/proofmode/notation.v iris/proofmode/notation.v
iris/proofmode/classes.v iris/proofmode/classes.v
iris/proofmode/classes_make.v
iris/proofmode/class_instances.v iris/proofmode/class_instances.v
iris/proofmode/class_instances_later.v iris/proofmode/class_instances_later.v
iris/proofmode/class_instances_updates.v iris/proofmode/class_instances_updates.v
iris/proofmode/class_instances_embedding.v iris/proofmode/class_instances_embedding.v
iris/proofmode/class_instances_plainly.v iris/proofmode/class_instances_plainly.v
iris/proofmode/class_instances_internal_eq.v iris/proofmode/class_instances_internal_eq.v
iris/proofmode/frame_instances.v iris/proofmode/class_instances_frame.v
iris/proofmode/class_instances_make.v
iris/proofmode/monpred.v iris/proofmode/monpred.v
iris/proofmode/modalities.v iris/proofmode/modalities.v
iris/proofmode/modality_instances.v iris/proofmode/modality_instances.v
...@@ -159,8 +175,10 @@ iris_heap_lang/lib/spawn.v ...@@ -159,8 +175,10 @@ iris_heap_lang/lib/spawn.v
iris_heap_lang/lib/par.v iris_heap_lang/lib/par.v
iris_heap_lang/lib/assert.v iris_heap_lang/lib/assert.v
iris_heap_lang/lib/lock.v iris_heap_lang/lib/lock.v
iris_heap_lang/lib/rw_lock.v
iris_heap_lang/lib/spin_lock.v iris_heap_lang/lib/spin_lock.v
iris_heap_lang/lib/ticket_lock.v iris_heap_lang/lib/ticket_lock.v
iris_heap_lang/lib/rw_spin_lock.v
iris_heap_lang/lib/nondet_bool.v iris_heap_lang/lib/nondet_bool.v
iris_heap_lang/lib/lazy_coin.v iris_heap_lang/lib/lazy_coin.v
iris_heap_lang/lib/clairvoyant_coin.v iris_heap_lang/lib/clairvoyant_coin.v
...@@ -170,13 +188,12 @@ iris_heap_lang/lib/increment.v ...@@ -170,13 +188,12 @@ iris_heap_lang/lib/increment.v
iris_heap_lang/lib/diverge.v iris_heap_lang/lib/diverge.v
iris_heap_lang/lib/arith.v iris_heap_lang/lib/arith.v
iris_heap_lang/lib/array.v iris_heap_lang/lib/array.v
iris_heap_lang/lib/logatom_lock.v
iris_staging/algebra/list.v iris_unstable/algebra/list.v
iris_staging/algebra/mono_list.v iris_unstable/base_logic/algebra.v
iris_staging/base_logic/algebra.v iris_unstable/base_logic/mono_list.v
iris_staging/base_logic/mono_list.v iris_unstable/heap_lang/interpreter.v
iris_staging/heap_lang/interpreter.v
iris_staging/algebra/monotone.v
iris_deprecated/base_logic/auth.v iris_deprecated/base_logic/auth.v
iris_deprecated/base_logic/sts.v iris_deprecated/base_logic/sts.v
......
__pycache__
build-times*
gitlab-extract
#!/usr/bin/env python3
import argparse, sys, pprint, itertools, subprocess
import requests
import parse_log
# read command-line arguments
parser = argparse.ArgumentParser(description='Export iris-coq build times to grafana')
parser.add_argument("-f", "--file",
dest="file", required=True,
help="Filename to get the data from.")
parser.add_argument("-c", "--commits",
dest="commits",
help="Restrict the graph to the given commits.")
parser.add_argument("-p", "--project",
dest="project", required=True,
help="Project name sent to the server.")
parser.add_argument("-b", "--branch",
dest="branch", required=True,
help="Branch name sent to the server.")
parser.add_argument("--config",
dest="config", required=True,
help="The config string.")
parser.add_argument("-s", "--server",
dest="server", required=True,
help="The server (URL) to send the data to.")
parser.add_argument("-u", "--user",
dest="user", required=True,
help="Username for HTTP auth.")
parser.add_argument("--password",
dest="password", required=True,
help="Password for HTTP auth.")
args = parser.parse_args()
pp = pprint.PrettyPrinter()
log_file = sys.stdin if args.file == "-" else open(args.file, "r")
results = parse_log.parse(log_file, parse_times = parse_log.PARSE_RAW)
if args.commits:
commits = set(parse_log.parse_git_commits(args.commits))
results = filter(lambda r: r.commit in commits, results)
results = list(results)
for datapoint in results:
times = '\n'.join(datapoint.times)
commit = datapoint.commit
print("Sending {}...".format(commit), end='')
date = subprocess.check_output(['git', 'show', commit, '-s', '--pretty=%cI']).strip().decode('UTF-8')
headers = {'X-Project': args.project, 'X-Branch': args.branch, 'X-Commit': commit, 'X-Config': args.config, 'X-Date': date}
r = requests.post(args.server+"/build_times", data=times, headers=headers, auth=(args.user, args.password))
print(" {}".format(r.text.strip()))
r.raise_for_status()
#!/usr/bin/env python3
import argparse, pprint, sys, glob, zipfile, subprocess
import requests
import parse_log
def last(it):
r = None
for i in it:
r = i
return r
def first(it):
for i in it:
return i
return None
def req(path):
url = '%s/api/v3/%s' % (args.server, path)
r = requests.get(url, headers={'PRIVATE-TOKEN': args.private_token})
r.raise_for_status()
return r
# read command-line arguments
parser = argparse.ArgumentParser(description='Extract iris-coq build logs from GitLab')
parser.add_argument("-t", "--private-token",
dest="private_token", required=True,
help="The private token used to authenticate access.")
parser.add_argument("-s", "--server",
dest="server", default="https://gitlab.mpi-sws.org/",
help="The GitLab server to contact.")
parser.add_argument("-p", "--project",
dest="project", default="FP/iris-coq",
help="The name of the project on GitLab.")
parser.add_argument("-f", "--file",
dest="file", required=True,
help="Filename to store the load in.")
parser.add_argument("-c", "--commits",
dest="commits",
help="The commits to fetch. Default is everything since the most recent entry in the log file.")
parser.add_argument("-a", "--artifacts",
dest="artifacts",
help="Location of the artifacts (following GitLab's folder structure). If not given (which should be the common case), the artifacts will be downloaded from GitLab.")
parser.add_argument("-b", "--blacklist-branch",
dest="blacklist_branch",
help="Skip the commit if it is contained in the given branch.")
args = parser.parse_args()
log_file = sys.stdout if args.file == "-" else open(args.file, "a")
# determine commit, if missing
if args.commits is None:
if args.file == "-":
raise Exception("If you do not give explicit commits, you have to give a logfile so that we can determine the missing commits.")
last_result = last(parse_log.parse(open(args.file, "r"), parse_times = parse_log.PARSE_NOT))
args.commits = "{}..origin/master".format(last_result.commit)
projects = req("projects?per_page=512")
project = first(filter(lambda p: p['path_with_namespace'] == args.project, projects.json()))
if project is None:
sys.stderr.write("Project not found.\n")
sys.exit(1)
BREAK = False
for commit in parse_log.parse_git_commits(args.commits):
if BREAK:
break
# test to skip the commit
if args.blacklist_branch is not None:
branches = subprocess.check_output(["git", "branch", "-r", "--contains", commit]).decode("utf-8")
if args.blacklist_branch in map(lambda x: x.strip(), branches.split('\n')):
continue
# Find out more about the commit
print("Fetching {}...".format(commit), end='')
commit_data = req("/projects/{}/repository/commits/{}".format(project['id'], commit))
if commit_data.status_code != 200:
raise Exception("Commit not found?")
builds = req("/projects/{}/repository/commits/{}/builds".format(project['id'], commit))
if builds.status_code != 200:
raise Exception("Build not found?")
# iterate over builds by decreasing ID, and look for the artifact
found_build = False
for build in builds.json():
if build['status'] in ('created', 'pending', 'running'):
# build still not yet done, don't fetch this or any later commit
BREAK = True
print(" build still in progress, aborting")
break
if build['status'] != 'success':
# build failed or cancelled, skip to next
continue
# now fetch the build times
if args.artifacts:
artifact_zip = glob.glob('{}/*/{}/{}/artifacts.zip'.format(args.artifacts, project['id'], build['id']))
if not artifact_zip:
# no artifact at this build, try another one
continue
assert len(artifact_zip) == 1, "Found too many artifacts"
artifact_zip = artifact_zip[0]
with zipfile.ZipFile(artifact_zip) as artifact:
with artifact.open('build-time.txt') as build_times:
# Output into log file
log_file.write("# {}\n".format(commit))
log_file.write(build_times.read().decode('UTF-8'))
log_file.flush()
else:
build_times = requests.get("{}/builds/{}/artifacts/raw/build-time.txt".format(project['web_url'], build['id']))
if build_times.status_code != 200:
# no artifact at this build, try another one
continue
# Output in the log file format
log_file.write("# {}\n".format(commit))
log_file.write(build_times.text)
log_file.flush()
# don't fetch another build
found_build = True
print(" success")
break
if not found_build and not BREAK:
print(" found no succeessful build")
import re, subprocess
class Result:
def __init__(self, commit, times):
self.commit = commit
self.times = times
PARSE_NOT = 0
PARSE_RAW = 1
PARSE_FULL = 2
def parse(file, parse_times = PARSE_FULL):
'''[file] should be a file-like object, an iterator over the lines.
yields a list of Result objects.'''
commit_re = re.compile("^# ([a-z0-9]+)$")
time_re = re.compile("^([a-zA-Z0-9_/-]+) \((real|user): ([0-9.]+).* mem: ([0-9]+) ko\)$")
commit = None
times = None
for line in file:
line = line.strip()
# next commit?
m = commit_re.match(line)
if m is not None:
# previous commit, if any, is done now
if commit is not None:
yield Result(commit, times)
# start recording next commit
commit = m.group(1)
if parse_times != PARSE_NOT:
times = [] if parse_times == PARSE_RAW else {} # reset the recorded times
continue
# next file time?
m = time_re.match(line)
if m is not None:
if times is not None:
if parse_times == PARSE_RAW:
times.append(line)
else:
name = m.group(1)
time = float(m.group(2))
times[name] = time
continue
# nothing else we know about, ignore
print("Ignoring line",line,"(in commit {})".format(commit))
# end of file. previous commit, if any, is done now.
if commit is not None:
yield Result(commit, times)
def parse_git_commits(commits):
'''Returns an iterable of SHA1s'''
if commits.find('..') >= 0:
# a range of commits
commits = subprocess.check_output(["git", "rev-list", commits])
else:
# a single commit
commits = subprocess.check_output(["git", "rev-parse", commits])
output = commits.decode("utf-8").strip()
if not output: # empty output
return []
return reversed(output.split('\n'))
#!/usr/bin/env python3
import argparse, sys, pprint, itertools
import matplotlib.pyplot as plt
import parse_log
markers = itertools.cycle([(3, 0), (3, 0, 180), (4, 0), (4, 0, 45), (8, 0)])
# read command-line arguments
parser = argparse.ArgumentParser(description='Visualize iris-coq build times')
parser.add_argument("-f", "--file",
dest="file", required=True,
help="Filename to get the data from.")
parser.add_argument("-t", "--timings", nargs='+',
dest="timings",
help="The names of the Coq files (with or without the extension) whose timings should be extracted")
parser.add_argument("-c", "--commits",
dest="commits",
help="Restrict the graph to the given commits.")
args = parser.parse_args()
pp = pprint.PrettyPrinter()
log_file = sys.stdin if args.file == "-" else open(args.file, "r")
results = parse_log.parse(log_file, parse_times = parse_log.PARSE_FULL)
if args.commits:
commits = set(parse_log.parse_git_commits(args.commits))
results = filter(lambda r: r.commit in commits, results)
results = list(results)
timings = list(map(lambda t: t[:-2] if t.endswith(".v") else t, args.timings))
for timing in timings:
plt.plot(list(map(lambda r: r.times.get(timing), results)), marker=next(markers), markersize=8)
plt.legend(timings, loc = 'upper left', bbox_to_anchor=(1.05, 1.0))
plt.xticks(range(len(results)), list(map(lambda r: r.commit[:7], results)), rotation=70)
plt.subplots_adjust(bottom=0.2, right=0.7) # more space for the commit labels and legend
plt.xlabel('Commit')
plt.ylabel('Time (s)')
plt.title('Time to compile files')
plt.grid(True)
plt.show()
...@@ -9,8 +9,12 @@ version: "dev" ...@@ -9,8 +9,12 @@ version: "dev"
synopsis: "The canonical example language for Iris" synopsis: "The canonical example language for Iris"
description: """ description: """
This package provides the iris.heap_lang Coq module. This package defines HeapLang, a concurrent lambda calculus with references, and
uses Iris to build a program logic for HeapLang programs.
""" """
tags: [
"logpath:iris.heap_lang"
]
depends: [ depends: [
"coq-iris" {= version} "coq-iris" {= version}
......
...@@ -18,5 +18,5 @@ depends: [ ...@@ -18,5 +18,5 @@ depends: [
"coq-iris-heap-lang" {= version} "coq-iris-heap-lang" {= version}
] ]
build: ["./make-package" "iris_staging" "-j%{jobs}%"] build: ["./make-package" "iris_unstable" "-j%{jobs}%"]
install: ["./make-package" "iris_staging" "install"] install: ["./make-package" "iris_unstable" "install"]
...@@ -9,13 +9,26 @@ version: "dev" ...@@ -9,13 +9,26 @@ version: "dev"
synopsis: "A Higher-Order Concurrent Separation Logic Framework with support for interactive proofs" synopsis: "A Higher-Order Concurrent Separation Logic Framework with support for interactive proofs"
description: """ description: """
This package provides the following Coq modules: Iris is a framework for reasoning about the safety of concurrent programs using
iris.prelude, iris.algebra, iris.si_logic, iris.bi, iris.proofmode, iris.base_logic, iris.program_logic. concurrent separation logic. It can be used to develop a program logic, for
defining logical relations, and for reasoning about type systems, among other
applications. This package includes the base logic, Iris Proof Mode (IPM) /
MoSeL, and a general language-independent program logic; see coq-iris-heap-lang
for an instantiation of the program logic to a particular programming language.
""" """
tags: [
"logpath:iris.prelude"
"logpath:iris.algebra"
"logpath:iris.si_logic"
"logpath:iris.bi"
"logpath:iris.proofmode"
"logpath:iris.base_logic"
"logpath:iris.program_logic"
]
depends: [ depends: [
"coq" { (>= "8.12" & < "8.15~") | (= "dev") } "coq" { (>= "8.19" & < "9.1~") | (= "dev") }
"coq-stdpp" { (= "dev.2021-09-27.0.7d5f3593") | (= "dev") } "coq-stdpp" { (= "dev.2025-02-26.0.d2e8771d") | (= "dev") }
] ]
build: ["./make-package" "iris" "-j%{jobs}%"] build: ["./make-package" "iris" "-j%{jobs}%"]
......
...@@ -4,7 +4,7 @@ set -e ...@@ -4,7 +4,7 @@ set -e
FILE="$1" FILE="$1"
if egrep -n '^\s*((Existing\s+|Program\s+)Instance|Arguments|Remove|Hint\s+(Extern|Constructors|Resolve|Immediate|Mode|Opaque|Transparent|Unfold)|(Open|Close)\s+Scope|Opaque|Transparent)\b' "$FILE"; then if grep -E -n '^\s*((Existing\s+|Program\s+|Declare\s+)?Instance|Arguments|Remove|Hint\s+(Extern|Constructors|Resolve|Immediate|Mode|Opaque|Transparent|Unfold|Rewrite)|(Open|Close)\s+Scope|Opaque|Transparent|Typeclasses (Opaque|Transparent))\b' "$FILE"; then
echo "ERROR: $FILE contains 'Instance'/'Arguments'/'Hint' or another side-effect without locality (see above)." echo "ERROR: $FILE contains 'Instance'/'Arguments'/'Hint' or another side-effect without locality (see above)."
echo "Please add 'Global' or 'Local' as appropriate." echo "Please add 'Global' or 'Local' as appropriate."
echo echo
......
Support for the dune build system
=================================
**NOTE:** in case of problem with the dune build, you can ask @lepigre or
@Blaisorblade for help.
The library can be built using dune by running `dune build`. Note that `dune`
needs to be installed separately with `opam install dune`, as it is currently
not part of the dependencies of the project.
Useful links:
- [dune documentation](https://dune.readthedocs.io)
- [coq zulip channel](https://coq.zulipchat.com/#narrow/stream/240550-Dune-devs-.26-users)
Editor support
--------------
Good dune support in editors is lacking at the moment, but there are tricks you
can play to make it work.
One option is to configure your editor to invoke the `dune coq top` command
instead of `coqtop`, but that is not easy to configure.
Another option is to change the `_CoqProject` file to something like:
```
-Q iris iris
-Q _build/default/iris iris
-Q iris_heap_lang iris.heap_lang
-Q _build/default/iris_heap_lang iris.heap_lang
-Q iris_unstable iris.unstable
-Q _build/default/iris_unstable iris.unstable
-Q iris_deprecated iris.deprecated
-Q _build/default/iris_deprecated iris.deprecated
```
Note that this includes two bindings for each logical path: a binding to a
folder in the source tree (where editors will find the `.v` files), and a
binding to the same folder under `_build/default` (where editors will find
the corresponding `.vo` files). The binding for a source folder must come
before the binding for the corresponding build folder, so that editors know
to jump to source files in the source tree (and not their read-only copy in
the build folder).
If you do this, you still need to invoke `dune` manually to make sure that the
dependencies of the file you are stepping through are up-to-date. To build a
single file, you can do, e.g., `dune build iris/prelude/options.vo`. To build
only the `iris` folder, you can do `dune build iris`.
This diff is collapsed.