protocol

interval_constraint_network_protocol

Allen interval constraint-network protocol built on canonical relation sets, intended for small-to-medium symbolic networks.

Availability:
logtalk_load(intervals(loader))
Author: Paulo Moura
Version: 1:0:0
Date: 2026-05-13
Compilation flags:
static
Dependencies:
(none)
Remarks:
(none)
Inherited public predicates:
(none)

Public predicates

network/1

True if Network is a valid interval constraint network represented as a network(Nodes, Constraints) term.

Compilation flags:
static
Template:
network(Network)
Mode and number of proofs:
network(?compound) - zero_or_more

new/2

Constructs a new network for a list of distinct nodes. Distinct node pairs are initialized with the universal relation set.

Compilation flags:
static
Template:
new(Nodes,Network)
Mode and number of proofs:
new(+list,-compound) - zero_or_one

nodes/2

Returns the list of nodes in a network.

Compilation flags:
static
Template:
nodes(Network,Nodes)
Mode and number of proofs:
nodes(+compound,-list) - zero_or_one

relation/4

Returns the current relation set between two nodes in a network. A node is always equal to itself.

Compilation flags:
static
Template:
relation(Network,Node1,Node2,RelationSet)
Mode and number of proofs:
relation(+compound,@term,@term,-list(atom)) - zero_or_one

entails/4

True if the current relation set between two nodes is a subset of a queried relation set.

Compilation flags:
static
Template:
entails(Network,Node1,Node2,RelationSet)
Mode and number of proofs:
entails(+compound,@term,@term,+list(atom)) - zero_or_one

entails/5

True if the current relation set between two nodes is a subset of a queried relation set and returns an explanation term describing either a direct constraint or a supporting propagation path.

Compilation flags:
static
Template:
entails(Network,Node1,Node2,RelationSet,Explanation)
Mode and number of proofs:
entails(+compound,@term,@term,+list(atom),-compound) - zero_or_one

possible/4

True if the current relation set between two nodes intersects a queried relation set.

Compilation flags:
static
Template:
possible(Network,Node1,Node2,RelationSet)
Mode and number of proofs:
possible(+compound,@term,@term,+list(atom)) - zero_or_one

excluded/4

True if the current relation set between two nodes is disjoint from a queried relation set.

Compilation flags:
static
Template:
excluded(Network,Node1,Node2,RelationSet)
Mode and number of proofs:
excluded(+compound,@term,@term,+list(atom)) - zero_or_one

contradiction/2

Returns a simple contradiction explanation for an inconsistent network as contradiction(Node1, Node2, Cause).

Compilation flags:
static
Template:
contradiction(Network,Explanation)
Mode and number of proofs:
contradiction(+compound,-compound) - zero_or_more

entailment_explanations/5

Returns the list of immediate explanations supporting an entailed relation query, using identity, direct, and propagated explanation terms.

Compilation flags:
static
Template:
entailment_explanations(Network,Node1,Node2,RelationSet,Explanations)
Mode and number of proofs:
entailment_explanations(+compound,@term,@term,+list(atom),-list(compound)) - zero_or_one

contradiction_explanations/2

Returns the list of contradiction explanations for all empty explicit pair constraints in a network.

Compilation flags:
static
Template:
contradiction_explanations(Network,Explanations)
Mode and number of proofs:
contradiction_explanations(+compound,-list(compound)) - zero_or_one

refine/5

Refines the relation set between two distinct nodes by intersecting it with a new relation set.

Compilation flags:
static
Template:
refine(Network,Node1,Node2,RelationSet,RefinedNetwork)
Mode and number of proofs:
refine(+compound,@term,@term,+list(atom),-compound) - zero_or_one

consistent/1

True if all explicit pair constraints in a network are non-empty.

Compilation flags:
static
Template:
consistent(Network)
Mode and number of proofs:
consistent(+compound) - zero_or_one

propagate/2

Computes a path-consistency closure and succeeds only if the resulting network is consistent. Intended for small-to-medium symbolic networks; not a large-scale temporal CSP solver.

