Skip to main content

sim_shape/
citizen.rs

1//! Citizen integration for shape objects: class registration, codec, and
2//! construction wiring, plus the per-shape class-symbol accessors.
3
4#[path = "citizen/class.rs"]
5mod class;
6#[path = "citizen/codec.rs"]
7mod codec;
8#[path = "citizen/construct.rs"]
9mod construct;
10#[path = "citizen/inventory.rs"]
11mod inventory;
12
13pub(crate) use class::register_shape_citizen_class;
14pub(crate) use codec::{
15    build_shape_value, decode_expr_kind, decode_extra, decode_hooks, decode_shape_list,
16    decode_shape_value, decode_symbol, decode_table_fields, decode_venn_members, encode_extra,
17    encode_hooks, encode_shape_expr, encode_shape_list, encode_table_fields, expr_kind_symbol,
18    or_strategy_symbol,
19};
20
21/// Class symbol for the `Any` shape citizen (`shape/Any`).
22pub fn any_shape_class_symbol() -> sim_kernel::Symbol {
23    sim_kernel::Symbol::qualified("shape", "Any")
24}
25
26/// Class symbol for the exact-expression shape citizen (`shape/ExactExpr`).
27pub fn exact_expr_shape_class_symbol() -> sim_kernel::Symbol {
28    sim_kernel::Symbol::qualified("shape", "ExactExpr")
29}
30
31/// Class symbol for the expression-kind shape citizen (`shape/ExprKind`).
32pub fn expr_kind_shape_class_symbol() -> sim_kernel::Symbol {
33    sim_kernel::Symbol::qualified("shape", "ExprKind")
34}
35
36/// Class symbol for the class-membership shape citizen (`shape/Class`).
37pub fn class_shape_class_symbol() -> sim_kernel::Symbol {
38    sim_kernel::Symbol::qualified("shape", "Class")
39}
40
41/// Class symbol for the list shape citizen (`shape/List`).
42pub fn list_shape_class_symbol() -> sim_kernel::Symbol {
43    sim_kernel::Symbol::qualified("shape", "List")
44}
45
46/// Class symbol for the table shape citizen (`shape/Table`).
47pub fn table_shape_class_symbol() -> sim_kernel::Symbol {
48    sim_kernel::Symbol::qualified("shape", "Table")
49}
50
51/// Class symbol for the disjunction shape citizen (`shape/Or`).
52pub fn or_shape_class_symbol() -> sim_kernel::Symbol {
53    sim_kernel::Symbol::qualified("shape", "Or")
54}
55
56/// Class symbol for the conjunction shape citizen (`shape/And`).
57pub fn and_shape_class_symbol() -> sim_kernel::Symbol {
58    sim_kernel::Symbol::qualified("shape", "And")
59}
60
61/// Class symbol for the negation shape citizen (`shape/Not`).
62pub fn not_shape_class_symbol() -> sim_kernel::Symbol {
63    sim_kernel::Symbol::qualified("shape", "Not")
64}
65
66/// Class symbol for the repetition shape citizen (`shape/Repeat`).
67pub fn repeat_shape_class_symbol() -> sim_kernel::Symbol {
68    sim_kernel::Symbol::qualified("shape", "Repeat")
69}
70
71/// Class symbol for the hook-wrapped shape citizen (`shape/Hooked`).
72pub fn hooked_shape_class_symbol() -> sim_kernel::Symbol {
73    sim_kernel::Symbol::qualified("shape", "Hooked")
74}
75
76/// Class symbol for the Venn-set shape citizen (`shape/Venn`).
77pub fn venn_shape_set_class_symbol() -> sim_kernel::Symbol {
78    sim_kernel::Symbol::qualified("shape", "Venn")
79}