> On 20 May 2020, at 02:40, Rob Atkinson <[email protected]> wrote:
> 
> You absolutely need to understand the scope of a function or query before you 
> can use it, and there are only hints scattered through documents as to what 
> they may be. As a result I always dive into the code of every element to see 
> what it does to avoid perplexing behaviours.

This is a good observation. Some functions, templates or elements operate on 
the current query graph; some on the current query graph and its imports; some 
on a fixed, hardcoded graph, with or without imports; some on a graph passed in 
as an argument, with or without imports.

> In this cases I believe the magic rules are:
> For SPARQL queries an unbound variable in the GRAPH is interpreted as being 
> within the scope of every graph accessible the the deployment -

Correct.

> and by default (or always enforced) it either refuses to do this, or it 
> throws error messages about it being slow. 

EDG/TBC have very wide notion of what constitutes a “graph accessible in the 
deployment”, many are created/calculated on demand, so accessing *all* the 
graphs is discouraged (and also rarely what is really wanted).

> The tops: function is (?) - perhaps the current graph's import closure?

Correct, tops:statementDefinedIn considers the current query graph and all its 
imports, transitively.

> other things work on the ui:graph, or the "current query graph" or the 
> current project graph with or without imports etc.
> 
> IMHO the metamodel for functions ought to include standardised metadata about 
> what graphs are included and what graphs may be modified - and the long 
> undifferentiated lists of functions and SWP elements replaced with groupings 
> according to the scope of the function.

Fair point. The way we document these resources doesn't have a dedicated place 
to put this information, so it ends up in the rdfs:comment or not at all.


Richard

-- 
You received this message because you are subscribed to the Google Groups 
"TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/4CF5AC31-276B-4E88-9F2C-8B53F21302E9%40topquadrant.com.

Reply via email to