View Source Guesswork.Constraint.Arithmetic.InternalVariable (Guesswork v0.8.0)
This module provides a simple tool for building unique, readable, internal variables (used when polynomials are split up in to smaller sub statements). If the Agent is running then a simple counter (turned into a base36 string) is used, guaranteeing that the shortest possible unique variable. However, if the Agent is not running then a random string is defaulted to.
Summary
Functions
Returns a specification to start this module under a supervisor.
Attempts to get a variable sutiable for internal use.
Resets the counter, starts at _A
.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
@spec get() :: Guesswork.Ast.Variable.t()
Attempts to get a variable sutiable for internal use.
@spec reset() :: :ok
Resets the counter, starts at _A
.