- Examples and Usage — practical samples for filtering/aggregation
- Future Work — planned enhancements and feasibility notes
- Facts only: compiles Prolog facts into AWK associative arrays with deduplication and composite keys.
- Infrastructure: module exists (
awk_target.pl), integrates withrecursive_compiler.pl, firewall hooks, options for separators/format/unique. - Output: self-contained AWK scripts (shebang, BEGIN block, lookup + dedup).
Example
person(alice).
person(bob).⇣
BEGIN { facts["alice"]=1; facts["bob"]=1 }
{ key = $1; if (key in facts && !(key in seen)) { seen[key]=1; print $0 } }- Streaming of rule bodies (single or multiple rules still TODO placeholders).
- Recursion patterns (tail/linear/fold/tree/mutual/transitive closure).
- Advanced features: CSV/JSONL ingestion, arithmetic/regex/string ops, inequality constraints beyond basic comparisons.
- Tail/linear recursion can be lowered to iterative loops/state in AWK (feasible).
- Bounded unrolling for small joins/paths is plausible; unbounded mutual recursion is likely too costly.
- Dedup and join emulation rely on associative arrays; performance depends on input size.
- Implement single-rule streaming compilation (joins, basic comparisons, dedup keying).
- Add multi-rule union handling with consistent key composition.
- Optional: bounded/iterative transitive closure for small graphs; simple tail recursion lowering.
- Extend input handling (CSV/JSONL) if needed, then add golden-file/integration tests for generated AWK.