Qwiratry
=begin rakudoc
Overview
Qwiratry is a Raku architecture for declarative queries and flexible data walking, suitable for trees, tables, relational structures, logic-programming environments, and anything reasonably structured and traversable.
Qwiratry provides a general-purpose query execution pipeline that separates what to query from how to walk the data. This design enables the same query to work across different data models without forcing a single semantic interpretation.
Key Features
Separation of concerns: queries describe intent; walkers interpret and execute; query iterators yield results.
Reusability: walkers can produce multiple iterators, and queries can be reused and optimized.
Composability: supports composite walker handovers for multi-domain queries.
Declarative transformations: XSLT-like mold system for structured data manipulation.
Flexible execution: supports backtracking, multi-phase execution, and optimization planning.
Domain flexibility: works with trees, tables, logic programming, and hybrid systems.
Installation
Install from the package manager:
zef install Qwiratry
Qwiratry currently requires RakuAST support when running:
export RAKUDO_RAKUAST=1
Quick Start
#!/usr/bin/env raku
use Qwiratry::Mold::Slang;
use Qwiratry;
my %data-structure = type => 'element', value => 42;
# Declare a transformer with molds.
#transformer MyTransform is Transformer {
transformer MyTransform {
mold when { .<type> eq 'element' } do {
%( |$_, transformed => True )
}
mold do {
$_
}
}
# Apply the transformer to the tree
say MyTransform(%data-structure);
Requirements
Raku 6.e or later.
Slangify.Implementation::Loaderv0.0.7 or later.RAKUDO_RAKUAST=1in the environment.
Documentation
Operators: query operator reference.
t/examples/: example code and usage patterns.
License
See the repository for license information.
Author
Tim Nelson (wayland at wayland dot id dot au)
=end rakudoc