TestFlagsImpl

class TestFlagsImpl(solverFactory: SolverFactory) : TestFlags

Concrete implementation of TestFlags, instantiated via TestFlags.prototype.

Constructors

Link copied to clipboard
constructor(solverFactory: SolverFactory)

Properties

Link copied to clipboard

A long test max duration, four times mediumDuration; used for queries involving deeper search or recursion.

Link copied to clipboard

A medium test max duration, twice shortDuration; used for queries involving a handful of resolution steps.

Link copied to clipboard

A short test max duration, used for queries expected to resolve almost immediately.

Functions

Tests that the query

Link copied to clipboard

Tests that it.unibo.tuprolog.solve.flags.LastCallOptimization's default value is on, and that the query

Link copied to clipboard
open override fun defaultUnknownIsWarning()

Tests that it.unibo.tuprolog.solve.flags.Unknown's default value is warning, and that the query

Link copied to clipboard
open override fun flagsNamesMustBeAtoms()

Tests that every flag returned by current_flag(F, _) (with F unbound) is bound to an atom, and that passing a non-atom flag name (an integer, a compound, a float) to either current_flag/2 or set_flag/2 fails producing a type_error(atom, Name).

Link copied to clipboard

Tests that current_flag(F, X), with F unbound, enumerates on backtracking every flag currently set on the solver (each name bound to F, each value bound to X), matching the solver's flags map exactly.

Link copied to clipboard
open override fun gettingMissingFlagsFails()

Tests that, for flag names not present in a solver's default flags map (a, b, c), the query

Tests that the query

Link copied to clipboard
open override fun settingMissingFlagsSucceeds()

Tests that, for flag names not present in a solver's default flags map (a, b, c), the query

Link copied to clipboard

Tests that, for every admissible value of the unknown flag, the query