Analysis of Literate Programs from the Viewpoint of Reuse

Donald Knuth created the WEB system for literate programming when he wrote the second version of TEX, a book-quality formatting system. Levy later created CWEB, which is based on Knuth's WEB using the C programming language and supporting development using the C and C++ programming languages. Krommes' FWEB is based on CWEB and supports several programming languages. We analyze some parts of these systems from the viewpoint of reuse. We make reuse comparisons of four elements of the TEX system: TEX, METAFONT, DVItype and METAPOST. We also compare the primary filters (tangle and weave) of CWEB and FWEB. We analyze the code and integral documentation, considering similarities of chapters, lines and words. With this study we demonstrate that both code and documentation can and should be reused systematically and that there is a need for methods and tools for doing so. Literate programming and software reuse are by no means in contradiction. However, current literate programming systems do not explicitly support software reuse, even though reuse was common in their development.

[1]  Jon Bentley,et al.  Programming pearls: literate programming , 1986, CACM.

[2]  John D. Hobby,et al.  A User’s Manual for MetaPost , 1997 .

[3]  Brian W. Kernighan,et al.  The C Programming Language , 1978 .

[4]  Peter Wegner Capital-Intensive Software Technology , 1984, IEEE Software.

[5]  Bjarne Stroustrup,et al.  The C++ programming language (2nd ed.) , 1991 .

[6]  Grady Booch,et al.  Book Reviews , 1936, Computer.

[7]  Donald E. Knuth,et al.  Metafont: The Program , 1986 .

[8]  Donald E. Knuth,et al.  The errors of tex , 1989, Softw. Pract. Exp..

[9]  Wayne Sewell,et al.  Weaving a Program: Literate Programming in Web , 1989 .

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

[11]  Ali Mili,et al.  Reusing Software: Issues and Research Directions , 1995, IEEE Trans. Software Eng..

[12]  Donald E. Knuth,et al.  The Metafont book , 1989 .

[13]  John J. Marciniak,et al.  Encyclopedia of Software Engineering , 1994, Encyclopedia of Software Engineering.

[14]  Silvio Levy,et al.  The CWEB system of structured documentation - version 3.0 , 1994 .

[15]  Donald E. Knuth,et al.  The TEX Book , 1984 .

[16]  John D. Hobby,et al.  Introduction to MetaPost , 1992 .

[17]  Bjarne Stroustrup,et al.  C++ Programming Language , 1986, IEEE Softw..

[18]  Donald E. Knuth,et al.  TeX: The Program , 1986 .

[19]  Childs Johannes SametingerDepartment Reuse Measurement with Line and Word Runs , 1996 .

[20]  Johannes Sametinger Object-oriented documentation , 1994, ASTR.

[21]  Donald E. Knuth,et al.  The CWEB system of structured documentation - version 3.0 , 1994 .

[22]  Adrian Avenarius,et al.  FWEB: a literate programming system for Fortran8x , 1990, SIGP.

[23]  C Boldyreff,et al.  Software reusability. Volume I: concepts and models. Volume II: applications and experience: T J Bickerstaff and A J Perlis (eds) ACM Press/Addison-Wesley (1989) 425 pp each vol £32.85 each vol hardback , 1991 .

[24]  Charles W. Krueger,et al.  Software reuse , 1992, CSUR.