-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGARelTypes.td
More file actions
43 lines (30 loc) · 1.06 KB
/
Copy pathGARelTypes.td
File metadata and controls
43 lines (30 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#ifndef GAREL_TYPES
#define GAREL_TYPES
include "mlir/IR/AttrTypeBase.td"
include "GARelDialect.td"
include "GARelAttr.td"
class GARel_Type<string name, string typeMnemonic, list<Trait> traits = []>
: TypeDef<GARel_Dialect, name, traits> {
let mnemonic = typeMnemonic;
}
def Relation : GARel_Type<"Relation", "rel"> {
let summary = "A set of tuples";
let parameters = (ins OptionalArrayRefParameter<"mlir::Type">:$columns);
let assemblyFormat = [{
`<` $columns `>`
}];
}
def Tuple : GARel_Type<"Tuple", "tuple"> {
let summary = "A single tuple";
let parameters = (ins OptionalArrayRefParameter<"mlir::Type">:$columns);
let assemblyFormat = [{
`<` $columns `>`
}];
}
def ColumnType : Type<CPred<"::garel::isColumnType($_self)">, "column type">;
def I64Relation : Type<
CPred<"::garel::getI64RelationType($_self.getContext()) == $_self">,
"relation with a single i64 column",
"RelationType">,
BuildableType<"::garel::getI64RelationType($_builder.getContext())">;
#endif // GAREL_TYPES