Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvements on the semantics #212

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from
Draft
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 12 additions & 13 deletions spec/semantics.html
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,8 @@ <h3>Terms, Triples and Graphs</h3>
-->

<div class=note>
In this context, an RDF graph is a graph that does not contain graph terms nor lists, does not have literals as subjects or predicates, does not have variables as predicates, and for which $U=\emptyset$.
The blank nodes occurring in the graph would be labeled and stored in $E$.
In this context, an RDF graph is a graph that does not contain graph terms nor lists, does not have literals as subjects or predicates, does not have variables as predicates, for which $U=\emptyset$,
pchampin marked this conversation as resolved.
Show resolved Hide resolved
and $E$ is the set of blank nodes occurring in the graph.
</div>

<div class="issue">The translation of nested blank nodes as explained here and for example applied in <a href="#example3"> Example 3</a> follows
Expand All @@ -320,7 +320,7 @@ <h3>Terms, Triples and Graphs</h3>
as<br/>
<span class="asex">$\qquad (\{\},\{x\},\{(\text{:socrates}, \text{:says}, &lt;\{\},\{\},\{(x,\text{rdf:type}, \text{:Mortal} )\}&gt;) \})$</span><br/>
and <strong>not</strong> as<br/>
<span class="asex"> $(\{\},\{\},\{(\text{:socrates}, \text{:says}, &lt;\{\},\{x\},\{(x,\text{rdf:type}, \text{:Mortal} )\}&gt;) \})$</span>.<br/>
<span class="asex">$\qquad (\{\},\{\},\{(\text{:socrates}, \text{:says}, &lt;\{\},\{x\},\{(x,\text{rdf:type}, \text{:Mortal} )\}&gt;) \})$</span>.<br/>
A solution for that problem is currently being discussed. The difference, however, does not influence the formal semantics of the <em>abstract</em> syntax, as quantification is always explicit there.
</div>
</section>
Expand Down Expand Up @@ -387,11 +387,11 @@ <h2>Variables</h2>

<p class=note>Note that the definition makes a difference between <a>graphs</a> and <a>graph terms</a>.
A graph term is a <a>direct constituent</a> of the graph ("containing graph") in which it occurs as a triple component. However, the direct constituents of the graph term's graph, and their direct constituents (and so on), are not direct constituents of the containing graph. Rather, they are <a>constituents</a> of the containing graph.
This difference is crucial for the definitions below: a graph is not the same as a graph term.</p>
This difference between graph and graph term is crucial for the definitions below.</p>
pchampin marked this conversation as resolved.
Show resolved Hide resolved
<p>
With that definition, we now introduce <dfn data-lt="free">free variables</dfn>: these are variables which occur directly or nested in the graph but which are not covered by a <a>quantification set</a>.
</p>
The set of free variables ($FV$) of a term or a set of triples is defined as follows:
<p>The set of free variables ($FV$) of a <a>term</a> or a set of <a>triples</a> is defined as follows:

<ul>
<li>$FV(x) = \emptyset$ if $x ∈ R ∪ L$,</li>
Expand All @@ -402,13 +402,12 @@ <h2>Variables</h2>
<li>$FV(x) = FV(F)\setminus(U ∪ E)$ if $x=&lt;U,E,F&gt;$ is a <a>graph term</a>.</li>
</ul>

The set $FV$ for a <a>graph</a> $G=(U,E,F)$ and a variable $v\in V\cap C(G)$:
<p>Consider a <a>graph</a> $G=(U,E,F)$ and a variable $v\in V\cap C(G)$:
<ul>
<li>We say that $v$ is <a>free</a> in $G$ iff $v\not\in U\cup E$ and there exists $x\in DC(G)$ such that $v\in FV(x)$;</li>
<li>Otherwise we call $v$ <dfn class="lint-ignore" data-lt="scoped variable">scoped</dfn> in $G$;</li>
<li>We denote the set of variables which are <a>free</a> in $G$ as $FV(G)$.</li>
</ul>
<p>
<p>We denote the set of variables which are free in $G$ as $FV(G)$.

<p>Examples:</p>
<ol>
Expand All @@ -421,8 +420,8 @@ <h2>Variables</h2>
</ol>
<p>This enables us to introduce the notion of closed graphs and ground terms.</p>
<ul>
<li>A <a>graph</a> $G=(U,E,F)$ is <dfn data-lt="closed graph">closed</dfn> if all variables $v\in C(G)\cap V$ are scoped in $G$.</li>
<li>A term is <dfn data-lt="ground term">ground</dfn> if it is either
<li>A <a>graph</a> $G=(U,E,F)$ is <dfn data-lt="closed graph">closed</dfn> if all variables $v\in V \cap C(G)$ are scoped in $G$.</li>
<li>A <a>term</a> is <dfn data-lt="ground term">ground</dfn> if it is either
<ul>
<li>an IRI,</li>
<li>a Literal,</li>
Expand All @@ -434,7 +433,7 @@ <h2>Variables</h2>

<p>We denote the set of <a>ground terms</a> as $T_G$.

<p>A <a>triple</a> is <a>ground</a> if all of its <a>direct constituents</a> are <a>ground</a>.</p>
<p>A <a>triple</a> is <a>ground</a> if its subject, predicate and object are all <a>ground</a>.</p>
pchampin marked this conversation as resolved.
Show resolved Hide resolved

<p>A graph $G=(U,E,F)$ is <a>ground</a> if $E=U=\emptyset$ and all <a>triples</a> in $F$ are <a>ground</a>.</p>

Expand All @@ -454,7 +453,7 @@ <h2>Variables</h2>
the variable $x$ will be a free variable (as it was quantified in the containing N3 graph).
</p>

<p>An abstract <a>graph</a> $G=(U,E,F)$ can also contain quantified variables $v\in U\cup E$ which do not occur in any <a>triple</a> of $F$.
<p>An abstract <a>graph</a> $G=(U,E,F)$ can also contain quantified variables $v\in U\cup E$ which do not occur <a>free</a> in any <a>triple</a> of $F$.
These variables do not contribute to the interpretation of the graph. In order to simplify our considerations for the following sections,
we introduce the notion of normalised graphs:</p>

Expand Down Expand Up @@ -767,7 +766,7 @@ <h2>Graphs with variables</h2>
The mapping $A_2$ assigns variables to terms, and will be used to <em>ground free variables within graph terms</em>.
Note that given an interpretation $I$ and two assignments $A$ for a set $V_1$, and $B$ for a set $V_2$ of variables,
the <a>combination</a> $A\bullet B$ is again an assignment for $V_1\cup V_2$.</p>
<!---- </section>
<!-- </section>

<section>
<h2></h2>
Expand Down