ramses-project / ramses

http://penelope.enst.fr/aadl/wiki/Projects#RAMSES
1 stars 1 forks source link

Cannot generate code from queuing example #4

Closed juli1 closed 10 years ago

juli1 commented 10 years ago

When trying to generate code for the POK platform for the queuing example, I get the following trace:

fr.tpt.aadl.ramses.control.support.generator.GenerationException at fr.tpt.aadl.ramses.generation.target.specific.AadlTargetSpecificCodeGenerator.generate(AadlTargetSpecificCodeGenerator.java:91) at fr.tpt.aadl.ramses.generation.target.specific.AadlTargetSpecificGenerator.generate(AadlTargetSpecificGenerator.java:193) at fr.tpt.aadl.ramses.control.osate.GenerateActionHandler.generate(GenerateActionHandler.java:220) at fr.tpt.aadl.ramses.control.osate.GenerateActionHandler.jobCore(GenerateActionHandler.java:179) at fr.tpt.aadl.ramses.control.osate.RamsesActionHandler$1$1.doExecute(RamsesActionHandler.java:145) at org.eclipse.emf.transaction.RecordingCommand.execute(RecordingCommand.java:135) at org.eclipse.emf.workspace.EMFCommandOperation.doExecute(EMFCommandOperation.java:119) at org.eclipse.emf.workspace.AbstractEMFOperation.execute(AbstractEMFOperation.java:150) at org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:513) at org.eclipse.emf.workspace.impl.WorkspaceCommandStackImpl.doExecute(WorkspaceCommandStackImpl.java:208) at org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:165) at fr.tpt.aadl.ramses.control.osate.RamsesActionHandler$1.run(RamsesActionHandler.java:205) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)

Then, when making a breakpoint at fr.tpt.aadl.ramses.generation.target.specific.AadlTargetSpecificCodeGenerator.generate(AadlTargetSpecificCodeGenerator.java:91 it seems that the contents size is simply 0. So, the refined model is not loaded. The inputResource variable has the type LazyLinkingResource.

juli1 commented 10 years ago

In fact, the error is in AadlToTargetSpecificAadl.java. If I replace the code uri = URI.createPlatformResourceURI(outputPlatformRelativePath, true) ; by uri = URI.createPlatformResourceURI("/ramses-test/refined-models/test_queuing_root_impl_Instance_extended.aadl2", true) ;

(so, hard-coding the values directly). Then, it works. I assume the issue is due to the use of a windows platform.

Julien.

Etienne13 commented 10 years ago

Hi Julien,

was "/ramses-test/refined-models/test_queuing_root_impl_Instance_extended.aadl2" the value of variable outputPlatformRelativePath? Or was the hard coded value different than the one you initially had in variable outputPlatformRelativePath?

Etienne.

ramses-project commented 10 years ago

closed, with fix proposed for issue #3