syndicate-protocols/schemas/sturdy.prs

44 lines
1.5 KiB
Plaintext
Raw Normal View History

version 1 .
2021-07-22 12:12:53 +00:00
embeddedType EntityRef.Cap .
2023-02-06 09:45:41 +00:00
; The sequence of Caveats is run RIGHT-TO-LEFT.
; That is, the newest Caveats are at the right.
2023-02-06 09:45:41 +00:00
SturdyRef = <ref @oid any @caveatChain [Caveat ...] @sig bytes>.
; embodies 1st-party caveats over assertion structure, but nothing else
; can add 3rd-party caveats and richer predicates later
2023-02-06 09:45:41 +00:00
Caveat = Rewrite / Alts / @unknown any .
2023-02-06 09:58:16 +00:00
Rewrite =
/ <rewrite @pattern Pattern @template Template>
/ <accept @pattern Pattern>
/ <reject @pattern Pattern>
.
Alts = <or @alternatives [Rewrite ...]>.
Oid = int .
WireRef = @mine [0 @oid Oid] / @yours [1 @oid Oid @attenuation Caveat ...].
;---------------------------------------------------------------------------
Lit = <lit @value any>.
Pattern = PDiscard / PAtom / PEmbedded / PBind / PAnd / PNot / Lit / PCompound .
PDiscard = <_>.
PAtom = =Boolean / =Float / =Double / =SignedInteger / =String / =ByteString / =Symbol .
PEmbedded = =Embedded .
2021-07-12 19:10:19 +00:00
PBind = <bind @pattern Pattern>.
PAnd = <and @patterns [Pattern ...]>.
PNot = <not @pattern Pattern>.
PCompound =
/ @rec <rec @label any @fields [Pattern ...]>
/ @arr <arr @items [Pattern ...]>
/ @dict <dict @entries { any: Pattern ...:... }> .
2021-06-09 13:06:58 +00:00
Template = TAttenuate / TRef / Lit / TCompound .
2023-02-06 09:45:41 +00:00
TAttenuate = <attenuate @template Template @attenuation [Caveat ...]>.
2021-07-12 19:10:19 +00:00
TRef = <ref @binding int>.
TCompound =
/ @rec <rec @label any @fields [Template ...]>
/ @arr <arr @items [Template ...]>
/ @dict <dict @entries { any: Template ...:... }> .