main.io.ksmt.solver.cvc5.KCvc5Maps.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ksmt-cvc5-core Show documentation
Show all versions of ksmt-cvc5-core Show documentation
Kotlin API for various SMT solvers
The newest version!
package io.ksmt.solver.cvc5
import io.github.cvc5.Sort
import io.github.cvc5.Term
import it.unimi.dsi.fastutil.Hash
import it.unimi.dsi.fastutil.HashCommon
import it.unimi.dsi.fastutil.objects.Object2ObjectOpenCustomHashMap
import java.util.TreeMap
class KCvc5TermMap(
private val data: MutableMap = Object2ObjectOpenCustomHashMap(KCvc5TermHash)
) : MutableMap by data
class KCvc5SortMap(
private val data: MutableMap = TreeMap()
) : MutableMap by data
private object KCvc5TermHash : Hash.Strategy {
override fun equals(p0: Term?, p1: Term?): Boolean =
p0 == p1
override fun hashCode(p0: Term?): Int {
if (p0 == null) return 0
return HashCommon.long2int(p0.id)
}
}