.. index:: metagol
.. _metagol/0:

**object**

``metagol``
===========

Inductive logic programming (ILP) system based on meta-interpretive learning.

| **Author:** Metagol authors; adapted to Logtalk by Paulo Moura.
| **Version:** 0.17
| **Date:** 2019/1/19

| **Copyright:** Copyright 2016 Metagol authors; Copyright 2018-2019 Paulo Moura
| **License:** BSD 3-Clause License

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


| **Implements:**
|    ``public`` :ref:`expanding <expanding/0>`
| **Provides:**
|    :ref:`logtalk::message_tokens//2 <logtalk/0::message_tokens//2>`
|    :ref:`logtalk::message_prefix_stream/4 <logtalk/0::message_prefix_stream/4>`

Public interface
----------------

.. raw:: html

   <div id="learn/3"> </div>

.. index:: learn/3
.. _metagol/0::learn/3:

``learn/3``
^^^^^^^^^^^

Learns from a set of positive examples and a set of negative examples and returns the learned program.

| **Compilation flags:**
|    ``static``

| **Template:**
|    ``learn(PositiveExamples,NegativeExamples,Program)``
| **Mode and number of proofs:**
|    ``learn(@list(example),@list(example),-list(term))`` - ``zero_or_one``


.. raw:: html

   <div id="learn/2"> </div>

.. index:: learn/2
.. _metagol/0::learn/2:

``learn/2``
^^^^^^^^^^^

Learns from a set of positive examples and a set of negative examples and prints the learned program.

| **Compilation flags:**
|    ``static``

| **Template:**
|    ``learn(PositiveExamples,NegativeExamples)``
| **Mode and number of proofs:**
|    ``learn(@list(example),@list(example))`` - ``zero_or_one``


.. raw:: html

   <div id="learn_seq/2"> </div>

.. index:: learn_seq/2
.. _metagol/0::learn_seq/2:

``learn_seq/2``
^^^^^^^^^^^^^^^

Learns from a sequence of examples represented as a list of PositiveExamples/NegativeExamples elements and returns the learned program.

| **Compilation flags:**
|    ``static``

| **Template:**
|    ``learn_seq(Examples,Program)``
| **Mode and number of proofs:**
|    ``learn_seq(@list(example),-list(clause))`` - ``zero_or_one``


.. raw:: html

   <div id="pclauses/2"> </div>

.. index:: pclauses/2
.. _metagol/0::pclauses/2:

``pclauses/2``
^^^^^^^^^^^^^^

Converts a learned program into a list of clauses.

| **Compilation flags:**
|    ``static``

| **Template:**
|    ``pclauses(Program,Clauses)``
| **Mode and number of proofs:**
|    ``pclauses(@list(term),-list(clause))`` - ``one``


.. raw:: html

   <div id="pprint/1"> </div>

.. index:: pprint/1
.. _metagol/0::pprint/1:

``pprint/1``
^^^^^^^^^^^^

Prints a learned program.

| **Compilation flags:**
|    ``static``

| **Template:**
|    ``pprint(Program)``
| **Mode and number of proofs:**
|    ``pprint(@list(term))`` - ``one``


.. raw:: html

   <div id="metarule/7"> </div>

.. index:: metarule/7
.. _metagol/0::metarule/7:

``metarule/7``
^^^^^^^^^^^^^^

| **Compilation flags:**
|    ``static``


.. raw:: html

   <div id="metarule_init/6"> </div>

.. index:: metarule_init/6
.. _metagol/0::metarule_init/6:

``metarule_init/6``
^^^^^^^^^^^^^^^^^^^

| **Compilation flags:**
|    ``static``


.. raw:: html

   <div id="prim/1"> </div>

.. index:: prim/1
.. _metagol/0::prim/1:

``prim/1``
^^^^^^^^^^

| **Compilation flags:**
|    ``dynamic``


.. raw:: html

   <div id="primcall/2"> </div>

.. index:: primcall/2
.. _metagol/0::primcall/2:

``primcall/2``
^^^^^^^^^^^^^^

| **Compilation flags:**
|    ``dynamic``


