UP | HOME
CS 7140

Very High Level Languages for Spec/Design

Table of Contents

1 Design

  1. VHLL = Very High Level Languages
  2. Consider a design to be a VHLL program, i.e., executable
  3. Make up an appropriate VHLL, if nec
  4. http://en.wikipedia.org/wiki/Pseudocode This is a decent intro to psuedocode. In this course, we aim for much higher degree of precision and rigor.
  5. "First Time" Programs (prototypes) should be done in VHLL

2 Description of a Design Should Include

  1. Prose descriptions in English
  2. Figures: UML, data flow, block diagram
  3. All global data structures/ classes
  4. Collections of methods and their VHLL code

3 VHLL: Very High Level Languages

  1. High-Level Data Structures: Sets, Sequences, Tables, Maps, …
  2. High-Level Operations: Matrix ops, Bag Intersect, …
  3. High-Level Control Structures: Map/Reduce, Higher Order Funcs, Concurrency, …
  4. Ex: Distributed Data-Parallel Computing Using a High-Level Programming Language, SIGMOD, 2009
  5. Ex: "hiCUDA: A High-level Directive-based Language for GPU" Programming Parallel and Distributed Systems conf, 2011

4 Domain Specific Languages

  1. There are many tutorials, papers and books on DSLs.
  2. Ex: Book "Domain Specific Languages", by Martin Fowler, 2010. http://martinfowler.com/books/dsl.html "DSLs are small languages, focused on a particular aspect of a software system. You can't build a whole program with a DSL, but you often use multiple DSLs in a system mainly written in a general purpose language."

5 Literate Programming

5.1 Idea

  1. Primary task of the programmer: Explain the design and implementation of a program to fellow humans.
  2. Secondary task: Produce a ready-to-build collection of source code files.
  3. An LP author presents it in an order that suits the explanation of the program to fellow software engineers, not necessarily in the order that a compiler may expect it.
  4. Original idea by Professor Emeritus Donald Knuth, Stanford U, "fastest pen in the West", Turing Award Winner 1974, and the developer of the TeX typesetting system.
    1. Donald E. Knuth, "Literate Programming", The Computer Journal, 1984, 27(2): 97-111.
    2. weave Generate the .tex file(s) from .web file(s)
    3. tangle Generate the source code file(s) from .web file(s)
  5. http://www.literateprogramming.com/ "Design Documentation" Recommended Reading
  6. http://www.literateprogramming.com/knuthweb.pdf Required Reading

5.2 Examples

  1. The typesetting program TeX is designed as a literate program by Knuth.
  2. cweb by Knuth http://www-cs-faculty.stanford.edu/~uno/cweb.html
  3. http://www.tug.org/TUGboat/tb23-3-4/tb75saha.pdf Rambutan: Literate Programming in Java, TUGboat, Volume 23 (2002), No. 3/4
  4. Knuth has several example programs at http://www-cs-faculty.stanford.edu/~knuth/programs.html to read. His "Programming Pearls, Literate Programming: The Common Words Problem", 1986, was a Required Reading weeks ago.

5.3 LP Tools

  1. cweb by Knuth http://www-cs-faculty.stanford.edu/~uno/cweb.html
  2. noweb by Ramsey http://www.cs.tufts.edu/~nr/noweb/ supports multiple PL
  3. http://wiki.eclipse.org/Intent The Mylyn Intent prime objective is to make developers consider documentation as something useful and easy to maintain, that they can use to formalize their best practices and share their knowledge. Based on a new vision of the documentation, in which explanations in natural langage are formally linked with technical artefacts (java code, models, manifest files, bugzilla issues, git repositories, etc.), Intent allows you to efficiently update documentation when a change occurs in your software, turning it into a true Agile documentation.
  4. http://lep.sourceforge.net/tutorials.htm Literate Eclipse Programming assists developers in writing structured, well documented source code. LEP integrates automated extraction of source code and documentation into a familiar eclipse environment. Compiling and debugging are fully supported.
  5. More LP tools: noweb, nuweb, nano-lp, …; some of these are ready to apt-get install packages in Debian/Ubuntu distros. Visit http://www.literateprogramming.com/ for further details.

6 References

  1. Embedded in the above.

7 End


Copyright © 2020 • www.wright.edu/~pmateti