Skip to content

Commit

Permalink
update versions
Browse files Browse the repository at this point in the history
  • Loading branch information
breandan committed Sep 16, 2024
1 parent c9bf51f commit 87701ee
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
12 changes: 6 additions & 6 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,15 @@ kotlin {
// Markovian deps
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.1")

implementation("org.jetbrains.lets-plot:platf-awt-jvm:4.4.0")
implementation("org.jetbrains.lets-plot:lets-plot-kotlin-jvm:4.7.3")
implementation("org.jetbrains.lets-plot:platf-awt-jvm:4.4.1")
implementation("org.jetbrains.lets-plot:lets-plot-kotlin-jvm:4.8.0")

// https://arxiv.org/pdf/1908.10693.pdf
// implementation("com.datadoghq:sketches-java:0.7.0")

// Cache PMF/CDF lookups for common queries

implementation("org.apache.datasketches:datasketches-java:6.0.0")
implementation("org.apache.datasketches:datasketches-java:6.1.0")

// implementation("com.github.analog-garage:dimple:master-SNAPSHOT")

Expand All @@ -143,7 +143,7 @@ kotlin {
implementation("dk.brics:automaton:1.12-4")

implementation("org.sosy-lab:common:0.3000-529-g6152d88")
implementation("org.sosy-lab:java-smt:5.0.0")
implementation("org.sosy-lab:java-smt:5.0.1")

// val z3Version = "4.12.2-glibc_2.27"
// runtimeOnly("org.sosy-lab:javasmt-solver-z3:$z3Version:com.microsoft.z3@jar")
Expand All @@ -153,7 +153,7 @@ kotlin {

// TODO: Replace LogicNG with KoSAT?
// https://github.com/UnitTestBot/kosat
implementation("org.logicng:logicng:2.5.1")
implementation("org.logicng:logicng:2.6.0")

val multikVersion = "0.2.3"
implementation("org.jetbrains.kotlinx:multik-core:$multikVersion")
Expand Down Expand Up @@ -203,7 +203,7 @@ kotlin {
implementation(kotlin("test"))
implementation(kotlin("test-common"))
implementation(kotlin("test-annotations-common"))
implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.6.0")
implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.6.1")
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,8 @@ val MAX_PRODS = 150_000_000
// and we know they will usually be the same for all calls to this function.
fun CFG.jvmIntersectLevFSAP(fsa: FSA,
parikhMap: ParikhMap = this.parikhMap,
lbc: List<IntRange> = this.lengthBoundsCache): CFG {
lbc: List<IntRange> = this.lengthBoundsCache
): CFG {
// if (fsa.Q.size < 650) throw Exception("FSA size was out of bounds")
var clock = TimeSource.Monotonic.markNow()

Expand All @@ -189,7 +190,7 @@ fun CFG.jvmIntersectLevFSAP(fsa: FSA,
val ct = (fsa.validPairs * nonterminals.indices.toSet()).toList()
val ct2 = Array(fsa.states.size) { Array(nonterminals.size) { Array(fsa.states.size) { false } } }
ct.parallelStream()
.filter {
.filter { it: Π3<STC, STC, Int> ->
// Checks whether the length bounds for the noterminal (i.e., the range of the number of terminals it can
// parse) is compatible with the range of path lengths across all paths connecting two states in an FSA.
// This is a coarse approximation, but is cheaper to compute, so it filters out most invalid triples.
Expand Down Expand Up @@ -240,6 +241,8 @@ fun CFG.jvmIntersectLevFSAP(fsa: FSA,

clock = TimeSource.Monotonic.markNow()
return Stream.concat(binaryProds.stream(), (initFinal + transits + unitProds).stream()).parallel()
// A production, e.g., * -> * [G], can be removed if the synthetic nonterminal [G] does not exist, i.e.,
// every instance of [G] -> * * was incompatible with the FSA, so the nonterminal [G] is "unproductive".
.filter { (_, rhs) -> rhs.all { !it.isSyntheticNT() || it in nts } }
.collect(Collectors.toSet())
.also { println("Eliminated ${totalProds - it.size} extra productions before normalization") }
Expand Down Expand Up @@ -365,7 +368,7 @@ fun CFG.jvmDropVestigialProductions(clock: TimeSource.Monotonic.ValueTimeMark):
.also { println("Removed ${size - it.size} invalid productions in ${clock.elapsedNow() - start}") }
.freeze()
.jvmRemoveUselessSymbols(nts)
//.jdvpNew()
// .jdvpNew()

println("Removed ${size - rw.size} vestigial productions, resulting in ${rw.size} productions.")

Expand Down

0 comments on commit 87701ee

Please sign in to comment.