This file tracks decisions and context discovered while working on this package. (This instruction itself: always write discoveries and decisions into CLAUDE.md.)
| Package | Old compat | New compat | Latest version |
|---|---|---|---|
| IntervalArithmetic | 0.22.12 | 1 | 1.0.4 |
| IntervalBoxes | 0.2 | 0.3 | 0.3.0 |
| IntervalContractors | 0.5 | 0.6 | 0.6.0 |
| ReversePropagation | 0.3 | 0.4 | 0.4.0 |
| StaticArrays | 1 | 1 | 1.9.18 (unchanged) |
| Symbolics | 5, 6 | 7 | 7.17.0 |
Removed @register_symbolic x ∈ y::Interval from src/IntervalConstraintProgramming.jl:
- IntervalArithmetic v1.0 follows IEEE 1788 and deliberately does NOT define
Base.==orBase.isequal/Base.hashforInterval. Users should useisequal_intervaletc. - SymbolicUtils uses
isequal/hashfor hash-consing symbolic expressions. Embedding anIntervalin a symbolic expression (via@register_symbolic x ∈ y::Interval) triggersisequal→==→InconclusiveBooleanOperationerror. - Decision: Do NOT define
Base.isequal/Base.hashforInterval— that would be type piracy contradicting IntervalArithmetic's design. Instead, remove the∈registration and avoid puttingIntervalvalues inside symbolic expressions.
Replaced @register_symbolic x ∈ y::Interval with decomposition in src/IntervalConstraintProgramming.jl:
- New:
Base.in(x::Num, y::Interval) = (x >= Num(inf(y))) & (x <= Num(sup(y))) - This decomposes
x ∈ a..binto(x >= a) & (x <= b)at the symbolic level, avoiding Interval values in the symbolic tree entirely. - Users can still write
x^2 + y^2 ∈ interval(0, 1)— it just gets decomposed into two comparison constraints combined with&.
Changed Separator constructor in src/contractor.jl:
- Old:
Separator(ex, vars, constraint::Interval) = Separator(vars, ex ∈ constraint, constraint, ...) - New:
Separator(ex, vars, constraint::Interval) = Separator(vars, ex, constraint, ...) - The
exfield no longer wraps in∈ constraint(the constraint is already stored separately in theconstraintfield).
Updated show for AbstractSeparator to display constraint info when available (via hasproperty check), since ex no longer contains it.
Fixed pre-existing bug in separator() in src/utils.jl:
- The
&and|handlers used∩/∪(Base.intersect/Base.union) instead of⊓/⊔(from IntervalArithmetic.Symbols, defined for separators inset_operations.jl). - This bug was never triggered before because tests didn't exercise the
separator()path with&/|. It surfaced now because∈decomposes into(expr >= lo) & (expr <= hi).
- Chained comparisons like
0 <= x^2+y^2 <= 1don't work (Julia lowers to&&which requiresBool). Users should usex^2+y^2 ∈ interval(0, 1)instead. A@constraintmacro could fix this — seefuture.md. - ReversePropagation emits many "Method definition overwritten" warnings with Symbolics v7. Harmless but noisy — see
future.md.