Mirror of the Rel4tion website/wiki source, view at <http://rel4tion.org>
Clone
HTTPS:
git clone https://vervis.peers.community/repos/yEzqv
SSH:
git clone USERNAME@vervis.peers.community:yEzqv
Branches
Tags
03-bs-ref.mdwn
[[!meta title=“4.2.3 | Block Subject References”]]
Block Subject References
Each statememt block has exactly one subject, shared by all the statements. A block subject reference allows a subject, a predicate or an object to point to the subject of another block. The offset values count whole blocks, not individual statements.
A block subject reference (BSref) starts with an s-with-vertical-bar ($
), followed by an offset specification. In addition to the numeric and textual specifications based on the ^
and ,
pointers, a BSref can also refer to subject of its own block. Such BSrefs can only be used as predicates or objects. The syntax of this self-BSref is $|
.
Examples:
<%> -- s1
smaoin:is_a myns:Action
myns:has_name "Get ingredients from garden"
myns:is_followed_by $, -- r1
<%> -- s2
smaoin:is_a myns:Action
myns:has_name "Make salad"
myns:is_followed_by $, -- r2
<%> -- s3
smaoin:is_a myns:Action
myns:has_name "Eat salad"
myns:is_followed_by $^^ -- r3
In the snippet above:
- r1 refers to s2
- r2 refers to s3
- r3 refers to s1