| 1 |
module linker_test_2 1.0; |
| 2 |
|
| 3 |
require { |
| 4 |
class file { read write }; |
| 5 |
class lnk_file { unlink }; |
| 6 |
attribute g_b_attr_5; |
| 7 |
attribute g_b_attr_6; |
| 8 |
attribute g_m1_attr_3; |
| 9 |
attribute o3_m1_attr_2; |
| 10 |
} |
| 11 |
|
| 12 |
type tag_g_m2; |
| 13 |
|
| 14 |
type g_m2_type_1; |
| 15 |
role g_m2_role_1; |
| 16 |
role g_m2_role_1 types g_m2_type_1; |
| 17 |
|
| 18 |
type g_m2_type_4, g_b_attr_5; |
| 19 |
type g_m2_type_5, g_b_attr_6; |
| 20 |
|
| 21 |
#add types to role declared in base test |
| 22 |
type g_m2_type_2; |
| 23 |
role g_b_role_3; |
| 24 |
role g_b_role_3 types g_m2_type_2; |
| 25 |
|
| 26 |
#optional base role w/ adds in 2 modules |
| 27 |
role o4_b_role_1; |
| 28 |
role o4_b_role_1 types g_m2_type_1; |
| 29 |
|
| 30 |
# attr a added to in base optional, declared/added to in module, added to in other module |
| 31 |
type g_m2_type_3, g_m1_attr_3; |
| 32 |
|
| 33 |
# attr a added to in base optional, declared/added in module optional, added to in other module |
| 34 |
type g_m2_type_6, o3_m1_attr_2; |
| 35 |
|
| 36 |
# cond mapping tests |
| 37 |
bool g_m2_bool_1 true; |
| 38 |
bool g_m2_bool_2 false; |
| 39 |
if (g_m2_bool_1 && g_m2_bool_2) { |
| 40 |
allow g_m2_type_1 g_m2_type_2 : lnk_file unlink; |
| 41 |
} |
| 42 |
|
| 43 |
optional { |
| 44 |
require { |
| 45 |
type optional_type; |
| 46 |
} |
| 47 |
|
| 48 |
type tag_o1_m2; |
| 49 |
|
| 50 |
type o1_m2_type_1; |
| 51 |
role o1_m2_role_1; |
| 52 |
role o1_m2_role_1 types o1_m2_type_1; |
| 53 |
} |
| 54 |
|
| 55 |
|
| 56 |
optional { |
| 57 |
require { |
| 58 |
attribute g_m1_attr_4; |
| 59 |
attribute o4_m1_attr_1; |
| 60 |
} |
| 61 |
type tag_o2_m2; |
| 62 |
|
| 63 |
type o2_m2_type_1, g_m1_attr_4; |
| 64 |
type o2_m2_type_2, o4_m1_attr_1; |
| 65 |
|
| 66 |
} |