srdatalog.ir.codegen.cuda.schema¶
Schema types for C++ codegen.
Describes the per-program relation declarations that drive the emitted
C++ using aliases (RelationSchema, Database, SemiNaiveDatabase). Ported
from mhk’s python-api-notemplate branch nt_schema.py; independent of
MIR types, so nothing here couples back to mir_types.
Two emission formats exist:
str(schema)— plain alias list, used by the orchestrator today.schema.get_batch_prelude(name)— same aliases plus the Database / SemiNaiveDatabase typedefs, used at the top of each JIT batch file.
Module Contents¶
Classes¶
A schema-declared relation. |
|
Fact pragmas. INPUT carries the CSV filename to load from (required
for |
|
All relations used by a program. Order matters for the emitted
|
API¶
- class srdatalog.ir.codegen.cuda.schema.FactDefinition[source]¶
A schema-declared relation.
namemust match the relation name used by MIR nodes (InsertInto.rel_name, ColumnSource.rel_name, …).paramsis the column type tuple, e.g.[int, int]for an arity-2 int-valued relation.- pragmas: dict[srdatalog.ir.codegen.cuda.schema.Pragma, Any]¶
‘field(…)’
- class srdatalog.ir.codegen.cuda.schema.Pragma(*args, **kwds)[source]¶
Bases:
enum.EnumFact pragmas. INPUT carries the CSV filename to load from (required for
load_data()in the FFI wrapper). PRINT_SIZE and SEMIRING are bool.Initialization
- INPUT¶
‘input’
- PRINT_SIZE¶
‘print_size’
- SEMIRING¶
‘semiring’
- class srdatalog.ir.codegen.cuda.schema.SchemaDefinition[source]¶
All relations used by a program. Order matters for the emitted
AST::Database<...>template argument list.- facts: list[srdatalog.ir.codegen.cuda.schema.FactDefinition]¶
None