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

ConnectionReference not instantiated properly for reach down into feature groups #2773

Closed
joeseibel opened this issue Mar 21, 2022 · 0 comments · Fixed by #2777
Closed

ConnectionReference not instantiated properly for reach down into feature groups #2773

joeseibel opened this issue Mar 21, 2022 · 0 comments · Fixed by #2777
Assignees
Milestone

Comments

@joeseibel
Copy link
Contributor

The following model is not instantiated properly:

package feature_in_feature_group_test
public
  system s
  end s;

  system implementation s.i
    subcomponents
      left: process left_process;
      right: process right_process;
    connections
      conn_1: feature left.left_feature_group.out_f -> right.right_feature_group.in_f;
  end s.i;

  process left_process
    features
      left_feature_group: feature group left_feature_group;
  end left_process;

  feature group left_feature_group
    features
      out_f: out feature;
  end left_feature_group;

  process right_process
    features
      right_feature_group: feature group right_feature_group;
  end right_process;

  feature group right_feature_group
    features
      in_f: in feature;
  end right_feature_group;
end feature_in_feature_group_test;

The destination of the ConnectionReference should be the feature in_f, but it is the feature group right_feature_group. The source and destination of the ConnectionInstance are correct and the source of the ConnectionReference is correct, but not the destination of the ConnectionReference.

I suspect that the problem is in ConnectionInfo.resolveFeatureInstance(ConnectionInstanceEnd, ConnectionInstanceEnd). This method was probably not updated to support reach down into feature groups.

Here is an additional test case that is similar, but has a deeper nesting of feature groups:

package feature_in_multiple_feature_groups_test
public
  system s
  end s;

  system implementation s.i
    subcomponents
      left: process left_process;
      right: process right_process;
    connections
      conn_1: feature left.left_feature_group_1.left_feature_group_2.left_feature_group_3.out_f ->
        right.right_feature_group_1.right_feature_group_2.right_feature_group_3.in_f;
  end s.i;

  process left_process
    features
      left_feature_group_1: feature group left_feature_group_1;
  end left_process;

  feature group left_feature_group_1
    features
      left_feature_group_2: feature group left_feature_group_2;
  end left_feature_group_1;

  feature group left_feature_group_2
    features
      left_feature_group_3: feature group left_feature_group_3;
  end left_feature_group_2;

  feature group left_feature_group_3
    features
      out_f: out feature;
  end left_feature_group_3;

  process right_process
    features
      right_feature_group_1: feature group right_feature_group_1;
  end right_process;

  feature group right_feature_group_1
    features
      right_feature_group_2: feature group right_feature_group_2;
  end right_feature_group_1;

  feature group right_feature_group_2
    features
      right_feature_group_3: feature group right_feature_group_3;
  end right_feature_group_2;

  feature group right_feature_group_3
    features
      in_f: in feature;
  end right_feature_group_3;
end feature_in_multiple_feature_groups_test;

In this example, the destination of the ConnectionReference should be the feature in_f, but it is the feature group right_feature_group_1.

@lwrage lwrage added the core label Mar 21, 2022
@lwrage lwrage self-assigned this Mar 22, 2022
@lwrage lwrage added this to the 2.11.0 milestone Mar 22, 2022
lwrage added a commit that referenced this issue Mar 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants