Skip to content
Snippets Groups Projects
Commit e63c2a5c authored by Jonas Kastberg's avatar Jonas Kastberg
Browse files

Referenced computation service example

parent abfbf9c4
No related branches found
No related tags found
No related merge requests found
Pipeline #34489 passed
...@@ -15,7 +15,7 @@ contains an overview of the files in that directory. ...@@ -15,7 +15,7 @@ contains an overview of the files in that directory.
Coq and the paper. Coq and the paper.
- The typing rule for branching (`ltyped_branch`) is written as a function - The typing rule for branching (`ltyped_branch`) is written as a function
instead of an n-ary rule with multiple premises. instead of an n-ary rule with multiple premises.
- The disjunction of the compute client list invariant is encoded using a boolean - The disjunction of the compute client invariant is encoded using a boolean
flag, as it makes mechanisation easier. flag, as it makes mechanisation easier.
- The mechanisation employs a typing judgement for values (`ltyped_val`), - The mechanisation employs a typing judgement for values (`ltyped_val`),
for technical reasons. More details on this is found in for technical reasons. More details on this is found in
...@@ -23,6 +23,10 @@ contains an overview of the files in that directory. ...@@ -23,6 +23,10 @@ contains an overview of the files in that directory.
# Examples # Examples
- The compute service example in Section 3 can be found in
[theories/logrel/examples/compute_service.v](../theories/logrel/examples/compute_service.v)
The program recursively receive computation requests, which it computes and
then send back. It is entirely type checked with the rules of the type system
- The parallel receive example in Section 4 can be found in - The parallel receive example in Section 4 can be found in
[theories/logrel/examples/par_recv.v](../theories/logrel/examples/par_recv.v): [theories/logrel/examples/par_recv.v](../theories/logrel/examples/par_recv.v):
This program performs two "racy" parallel receives on the same channel from This program performs two "racy" parallel receives on the same channel from
...@@ -36,3 +40,4 @@ contains an overview of the files in that directory. ...@@ -36,3 +40,4 @@ contains an overview of the files in that directory.
[theories/logrel/examples/compute_service.v](../theories/logrel/examples/compute_service.v). [theories/logrel/examples/compute_service.v](../theories/logrel/examples/compute_service.v).
The definition of the list type and the weakest precondition for `llength` The definition of the list type and the weakest precondition for `llength`
can be found in [theories/logrel/lib/list.v](../theories/logrel/lib/list.v) can be found in [theories/logrel/lib/list.v](../theories/logrel/lib/list.v)
It is type checked using a manual typing proof.
...@@ -4,7 +4,8 @@ ...@@ -4,7 +4,8 @@
stop : end } stop : end }
It recursively receives computations, computes them, and then It recursively receives computations, computes them, and then
sends back the results. *) sends back the results.
The example is type checked using only the rules of the type system. *)
From iris.heap_lang Require Import metatheory. From iris.heap_lang Require Import metatheory.
From actris.channel Require Import proofmode. From actris.channel Require Import proofmode.
From actris.logrel Require Import session_typing_rules. From actris.logrel Require Import session_typing_rules.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment