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

Missing error markers for duplicate labels #9

Open
rakshitkr opened this issue Feb 19, 2019 · 3 comments
Open

Missing error markers for duplicate labels #9

rakshitkr opened this issue Feb 19, 2019 · 3 comments
Assignees
Labels

Comments

@rakshitkr
Copy link

The CrySL rule editor doesn't display error markers when we have duplicate labels like below

c1: CipherInputStream(is, ciph1);
c2: CipherInputStream(is, ciph2);
c2: CipherInputStream(is, ciph3);

We get the following exception when compiling the rule

java.lang.ClassCastException: de.darmstadt.tu.crossing.cryptSL.impl.EventImpl cannot be cast to de.darmstadt.tu.crossing.cryptSL.SuperType
	at de.cognicrypt.crysl.reader.CrySLReaderUtils.stringifyMethodSignature(CrySLReaderUtils.java:65)
	at de.cognicrypt.crysl.reader.CrySLReaderUtils.dealWithAggregate(CrySLReaderUtils.java:41)
	at de.cognicrypt.crysl.reader.CrySLReaderUtils.resolveAggregateToMethodeNames(CrySLReaderUtils.java:56)
	at de.cognicrypt.crysl.reader.StateMachineGraphBuilder.addRegularEdge(StateMachineGraphBuilder.java:42)
	at de.cognicrypt.crysl.reader.StateMachineGraphBuilder.addRegularEdge(StateMachineGraphBuilder.java:38)
	at de.cognicrypt.crysl.reader.StateMachineGraphBuilder.process(StateMachineGraphBuilder.java:235)
	at de.cognicrypt.crysl.reader.StateMachineGraphBuilder.processHead(StateMachineGraphBuilder.java:334)
	at de.cognicrypt.crysl.reader.StateMachineGraphBuilder.buildSMG(StateMachineGraphBuilder.java:64)
	at de.cognicrypt.crysl.reader.CrySLModelReader.buildStateMachineGraph(CrySLModelReader.java:231)
	at de.cognicrypt.crysl.reader.CrySLModelReader.readRule(CrySLModelReader.java:167)
	at de.cognicrypt.crysl.reader.CrySLModelReader.readRules(CrySLModelReader.java:219)
	at de.cognicrypt.crysl.handler.StartupHandler$AfterBuildListener.resourceChanged(StartupHandler.java:60)
	at org.eclipse.core.internal.events.NotificationManager$1.run(NotificationManager.java:300)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:290)
	at org.eclipse.core.internal.events.NotificationManager.broadcastChanges(NotificationManager.java:153)
	at org.eclipse.core.internal.resources.Workspace.broadcastBuildEvent(Workspace.java:365)
	at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:157)
	at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:244)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
@kruegers kruegers added the bug label Feb 19, 2019
@kruegers kruegers self-assigned this Feb 19, 2019
@kruegers
Copy link
Member

Temporary fix here. Should be addressed in CryptSL project itself tho.

@kruegers kruegers removed their assignment May 15, 2019
@rakshitkr
Copy link
Author

Import these plugin projects in your outer eclipse
de.cognicrypt.core
de.cognicrypt.crysl.handler
de.darmstadt.tu.crossing.CrySL
de.darmstadt.tu.crossing.CrySL.ide
de.darmstadt.tu.crossing.CrySL.ui

Right click on de.cognicrypt.core and Run As -> Eclipse Application. This will open what we refer to as inner eclipse.

Import JavaCryptographicArchitecture project and open CipherInputStream.crysl file and make the below change

c1: CipherInputStream(is, ciph1); // line 1
c2: CipherInputStream(is, ciph2); // line 2
c2: CipherInputStream(is, ciph3); // line 3

Excepted : error markers at lines 2 & 3

@rakshitkr
Copy link
Author

@anemonekk Please use the above instructions to reproduce this bug

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

No branches or pull requests

3 participants