protocol

# `expanding`

Term and goal expansion protocol.

Author: Paulo Moura
Version: 1.1
Date: 2016/7/12
Compilation flags:
`static, built_in`

(no dependencies on other entities)

## Public interface

### `goal_expansion/2`

Defines a goal expansion. Called recursively until a fixed point is reached on goals found while compiling a source file (except for goals wrapped using the {}/1 compiler bypass control construct).

Compilation flags:
`static`
Template:
`goal_expansion(Goal,ExpandedGoal)`
Mode and number of proofs:
`goal_expansion(+callable,-callable)` - `zero_or_one`

### `term_expansion/2`

Defines a term expansion. Called until it succeeds on all terms read while compiling a source file (except for terms skipped by using the conditional compilation directives or wrapped using the {}/1 compiler bypass control construct).

Compilation flags:
`static`
Template:
`term_expansion(Term,ExpandedTerms)`
Mode and number of proofs:
`term_expansion(+term,-term)` - `zero_or_one`
`term_expansion(+term,-list(term))` - `zero_or_one`

## Protected interface

(none)

## Private predicates

(none)

## Operators

(none)

## Remarks

(none)