Discovered this when I accidentally made the same property association to bind a connection to bus twice:
As a direct property association on the connection declaration
As a contained property association on the whole system.
package Broken
public
with SEI;
-- Some basics
data D8
properties
Data_Size => 8 Bytes;
end D8;
-- buses
bus MyBus
end MyBus;
system S1
features
out1: out data port D8;
end S1;
system S2
features
in1: in data port D8;
end S2;
-- assembled system
system top
end top;
system implementation top.i
subcomponents
sub1: system s1;
sub2: system s2;
theBus: bus MyBus;
connections
conn1: port sub1.out1 -> sub2.in1 {
Actual_Connection_Binding => (reference (theBus));
};
properties
-- Bind the connections
Actual_Connection_Binding => (reference (theBus)) applies to conn1;
end top.i;
end Broken;
When you instantiate the system instance top.i you get an exception:
java.util.ConcurrentModificationException
at org.eclipse.emf.common.util.AbstractEList$EIterator.checkModCount(AbstractEList.java:751)
at org.eclipse.emf.common.util.AbstractEList$EIterator.doNext(AbstractEList.java:699)
at org.eclipse.emf.common.util.AbstractEList$EIterator.next(AbstractEList.java:685)
at org.osate.aadl2.instantiation.CachePropertyAssociationsSwitch.cacheConnectionPropertyAssociations(CachePropertyAssociationsSwitch.java:265)
at org.osate.aadl2.instantiation.CachePropertyAssociationsSwitch$1.caseConnectionInstance(CachePropertyAssociationsSwitch.java:123)
at org.osate.aadl2.instantiation.CachePropertyAssociationsSwitch$1.caseConnectionInstance(CachePropertyAssociationsSwitch.java:1)
at org.osate.aadl2.instance.util.InstanceSwitch.doSwitch(InstanceSwitch.java:193)
at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53)
at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69)
at org.osate.aadl2.modelsupport.modeltraversal.AadlProcessingSwitch.process(AadlProcessingSwitch.java:159)
at org.osate.aadl2.modelsupport.modeltraversal.ForAllElement.processObject(ForAllElement.java:278)
at org.osate.aadl2.modelsupport.modeltraversal.PreOrderTraversal.visitRoot(PreOrderTraversal.java:42)
at org.osate.aadl2.modelsupport.modeltraversal.PreOrderTraversal.visitRoot(PreOrderTraversal.java:47)
at org.osate.aadl2.modelsupport.modeltraversal.ForAllElement.processPreOrderAll(ForAllElement.java:545)
at org.osate.aadl2.instantiation.InstantiateModel.getUsedPropertyDefinitions(InstantiateModel.java:543)
at org.osate.aadl2.instantiation.InstantiateModel.fillSystemInstance(InstantiateModel.java:488)
at org.osate.aadl2.instantiation.InstantiateModel.createSystemInstanceInt(InstantiateModel.java:418)
at org.osate.aadl2.instantiation.InstantiateModel.createSystemInstance(InstantiateModel.java:371)
at org.osate.aadl2.instantiation.InstantiateModel.buildInstanceModelFile(InstantiateModel.java:237)
at org.osate.ui.handlers.InstantiationHandler$InstantiationJob.runInWorkspace(InstantiationHandler.java:243)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:42)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Now obviously this model is broken, but it should not result in a Java exception
The text was updated successfully, but these errors were encountered:
Discovered this when I accidentally made the same property association to bind a connection to bus twice:
When you instantiate the system instance
top.i
you get an exception:Now obviously this model is broken, but it should not result in a Java exception
The text was updated successfully, but these errors were encountered: