Very High Level Languages for Spec/Design
1 Design
- VHLL
=
Very High Level Languages
- Consider a design to be a VHLL program, i.e., executable
- Make up an appropriate VHLL, if nec
- 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.
- "First Time" Programs (prototypes) should be done in VHLL
2 Description of a Design Should Include
- Prose descriptions in English
- Figures: UML, data flow, block diagram
- All global data structures/ classes
- Collections of methods and their VHLL code
3 VHLL: Very High Level Languages
- High-Level Data Structures: Sets, Sequences, Tables, Maps, …
- High-Level Operations: Matrix ops, Bag Intersect, …
- High-Level Control Structures: Map/Reduce, Higher Order Funcs, Concurrency, …
- Ex: Distributed Data-Parallel Computing Using a High-Level
Programming Language, SIGMOD, 2009
- Ex: "hiCUDA: A High-level Directive-based Language for GPU"
Programming Parallel and Distributed Systems conf, 2011
4 Domain Specific Languages
- There are many tutorials, papers and books on DSLs.
- 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
- Primary task of the programmer: Explain the design and
implementation of a program to fellow humans.
- Secondary task: Produce a ready-to-build collection of source code
files.
- 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.
- 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.
- Donald E. Knuth, "Literate Programming", The Computer Journal,
1984, 27(2): 97-111.
weave
Generate the .tex file(s) from .web file(s)
tangle
Generate the source code file(s) from .web file(s)
- http://www.literateprogramming.com/ "Design Documentation"
Recommended Reading
- http://www.literateprogramming.com/knuthweb.pdf Required Reading
5.3 LP Tools
- cweb by Knuth http://www-cs-faculty.stanford.edu/~uno/cweb.html
- noweb by Ramsey http://www.cs.tufts.edu/~nr/noweb/ supports multiple PL
- 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.
- 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.
- 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.