Folding: an approach to enable program understanding of preprocessed languages

Since the early days of programming, preprocessors have been used to increase the expressiveness of programming languages. As a prominent example, the C Preprocessor cpp even allows low level configuration management through conditional compilation. But preprocessors significantly complicate the task of program understanding because "what the user sees is not what the compiler gets". There is a need for bridging the gap between preprocessor input and preprocessor output. The authors propose the use of folding for explicitly representing preprocessor replacements within a program understanding environment. The approach presented has been implemented as part of the GUPRO program understanding workbench. The user is enabled to individually choose the level of detail from the programmer's view to the compiler's view on the source code.

[1]  Donald E. Knuth,et al.  Literate Programming , 1984, Comput. J..

[2]  M. Brown,et al.  A Hypertext for Literate Programming , 1990, ICCI.

[3]  Panos E. Livadas,et al.  Understanding code containing preprocessor constructs , 1994, Proceedings 1994 IEEE 3rd Workshop on Program Comprehension- WPC '94.

[4]  Gregor Snelting,et al.  On the inference of configuration structures from source code , 1994, Proceedings of 16th International Conference on Software Engineering.

[5]  Jürgen Ebert,et al.  A Declarative Approach to Graph Based Modeling , 1994, WG.

[6]  Jürgen Ebert,et al.  Graph Based Modeling and Implementation with EER / GRAL , 1996, ER.

[7]  Jean-Marie Favre,et al.  Preprocessors from an abstract point of view , 1996, 1996 Proceedings of International Conference on Software Maintenance.

[8]  Jürgen Ebert,et al.  Program comprehension in multi-language systems , 1998, Proceedings Fifth Working Conference on Reverse Engineering (Cat. No.98TB100261).

[9]  Ulrich Furbach,et al.  Disjunctive Logic Program = Horn Program + Control Program , 1998, JELIA.

[10]  Manfred Kamp Managing a multi-file, multi-language software repository for program comprehension tools: a generic approach , 1998, Proceedings. 6th International Workshop on Program Comprehension. IWPC'98 (Cat. No.98TB100242).

[11]  Ivar Jacobson,et al.  The unified modeling language reference manual , 2010 .

[12]  Oliver Obst,et al.  Spatial Agents Implemented in a Logical Expressible Language , 1999, RoboCup.

[13]  Andreas Winter,et al.  Querying as an enabling technology in software reengineering , 1999, Proceedings of the Third European Conference on Software Maintenance and Reengineering (Cat. No. PR00090).

[14]  Frieder Stolzenburg,et al.  Loop-Detection in Hyper-Tableaux by Powerful Model Generation , 1999, J. Univers. Comput. Sci..

[15]  Jürgen Ebert,et al.  GraX-an interchange format for reengineering tools , 1999, Sixth Working Conference on Reverse Engineering (Cat. No.PR00303).

[16]  Jürgen Ebert,et al.  A Formalization of SOCCA , 1999 .

[17]  Peter Baumgartner,et al.  Abductive Coreference by Model Construction , 1999 .

[18]  Jens Woch,et al.  Implementation of a Schema-TAG-Parser , 1999 .

[19]  Joseph Douglas Horton,et al.  Merge Path Improvements for Minimal Model Hyper Tableaux , 1999, TABLEAUX.

[20]  Victor W. Marek,et al.  The Logic Programming Paradigm , 1999, Artificial Intelligence.

[21]  Guillermo R. Simari,et al.  lntroducing generalized specificity in logic programming , 2000 .

[22]  Oliver Obst,et al.  Towards a Logical Approach for Soccer Agents Engineering , 2000, RoboCup.

[23]  Manfred Rosendahl,et al.  Specification of Symbols and Implementation of Their Constraints in JKogge , 2000 .

[24]  Bernt Kullbach Bericht über den 2. Workshop Software-Reengineering (WSR 2000) am 11. und 12. Mai 2000 in Bad Honnef , 2000, Softwaretechnik-Trends.

[25]  David Notkin,et al.  A framework for preprocessor-aware C source code analyses , 2000 .

[26]  Peter Baumgartner,et al.  The Taming of the (X)OR , 2000, Computational Logic.

[27]  Jürgen Dix,et al.  Meta-agent programs , 2000, J. Log. Program..

[28]  Norbert Eisinger,et al.  A Confluent Connection Calculus , 2000, Intellectics and Computational Logic.

[29]  Oliver Obst Specifying Rational Agents with Statecharts and Utility Functions , 2001, RoboCup.

[30]  Ulrich Furbach,et al.  Nonmonotonic Reasoning: Towards Efficient Calculi and Implementations , 2001, Handbook of Automated Reasoning.

[31]  Jürgen Dix,et al.  Transformation-based bottom-up computation of the well-founded model , 1996, Theory and Practice of Logic Programming.

[32]  Michael D. Ernst,et al.  An Empirical Analysis of C Preprocessor Use , 2002, IEEE Trans. Software Eng..

[33]  Jürgen Dix,et al.  Relating defeasible and normal logic programming through transformation properties , 2000, Theor. Comput. Sci..