category

# counters

> Named integer counters. Counter names can be any nonvar term.

author:
  `Paulo Moura`
version:
  `1.0`
date:
  `2011/1/3`

compilation flags:
  `static`

(no dependencies on other files)

## Public interface

### counter/2

> True if Counter is a counter with value Value.

compilation flags:
  `static`
template:
  `counter(Counter,Value)`
mode – number of proofs:
  `counter(?nonvar,?integer) – zero_or_more`

### increment_counter/1

> Increments the named counter.

compilation flags:
  `static`
template:
  `increment_counter(Counter)`
mode – number of proofs:
  `increment_counter(+nonvar) – one`

### decrement_counter/1

> Decrements the named counter.

compilation flags:
  `static`
template:
  `decrement_counter(Counter)`
mode – number of proofs:
  `decrement_counter(+nonvar) – one`

### reset_counter/1

> Resets the named counter to zero. Creates the counter if it does not exist.

compilation flags:
  `static`
template:
  `reset_counter(Counter)`
mode – number of proofs:
  `reset_counter(+nonvar) – one`

### reset_counters/0

compilation flags:
  `static`
mode – number of proofs:
  `reset_counters – one`

## Protected interface

(none)

## Private predicates

### counter_/2

> Table of named counters.

compilation flags:
  `dynamic`
template:
  `counter_(Counter,Value)`
mode – number of proofs:
  `counter_(?nonvar,?integer) – zero_or_more`

## Operators

### (none)

## Remarks

### (none)