Compilation flags:
static
Template:
propagate(Network,Closure)
Mode and number of proofs:
propagate(+compound,-compound) - zero_or_one

propagate/3

Computes a path-consistency closure, returns the list of propagated changes, and succeeds only if the resulting network is consistent. Intended for small-to-medium symbolic networks; not a large-scale temporal CSP solver.

Compilation flags:
static
Template:
propagate(Network,Closure,Changes)
Mode and number of proofs:
propagate(+compound,-compound,-list(compound)) - zero_or_one

refine_propagate/5

Refines the relation set between two distinct nodes and then propagates the consequences, succeeding only if the resulting network is consistent. Intended for small-to-medium symbolic networks; not a large-scale temporal CSP solver.

Compilation flags:
static
Template:
refine_propagate(Network,Node1,Node2,RelationSet,Closure)
Mode and number of proofs:
refine_propagate(+compound,@term,@term,+list(atom),-compound) - zero_or_one

refine_propagate/6

Refines the relation set between two distinct nodes, propagates the consequences incrementally, and returns the list of direct and propagated changes, succeeding only if the resulting network is consistent. Intended for small-to-medium symbolic networks; not a large-scale temporal CSP solver.

Compilation flags:
static
Template:
refine_propagate(Network,Node1,Node2,RelationSet,Closure,Changes)
Mode and number of proofs:
refine_propagate(+compound,@term,@term,+list(atom),-compound,-list(compound)) - zero_or_one

refine_propagate/3

Applies a batch of relation-set refinements represented as constraint(Node1, Node2, RelationSet) terms and then propagates the combined consequences, succeeding only if the resulting network is consistent. Intended for small-to-medium symbolic networks; not a large-scale temporal CSP solver.

Compilation flags:
static
Template:
refine_propagate(Network,Constraints,Closure)
Mode and number of proofs:
refine_propagate(+compound,+list(compound),-compound) - zero_or_one

refine_propagate/4

Applies a batch of relation-set refinements, propagates the combined consequences incrementally, and returns the list of direct and propagated changes, succeeding only if the resulting network is consistent. Intended for small-to-medium symbolic networks; not a large-scale temporal CSP solver.

Compilation flags:
static
Template:
refine_propagate(Network,Constraints,Closure,Changes)
Mode and number of proofs:
refine_propagate(+compound,+list(compound),-compound,-list(compound)) - zero_or_one

propagation_triple/2

Extracts the causing node triple triple(Node1, Node3, Node2) from a propagated change term.

Compilation flags:
static
Template:
propagation_triple(Change,Triple)
Mode and number of proofs:
propagation_triple(+compound,-compound) - zero_or_one

propagation_triples/2

Collects the unique node triples that caused propagated refinements in a list of change terms.

Compilation flags:
static
Template:
propagation_triples(Changes,Triples)
Mode and number of proofs:
propagation_triples(+list(compound),-list(compound)) - zero_or_one

path_consistency/2

Computes the path-consistency closure of a network by iterative refinement using relation-set composition and intersection. Intended for small-to-medium symbolic networks; not a large-scale temporal CSP solver.

Compilation flags:
static
Template:
path_consistency(Network,Closure)
Mode and number of proofs:
path_consistency(+compound,-compound) - zero_or_one

constraints/2

Returns the explicit pair constraints in canonical storage order using constraint(Node1, Node2, RelationSet) terms.

Compilation flags:
static
Template:
constraints(Network,Constraints)
Mode and number of proofs:
constraints(+compound,-list(compound)) - zero_or_one

subsumes/2

True if the first network is at least as general as the second network, i.e. every pair relation set in the second network is a subset of the corresponding relation set in the first network.

Compilation flags:
static
Template:
subsumes(Network1,Network2)
Mode and number of proofs:
subsumes(+compound,+compound) - zero_or_one

equivalent/2

True if two networks contain the same nodes and mutually subsume each other.

Compilation flags:
static
Template:
equivalent(Network1,Network2)
Mode and number of proofs:
equivalent(+compound,+compound) - zero_or_one

Protected predicates

(none)

Private predicates

(none)

Operators

(none)