Note: project under heavy development!
Please, see documentation for details.
UCFS is an Universal Context-Free Solver: a GLL‑based tool for problems at the intersection of context‑free languages over edge‑labeled directed graphs. Examples of such problems:
- Parsing
- Context-free path querying (CFPQ)
- Context-free language reachability (CFL-R)
- static code analysis
Highlights
- Kotlin implementation with a concise Grammar DSL (EBNF‑friendly).
- Input: arbitrary edge‑labeled directed graphs.
- Output: SPPF -- finite structure for all‑paths queries.
docs/ # documentation pages
generator/ # Parser & AST node‑class generator <in progress>
solver/ # Core UCFS logic (GLL + RSM)
test-shared/ # Testcases, grammars, inputs, ANTLR4 comparison
# grammar examples and experiments
- JDK 11+ (toolchain targets 11).
- Gradle Wrapper included (
./gradlew).
- Describe grammar in Kotlin DSL.
- Load graph (for now
dotformat is supported). - Run query.
- Inspect results.
UCFS is based on Generalized LL (GLL) parsing algorithm modified to handle language specification in form of Recursive State Machines (RSM) and input in form of arbitratry directed edge-labelled graph. Basic ideas described here.