pattern_miner_common — Logtalk 3.100.1

category

# `pattern_miner_common`

Shared predicates for pattern miner diagnostics, defaults, option handling, and export helpers.

Availability:
`logtalk_load(pattern_mining_protocols(loader))`
Author: Paulo Moura
Version: 1:0:0
Date: 2026-04-29
Compilation flags:
`static`
Implements:
`public` pattern_miner_protocol
Extends:
`public` options
Uses:
format
list
type
Remarks:
(none)
Inherited public predicates:
check_option/1 check_options/1 check_pattern_miner/1 default_option/1 default_options/1 diagnostic/2 diagnostics/2 export_to_clauses/4 export_to_file/4 mine/2 mine/3 option/2 option/3 pattern_miner_options/2 print_pattern_miner/1 valid_option/1 valid_options/1 valid_pattern_miner/1

## Public predicates

(no local declarations; see entity ancestors if any)

## Protected predicates

### `pattern_miner_diagnostics_data/2`

Hook predicate that importing pattern miner implementations must define in order to expose diagnostics metadata.

Compilation flags:
`static`
Template:
`pattern_miner_diagnostics_data(PatternMiner,Diagnostics)`
Mode and number of proofs:
`pattern_miner_diagnostics_data(+compound,-list(compound))` - `one`

### `pattern_miner_diagnostics/6`

Builds a standard diagnostics list from generic pattern miner metadata and algorithm-specific diagnostics terms.

Compilation flags:
`static`
Template:
`pattern_miner_diagnostics(Model,ItemDomain,Patterns,Options,SpecificDiagnostics,Diagnostics)`
Mode and number of proofs:
`pattern_miner_diagnostics(+atom,+list(atom),+list(compound),+list(compound),+list(compound),-list(compound))` - `one`

### `pattern_miner_export_template/4`

Hook predicate that importing pattern miner implementations must define in order to expose the exported pattern miner template for a given functor.

Compilation flags:
`static`
Template:
`pattern_miner_export_template(Dataset,PatternMiner,Functor,Template)`
Mode and number of proofs:
`pattern_miner_export_template(+object_identifier,+compound,+atom,-callable)` - `one`

### `valid_pattern_miner_metadata/5`

True when the diagnostics list matches the generic pattern miner metadata implied by the model, item domain, mined patterns, and effective options.

Compilation flags:
`static`
Template:
`valid_pattern_miner_metadata(Model,ItemDomain,Patterns,Options,Diagnostics)`
Mode and number of proofs:
`valid_pattern_miner_metadata(+atom,+list(atom),+list(compound),+list(compound),+list(compound))` - `zero_or_one`

### `check_item_domain/1`

Validates that the declared item domain is canonical and contains only atoms.

Compilation flags:
`static`
Template:
`check_item_domain(ItemDomain)`
Mode and number of proofs:
`check_item_domain(+list(atom))` - `one`

### `effective_support_count/3`

Computes the effective minimum support count from the effective options and the dataset size.

Compilation flags:
`static`
Template:
`effective_support_count(DatasetSize,Options,SupportCount)`
Mode and number of proofs:
`effective_support_count(+integer,+list(compound),-integer)` - `one`

### `effective_maximum_pattern_length/3`

Computes the effective maximum pattern length from the effective options and the dataset maximum pattern length.

Compilation flags:
`static`
Template:
`effective_maximum_pattern_length(DatasetMaximumPatternLength,Options,MaximumPatternLength)`
Mode and number of proofs:
`effective_maximum_pattern_length(+integer,+list(compound),-integer)` - `one`

## Private predicates

(no local declarations; see entity ancestors if any)

## Operators

(none)