sparql_runtime.pl -- SPARQL runtime support
- sparql_true(+Term)
- Generated from FILTER Term, where Term must be converted to a boolean as 'Effective Boolean Value'.
- eval(+Term, -Result)[private]
- eval(+Type, +Term, -Result) is semidet[private]
- Evaluate Term, converting the resulting argument to Type.
- eval_known_typed_literal(+Type, +Plain, -Typed) is semidet[private]
- Map known datatypes to a value that is suitable for comparison using Prolog standard order of terms. Note that the mapped time representations can all be compared.
- numeric_literal_value(+Literal, -Value) is semidet[private]
- Convert a SPARQL numeric literal into its value for the purpose of comparison-by-value.
- sparql_op(+ListOfDelcs)[private]
- expand_op(+In, -Clause) is det[private]
- Expand SPARQL operators into a nice clause.
- op(+Operator, -Result) is semidet[private]
- time_part(+Part, +Type, +String, -Value) is semidet[private]
- seconds_xsd_duration(+Seconds, -XSDDuration)[private]
- string_op1(+A1, -R, +Op)[private]
- string_op_string(+A, -R)[private]
- string_int_op_string(+S0, +I, -S)[private]
- string_int_int_op_string(+S0, +I, -S)[private]
- string_op2(+A1, +A2, -R, +Op)[private]
- Define operations on strings.
- iri(+Spec, +Base, -IRI)[private]
- argument_compatible(+A1, +A2, -Bool, +Op)[private]
- atom_op(+Op, +Atom, -Result)[private]
- atom_op(+Op, +Atom, +Arg, -Result)[private]
- atom_op(+Op, +Atom, +A1, +A2, -Result)[private]
- combine_types_div(+TypeLeft, +TypeRight, -Type)[private]
- combine_types(+TypeLeft, +TypeRight, -Type)[private]
- rdf_equal(+RDFTerm, +RDFTerm, -Boolean)[private]
- RDF Term equivalence. Described as lexical equivalence, except where we have the logic to do value equivalence.
- boolean_value(+Content, -Bool)[private]
- Convert the value from
literal(xsd:boolean, Content)
into either 'true' or 'false'. - xsd_cast(+Term, -Type, -Arg)[private]
- Deals with xsd:dateTime(?a), casting ?a to the XML Schema type dateTime. Supported types are the numeric types, xsd:boolean and xsd:dateTime.
- eval_cast(+Type, +Value, -Result)[private]
- Cast Value to Type, resulting in a typed literal. Currently casts plain literals to the requested type and numeric values to other numeric values.
- eval_function(+Term, -Result)[private]
- Eval user-defined function. User-defined functions are of the
form sparql:
function(Term, Result)
. - not(+Bool, -Negated)[private]
- bound(X)[private]
- Does not evaluate args. If the argument is a function it is always bound.
- str(+RDFTerm, -Atom)[private]
- Extract lexical representation from RDFTerm.
- lang(+RDFTerm, -Lang)[private]
- Extract language specification from an RDFTerm
- datatype(+RDFTerm, -IRI)[private]
- Extract type specification from an RDFTerm
- sparql_and(+A, +B, -Result)[private]
- sparql_or(+A, +B, -Result)[private]
- isiri(+IRI)[private]
- True if IRI is an IRI. We get the argument un-evaluated.
- regex(+Haystack, +Needle, +Flags) is semidet[private]
- compiled_regex(+Compiled, +Text) is semidet[private]
- Test using a regex that has been prepared. Compiled is a regex blob created by regex_obj/3.
- regex_replace(+Input, +Pattern, +Replace, +Flags, -Result)[private]
- regex(+String, +Pattern, +Flags)[private]
- TBD:
- Avoid XPCE
- Complete flags
- compiled_regex(+Compiled, +Text) is semidet[private]
- Test using a regex that has been prepared. Compiled takes the
following forms:
- XPCE object
- effective_boolean_value(+Expr, -Bool)[private]
- See SPARQL document, section 11.2.2: Effecitive Boolean Value
- sparql_eval(+Expr, -Results)
- Evaluate a SPARQL expression.
- sparql_eval_raw(+Expr, -Result)
- Same as sparql_eval/2, but return the raw result.
- is_rdf(+Term)[private]
- True if Term is a valid RDF term.
- sparql_find(?From, ?To, ?F, ?T, :Q) is nondet
- Implement *(PropertyPath). We should probably collect translated
queries in a dynamic predicate to avoid the copy_term. Also, Q
will quite often be simple. In that case we can map to
rdf_reachable/3, although one of the problems is that
rdf_reachable/3 uses rdf_has/3, and does not deal with graphs.
We should be a bit smarter here and choose between forward, backward, two-sided breath-first, etc. based on which start point is given.
- query_graph(+Query, -Graph) is semidet[private]
- True when Query is associated with graph. Note that property paths are always executed in a single graph.
- rdf_current_node(?Graph, -Resource)[private]
- True when Resource is a resource in Graph. This means it is either a subject or an object of a triple in Graph.
- rdf_current_node(-Resource)[private]
- Generates all known resources on backtracing. This is there to support {?s :p* ?o}. A highly dubious query.
- sparql_minus(:QLeft, :QRight)
- Realise SPARQL
MINUS
. This is defined to- Take the variables of QLeft
- Determine the result-set for these variables for both QLeft and QRight
- Substract those from QLeft that are in QRight
- sparql_group(:Goal)
- Same as call. Intended to keep groups together to avoid invalid optimizations.
- sparql_group(:Goal, +OuterVars, +InnerVars)
- Execute a group that contains non-steadfast variables, which asks for delayed unification of the output arguments.
- sparql_service(+Silent, +URL, +Prefixes, +Bindings, +QText)
- Execute a remote SPARQL SERVICE request
- sparql_reset_bnodes
- Reset the database for the BNODE(str) function
- sparql_simplify(:Goal, -Simple) is det
- Simplify goals to the SPARQL runtime functions before they are handed to the general optimizer and runtime evaluation.
- simplify_true(+Expr, -Goal) is semidet[private]
- Simplify a boolean expression resulting from a SPARQL FILTER statement. Ideally, this should be a simple partial evaluation of sparql_true/1.
- simplify_test(+Expr0, -Expr) is det[private]
- Perform analysis on specific tests. Currently optimizes regex tests.
- simplify_eval(+Expr, +Value, -Goal) is semidet[private]
- sparql_subquery(+Proj, :Query, +Solutions) is nondet
- Execute a SPARQL subquery.
- sparql_update(:Updates) is det
- Handle SPARQL update requests.
- insert_triple(+Graph, +Triple) is det[private]
- delete_triple(+Graph, +Triple) is det[private]
- Delete matching triples
- delete_triples(+Graph:atom, +SimpleTriplePattern:compound) is det[private]
- graph(+Spec, -Graph)[private]
- clear_db(+Clear)[private]
- Note that CLEAR ALL cannot use rdf_reset_db because we are in a transaction.