Skip to content
Snippets Groups Projects

Fix the examples / solution files for latest Iris.

Merged Rodolphe Lepigre requested to merge latest_iris into master
3 unresolved threads

We fix the tutorial so that it works with the development version of Iris.

Before merging, there is a small issue that should be looked into (see the FIXMEs): a previously working instance of wp_apply has been replaced (there are several occurrences of that) by a wp_bind (_ ||| _)%E followed by an iApply. Is that an Iris bug?

Fixes #2 (closed)

Edited by Ralf Jung

Merge request reports

Approval is optional

Merged by Ralf JungRalf Jung 6 years ago (Feb 13, 2019 8:17am UTC)

Merge details

Pipeline #14570 failed

Pipeline failed for 53a92a4e on master

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
12 12 - Coq 8.6.1 / 8.7.0 / 8.7.1
13 13 - Ssreflect 1.6.4
14 14 - Coq-std++ 1.1
15 - Iris 3.1
15 - Iris (latest version)
  • Ralf Jung
  • Seems to me we should just state wp_par with value lambdas then?

  • Isn't that par_spec?

    Edited by Robbert Krebbers
  • No, that doesn't have the thunking.

  • I'm not sure what's the use of that. It will look pretty ugly since we do not have a notation for ||| with value lambdas (and I'm not at all convinced we would want such a notation).

    For all practical matters, wouldn't it be better to just use par_spec?

    Edited by Robbert Krebbers
  • It would be nice if we could avoid having to do wp_lam. We didn't write a thunk, after all.

  • There is a thunk implicitly, so I don't mind if the user has to be aware of that.

    Anyway, what are the alternatives:

    • Have a lemma for par (LamV <> e) (LamV <> e).
    • Make a notation for par (LamV <> e) (LamV <> e) and state the lemma in terms of that notation.

    None of these appear appealing to me.

    Edited by Robbert Krebbers
  • Have a lemma for par (LamV <> e) (LamV <> e).

    That's what I am proposing. I think we can write (λ _, e)%V for (LamV <> e).

  • Not a huge fan of that.

    By the way, there is a worse problem when defining things like while loops. There you would hope to have the usual spec:

    WP if e1 then (e2; while e1 do e2) else #() {{ Φ }} -∗
    WP while e1 do e2 {{ Φ }}}

    But this only works in case while is a version with lambda-values for the thunks. If you would write it analogous to the way you propose for par, you end up with:

    WP if e1 then (e2; while (λ <>, e1)%V (λ <>, e2)%V) else #() {{ Φ }} -∗
    WP while (λ <>, e1)%V (λ <>, e2)%V {{ Φ }}}

    Which is rather ugly. If you write the lemma without thunking, you end up with:

    WP if v1 #() then (v2 #(); while v1 v2) else #() {{ Φ }} -∗
    WP while v1 v2 {{ Φ }}}

    Which is not great either...

  • Not a huge fan of that.

    I don't understand why. I also don't understand why you bring up while.

    par (λ _, e1)%V (λ _, e2)%V is the shape that the expressions will always have in the moment the user can apply wp_par. So it makes perfect sense to state the lemma that way. Is the lack of notation your only concern?

  • I don't understand why.

    Because the spec using value lambdas does not use the notation.

    I also don't understand why you bring up while.

    Because there we have exactly the same issues:

    • while takes thunks as arguments, like par.
    • the notation for while will be stated using thunks, like par.
    • these thunks have to be turned into value lambdas.
    • stating the spec using value lambdas is ugly, which is the same problem we are having here for par.
    Edited by Robbert Krebbers
  • Because the spec using value lambdas does not use the notation.

    I agree the spec is less readable than it should, but I think that's worth the trade-off for producing more readable goals after being applied. This is weighing displaying the proof state right after iApply wp_par in any user of this spec against readability of the spec.

    Actually it's not even a trade-off, because if you don't like wp_par you can use par_spec in your proofs. But I don't understand why you want to force everyone else to have an uglier proof state.

  • Just to get things clear: By saying that I'm not a huge fan of wp_par the way you would like to state it, I'm not necessarily suggesting to remove it, I'm mostly wondering if we can do better and pointing out where similar issues appear (c.f. the while example) so that we can come up with a uniform solution.

  • Also, it would be good if we have some way of making clear to users when to use which specs. For a novice user it's not really clear when to use neither wp_par nor par_spec. (And not just notice users, which is witnessed by the fact this issue exists in the first place).

    Edited by Robbert Krebbers
  • I'm mostly wondering if we can do better and pointing out where similar issues appear (c.f. the while example) so that we can come up with a uniform solution.

    Ah I see. Makes sense.

    I don't think I can come up with anything better than redundant notation, though.

  • I made a proposal at https://gitlab.mpi-sws.org/FP/iris-coq/merge_requests/210, to at least move us a bit into the right direction (and to unblock this MR).

  • mentioned in merge request iris!210 (merged)

  • Rodolphe Lepigre added 2 commits

    added 2 commits

    Compare with previous version

  • Rodolphe Lepigre added 9 commits

    added 9 commits

    Compare with previous version

  • I think we are ready for merging, up to version information, but I don't really know what version number to point to. What I known is that everything works fine with dev.2019-01-22.0.b85a3cfc. What should I do @jung?

  • @lepigre then please point it to that specific version in the opam file. It's as good as any...

  • 28 opam repo add iris-dev https://gitlab.mpi-sws.org/FP/opam-dev.git
    27 29
    28 Then you can do `opam install coq-iris.3.1.0`.
    30 Then you can do `opam install coq-iris`.
    29 31
    30 32 ## Installing Iris from source
    31 33
    32 34 If you are unable to use opam, you can also build Iris from source. For this,
    33 make sure to `git checkout` the correct versions, and run `make; make install`
    34 for all of:
    35 run `make; make install` for all of:
    35 36
    36 37 * ssreflect: <https://github.com/math-comp/math-comp/archive/mathcomp-1.7.0.tar.gz>
    37 38 (`cd mathcomp/ssreflect` to only compile and install what is needed)
    38 39 * std++: <https://gitlab.mpi-sws.org/iris/stdpp/repository/coq-stdpp-1.1.0/archive.tar.gz>
    39 40 * Iris: <https://gitlab.mpi-sws.org/FP/iris-coq/repository/iris-3.1.0/archive.tar.gz>
  • added 1 commit

    • 7e44373e - Compatible [iris-coq] version in the [opam] file.

    Compare with previous version

  • Ralf Jung mentioned in commit 53a92a4e

    mentioned in commit 53a92a4e

  • merged

  • Thanks!

  • Ralf Jung
    Ralf Jung @jung started a thread on the diff
  • 8 8
    9 9 clean: Makefile.coq
    10 10 +@make -f Makefile.coq clean
    11 find theories $$(test -d tests && echo tests) \( -name "*.d" -o -name "*.vo" -o -name "*.aux" -o -name "*.cache" -o -name "*.glob" -o -name "*.vio" \) -print -delete
    • Oh, seems I missed this change. I reverted it. The goal is to keep the Makefile exactly the same across all our projects. That makes it much easier to make sure all projects got the latest version -- even if it means that some projects carry directives they do not need.

    • The reason why I removed it is that it makes make clean fail on this project. Neither theories nor tests exist in this repository, so find just fails.

    • Oh, good point. Seems like I will have to make our generic Makefile even more generic...

    • Why not just use find . ...?

    • I have local opam switches in these directories, and find would go and delete files in them.

    • Please register or sign in to reply
  • Ralf Jung mentioned in merge request !3 (merged)

    mentioned in merge request !3 (merged)

  • Please register or sign in to reply
    Loading