@nudojs/core 1.14.1 → 1.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -178,6 +178,53 @@ var TYPEOF_NAMES = [
178
178
  function primToTypeof(p) {
179
179
  return p;
180
180
  }
181
+ var ieeeBits = new DataView(new ArrayBuffer(8));
182
+ function nextUp(n) {
183
+ if (Number.isNaN(n) || n === Infinity) return n;
184
+ if (n === 0) return Number.MIN_VALUE;
185
+ ieeeBits.setFloat64(0, n, true);
186
+ const hi = ieeeBits.getUint32(4, true);
187
+ const lo = ieeeBits.getUint32(0, true);
188
+ if (hi & 2147483648) {
189
+ if (lo === 0) {
190
+ ieeeBits.setUint32(0, 4294967295, true);
191
+ ieeeBits.setUint32(4, hi - 1, true);
192
+ } else {
193
+ ieeeBits.setUint32(0, lo - 1, true);
194
+ }
195
+ } else {
196
+ if (lo === 4294967295) {
197
+ ieeeBits.setUint32(0, 0, true);
198
+ ieeeBits.setUint32(4, hi + 1, true);
199
+ } else {
200
+ ieeeBits.setUint32(0, lo + 1, true);
201
+ }
202
+ }
203
+ return ieeeBits.getFloat64(0, true);
204
+ }
205
+ function nextDown(n) {
206
+ if (Number.isNaN(n) || n === -Infinity) return n;
207
+ if (n === 0) return -Number.MIN_VALUE;
208
+ ieeeBits.setFloat64(0, n, true);
209
+ const hi = ieeeBits.getUint32(4, true);
210
+ const lo = ieeeBits.getUint32(0, true);
211
+ if (hi & 2147483648) {
212
+ if (lo === 4294967295) {
213
+ ieeeBits.setUint32(0, 0, true);
214
+ ieeeBits.setUint32(4, hi + 1, true);
215
+ } else {
216
+ ieeeBits.setUint32(0, lo + 1, true);
217
+ }
218
+ } else {
219
+ if (lo === 0) {
220
+ ieeeBits.setUint32(0, 4294967295, true);
221
+ ieeeBits.setUint32(4, hi - 1, true);
222
+ } else {
223
+ ieeeBits.setUint32(0, lo - 1, true);
224
+ }
225
+ }
226
+ return ieeeBits.getFloat64(0, true);
227
+ }
181
228
  var pTrue = { op: "true" };
182
229
  var pFalse = { op: "false" };
183
230
  var eq = (a, b) => ({ op: "eq", a, b });
@@ -729,7 +776,10 @@ function proveCmpDirect(ctx2, op, a, b) {
729
776
  }
730
777
  if (op === "ge") {
731
778
  if (!ivA.lo || !ivB.hi) return false;
732
- return ivA.lo.bound >= ivB.hi.bound;
779
+ if (ivA.lo.bound >= ivB.hi.bound) return true;
780
+ if (ivA.lo.strict && nextUp(ivA.lo.bound) >= ivB.hi.bound) return true;
781
+ if (ivB.hi.strict && ivA.lo.bound >= nextDown(ivB.hi.bound)) return true;
782
+ return false;
733
783
  }
734
784
  if (op === "gt") {
735
785
  if (!ivA.lo || !ivB.hi) return false;
@@ -738,7 +788,10 @@ function proveCmpDirect(ctx2, op, a, b) {
738
788
  }
739
789
  if (op === "le") {
740
790
  if (!ivA.hi || !ivB.lo) return false;
741
- return ivA.hi.bound <= ivB.lo.bound;
791
+ if (ivA.hi.bound <= ivB.lo.bound) return true;
792
+ if (ivA.hi.strict && nextDown(ivA.hi.bound) <= ivB.lo.bound) return true;
793
+ if (ivB.lo.strict && ivA.hi.bound <= nextUp(ivB.lo.bound)) return true;
794
+ return false;
742
795
  }
743
796
  if (!ivA.hi || !ivB.lo) return false;
744
797
  if (ivA.hi.bound < ivB.lo.bound) return true;
@@ -877,6 +930,8 @@ function buildCtx(phi2) {
877
930
  function linInterval(ctx2, lin) {
878
931
  let lo = lin.k;
879
932
  let hi = lin.k;
933
+ let wLo = lin.k;
934
+ let wHi = lin.k;
880
935
  let loStrict = false;
881
936
  let hiStrict = false;
882
937
  let hasLo = true;
@@ -888,26 +943,40 @@ function linInterval(ctx2, lin) {
888
943
  if (coeff > 0) {
889
944
  if (iv.lo) {
890
945
  lo += coeff * iv.lo.bound;
946
+ wLo += coeff * (iv.lo.strict ? nextUp(iv.lo.bound) : iv.lo.bound);
891
947
  if (iv.lo.strict) loStrict = true;
892
948
  } else hasLo = false;
893
949
  if (iv.hi) {
894
950
  hi += coeff * iv.hi.bound;
951
+ wHi += coeff * (iv.hi.strict ? nextDown(iv.hi.bound) : iv.hi.bound);
895
952
  if (iv.hi.strict) hiStrict = true;
896
953
  } else hasHi = false;
897
954
  } else {
898
955
  if (iv.hi) {
899
956
  lo += coeff * iv.hi.bound;
957
+ wLo += coeff * (iv.hi.strict ? nextDown(iv.hi.bound) : iv.hi.bound);
900
958
  if (iv.hi.strict) loStrict = true;
901
959
  } else hasLo = false;
902
960
  if (iv.lo) {
903
961
  hi += coeff * iv.lo.bound;
962
+ wHi += coeff * (iv.lo.strict ? nextUp(iv.lo.bound) : iv.lo.bound);
904
963
  if (iv.lo.strict) hiStrict = true;
905
964
  } else hasHi = false;
906
965
  }
907
966
  }
908
967
  const out = {};
909
- if (hasLo) out.lo = { bound: lo, strict: loStrict };
910
- if (hasHi) out.hi = { bound: hi, strict: hiStrict };
968
+ if (hasLo) {
969
+ if (!loStrict) out.lo = { bound: lo, strict: false };
970
+ else if (wLo > lo) out.lo = { bound: lo, strict: true };
971
+ else if (wLo === lo) out.lo = { bound: nextDown(lo), strict: true };
972
+ else out.lo = { bound: lo, strict: false };
973
+ }
974
+ if (hasHi) {
975
+ if (!hiStrict) out.hi = { bound: hi, strict: false };
976
+ else if (wHi < hi) out.hi = { bound: hi, strict: true };
977
+ else if (wHi === hi) out.hi = { bound: nextUp(hi), strict: true };
978
+ else out.hi = { bound: hi, strict: false };
979
+ }
911
980
  return out;
912
981
  }
913
982
  function proveInCtx(ctx2, pred) {
@@ -952,7 +1021,8 @@ function proveInCtx(ctx2, pred) {
952
1021
  }
953
1022
  if (op === "ge") {
954
1023
  if (!iv.lo) return void 0;
955
- return iv.lo.bound >= 0;
1024
+ if (iv.lo.bound >= 0) return true;
1025
+ return iv.lo.strict && nextUp(iv.lo.bound) >= 0;
956
1026
  }
957
1027
  if (op === "lt") {
958
1028
  if (!iv.hi) return void 0;
@@ -961,7 +1031,8 @@ function proveInCtx(ctx2, pred) {
961
1031
  }
962
1032
  if (op === "le") {
963
1033
  if (!iv.hi) return void 0;
964
- return iv.hi.bound <= 0;
1034
+ if (iv.hi.bound <= 0) return true;
1035
+ return iv.hi.strict && nextDown(iv.hi.bound) <= 0;
965
1036
  }
966
1037
  if (op === "eq") {
967
1038
  if (!iv.lo || !iv.hi) return void 0;
@@ -14065,6 +14136,79 @@ function $join(a, b) {
14065
14136
  return joinAbs(asAbsVal(a), asAbsVal(b));
14066
14137
  }
14067
14138
 
14139
+ // src/algebra/diag-codes.ts
14140
+ var DIAG = {
14141
+ // --- 调用点 / 约束面(check 调用诊断) ---
14142
+ argCount: "nudo:arg-count",
14143
+ argOpaque: "nudo:arg-opaque",
14144
+ argStructure: "nudo:arg-structure",
14145
+ assignMismatch: "nudo:assign-mismatch",
14146
+ constraintUnproven: "nudo:constraint-unproven",
14147
+ constraintViolated: "nudo:constraint-violated",
14148
+ fnNotFound: "nudo:fn-not-found",
14149
+ partialResult: "nudo:partial-result",
14150
+ unprovenReturn: "nudo:unproven-return",
14151
+ // --- 指令文法 / 引理前提 ---
14152
+ assumeInvalid: "nudo:assume-invalid",
14153
+ assumeRelied: "nudo:assume-relied",
14154
+ contractSyntax: "nudo:contract-syntax",
14155
+ directiveSyntax: "nudo:directive-syntax",
14156
+ invariantInvalid: "nudo:invariant-invalid",
14157
+ invariantRelied: "nudo:invariant-relied",
14158
+ mockInvalid: "nudo:mock-invalid",
14159
+ // --- case 诊断(debug/test 面) ---
14160
+ caseExpected: "nudo:case-expected",
14161
+ caseInconsistency: "nudo:case-inconsistency",
14162
+ // --- 入口 / L2 门禁 ---
14163
+ dualEntry: "nudo:dual-entry",
14164
+ entryMayThrow: "nudo:entry-may-throw",
14165
+ mayThrow: "nudo:may-throw",
14166
+ noSignature: "nudo:no-signature",
14167
+ // --- 求值精度 / 截断归因 ---
14168
+ builtinUnknown: "nudo:builtin-unknown",
14169
+ forkTruncated: "nudo:fork-truncated",
14170
+ hostEffectBlocked: "nudo:host-effect-blocked",
14171
+ loopTruncated: "nudo:loop-truncated",
14172
+ mathFoldError: "nudo:math-fold-error",
14173
+ opaqueResult: "nudo:opaque-result",
14174
+ promiseMicroError: "nudo:promise-micro-error",
14175
+ promiseMicroTruncated: "nudo:promise-micro-truncated",
14176
+ recursionTruncated: "nudo:recursion-truncated",
14177
+ unknownInference: "nudo:unknown-inference",
14178
+ unknownRecv: "nudo:unknown-recv",
14179
+ // --- 成员 / 槽位 ---
14180
+ missingSlot: "nudo:missing-slot",
14181
+ noMethod: "nudo:no-method",
14182
+ // --- 接口(sidecar / 契约面) ---
14183
+ interfaceConflict: "nudo:interface-conflict",
14184
+ interfaceCycle: "nudo:interface-cycle",
14185
+ interfaceDomainExceeds: "nudo:interface-domain-exceeds",
14186
+ interfaceDrift: "nudo:interface-drift",
14187
+ interfaceEmitDenied: "nudo:interface-emit-denied",
14188
+ interfaceEntryOnly: "nudo:interface-entry-only",
14189
+ interfaceLoad: "nudo:interface-load",
14190
+ interfaceMultiDeclarator: "nudo:interface-multi-declarator",
14191
+ interfaceNameClash: "nudo:interface-name-clash",
14192
+ interfaceNotProjectable: "nudo:interface-not-projectable",
14193
+ interfaceParamMismatch: "nudo:interface-param-mismatch",
14194
+ interfaceUnderivable: "nudo:interface-underivable",
14195
+ // --- 模块 / env 加载 ---
14196
+ envHarvestConflict: "nudo:env-harvest-conflict",
14197
+ envUnresolved: "nudo:env-unresolved",
14198
+ exportsUnresolved: "nudo:exports-unresolved",
14199
+ missingExport: "nudo:missing-export",
14200
+ moduleCycle: "nudo:module-cycle",
14201
+ moduleDepth: "nudo:module-depth",
14202
+ moduleMissing: "nudo:module-missing",
14203
+ // --- 宿主面(LSP / CLI pathErrors 信封) ---
14204
+ internal: "nudo:internal",
14205
+ pathEmptyDir: "nudo:path-empty-dir",
14206
+ pathIo: "nudo:path-io",
14207
+ pathMissingCallsite: "nudo:path-missing-callsite",
14208
+ pathNotFound: "nudo:path-not-found",
14209
+ pathNotTarget: "nudo:path-not-target"
14210
+ };
14211
+
14068
14212
  // src/algebra/exec/member-diag.ts
14069
14213
  import { AsyncLocalStorage as AsyncLocalStorage4 } from "async_hooks";
14070
14214
  var memberDiagCollectorSlot = createScopedSlot(() => null);
@@ -14338,7 +14482,7 @@ function noteObjSlotMissing(recv, name, loc) {
14338
14482
  kind: "property",
14339
14483
  name,
14340
14484
  receiver: "object",
14341
- code: "nudo:missing-slot",
14485
+ code: DIAG.missingSlot,
14342
14486
  line: loc?.[0],
14343
14487
  column: loc?.[1],
14344
14488
  ...origin ? { origin } : {}
@@ -15863,7 +16007,10 @@ var NAMESPACE_GLOBALS = [
15863
16007
  ["Uint16Array", Uint16Array],
15864
16008
  ["Int32Array", Int32Array],
15865
16009
  ["Uint32Array", Uint32Array],
15866
- ["Float16Array", Float16Array],
16010
+ // Node <24 无 Float16Array 全局(V8 13.x 引入);engines 声明 node>=22,
16011
+ // 模块级表裸读会让 CLI 在声明下限上启动即 ReferenceError。运行时不存在
16012
+ // 该全局时如实不注册(无值可路由,namespaceNameOf 也无对应值可撞)。
16013
+ ...typeof Float16Array !== "undefined" ? [["Float16Array", Float16Array]] : [],
15867
16014
  ["Float32Array", Float32Array],
15868
16015
  ["Float64Array", Float64Array],
15869
16016
  ["BigInt64Array", BigInt64Array],
@@ -19221,9 +19368,11 @@ __export(calls_exports, {
19221
19368
  $recordBinding: () => $recordBinding,
19222
19369
  MAX_EVAL_CALL_DEPTH: () => MAX_EVAL_CALL_DEPTH,
19223
19370
  MAX_EVAL_TOTAL_CALLS: () => MAX_EVAL_TOTAL_CALLS,
19371
+ NEVER_EXEC_HOST_FN_NAMES: () => NEVER_EXEC_HOST_FN_NAMES,
19224
19372
  blockHostSideEffect: () => blockHostSideEffect,
19225
19373
  callHostGlobalFn: () => callHostGlobalFn,
19226
19374
  clearPureCallMemo: () => clearPureCallMemo,
19375
+ collectHostGlobalFnEntryNames: () => collectHostGlobalFnEntryNames,
19227
19376
  enterEvalCallBudgetSession: () => enterEvalCallBudgetSession,
19228
19377
  evalEnterCall: () => evalEnterCall,
19229
19378
  evalExitCall: () => evalExitCall,
@@ -20231,22 +20380,30 @@ var HOST_FN_ACCESSOR_ALLOWLIST = /* @__PURE__ */ new Set([
20231
20380
  "stream",
20232
20381
  "node:test"
20233
20382
  ]);
20383
+ function collectHostGlobalFnEntries() {
20384
+ const entries = [];
20385
+ const g = globalThis;
20386
+ for (const k of Object.getOwnPropertyNames(g)) {
20387
+ const d = Object.getOwnPropertyDescriptor(g, k);
20388
+ if (d && (d.get !== void 0 || d.set !== void 0) && !HOST_FN_ACCESSOR_ALLOWLIST.has(k)) {
20389
+ continue;
20390
+ }
20391
+ const v2 = g[k];
20392
+ if (typeof v2 === "function") entries.push([k, v2]);
20393
+ }
20394
+ return entries;
20395
+ }
20234
20396
  function isHostGlobalFn(fn2) {
20235
20397
  if (typeof fn2 !== "function") return false;
20236
20398
  if (!hostGlobalFnIds) {
20237
20399
  hostGlobalFnIds = /* @__PURE__ */ new Set();
20238
- const g = globalThis;
20239
- for (const k of Object.getOwnPropertyNames(g)) {
20240
- const d = Object.getOwnPropertyDescriptor(g, k);
20241
- if (d && (d.get !== void 0 || d.set !== void 0) && !HOST_FN_ACCESSOR_ALLOWLIST.has(k)) {
20242
- continue;
20243
- }
20244
- const v2 = g[k];
20245
- if (typeof v2 === "function") hostGlobalFnIds.add(v2);
20246
- }
20400
+ for (const [, v2] of collectHostGlobalFnEntries()) hostGlobalFnIds.add(v2);
20247
20401
  }
20248
20402
  return hostGlobalFnIds.has(fn2);
20249
20403
  }
20404
+ function collectHostGlobalFnEntryNames() {
20405
+ return collectHostGlobalFnEntries().map(([k]) => k).sort();
20406
+ }
20250
20407
  function callHostGlobalLiteralOnly(name, fn2, args) {
20251
20408
  const jsArgs = [];
20252
20409
  for (const a of args) {
@@ -28227,11 +28384,28 @@ function strLitResult(s) {
28227
28384
  function normalizeNegZero(n) {
28228
28385
  return n === 0 ? 0 : n;
28229
28386
  }
28230
- function ieeeBound(n, strict, strictZeroOk) {
28387
+ function ieeeBound(n) {
28231
28388
  if (!Number.isFinite(n)) return void 0;
28232
- const z = normalizeNegZero(n);
28233
- if (z === 0 && strict && !strictZeroOk) return void 0;
28234
- return z;
28389
+ return normalizeNegZero(n);
28390
+ }
28391
+ function ieeeStrictEndpoint(E, w, claim) {
28392
+ if (!Number.isFinite(E)) return void 0;
28393
+ if (claim === "lo") {
28394
+ if (w > E) return normalizeNegZero(E);
28395
+ if (w === E) return normalizeNegZero(nextDown(E));
28396
+ return void 0;
28397
+ }
28398
+ if (w < E) return normalizeNegZero(E);
28399
+ if (w === E) return normalizeNegZero(nextUp(E));
28400
+ return void 0;
28401
+ }
28402
+ function synthEndpoint(f, a, dirA, claim, b, dirB = "up") {
28403
+ const strict = a.strict || (b?.strict ?? false);
28404
+ const E = b === void 0 ? f(a.value, 0) : f(a.value, b.value);
28405
+ if (!strict) return ieeeBound(E);
28406
+ const aW = a.strict ? dirA === "up" ? nextUp(a.value) : nextDown(a.value) : a.value;
28407
+ const bW = b === void 0 ? 0 : b.strict ? dirB === "up" ? nextUp(b.value) : nextDown(b.value) : b.value;
28408
+ return ieeeStrictEndpoint(E, f(aW, bW), claim);
28235
28409
  }
28236
28410
  function isAnyLike(a) {
28237
28411
  if (a.shape.k === "any") return true;
@@ -28349,6 +28523,7 @@ function noteBoundFromRel(p, isTarget, acc) {
28349
28523
  return;
28350
28524
  }
28351
28525
  const n = litSide.value;
28526
+ if (Number.isNaN(n)) return;
28352
28527
  if (op === "gt") tightenLo2(acc, n, true);
28353
28528
  else if (op === "ge") tightenLo2(acc, n, false);
28354
28529
  else if (op === "lt") tightenHi2(acc, n, true);
@@ -28546,14 +28721,28 @@ function addPred(a, b, sumTerm, phi2) {
28546
28721
  const facts = [];
28547
28722
  if (aBounds?.lo !== void 0 && evalBounds?.lo !== void 0) {
28548
28723
  const strict = aBounds.lo.strict || evalBounds.lo.strict;
28549
- const loSum = ieeeBound(aBounds.lo.value + evalBounds.lo.value, strict, true);
28724
+ const loSum = synthEndpoint(
28725
+ (x, y) => x + y,
28726
+ aBounds.lo,
28727
+ "up",
28728
+ "lo",
28729
+ evalBounds.lo,
28730
+ "up"
28731
+ );
28550
28732
  if (loSum !== void 0) {
28551
28733
  facts.push(strict ? gt(sumTerm, lit(loSum)) : ge(sumTerm, lit(loSum)));
28552
28734
  }
28553
28735
  }
28554
28736
  if (aBounds?.hi !== void 0 && evalBounds?.hi !== void 0) {
28555
28737
  const strict = aBounds.hi.strict || evalBounds.hi.strict;
28556
- const hiSum = ieeeBound(aBounds.hi.value + evalBounds.hi.value, strict, true);
28738
+ const hiSum = synthEndpoint(
28739
+ (x, y) => x + y,
28740
+ aBounds.hi,
28741
+ "down",
28742
+ "hi",
28743
+ evalBounds.hi,
28744
+ "down"
28745
+ );
28557
28746
  if (hiSum !== void 0) {
28558
28747
  facts.push(strict ? lt(sumTerm, lit(hiSum)) : le(sumTerm, lit(hiSum)));
28559
28748
  }
@@ -28596,14 +28785,28 @@ function sub(a, b, phi2 = pTrue, assume) {
28596
28785
  const facts = [];
28597
28786
  if (ab?.lo !== void 0 && bb?.hi !== void 0) {
28598
28787
  const strict = ab.lo.strict || bb.hi.strict;
28599
- const lo = ieeeBound(ab.lo.value - bb.hi.value, strict, true);
28788
+ const lo = synthEndpoint(
28789
+ (x, y) => x - y,
28790
+ ab.lo,
28791
+ "up",
28792
+ "lo",
28793
+ bb.hi,
28794
+ "down"
28795
+ );
28600
28796
  if (lo !== void 0) {
28601
28797
  facts.push(strict ? gt(term, lit(lo)) : ge(term, lit(lo)));
28602
28798
  }
28603
28799
  }
28604
28800
  if (ab?.hi !== void 0 && bb?.lo !== void 0) {
28605
28801
  const strict = ab.hi.strict || bb.lo.strict;
28606
- const hi = ieeeBound(ab.hi.value - bb.lo.value, strict, true);
28802
+ const hi = synthEndpoint(
28803
+ (x, y) => x - y,
28804
+ ab.hi,
28805
+ "down",
28806
+ "hi",
28807
+ bb.lo,
28808
+ "up"
28809
+ );
28607
28810
  if (hi !== void 0) {
28608
28811
  facts.push(strict ? lt(term, lit(hi)) : le(term, lit(hi)));
28609
28812
  }
@@ -28678,24 +28881,23 @@ function mul(a, b, phi2 = pTrue) {
28678
28881
  base = b;
28679
28882
  }
28680
28883
  if (k !== void 0 && base !== void 0 && k !== 0 && Number.isFinite(k)) {
28681
- const strictZeroOk = Math.abs(k) >= 1;
28682
28884
  const ab = numericBounds(base, phi2);
28683
28885
  const facts = [];
28684
28886
  if (ab?.lo !== void 0) {
28685
28887
  if (k > 0) {
28686
- const lo = ieeeBound(ab.lo.value * k, ab.lo.strict, strictZeroOk);
28888
+ const lo = synthEndpoint((x, _k) => x * k, ab.lo, "up", "lo");
28687
28889
  if (lo !== void 0) facts.push(ab.lo.strict ? gt(term, lit(lo)) : ge(term, lit(lo)));
28688
28890
  } else {
28689
- const hi = ieeeBound(ab.lo.value * k, ab.lo.strict, strictZeroOk);
28891
+ const hi = synthEndpoint((x, _k) => x * k, ab.lo, "up", "hi");
28690
28892
  if (hi !== void 0) facts.push(ab.lo.strict ? lt(term, lit(hi)) : le(term, lit(hi)));
28691
28893
  }
28692
28894
  }
28693
28895
  if (ab?.hi !== void 0) {
28694
28896
  if (k > 0) {
28695
- const hi = ieeeBound(ab.hi.value * k, ab.hi.strict, strictZeroOk);
28897
+ const hi = synthEndpoint((x, _k) => x * k, ab.hi, "down", "hi");
28696
28898
  if (hi !== void 0) facts.push(ab.hi.strict ? lt(term, lit(hi)) : le(term, lit(hi)));
28697
28899
  } else {
28698
- const lo = ieeeBound(ab.hi.value * k, ab.hi.strict, strictZeroOk);
28900
+ const lo = synthEndpoint((x, _k) => x * k, ab.hi, "down", "lo");
28699
28901
  if (lo !== void 0) facts.push(ab.hi.strict ? gt(term, lit(lo)) : ge(term, lit(lo)));
28700
28902
  }
28701
28903
  }
@@ -28793,18 +28995,17 @@ function div(a, b, phi2 = pTrue, assume) {
28793
28995
  const term = simplifyTerm(app("/", [a.term, b.term]));
28794
28996
  if (b.term.op === "lit" && typeof b.term.value === "number" && b.term.value !== 0 && Number.isFinite(b.term.value)) {
28795
28997
  const k = b.term.value;
28796
- const strictZeroOk = Math.abs(k) <= 1;
28797
28998
  const ab = numericBounds(a, phi2);
28798
28999
  const facts = [];
28799
29000
  if (ab?.lo !== void 0) {
28800
- const lo = ieeeBound(ab.lo.value / k, ab.lo.strict, strictZeroOk);
29001
+ const lo = synthEndpoint((x, _k) => x / k, ab.lo, "up", k > 0 ? "lo" : "hi");
28801
29002
  if (lo !== void 0) {
28802
29003
  if (k > 0) facts.push(ab.lo.strict ? gt(term, lit(lo)) : ge(term, lit(lo)));
28803
29004
  else facts.push(ab.lo.strict ? lt(term, lit(lo)) : le(term, lit(lo)));
28804
29005
  }
28805
29006
  }
28806
29007
  if (ab?.hi !== void 0) {
28807
- const hi = ieeeBound(ab.hi.value / k, ab.hi.strict, strictZeroOk);
29008
+ const hi = synthEndpoint((x, _k) => x / k, ab.hi, "down", k > 0 ? "hi" : "lo");
28808
29009
  if (hi !== void 0) {
28809
29010
  if (k > 0) facts.push(ab.hi.strict ? lt(term, lit(hi)) : le(term, lit(hi)));
28810
29011
  else facts.push(ab.hi.strict ? gt(term, lit(hi)) : ge(term, lit(hi)));
@@ -29655,6 +29856,7 @@ export {
29655
29856
  $gt,
29656
29857
  $ge,
29657
29858
  $join,
29859
+ DIAG,
29658
29860
  tagAbsOrigin,
29659
29861
  getAbsOrigin,
29660
29862
  setMemberDiagCollector,
package/dist/exec.js CHANGED
@@ -206,7 +206,7 @@ import {
206
206
  withAssumePremises,
207
207
  withEvalBudgetOverride,
208
208
  withExecPhi
209
- } from "./chunk-JMOQEJTD.js";
209
+ } from "./chunk-NUTYUT3I.js";
210
210
  export {
211
211
  $absVal,
212
212
  $add,