Skip to content

Shared subprogram access yields too many connection instances in instance model #2032

@AaronGreenhouse

Description

@AaronGreenhouse

This example is derived from the example in Issue #1941. When the system below is instantiated, the process instance MyP has three connection instances, two of which should not be generated. Furthermore, it should have an additional connection instance that is missing.

package ExtraConnections
public
	subprogram ComputeAverage
	end ComputeAverage;

	thread T1
		features
			shared_sub: provides subprogram access ComputeAverage;
	end T1;

	thread implementation T1.impl
		subcomponents
			CompAvg: subprogram ComputeAverage;
		connections
			ac1: subprogram access CompAvg <-> shared_sub;
	end T1.impl;

	thread T2
		features
			ext_sub: requires subprogram access ComputeAverage;
	end T2;

	thread implementation T2.impl
	end T2.impl;

	process p1
	end p1;

	process implementation p1.impl
		subcomponents
			MyT1: thread T1.impl;
			MyT2: thread T2.impl;
		connections
			ac2: subprogram access MyT1.shared_sub <-> MyT2.ext_sub;
	end p1.impl;

	system SubprogramExample19
	end SubprogramExample19;

	system implementation SubprogramExample19.impl
		subcomponents
			MyP: process p1.impl;
	end SubprogramExample19.impl;
end ExtraConnections;

The instance model has the connection instances (with the given connection references):

Screen Shot 2019-10-22 at 12.30.44 PM.png

Only the second connection instance MyT1.CompAvg -> MyT2.ext_sub should exist. The other two connections are incomplete nonsense.

Furthermore, the connection between CompAvg and ext_sub should be bidirectional, so there should be a connection instances MyT2.ext_sub -> MyT1.CompAvg, but there currently is not one.

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions