All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.it.unibo.tuprolog.solve.TestCall.kt Maven / Gradle / Ivy

There is a newer version: 1.0.4
Show newest version
package it.unibo.tuprolog.solve

interface TestCall : SolverTest {
    companion object {
        fun prototype(
            solverFactory: SolverFactory,
            errorSignature: Signature = Signature("call", 1),
        ): TestCall = TestCallImpl(solverFactory, errorSignature)
    }

    val errorSignature: Signature

    /**
     * Tests the queries
     * ```prolog
     * ?- call(!).
     * ```
     * succeeds on a solver initialized with default built-ins and with and empty theory,
     */
    fun testCallCut()

    /**
     * Tests the queries
     * ```prolog
     * ?- call(fail).
     * ```
     * fails on a solver initialized with default built-ins and with and empty theory,
     */
    fun testCallFail()

    /**
     * Tests the queries
     * ```prolog
     * ?- call(fail,X).
     * ```
     * fails on a solver initialized with default built-ins and with and empty theory,
     */
    fun testCallFailX()

    /**
     * Tests the queries
     * ```prolog
     * ?- call(fail, call(1)).
     * ```
     * fails on a solver initialized with default built-ins and with and empty theory,
     */
    fun testCallFailCall()

    /**
     * Tests the queries
     * ```prolog
     * ?- call((write(3), X)).
     * ```
     * fails on a solver initialized with default built-ins and with and empty theory,
     * producing exception `instantiation_error`.
     */
    fun testCallWriteX()

    /**
     * Tests the queries
     * ```prolog
     * ?- call((write(3), call(1))).
     * ```
     * fails on a solver initialized with default built-ins and with and empty theory,
     * producing exception `type_error(callable,1)`.
     */
    fun testCallWriteCall()

    /**
     * Tests the queries
     * ```prolog
     * ?- call(X).
     * ```
     * fails on a solver initialized with default built-ins and with and empty theory,
     * producing exception `instantiation_error`.
     */
    fun testCallX()

    /**
     * Tests the queries
     * ```prolog
     * ?- call(1).
     * ```
     * fails on a solver initialized with default built-ins and with and empty theory,
     * producing exception `type_error(callable,1)`.
     */
    fun testCallOne()

    /**
     * Tests the queries
     * ```prolog
     * ?- call((fail,1)).
     * ```
     * fails on a solver initialized with default built-ins and with and empty theory,
     * producing exception `type_error(callable,(fail,1))`.
     */
    fun testCallFailOne()

    /**
     * Tests the queries
     * ```prolog
     * ?- call((write(3),1)).
     * ```
     * fails on a solver initialized with default built-ins and with and empty theory,
     * producing exception `type_error(callable,(write(3),1))`.
     */
    fun testCallWriteOne()

    /**
     * Tests the queries
     * ```prolog
     * ?- call((1; true)).
     * ```
     * fails on a solver initialized with default built-ins and with and empty theory,
     * producing exception `type_error(callable,(1; true))`.
     */
    fun testCallTrue()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy