Theme-Based Literate Programming

  • Authors:
  • Andreas Kacofegitis;Neville Churcher

  • Affiliations:
  • -;-

  • Venue:
  • APSEC '02 Proceedings of the Ninth Asia-Pacific Software Engineering Conference
  • Year:
  • 2002

Quantified Score

Hi-index 0.00

Visualization

Abstract

The source code for computer programs is destined tobe read by compilers and consequently its internal structureis heavily constrained. The compiler neither knowsnor cares about such things as a program's internal structure,the relationships between its components and theirspecifications, the way design patterns are instantiated, thebest way to explain its algorithms or how it is intended tobe used. People do. Literate programming (LP) was inventedby Donald Knuth as a way to address such problems.The idea is appealing but LP has not been adopted widely:the lack of good tools, difficulties with object-oriented languagesand the limitations of a single psychological orderare among the reasons. In this paper we report thedevelopment of theme-based literate programming (TBLP).Themes are extremely flexible: they may be aimed at particularreader groups or represent aspects of the program.Features of TBLP include an extended chunk model whichaccommodates a richer variety of types, an extended connectionmodel which allows chunks to be threaded togetherinto multiple themes, an enhanced processing model whichgeneralises tangling and weaving and a chunk-level versionmanagement system. XML is used to represent theweb structure and XML-based technologies such as XSLTare used in processing. This provides flexibility and extensibility,allowing users to define new chunk types. An applicationwhich implements TBLP is presented and the integrationof TBLP with software engineering processes isdiscussed.