- From: Seaborne, Andy <Andy_Seaborne@hplb.hpl.hp.com>
- Date: Thu, 9 Oct 2003 13:31:20 +0100
- To: "'Damian Steer'" <pldms@mac.com>, "'www-rdf-rules@w3.org'" <www-rdf-rules@w3.org>
-------- Original Message -------- > From: Damian Steer <mailto:pldms@mac.com> > Date: 8 October 2003 20:11 > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Geoff Chappell <geoff@sover.net> writes: > > > So do I understand correctly that it's not currently possible to > > return bindings from constraints in a RDQL query? And that's what you > > need to support your datatyping rules? I'd always wondered why the > > two pieces were separate - triple bindings and additional constraints > > - i.e. why isn't it just: > > > > WHERE > > :vehicle :standingCapacity ?x . > > :vehicle :seatedCapacity ?y . > > ?x + ?y = ?z . > > I guess the distinction is that the constraints in the AND clause are: > > 1) Outside the RDF model in that they can have relations between > literals (eg ?a = 'hello' - stupid, but you can do it) and 2) The > relations are defined in the implementation. For example in the regexp > constraint "?a =~ '*ello'" the relation is 'expressed' in code. In my > Squish implementation for RubyRDF you can define constraints by giving > an identifier (eg: ex:relation) and a Proc (lambda) returning a > boolean. Yep. Leaving aside assignment for a moment, the constraint expressions work over a space of values, where as the triple pattern are a graph match. For execution purposes, there is no guarantee that the query is executed in the order specified, only that the execution will have the same effect. Flowing contrainst earlier into the sequence of triple matches can be a big win in some application scenarios. Assignement: there is no barrier to adding assignment. However at the moment, all variable bindings returned are bounded to things actually in the target graph. For RDQL/Jena, these bound values are ones that can be used further through the Java API so doing things like suming values, or user defined operations can be done there. > > That isn't to suggest that one needs to give them their own clause, > of course. > > > This gets you into the finite domain constraint world, doesn't it - > > i.e. you need some way of enumerating the possible (finite) values > > for a particular variable (and hopefully some means of propagating > > constraints to avoid combinatorial hell and make it practical with > > non-toy domains.) > > > > Yes, I look forward to implementing '?z > 0'. That would be some > binding :-) > > > > #g > > > -- > > > > > > Geoff Chappell > > Damian > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.2.3 (Darwin) > Comment: Processed by Mailcrypt 3.5.8 > <http://mailcrypt.sourceforge.net/> > > iD8DBQE/hGFKAyLCB+mTtykRAkisAKCkTmha3BVS9D7egTPHC9vZa/lZEwCgvn6o > cvOZ3tmwZe9oKpPIgkpP7wU= > =xflm > -----END PGP SIGNATURE-----
Received on Thursday, 9 October 2003 08:33:23 UTC