The DSL¶
The DSL is the user-facing layer of nkdsl. It is designed to keep operator
construction declarative and readable.
The core pieces are:
nkdsl.SymbolicDiscreteJaxOperatoror the aliasnkdsl.DOperatorselectors such as
nkdsl.site(),nkdsl.emitted(), andnkdsl.symbol()(includingdefault/doc/dtypedeclarations)predicates built with
nkdsl.ir.PredicateExprupdate programs built with
nkdsl.Updateand helper functions such asnkdsl.shift()ornkdsl.write()emissions that attach a rewrite rule and matrix element to each active visit
compiler-integrated linting that reports actionable diagnostics at compile time
For custom fluent extensions, see Extending the DSL.
Linting¶
The DSL includes a compiler-integrated linting pass that runs during
.compile(). It checks unresolved symbols, index-safety issues, and sampled
connectivity validity (support, constraints, and local basis values).
Start with Linting for the overall workflow and policy options. Use Lint Messages for the full diagnostic message catalog with examples and resolutions.