You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Query] Support RDF collection lists and blank node freshness in CONSTRUCT templates #600
Support compilation and materialization of RDF collection lists ((...)) and ensure blank node identifier freshness per solution mapping in CONSTRUCT templates.
Target Branch
feature/corese-next
Specification & Semantics
According to W3C SPARQL 1.1 Query (§16.2):
RDF collection syntax ( ?s ?o ) inside a CONSTRUCT template must expand to standard rdf:first and rdf:rest chains terminating with rdf:nil. No additional rdf:type rdf:List triple is required.
Blank nodes in a CONSTRUCT template must generate fresh blank node identifiers for each solution mapping in the result sequence.
Multiple occurrences of the same blank node label within a single template instance must refer to the same instantiated blank node for that solution, preserving internal graph reification structure.
Note: Basic - List 1 tests () inside a SELECT WHERE pattern, which is independent of CONSTRUCT template processing and is tracked separately.
Targeted W3C SPARQL 1.0 / 1.1 Test Cases
dawg-construct-reification-1 (Reification of default graph)
dawg-construct-reification-2 (Reification of default graph)
In CoreseAstQueryBuilder.java, examine compileConstructTemplate and how RDF collection AST nodes (ListPatternAst or equivalent) are compiled into the template Exp.
In construct result materialization (CoreseGraphQuery.java / ConstructTemplate), verify how blank node terms are allocated: fresh per solution mapping, while caching identity within the same solution mapping.
Acceptance Criteria
[ ] Unit test demonstrating blank node freshness across multiple solutions in a CONSTRUCT query.
[ ] Blank nodes generated in CONSTRUCT instantiate unique identifiers per solution row while preserving internal graph structure.
[ ] RDF collections in construct templates produce valid rdf:first / rdf:rest chains terminating in rdf:nil.
[ ] Targeted W3C construct reification and list tests pass.
[ ] 0 SonarLint issues and cognitive complexity < 15.
Activity
feat(sparql): support construct collections, fresh blank nodes, IRI e…
remiceres commentedon Sep 29, 2026
Resolved via PR #612