Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 0 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml', '**/MANIFEST.MF') }}
restore-keys: ${{ runner.os }}-m2
- name: Set up JDK
uses: actions/setup-java@v4
with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,34 +23,15 @@
import org.dataflowanalysis.analysis.dfd.DFDDataFlowAnalysisBuilder;
import org.dataflowanalysis.analysis.dfd.core.DFDTransposeFlowGraphFinder;
import org.dataflowanalysis.examplemodels.Activator;
import org.dataflowanalysis.examplemodels.TuhhModels;
import org.junit.jupiter.api.Test;

import com.google.common.collect.ImmutableMap;

public class MicroSecEndTest {
public static final String PROJECT_NAME = "org.dataflowanalysis.examplemodels";
public static final String location = Paths.get("casestudies", "TUHH-Models")
.toString();
private final Logger logger = Logger.getLogger(MicroSecEndTest.class);

private static final Map<String, List<Integer>> TUHH_MODELS = ImmutableMap.<String, List<Integer>>builder()
.put("anilallewar", List.of(0, 6, 7, 8, 9, 11, 12, 18))
.put("apssouza22", List.of(0, 2, 4, 6, 7, 8, 12, 18))
.put("callistaenterprise", List.of(0, 2, 6, 11, 18))
.put("ewolff", List.of(5, 10, 12, 18))
.put("ewolff-kafka", List.of(0, 3, 4, 5, 6, 7, 8, 9, 18))
.put("fernandoabcampos", List.of(18))
.put("georgwittberger", List.of(0, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 18))
.put("jferrater", List.of(0, 2, 3, 5, 6, 7, 8, 9, 18))
.put("koushikkothagal", List.of(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 18))
.put("mdeket", List.of(5))
.put("mudigal-technologies", List.of(0, 2, 4, 5, 7, 8, 11, 18))
.put("rohitghatol", List.of(10, 12, 18))
.put("spring-petclinic", List.of(0, 2, 3, 5, 6, 7, 8, 9, 18))
.put("sqshq", List.of(0, 6, 7, 8, 9, 10, 11, 12, 18))
.put("yidongnan", List.of(0, 2, 3, 4, 5, 6, 7, 8, 9, 18))
.build();

private DFDConfidentialityAnalysis buildAnalysis(String name) {
var dataFlowDiagramPath = name + ".dataflowdiagram";
var dataDictionaryPath = name + ".datadictionary";
Expand Down Expand Up @@ -110,10 +91,10 @@ private void performAnalysis(String model, int variant, Set<Integer> violationsS

@Test
void testConstraints() {
for (var model : TUHH_MODELS.keySet()) {
for (int variant : TUHH_MODELS.get(model)) {

var tuhhModels = TuhhModels.getTuhhModels();

for (var model : tuhhModels.keySet()) {
for (int variant : tuhhModels.get(model)) {
Set<Integer> violationSet = new TreeSet<Integer>();
String variationName = model + "_" + variant;
performAnalysis(Paths.get(location, model, variationName)
Expand Down