.. index:: single: expanding
.. _expanding/0:

.. rst-class:: right

**protocol**

``expanding``
=============

Term and goal expansion protocol.

| **Availability:** 
|    ``built_in``

| **Author:** Paulo Moura
| **Version:** 1:1:0
| **Date:** 2016-07-12

| **Compilation flags:**
|    ``static, built_in``


| **Dependencies:**
|   (none)


| **Remarks:**
|    (none)

| **Inherited public predicates:**
|    (none)

.. contents::
   :local:
   :backlinks: top

Public predicates
-----------------

.. index:: goal_expansion/2
.. _expanding/0::goal_expansion/2:

``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``


------------

.. index:: term_expansion/2
.. _expanding/0::term_expansion/2:

``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 predicates
--------------------

(none)

Private predicates
------------------

(none)

Operators
---------

(none)

