Skip to content

Commit 867c41e

Browse files
authored
Merge branch 'develop' into documentation
2 parents 66dbb79 + a99c7e9 commit 867c41e

File tree

18 files changed

+302
-172
lines changed

18 files changed

+302
-172
lines changed

.github/workflows/approve_dependabotifications.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.

.github/workflows/dependabot.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Handle Dependabot PRs
2+
3+
on:
4+
pull_request:
5+
types: [ opened, reopened, synchronize ]
6+
7+
permissions:
8+
contents: write
9+
pull-requests: write
10+
11+
jobs:
12+
ApproveAndMerge:
13+
name: Auto approve Dependabot PRs
14+
runs-on: ubuntu-latest
15+
# Only run for PRs created by Dependabot - extended verification is done in the reusable workflow
16+
if: github.actor == 'dependabot[bot]'
17+
# These permissions are needed to approve pull requests
18+
permissions:
19+
contents: read
20+
pull-requests: write
21+
steps:
22+
- name: Auto approve Dependabot PR
23+
uses: secure-software-engineering/actions/dependabot@develop
24+
with:
25+
token: ${{ secrets.AUTO_MERGE_PAT }}

.github/workflows/dependency_analysis.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Deploy SNAPSHOT versions
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
8+
jobs:
9+
deploy-snapshot:
10+
runs-on: ubuntu-latest
11+
name: Deploy SNAPSHOT version
12+
environment: Deploy
13+
steps:
14+
- name: Checkout source code
15+
uses: actions/checkout@v4
16+
17+
- name: Deploy SNAPSHOT version
18+
uses: secure-software-engineering/actions/deployment/maven-deployment@maven-central-deploy
19+
with:
20+
java-distribution: adopt
21+
java-version: 11
22+
server-id: central
23+
server-username: ${{ secrets.MAVEN_USERNAME }}
24+
server-password: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
25+
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
26+
gpg-passphrase: ${{ secrets.GPG_PRIVATE_KEY_PASSPHRASE }}
27+
mvn-cli-args: '-DskipTests -Dmaven.javadoc.skip=true -Pdeployment'
28+
deploy-mode: snapshot

.github/workflows/deploy.yml

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,28 +9,24 @@ env:
99
jobs:
1010
deployment:
1111
runs-on: ubuntu-latest
12+
name: Deploy to Maven
1213
environment: Deploy
1314
steps:
1415
- name: Checkout source code
1516
uses: actions/checkout@v4
16-
# Sets up Java version
17-
- name: Set up Java
18-
uses: actions/setup-java@v4
17+
18+
- name: Deploy version
19+
uses: secure-software-engineering/actions/deployment/maven-deployment@maven-central-deploy
1920
with:
20-
distribution: adopt
21-
java-package: jdk
21+
java-distribution: adopt
2222
java-version: 11
23-
server-id: ossrh # must match the serverId configured for the nexus-staging-maven-plugin
24-
server-username: OSSRH_USERNAME # Env var that holds your OSSRH user name
25-
server-password: OSSRH_PASSWORD # Env var that holds your OSSRH user pw
26-
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} # Substituted with the value stored in the referenced secret
27-
gpg-passphrase: SIGN_KEY_PASS # Env var that holds the key's passphrase
28-
- name: Deploy Boomerang
29-
run: mvn -B -U clean deploy -Pdeployment -DskipTests
30-
env:
31-
SIGN_KEY_PASS: ${{ secrets.GPG_PRIVATE_KEY_PASSPHRASE }}
32-
OSSRH_USERNAME: ${{ secrets.SONATYPE_USER }}
33-
OSSRH_PASSWORD: ${{ secrets.SONATYPE_PW }}
23+
server-id: central
24+
server-username: ${{ secrets.MAVEN_USERNAME }}
25+
server-password: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
26+
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
27+
gpg-passphrase: ${{ secrets.GPG_PRIVATE_KEY_PASSPHRASE }}
28+
mvn-cli-args: '-DskipTests -Pdeployment'
29+
deploy-mode: release
3430

3531
snapshot-version:
3632
runs-on: ubuntu-latest

