sealed interface Solution: Any
Fields
Name | Description |
---|---|
abstract query: Struct
|
The query to which the solution refers |
abstract substitution: Substitution
|
The substitution that has been applied to find the solution, or a failed substitution |
abstract exception: ResolutionException?
|
|
abstract solvedQuery: Struct?
|
The Struct representing the solution, or |
abstract isYes: Boolean
|
|
abstract isNo: Boolean
|
|
abstract isHalt: Boolean
|
Methods
asYes
open fun asYes(): Yes?
castToYes
open fun castToYes(): Yes
asNo
open fun asNo(): No?
castToNo
open fun castToNo(): No
asHalt
open fun asHalt(): Halt?
castToHalt
open fun castToHalt(): Halt
whenIs
abstract fun <T> whenIs(yes: (Yes)->T, no: (No)->T, halt: (Halt)->T, otherwise: (Solution)->T): T
ReturnValue
Name | Description |
---|---|
T
|
CompanionObject
Solution
sealed interface Solution: Any
A type representing a solution to a goal
Methods
yes
fun yes(signature: Signature, arguments: List<Term>, substitution: Unifier): Yes
ReturnValue
Name | Description |
---|---|
Yes
|
halt
fun halt(query: Struct, exception: ResolutionException): Halt
Parameters
Name | Description |
---|---|
query: Struct
|
|
exception: ResolutionException
|
ReturnValue
Name | Description |
---|---|
Halt
|
halt
fun halt(signature: Signature, arguments: List<Term>, exception: ResolutionException): Halt
Parameters
Name | Description |
---|---|
signature: Signature
|
|
arguments: List<Term>
|
|
exception: ResolutionException
|
ReturnValue
Name | Description |
---|---|
Halt
|
A type representing a solution to a goal