From 7797a3cd0993dbda49306c15b4bdd78ace71241c Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Fri, 22 Mar 2024 10:06:47 +0100 Subject: [PATCH 1/5] Updated description of gatekeeper protocol --- schemas/gatekeeper.prs | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/schemas/gatekeeper.prs b/schemas/gatekeeper.prs index 656ed12..9ba662c 100644 --- a/schemas/gatekeeper.prs +++ b/schemas/gatekeeper.prs @@ -13,8 +13,37 @@ Step = < @stepType symbol [@detail any]> . # --------------------------------------------------------------------------- # Protocol at dataspaces *associated* with gatekeeper entities -# Assertion. Gatekeeper will compute an appropriate PathStep from `description` pointing at -# `target`, and will respond with a `Bound` to `observer` (if supplied). +# ## Handling `Resolve` requests +# +# When the gatekeeper entity receives a `Resolve` assertion (call it R1), it +# +# 1. asserts a `Resolve` (call it R2) into its associated dataspace that +# is the same as R1 except it has a different `observer`; and +# +# 2. observes a `Bind` with `description` matching the `step` of R1/R2 +# according to `stepType` (e.g. treatment of SturdyStepType is not the +# same as treatment of NoiseStepType). +# +# Normally, an appropriate `Bind` is expected to exist. If the gatekeeper +# sees the `Bind` first, it takes the `target` from it and does whatever +# `stepType` mandates before replying to R1's observer. +# +# However, if a `Resolved` is asserted to R2's observer before a `Bind` +# appears, that resolution is relayed on to R1's observer directly, be it +# positive or negative, and the gatekeeper stops waiting for a `Bind`. +# +# This way, entities can keep an eye out for `Resolve` requests that will +# never complete, and answer `Rejected` to them even when no matching +# `Bind` exists. Entities could also use `Resolve` requests to synthesize a +# `Bind` in a "just-in-time" fashion. +# +# ## General treatment of `Bind` assertions +# +# When the gatekeeper sees a `Bind`, independently of any potential +# `Resolve` requests, it computes an appropriate PathStep from +# `description` pointing at `target`, and responds with a `Bound` to +# `observer` (if supplied). +# Bind = . Description = < @stepType symbol [@detail any]> . BindObserver = @present #:Bound / @absent #f . From bf0d47f1b7a6227e4f3ab5c961e828996f804fcb Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Thu, 28 Mar 2024 15:17:28 +0100 Subject: [PATCH 2/5] Repair noise protocol --- schema-bundle.bin | 4 ++-- schemas/noise.prs | 23 ++++++++++++++++++++--- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/schema-bundle.bin b/schema-bundle.bin index e9d9294..d46a413 100644 --- a/schema-bundle.bin +++ b/schema-bundle.bin @@ -7,8 +7,8 @@ QueryValue ByteString„„µ±absent“³lit€„„„„³ HttpListener“³rec“³lit³ http-listener„“³tupleµ“³named³port“³atom³ SignedInteger„„„„„³ HttpResponse“³orµµ±status“³rec“³lit³status„“³tupleµ“³named³code“³atom³ SignedInteger„„“³named³message“³atom³String„„„„„„µ±header“³rec“³lit³header„“³tupleµ“³named³name“³atom³Symbol„„“³named³value“³atom³String„„„„„„µ±chunk“³rec“³lit³chunk„“³tupleµ“³named³chunk“³refµ„³Chunk„„„„„„µ±done“³rec“³lit³done„“³tupleµ“³named³chunk“³refµ„³Chunk„„„„„„„„³ MethodPattern“³orµµ±any“³lit€„„µ±specific“³atom³Symbol„„„„³PathPatternElement“³orµµ±label“³atom³String„„µ±wildcard“³lit³_„„µ±rest“³lit³...„„„„„³ embeddedType€„„µ³noise„“³schema·³version°³ definitions·³Packet“³orµµ±complete“³atom³ ByteString„„µ± fragmented“³seqof“³atom³ -ByteString„„„„„³ NoiseSpec“³andµ“³dict·³key“³named³key“³atom³ -ByteString„„³service“³named³service“³refµ„³ServiceSelector„„„„“³named³protocol“³refµ„³ NoiseProtocol„„“³named³ preSharedKeys“³refµ„³NoisePreSharedKeys„„„„³ NoiseProtocol“³orµµ±present“³dict·³protocol“³named³protocol“³atom³String„„„„„µ±invalid“³dict·³protocol“³named³protocol³any„„„„µ±absent“³dict·„„„„„³ NoiseStepType“³lit³noise„³SecretKeyField“³orµµ±present“³dict·³ secretKey“³named³ secretKey“³atom³ +ByteString„„„„„³ Initiator“³rec“³lit³ initiator„“³tupleµ“³named³initiatorSession“³embedded“³refµ„³Packet„„„„„„³ NoiseSpec“³andµ“³dict·³key“³named³key“³atom³ +ByteString„„³service“³named³service“³refµ„³ServiceSelector„„„„“³named³protocol“³refµ„³ NoiseProtocol„„“³named³ preSharedKeys“³refµ„³NoisePreSharedKeys„„„„³ SessionItem“³orµµ± Initiator“³refµ„³ Initiator„„µ±Packet“³refµ„³Packet„„„„³ NoiseProtocol“³orµµ±present“³dict·³protocol“³named³protocol“³atom³String„„„„„µ±invalid“³dict·³protocol“³named³protocol³any„„„„µ±absent“³dict·„„„„„³ NoiseStepType“³lit³noise„³SecretKeyField“³orµµ±present“³dict·³ secretKey“³named³ secretKey“³atom³ ByteString„„„„„µ±invalid“³dict·³ secretKey“³named³ secretKey³any„„„„µ±absent“³dict·„„„„„³DefaultProtocol“³lit±!Noise_NK_25519_ChaChaPoly_BLAKE2s„³NoiseStepDetail“³refµ„³ServiceSelector„³ServiceSelector³any³NoiseServiceSpec“³andµ“³named³base“³refµ„³ NoiseSpec„„“³named³ secretKey“³refµ„³SecretKeyField„„„„³NoisePreSharedKeys“³orµµ±present“³dict·³ preSharedKeys“³named³ preSharedKeys“³seqof“³atom³ ByteString„„„„„„µ±invalid“³dict·³ preSharedKeys“³named³ preSharedKeys³any„„„„µ±absent“³dict·„„„„„³NoisePathStepDetail“³refµ„³ NoiseSpec„³NoiseDescriptionDetail“³refµ„³NoiseServiceSpec„„³ embeddedType€„„µ³timer„“³schema·³version°³ definitions·³SetTimer“³rec“³lit³ set-timer„“³tupleµ“³named³label³any„“³named³seconds“³atom³Double„„“³named³kind“³refµ„³ TimerKind„„„„„³ LaterThan“³rec“³lit³ later-than„“³tupleµ“³named³seconds“³atom³Double„„„„„³ TimerKind“³orµµ±relative“³lit³relative„„µ±absolute“³lit³absolute„„µ±clear“³lit³clear„„„„³ TimerExpired“³rec“³lit³ timer-expired„“³tupleµ“³named³label³any„“³named³seconds“³atom³Double„„„„„„³ embeddedType€„„µ³trace„“³schema·³version°³ definitions·³Oid³any³Name“³orµµ± anonymous“³rec“³lit³ anonymous„“³tupleµ„„„„µ±named“³rec“³lit³named„“³tupleµ“³named³name³any„„„„„„„³Target“³rec“³lit³entity„“³tupleµ“³named³actor“³refµ„³ActorId„„“³named³facet“³refµ„³FacetId„„“³named³oid“³refµ„³Oid„„„„„³TaskId³any³TurnId³any³ActorId³any³FacetId³any³ TurnCause“³orµµ±turn“³rec“³lit³ caused-by„“³tupleµ“³named³id“³refµ„³TurnId„„„„„„µ±cleanup“³rec“³lit³cleanup„“³tupleµ„„„„µ±linkedTaskRelease“³rec“³lit³linked-task-release„“³tupleµ“³named³id“³refµ„³TaskId„„“³named³reason“³refµ„³LinkedTaskReleaseReason„„„„„„µ±periodicActivation“³rec“³lit³periodic-activation„“³tupleµ“³named³period“³atom³Double„„„„„„µ±delay“³rec“³lit³delay„“³tupleµ“³named³ causingTurn“³refµ„³TurnId„„“³named³amount“³atom³Double„„„„„„µ±external“³rec“³lit³external„“³tupleµ“³named³ description³any„„„„„„„³ TurnEvent“³orµµ±assert“³rec“³lit³assert„“³tupleµ“³named³ assertion“³refµ„³AssertionDescription„„“³named³handle“³refµ³protocol„³Handle„„„„„„µ±retract“³rec“³lit³retract„“³tupleµ“³named³handle“³refµ³protocol„³Handle„„„„„„µ±message“³rec“³lit³message„“³tupleµ“³named³body“³refµ„³AssertionDescription„„„„„„µ±sync“³rec“³lit³sync„“³tupleµ“³named³peer“³refµ„³Target„„„„„„µ± breakLink“³rec“³lit³ diff --git a/schemas/noise.prs b/schemas/noise.prs index 3558b36..90eba05 100644 --- a/schemas/noise.prs +++ b/schemas/noise.prs @@ -42,13 +42,30 @@ DefaultProtocol = "Noise_NK_25519_ChaChaPoly_BLAKE2s" . # sequence is exhausted or not supplied, an all-zeros key is used each time a PSK is needed. NoisePreSharedKeys = @present { preSharedKeys: [bytes ...] } / @invalid { preSharedKeys: any } / @absent {} . -# Sessions proceed by sending Packets to the initiatorSession and responderSession according to -# the Noise protocol definition. Each Packet represents a complete logical unit of +# --------------------------------------------------------------------------- +# Handshaking and running a session + +# 1. initiator asserts #:A> at Gatekeeper +# 2. gatekeeper asserts at #:A +# 3. initiator asserts at #:B and then sends `Packet`s to #:B +# 4. responder sends `Packet`s to #:C +# +# Sessions begin with introduction of initiator (#:C) and responder (#:B) to each other, and +# then proceed by sending `Packet`s (from #:C) to #:B and (from #:B) to #:C according to +# the Noise protocol definition. Each `Packet` represents a complete logical unit of # communication; for example, a complete Turn when layering the Syndicate protocol over Noise. # Note well the restriction on Noise messages: no individual complete packet or packet fragment -# may exceed 65535 bytes (N.B. not 65536!). When `fragmented`, each portion of a Packet is a +# may exceed 65535 bytes (N.B. not 65536!). When `fragmented`, each portion of a `Packet` is a # complete Noise "transport message"; when `complete`, the whole thing is likewise a complete # "transport message". +# +# Retraction of the `Introduction` ends the session from the initiator-side; retraction of the +# `` assertion ends the session from the responder-side. + +SessionItem = Initiator / Packet . +# Assertion +Initiator = . +# Message Packet = @complete bytes / @fragmented [bytes ...] . # When layering Syndicate protocol over noise, From c59e044695616af60cc1fde05c742283601e5bd9 Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Thu, 28 Mar 2024 15:49:48 +0100 Subject: [PATCH 3/5] Set embeddedType for noise --- schema-bundle.bin | 2 +- schemas/noise.prs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/schema-bundle.bin b/schema-bundle.bin index d46a413..f578505 100644 --- a/schema-bundle.bin +++ b/schema-bundle.bin @@ -10,7 +10,7 @@ fragmented ByteString„„„„„³ Initiator“³rec“³lit³ initiator„“³tupleµ“³named³initiatorSession“³embedded“³refµ„³Packet„„„„„„³ NoiseSpec“³andµ“³dict·³key“³named³key“³atom³ ByteString„„³service“³named³service“³refµ„³ServiceSelector„„„„“³named³protocol“³refµ„³ NoiseProtocol„„“³named³ preSharedKeys“³refµ„³NoisePreSharedKeys„„„„³ SessionItem“³orµµ± Initiator“³refµ„³ Initiator„„µ±Packet“³refµ„³Packet„„„„³ NoiseProtocol“³orµµ±present“³dict·³protocol“³named³protocol“³atom³String„„„„„µ±invalid“³dict·³protocol“³named³protocol³any„„„„µ±absent“³dict·„„„„„³ NoiseStepType“³lit³noise„³SecretKeyField“³orµµ±present“³dict·³ secretKey“³named³ secretKey“³atom³ ByteString„„„„„µ±invalid“³dict·³ secretKey“³named³ secretKey³any„„„„µ±absent“³dict·„„„„„³DefaultProtocol“³lit±!Noise_NK_25519_ChaChaPoly_BLAKE2s„³NoiseStepDetail“³refµ„³ServiceSelector„³ServiceSelector³any³NoiseServiceSpec“³andµ“³named³base“³refµ„³ NoiseSpec„„“³named³ secretKey“³refµ„³SecretKeyField„„„„³NoisePreSharedKeys“³orµµ±present“³dict·³ preSharedKeys“³named³ preSharedKeys“³seqof“³atom³ -ByteString„„„„„„µ±invalid“³dict·³ preSharedKeys“³named³ preSharedKeys³any„„„„µ±absent“³dict·„„„„„³NoisePathStepDetail“³refµ„³ NoiseSpec„³NoiseDescriptionDetail“³refµ„³NoiseServiceSpec„„³ embeddedType€„„µ³timer„“³schema·³version°³ definitions·³SetTimer“³rec“³lit³ set-timer„“³tupleµ“³named³label³any„“³named³seconds“³atom³Double„„“³named³kind“³refµ„³ TimerKind„„„„„³ LaterThan“³rec“³lit³ +ByteString„„„„„„µ±invalid“³dict·³ preSharedKeys“³named³ preSharedKeys³any„„„„µ±absent“³dict·„„„„„³NoisePathStepDetail“³refµ„³ NoiseSpec„³NoiseDescriptionDetail“³refµ„³NoiseServiceSpec„„³ embeddedType“³refµ³ EntityRef„³Cap„„„µ³timer„“³schema·³version°³ definitions·³SetTimer“³rec“³lit³ set-timer„“³tupleµ“³named³label³any„“³named³seconds“³atom³Double„„“³named³kind“³refµ„³ TimerKind„„„„„³ LaterThan“³rec“³lit³ later-than„“³tupleµ“³named³seconds“³atom³Double„„„„„³ TimerKind“³orµµ±relative“³lit³relative„„µ±absolute“³lit³absolute„„µ±clear“³lit³clear„„„„³ TimerExpired“³rec“³lit³ timer-expired„“³tupleµ“³named³label³any„“³named³seconds“³atom³Double„„„„„„³ embeddedType€„„µ³trace„“³schema·³version°³ definitions·³Oid³any³Name“³orµµ± anonymous“³rec“³lit³ anonymous„“³tupleµ„„„„µ±named“³rec“³lit³named„“³tupleµ“³named³name³any„„„„„„„³Target“³rec“³lit³entity„“³tupleµ“³named³actor“³refµ„³ActorId„„“³named³facet“³refµ„³FacetId„„“³named³oid“³refµ„³Oid„„„„„³TaskId³any³TurnId³any³ActorId³any³FacetId³any³ TurnCause“³orµµ±turn“³rec“³lit³ caused-by„“³tupleµ“³named³id“³refµ„³TurnId„„„„„„µ±cleanup“³rec“³lit³cleanup„“³tupleµ„„„„µ±linkedTaskRelease“³rec“³lit³linked-task-release„“³tupleµ“³named³id“³refµ„³TaskId„„“³named³reason“³refµ„³LinkedTaskReleaseReason„„„„„„µ±periodicActivation“³rec“³lit³periodic-activation„“³tupleµ“³named³period“³atom³Double„„„„„„µ±delay“³rec“³lit³delay„“³tupleµ“³named³ causingTurn“³refµ„³TurnId„„“³named³amount“³atom³Double„„„„„„µ±external“³rec“³lit³external„“³tupleµ“³named³ description³any„„„„„„„³ TurnEvent“³orµµ±assert“³rec“³lit³assert„“³tupleµ“³named³ assertion“³refµ„³AssertionDescription„„“³named³handle“³refµ³protocol„³Handle„„„„„„µ±retract“³rec“³lit³retract„“³tupleµ“³named³handle“³refµ³protocol„³Handle„„„„„„µ±message“³rec“³lit³message„“³tupleµ“³named³body“³refµ„³AssertionDescription„„„„„„µ±sync“³rec“³lit³sync„“³tupleµ“³named³peer“³refµ„³Target„„„„„„µ± breakLink“³rec“³lit³ break-link„“³tupleµ“³named³source“³refµ„³ActorId„„“³named³handle“³refµ³protocol„³Handle„„„„„„„„³ ExitStatus“³orµµ±ok“³lit³ok„„µ±Error“³refµ³protocol„³Error„„„„³ diff --git a/schemas/noise.prs b/schemas/noise.prs index 90eba05..2f03909 100644 --- a/schemas/noise.prs +++ b/schemas/noise.prs @@ -1,4 +1,5 @@ version 1 . +embeddedType EntityRef.Cap . # https://noiseprotocol.org/ From 710ff91a64b3e632e8423d825c92fa2917c9e882 Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Mon, 1 Apr 2024 15:56:07 +0200 Subject: [PATCH 4/5] Revise http protocol --- schema-bundle.bin | 4 +++- schemas/http.prs | 7 +++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/schema-bundle.bin b/schema-bundle.bin index f578505..f9f08af 100644 --- a/schema-bundle.bin +++ b/schema-bundle.bin @@ -4,7 +4,9 @@ ByteString QueryValue“³orµµ±string“³atom³String„„µ±file“³rec“³lit³file„“³tupleµ“³named³filename“³atom³String„„“³named³headers“³refµ„³Headers„„“³named³body“³atom³ ByteString„„„„„„„„³ HostPattern“³orµµ±host“³atom³String„„µ±any“³lit€„„„„³ HttpBinding“³rec“³lit³ http-bind„“³tupleµ“³named³host“³refµ„³ HostPattern„„“³named³port“³atom³ SignedInteger„„“³named³method“³refµ„³ MethodPattern„„“³named³path“³refµ„³ PathPattern„„“³named³handler“³embedded“³refµ„³ HttpRequest„„„„„„³ HttpContext“³rec“³lit³request„“³tupleµ“³named³req“³refµ„³ HttpRequest„„“³named³res“³embedded“³refµ„³ HttpResponse„„„„„„³ HttpRequest“³rec“³lit³ http-request„“³tupleµ“³named³sequenceNumber“³atom³ SignedInteger„„“³named³host“³atom³String„„“³named³port“³atom³ SignedInteger„„“³named³method“³atom³Symbol„„“³named³path“³seqof“³atom³String„„„“³named³headers“³refµ„³Headers„„“³named³query“³dictof“³atom³Symbol„“³seqof“³refµ„³ QueryValue„„„„“³named³body“³refµ„³ RequestBody„„„„„³ HttpService“³rec“³lit³ http-service„“³tupleµ“³named³host“³refµ„³ HostPattern„„“³named³port“³atom³ SignedInteger„„“³named³method“³refµ„³ MethodPattern„„“³named³path“³refµ„³ PathPattern„„„„„³ PathPattern“³seqof“³refµ„³PathPatternElement„„³ RequestBody“³orµµ±present“³atom³ -ByteString„„µ±absent“³lit€„„„„³ HttpListener“³rec“³lit³ http-listener„“³tupleµ“³named³port“³atom³ SignedInteger„„„„„³ HttpResponse“³orµµ±status“³rec“³lit³status„“³tupleµ“³named³code“³atom³ SignedInteger„„“³named³message“³atom³String„„„„„„µ±header“³rec“³lit³header„“³tupleµ“³named³name“³atom³Symbol„„“³named³value“³atom³String„„„„„„µ±chunk“³rec“³lit³chunk„“³tupleµ“³named³chunk“³refµ„³Chunk„„„„„„µ±done“³rec“³lit³done„“³tupleµ“³named³chunk“³refµ„³Chunk„„„„„„„„³ MethodPattern“³orµµ±any“³lit€„„µ±specific“³atom³Symbol„„„„³PathPatternElement“³orµµ±label“³atom³String„„µ±wildcard“³lit³_„„µ±rest“³lit³...„„„„„³ embeddedType€„„µ³noise„“³schema·³version°³ definitions·³Packet“³orµµ±complete“³atom³ +ByteString„„µ±absent“³lit€„„„„³ HttpListener“³rec“³lit³ http-listener„“³tupleµ“³named³port“³atom³ SignedInteger„„„„„³ HttpResponse“³orµµ± +processing“³rec“³lit³ +processing„“³tupleµ„„„„µ±status“³rec“³lit³status„“³tupleµ“³named³code“³atom³ SignedInteger„„“³named³message“³atom³String„„„„„„µ±header“³rec“³lit³header„“³tupleµ“³named³name“³atom³Symbol„„“³named³value“³atom³String„„„„„„µ±body“³rec“³lit³body„“³tupleµ“³named³chunk“³refµ„³Chunk„„„„„„„„³ MethodPattern“³orµµ±any“³lit€„„µ±specific“³atom³Symbol„„„„³PathPatternElement“³orµµ±label“³atom³String„„µ±wildcard“³lit³_„„µ±rest“³lit³...„„„„„³ embeddedType€„„µ³noise„“³schema·³version°³ definitions·³Packet“³orµµ±complete“³atom³ ByteString„„µ± fragmented“³seqof“³atom³ ByteString„„„„„³ Initiator“³rec“³lit³ initiator„“³tupleµ“³named³initiatorSession“³embedded“³refµ„³Packet„„„„„„³ NoiseSpec“³andµ“³dict·³key“³named³key“³atom³ diff --git a/schemas/http.prs b/schemas/http.prs index 0edbb7d..a162262 100644 --- a/schemas/http.prs +++ b/schemas/http.prs @@ -39,10 +39,13 @@ HttpContext = . @ # Messages HttpResponse = +# Assertion - frames the response. When retracted, response is considered complete. +# If retracted before `status` is delivered, response is considered a 500. +/ +# Remainder are messages: +processing . (status | header)* . body* . -processing / /
-/ -/ +/ . Chunk = @string string / @bytes bytes . From 5a73e8d4c3b0e370f9a940666b95c53b09dbbf7e Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Thu, 4 Apr 2024 16:31:09 +0200 Subject: [PATCH 5/5] Alter dataspacePatterns language to make rec and arr more like dict --- schema-bundle.bin | 2 +- schemas/dataspacePatterns.prs | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/schema-bundle.bin b/schema-bundle.bin index f9f08af..8775cfa 100644 --- a/schema-bundle.bin +++ b/schema-bundle.bin @@ -43,4 +43,4 @@ RunService depends-on„“³tupleµ“³named³depender³any„“³named³dependee“³refµ„³ ServiceState„„„„„„³ embeddedType“³refµ³ EntityRef„³Cap„„„µ³protocol„“³schema·³version°³ definitions·³Oid“³atom³ SignedInteger„³Sync“³rec“³lit³S„“³tupleµ“³named³peer“³embedded“³lit„„„„„„³Turn“³seqof“³refµ„³ TurnEvent„„³Error“³rec“³lit³error„“³tupleµ“³named³message“³atom³String„„“³named³detail³any„„„„³Event“³orµµ±Assert“³refµ„³Assert„„µ±Retract“³refµ„³Retract„„µ±Message“³refµ„³Message„„µ±Sync“³refµ„³Sync„„„„³Assert“³rec“³lit³A„“³tupleµ“³named³ assertion“³refµ„³ Assertion„„“³named³handle“³refµ„³Handle„„„„„³Handle“³atom³ SignedInteger„³Packet“³orµµ±Turn“³refµ„³Turn„„µ±Error“³refµ„³Error„„µ± Extension“³refµ„³ Extension„„„„³Message“³rec“³lit³M„“³tupleµ“³named³body“³refµ„³ Assertion„„„„„³Retract“³rec“³lit³R„“³tupleµ“³named³handle“³refµ„³Handle„„„„„³ Assertion³any³ Extension“³rec“³named³label³any„“³named³fields“³seqof³any„„„³ TurnEvent“³tupleµ“³named³oid“³refµ„³Oid„„“³named³event“³refµ„³Event„„„„„³ embeddedType€„„µ³ dataspace„“³schema·³version°³ definitions·³Observe“³rec“³lit³Observe„“³tupleµ“³named³pattern“³refµ³dataspacePatterns„³Pattern„„“³named³observer“³embedded³any„„„„„„³ embeddedType“³refµ³ EntityRef„³Cap„„„µ³ gatekeeper„“³schema·³version°³ definitions·³Bind“³rec“³lit³bind„“³tupleµ“³named³ description“³refµ„³ Description„„“³named³target“³embedded³any„„“³named³observer“³refµ„³ BindObserver„„„„„³Step“³rec“³named³stepType“³atom³Symbol„„“³tupleµ“³named³detail³any„„„„³Bound“³orµµ±bound“³rec“³lit³bound„“³tupleµ“³named³pathStep“³refµ„³PathStep„„„„„„µ±Rejected“³refµ„³Rejected„„„„³Route“³rec“³lit³route„“³ tuplePrefixµ“³named³ transports“³seqof³any„„„“³named³ pathSteps“³seqof“³refµ„³PathStep„„„„„³Resolve“³rec“³lit³resolve„“³tupleµ“³named³step“³refµ„³Step„„“³named³observer“³embedded“³refµ„³Resolved„„„„„„³PathStep“³rec“³named³stepType“³atom³Symbol„„“³tupleµ“³named³detail³any„„„„³Rejected“³rec“³lit³rejected„“³tupleµ“³named³detail³any„„„„³Resolved“³orµµ±accepted“³rec“³lit³accepted„“³tupleµ“³named³responderSession“³embedded³any„„„„„„µ±Rejected“³refµ„³Rejected„„„„³ Description“³rec“³named³stepType“³atom³Symbol„„“³tupleµ“³named³detail³any„„„„³ ResolvePath“³rec“³lit³ resolve-path„“³tupleµ“³named³route“³refµ„³Route„„“³named³addr³any„“³named³control“³embedded“³refµ„³TransportControl„„„“³named³resolved“³refµ„³Resolved„„„„„³ BindObserver“³orµµ±present“³embedded“³refµ„³Bound„„„µ±absent“³lit€„„„„³ForceDisconnect“³rec“³lit³force-disconnect„“³tupleµ„„„³ResolvedPathStep“³rec“³lit³ path-step„“³tupleµ“³named³origin“³embedded“³refµ„³Resolve„„„“³named³pathStep“³refµ„³PathStep„„“³named³resolved“³refµ„³Resolved„„„„„³TransportControl“³refµ„³ForceDisconnect„³TransportConnection“³rec“³lit³connect-transport„“³tupleµ“³named³addr³any„“³named³control“³embedded“³refµ„³TransportControl„„„“³named³resolved“³refµ„³Resolved„„„„„„³ embeddedType“³refµ³ EntityRef„³Cap„„„µ³transportAddress„“³schema·³version°³ definitions·³Tcp“³rec“³lit³tcp„“³tupleµ“³named³host“³atom³String„„“³named³port“³atom³ SignedInteger„„„„„³Unix“³rec“³lit³unix„“³tupleµ“³named³path“³atom³String„„„„„³Stdio“³rec“³lit³stdio„“³tupleµ„„„³ WebSocket“³rec“³lit³ws„“³tupleµ“³named³url“³atom³String„„„„„„³ embeddedType€„„µ³dataspacePatterns„“³schema·³version°³ definitions·³DLit“³rec“³lit³lit„“³tupleµ“³named³value“³refµ„³AnyAtom„„„„„³DBind“³rec“³lit³bind„“³tupleµ“³named³pattern“³refµ„³Pattern„„„„„³AnyAtom“³orµµ±bool“³atom³Boolean„„µ±double“³atom³Double„„µ±int“³atom³ SignedInteger„„µ±string“³atom³String„„µ±bytes“³atom³ -ByteString„„µ±symbol“³atom³Symbol„„µ±embedded“³embedded³any„„„„³Pattern“³orµµ±DDiscard“³refµ„³DDiscard„„µ±DBind“³refµ„³DBind„„µ±DLit“³refµ„³DLit„„µ± DCompound“³refµ„³ DCompound„„„„³DDiscard“³rec“³lit³_„“³tupleµ„„„³ DCompound“³orµµ±rec“³rec“³lit³rec„“³tupleµ“³named³label³any„“³named³fields“³seqof“³refµ„³Pattern„„„„„„„µ±arr“³rec“³lit³arr„“³tupleµ“³named³items“³seqof“³refµ„³Pattern„„„„„„„µ±dict“³rec“³lit³dict„“³tupleµ“³named³entries“³dictof³any“³refµ„³Pattern„„„„„„„„„„³ embeddedType“³refµ³ EntityRef„³Cap„„„„„ \ No newline at end of file +ByteString„„µ±symbol“³atom³Symbol„„µ±embedded“³embedded³any„„„„³Pattern“³orµµ±DDiscard“³refµ„³DDiscard„„µ±DBind“³refµ„³DBind„„µ±DLit“³refµ„³DLit„„µ± DCompound“³refµ„³ DCompound„„„„³DDiscard“³rec“³lit³_„“³tupleµ„„„³ DCompound“³orµµ±rec“³rec“³lit³rec„“³tupleµ“³named³label³any„“³named³fields“³dictof“³atom³ SignedInteger„“³refµ„³Pattern„„„„„„„µ±arr“³rec“³lit³arr„“³tupleµ“³named³items“³dictof“³atom³ SignedInteger„“³refµ„³Pattern„„„„„„„µ±dict“³rec“³lit³dict„“³tupleµ“³named³entries“³dictof³any“³refµ„³Pattern„„„„„„„„„„³ embeddedType“³refµ³ EntityRef„³Cap„„„„„ \ No newline at end of file diff --git a/schemas/dataspacePatterns.prs b/schemas/dataspacePatterns.prs index faf2df1..d3b1d13 100644 --- a/schemas/dataspacePatterns.prs +++ b/schemas/dataspacePatterns.prs @@ -1,14 +1,18 @@ version 1 . embeddedType EntityRef.Cap . -# Dataspace patterns: a sublanguage of attenuation patterns. +# Dataspace patterns: *almost* a sublanguage of attenuation patterns. +# +# One key difference is that Dataspace patterns are extensible, in that +# they ignore fields not mentioned in DCompound patterns. + Pattern = DDiscard / DBind / DLit / DCompound . DDiscard = <_>. DBind = . DLit = . -DCompound = - / +DCompound = + / / . AnyAtom =