TuPrologSolveQuery

The solve subcommand of TuPrologCmd: java -jar 2p-repl.jar solve QUERY [-n N].

Rather than starting an interactive loop, it parses and solves a single, non-interactive query argument with the solver TuPrologCmd.getSolver builds (inheriting the parent command's -T/--theory, -t/--timeout and --oop options), prints the resulting solution(s), and then terminates -- suited to scripting or one-off invocations where a full REPL session is unnecessary.

By default all solutions are printed interactively, one at a time, prompting for ; to continue (see AbstractTuPrologCommand.printSolutions); passing -n/--numberOfSolutions with a positive value instead prints up to that many solutions without prompting (see AbstractTuPrologCommand.printNumSolutions).

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
Link copied to clipboard
open override val autoCompleteEnvvar: String?
Link copied to clipboard
Link copied to clipboard
val currentContext: Context
Link copied to clipboard
open override val helpTags: Map<String, String>
Link copied to clipboard
open override val hiddenFromHelp: Boolean
Link copied to clipboard
open override val invokeWithoutSubcommand: Boolean
Link copied to clipboard
Link copied to clipboard
open override val printHelpOnEmptyArgs: Boolean
Link copied to clipboard

Functions

Link copied to clipboard
open fun aliases(): Map<String, List<String>>
Link copied to clipboard
open fun allHelpParams(): List<HelpFormatter.ParameterHelp>
Link copied to clipboard
open fun commandHelp(context: Context): String
Link copied to clipboard
open fun commandHelpEpilog(context: Context): String
Link copied to clipboard
fun configureContext(block: Context.Builder.() -> Unit)
Link copied to clipboard
fun echo()
fun echo(message: Any?, trailingNewline: Boolean, err: Boolean)
Link copied to clipboard
fun echoFormattedHelp(error: CliktError?)
Link copied to clipboard
fun getFormattedHelp(error: CliktError?): String?
Link copied to clipboard
open override fun help(context: Context): String
Link copied to clipboard
open override fun helpEpilog(context: Context): String
Link copied to clipboard
fun issueMessage(message: String)
Link copied to clipboard
fun registerArgument(argument: Argument)
Link copied to clipboard
fun registeredArguments(): List<Argument>
Link copied to clipboard
fun registeredOptions(): List<Option>
Link copied to clipboard
fun registeredParameterGroups(): List<ParameterGroup>
Link copied to clipboard
fun registeredSubcommands(): List<CoreCliktCommand>
Link copied to clipboard
open override fun registerOption(option: GroupableOption)
fun registerOption(option: Option)
Link copied to clipboard
fun registerOptionGroup(group: ParameterGroup)
Link copied to clipboard
fun resetContext(parent: Context?): Context
Link copied to clipboard
open override fun run()

Retrieves the parent TuPrologCmd's solver (see TuPrologCmd.getSolver) and uses it to solve and print this subcommand's query.

Link copied to clipboard
open override fun toString(): String