Skip to content

Implementation of several scheduling methods to improve the performance of static analyses #263

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 68 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
aa8d780
Fixing Error with "EagerFieldAccessInformationAnalysis", so the analy…
19Vik19 Sep 5, 2024
0d3ba57
Next Attempt
19Vik19 Sep 8, 2024
3edb263
Revert "Next Attempt"
19Vik19 Sep 8, 2024
3734dc6
Bereit für nächsten Versuch mit graph und zyklen finden ...
19Vik19 Oct 27, 2024
72b54c1
First completed approach
19Vik19 Dec 2, 2024
e72ffbd
Alle Strategien bis auf strategie 3
19Vik19 Dec 12, 2024
6ed388a
Strategie 3 funktioniert, tests wurden in PropertyComputationsSchedul…
19Vik19 Dec 20, 2024
1c1d60d
.
19Vik19 Dec 23, 2024
8d3bcb2
Merge branch '02122024' into lastbranch2024
19Vik19 Dec 23, 2024
e9a16fd
Fieldimmutability dependencies fix
19Vik19 Dec 23, 2024
b67b8c9
Immutability fix after merge
19Vik19 Dec 24, 2024
b5369ce
xcorpus runner
19Vik19 Dec 30, 2024
15f87cd
Neues Jahr neues Glück :)
19Vik19 Jan 1, 2025
7112bd4
constructor CallGraph in class CallGraph is not private anymore. For …
19Vik19 Jan 17, 2025
b885136
Prepared for testing strategie 3 true
19Vik19 Jan 18, 2025
a4bc582
Last Check
19Vik19 Jan 18, 2025
549c800
Small rollbacks
19Vik19 Jan 18, 2025
9dd0e39
Merge branch 'develop' into AUFGERÄUMT&GEUPDATED190125
19Vik19 Jan 19, 2025
091a44b
Minor changes, cleanup
19Vik19 Jan 19, 2025
222bd23
Cleanup
19Vik19 Jan 19, 2025
ac69a41
Cleanup
19Vik19 Jan 19, 2025
64783db
Documentation config
19Vik19 Jan 19, 2025
a97eef9
Bug fixes
19Vik19 Jan 20, 2025
b581e28
Cleanup and config with string-based strategy
19Vik19 Jan 20, 2025
e6f08b4
Created new Runner for immutability and Purity to schedule all analys…
19Vik19 Jan 20, 2025
688ea35
Cleanup
19Vik19 Jan 21, 2025
ba21166
Merge branch 'AUFGERÄUMT&GEUPDATED190125' into Preparation_for_the_me…
19Vik19 Jan 21, 2025
2e1f95f
Cleanup
19Vik19 Jan 21, 2025
fd3e6fa
Documentation
19Vik19 Jan 21, 2025
93e5369
Implementation of an extra check to prevent a NullPointerException fo…
19Vik19 Jan 21, 2025
a5e777c
Changed Config option “fpcf.AnalysisScenario.ScheduleStrategy” to Cla…
19Vik19 Jan 21, 2025
10ecf4f
Added config for measurement (ImmutabilityRunner - MPS - true)
19Vik19 Jan 21, 2025
517f288
Improvements
19Vik19 Jan 21, 2025
17f8770
SPS Scheduling Problem - Debugging branch
19Vik19 Feb 1, 2025
beaeaab
Formatting
Feb 3, 2025
dce5ad2
Formating
19Vik19 Feb 26, 2025
88c1e7b
Merge branch 'develop' into afterBA
19Vik19 Feb 26, 2025
5d89f47
Formatting
19Vik19 Mar 11, 2025
1767f13
Formatting
19Vik19 Mar 22, 2025
e0a44d9
Improvements, OPAL-standard config implementation
19Vik19 Mar 23, 2025
c369bbc
Minor improvements
19Vik19 Mar 23, 2025
4d5e53a
Added code documentation. Small fixes
19Vik19 Mar 23, 2025
2bb7618
reset test cases
19Vik19 Apr 18, 2025
9d1ad3b
.
19Vik19 May 6, 2025
62e5b39
Cleanup for PR
19Vik19 Jun 6, 2025
c33391e
Merge branch 'develop' of https://github.com/19Vik19/opal_bachelorarb…
19Vik19 Jun 6, 2025
40cdb64
Formatting, implementation SchdulingStrategy
19Vik19 Jun 9, 2025
b151a8f
Refactor: Remove unnecessary value declaration, enhance test implemen…
19Vik19 Jun 9, 2025
34a4e17
headerCheck
19Vik19 Jun 9, 2025
5f5c407
Merge branch 'develop' into scheduling-strategies
Jul 9, 2025
9185cca
Merge branch 'feature/format-check' into scheduling-strategies
Jul 9, 2025
011fed8
Add FIXME for subphase finalization order
Jul 9, 2025
caca611
Fix wrong package declarations and imports
Jul 9, 2025
352a653
Fix Scaladoc for scheduling strategies
Jul 9, 2025
63f1e46
Factor out topologicalSort
Jul 9, 2025
f078658
Remove spurious inheritance
Jul 9, 2025
89f3a5d
Factor out common code
Jul 9, 2025
5549e7b
Load scheduling strategy reflectively
Jul 9, 2025
eb74518
Improve PropertyComputationsSchedulerTest
Jul 9, 2025
80cf414
Improve AnalysisScenario config
Jul 11, 2025
606a5ec
Improve phase merging
Jul 11, 2025
8b29482
Fix typos in test
Jul 11, 2025
b362105
Fix test
Jul 11, 2025
62a94a3
Improve scheduling strategies
Jul 14, 2025
9403a91
Re-apply dependency management fix
Jul 14, 2025
84dec72
Set default scheduling strategy to MaximumPhaseScheduling
Jul 16, 2025
a09160e
Adapt runners to not pre-compute call graph
Jul 16, 2025
89fec75
Merge branch 'develop' into develop
errt Jul 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion OPAL/si/src/main/resources/reference.conf
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ org.opalj {
// MPS - Maximum Phase Scheduling
// IPMS - Independent Phase Merge Scheduling
// SPMS - Smallest Phase Merge Scheduling
fpcf.AnalysisScenario.ScheduleStrategy = "IPMS"
fpcf.AnalysisScenario.ScheduleStrategy = "MPS"
fpcf.AnalysisScenario.AnalysisScheduleLazyTransformerInMultipleBatches = true
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ class IndependentPhaseMergeScheduling[A](ps: PropertyStore, scheduleLazyTransfor
allCS: Set[ComputationSpecification[A]]
): List[PhaseConfiguration[A]] = {

val lazyType = LazyComputation
val transformerType = Transformer

// Creates a map from ComputationSpecifications to their indices
val computationSpecificationMap: Map[ComputationSpecification[A], Int] = allCS.zipWithIndex.toMap
val computationSpecificationArray: Array[ComputationSpecification[A]] = allCS.toArray
Expand Down Expand Up @@ -77,8 +74,8 @@ class IndependentPhaseMergeScheduling[A](ps: PropertyStore, scheduleLazyTransfor
): Map[List[Int], Set[Int]] = {

if (firstElement.forall(csID =>
computationSpecificationArray(csID).computationType.equals(lazyType) ||
computationSpecificationArray(csID).computationType.equals(transformerType)
computationSpecificationArray(csID).computationType.equals(LazyComputation) ||
computationSpecificationArray(csID).computationType.equals(Transformer)
)
) {
var existInSomeBatch = false
Expand Down Expand Up @@ -229,8 +226,8 @@ class IndependentPhaseMergeScheduling[A](ps: PropertyStore, scheduleLazyTransfor
if (!scheduleLazyTransformerInAllBatches) {
scheduleGraph.foreach { node =>
if (computationSpecificationArray(node._1).computationType.equals(
lazyType
) || computationSpecificationArray(node._1).computationType.equals(transformerType)
LazyComputation
) || computationSpecificationArray(node._1).computationType.equals(Transformer)
) {
scheduleGraph.foreach { subNode =>
if (subNode._2.contains(node._1)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ class MaximumPhaseScheduling[A](ps: PropertyStore, scheduleLazyTransformerInAllB
allCS: Set[ComputationSpecification[A]]
): List[PhaseConfiguration[A]] = {

val lazyType = LazyComputation
val transformerType = Transformer

// Creates a map from ComputationSpecifications to their indices
val computationSpecificationMap: Map[ComputationSpecification[A], Int] = allCS.zipWithIndex.toMap
val computationSpecificationArray: Array[ComputationSpecification[A]] = allCS.toArray
Expand Down Expand Up @@ -89,8 +86,8 @@ class MaximumPhaseScheduling[A](ps: PropertyStore, scheduleLazyTransformerInAllB
): Map[List[Int], Set[Int]] = {

if (firstElement.forall(csID =>
computationSpecificationArray(csID).computationType.equals(lazyType) ||
computationSpecificationArray(csID).computationType.equals(transformerType)
computationSpecificationArray(csID).computationType.equals(LazyComputation) ||
computationSpecificationArray(csID).computationType.equals(Transformer)
)
) {
var existInSomeBatch = false
Expand Down Expand Up @@ -163,8 +160,8 @@ class MaximumPhaseScheduling[A](ps: PropertyStore, scheduleLazyTransformerInAllB
if (!scheduleLazyTransformerInAllBatches) {
scheduleGraph.foreach { node =>
if (computationSpecificationArray(node._1).computationType.equals(
lazyType
) || computationSpecificationArray(node._1).computationType.equals(transformerType)
LazyComputation
) || computationSpecificationArray(node._1).computationType.equals(Transformer)
) {
scheduleGraph.foreach { subNode =>
if (subNode._2.contains(node._1)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ class SmallestPhaseMergeScheduling[A](ps: PropertyStore, scheduleLazyTransformer
allCS: Set[ComputationSpecification[A]]
): List[PhaseConfiguration[A]] = {

val lazyType = LazyComputation
val transformerType = Transformer

// Creates a map from ComputationSpecifications to their indices
val computationSpecificationMap: Map[ComputationSpecification[A], Int] = allCS.zipWithIndex.toMap
val computationSpecificationArray: Array[ComputationSpecification[A]] = allCS.toArray
Expand Down Expand Up @@ -76,8 +73,8 @@ class SmallestPhaseMergeScheduling[A](ps: PropertyStore, scheduleLazyTransformer
): Map[List[Int], Set[Int]] = {

if (firstElement.forall(csID =>
computationSpecificationArray(csID).computationType.equals(lazyType) ||
computationSpecificationArray(csID).computationType.equals(transformerType)
computationSpecificationArray(csID).computationType.equals(LazyComputation) ||
computationSpecificationArray(csID).computationType.equals(Transformer)
)
) {
var existInSomeBatch = false
Expand Down Expand Up @@ -245,9 +242,9 @@ class SmallestPhaseMergeScheduling[A](ps: PropertyStore, scheduleLazyTransformer
if (!scheduleLazyTransformerInAllBatches) {
scheduleGraph.foreach { node =>
if (computationSpecificationArray(node._1).computationType.equals(
lazyType
LazyComputation
) || computationSpecificationArray(node._1).computationType.equals(
transformerType
Transformer
)
) {
scheduleGraph.foreach { subNode =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ class PropertyComputationsSchedulerTest extends AnyFunSpec with Matchers with Be
analysis2phase += 1
}

if (analysis1phase <= analysis2phase) println("Success")
else fail(s"$analysis1 is not scheduled before or in the same batch as $analysis2!")
if (!(analysis1phase <= analysis2phase))
fail(s"$analysis1 is not scheduled before or in the same batch as $analysis2!")
}

/**
Expand Down Expand Up @@ -102,8 +102,8 @@ class PropertyComputationsSchedulerTest extends AnyFunSpec with Matchers with Be
analysis2phase += 1
}

if (analysis1phase < analysis2phase) println("Success")
else fail(s"$analysis1 is not scheduled before $analysis2!")
if (!(analysis1phase < analysis2phase))
fail(s"$analysis1 is not scheduled before $analysis2!")
}

/**
Expand Down Expand Up @@ -141,11 +141,9 @@ class PropertyComputationsSchedulerTest extends AnyFunSpec with Matchers with Be
}
}

if (analysis1phase == analysis2phase) {
println("Success")
} else {
if (!(analysis1phase == analysis2phase))
fail(s"$analysis1 is not scheduled in the same batch as $analysis2!")
}

}

// **********************************************************************************************
Expand Down Expand Up @@ -275,7 +273,21 @@ class PropertyComputationsSchedulerTest extends AnyFunSpec with Matchers with Be
)
val schedule = scenario.computeSchedule(ps)

print(schedule.batches)
analysis1IsScheduledBeforeOrAtTheSameBatchAsAnalysis2(schedule, lazy1, eager1)
analysis1IsScheduledBeforeOrAtTheSameBatchAsAnalysis2(schedule, eager1, eager4)
analysis1IsScheduledBeforeOrAtTheSameBatchAsAnalysis2(schedule, eager1, eager5)
analysis1IsScheduledBeforeOrAtTheSameBatchAsAnalysis2(schedule, eager1, eager6)
analysis1IsScheduledBeforeOrAtTheSameBatchAsAnalysis2(schedule, eager1, transformer1)
analysis1IsScheduledBeforeOrAtTheSameBatchAsAnalysis2(schedule, eager4, lazy3)
analysis1IsScheduledBeforeOrAtTheSameBatchAsAnalysis2(schedule, eager4, eager2)
analysis1IsScheduledBeforeOrAtTheSameBatchAsAnalysis2(schedule, eager6, lazy2)
analysis1IsScheduledBeforeOrAtTheSameBatchAsAnalysis2(schedule, eager6, lazy2)
analysis1IsScheduledBeforeOrAtTheSameBatchAsAnalysis2(schedule, eager6, lazy3)
analysis1IsScheduledBeforeOrAtTheSameBatchAsAnalysis2(schedule, eager3, triggered1)
analysis1IsScheduledBeforeOrAtTheSameBatchAsAnalysis2(schedule, eager3, triggered2)
analysis1IsScheduledBeforeOrAtTheSameBatchAsAnalysis2(schedule, eager3, triggered3)
analysis1IsScheduledInTheSameBatchAsAnalysis2(schedule, triggered1, triggered2)
analysis1IsScheduledInTheSameBatchAsAnalysis2(schedule, triggered1, triggered3)
}
}
}
Expand Down
Loading