commonMain.it.unibo.tuprolog.solve.AbstractWrapper.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of solve-jvm Show documentation
Show all versions of solve-jvm Show documentation
Resolution-agnostic API for logic solvers
package it.unibo.tuprolog.solve
import kotlin.js.JsName
/**
* Signature to [Wrapped] type, abstract wrapper class
*
* @param signature the supported input signature
*
* @author Enrico
*/
abstract class AbstractWrapper(
@JsName("signature") val signature: Signature,
) {
constructor(name: String, arity: Int, vararg: Boolean = false) : this(Signature(name, arity, vararg))
/** The wrapped implementation */
@JsName("wrappedImplementation")
abstract val implementation: Wrapped
/** A shorthand to get the signature functor name */
@JsName("functor")
val functor: String
inline get() = signature.name
/** Gets this wrapped primitive description [Pair] formed by [signature] and wrapped primitive type */
@JsName("descriptionPair")
val descriptionPair: Pair
inline get() = signature to implementation
}