Skip to content
Open
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
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
gradlew eol=lf
*.jar filter=lfs diff=lfs merge=lfs -text
9 changes: 7 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,16 @@ repositories {

dependencies {
implementation group: 'jpl', name: 'jpl', version: '7.4.0'
// implementation 'jakarta.xml.bind:jakarta.xml.bind-api:2.3.3'
implementation 'com.sun.xml.bind:jaxb-impl:2.2.11'
implementation 'com.sun.xml.bind:jaxb-core:2.2.11'
implementation 'org.glassfish.jersey.media:jersey-media-jaxb:2.30.1'

compile fileTree(dir: 'libs', includes: ['*.jar'])

compile('org.springframework.boot:spring-boot-starter-web')
// compile('org.eclipse.winery:org.eclipse.winery.repository.client:2.0.0-SNAPSHOT')
// compile('org.eclipse.winery:org.eclipse.winery.model.tosca:2.0.0-SNAPSHOT')
// compile('com.github.opentosca.winery:org.eclipse.winery.repository.client:ustutt-9b6bd07e7a-1')
// compile('com.github.opentosca.winery:org.eclipse.winery.model.tosca:ustutt-9b6bd07e7a-1')
testCompile('org.springframework.boot:spring-boot-starter-test')
compile 'com.vladsch.flexmark:flexmark-all:0.32.18'

Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
1 change: 1 addition & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#Mon Dec 05 13:35:54 CET 2022
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
Expand Down
2 changes: 1 addition & 1 deletion gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified libs/jpl.jar
Binary file not shown.
Binary file not shown.
Git LFS file not shown
16 changes: 0 additions & 16 deletions pattern_prologfiles/MessageMover.md

This file was deleted.

2 changes: 1 addition & 1 deletion pattern_prologfiles/patternhelper.pl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
member(H1, S1),
member(Component_2, S2),
member(H2, S2),
Location_1 \= Location_2.
Location_1 \== Location_2.

component_in_restricted_environment(Component_1) :-
property(P, inboundcommunication, false),
Expand Down
5 changes: 0 additions & 5 deletions pattern_prologfiles/patterns.pl
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@
component_in_restricted_environment(Channel));
direct_communication(Component_1, Component_2)).

distributed_messaging(Component_1, Component_2) :-
messaging_communication(Channel, Component_1, Component_2),
components_in_different_locations(Component_1, Component_2),
hybrid_environment(Component_1, Component_2).

insecure_public_communication(Component_1, Component_2) :-
property(Relation_ID, sensitivedata, true),
relation(Relation_ID, Component_1, Component_2),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,18 @@ public List<ProblemFindings> checkTopology(String topologyID) throws IOException
finding.add(componentFinding);
logger.info("This is the result for Variable {}: {}", entry.getKey(), prologNames.decode(entry.getValue().toString()));
}
findings.addFinding(finding);

boolean doesNotContainNewEntry = findings.getFindings().stream().noneMatch(existingFinding -> {
return existingFinding.stream().allMatch(entry -> {
return finding.contains(entry);
});
});

if(doesNotContainNewEntry) {
findings.addFinding(finding);
}
}

problemFindings.add(findings);
} else {
logger.info("problem {} is not contained in topology", problemQuery);
Expand Down Expand Up @@ -154,6 +164,11 @@ public List<SolutionInputData> findSolutions(String serviceTemplateID, String pa
solutions.add(solutionInputData);

} else {
//Quickfix -otherwise decoded component-ids are stored as "encoded names" in the nameHashMap
occurrence.stream().forEach(finding -> {
String encodedComponentId = prologNames.decode(finding.getComponentId());
finding.setComponentId(encodedComponentId);
});
logger.info("problem {} is not contained in topology", solutionQuery);
}
}
Expand Down
Loading