Skip to content

Commit ae96b1f

Browse files
Remove inaccessible string analysis demo parts
1 parent e6d29fd commit ae96b1f

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

DEVELOPING_OPAL/demos/src/main/scala/org/opalj/fpcf/analyses/StringAnalysisDemo.scala

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ package fpcf
44
package analyses
55

66
import java.net.URL
7-
import java.util.concurrent.ScheduledThreadPoolExecutor
8-
import java.util.concurrent.TimeUnit
97
import scala.util.Try
108

119
import org.opalj.ai.domain.l1.DefaultDomainWithCFGAndDefUse
@@ -23,7 +21,6 @@ import org.opalj.br.fpcf.properties.Context
2321
import org.opalj.br.fpcf.properties.SimpleContextsKey
2422
import org.opalj.br.fpcf.properties.cg.Callees
2523
import org.opalj.br.fpcf.properties.string.StringConstancyProperty
26-
import org.opalj.fpcf.par.PKECPropertyStore
2724
import org.opalj.tac.cg.AllocationSiteBasedPointsToCallGraphKey
2825
import org.opalj.tac.fpcf.analyses.cg.reflection.ReflectionRelatedCallsAnalysisScheduler
2926
import org.opalj.tac.fpcf.analyses.string.LazyStringAnalysis
@@ -135,25 +132,6 @@ object StringAnalysisDemo extends ProjectAnalysisApplication {
135132
val typeIterator = cgKey.getTypeIterator(project)
136133
project.updateProjectInformationKeyInitializationData(ContextProviderKey) { _ => typeIterator }
137134

138-
val ex = new ScheduledThreadPoolExecutor(1)
139-
val task = new Runnable {
140-
def run(): Unit = {
141-
propertyStore match {
142-
case realPS: PKECPropertyStore =>
143-
val sizes = realPS.ps.map(_.size())
144-
val topEPK = sizes.zipWithIndex.sortBy(-_._1).take(5)
145-
.filter(_._2 <= PropertyKey.maxId)
146-
.map(s => s"${PropertyKey.key(s._2)}: ${s._1}")
147-
System.out.println(s"Top States: ${topEPK.mkString("\n| ", "\n| ", "\n")}")
148-
System.out.println(s"PS EPK States: ${sizes.sum}")
149-
System.out.println(s"PS Active tasks: ${realPS.activeTasks.get}")
150-
System.out.println("---------------------------------------------------------------------------")
151-
152-
case _ =>
153-
}
154-
}
155-
}
156-
val f = ex.scheduleAtFixedRate(task, 0, 5, TimeUnit.SECONDS)
157135
project.get(SimpleContextsKey)
158136
time {
159137
analysesManager
@@ -167,7 +145,6 @@ object StringAnalysisDemo extends ProjectAnalysisApplication {
167145
)
168146
propertyStore.waitOnPhaseCompletion()
169147
} { t => analysisTime = t.toSeconds }
170-
f.cancel(false)
171148

172149
val declaredMethods = project.get(DeclaredMethodsKey)
173150
val entrypointMethod = project.allMethodsWithBody.find { m =>

0 commit comments

Comments
 (0)