View Source Guesswork.Constraint.Arithmetic (Guesswork v0.8.0)
A constraint that represents basic integer arithmetic.
Summary
Functions
Builds a new arithmetic constraint from an elixir expression.
Takes an elixir polynomial expression that contains exactly one =
, simplifies,
and returns a logical statement.
Types
@type operation() :: :* | :+ | :-
@type opts_list() :: [{:halt_on_error, term()}]
@type value() :: integer() | Guesswork.Ast.Variable.t()
Functions
@spec build_fn(operation(), boolean()) :: (integer() | Guesswork.Constraint.Arithmetic.Range.t(), integer() | Guesswork.Constraint.Arithmetic.Range.t() -> integer() | Guesswork.Constraint.Arithmetic.Range.t() | nil)
Builds a new arithmetic constraint from an elixir expression.
The following fields are available:
@spec new( value(), operation(), value(), Guesswork.Constraint.Comparison.constraint(), value(), boolean() ) :: t()
Takes an elixir polynomial expression that contains exactly one =
, simplifies,
and returns a logical statement.