.. raw:: html

   <div id="interpreted_bk/2"> </div>

.. index:: interpreted_bk/2
.. _metagol/0::interpreted_bk/2:

``interpreted_bk/2``
^^^^^^^^^^^^^^^^^^^^

| **Compilation flags:**
|    ``static``


.. raw:: html

   <div id="functional/0"> </div>

.. index:: functional/0
.. _metagol/0::functional/0:

``functional/0``
^^^^^^^^^^^^^^^^

| **Compilation flags:**
|    ``dynamic``


.. raw:: html

   <div id="unfold_program/0"> </div>

.. index:: unfold_program/0
.. _metagol/0::unfold_program/0:

``unfold_program/0``
^^^^^^^^^^^^^^^^^^^^

| **Compilation flags:**
|    ``dynamic``


.. raw:: html

   <div id="min_clauses/1"> </div>

.. index:: min_clauses/1
.. _metagol/0::min_clauses/1:

``min_clauses/1``
^^^^^^^^^^^^^^^^^

| **Compilation flags:**
|    ``dynamic``


.. raw:: html

   <div id="max_clauses/1"> </div>

.. index:: max_clauses/1
.. _metagol/0::max_clauses/1:

``max_clauses/1``
^^^^^^^^^^^^^^^^^

| **Compilation flags:**
|    ``dynamic``


.. raw:: html

   <div id="max_inv_preds/1"> </div>

.. index:: max_inv_preds/1
.. _metagol/0::max_inv_preds/1:

``max_inv_preds/1``
^^^^^^^^^^^^^^^^^^^

| **Compilation flags:**
|    ``dynamic``


.. raw:: html

   <div id="metarule_next_id/1"> </div>

.. index:: metarule_next_id/1
.. _metagol/0::metarule_next_id/1:

``metarule_next_id/1``
^^^^^^^^^^^^^^^^^^^^^^

| **Compilation flags:**
|    ``dynamic``


Protected interface
-------------------

.. raw:: html

   <div id="pprint_clause/1"> </div>

.. index:: pprint_clause/1
.. _metagol/0::pprint_clause/1:

``pprint_clause/1``
^^^^^^^^^^^^^^^^^^^

| **Compilation flags:**
|    ``static``


.. raw:: html

   <div id="pprint_clauses/1"> </div>

.. index:: pprint_clauses/1
.. _metagol/0::pprint_clauses/1:

``pprint_clauses/1``
^^^^^^^^^^^^^^^^^^^^

| **Compilation flags:**
|    ``static``


.. raw:: html

   <div id="func_test/3"> </div>

.. index:: func_test/3
.. _metagol/0::func_test/3:

``func_test/3``
^^^^^^^^^^^^^^^

| **Compilation flags:**
|    ``static``


.. raw:: html

   <div id="prove_deduce/3"> </div>

.. index:: prove_deduce/3
.. _metagol/0::prove_deduce/3:

``prove_deduce/3``
^^^^^^^^^^^^^^^^^^

| **Compilation flags:**
|    ``static``


.. raw:: html

   <div id="assert_prim/1"> </div>

.. index:: assert_prim/1
.. _metagol/0::assert_prim/1:

``assert_prim/1``
^^^^^^^^^^^^^^^^^

| **Compilation flags:**
|    ``static``


.. raw:: html

   <div id="retract_prim/1"> </div>

.. index:: retract_prim/1
.. _metagol/0::retract_prim/1:

``retract_prim/1``
^^^^^^^^^^^^^^^^^^

| **Compilation flags:**
|    ``static``


.. raw:: html

   <div id="assert_program/1"> </div>

.. index:: assert_program/1
.. _metagol/0::assert_program/1:

``assert_program/1``
^^^^^^^^^^^^^^^^^^^^

| **Compilation flags:**
|    ``static``


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

.. raw:: html

   <div id="interpreted_/1"> </div>

.. index:: interpreted_/1
.. _metagol/0::interpreted_/1:

``interpreted_/1``
^^^^^^^^^^^^^^^^^^

| **Compilation flags:**
|    ``dynamic``


Operators
---------

(none)

Remarks
-------

(none)

