Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The built-in methods (alg, mode, padding, and so on) do not work in the REQUIRES section. For example, in the Cipher rule, we have generatedkey[key, alg(transformation)], but the alg does not function and it is interpreted as generatedkey[key, transformation].
Fix
The previous parsing code was actually a dublicate of the getPredicate() method, but it had no check for the “consPred” field, in which ‘alg(’, ‘mode(’ and ‘pad(’ is defined. Hence I just reuse the correctly working getPredicate() method at this place.
More background:
As you can also see in the crysl gramma, "pred" field in non-terminal "PredLit"("innerPred.getPred()" in Java code) is defined as a normal predicate and hence it can be simply interpreted like any other predicate too.
https://github.com/CROSSINGTUD/CryptSL/blob/25dc97eebdfd30989c312d28dc79a50fb4cc1209/de.darmstadt.tu.crossing.CrySL/src/de/darmstadt/tu/crossing/CrySL.xtext#L245
Fixes #457
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Test Configuration:
Checklist: