object

# `metagol`

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

Author: Metagol authors; adapted to Logtalk by Paulo Moura.
Version: 0:24:1
Date: 2020-12-20
Copyright: Copyright 2016 Metagol authors; Copyright 2018-2019 Paulo Moura
License: BSD 3-Clause License
Compilation flags:
`static, context_switching_calls`
Implements:
`public` expanding
Provides:
logtalk::message_tokens//2
logtalk::message_prefix_stream/4
Uses:
coroutining
integer
list
logtalk
meta
pairs
timeout
Remarks:
(none)
Inherited public predicates:
goal_expansion/2 term_expansion/2

- Public predicates

  - `learn/3`

  - `learn/2`

  - `learn_seq/2`

  - `learn_with_timeout/4`

  - `program_to_clauses/2`

  - `pprint/1`

  - `metarule/6`

  - `head_pred/1`

  - `body_pred/1`

  - `ibk/3`

  - `func_test/3`

  - `functional/0`

  - `min_clauses/1`

  - `max_clauses/1`

  - `max_inv_preds/1`

  - `metarule_next_id/1`

  - `timeout/1`

- Protected predicates

  - `pprint_clause/1`

  - `pprint_clauses/1`

  - `compiled_pred_call/2`

  - `body_pred_call/2`

  - `type/3`

- Private predicates

- Operators

## Public predicates

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

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

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

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

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

### `pprint/1`

Pretty prints a learned program.

Compilation flags:
`static`
Template:
`pprint(Program)`
Mode and number of proofs:
`pprint(@list(term))` - `one`

### `metarule/6`

Compilation flags:
`static`

### `head_pred/1`

Compilation flags:
`static`

### `body_pred/1`

Compilation flags:
`dynamic`

### `ibk/3`

Compilation flags:
`static`

### `func_test/3`

Compilation flags:
`static`

### `functional/0`

Compilation flags:
`dynamic`

### `min_clauses/1`

Compilation flags:
`dynamic`

### `max_clauses/1`

Compilation flags:
`dynamic`

### `max_inv_preds/1`

Compilation flags:
`dynamic`

### `metarule_next_id/1`

Compilation flags:
`dynamic`

### `timeout/1`

Compilation flags:
`dynamic`

## Protected predicates

### `pprint_clause/1`

Compilation flags:
`static`

### `pprint_clauses/1`

Compilation flags:
`static`

### `compiled_pred_call/2`

Compilation flags:
`dynamic`

### `body_pred_call/2`

Compilation flags:
`dynamic`

### `type/3`

Compilation flags:
`dynamic`

## Private predicates

(no local declarations; see entity ancestors if any)

## Operators

(none)