commonMain.it.unibo.tuprolog.datalog.visitors.CompoundFinder.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of datalog-jvm Show documentation
Show all versions of datalog-jvm Show documentation
Datalog-compliant utilities for knowledge representation
package it.unibo.tuprolog.datalog.visitors
import it.unibo.tuprolog.core.Struct
import it.unibo.tuprolog.core.Term
object CompoundFinder : AbstractClauseVisitor() {
override fun reduce(results: Sequence): Boolean = results.any { it }
override fun defaultValue(term: Term): Boolean = false
override fun visitStruct(term: Struct): Boolean = term.arity > 0
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy