Skip to content

refactor(next): clean up internal Kgram engine modules and eliminate legacy debt - #632

Merged
remiceres merged 3 commits into
feature/corese-nextfrom
refactor/617-cleanup-kgram-engine
Oct 19, 2026
Merged

remiceres merged 3 commits into
feature/corese-nextfrom
refactor/617-cleanup-kgram-engine

Conversation

@remiceres

Copy link
Copy Markdown
Contributor

Summary

This PR cleans up, modernizes, and consolidates the native query engine in core.next, eliminating historical KGRAM baggage and unifying execution on top of immutable query plans, progressive streaming SELECT, and clean boundary architecture.

Resolves #617

Key Changes

  • Elimination of KGRAM Baggage: Removed legacy Type.PATH, initPath, clean(), isGraphPath(), min/max bounds, and obsolete query path flags (isCheckLoop, isListPath, isStorePath, isCachePath, isCountPath, pathFilter).
  • Data & Parser Refactoring: Introduced NTriplesQuadsTermDecoder replacing AbstractNTriplesNQuadsListener, cleaned up serializer options, and removed reflection-based tests.
  • Unified SPARQL Execution: Consolidated query and update pipelines into SparqlQueryExecutor, SparqlUpdateExecutor, and AstBackedFilter. Replaced legacy visitors.
  • Immutable Compiled Query Plans & Progressive SELECT: Added query plan caching (CompiledQueryPlan, PreparedQueryPlan), Top-K selection with online ranking, and streaming tuple result consumption with transactional snapshot safety.
  • Architecture & Quality: Enforced -Werror and isolated classpath in build.gradle.kts (checkNext task), validated zero boundary violations in NextModuleBoundaryTest, and updated specifications in docs/.

Validation

  • Tests: 3,372 Corese unit & integration tests passing (100%).
  • Isolated Native Engine (./gradlew checkNext): Passing 100% in 43s with 0 compiler warnings.
  • W3C Conformance: 2,915 SPARQL 1.1 test cases status preserved, EARL validated.
  • SonarLint: 0 issues across all modified files.
  • Memory Footprint: Reference footprint unchanged (90,827,088 bytes at 600k statements).

…er options

- Rename AbstractNTriplesNQuadsListener to dedicated NTriplesQuadsTermDecoder
- Remove obsolete reflection and deprecated adapters in serializer test fixtures
- Clean up serialization options and literal temporal value representations
…M debt

- Remove obsolete KGRAM artifacts: Type.PATH, initPath, clean, min/max bounds, isGraphPath
- Strip unused query path flags (isCheckLoop, isListPath, isStorePath, isCachePath, isCountPath) and pathFilter
- Unify SPARQL execution pipeline with SparqlQueryExecutor, SparqlUpdateExecutor, and AstBackedFilter
- Add immutable compiled query plans with cache, top-k selection, and progressive streaming evaluation
- Expand execution diagnostics and memory storage snapshot query isolation tests

Resolves #617
…stics documentation

- Enforce isolated native classpath and -Werror in build.gradle.kts
- Update architectural boundary tests in NextModuleBoundaryTest
- Document streaming SELECT, Top-K ordering, plan caching, and execution diagnostics
@remiceres remiceres added the refactoring Internal code restructuring and architecture cleanup label Oct 19, 2026
@remiceres
remiceres merged commit c9b0301 into feature/corese-next Oct 19, 2026
1 check failed
@remiceres
remiceres deleted the refactor/617-cleanup-kgram-engine branch October 19, 2026 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactoring Internal code restructuring and architecture cleanup

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant