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

Error when using component alias(renames) #7

Closed
philip-alldredge opened this issue Feb 15, 2013 · 4 comments
Closed

Error when using component alias(renames) #7

philip-alldredge opened this issue Feb 15, 2013 · 4 comments
Assignees
Labels

Comments

@philip-alldredge
Copy link

Ocarina produces an error for models that have an alias declaration renaming a component type.

Error:

test_renames_a.aadl:5:39: test_renames_b::B (identifier) is not visible
Cannot analyze AADL specifications

test_renames_a.aadl:

package test_renames_a
public
with test_renames_b;

Test_B renames system test_renames_b::B; -- This is the line that causes the error

system A
end A;

system implementation A.impl
end A.impl;

end test_renames_a;

test_renames_b.aadl

package test_renames_b
public

system B
end B;

end test_renames_b;
@ghost ghost assigned yoogx Feb 16, 2013
yoogx added a commit that referenced this issue Feb 18, 2013
@yoogx
Copy link
Contributor

yoogx commented Feb 18, 2013

Commit 2c7a952 should correct this bug. May you please try it? Thanks

@philip-alldredge
Copy link
Author

Not quite. It doesn't look like the component type is actually renamed. If I try to create an implementation or a subcomponent with it, it does not work. I've modified my test case to reproduce is:

Output:

test_renames_a.aadl:13:01: Test_B.impl (component implementation)  implements a component type that does not exist
Cannot analyze AADL specifications

test_renamed_a.aadl

package test_renames_a
public
with test_renames_b;

Test_B renames system test_renames_b::B;

system A
end A;

system implementation A.impl
subcomponents
    b1:  system Test_B;
end A.impl;

system implementation Test_B.impl
end Test_B.impl;

end test_renames_a;

test_renames_b.aadl

package test_renames_b
public

system B
end B;

end test_renames_b;

@yoogx
Copy link
Contributor

yoogx commented Feb 18, 2013

OK, I must also update Ocarina to support legality rule 4.4 (N1)

yoogx added a commit that referenced this issue Mar 8, 2013
          processor, subcomponent of a processor.

          For Issue #7
yoogx added a commit that referenced this issue Mar 18, 2013
yoogx added a commit that referenced this issue Mar 19, 2013
          implementation implements a component type that is a rename
          of a component type defined in another package.

          Fix for issue #7
@yoogx
Copy link
Contributor

yoogx commented Mar 19, 2013

Testcase is now validated. If there is a similar issue, please open a separate ticket with a specific test case.

@yoogx yoogx closed this as completed Mar 19, 2013
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

2 participants