Skip to content

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
co-dan committed Jun 24, 2024
1 parent 5b95d20 commit 0a1c177
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
19 changes: 18 additions & 1 deletion theories/effects/delim.v
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
(** * Representation of delimited continuations *)
(** * Representation of delimited continuations
This representation is inspired by the abstract machine semantics for
the CPS hierarchy, and is designed with manipualtion of
meta-continuations in mind.
We consider shift/reset, appcont operations, as well as the explicit
"pop" operation. The "state" for delimited continuations is a
meta-continuation: a stack of continuations corresponding to different
delimiters. Every time we do "reset" we push the current continuation
onto the stack, thus making the contiuation outside "reset" not
visible to the operations inside it. The "shift" operation behaves
similarly to call/cc by capturing the current continuation (which was
already delimited by reset). Finally, when we exit the scope of reset,
we need to restore the previous continuation which was pushed onto the
stack. For this, we explicitly use the "pop" operation.
*)
From gitrees Require Import prelude gitree.
From iris.algebra Require Import list.

Expand Down
1 change: 1 addition & 0 deletions theories/examples/delim_lang/logpred.v
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
(** Logical predicate for safety *)
From gitrees Require Import gitree lang_generic hom.
From gitrees.effects Require Import delim.
From gitrees.examples.delim_lang Require Import lang interp typing hom.
Expand Down
1 change: 1 addition & 0 deletions theories/examples/delim_lang/logrel.v
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
(** Logical relation for adequacy wrt the machine semantics *)
From gitrees Require Import gitree lang_generic hom.
From gitrees.effects Require Import delim.
From gitrees.examples.delim_lang Require Import lang interp typing hom.
Expand Down

0 comments on commit 0a1c177

Please sign in to comment.