SolutionPresentation

sealed interface SolutionPresentation

One outcome of resolving a query, already formatted as display-ready text so a frontend never needs to know about the underlying Term/Solution types.

Inheritors

Types

Link copied to clipboard
data class Halt(val query: String, val message: String, val logicStackTrace: List<String> = emptyList(), val isTimeout: Boolean = false) : SolutionPresentation

The resolution was aborted, e.g. by an exception or a timeout (isTimeout).

Link copied to clipboard
data class No(val query: String) : SolutionPresentation

The goal failed.

Link copied to clipboard
data class Yes(val query: String, val bindings: List<BindingPresentation> = emptyList(), val solvedQuery: String? = null, val metadata: Map<String, String> = emptyMap()) : SolutionPresentation

The goal succeeded; solvedQuery/bindings are pre-formatted, and metadata carries any extension's per-solution extras (e.g. PLP's probability), keyed by a well-known string name.

Properties

Link copied to clipboard
abstract val query: String

The query text this solution answers.