object ExpressionEquationSolver
Working with expressions built from initial and final values of random variables, including in islands, given equations satisfied by these
- Alphabetic
- By Inheritance
- ExpressionEquationSolver
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- trait FixedProofs extends GenerateTyps
fixes the weights of proofs, to try to flow with types making worse matches
- trait GenerateTyps extends ExpressionEquationSolver
ExpressionEquationSolver where the type distribution is generated from the equations
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- def dist[Y](rv: RandomVar[Y], p: Map[Expression, Double]): FiniteDistribution[Y]
extract the distribution
extract the distribution
- rv
random variable
- p
map of expression values
- returns
finite distribution
- def elemContext(elem: Variable[_]): Option[(RandomVar[_], Vector[_])]
returns an element if the variable is one, and the context.
returns an element if the variable is one, and the context. It is assumed that boats have all the isle information. If the argument is an
Elem
, perhaps nested in isles, we get boats and the random-variable- elem
candidate element
- returns
optional element and context
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def eqAtoms(equations: Set[Equation], groupSize: Int = 100): Set[Expression]
atoms from equations
atoms from equations
- equations
the equations
- returns
set of expressions
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def export(ev: ExpressionEquationSolver, vars: Vector[Term]): ExpressionEquationSolver
exporting an ExpressionEquationSolver with respect to variables
exporting an ExpressionEquationSolver with respect to variables
- ev
the initial expression eval
- vars
variables
- returns
exported ExpressionEquationSolver
- def fromInitEqs(initialState: TermState, equationsS: Set[Equation], coeffvalS: (Coeff[_]) => Option[Double], varWeightS: Double, maxRatioS: Double = 1.01, resolutionS: Double = 0.0, scaleS: Double = 1.0, smoothS: Option[Double] = None, exponentS: Double = 0.5, decayS: Double = 1, maxTimeS: Option[Long] = None, previousMapS: Option[Map[Expression, Double]] = None): ExpressionEquationSolver
builds an ExpressionEquationSolver given initial states, equations and parameters, with the final state deduced using the equations
builds an ExpressionEquationSolver given initial states, equations and parameters, with the final state deduced using the equations
- initialState
initial state
- equationsS
equations
- coeffvalS
term-generator parameters
- maxRatioS
maximum ratio for stabilization
- scaleS
scale for gradient flow
- smoothS
smoothing for gradient flow
- exponentS
exponent for iteration
- decayS
decay during iteration
- maxTimeS
max-time during iteration
- returns
ExpressionEquationSolver built
- def fromInitEqsTask(initialState: TermState, equationsS: Set[Equation], coeffvalS: (Coeff[_]) => Option[Double], varWeightS: Double, maxRatioS: Double = 1.01, resolutionS: Double = 0.0, scaleS: Double = 1.0, smoothS: Option[Double] = None, exponentS: Double = 0.5, decayS: Double = 1, maxTimeS: Option[Long] = None, previousMapS: Option[Map[Expression, Double]] = None): Task[ExpressionEquationSolver]
builds an ExpressionEquationSolver given initial states, equations and parameters, with the final state deduced using the equations
builds an ExpressionEquationSolver given initial states, equations and parameters, with the final state deduced using the equations
- initialState
initial state
- equationsS
equations
- coeffvalS
term-generator parameters
- maxRatioS
maximum ratio for stabilization
- scaleS
scale for gradient flow
- smoothS
smoothing for gradient flow
- exponentS
exponent for iteration
- decayS
decay during iteration
- maxTimeS
max-time during iteration
- returns
ExpressionEquationSolver built
- def fromStates(initialState: TermState, finalState: TermState, equationsS: Set[Equation], coeffvalS: (Coeff[_]) => Option[Double], varWeightS: Double, maxRatioS: Double = 1.01, resolutionS: Double = 0.0, scaleS: Double = 1.0, smoothS: Option[Double] = None, exponentS: Double = 0.5, decayS: Double = 1, maxTimeS: Option[Long] = None): ExpressionEquationSolver
builds an ExpressionEquationSolver given states, equations and parameters, say as the result of a local prover
builds an ExpressionEquationSolver given states, equations and parameters, say as the result of a local prover
- initialState
initial state
- finalState
final state
- equationsS
equations
- coeffvalS
term-generator parameters
- maxRatioS
maximum ratio for stabilization
- scaleS
scale for gradient flow
- smoothS
smoothing for gradient flow
- exponentS
exponent for iteration
- decayS
decay during iteration
- maxTimeS
max-time during iteration
- returns
ExpressionEquationSolver built
- def generators(p: Map[Expression, Double]): FiniteDistribution[Term]
initial values in the map of expression values
initial values in the map of expression values
- p
the map
- returns
distribution of initial values.
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def initMap(atoms: Set[Expression], coeffval: (Coeff[_]) => Option[Double], varWeight: Double, initialState: TermState): Map[Expression, Double]
Given a collection of atoms, returns map with values for them.
- def initMapTask(atoms: Set[Expression], coeffval: (Coeff[_]) => Option[Double], varWeight: Double, initialState: TermState): Task[Map[Expression, Double]]
- def initVal(exp: Expression, cv: (Coeff[_]) => Option[Double], varWeight: Double, initialState: ParTermState): Option[Double]
Initial value of an atomic expression
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isIsleVar(elem: Elem[_]): Boolean
checks whether an element is a variable in an island
- def iterateMap(init: Map[Expression, Double], equations: Set[Equation], steps: Int): Map[Expression, Double]
iteratively evolve a map for a fixed number of steps
iteratively evolve a map for a fixed number of steps
- init
initial map
- equations
equations determining the iteration
- steps
number of steps to iterate
- returns
result of iteration
- Annotations
- @tailrec()
- def mapRatio[A](m1: Map[A, Double], m2: Map[A, Double]): Double
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def nextMap(init: Map[Expression, Double], equations: Set[Equation], exponent: Double = 0.5): Map[Expression, Double]
Updating a map given equations by replacing terms that are the lhs of an equation with rhs evaluated.
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def recExp(init: Map[Expression, Double], exp: Expression): Double
Recursively calculate or update the value on expression, given initial values.
- val sd: StateDistribution[TermState, FiniteDistribution]
- def stabRecExp(init: Map[Expression, Double], exp: Expression, prev: Option[Double], exponent: Double = 0.5): Double
Stabilized recursive expression, taking geometric mean with the previous value if defined.
Stabilized recursive expression, taking geometric mean with the previous value if defined. This is to avoid oscillations.
- exponent
weight (power) of the new value while taking means
- def stableMap(init: Map[Expression, Double], equations: Set[Equation], maxRatio: Double = 1.01, resolution: Double = 0.0, exponent: Double = 0.5, decay: Double = 1, maxTime: Option[Long]): Map[Expression, Double]
Iteratively update a map by equations till it is stable, i.e.
Iteratively update a map by equations till it is stable, i.e. almost satisfies the equations.
- Annotations
- @tailrec()
- def stableSupportMap(init: Map[Expression, Double], equations: Set[Equation], exponent: Double = 0.5, decay: Double = 1): Map[Expression, Double]
Iteratively update a map given equations until the support is stable (so we can safely calculate ratios).
Iteratively update a map given equations until the support is stable (so we can safely calculate ratios).
- Annotations
- @tailrec()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def terms(eqs: Set[EquationNode]): Set[Term]
extract terms from equations
extract terms from equations
- eqs
the equation
- returns
set of terms
- def toString(): String
- Definition Classes
- AnyRef → Any
- def typs(eqs: Set[EquationNode]): Set[Typ[Term]]
extract types from equations
extract types from equations
- eqs
the equation
- returns
set of types
- def values(eqs: Set[Equation]): Set[Expression]
extract variable values from equations
extract variable values from equations
- eqs
the equation
- returns
set of variable values
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated