class Environment(val precision: Int = ..., variables: Map[String, _Value] = ..., val symmetricLogic: Boolean = ..., val semantics: LogicSemantics = ..., val workingPrecision: Int = ..., val limits: Limits = ..., val exactMode: Boolean = ...)
Immutable variable-binding context shared across all domains.
Bindings map names to fully-reduced _Values (a number, a matrix, a boolean) — never to a symbolic expression. Kept in core because eval takes one, and core must not depend on any domain.
withBinding returns a new Environment; the original is unchanged (structural sharing).
Value parameters
exactMode
the session's exact mode (F_0273, the owner's decision): when set, every constant a pass invents is built exact, whatever its input contains (_Rational.containsExactIn). Whether a value is exact is still carried by its own type; this reaches the passes that work on letters alone — derive(atan(x), x) has no exact value to read a tier from, so until then it built 1.0/(1.0 + x^2.0) under exact on. Defaults to false, under which every path is byte-identical.
limits
the work and size budgets every call evaluated here runs under (Limits, F_0124); each defaults to the value the library has always used. A library caller raises one with withLimit; the REPL and the browser keep the defaults.
precision
decimal places used when rendering numbers
semantics
the t-norm / t-conorm pair the logic connectives evaluate with; defaults to LogicSemantics.MinMax. Like symmetricLogic this is a knob on eval, not a separate node hierarchy.
symmetricLogic
when true, the digits {-1, 0, 1} are read as the symmetric ternary spelling of {false, unknown, true} in logical connective positions, and truth values render in that alphabet. This is an encoding toggle, not a semantics: the min–max rule table is untouched and the two alphabets are related by the affine map t = (s + 1) / 2 (see core._Truth.fromSymmetric). Defaults to false, the false/unknown/true spelling.
workingPrecision
decimal digits an irrational is approximated to before exact arithmetic continues. Read by eval wherever a _Rational meets an operation that is not closed over the rationals. Not the exact-mode switch: that is exactMode.
The published five-argument constructor, kept so that adding limits is binary-compatible (MiMa): an existing caller compiled against it still links, with the default limits.
The published five-argument constructor, kept so that adding limits is binary-compatible (MiMa): an existing caller compiled against it still links, with the default limits.
The reduction policy sized for this environment's working precision.
The reduction policy sized for this environment's working precision.
Derived rather than stored: the gcd-policy benchmark showed that a bound below the operand size a precision implies degenerates GcdPolicy.Threshold into GcdPolicy.Eager, so the two have to move together.
This environment with names unbound (F_0321): what an analysis that treats them as its own variables evaluates the rest of an expression in, so a session binding of one never folds it.
This environment with names unbound (F_0321): what an analysis that treats them as its own variables evaluates the rest of an expression in, so a session binding of one never folds it.