Apache Jena

Apache Jena is a Java Framework for linked data that supports querying RDF data via SPARQL. We ran Jena on OpenJDK 1.8 (Java 8) using Property Paths for the queries. To allow for deeper recursions we increased the JVM's thread stack size to 16MB using the environment variable JVM_ARGS=-Xss16m. With the default settings we quickly had a stack overflow in the Java Virtual Machine for graphs that had a diameter of more than 2000.

For Jena we can measure the resource usage using /usr/bin/time.


Graph databases and and RDF Triple Stores accept queries in the SPARQL format. SPARQL does not allow for general recursion but SPARQL 1.1 added Property Paths where non-variable predicates could be combined in a similar fashion to regular expressions.

# tcff.qry
prefix : <http://example.org/stuff/1.0/>
SELECT (count(*) as ?resultcount) WHERE {?a :par+ ?b}

Launch: arq --data={instance} --query=tcff.qry

Transitive Closure with Jena is also part of the OpenRuleBench suite. OpenRuleBench uses the default Jena OWL reasoner through Jena's Java API.