OpenAADL / ocarina

AADL model processor: mappings to code (C, Ada); Petri Nets; scheduling tools (MAST, Cheddar); WCET; REAL
http://www.openaadl.org
Other
66 stars 29 forks source link

Error when using component alias(renames) #7

Closed philip-alldredge closed 11 years ago

philip-alldredge commented 11 years ago

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;
yoogx commented 11 years ago

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

philip-alldredge commented 11 years ago

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 commented 11 years ago

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

yoogx commented 11 years ago

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