Package-level declarations

Types

Link copied to clipboard

A cluster of JavaScript as a solver of arg2p, as Arg2p is one, its answers promised as the workers compute them (see ClusterSolver): any goal solved as the standard solver solves it, one solution at a time, with the graph of each, and the answers of queries

Link copied to clipboard

The solutions of a goal, given one at a time as they are asked for

Link copied to clipboard

A cluster as a solver of arg2p, as Arg2p is one, on the theory and the flags of the cluster: any goal solved as the standard solver solves it (buildLabelSets/3, answerQuery/4, the Prolog predicates of the theory, ...), one solution at a time, with the graph of each, and the answers of queries. The graph a goal needs is built by the workers of the cluster and of the sites it is federated with (the whole graph, or, in query mode, the part the statements it evaluates depend on, grown by the later ones), and labelled by the catalog of the cluster; the stages of a resolution are not kept, the graph of the last one alone.

Link copied to clipboard
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.

Link copied to clipboard
class ThreadedCluster @JvmOverloads constructor(threads: Int = processors, parts: Int? = null, flags: Flags = Flags.defaults(), textual: Boolean = false, lends: Boolean = true) : AutoCloseable

A distributed solver on the threads of this JVM: each node (the catalog, each worker) handles its messages one at a time, the nodes in parallel on threads threads. The theory is split into at most parts partitions if given, as many as the workers of the cluster and of the sites it is federated with otherwise (see site); the graph is labelled as the standard solver does with flags. The nodes share the terms of their messages; with textual, every message is written as text by its sender and read by its receiver instead, as between processes (see it.unibo.tuprolog.argumentation.parallel.message.MessageCodec).

Link copied to clipboard
class WebWorkerCluster(threads: Int, worker: String, parts: Int? = null, flags: Flags = Flags.defaults(), iceServers: Array<dynamic> = emptyArray())

A distributed solver in a browser: the catalog on the page, the workers on threads Web Workers, each running the script at worker (one calling startWebWorker with this module loaded) and a site of its own, a delegate of the one of the page (see Site.delegate). The theory is split into at most parts partitions if given, as many as the workers of the Web Workers and of the sites the cluster is federated with otherwise: it federates with JVM and Node.js sites over WebSockets (connect), lending them the workers of its Web Workers, and with the browsers they are linked to over WebRTC (see RtcLinks, with iceServers if given, as RTCPeerConnection takes them). The graph is labelled as the standard solver does with flags.

Link copied to clipboard
class WorkerCluster(threads: Int, parts: Int? = null, flags: Flags = Flags.defaults(), module: String? = null)

A distributed solver on the threads of Node.js (worker_threads): the catalog on the calling thread, the workers on threads threads, each loading this module (module, this very file by default) and running a site of its own, a delegate of the one of the calling thread (see Site.delegate), over the messages between threads: the cluster lends the workers of its threads to the sites it is federated with. The theory is split into at most parts partitions if given, as many as the workers of the threads and of the sites it is federated with otherwise (see listen and connect); the graph is labelled as the standard solver does with flags. The threads keep Node.js running only while an evaluation is pending; close stops them.

Functions

Link copied to clipboard

The loop of a Web Worker of WebWorkerCluster: a site running a worker for the site of the page that started it

Link copied to clipboard

The loop of a thread of WorkerCluster: a site running a worker for the site of the thread that started it