16 Pages Posted: 24 Jul 2012
Date Written: July 19, 2012
We present a variation on literate programming (see Knuth: 1984, 1992) targeting multiple simultaneous readerships, both human (e.g., coders, testers, analysts, etc.) and compilers/interpreters (e.g., C , Python, Fortran, etc.). The technique exploits existing commenting syntax available in all common programming languages to provide inline documentation and other semantic markup, which can then be used in test generation and code translation. To keep the problem manageable, we restrict attention to scientific function libraries (i.e., libraries of numerical routines adhering to the functional programming rule of “no side effects”). We offer a prototype implementation in XSLT and DocBook.
Suggested Citation: Suggested Citation
Flood, Mark D. and McCormick, Matthew and Palmer, Nathan M., Encoding Transparency: Literate Programming and Test Generation for Scientific Function Libraries (July 19, 2012). Available at SSRN: https://ssrn.com/abstract=2113535 or http://dx.doi.org/10.2139/ssrn.2113535