category

# assignvars

> Assignable variables (supporting logical, backtracable assignement of non-variable terms).

author:
  `Nobukuni Kino and Paulo Moura`
version:
  `1.2`
date:
  `2014/5/22`

compilation flags:
  `static`

(no dependencies on other files)

## Public interface

### assignable/1

> Makes Variable an assignable variable. Initial state will be empty.

compilation flags:
  `static`
template:
  `assignable(Variable)`
mode – number of proofs:
  `assignable(-assignvar) – one`
exceptions:
  Variable is not a variable: `type_error(variable,Variable)`

### assignable/2

> Makes Variable an assignable variable and sets its initial state to Value.

compilation flags:
  `static`
template:
  `assignable(Variable,Value)`
mode – number of proofs:
  `assignable(-assignvar,@nonvar) – one`
exceptions:
  Variable is not a variable: `type_error(variable,Variable)`
  Value is not instantiated: `instantiation_error`

### (<=)/2

> Sets the state of the assignable variable Variable to Value (initializing the variable if needed).

compilation flags:
  `static`
template:
  `Variable<=Value`
mode – number of proofs:
  `(?assignvar)<= (@nonvar) – one`
exceptions:
  Value is not instantiated: `instantiation_error`

### (=>)/2

> Unifies Value with the current state of the assignable variable Variable.

compilation flags:
  `static`
template:
  `Variable=>Value`
mode – number of proofs:
  `(+assignvar)=> (?nonvar) – zero_or_one`
exceptions:
  Variable is not instantiated: `instantiation_error`

## Protected interface

(none)

## Private predicates

(none)

## Operators

### (none)

## Remarks

### (none)