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 entities)

## Public interface

### `counter/2`

True if Counter is a counter with value Value.

Compilation flags:
`static`
Template:
`counter(Counter,Value)`
Mode and number of proofs:
`counter(?nonvar,?integer)` - `zero_or_more`

### `increment_counter/1`

Increments the named counter.

Compilation flags:
`static`
Template:
`increment_counter(Counter)`
Mode and number of proofs:
`increment_counter(+nonvar)` - `one`

### `decrement_counter/1`

Decrements the named counter.

Compilation flags:
`static`
Template:
`decrement_counter(Counter)`
Mode and 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 and number of proofs:
`reset_counter(+nonvar)` - `one`

### `reset_counters/0`

Compilation flags:
`static`
Mode and 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 and number of proofs:
`counter_(?nonvar,?integer)` - `zero_or_more`

## Operators

(none)

## Remarks

(none)