Skip to content

refactor(next): streamline AST execution bridges and eliminate query adapter layers (#576) - #580

Merged
remiceres merged 3 commits into
feature/corese-nextfrom
feature/576-streamline-ast-execution-bridges
Sep 9, 2026
Merged

refactor(next): streamline AST execution bridges and eliminate query adapter layers (#576)#580
remiceres merged 3 commits into
feature/corese-nextfrom
feature/576-streamline-ast-execution-bridges

Conversation

@remiceres

Copy link
Copy Markdown
Contributor

Summary

Streamlines and simplifies the execution bridge layers in fr.inria.corese.core.next.query.impl.sparql.bridge to eliminate unnecessary intermediate translation wrappers between the Next SPARQL AST and the query execution pipeline.

Closes #576

Changes

  • Centralize term resolution: Moved term-to-node resolution directly into SparqlTermResolver.toNode(TermAst), eliminating duplicated switch logic across bridge classes.
  • Eliminate builder indirection: Replaced static indirections in CoreseAstQueryBuilder and NativeEvaluationContext with direct calls to termResolver.toNode(term).
  • Relocate path predicate extraction: Moved simplePredicate(PathAst) to WhereCompiler where query and construct graph patterns are resolved.
  • Clean up imports & formatting: Removed redundant explicit imports and normalized EOF newlines across bridge classes.
  • Unit testing: Added dedicated unit tests in AstBackedExprTest covering AST term resolution, literal parsing, filter views, variable bindings, and immutability contracts.

Verification

  • ./gradlew compileJava compileTestJava: SUCCESS (0 errors, 0 warnings).
  • ./gradlew test: 2,628 tests executed, 2,628 passed, 0 failures.
  • ./gradlew enforceW3cRegressions: 2,327 stable passes, 0 regressions, 141 tests transitioned to passed.
  • SonarLint LSP scan: 0 alerts across all modified files.

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Overall Project 52.93% -0.01% 🍏
Files changed 88.54% 🍏

File Coverage
WhereCompiler.java 97.89% -2.11% 🍏
CoreseAstQueryBuilder.java 92.72% 🍏
NextFilterFromAst.java 80.95% 🍏
SparqlTermResolver.java 66.32% -2.89% 🍏
NativeEvaluationContext.java 64.81% 🍏
AstBackedExpr.java 54.84% 🍏

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown

Test Results

  425 files    425 suites   25s ⏱️
2 639 tests 2 639 ✅ 0 💤 0 ❌
2 653 runs  2 653 ✅ 0 💤 0 ❌

Results for commit 1af1045.

@remiceres
remiceres merged commit 7e6b3bf into feature/corese-next Sep 9, 2026
2 checks passed
@remiceres
remiceres deleted the feature/576-streamline-ast-execution-bridges branch September 9, 2026 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant