Evaluating Expression Graphs in RDF Languages #9
AdamSobieski
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Introduction
Ideas are presented about evaluating expression graphs in RDF languages, including lambda expression graphs.
The techniques described, below, can be useful for forming and evaluating set-algebraic operations such as intersection, union, and differencing, for forming and evaluating Boolean-algebraic operations such as conjunction, disjunction, and negation, and for forming and evaluating nested expressions involving these.
Considering the ideas presented in #7 and #8, what if the syntax possibilities resembling:
could, additionally or instead, be represented in a graph-based manner? What if such graphs could also be evaluated into results?
Examples
The following theorized syntax expression, resulting in a list:
could, additionally or instead, be expressed:
in TriG, this could also be expressed:
and, building on the
*symbol (see: #7), notation for dereferencing and evaluating an expression would resemble:with the resource
example.ttlbeing:Lambda Expressions
Lambda expressions could be represented via an
expr:LambdaExpressionclass and use instances of anexpr:ParameterExpressionclass. To create lambda-invocation expressions, one could use a?( ...)syntax and, putting it all together, evaluating a dereferenced graph's lambda expression with arguments could resemble the following examples.For a more complex example, in the case that a dereferenced lambda expression returned a list,
( ex:a ex:b ex:c ), the following:would become:
To expand a resultant list into multiple triples, such that each list element was the subject of its own triple, one could use the
*symbol:which would be evaluated into:
and then into:
Glossary
Abstract Syntax Tree, Expression
Conclusion
What do you think about these ideas? Thank you.
All reactions