[Versa] More on literal queries

Chimezie Ogbuji chimezie at gmail.com
Tue Sep 13 11:45:51 MDT 2005


> Just to be clear, your not talking about a "context" as shown in the
> above EBNF correct?  In the EBNF, context is the ".".  I've been trying
> to talk about the "scope" of an expression which I think is what you
> mean.

I should be explicit.  When I said context, I mainly meant the idea of
a subgraph (possibly named).  But there are three interpretations, as
I see it:

- Context:  A named subgraph In the pure RDF sense (the scope
attribute on 4RDF Statements)

- Versa Context:  Consisting of a core data type, variable bindings,
namespace declarations, and a named Context (subgraph)

- The '.' Expression: Shorthand for the the data type instance
associated with the current Versa Context

So, { .. } would be a 'Context expression' which resolves to an
anonymous Context (subgraph), which will then be associated with the
Versa context used to evaluate the scoped expression that follows in:

{ .. } <scoped expression>

That sound about right?

> >
> > statement(subj,pred) => set(stmt1,stmt2,..stmtN)
> > where stmt1 ... stmtN all have subj as their subject and pred as their
> >

> Something like that.  I was thinking it would look just like the
> filter/traverse functions (take three arguments) and instead of
> returning a set of subject, or set of objects, would return the entire
> statement.  So we have (with functions) the ability to get a set of
> subject, a set of objects and a set of statements.  Then, the following
> expression would be equivalent
> 
> subject(statements(all(),*,*))  == filter(all(),*,*)
> object(statements(all(),*,*,*)) == traverse(all(),*,*)


More information about the Versa mailing list