Skip to content

Commit

Permalink
Merge pull request #676 from CROSSINGTUD/develop
Browse files Browse the repository at this point in the history
Merge for Version 3.2.1
  • Loading branch information
schlichtig authored Jul 24, 2024
2 parents 3105469 + fd2e80f commit ea3ac26
Show file tree
Hide file tree
Showing 46 changed files with 709 additions and 416 deletions.
12 changes: 6 additions & 6 deletions CryptoAnalysis/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.3.0</version>
<version>3.3.1</version>
<configuration>
<reuseForks>false</reuseForks>
<argLine>-Xmx8G -Xms256M -Xss8M -Dmaven.home="${maven.home}"</argLine>
Expand All @@ -145,7 +145,7 @@
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit4</artifactId>
<version>3.3.0</version>
<version>3.3.1</version>
</dependency>
<dependency>
<groupId>junit</groupId>
Expand Down Expand Up @@ -349,7 +349,7 @@
<dependency>
<groupId>com.google.crypto.tink</groupId>
<artifactId>tink</artifactId>
<version>1.3.0</version>
<version>1.14.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.json/json -->
<dependency>
Expand Down Expand Up @@ -389,12 +389,12 @@
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.17.1</version>
<version>2.17.2</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.17.1</version>
<version>2.17.2</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
Expand All @@ -405,7 +405,7 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.14.0</version>
<version>3.15.0</version>
</dependency>
<dependency>
<groupId>info.picocli</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,15 @@

public class AlternativeReqPredicate implements ISLConstraint {

private final Statement stmt;
private final List<CrySLPredicate> alternatives;
private final Statement stmt;
private final int paramIndex;

public AlternativeReqPredicate(CrySLPredicate alternativeOne, Statement stmt) {
this.alternatives = new ArrayList<>();
this.alternatives.add(alternativeOne);
this.stmt = stmt;
}

public AlternativeReqPredicate(CrySLPredicate alternativeOne, CrySLPredicate alternativeTwo, Statement stmt) {
public AlternativeReqPredicate(CrySLPredicate alternativeOne, Statement stmt, int paramIndex) {
this.alternatives = new ArrayList<>();
this.alternatives.add(alternativeOne);
this.alternatives.add(alternativeTwo);
this.stmt = stmt;
this.paramIndex = paramIndex;
}

@Override
Expand All @@ -32,6 +27,7 @@ public int hashCode() {
int result = 1;
result = prime * result + ((alternatives == null) ? 0 : alternatives.hashCode());
result = prime * result + ((stmt == null) ? 0 : stmt.hashCode());
result = prime * result + paramIndex;
return result;
}

Expand All @@ -51,16 +47,24 @@ public boolean equals(Object obj) {
return false;
if (stmt == null) {
return other.stmt == null;
} else return stmt.equals(other.stmt);
} else if (!stmt.equals(other.stmt)) {
return false;
}

return paramIndex == other.paramIndex;
}

public Statement getLocation() {
return stmt;
}

public int getParamIndex() {
return paramIndex;
}

@Override
public String toString() {
return "misses " + alternatives.stream().map(CrySLPredicate::toString).collect(Collectors.joining(" OR ")) + ((stmt != null) ? " @ " + stmt : "");
return alternatives.stream().map(CrySLPredicate::toString).collect(Collectors.joining(" OR ")) + " @ " + stmt + " @ index " + paramIndex;
}

@Override
Expand All @@ -81,8 +85,8 @@ public List<CrySLPredicate> getAlternatives() {
return alternatives;
}

public boolean addAlternative(CrySLPredicate newAlt) {
return alternatives.add(newAlt);
public void addAlternative(CrySLPredicate newAlt) {
alternatives.add(newAlt);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ public AnalysisSeedWithEnsuredPredicate(CryptoScanner scanner, Statement stateme
super(scanner, statement, fact, results);
}

public static AnalysisSeedWithEnsuredPredicate makeSeedForComparison(CryptoScanner scanner, Statement statement, Val fact) {
return new AnalysisSeedWithEnsuredPredicate(scanner, statement, fact, null);
}

@Override
public void execute() {
if (analysisResults == null) {
Expand Down
Loading

0 comments on commit ea3ac26

Please sign in to comment.