Package-level declarations

Types

Link copied to clipboard
data class Answer(val inStatements: List<Value>, val outStatements: List<Value>, val undStatements: List<Value>)

The statements for a query labelled in, out and und (see Arg2p.answer)

Link copied to clipboard
class AnswerQuery(query: Term)

The answer of a query as the solvers of arg2p give it: the goal answerQuery(Query, In, Out, Und), and the Answer its first yes solution gives

Link copied to clipboard
class Arg2pException @JvmOverloads constructor(message: String, val syntax: SyntaxProblem? = null) : Exception

An evaluation halted by an error: a theory its profile refuses, a goal that cannot be parsed, ... When a text does not parse (a theory, a query, flags), syntax tells where.

Link copied to clipboard

The conflicts beyond those a theory declares (conflictModel)

Link copied to clipboard
class Flags

The flags of a solver (see the flags reference of arg2p), as the facts stating them: defaults (those of arg2p), none (only those the theory states), or parse (as Prolog text). A flag set replaces what the flags stated for it; the theory may state flags as well, which override these. The profile of the theory (graphBuildMode) presets the flags its definition needs.

Link copied to clipboard

The module building the graph (graphBuilder): from the rules, or from the arguments and attacks of the theory

Link copied to clipboard

An extension of the graph (graphExtension)

Link copied to clipboard

A language extending the one of arg2p (graphLanguage)

Link copied to clipboard
@RequiresOptIn(level = RequiresOptIn.Level.ERROR, message = "Internal to arg2p: it may change in any version")
annotation class InternalArg2pApi

A declaration the modules of arg2p share with one another, not part of its API: it may change in any version. The modules of arg2p opt in (see ktCompilerArgs in gradle.properties); its users get an error.

Link copied to clipboard

The comparator of the sets of rules or premises (orderingComparator)

Link copied to clipboard

The ordering principle of the preferences (orderingPrinciple)

Link copied to clipboard

The profile of a theory (graphBuildMode): the flags its definition needs, preset

Link copied to clipboard

The semantics of the argument labelling (argumentLabellingMode)

Link copied to clipboard
class Solution

A solution of a goal: yes, no or halt (an error), with the values a yes solution binds to the variables of the goal

Link copied to clipboard
class Solutions

The solutions of a goal, computed one at a time as they are asked for: with hasNext and next, or iterated in Kotlin

Link copied to clipboard

The labelling of the statements from that of the arguments (statementLabellingMode)

Link copied to clipboard
class SyntaxProblem(val line: Int, val column: Int, val token: String?, val description: String)

Where a text (a theory, a query, flags) does not parse: its line and column (from 1), the token found there when there is one, and why (description, as Unexpected token '.'; expected term)

Link copied to clipboard
sealed class Value

A Prolog term, as arg2p gives it (a statement, the binding of a variable, ...) and takes it: an Atom, an Integer, a Real, a Variable, a List or a compound term (Struct). A value is written as arg2p writes it, with its operators (-a, r1 : [a] => b); parse reads it back.

Functions

Link copied to clipboard
fun solutionOf(solution: Solution): Solution

The solution of the API for solution (for the solvers of the modules of arg2p)

Link copied to clipboard
fun solutionsOf(solutions: Iterator<Solution>): Solutions

The solutions given by solutions, computed as they are asked for (for the solvers of the modules of arg2p)