.. 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.24
| **Date:** 2019/5/8

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


.. 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 pretty prints the learned program.

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

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


.. 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="learn_with_timeout/4"> </div>

.. index:: learn_with_timeout/4
.. _metagol/0::learn_with_timeout/4:

``learn_with_timeout/4``
^^^^^^^^^^^^^^^^^^^^^^^^

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

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

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


.. raw:: html

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

.. index:: program_to_clauses/2
.. _metagol/0::program_to_clauses/2:

``program_to_clauses/2``
^^^^^^^^^^^^^^^^^^^^^^^^

Converts a learned program into a list of clauses.

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

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


.. raw:: html

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

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

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

Pretty prints a learned program.

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

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


.. raw:: html

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

.. index:: metarule/6
.. _metagol/0::metarule/6:

``metarule/6``
^^^^^^^^^^^^^^

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


.. raw:: html

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

.. index:: head_pred/1
.. _metagol/0::head_pred/1:

``head_pred/1``
^^^^^^^^^^^^^^^

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


.. raw:: html

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

.. index:: body_pred/1
.. _metagol/0::body_pred/1:

``body_pred/1``
^^^^^^^^^^^^^^^

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


.. raw:: html

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

.. index:: ibk/3
.. _metagol/0::ibk/3:

``ibk/3``
^^^^^^^^^

| **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="functional/0"> </div>

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

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


.. raw:: html

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

.. index:: timeout/1
.. _metagol/0::timeout/1:

``timeout/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="compiled_pred_call/2"> </div>

.. index:: compiled_pred_call/2
.. _metagol/0::compiled_pred_call/2:

``compiled_pred_call/2``
^^^^^^^^^^^^^^^^^^^^^^^^

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


.. raw:: html

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

.. index:: body_pred_call/2
.. _metagol/0::body_pred_call/2:

``body_pred_call/2``
^^^^^^^^^^^^^^^^^^^^

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


.. raw:: html

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

.. index:: type/3
.. _metagol/0::type/3:

``type/3``
^^^^^^^^^^

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


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

(see related entities)

Operators
---------

(none)

Remarks
-------

(none)

