> On Mon, Jul 8, 2013 at 11:14 AM, Joshua TAYLOR <[email protected]>
> wrote:
>>
>> Hi all,
>>
>> First off, my impression is that having a builtin do non-trivial query
>> of the graph (i.e., that depends on more inference), or modification
>> of the graph, is not supported.  That said, I'd like to do something
>> akin to it, and I'm looking for suggestions.
>>
>> I have a simple expression evaluator (essentially a simple
>> lambda-calculus interpreter) whose expressions can be encoded in RDF.
>> In the simplest case, I have a builtin called Eval which takes two
>> arguments, an expression, which should be concrete, and a result which
>> may be either a variable or concrete node.  If the result is a
>> variable, then Eval binds the result of the evaluation to it, and
>> matches, and if the result is concrete, then Eval compares the
>> evaluation result with it, and succeeds if they are the same
>> (approximately with the primitive equal builtin).
>>
>> Now, the expression language that Eval can handle has some primitives
>> for querying RDF graphs.  The primitives are based on those presented
>> in a recent paper [1]. The idea here is to be able to write an
>> expression denoting a function of x, e.g., "the sum of the values of
>> the hasValue property for all the resources related to x by the
>> relatedTo property" and to store the result as a property of x.  E.g.,
>> with the data
>>
>> x relatedTo y, z .
>> y hasValue 3 .
>> z hasValue 4 .
>>
>> we would compute the value 7. This is generalized by a rule that says
>>
>> (?s ?p ?o) <-
>> (?s hasComputableProperty ?p)
>> (?s hasComputableExpression ?e)
>> Eval(?e,?o) .
>>
>> Now the problem of recursion comes up when the values of y and z are
>> not stated explicitly, but should also be computed by this same rule.
>> Eval doesn't have access to the InfModel directly, but through the
>> context can access the InfGraph, but simply querying it from within
>> Eval causes problems with recursive query.  (I assume that this is to
>> be expected.  If it is not, please let me know, and I can reply with
>> the particular errors that I'm encountering.)
>>
>> Has anyone done anything like this, or does anyone have any
>> suggestions for handling things like this?  So far, I've considered
>> adding some preconditions to the rule that would require that
>> computable properties of related resources must be computed first
>> (which would require more explicit connections in the data), or having
>> Eval return some sort of continuation or promise/delay type object, or
>> a new rule that could finish the computation when more information
>> becomes available.
>>
>> I think this is pushing the boundaries of the rule engine, but any and
>> all suggestions are welcome!
>>
>> //Joshua
>>
>> [1] http://ceur-ws.org/Vol-921/openmath-01.pdf

On Mon, Jul 8, 2013 at 1:02 PM, Adrian Walker <[email protected]> wrote:
> Hi Joshua,
> You may be interested in the following examples.
> 1. Recursive using builtins
> www.reengineeringllc.com/demo_agents/CriticalPath1.agent
>
> 2. RDF
> www.reengineeringllc.com/demo_agents/RDFQueryLangComparison1.agent
>
> Apologies if you have seen this before, and thanks for comments.
>
>                                                     -- Adrian
>
> Internet Business Logic
> Open Apps for Open Data
> A Wiki and SOA Endpoint for Executable Open Vocabulary English Q/A Apps over
> SQL and RDF
> Online at www.reengineeringllc.com
> Shared use is free, and there are no advertisements

Hi,  I took a look, and the types of rules being expressed are
certainly instances of the types of recursive *rules* that I'm
interested in expressing.  E.g., the project time computation has to
recurse down the task tree.  However, I don't see Jena *builtins*
being used here (though I can imagine how these could be translated to
Jena *rules*).  Is there implementation source or something that I
should be looking at here?  I didn't find anything on the website, and
Google searches for

  builtin site:https://www.reengineeringllc.com/

and

  jena site:https://www.reengineeringllc.com/

don't return any relevant (the second has one hit, but only because
"JENA" appears in one of the texts).  Is there a source repository or
something that I missed?

//JT
-- 
Joshua Taylor, http://www.cs.rpi.edu/~tayloj/

Reply via email to