Module logic_var

Source
Expand description

Functions to support logic variables and the global LOGIC_VAR_ID.

Logic variables (LogicVar) consist of a name and an ID.

The name should start with a dollar sign and a letter, for example: $H.

Logic variables which are stored in rules can have an ID of 0, but when the rule is fetched from the knowledge base, its variables must be recreated to give them unique IDs.

See recreate_variables().

Functions§

clear_id
Sets the logic variable ID to zero.
get_var_id
Gets the logic variable ID.
make_logic_var
Creates a logic variable from a string.
next_id
Increment and return the logic variable ID.
set_var_id
Sets the logic variable ID to the given value.

Type Aliases§

VarMap