tag:blogger.com,1999:blog-10244190.post7637503804396571329..comments2023-10-30T11:50:37.469-04:00Comments on Toolchain: Hell is Other People's CodeMike Petryhttp://www.blogger.com/profile/00900707625184132791noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-10244190.post-56825960723437546482008-06-10T10:59:00.000-04:002008-06-10T10:59:00.000-04:00shawn,I was amazed to find hundreds of circular re...shawn,<BR/>I was amazed to find hundreds of circular references in this code. I was suprised that the code would even compile, but from what you are saying, changing compilers could be a problem. <BR/>I worked on another large Ada system and it also suffered from dependency proliferation but it was more in the form of type definition dependencies.Mike Petryhttps://www.blogger.com/profile/00900707625184132791noreply@blogger.comtag:blogger.com,1999:blog-10244190.post-74749972333216392352008-06-10T00:26:00.000-04:002008-06-10T00:26:00.000-04:00I think I may have had to maintain that software. ...I think I may have had to maintain that software. I had a project in Ada that while we tried to port it to Linux we found that the package dependencies were circular and somehow the cycle had been broken at one time on the Irix system but the binaries for Irix were being copied around so that a particular module was never actually re-compiled.<BR/><BR/>It meant that module (missing its source after all these years) had to be rewritten in ASM to get the million lines of Ada to compile on Linux. I left shortly after we figured that out so I have no idea what they did to solve the problem.<BR/><BR/>However, GNAT from AdaCore helped along way toward figuring things out.Anonymoushttps://www.blogger.com/profile/07041739178513685832noreply@blogger.comtag:blogger.com,1999:blog-10244190.post-38790287262332040962008-06-08T10:41:00.000-04:002008-06-08T10:41:00.000-04:00DominicI did use Perl scripts to conduct my analys...Dominic<BR/>I did use Perl scripts to conduct my analysis. I think the problem with the system lies in the incorrect definition of the interfaces with regards to public/private access and the lack of layering/subsystems which would have helped to localize things. I think the global, static variables are what makes the system so brittle. Your commment did get me thinking and it may be worth-while to post a blog discussing some ideas. I think the theme would be to use the programming paradigms supported by the particular language in use and to carefully manage and protect program data.<BR/>Anonymous<BR/>I tried to clean-up the grammar a bit. I appreciate the review.Mike Petryhttps://www.blogger.com/profile/00900707625184132791noreply@blogger.comtag:blogger.com,1999:blog-10244190.post-89090314578462403132008-06-08T06:19:00.000-04:002008-06-08T06:19:00.000-04:00When you say the modules are tightly coupled, you ...When you say the modules are tightly coupled, you mean that each module is accessing the global variables, and arbitrary functions of other modules? If so, it should be possible to determine which functions and global variables are used in external modules, and these can then be marked up as such, and considered to be the <I>public interface</I>; you could use some grep or awk scripts to do this if Ada doesn't provide enough dynamism/introspection.<BR/><BR/>Then, when you want to refactor, you can, provided that you don't change the <I>public interface</I>, or if you do need to change it, have a little script to see which places it is used from, and change those at the same time.Dominic Chambershttps://www.blogger.com/profile/18159733494780340968noreply@blogger.com