Commit Graph

347 Commits

Author SHA1 Message Date
Brummel bde5aafb03 floats iter 4.5: codegen Float constants nan/inf/neg_inf as hex-double SSA values 2026-05-10 16:20:37 +02:00
Brummel 613aa39f0f floats iter 4.4 fixup: float_to_str returns CodegenError::Internal instead of panic 2026-05-10 16:18:39 +02:00
Brummel 581144a4f9 floats iter 4.4: codegen neg/int_to_float/float_to_int_truncate/is_nan + float_to_str-deferred 2026-05-10 16:15:39 +02:00
Brummel 3869641a31 floats iter 4.3: codegen Float comparison arms (fcmp olt/ole/ogt/oge/UNE) + lower_eq Float 2026-05-10 16:10:13 +02:00
Brummel 2a290704df floats iter 4.2 fixup: 3-tuple return for builtin_binop_typed + classifier helper 2026-05-10 16:07:11 +02:00
Brummel 8044a4d98c floats iter 4.2: codegen arithmetic dispatch on arg type — fadd/fsub/fmul/fdiv double 2026-05-10 16:01:35 +02:00
Brummel ac5e17e541 floats iter 4.1: codegen primitive registration + Float literal hex-double lowering 2026-05-10 15:54:20 +02:00
Brummel 0c514e034b plan: floats iter 4 — codegen + runtime (Float lowering paths + E2E fixture) 2026-05-10 15:51:20 +02:00
Brummel dbec90cefd floats iter 3: JOURNAL — iteration close (typecheck + builtins) 2026-05-10 15:43:31 +02:00
Brummel d6da5c26b1 floats iter 3.4: typecheck rejects Pattern::Lit Float with FloatPatternNotAllowed 2026-05-10 15:40:33 +02:00
Brummel fd3f74cfa0 floats iter 3.3: install Float constants nan/inf/neg_inf + io/print_float effect op 2026-05-10 15:35:19 +02:00
Brummel 60a4c687b3 floats iter 3.2: install neg/int_to_float/float_to_int_truncate/float_to_str/is_nan 2026-05-10 15:31:14 +02:00
Brummel 6890aa244f floats iter 3.1 fixup: correct stale ==-comparison comment + asymmetric Float test args + drop spec-section reference 2026-05-10 15:28:55 +02:00
Brummel 0981804dd3 floats iter 3.1: widen +/-/*/// and !=/</<=/>/>= to polymorphic forall a 2026-05-10 15:24:13 +02:00
Brummel 00a1c5f0e7 plan: floats iter 3 — typecheck + builtins (widen + install + Pattern::Lit::Float reject) 2026-05-10 15:20:09 +02:00
Brummel 4ccf1f25c1 floats iter 2: JOURNAL — iteration close (surface layer) 2026-05-10 15:14:02 +02:00
Brummel c619697a76 floats iter 2.3: surface print emits shortest round-trippable decimal with .0 fallback 2026-05-10 15:11:31 +02:00
Brummel f62bff08a3 floats iter 2.2: parser accepts Tok::Float in term and pat-lit positions 2026-05-10 15:07:39 +02:00
Brummel f960e39f8b floats iter 2.1 fixup: drop task-tags + refresh stale prose + uppercase-E + leading-dot tests 2026-05-10 15:04:50 +02:00
Brummel d0c9133ae4 floats iter 2.1: Tok::Float + LexError::InvalidFloat + spec-A2 grammar validator 2026-05-10 15:00:46 +02:00
Brummel 6664af4995 plan: floats iter 2 — surface lex + parse + print (round-trip property) 2026-05-10 14:57:34 +02:00
Brummel f227cce846 floats iter 1: JOURNAL — iteration close (schema layer) 2026-05-10 14:50:42 +02:00
Brummel b2d31824a1 floats iter 1.4 fixup: drop intra-doc-links to private hex_u64 (rustdoc baseline preservation) 2026-05-10 14:49:21 +02:00
Brummel 1a4e2f04b7 floats iter 1.4: refresh canonical.rs 'no floats' doc comment 2026-05-10 14:47:43 +02:00
Brummel 7c95a69780 floats iter 1.3: bit-stability tests for Literal::Float 2026-05-10 14:45:34 +02:00
Brummel 93bae2d02a floats iter 1.2 fixup: replace iter-N comment with durable rationale for explicit assertions 2026-05-10 14:44:14 +02:00
Brummel aa5b88e8d4 floats iter 1.2: register Float as a primitive type name 2026-05-10 14:42:23 +02:00
Brummel 93fe2da33c floats iter 1.1 fixup: trim form_a.md FLOAT bullet to match neighbour style 2026-05-10 14:40:16 +02:00
Brummel ec2811194b floats iter 1.1: Literal::Float variant + canonical hex serde + drift-test anchors 2026-05-10 14:36:08 +02:00
Brummel cdc9d64169 plan: floats iter 1 — schema layer (Literal::Float + canonical hex serde + primitive registration) 2026-05-10 14:26:17 +02:00
Brummel e37366f8dd spec: floats LLVM-IR fixes — fcmp une for !=, synth.rs sites, container-slot precision
Three classes of fix from the LLVM-IR audit:

1. != on Float: fcmp une, NOT fcmp one. one is 'ordered and not
   equal' (false for nan!=nan, breaks IEEE / user-fixed constraint).
   une is 'unordered or not equal' (true for nan!=nan, matches IEEE
   and Rust f64::ne).

2. crates/ailang-codegen/src/synth.rs touches the Float primitive at
   five sites the original spec missed: llvm_type, builtin_ail_type,
   builtin_effect_op_ret, type_descriptor (descriptor 'Fl' to avoid
   collision with ADT-name F-prefix), builtin_binop (becomes a
   transitional artefact, replaced by type-dispatched helper).

3. Float literals lower as LLVM hex-float syntax (double 0x4014...);
   nan/inf/neg_inf as direct SSA double constants at use site (NOT
   via the __unreachable__ analogue, which is a terminator
   instruction not a value); container slot layout precision
   (monomorphisation vs bitcast).
2026-05-10 14:14:54 +02:00
Brummel f7e2c3ee7a spec: floats — operators polymorphic over {Int, Float} + NaN/Inf constants + is_nan
Mainstream-aligns the Float surface: + - * / < <= > >= become
forall-quantified with codegen-dispatch on Int|Float (parallel to
today's == path), instead of the original draft's wort-style
fadd/flt/etc. Adds nan/inf/neg_inf as builtin constants and
is_nan : (Float) -> Bool. % stays Int-only (no fmod yet).

Iteration plan now flags iter 3 and iter 4 as widening passes
that must hold the no-Int-regression line.
2026-05-10 14:08:35 +02:00
Brummel 406bde0efc spec: floats milestone — Float as IEEE-754 binary64 primitive 2026-05-10 13:54:55 +02:00
Brummel b523ceb18d design-md-consolidation: audit close — JOURNAL entry + 3 follow-up items in roadmap (rustdoc sweep, architect-iron-law extension, drift-test fidelity widening) 2026-05-10 13:21:43 +02:00
Brummel 63df0c085c design-md-consolidation audit-tidy: close 3 architect drift items (Def kinds class/instance + Type::Forall constraints + letrec correction) 2026-05-10 13:20:40 +02:00
Brummel c6e433321e design-md-consolidation 4: journal entry + milestone close + roadmap mark done 2026-05-10 13:14:51 +02:00
Brummel e68d927e5a design-md-consolidation 4.4 fixup: drop 'Sharpened later the same day' temporal anchor + supplementary 'see closure conversion in JOURNAL' pointer 2026-05-10 13:10:45 +02:00
Brummel 49fc6738ba design-md-consolidation 4.4: cross-ref audit — JOURNAL queue → roadmap.md; bench pointers retained as binding-evidence anchors 2026-05-10 13:09:16 +02:00
Brummel 1605be75cb design-md-consolidation 4.3: drop 'Recently lifted gates' history paragraph from §What-is-not-yet-supported 2026-05-10 13:07:38 +02:00
Brummel 127a34a21b design-md-consolidation 4.2: strip ailang-docwriter agent workflow detail from Verification section; rule survives 2026-05-10 13:06:10 +02:00
Brummel 96270ced35 design-md-consolidation 4.1: fix Project-ecosystem stale agents/ path; expand Docs bullet to name roadmap.md + specs/ + plans/ 2026-05-10 13:04:03 +02:00
Brummel 9185014022 plan: design-md-consolidation 4 (workflow / cross-reference cleanup — final sweep) 2026-05-10 13:03:01 +02:00
Brummel af2064af6e design-md-consolidation 3: journal entry + roadmap sweep-3 closed 2026-05-10 12:58:54 +02:00
Brummel e21f264b93 design-md-consolidation 3.4 nit: drop task-ref doc-comment prefix + align def-kind list with lowercase tags 2026-05-10 12:57:11 +02:00
Brummel 934a6e18e6 design-md-consolidation 3.4 fixup: align DESIGN.md ClassDef/InstanceDef JSON tags with ast.rs lowercase serde rename 2026-05-10 12:53:36 +02:00
Brummel 4651fed5b7 design-md-consolidation 3.4: add design_schema_drift.rs — exhaustive-match drift test for ast.rs vs DESIGN.md §Data-model 2026-05-10 12:51:39 +02:00
Brummel e5d1c1e33b design-md-consolidation 3.3: ast.rs doc-comment names DESIGN.md §Data-model as canonical schema, drift test as enforcement 2026-05-10 12:48:21 +02:00
Brummel ac16100319 design-md-consolidation 3.2: invert §Data-model SoT — DESIGN.md canonical, ast.rs projection, drift test enforces 2026-05-10 12:46:15 +02:00
Brummel a100389c2f design-md-consolidation 3.1: remove 2 Rust code blocks from Decision 10 (Type::Fn + Suppress) — schema lives in §Data-model 2026-05-10 12:43:49 +02:00
Brummel 500aafb307 plan: design-md-consolidation 3 (schema SoT inversion + data-model hardening + drift test) 2026-05-10 12:42:35 +02:00