Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
taste-MSC
Compare Revisions
c672f06061bd036663672ce992907bc8bcfe40f5...38e4e56e136baa4d4704d03321c37e7df270a636
Commits (1)
Address side-effects of old GUI bugs (crashes when RI name doesn't match PI name)
· 38e4e56e
Thanassis Tsiodras
authored
Aug 01, 2017
38e4e56e
Hide whitespace changes
Inline
Side-by-side
MSC-Antlr3/AadlGlobals.cs
View file @
38e4e56e
...
...
@@ -79,7 +79,38 @@ namespace MSC_Antlr3
if
(
noSuffix
(
systemName
,
"_GUI"
).
ToLower
()
!=
gui
.
systemName
.
ToLower
())
continue
;
foreach
(
var
provided
in
gui
.
providesList
.
Concat
(
gui
.
requiresList
))
{
var
pinameInFV
=
provided
.
x2
.
Split
(
new
string
[]{
"::"
},
System
.
StringSplitOptions
.
RemoveEmptyEntries
).
Last
().
Split
(
'.'
).
First
();
Console
.
WriteLine
(
"Provided interface: {0}"
,
provided
.
x1
);
// Due to the obj_... fiasco of the old versions of the UI, this code used to
// extract the name of the connected PIs that the GUI was using - i.e from the
// RIGHT hand side of the AADL descriptions:
//
// FEATURES
// obj_314 : PROVIDES SUBPROGRAM ACCESS interfaceview::FV::Function1::PI_somework.others {
// ... ^^^^^^^^^^^
// i.e. from this part: ------------------------'
// };
// obj_413 : REQUIRES SUBPROGRAM ACCESS interfaceview::FV::LeGUI::PI_TM_something.others {
// ... ^^^^^^^^^^^^^^^
// i.e. from this part: --------------------'
// };
// PROPERTIES
// Source_Language => (C);
//
// But this approach breaks the case where the RI is differently named than the PI it is
// connected to!
//
// Thankfully, Pierre has changed this now - and the proper names appear on the left hand
// side...
//
// So this old code...
//
// var pinameInFV = provided.x2.Split(
// new string[]{"::"},
// System.StringSplitOptions.RemoveEmptyEntries).Last().Split('.').First();
//
// ...is now replaced with this simple one:
//
var
pinameInFV
=
provided
.
x1
;
// find the subprogram with the requested name (to check, remove the _objNNN suffix)
//if (spName != noSuffix(provided.x1, @"_obj\d+"))
if
(
spName
.
ToLower
()
!=
noPrefix
(
noSuffix
(
pinameInFV
,
@"_obj\d+"
),
@"[PR]I_"
).
ToLower
())
...
...
MSC-Antlr3/Program.cs
View file @
38e4e56e
...
...
@@ -277,7 +277,37 @@ namespace MSC_Antlr3
continue
;
foreach
(
var
provided
in
gui
.
providesList
.
Concat
(
gui
.
requiresList
))
{
var
pinameInFV
=
provided
.
x2
.
Split
(
new
string
[]{
"::"
},
System
.
StringSplitOptions
.
RemoveEmptyEntries
).
Last
().
Split
(
'.'
).
First
();
// Due to the obj_... fiasco of the old versions of the UI, this code used to
// extract the name of the connected PIs that the GUI was using - i.e from the
// RIGHT hand side of the AADL descriptions:
//
// FEATURES
// obj_314 : PROVIDES SUBPROGRAM ACCESS interfaceview::FV::Function1::PI_somework.others {
// ... ^^^^^^^^^^^
// i.e. from this part: ------------------------'
// };
// obj_413 : REQUIRES SUBPROGRAM ACCESS interfaceview::FV::LeGUI::PI_TM_something.others {
// ... ^^^^^^^^^^^^^^^
// i.e. from this part: --------------------'
// };
// PROPERTIES
// Source_Language => (C);
//
// But this approach breaks the case where the RI is differently named than the PI it is
// connected to!
//
// Thankfully, Pierre has changed this now - and the proper names appear on the left hand
// side...
//
// So this old code...
//
// var pinameInFV = provided.x2.Split(
// new string[]{"::"},
// System.StringSplitOptions.RemoveEmptyEntries).Last().Split('.').First();
//
// is now replaced with this simple one:
//
var
pinameInFV
=
provided
.
x1
;
// find the subprogram with the requested name (to check, remove the _objNNN suffix)
//if (spName != AadlGlobals.noSuffix(provided.x1, @"_obj\d+"))
if
(
spName
.
ToLower
()
!=
AadlGlobals
.
noPrefix
(
AadlGlobals
.
noSuffix
(
...
...