-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
236 additions
and
279 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 0 additions & 24 deletions
24
lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/AvailableExpressionsTest.java
This file was deleted.
Oops, something went wrong.
24 changes: 0 additions & 24 deletions
24
lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/ConstantPropagationDFTest.java
This file was deleted.
Oops, something went wrong.
74 changes: 74 additions & 0 deletions
74
lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/DataflowAnalysesTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
package it.unive.lisa.cron; | ||
|
||
import it.unive.lisa.AnalysisTestExecutor; | ||
import it.unive.lisa.CronConfiguration; | ||
import it.unive.lisa.DefaultConfiguration; | ||
import it.unive.lisa.analysis.dataflow.AvailableExpressions; | ||
import it.unive.lisa.analysis.dataflow.ConstantPropagation; | ||
import it.unive.lisa.analysis.dataflow.DefiniteDataflowDomain; | ||
import it.unive.lisa.analysis.dataflow.PossibleDataflowDomain; | ||
import it.unive.lisa.analysis.dataflow.ReachingDefinitions; | ||
import it.unive.lisa.conf.LiSAConfiguration.GraphType; | ||
import it.unive.lisa.interprocedural.BackwardModularWorstCaseAnalysis; | ||
|
||
import org.junit.Ignore; | ||
import org.junit.Test; | ||
|
||
public class DataflowAnalysesTest extends AnalysisTestExecutor { | ||
|
||
@Test | ||
public void testAvailableExpressions() { | ||
CronConfiguration conf = new CronConfiguration(); | ||
conf.serializeResults = true; | ||
conf.abstractState = DefaultConfiguration.simpleState( | ||
DefaultConfiguration.defaultHeapDomain(), | ||
new DefiniteDataflowDomain<>(new AvailableExpressions()), | ||
DefaultConfiguration.defaultTypeDomain()); | ||
conf.testDir = "available-expressions"; | ||
conf.programFile = "available-expressions.imp"; | ||
perform(conf); | ||
} | ||
|
||
@Test | ||
public void testConstantPropagation() { | ||
CronConfiguration conf = new CronConfiguration(); | ||
conf.serializeResults = true; | ||
conf.abstractState = DefaultConfiguration.simpleState( | ||
DefaultConfiguration.defaultHeapDomain(), | ||
new DefiniteDataflowDomain<>(new ConstantPropagation()), | ||
DefaultConfiguration.defaultTypeDomain()); | ||
conf.testDir = "constant-propagation-df"; | ||
conf.programFile = "constant-propagation.imp"; | ||
perform(conf); | ||
} | ||
|
||
@Test | ||
public void testReachingDefinitions() { | ||
CronConfiguration conf = new CronConfiguration(); | ||
conf.serializeResults = true; | ||
conf.abstractState = DefaultConfiguration.simpleState( | ||
DefaultConfiguration.defaultHeapDomain(), | ||
new PossibleDataflowDomain<>(new ReachingDefinitions()), | ||
DefaultConfiguration.defaultTypeDomain()); | ||
conf.testDir = "reaching-definitions"; | ||
conf.programFile = "reaching-definitions.imp"; | ||
perform(conf); | ||
} | ||
|
||
@Test | ||
@Ignore | ||
public void testLiveness() { | ||
CronConfiguration conf = new CronConfiguration(); | ||
conf.serializeResults = true; | ||
conf.interproceduralAnalysis = new BackwardModularWorstCaseAnalysis<>(); | ||
conf.abstractState = DefaultConfiguration.simpleState( | ||
DefaultConfiguration.defaultHeapDomain(), | ||
new DefiniteDataflowDomain<>(new AvailableExpressions()), | ||
DefaultConfiguration.defaultTypeDomain()); | ||
conf.testDir = "liveness"; | ||
conf.programFile = "liveness.imp"; | ||
conf.analysisGraphs = GraphType.HTML_WITH_SUBNODES; | ||
conf.forceUpdate = true; | ||
perform(conf); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.