Skip to main content

vyre_spec/
catalog_slices.rs

1const EXPR_VARIANTS: &[&str] = &[
2    "LitU32",
3    "LitI32",
4    "LitF32",
5    "LitBool",
6    "Var",
7    "BufferRef",
8    "Load",
9    "BufLen",
10    "InvocationId",
11    "WorkgroupId",
12    "LocalId",
13    "BinOp",
14    "UnOp",
15    "Call",
16    "Select",
17    "Cast",
18    "Fma",
19    "Atomic",
20    "SubgroupBallot",
21    "SubgroupShuffle",
22    "SubgroupReduce",
23    "Opaque",
24];
25
26const LAW_CATALOG: &[&str] = &[
27    "commutative",
28    "associative",
29    "identity",
30    "left-identity",
31    "right-identity",
32    "self-inverse",
33    "idempotent",
34    "absorbing",
35    "left-absorbing",
36    "right-absorbing",
37    "involution",
38    "de-morgan",
39    "monotone",
40    "monotonic",
41    "bounded",
42    "complement",
43    "distributive",
44    "lattice-absorption",
45    "inverse-of",
46    "trichotomy",
47    "zero-product",
48    "custom",
49];
50
51/// Return the frozen catalog of core `Expr` variant names.
52#[must_use]
53pub fn expr_variants() -> &'static [&'static str] {
54    EXPR_VARIANTS
55}
56
57/// Return the catalog of all algebraic-law variant fingerprints.
58#[must_use]
59pub fn law_catalog() -> &'static [&'static str] {
60    LAW_CATALOG
61}