|
|
c2ad96a5e0
|
docs: incorporate review feedback for resreq-ast-cse-design
- Rename grammar rules: or_expr→select_or, and_expr→select_and,
not_expr→select_not, atom_expr→select_primary
- Eliminate SEL_BOOL_LITERAL: parse true/false directly as
SEL_TRUE/SEL_FALSE; boolean resources used standalone (gpu,
not gpu==true)
- Remove 'true'|'false' from value production in grammar
- Use LSF-style unquoted strings in examples (type==linux,
not type=="linux")
- Document n-ary vs binary tree decision in §6.2
- Add §8.5 Evaluation Memoization: per-host select_eval_ctx_t
with node_id-indexed bool_bits bitmap, num_vals, str_vals
arrays; memoized eval_select with cache check; session lifecycle
(pre-session capacity, per-host alloc/discard, post-session
GC + node ID recompaction)
- Add node_id field to xce_select_node_t for eval context indexing
- Clarify §9 two-level sharing: select CSE is global, resreq
sharing is scoped to (user, queue, project)
- Clarify §10 select vs rusage boundary: select evaluates against
host snapshot, rusage checks host.available (total - booked)
|
2026-04-22 02:25:30 +00:00 |
|
|
|
19898a198a
|
docs: address deep document-review findings for resreq-ast-cse-design
Review by adversarial, feasibility, and product-lens reviewers.
Key changes:
- Add host_eval_ctx_t struct to carry both numeric and string host
resource values; xvec_idval_t is for job allocation, not host eval
- Fix SEL_FALSE case in eval_select (was returning -1 instead of 0)
- Add bval field to appendix xce_select_node_t struct
- Fix makeSelectNode key_add race (EEXIST now re-finds existing entry)
- Specify two-phase GC sweep to avoid iterator corruption in kvtab
- Add EDA cluster justification for CSE memory savings
- Use %.17g instead of %g for number-to-string coercion (full precision)
- Add #include "kv.h" dependency note for Phase 4
- Add runtime goroutine assertion requirement for CGO bridge safety
- Add gc_sweep_select_nodes() CGO call in Phase 6 session boundary
- Clarify job cleanup happens at session boundaries (no mid-session kill)
- Clarify sel_key_hash/sel_key_cmp must hash fields individually (padding)
|
2026-04-21 07:05:49 +00:00 |
|
|
|
877741d008
|
docs: address document-review findings for resreq-ast-cse-design
Multi-persona review (coherence, feasibility, adversarial, product-lens)
identified 25 findings. Applied 14 fixes:
- Fix makeSelectNode key_add return code bug (rc2 → rc3)
- Resolve derefSelectNode contradiction: remove function and refcount
field, adopt GC-only reclamation model
- Add boolean_literal grammar rule (true/false keywords) and
SEL_BOOL_LITERAL node type + bval union member
- Clarify transform pipeline: makeSelectNode does commutativity swap
internally; flattening/const-fold are post-parse tree walks
- Complete const-fold rules with annihilation laws
- Add SEL_NUM bit-cast semantics (±0 distinction, NaN payloads)
- Add resmgr=NULL fallback behavior spec
- Add runtime type safety assertions for debug builds
- Add GC trigger and session-based scheduler context
- Fix section numbering gap (renumber §5.6 → §5.5)
- Add gc_sweep_select_nodes/gc_mark_tree to Phase 2 declarations
- Update kill_primary_resreq instruction for GC model
- Add any keyword semantic inconsistency note (!= vs !(==))
4 open issues remain for implementation phase: string resource
interface, single-goroutine enforcement, kvtab iteration API,
CSE benefit quantification.
|
2026-04-21 03:29:31 +00:00 |
|
|
|
33b76d9a77
|
docs: add select expression AST with CSE/hash-consing design
Design document for implementing the select clause parser with:
- PEG grammar with LSF-compatible resname/string disambiguation
- Hash-consing CSE via intern table with TOCTOU-safe insertion
- Mark-and-sweep GC between scheduling sessions
- Explicit error propagation in eval_select (-1/0/1 tri-state)
- Parse-time type coercion for EQ/NE (e.g., type==5 converts 5 to "5")
- AST transform pipeline: commutativity canonicalization,
associativity flattening, const-fold (type==any -> SEL_TRUE)
- Special keywords: any, SEL_TRUE, SEL_FALSE
- String host resource accessor (parallel res_idx->char* lookup)
- res_type_t <-> XCE_VAL_* bidirectional mapping
- Single-goroutine CGO bridge invariant
|
2026-04-20 09:43:07 +00:00 |
|