LocalCluster

class LocalCluster @JvmOverloads constructor(parts: Int? = null, flags: Flags = Flags.defaults(), val scheduler: SequentialScheduler = SequentialScheduler(), lends: Boolean = true)

A distributed solver whose nodes run in turn, on the thread of the caller: the same messages as on a cluster, in a deterministic order, on every platform. The theory is split into at most parts partitions if given, one for each group of rules supporting one another otherwise; the graph is labelled as the standard solver does with flags.

Local clusters sharing their scheduler run in turn together: federated through links delivered by it (see it.unibo.tuprolog.argumentation.parallel.federation.MemoryLinks), they behave as sites on different machines, deterministically.

Constructors

Link copied to clipboard
constructor(parts: Int? = null, flags: Flags = Flags.defaults(), scheduler: SequentialScheduler = SequentialScheduler(), lends: Boolean = true)

Properties

Link copied to clipboard

The flags of the solver, the initial ones those given: those set apply from the next evaluation on, the graph built anew, the links and the peers of the cluster kept

Link copied to clipboard
Link copied to clipboard
val site: Site

The site of the cluster, to federate it with others, through its links

Link copied to clipboard

The cluster as a solver of arg2p: any goal, its solutions and their graphs, the answers of queries

Link copied to clipboard

What the cluster does: its site, and the last evaluation it answered (see Site.stats)

Functions

Link copied to clipboard
fun add(clause: String)

Adds clause, as Prolog text, to the theory

Link copied to clipboard
fun load(theory: String)

Replaces the theory with theory, as Prolog text

Link copied to clipboard
fun reset()

Forgets the theory

Link copied to clipboard

The arguments for statement, as Prolog text, by label