.github/workflows/formalities.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Codestyle etc.
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
check-formatting:
7+
runs-on: ubuntu-latest
8+
name: Check style
9+
steps:
10+
- name: Checkout source code
11+
uses: actions/checkout@v4
12+
13+
- name: Set up Java 11
14+
uses: actions/setup-java@v4
15+
with:
16+
distribution: adopt
17+
java-package: jdk
18+
java-version: 17
19+
cache: maven
20+
21+
# Checks that the code sticks to a common code style
22+
- name: Run spotless checks
23+
run: mvn spotless:check || echo "Check the formatting. Use mvn spotless:apply to format the code."
24+
25+
# Runs Maven's dependency analysis to identify unused and undeclared dependencies and fails the build if there are any warnings.
26+
- name: Run dependency analysis
27+
run: mvn dependency:analyze -DfailOnWarning

.github/workflows/style.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

boomerangScope-Opal/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
<dependency>
7878
<groupId>com.typesafe</groupId>
7979
<artifactId>config</artifactId>
80-
<version>1.4.4</version>
80+
<version>1.4.5</version>
8181
<scope>test</scope>
8282
</dependency>
8383

@@ -96,7 +96,7 @@
9696
<plugin>
9797
<groupId>net.alchim31.maven</groupId>
9898
<artifactId>scala-maven-plugin</artifactId>
99-
<version>4.9.5</version>
99+
<version>4.9.6</version>
100100
<configuration>
101101
<recompileMode>all</recompileMode>
102102
<args>

boomerangScope-WALA/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
</scm>
2222

2323
<properties>
24-
<wala.version>1.6.11</wala.version>
24+
<wala.version>1.6.12</wala.version>
2525
<license.dir>${project.parent.basedir}</license.dir>
2626
</properties>
2727

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
/**
2+
* *****************************************************************************
3+
* Copyright (c) 2018 Fraunhofer IEM, Paderborn, Germany
4+
* <p>
5+
* This program and the accompanying materials are made available under the
6+
* terms of the Eclipse Public License 2.0 which is available at
7+
* http://www.eclipse.org/legal/epl-2.0.
8+
* <p>
9+
* SPDX-License-Identifier: EPL-2.0
10+
* <p>
11+
* Contributors:
12+
* Johannes Spaeth - initial API and implementation
13+
* *****************************************************************************
14+
*/
15+
package typestate;
16+
17+
import boomerang.scope.Statement;
18+
import java.util.List;
19+
import java.util.Objects;
20+
import java.util.stream.Collectors;
21+
import typestate.finiteautomata.Transition;
22+
23+
public class StatementSequence {
24+
25+
public static class Entry {
26+
27+
private final Statement statement;
28+
private final Transition transition;
29+
30+
public Entry(Statement statement, Transition transition) {
31+
this.statement = statement;
32+
this.transition = transition;
33+
}
34+
35+
public Statement getStatement() {
36+
return statement;
37+
}
38+
39+
public Transition getTransition() {
40+
return transition;
41+
}
42+
43+
@Override
44+
public boolean equals(Object o) {
45+
if (this == o) return true;
46+
if (o == null || getClass() != o.getClass()) return false;
47+
Entry entry = (Entry) o;
48+
return Objects.equals(statement, entry.statement)
49+
&& Objects.equals(transition, entry.transition);
50+
}
51+
52+
@Override
53+
public int hashCode() {
54+
return Objects.hash(statement, transition);
55+
}
56+
57+
@Override
58+
public String toString() {
59+
return "{" + statement + " [" + transition + "]}";
60+
}
61+
}
62+
63+
private final List<Entry> sequence;
64+
65+
public StatementSequence(Entry initialStmt) {
66+
this.sequence = List.of(initialStmt);
67+
}
68+
69+
public StatementSequence(List<Entry> sequence) {
70+
this.sequence = List.copyOf(sequence);
71+
}
72+
73+
public List<Entry> getSequence() {
74+
return sequence;
75+
}
76+
77+
@Override
78+
public boolean equals(Object o) {
79+
if (this == o) return true;
80+
if (o == null || getClass() != o.getClass()) return false;
81+
StatementSequence that = (StatementSequence) o;
82+
return Objects.equals(sequence, that.sequence);
83+
}
84+
85+
@Override
86+
public int hashCode() {
87+
return Objects.hash(sequence);
88+
}
89+
90+
@Override
91+
public String toString() {
92+
return sequence.stream().map(Object::toString).collect(Collectors.joining(" -> "));
93+
}
94+
}

0 commit comments

Comments
 (0)