diff --git a/buildSrc/src/main/kotlin/Libs.kt b/buildSrc/src/main/kotlin/Libs.kt index 3c792a023..553f0497a 100644 --- a/buildSrc/src/main/kotlin/Libs.kt +++ b/buildSrc/src/main/kotlin/Libs.kt @@ -92,35 +92,35 @@ object Libs { const val org_danilopianini_git_sensitive_semantic_versioning_gradle_plugin: String = "org.danilopianini.git-sensitive-semantic-versioning:org.danilopianini.git-sensitive-semantic-versioning.gradle.plugin:" + - Versions.org_danilopianini_git_sensitive_semantic_versioning_gradle_plugin + Versions.org_danilopianini_git_sensitive_semantic_versioning_gradle_plugin const val com_github_breadmoirai_github_release_gradle_plugin: String = - "com.github.breadmoirai.github-release:com.github.breadmoirai.github-release.gradle.plugin:" + - Versions.com_github_breadmoirai_github_release_gradle_plugin + "com.github.breadmoirai.github-release:com.github.breadmoirai.github-release.gradle.plugin:" + + Versions.com_github_breadmoirai_github_release_gradle_plugin const val org_jetbrains_kotlin_multiplatform_gradle_plugin: String = - "org.jetbrains.kotlin.multiplatform:org.jetbrains.kotlin.multiplatform.gradle.plugin:" + - Versions.org_jetbrains_kotlin_multiplatform_gradle_plugin + "org.jetbrains.kotlin.multiplatform:org.jetbrains.kotlin.multiplatform.gradle.plugin:" + + Versions.org_jetbrains_kotlin_multiplatform_gradle_plugin const val com_github_johnrengelman_shadow_gradle_plugin: String = - "com.github.johnrengelman.shadow:com.github.johnrengelman.shadow.gradle.plugin:" + - Versions.com_github_johnrengelman_shadow_gradle_plugin + "com.github.johnrengelman.shadow:com.github.johnrengelman.shadow.gradle.plugin:" + + Versions.com_github_johnrengelman_shadow_gradle_plugin const val de_fayard_buildsrcversions_gradle_plugin: String = - "de.fayard.buildSrcVersions:de.fayard.buildSrcVersions.gradle.plugin:" + - Versions.de_fayard_buildsrcversions_gradle_plugin + "de.fayard.buildSrcVersions:de.fayard.buildSrcVersions.gradle.plugin:" + + Versions.de_fayard_buildsrcversions_gradle_plugin const val com_eden_orchidplugin_gradle_plugin: String = - "com.eden.orchidPlugin:com.eden.orchidPlugin.gradle.plugin:" + - Versions.com_eden_orchidplugin_gradle_plugin + "com.eden.orchidPlugin:com.eden.orchidPlugin.gradle.plugin:" + + Versions.com_eden_orchidplugin_gradle_plugin const val org_jetbrains_dokka_gradle_plugin: String = - "org.jetbrains.dokka:org.jetbrains.dokka.gradle.plugin:" + - Versions.org_jetbrains_dokka_gradle_plugin + "org.jetbrains.dokka:org.jetbrains.dokka.gradle.plugin:" + + Versions.org_jetbrains_dokka_gradle_plugin const val com_jfrog_bintray_gradle_plugin: String = - "com.jfrog.bintray:com.jfrog.bintray.gradle.plugin:" + - Versions.com_jfrog_bintray_gradle_plugin + "com.jfrog.bintray:com.jfrog.bintray.gradle.plugin:" + + Versions.com_jfrog_bintray_gradle_plugin /** * 2.7.1 diff --git a/buildSrc/src/main/kotlin/Versions.kt b/buildSrc/src/main/kotlin/Versions.kt index 914d43cd1..97ef92b2f 100644 --- a/buildSrc/src/main/kotlin/Versions.kt +++ b/buildSrc/src/main/kotlin/Versions.kt @@ -12,7 +12,7 @@ import org.gradle.plugin.use.PluginDependencySpec * YOU are responsible for updating manually the dependency version. */ object Versions { - const val io_github_javaeden_orchid: String = "0.20.0" + const val io_github_javaeden_orchid: String = "0.21.0" const val org_jetbrains_kotlin: String = "1.3.72" @@ -28,7 +28,7 @@ object Versions { const val de_fayard_buildsrcversions_gradle_plugin: String = "0.7.0" - const val com_eden_orchidplugin_gradle_plugin: String = "0.20.0" + const val com_eden_orchidplugin_gradle_plugin: String = "0.20.0" // available: "0.21.0" const val org_jetbrains_dokka_gradle_plugin: String = "0.10.1" @@ -41,11 +41,11 @@ object Versions { const val kt_math: String = "0.1.3" /** - * Current version: "6.4.1" + * Current version: "6.5" * See issue 19: How to update Gradle itself? * https://github.com/jmfayard/buildSrcVersions/issues/19 */ - const val gradleLatestVersion: String = "6.4.1" + const val gradleLatestVersion: String = "6.5" } /** diff --git a/core/build.gradle.kts b/core/build.gradle.kts index 7bf255238..97d221261 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -19,7 +19,7 @@ kotlin { |package $tuPrologPackage | |object Info { - | val VERSION = "${rootProject.version}" + | const val VERSION = "${rootProject.version}" |} """.trimMargin()) } diff --git a/gradle.properties b/gradle.properties index 62171c05c..9f4bddbad 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,6 +6,9 @@ javaVersion=8 # semicolon separated ktFreeCompilerArgsJvm=-Xjvm-default=enable +# mocha timeout for a single test method, in milli-seconds +mochaTimeout=60000 + # Signing signingKey= signingPassword= diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index a4f0001d2..622ab64a3 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.4.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/solve-classic/gradle.properties b/solve-classic/gradle.properties deleted file mode 100644 index bbf15933a..000000000 --- a/solve-classic/gradle.properties +++ /dev/null @@ -1,2 +0,0 @@ -# mocha timeout for a single test method, in milli-seconds -mochaTimeout=10000 \ No newline at end of file diff --git a/solve-streams/gradle.properties b/solve-streams/gradle.properties index 336ef3aa8..2b1d906de 100644 --- a/solve-streams/gradle.properties +++ b/solve-streams/gradle.properties @@ -1,6 +1,2 @@ -# mocha timeout for a single test method, in milli-seconds -mochaTimeout=20000 - jvmStackSize=256M - jvmMaxHeapSize=1G \ No newline at end of file diff --git a/solve-streams/src/commonMain/kotlin/it/unibo/tuprolog/solve/solver/fsm/impl/StateRuleSelection.kt b/solve-streams/src/commonMain/kotlin/it/unibo/tuprolog/solve/solver/fsm/impl/StateRuleSelection.kt index 7d3c93ece..6250d5905 100644 --- a/solve-streams/src/commonMain/kotlin/it/unibo/tuprolog/solve/solver/fsm/impl/StateRuleSelection.kt +++ b/solve-streams/src/commonMain/kotlin/it/unibo/tuprolog/solve/solver/fsm/impl/StateRuleSelection.kt @@ -42,8 +42,7 @@ internal class StateRuleSelection( wellFormedRuleBody, unifyingSubstitution, isChoicePointChild = isChoicePoint, - requestIssuingInstant = if (solve.query === solve.context.procedure) - currentTimeInstant() else solve.requestIssuingInstant + requestIssuingInstant = currentTimeInstant() ) val subInitialState = StateInit(subSolveRequest.initializeForSubRuleScope()) diff --git a/solve-streams/src/commonTest/kotlin/it/unibo/tuprolog/solve/systemtest/StreamsSolverSystemTesting.kt b/solve-streams/src/commonTest/kotlin/it/unibo/tuprolog/solve/systemtest/StreamsSolverSystemTesting.kt index 5e00f17ee..71b07a976 100644 --- a/solve-streams/src/commonTest/kotlin/it/unibo/tuprolog/solve/systemtest/StreamsSolverSystemTesting.kt +++ b/solve-streams/src/commonTest/kotlin/it/unibo/tuprolog/solve/systemtest/StreamsSolverSystemTesting.kt @@ -17,9 +17,6 @@ class StreamsSolverSystemTesting : SolverFactory, SolverTest { override val defaultBuiltins: AliasedLibrary = DefaultBuiltins -// override val maxDuration: TimeDuration -// get() = mediumDuration - override fun solverOf( libraries: Libraries, flags: PrologFlags, @@ -113,13 +110,11 @@ class StreamsSolverSystemTesting : SolverFactory, SolverTest { } @Test - @Ignore override fun testTimeout3() { prototype.testTimeout3() } @Test - @Ignore override fun testTimeout4() { prototype.testTimeout4() } diff --git a/test-solve/src/commonMain/kotlin/it/unibo/tuprolog/solve/SolverTest.kt b/test-solve/src/commonMain/kotlin/it/unibo/tuprolog/solve/SolverTest.kt index 6006d36b5..1fb074230 100644 --- a/test-solve/src/commonMain/kotlin/it/unibo/tuprolog/solve/SolverTest.kt +++ b/test-solve/src/commonMain/kotlin/it/unibo/tuprolog/solve/SolverTest.kt @@ -37,7 +37,7 @@ interface SolverTest { /** A short test max duration */ val shortDuration: TimeDuration - get() = 500L + get() = 250L /** A medium test max duration */ val mediumDuration: TimeDuration @@ -47,9 +47,6 @@ interface SolverTest { val longDuration: TimeDuration get() = 2 * mediumDuration - val maxDuration: TimeDuration - get() = shortDuration - /** Test presence of correct built-ins */ fun testBuiltinApi() diff --git a/test-solve/src/commonMain/kotlin/it/unibo/tuprolog/solve/SolverTestImpl.kt b/test-solve/src/commonMain/kotlin/it/unibo/tuprolog/solve/SolverTestImpl.kt index 677e55ca0..71eefab0c 100644 --- a/test-solve/src/commonMain/kotlin/it/unibo/tuprolog/solve/SolverTestImpl.kt +++ b/test-solve/src/commonMain/kotlin/it/unibo/tuprolog/solve/SolverTestImpl.kt @@ -42,21 +42,18 @@ import it.unibo.tuprolog.solve.TestingClauseTheories.simpleCutTheoryNotableGoalT import it.unibo.tuprolog.solve.TestingClauseTheories.simpleFactTheory import it.unibo.tuprolog.solve.TestingClauseTheories.simpleFactTheoryNotableGoalToSolutions import it.unibo.tuprolog.solve.TimeRelatedTheories.lessThan500MsGoalToSolution +import it.unibo.tuprolog.solve.TimeRelatedTheories.slightlyMoreThan500MsGoalToSolution import it.unibo.tuprolog.solve.TimeRelatedTheories.slightlyMoreThan600MsGoalToSolution import it.unibo.tuprolog.solve.TimeRelatedTheories.slightlyMoreThan700MsGoalToSolution -import it.unibo.tuprolog.solve.TimeRelatedTheories.slightlyMoreThan500MsGoalToSolution import it.unibo.tuprolog.solve.TimeRelatedTheories.timeRelatedTheory import it.unibo.tuprolog.solve.exception.TimeOutException import it.unibo.tuprolog.solve.exception.error.InstantiationError import it.unibo.tuprolog.solve.exception.error.TypeError -import it.unibo.tuprolog.solve.library.Libraries import it.unibo.tuprolog.solve.stdlib.primitive.* import it.unibo.tuprolog.solve.stdlib.rule.Arrow import it.unibo.tuprolog.solve.stdlib.rule.Member import it.unibo.tuprolog.solve.stdlib.rule.Not import it.unibo.tuprolog.solve.stdlib.rule.Semicolon -import it.unibo.tuprolog.theory.Theory -import kotlin.test.Test import kotlin.test.assertEquals import kotlin.test.assertNotNull import kotlin.test.assertTrue @@ -128,7 +125,7 @@ internal class SolverTestImpl(private val solverFactory: SolverFactory) : Solver assert("f"(3)) and "f"("X") - val solutions = solver.solve(query, maxDuration).toList() + val solutions = solver.solve(query, mediumDuration).toList() val ints = if (inverse) (3 downTo 1) else (1..3) assertSolutionEquals( @@ -175,7 +172,7 @@ internal class SolverTestImpl(private val solverFactory: SolverFactory) : Solver "write"("f"("x")) and "nl" - val solutions = solver.solve(query, maxDuration).toList() + val solutions = solver.solve(query, mediumDuration).toList() assertSolutionEquals( ktListOf(query.yes()), @@ -211,7 +208,7 @@ internal class SolverTestImpl(private val solverFactory: SolverFactory) : Solver val query = "write"("b") and "write"("c") and "write"("d") and "nl" - val solutions = solver.solve(query, maxDuration).toList() + val solutions = solver.solve(query, mediumDuration).toList() assertSolutionEquals( ktListOf(query.yes()), @@ -238,7 +235,7 @@ internal class SolverTestImpl(private val solverFactory: SolverFactory) : Solver ) var query = "findall"("N", "a"("N"), "L") - var solutions = solver.solve(query, maxDuration).toList() + var solutions = solver.solve(query, mediumDuration).toList() assertSolutionEquals( ktListOf(query.yes("L" to listOf(1, 2, 3))), @@ -246,7 +243,7 @@ internal class SolverTestImpl(private val solverFactory: SolverFactory) : Solver ) query = "findall"(`_`, false, "L") - solutions = solver.solve(query, maxDuration).toList() + solutions = solver.solve(query, mediumDuration).toList() assertSolutionEquals( ktListOf(query.yes("L" to emptyList())), @@ -254,7 +251,7 @@ internal class SolverTestImpl(private val solverFactory: SolverFactory) : Solver ) query = "findall"(`_`, "G", `_`) - solutions = solver.solve(query, maxDuration).toList() + solutions = solver.solve(query, mediumDuration).toList() assertSolutionEquals( ktListOf( @@ -276,7 +273,7 @@ internal class SolverTestImpl(private val solverFactory: SolverFactory) : Solver prolog { val solver = solverFactory.solverWithDefaultBuiltins() val query = truthOf(true) - val solutions = solver.solve(query, maxDuration).toList() + val solutions = solver.solve(query, mediumDuration).toList() assertSolutionEquals( ktListOf(query.yes()), @@ -334,7 +331,7 @@ internal class SolverTestImpl(private val solverFactory: SolverFactory) : Solver assertSolverSolutionsCorrect( solver = solverFactory.solverWithDefaultBuiltins(staticKb = ifThenTheory1), goalToSolutions = ifThen1ToSolution, - maxDuration = maxDuration + maxDuration = mediumDuration ) } @@ -343,7 +340,7 @@ internal class SolverTestImpl(private val solverFactory: SolverFactory) : Solver assertSolverSolutionsCorrect( solver = solverFactory.solverWithDefaultBuiltins(staticKb = ifThenTheory1), goalToSolutions = ifThenElse1ToSolution, - maxDuration = maxDuration + maxDuration = mediumDuration ) } @@ -352,7 +349,7 @@ internal class SolverTestImpl(private val solverFactory: SolverFactory) : Solver assertSolverSolutionsCorrect( solver = solverFactory.solverWithDefaultBuiltins(staticKb = ifThenTheory2), goalToSolutions = ifThenElse2ToSolution, - maxDuration = maxDuration + maxDuration = mediumDuration ) } @@ -361,7 +358,7 @@ internal class SolverTestImpl(private val solverFactory: SolverFactory) : Solver assertSolverSolutionsCorrect( solver = solverFactory.solverWithDefaultBuiltins(staticKb = ifThenTheory2), goalToSolutions = ifThen2ToSolution, - maxDuration = maxDuration + maxDuration = mediumDuration ) } @@ -370,7 +367,7 @@ internal class SolverTestImpl(private val solverFactory: SolverFactory) : Solver assertSolverSolutionsCorrect( solverFactory.solverWithDefaultBuiltins(staticKb = simpleFactTheory), simpleFactTheoryNotableGoalToSolutions, - maxDuration + mediumDuration ) } @@ -380,7 +377,7 @@ internal class SolverTestImpl(private val solverFactory: SolverFactory) : Solver assertSolverSolutionsCorrect( solverFactory.solverWithDefaultBuiltins(staticKb = simpleCutTheory), simpleCutTheoryNotableGoalToSolutions, - maxDuration + mediumDuration ) } @@ -389,7 +386,7 @@ internal class SolverTestImpl(private val solverFactory: SolverFactory) : Solver assertSolverSolutionsCorrect( solverFactory.solverWithDefaultBuiltins(staticKb = simpleCutAndConjunctionTheory), simpleCutAndConjunctionTheoryNotableGoalToSolutions, - maxDuration + mediumDuration ) } @@ -398,7 +395,7 @@ internal class SolverTestImpl(private val solverFactory: SolverFactory) : Solver assertSolverSolutionsCorrect( solverFactory.solverWithDefaultBuiltins(staticKb = cutConjunctionAndBacktrackingTheory), cutConjunctionAndBacktrackingTheoryNotableGoalToSolutions, - maxDuration + mediumDuration ) } @@ -416,7 +413,7 @@ internal class SolverTestImpl(private val solverFactory: SolverFactory) : Solver assertSolverSolutionsCorrect( solverFactory.solverWithDefaultBuiltins(staticKb = prologStandardExampleTheory), prologStandardExampleTheoryNotableGoalToSolution, - maxDuration + mediumDuration ) } @@ -425,7 +422,7 @@ internal class SolverTestImpl(private val solverFactory: SolverFactory) : Solver assertSolverSolutionsCorrect( solverFactory.solverWithDefaultBuiltins(staticKb = PrologStandardExampleTheories.prologStandardExampleWithCutTheory), prologStandardExampleWithCutTheoryNotableGoalToSolution, - maxDuration + mediumDuration ) } @@ -434,7 +431,7 @@ internal class SolverTestImpl(private val solverFactory: SolverFactory) : Solver assertSolverSolutionsCorrect( solverFactory.solverWithDefaultBuiltins(staticKb = customReverseListTheory), customReverseListTheoryNotableGoalToSolution, - maxDuration + mediumDuration ) } @@ -443,7 +440,7 @@ internal class SolverTestImpl(private val solverFactory: SolverFactory) : Solver assertSolverSolutionsCorrect( solverFactory.solverWithDefaultBuiltins(staticKb = conjunctionStandardExampleTheory), conjunctionStandardExampleTheoryNotableGoalToSolution, - maxDuration + mediumDuration ) } @@ -475,7 +472,7 @@ internal class SolverTestImpl(private val solverFactory: SolverFactory) : Solver assertSolverSolutionsCorrect( solverFactory.solverWithDefaultBuiltins(staticKb = database), goalToSolutions, - maxDuration + mediumDuration ) } } @@ -486,13 +483,13 @@ internal class SolverTestImpl(private val solverFactory: SolverFactory) : Solver assertSolverSolutionsCorrect( solverFactory.solverWithDefaultBuiltins(staticKb = callStandardExampleTheory), callStandardExampleTheoryGoalsToSolution, - maxDuration + mediumDuration ) assertSolverSolutionsCorrect( solverFactory.solverWithDefaultBuiltins(), callTestingGoalsToSolutions, - maxDuration + mediumDuration ) } @@ -507,7 +504,7 @@ internal class SolverTestImpl(private val solverFactory: SolverFactory) : Solver assertSolverSolutionsCorrect( solverFactory.solverWithDefaultBuiltins(staticKb = database), goalToSolutions, - maxDuration + mediumDuration ) } } @@ -518,13 +515,13 @@ internal class SolverTestImpl(private val solverFactory: SolverFactory) : Solver assertSolverSolutionsCorrect( solverFactory.solverWithDefaultBuiltins(staticKb = catchAndThrowTheoryExample), catchAndThrowTheoryExampleNotableGoalToSolution, - maxDuration + mediumDuration ) assertSolverSolutionsCorrect( solverFactory.solverWithDefaultBuiltins(), catchTestingGoalsToSolutions, - maxDuration + mediumDuration ) } @@ -558,7 +555,7 @@ internal class SolverTestImpl(private val solverFactory: SolverFactory) : Solver assertSolverSolutionsCorrect( solverFactory.solverWithDefaultBuiltins(staticKb = database), goalToSolutions, - maxDuration + mediumDuration ) } } @@ -569,7 +566,7 @@ internal class SolverTestImpl(private val solverFactory: SolverFactory) : Solver assertSolverSolutionsCorrect( solverFactory.solverWithDefaultBuiltins(), haltTestingGoalsToSolutions, - maxDuration + mediumDuration ) } @@ -578,7 +575,7 @@ internal class SolverTestImpl(private val solverFactory: SolverFactory) : Solver assertSolverSolutionsCorrect( solverFactory.solverWithDefaultBuiltins(staticKb = notStandardExampleTheory), notStandardExampleTheoryNotableGoalToSolution, - maxDuration + mediumDuration ) } @@ -620,7 +617,7 @@ internal class SolverTestImpl(private val solverFactory: SolverFactory) : Solver assertSolverSolutionsCorrect( solverFactory.solverWithDefaultBuiltins(staticKb = database), goalToSolutions, - maxDuration + mediumDuration ) } } @@ -631,7 +628,7 @@ internal class SolverTestImpl(private val solverFactory: SolverFactory) : Solver assertSolverSolutionsCorrect( solverFactory.solverWithDefaultBuiltins(staticKb = ifThenStandardExampleTheory), ifThenStandardExampleTheoryNotableGoalToSolution, - maxDuration + mediumDuration ) } @@ -640,7 +637,7 @@ internal class SolverTestImpl(private val solverFactory: SolverFactory) : Solver assertSolverSolutionsCorrect( solverFactory.solverWithDefaultBuiltins(), ifThenElseStandardExampleNotableGoalToSolution, - maxDuration + mediumDuration ) } @@ -649,7 +646,7 @@ internal class SolverTestImpl(private val solverFactory: SolverFactory) : Solver assertSolverSolutionsCorrect( solverFactory.solverWithDefaultBuiltins(staticKb = customRangeListGeneratorTheory), customRangeListGeneratorTheoryNotableGoalToSolution, - maxDuration + mediumDuration ) } @@ -658,7 +655,7 @@ internal class SolverTestImpl(private val solverFactory: SolverFactory) : Solver prolog { val solver = solverFactory.solverWithDefaultBuiltins() val query = atomOf("a") - val solutions = solver.solve(query, maxDuration).toList() + val solutions = solver.solve(query, mediumDuration).toList() assertSolutionEquals( ktListOf( @@ -681,7 +678,7 @@ internal class SolverTestImpl(private val solverFactory: SolverFactory) : Solver ) ) val query = "a"("N") - val solutions = solver.solve(query, maxDuration).toList() + val solutions = solver.solve(query, mediumDuration).toList() assertSolutionEquals( ktListOf( @@ -703,7 +700,7 @@ internal class SolverTestImpl(private val solverFactory: SolverFactory) : Solver ) ) val query = "a"("N") - val solutions = solver.solve(query, maxDuration).toList() + val solutions = solver.solve(query, mediumDuration).toList() assertSolutionEquals( with(query) { ktListOf(yes("N" to 3), yes("N" to 2)) }, @@ -724,7 +721,7 @@ internal class SolverTestImpl(private val solverFactory: SolverFactory) : Solver ) ) val query = "a"("N") - val solutions = solver.solve(query, maxDuration).toList() + val solutions = solver.solve(query, mediumDuration).toList() assertSolutionEquals( ktListOf( @@ -746,7 +743,7 @@ internal class SolverTestImpl(private val solverFactory: SolverFactory) : Solver ) ) val query = "a"("N") - val solutions = solver.solve(query, maxDuration).toList() + val solutions = solver.solve(query, mediumDuration).toList() assertSolutionEquals( ktListOf( @@ -766,7 +763,7 @@ internal class SolverTestImpl(private val solverFactory: SolverFactory) : Solver ) ) val query = atomOf("a") - val solutions = solver.solve(query, maxDuration).toList() + val solutions = solver.solve(query, mediumDuration).toList() assertSolutionEquals( ktListOf( @@ -788,7 +785,7 @@ internal class SolverTestImpl(private val solverFactory: SolverFactory) : Solver ) ) val query = atomOf("a") - val solutions = solver.solve(query, maxDuration).toList() + val solutions = solver.solve(query, mediumDuration).toList() assertSolutionEquals( ktListOf( @@ -808,7 +805,7 @@ internal class SolverTestImpl(private val solverFactory: SolverFactory) : Solver ) ) val query = "a"("N") - val solutions = solver.solve(query, maxDuration).toList() + val solutions = solver.solve(query, mediumDuration).toList() assertSolutionEquals( ktListOf( @@ -828,7 +825,7 @@ internal class SolverTestImpl(private val solverFactory: SolverFactory) : Solver ) ) val query = atomOf("a") - val solutions = solver.solve(query, maxDuration).toList() + val solutions = solver.solve(query, mediumDuration).toList() assertSolutionEquals( with(query) { ktListOf(yes(), yes()) }, @@ -847,7 +844,7 @@ internal class SolverTestImpl(private val solverFactory: SolverFactory) : Solver ) ) val query = "a"("N") - val solutions = solver.solve(query, maxDuration).toList() + val solutions = solver.solve(query, mediumDuration).toList() assertSolutionEquals( with(query) { ktListOf(yes("N" to 1), yes("N" to 2)) }, @@ -867,7 +864,7 @@ internal class SolverTestImpl(private val solverFactory: SolverFactory) : Solver val constants = ktListOf("a", "b", "c") val goal = "member"("X", constants.toTerm()) - val solutions = solver.solve(goal, maxDuration).toList() + val solutions = solver.solve(goal, mediumDuration).toList() assertSolutionEquals( ktListConcat( @@ -887,7 +884,7 @@ internal class SolverTestImpl(private val solverFactory: SolverFactory) : Solver val query = "assertz"("f"(2) impliedBy false) and "asserta"("f"(1) impliedBy true) - val solutions = solver.solve(query, maxDuration).toList() + val solutions = solver.solve(query, mediumDuration).toList() assertSolutionEquals( ktListOf(query.yes()), @@ -915,7 +912,7 @@ internal class SolverTestImpl(private val solverFactory: SolverFactory) : Solver val query = "retract"("f"("X")) - val solutions = solver.solve(query, maxDuration).toList() + val solutions = solver.solve(query, mediumDuration).toList() assertSolutionEquals( ktListOf( @@ -941,7 +938,7 @@ internal class SolverTestImpl(private val solverFactory: SolverFactory) : Solver val n = 100 - val solutions = solver.solve(query, maxDuration).take(n).toList() + val solutions = solver.solve(query, mediumDuration).take(n).toList() assertSolutionEquals( (0 until n).map { query.yes("X" to it) }, @@ -956,7 +953,7 @@ internal class SolverTestImpl(private val solverFactory: SolverFactory) : Solver val solver = solverFactory.solverWithDefaultBuiltins() var query = "functor"("a"("b", "c"), "X", "Y") - var solutions = solver.solve(query, maxDuration).toList() + var solutions = solver.solve(query, mediumDuration).toList() assertSolutionEquals( ktListOf(query.yes("X" to "a", "Y" to 2)), @@ -964,7 +961,7 @@ internal class SolverTestImpl(private val solverFactory: SolverFactory) : Solver ) query = "functor"("a"("b", "c"), "a", "Y") - solutions = solver.solve(query, maxDuration).toList() + solutions = solver.solve(query, mediumDuration).toList() assertSolutionEquals( ktListOf(query.yes("Y" to 2)), @@ -972,7 +969,7 @@ internal class SolverTestImpl(private val solverFactory: SolverFactory) : Solver ) query = "functor"("a"("b", "c"), "X", 2) - solutions = solver.solve(query, maxDuration).toList() + solutions = solver.solve(query, mediumDuration).toList() assertSolutionEquals( ktListOf(query.yes("X" to "a")), @@ -980,7 +977,7 @@ internal class SolverTestImpl(private val solverFactory: SolverFactory) : Solver ) query = "functor"("X", "a", 2) - solutions = solver.solve(query, maxDuration).toList() + solutions = solver.solve(query, mediumDuration).toList() assertSolutionEquals( ktListOf(query.yes("X" to structOf("a", anonymous(), anonymous()))), @@ -988,7 +985,7 @@ internal class SolverTestImpl(private val solverFactory: SolverFactory) : Solver ) query = "functor"("X", "Y", 2) - solutions = solver.solve(query, maxDuration).toList() + solutions = solver.solve(query, mediumDuration).toList() assertSolutionEquals( ktListOf(query.halt(InstantiationError.forArgument( @@ -1000,7 +997,7 @@ internal class SolverTestImpl(private val solverFactory: SolverFactory) : Solver ) query = "functor"("X", "a", "2") - solutions = solver.solve(query, maxDuration).toList() + solutions = solver.solve(query, mediumDuration).toList() assertSolutionEquals( ktListOf(query.halt(TypeError.forArgument( @@ -1019,7 +1016,7 @@ internal class SolverTestImpl(private val solverFactory: SolverFactory) : Solver val solver = solverFactory.solverWithDefaultBuiltins() var query = "a"("b", "c") univ "X" - var solutions = solver.solve(query, maxDuration).toList() + var solutions = solver.solve(query, mediumDuration).toList() assertSolutionEquals( ktListOf(query.yes("X" to listOf("a","b","c"))), @@ -1027,7 +1024,7 @@ internal class SolverTestImpl(private val solverFactory: SolverFactory) : Solver ) query = "X" univ listOf("a","b","c") - solutions = solver.solve(query, maxDuration).toList() + solutions = solver.solve(query, mediumDuration).toList() assertSolutionEquals( ktListOf(query.yes("X" to structOf("a","b","c"))), @@ -1035,7 +1032,7 @@ internal class SolverTestImpl(private val solverFactory: SolverFactory) : Solver ) query = "X" univ "Y" - solutions = solver.solve(query, maxDuration).toList() + solutions = solver.solve(query, mediumDuration).toList() assertSolutionEquals( ktListOf(query.halt(InstantiationError.forArgument( @@ -1047,7 +1044,7 @@ internal class SolverTestImpl(private val solverFactory: SolverFactory) : Solver ) query = "a"("b", "c") univ "a" - solutions = solver.solve(query, maxDuration).toList() + solutions = solver.solve(query, mediumDuration).toList() assertSolutionEquals( ktListOf(query.halt(TypeError.forArgument( diff --git a/theory/gradle.properties b/theory/gradle.properties deleted file mode 100644 index 74c523871..000000000 --- a/theory/gradle.properties +++ /dev/null @@ -1,2 +0,0 @@ -# mocha timeout for a single test method, in milli-seconds -mochaTimeout=60000 \ No newline at end of file