Skip to content

Commit

Permalink
format code in :dsl-theory
Browse files Browse the repository at this point in the history
  • Loading branch information
gciatto committed Sep 14, 2020
1 parent 7c0f62e commit 63d9abd
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 28 deletions.
20 changes: 0 additions & 20 deletions dsl-theory/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,30 +1,10 @@
// Project specific kotlin multiplatform configuration
kotlin {

sourceSets {
val commonMain by getting {
dependencies {
// api("com.github.gciatto:kt-math-metadata:0.+")
api(project(":dsl-unify"))
api(project(":theory"))
}
}

// Default source set for JVM-specific sources and dependencies:
jvm {
compilations["main"].defaultSourceSet {
dependencies {
// api(project(":core"))
}
}
}

js {
compilations["main"].defaultSourceSet {
dependencies {
// api(project(":core"))
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@file:JvmName("PrologExtensions")

package it.unibo.tuprolog.dsl.theory

import kotlin.js.JsName
Expand All @@ -7,4 +8,4 @@ import kotlin.jvm.JvmName
@JsName("prolog")
fun <R> prolog(function: PrologScopeWithTheories.() -> R): R {
return PrologScopeWithTheories.empty().function()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ interface PrologScopeWithTheories : PrologScopeWithUnification {
@JsName("empty")
fun empty(): PrologScopeWithTheories = PrologScopeWithTheoriesImpl()
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ class PrologScopeWithTheoriesImpl(unificator: Unificator) :
PrologScopeWithTheories, PrologScope by PrologScope.empty(), Unificator by unificator {

constructor() : this(Unificator.default)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ class Prova {
@Test
fun testProlog() {
prolog {
println(theoryOf(
fact { "member"("X", consOf("X", `_`)) },
rule { "member"("X", consOf(`_`, "T")) impliedBy "member"("X", "T") }
))
println(
theoryOf(
fact { "member"("X", consOf("X", `_`)) },
rule { "member"("X", consOf(`_`, "T")) impliedBy "member"("X", "T") }
)
)
}
}
}
}

0 comments on commit 63d9abd

Please sign in to comment.