Web (programming system)

Short description: Macro-based programming language

Web is a computer programming system created by Donald E. Knuth as the first implementation of what he called "literate programming": the idea that one could create software as works of literature, by embedding source code inside descriptive text, rather than the reverse (as is common practice in most programming languages), in an order that is convenient for exposition to human readers, rather than in the order demanded by the compiler.[1]

Web consists of two secondary programs: TANGLE, which produces compilable Pascal code from the source texts, and WEAVE, which produces nicely-formatted, printable documentation using TeX.

CWEB is a version of Web for the C programming language, while noweb is a separate literate programming tool, which is inspired by Web (as reflected in the name) and which is language agnostic.

The most significant programs written in Web are TeX and Metafont. Modern TeX distributions use another program Web2C to convert Web source to C.

## Contents

* 1 Philosophy
* 2 CWEB
* 2.1 Features
* 3 References
* 4 External links

## Philosophy

Unlike most other documentation generators, which relegate documentation to comments, the WEB approach is to write an article to document the making of the source code. Much like TeX articles, the source is divided into sections according to documentation flow. For example, in CWEB, code sections are seamlessly intermixed in the line of argumentation.[2]

## CWEB

CWEBParadigm| Literate, imperative (procedural), structured

|

Designed by| Donald Knuth
Developer| Donald Knuth & Silvio Levy
First appeared| 1987; 39 years ago (1987)
Stable release|

3.67 / October 24, 2006; 19 years ago (2006-10-24)

Typing discipline| Static, weak, manifest, nominal
OS| Cross-platform (multi-platform)
License| custom free-software license
Filename extensions| .w
Website| www-cs-faculty.stanford.edu/~uno/cweb.html
Influenced by
WEB, TeX
Influenced
noweb

CWEB is a computer programming system created by Donald Knuth and Silvio Levy as a follow-up to Knuth's WEB literate programming system, using the C programming language (and to a lesser extent the C++ and Java programming languages) instead of Pascal.

Like WEB, it consists of two primary programs:

* CTANGLE, which produces compilable C code from the source texts, and
* CWEAVE, which produces nicely-formatted printable documentation using TeX.

### Features

* Can enter manual TeX code as well as automatic.
* Make formatting of C code for pretty printing.
* Can define sections, and can contain documentation and codes, which can then be included into other sections.
* Write the header code and main C code in one file, and can reuse the same sections, and then it can be tangled into multiple files for compiling.
* Use `#line` pragmas so that any warnings or errors refer to the .w source.
* Include files.
* Change files, which can be automatically merged into the code when compiling/printing.
* Produces index of identifiers and section names in the printout.

## References

1. ↑ Knuth, Donald E. (1992). Literate Programming. CSLI Lecture Notes. 27. Stanford, California: Center for the Study of Language and Information.
2. ↑ Silvio Levy (12 June 2004). "An example of CWEB". http://tex.loria.fr/litte/wc.pdf.

## External links

* The TeX Catalogue entry for Web
* CWEB homepage
* Examples of programs written in Web, By Donald Knuth (1981 and onward)

* v
* t
* e

TeX

Macro packages|

* AMSTeX
* ArabTeX
* CircuiTikZ
* ConTeXt
* FarsiTeX
* LaTeX
* MusiXTeX
* Plain TeX
* PSTricks
* TikZ
* TIPA
* XyMTeX

Alternative TeX engines|

* eTeX
* LuaTeX
* pdfTeX
* XeTeX
* New Typesetting System
* Omega

Distributions|

| Active|

* TeX Live (MacTeX, W32TeX)
* MiKTeX
* TeXPortal
* TinyTeX

|

Deprecated|

* teTeX
* fpTeX
* gwTeX
* OzTeX
* AmigaTeX
* PasTeX

Community|

* CTAN
* TUGboat
* The PracTeX Journal
* DANTE

Related|

* DVI
* Computer Modern
* Metafont
* MetaPost
* WEB
* CWEB
* TeX Directory Structure
* TeX font metric
* Texinfo

* v
* t
* e

Donald Knuth

Publications|

* The Art of Computer Programming
* "The Complexity of Songs"
* Computers and Typesetting
* Concrete Mathematics
* Surreal Numbers
* Things a Computer Scientist Rarely Talks About
* Selected papers series

Software|

* TeX
* Metafont
* MIXAL (MIX
* MMIX
* GNU MDK)

Fonts|

* AMS Euler
* Computer Modern
* Concrete Roman

Literate programming|

* WEB
* CWEB

Algorithms|

* Knuth's Algorithm X
* Knuth–Bendix completion algorithm
* Knuth–Morris–Pratt algorithm
* Knuth shuffle
* Robinson–Schensted–Knuth correspondence
* Trabb Pardo–Knuth algorithm
* Generalization of Dijkstra's algorithm
* Knuth's Simpath algorithm

Other|

* Dancing Links
* Knuth reward check
* Knuth Prize
* Man or boy test
* Quater-imaginary base
* -yllion
* Potrzebie system of weights and measures

0.00

(0 votes)

Original source: https://en.wikipedia.org/wiki/Web (programming system). Read more

|

Retrieved from "https://handwiki.org/wiki/index.php?title=Web_(programming_system)&oldid=253333"
*[v]: View this template
*[t]: Discuss this template
*[e]: Edit this template