xlog_ir/rir.rs
1//! Relational IR node definitions
2
3use xlog_core::{AggOp, RelId, ScalarType};
4
5/// Join type variants
6#[derive(Debug, Clone, Copy, PartialEq, Eq)]
7pub enum JoinType {
8 /// Standard inner join
9 Inner,
10 /// Left outer join
11 LeftOuter,
12 /// Semi join (exists check)
13 Semi,
14 /// Anti join (not exists / negation)
15 Anti,
16}
17
18/// Expression in filter predicates
19#[derive(Debug, Clone, PartialEq)]
20pub enum Expr {
21 /// Column reference by index
22 Column(usize),
23 /// Constant value
24 Const(ConstValue),
25 /// Binary comparison
26 Compare {
27 /// Left-hand side expression.
28 left: Box<Expr>,
29 /// Comparison operator.
30 op: CompareOp,
31 /// Right-hand side expression.
32 right: Box<Expr>,
33 },
34 /// Logical AND
35 And(Vec<Expr>),
36 /// Logical OR
37 Or(Vec<Expr>),
38 /// Logical NOT
39 Not(Box<Expr>),
40
41 // Arithmetic operations
42 /// Addition
43 Add(Box<Expr>, Box<Expr>),
44 /// Subtraction
45 Sub(Box<Expr>, Box<Expr>),
46 /// Multiplication
47 Mul(Box<Expr>, Box<Expr>),
48 /// Division
49 Div(Box<Expr>, Box<Expr>),
50 /// Modulo
51 Mod(Box<Expr>, Box<Expr>),
52
53 // Built-in functions
54 /// Absolute value
55 Abs(Box<Expr>),
56 /// Minimum of two values
57 Min(Box<Expr>, Box<Expr>),
58 /// Maximum of two values
59 Max(Box<Expr>, Box<Expr>),
60 /// Power (base, exponent)
61 Pow(Box<Expr>, Box<Expr>),
62 /// Type cast
63 Cast(Box<Expr>, ScalarType),
64
65 /// Conditional expression: if condition then then_expr else else_expr
66 /// The condition is a boolean comparison expression.
67 /// Used for UDF conditionals like: if X >= 100 then 1 else 2
68 Conditional {
69 /// Boolean condition (should evaluate to bool)
70 condition: Box<Expr>,
71 /// Expression to evaluate when condition is true
72 then_expr: Box<Expr>,
73 /// Expression to evaluate when condition is false
74 else_expr: Box<Expr>,
75 },
76}
77
78/// Projection expression -- either a pass-through column reference or a computed value.
79#[derive(Debug, Clone, PartialEq)]
80pub enum ProjectExpr {
81 /// Pass through column at given index.
82 Column(usize),
83 /// Compute an expression whose result has the given scalar type.
84 Computed(Expr, ScalarType),
85}
86
87/// Per-lookup-input permutation for W2.1 variable-ordering.
88///
89/// When a non-default leader is chosen, the dispatcher rotates kernel
90/// inputs and may swap the two columns of selected lookup atoms (triangle
91/// only — the 4-cycle has rotational symmetry and never needs col-swap).
92/// `swap_cols == true` means the dispatcher must materialize an owned
93/// 2-col view with cols swapped before calling the layout helper.
94#[derive(Debug, Clone, PartialEq, Eq)]
95pub struct LookupPerm {
96 /// Index into the **promoter's canonical input order**:
97 /// triangle = `[e_xy, e_yz, e_xz]`, 4-cycle =
98 /// `[e_wx, e_xy, e_yz, e_zw]`. `lookup_perms[i]` describes
99 /// kernel slot `i + 1` (slots 1, 2, 3 — the non-leader slots).
100 /// The leader slot 0 is identified by `VariableOrder::leader_idx`
101 /// and is never repeated here.
102 pub input_idx: u8,
103 /// Whether to swap col0 ↔ col1 on this input before the layout
104 /// helper sees it.
105 pub swap_cols: bool,
106}
107
108/// Maximum K supported by the 38-B K-clique variable-order plan.
109pub const K_CLIQUE_MAX_K: usize = 8;
110
111/// Maximum edge count for K=8 complete binary-edge clique, C(8, 2).
112pub const K_CLIQUE_MAX_EDGES: usize = 28;
113
114/// Column-order rewrite for one K-clique input edge.
115#[derive(Debug, Clone, PartialEq, Eq)]
116pub struct ColumnSwap {
117 /// Edge slot to rewrite after edge permutation.
118 pub edge_slot: u8,
119 /// Whether the two source columns should be swapped.
120 pub swap_cols: bool,
121}
122
123/// Sorted-layout requirements carried by a K-clique plan.
124#[derive(Debug, Clone, PartialEq, Eq)]
125pub struct SortedLayoutSpec {
126 /// Edge slots whose sorted layouts are required by the plan.
127 pub edge_slots: Vec<u8>,
128 /// Per-edge key-column order required by the sorted layout.
129 pub key_columns: Vec<Vec<u8>>,
130}
131
132/// Helper relation split requested by the K-clique plan.
133#[derive(Debug, Clone, PartialEq, Eq)]
134pub struct HelperSplitSpec {
135 /// Stable helper identifier within the plan.
136 pub helper_id: u8,
137 /// Variable whose prefix/fanout is split into the helper.
138 pub variable: u8,
139 /// Edge slots materialized into the helper relation.
140 pub edge_slots: Vec<u8>,
141}
142
143/// Stream group assigned to a K-clique plan.
144#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
145pub struct StreamGroupId(pub u8);
146
147/// Full variable-order plan for K=5..K=8 clique-family WCOJ dispatch.
148#[derive(Debug, Clone, PartialEq, Eq)]
149pub struct KCliqueVariableOrder {
150 /// Clique arity K.
151 pub k: u8,
152 /// Position for each variable id; unused entries are `u8::MAX`.
153 pub variable_positions: [u8; K_CLIQUE_MAX_K],
154 /// Edge-slot permutation; unused entries are `u8::MAX`.
155 pub edge_permutation: [u8; K_CLIQUE_MAX_EDGES],
156 /// Optional column swaps after edge permutation.
157 pub column_swaps: Vec<ColumnSwap>,
158 /// Sorted-layout requirements for runtime layout construction.
159 pub sorted_layout_requirements: SortedLayoutSpec,
160 /// Helper-split requests attached to this plan.
161 pub helper_split_specs: Vec<HelperSplitSpec>,
162 /// Stream group consumed by stream-mux scheduling.
163 pub stream_group: StreamGroupId,
164}
165
166impl KCliqueVariableOrder {
167 /// Creates a K-clique variable-order plan with all seven required fields.
168 pub fn new(
169 k: u8,
170 variable_positions: [u8; K_CLIQUE_MAX_K],
171 edge_permutation: [u8; K_CLIQUE_MAX_EDGES],
172 column_swaps: Vec<ColumnSwap>,
173 sorted_layout_requirements: SortedLayoutSpec,
174 helper_split_specs: Vec<HelperSplitSpec>,
175 stream_group: StreamGroupId,
176 ) -> Self {
177 Self {
178 k,
179 variable_positions,
180 edge_permutation,
181 column_swaps,
182 sorted_layout_requirements,
183 helper_split_specs,
184 stream_group,
185 }
186 }
187}
188
189/// Cost evidence carried with a planned WCOJ-vs-hash route.
190#[derive(Debug, Clone, Copy, PartialEq)]
191pub struct CostPredictionRecord {
192 /// Estimated WCOJ work under the selected plan.
193 pub wcoj_cost: f64,
194 /// Estimated hash-chain work under the captured fallback plan.
195 pub hash_cost: f64,
196}
197
198impl CostPredictionRecord {
199 /// Stable evidence for incomplete stats: hash is the safe default route.
200 pub fn empty() -> Self {
201 Self {
202 wcoj_cost: f64::INFINITY,
203 hash_cost: 0.0,
204 }
205 }
206}
207
208/// Auditable reason for a structured hash route.
209#[derive(Debug, Clone, Copy, PartialEq, Eq)]
210pub enum PlannedHashReason {
211 /// Planner had complete stats and predicted hash lower-cost.
212 PlannerPredictsHashWins,
213 /// Planner could not build a complete stats-backed plan.
214 IncompleteStatsSafeDefault,
215}
216
217/// Route chosen for a recognized multiway shape.
218#[derive(Debug, Clone, PartialEq)]
219pub enum MultiwayPlan {
220 /// Execute the WCOJ path with the attached K-clique plan.
221 WcojWithPlan(KCliqueVariableOrder),
222 /// Execute the captured fallback as a planned hash route.
223 PlannedHashRoute {
224 /// Why the recognized shape routes to hash.
225 reason: PlannedHashReason,
226 /// Cost evidence that made the route auditable.
227 planner_evidence: CostPredictionRecord,
228 },
229}
230
231/// Variable-ordering decision attached to a `MultiWayJoin`.
232///
233/// `None` on the parent variant preserves slice 1/2/4/W2.2 dispatch
234/// behavior bit-identically (default leader, no col-swap, no kernel
235/// projection — `output_columns` carries the binary-fallback projection
236/// as before).
237///
238/// When `Some`, the dispatcher consumes `leader_idx` to rotate the
239/// kernel `inputs`, applies any `lookup_perms` col-swaps, and
240/// post-projects the kernel-direct output buffer through
241/// `kernel_output_cols`. `MultiWayJoin::output_columns` stays untouched
242/// so binary-fallback consumers continue reading it directly.
243#[derive(Debug, Clone, PartialEq)]
244pub struct VariableOrder {
245 /// Selected leader's index in the canonical promoter input order
246 /// (e.g., for triangle: 0=e_xy, 1=e_yz, 2=e_xz). `0` reproduces
247 /// the default leader.
248 pub leader_idx: u8,
249 /// One entry per non-leader lookup input, in dispatcher slot order.
250 pub lookup_perms: Vec<LookupPerm>,
251 /// Permutation applied to the kernel-direct output buffer to
252 /// produce head-ordered columns. For default leader this would be
253 /// identity but the field is omitted (`var_order = None`) — slice
254 /// 1/2 keeps using `MultiWayJoin::output_columns` directly.
255 pub kernel_output_cols: Vec<ProjectExpr>,
256 /// Full K-clique variable-order plan for K=5..K=8. `None`
257 /// preserves the legacy triangle/4-cycle leader-permutation path.
258 pub kclique: Option<KCliqueVariableOrder>,
259}
260
261impl VariableOrder {
262 /// Creates the legacy triangle/4-cycle leader-permutation form.
263 pub fn legacy(
264 leader_idx: u8,
265 lookup_perms: Vec<LookupPerm>,
266 kernel_output_cols: Vec<ProjectExpr>,
267 ) -> Self {
268 Self {
269 leader_idx,
270 lookup_perms,
271 kernel_output_cols,
272 kclique: None,
273 }
274 }
275
276 /// Creates the full K-clique variable-order form.
277 pub fn kclique(kclique: KCliqueVariableOrder) -> Self {
278 Self {
279 leader_idx: 0,
280 lookup_perms: Vec::new(),
281 kernel_output_cols: Vec::new(),
282 kclique: Some(kclique),
283 }
284 }
285}
286
287/// Comparison operators
288#[derive(Debug, Clone, Copy, PartialEq, Eq)]
289pub enum CompareOp {
290 /// Equal (`==`)
291 Eq,
292 /// Not equal (`!=`)
293 Ne,
294 /// Less than (`<`)
295 Lt,
296 /// Less than or equal (`<=`)
297 Le,
298 /// Greater than (`>`)
299 Gt,
300 /// Greater than or equal (`>=`)
301 Ge,
302}
303
304/// Constant values in expressions
305#[derive(Debug, Clone, PartialEq)]
306pub enum ConstValue {
307 /// Unsigned 32-bit integer constant.
308 U32(u32),
309 /// Unsigned 64-bit integer constant.
310 U64(u64),
311 /// Signed 32-bit integer constant.
312 I32(i32),
313 /// Signed 64-bit integer constant.
314 I64(i64),
315 /// 32-bit float constant.
316 F32(f32),
317 /// 64-bit float constant.
318 F64(f64),
319 /// Boolean constant.
320 Bool(bool),
321 /// Interned symbol string constant.
322 Symbol(String),
323}
324
325/// Relational IR node types
326#[derive(Debug, Clone)]
327#[allow(clippy::large_enum_variant)]
328pub enum RirNode {
329 /// A 0-arity relation containing exactly one empty tuple ({()}).
330 ///
331 /// This is the identity element for joins and the natural seed for rules whose bodies
332 /// contain no positive atoms (e.g. `p() :- not q().`), allowing negation-only rules to
333 /// be lowered as set difference against a unit relation.
334 Unit,
335
336 /// Scan a base relation
337 Scan {
338 /// Relation identifier to scan.
339 rel: RelId,
340 },
341
342 /// Filter rows by predicate
343 Filter {
344 /// Input relation subtree to filter.
345 input: Box<RirNode>,
346 /// Boolean predicate applied to each row.
347 predicate: Expr,
348 },
349
350 /// Project specific columns (pass-through or computed)
351 Project {
352 /// Input relation subtree to project from.
353 input: Box<RirNode>,
354 /// Output projection expressions in result-column order.
355 columns: Vec<ProjectExpr>,
356 },
357
358 /// Join two relations
359 Join {
360 /// Left-hand input relation.
361 left: Box<RirNode>,
362 /// Right-hand input relation.
363 right: Box<RirNode>,
364 /// Column indices from the left input used as join keys.
365 left_keys: Vec<usize>,
366 /// Column indices from the right input used as join keys.
367 right_keys: Vec<usize>,
368 /// Join semantics to apply.
369 join_type: JoinType,
370 },
371
372 /// Production W6.3 two-atom chain join:
373 /// `head(...) :- left(..., Z, ...), right(..., Z, ...)`.
374 ///
375 /// The executor MAY dispatch this node through a specialized
376 /// physical route. On dispatch decline, it must execute `fallback`,
377 /// the IR-equivalent binary join captured at promotion time.
378 ChainJoin {
379 /// Left relation input. The W6.3 promoter emits a Scan.
380 left: Box<RirNode>,
381 /// Right relation input. The W6.3 promoter emits a Scan.
382 right: Box<RirNode>,
383 /// Join key column in `left`.
384 left_key: usize,
385 /// Join key column in `right`.
386 right_key: usize,
387 /// Output projection in head-tuple order.
388 output_columns: Vec<ProjectExpr>,
389 /// IR-equivalent binary-join plan for fallback execution.
390 fallback: Box<RirNode>,
391 },
392
393 /// Group by with aggregation
394 GroupBy {
395 /// Input relation subtree to aggregate.
396 input: Box<RirNode>,
397 /// Column indices preserved as grouping keys.
398 key_cols: Vec<usize>,
399 /// (value_column, aggregation_op)
400 aggs: Vec<(usize, AggOp)>,
401 },
402
403 /// Union multiple inputs
404 Union {
405 /// Input subtrees whose rows are concatenated together.
406 inputs: Vec<RirNode>,
407 },
408
409 /// Remove duplicates
410 Distinct {
411 /// Input relation subtree to deduplicate.
412 input: Box<RirNode>,
413 /// Column indices defining tuple identity.
414 key_cols: Vec<usize>,
415 },
416
417 /// Set difference (left - right)
418 Diff {
419 /// Left-hand input relation.
420 left: Box<RirNode>,
421 /// Right-hand input relation whose rows are excluded from the left input.
422 right: Box<RirNode>,
423 },
424
425 /// Fixpoint iteration for recursion
426 Fixpoint {
427 /// SCC identifier
428 scc_id: u32,
429 /// Base case computation
430 base: Box<RirNode>,
431 /// Recursive step computation
432 recursive: Box<RirNode>,
433 /// Relation for delta (new tuples)
434 delta_rel: RelId,
435 /// Relation for full result
436 full_rel: RelId,
437 },
438
439 /// A multi-way conjunctive join that the executor MAY dispatch to a
440 /// specialized physical operator (e.g. GPU WCOJ). When the dispatch
441 /// declines, the executor falls through to `fallback`, which is the
442 /// IR-equivalent binary-join plan captured at promotion time.
443 ///
444 /// **Invariant** (upheld by `xlog-logic::promote::promote_multiway`):
445 /// executing `fallback` produces the same row set as a successful
446 /// specialized dispatch.
447 ///
448 /// v0.6.5 slice 1 only emits this for the certified triangle shape;
449 /// 4-way and general-arity admission land in later slices.
450 ///
451 /// # Walker contract
452 ///
453 /// Generic walkers and visitors that handle `MultiWayJoin` MUST be
454 /// shape-agnostic over `inputs`, `slot_vars`, and `output_columns`
455 /// — no walker may assume a fixed arity or a specific
456 /// variable-class layout. Only matchers/promoters whose name
457 /// carries an explicit shape qualifier (e.g.
458 /// `match_multiway_triangle`, `try_promote_triangle`) may lock to
459 /// a specific shape.
460 MultiWayJoin {
461 /// Input scans, in physical-plan slot order. For the v0.6.5
462 /// initial promoter, this is exactly `[Scan(rel_xy), Scan(rel_yz),
463 /// Scan(rel_xz)]` for a recognized triangle. Each input MUST be
464 /// `RirNode::Scan { rel }` in v1.
465 inputs: Vec<RirNode>,
466 /// Per-slot, per-column variable-class id. Same id across slots →
467 /// join on that variable. For the canonical triangle this is
468 /// `[[Some(0), Some(1)], [Some(1), Some(2)], [Some(0), Some(2)]]`.
469 /// `None` is reserved for constant-bound or don't-care columns;
470 /// the v1 promoter never emits `None`.
471 slot_vars: Vec<Vec<Option<u32>>>,
472 /// Output projection in head-tuple order, identical to what the
473 /// equivalent `Project { input: Join { ... } }` carries. For the
474 /// triangle: `[Column(0), Column(1), Column(3)]`. The executor
475 /// re-validates this; a malformed or rotated projection is
476 /// treated as ineligible (no dispatch).
477 output_columns: Vec<ProjectExpr>,
478 /// IR-equivalent binary-join plan. Executed verbatim on dispatch
479 /// decline. Captured from the post-optimizer tree by the
480 /// promoter; never synthesized.
481 fallback: Box<RirNode>,
482 /// Structured route for recognized multiway shapes. K-clique
483 /// cost-gated hash routes are positive plans, not promoter
484 /// inability to handle the shape.
485 plan: Option<MultiwayPlan>,
486 /// Optional W2.1 variable-ordering decision.
487 ///
488 /// `None` preserves slice 1/2/4/W2.2 behavior bit-identically:
489 /// dispatcher uses default leader, no col-swap, post-kernel
490 /// projection is the existing `output_columns`.
491 ///
492 /// `Some(VariableOrder)` instructs the dispatcher to rotate
493 /// kernel inputs to put `leader_idx` at slot 0, apply
494 /// `lookup_perms` col-swaps, and post-project via
495 /// `kernel_output_cols`. `output_columns` is NOT consulted on
496 /// the W2.1 path; binary-fallback consumers still read it.
497 var_order: Option<VariableOrder>,
498 },
499
500 /// Tensorized ILP super-graph join. A DLPack mask tensor selects which
501 /// (body_i, body_j) → head_k rule combinations are active.
502 TensorMaskedJoin {
503 /// Name of the mask tensor registered in the runtime.
504 mask_name: String,
505 /// Arity of the relation schema participating in the tensorized join.
506 schema_size: usize,
507 /// Left-side join key columns within the body schema.
508 left_keys: Vec<usize>,
509 /// Right-side join key columns within the body schema.
510 right_keys: Vec<usize>,
511 /// Mapping from tensor dimension index → (RelId, relation name).
512 /// Sorted by RelId for deterministic ordering (RD-36).
513 rel_index: Vec<(RelId, String)>,
514 /// Head relation name (for store lookup in executor, RD-12).
515 head_rel_name: String,
516 /// Head relation ID (for optimizer schema lookup, keyed by RelId, RD-27).
517 head_rel_id: RelId,
518 /// Maximum active rules to process (budget cap, RD-6).
519 max_active_rules: usize,
520 /// Column indices from the join result to project into the head schema.
521 /// Maps head column `i` to join result column `head_projection[i]`.
522 /// Join result columns are: [left_col_0..left_col_n, right_col_0..right_col_m].
523 head_projection: Vec<usize>,
524 },
525}
526
527impl RirNode {
528 /// Check if this node is a leaf (Scan)
529 pub fn is_leaf(&self) -> bool {
530 matches!(self, RirNode::Scan { .. })
531 }
532
533 /// Get all relation IDs referenced in this subtree
534 pub fn referenced_relations(&self) -> Vec<RelId> {
535 let mut rels = Vec::new();
536 self.collect_relations(&mut rels);
537 rels
538 }
539
540 fn collect_relations(&self, rels: &mut Vec<RelId>) {
541 match self {
542 RirNode::Unit => {}
543 RirNode::Scan { rel } => rels.push(*rel),
544 RirNode::Filter { input, .. } | RirNode::Project { input, .. } => {
545 input.collect_relations(rels);
546 }
547 RirNode::Join { left, right, .. }
548 | RirNode::ChainJoin { left, right, .. }
549 | RirNode::Diff { left, right } => {
550 left.collect_relations(rels);
551 right.collect_relations(rels);
552 }
553 RirNode::Union { inputs } => {
554 for input in inputs {
555 input.collect_relations(rels);
556 }
557 }
558 RirNode::GroupBy { input, .. } | RirNode::Distinct { input, .. } => {
559 input.collect_relations(rels);
560 }
561 RirNode::Fixpoint {
562 base,
563 recursive,
564 delta_rel,
565 full_rel,
566 ..
567 } => {
568 base.collect_relations(rels);
569 recursive.collect_relations(rels);
570 rels.push(*delta_rel);
571 rels.push(*full_rel);
572 }
573 RirNode::TensorMaskedJoin { rel_index, .. } => {
574 for (rel_id, _) in rel_index {
575 rels.push(*rel_id);
576 }
577 }
578 RirNode::MultiWayJoin { inputs, .. } => {
579 // Recurse into `inputs` only. The `fallback` references
580 // the same set by promoter invariant; walking both would
581 // double-count.
582 for input in inputs {
583 input.collect_relations(rels);
584 }
585 }
586 }
587 }
588}
589
590#[cfg(test)]
591mod tests {
592 use super::*;
593 use xlog_core::ScalarType;
594
595 #[test]
596 fn test_scan_node() {
597 let node = RirNode::Scan { rel: RelId(1) };
598 assert!(matches!(node, RirNode::Scan { rel: RelId(1) }));
599 assert!(node.is_leaf());
600 }
601
602 #[test]
603 fn test_join_node() {
604 let left = Box::new(RirNode::Scan { rel: RelId(1) });
605 let right = Box::new(RirNode::Scan { rel: RelId(2) });
606 let join = RirNode::Join {
607 left,
608 right,
609 left_keys: vec![0],
610 right_keys: vec![0],
611 join_type: JoinType::Inner,
612 };
613 assert!(matches!(join, RirNode::Join { .. }));
614 let rels = join.referenced_relations();
615 assert!(rels.contains(&RelId(1)));
616 assert!(rels.contains(&RelId(2)));
617 }
618
619 #[test]
620 fn test_fixpoint_node() {
621 let base = Box::new(RirNode::Scan { rel: RelId(1) });
622 let recursive = Box::new(RirNode::Scan { rel: RelId(2) });
623 let fp = RirNode::Fixpoint {
624 scc_id: 0,
625 base,
626 recursive,
627 delta_rel: RelId(3),
628 full_rel: RelId(4),
629 };
630 assert!(matches!(fp, RirNode::Fixpoint { scc_id: 0, .. }));
631 }
632
633 #[test]
634 fn test_anti_join() {
635 let left = Box::new(RirNode::Scan { rel: RelId(1) });
636 let right = Box::new(RirNode::Scan { rel: RelId(2) });
637 let anti = RirNode::Join {
638 left,
639 right,
640 left_keys: vec![0],
641 right_keys: vec![0],
642 join_type: JoinType::Anti,
643 };
644 if let RirNode::Join { join_type, .. } = anti {
645 assert_eq!(join_type, JoinType::Anti);
646 }
647 }
648
649 #[test]
650 fn test_expr_arithmetic() {
651 let expr = Expr::Add(
652 Box::new(Expr::Column(0)),
653 Box::new(Expr::Const(ConstValue::I64(1))),
654 );
655 assert!(matches!(expr, Expr::Add(_, _)));
656 }
657
658 #[test]
659 fn test_project_expr_computed() {
660 let proj = ProjectExpr::Computed(
661 Expr::Add(
662 Box::new(Expr::Column(0)),
663 Box::new(Expr::Const(ConstValue::I64(1))),
664 ),
665 ScalarType::I64,
666 );
667 assert!(matches!(proj, ProjectExpr::Computed(_, _)));
668 }
669}