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

commonMain.it.unibo.tuprolog.datalog.visitors.CompoundFinder.kt Maven / Gradle / Ivy

There is a newer version: 1.0.4
Show newest version
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