Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CogniCrypt_GEN - Get rid of addReturnObject method #342

Open
kruegers opened this issue Nov 17, 2019 · 2 comments
Open

CogniCrypt_GEN - Get rid of addReturnObject method #342

kruegers opened this issue Nov 17, 2019 · 2 comments

Comments

@kruegers
Copy link
Member

kruegers commented Nov 17, 2019

Is your feature request related to a problem? Please describe.
The fluent interfaces of CogniCryptGEN allow calls to three methods for configuration: includeClass, addParameter, and addReturnObject. The last one associates the passed variable from the glue code with the return object of the last call that is generated for the given class that has a return object (of fitting type). That's quite indirect and hard to wrap one's head around.
Fortunately, addReturnObject should not actually be necessary. Method addParameter links a variable from the glue code with a variable from the respective CrySL rule. Return objects of any relevance should be specified as extra CrySL variables anyway. Therefore, all calls to addReturnObject(a) should be replacable with calls to addParameter(a, retVarInCrySLRule).

Describe the solution you'd like
Investigate all existing code templates and, in particular, calls to addReturnObject for whether or not it is possible to apply the above fix. If so, perform this replacement. Either remove addReturnObject entirely from the API (and its backend support) or, at the very least, deprecate it.

Describe alternatives you've considered
Keeping it. But no.

@kruegers kruegers self-assigned this Nov 17, 2019
@kruegers kruegers removed their assignment May 4, 2020
@kruegers
Copy link
Member Author

kruegers commented May 4, 2020

assigned @rakshitkr.

@rakshitkr
Copy link
Contributor

@kruegers Please review my changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants