HOME

TheInfoList



OR:

Web is a
computer programming Computer programming is the process of performing a particular computation (or more generally, accomplishing a specific computing result), usually by designing and building an executable computer program. Programming involves tasks such as anal ...
system created by
Donald E. Knuth Donald Ervin Knuth ( ; born January 10, 1938) is an American computer scientist, mathematician, and professor emeritus at Stanford University. He is the 1974 recipient of the ACM Turing Award, informally considered the Nobel Prize of computer sc ...
as the first implementation of what he called "
literate programming Literate programming is a programming paradigm introduced in 1984 by Donald Knuth in which a computer program is given as an explanation of its logic in a natural language, such as English, interspersed (embedded) with snippets of macros an ...
": the idea that one could create
software Software is a set of computer programs and associated software documentation, documentation and data (computing), data. This is in contrast to Computer hardware, hardware, from which the system is built and which actually performs the work. ...
as works of
literature Literature is any collection of written work, but it is also used more narrowly for writings specifically considered to be an art form, especially prose fiction, drama, and poetry. In recent centuries, the definition has expanded to include ...
, by embedding source code inside descriptive text, rather than the reverse (as is common practice in most
programming languages A programming language is a system of notation for writing computer programs. Most programming languages are text-based formal languages, but they may also be graphical. They are a kind of computer language. The description of a programming ...
), in an order that is convenient for exposition to human readers, rather than in the order demanded by the
compiler In computing, a compiler is a computer program that translates computer code written in one programming language (the ''source'' language) into another language (the ''target'' language). The name "compiler" is primarily used for programs tha ...
. 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 Tex may refer to: People and fictional characters * Tex (nickname), a list of people and fictional characters with the nickname * Joe Tex (1933–1982), stage name of American soul singer Joseph Arrington Jr. Entertainment * ''Tex'', the Italian ...
. CWEB is a version of Web for the C programming language, while
noweb Noweb, stylised in lowercase as noweb, is a literate programming tool, created in 1989–1999 by Norman Ramsey, and designed to be simple, easily extensible and language independent. As in WEB and CWEB, the main components of Noweb are two prog ...
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 Tex may refer to: People and fictional characters * Tex (nickname), a list of people and fictional characters with the nickname * Joe Tex (1933–1982), stage name of American soul singer Joseph Arrington Jr. Entertainment * ''Tex'', the Italian ...
and Metafont. Modern TeX distributions use another program Web2C to convert Web source to C.


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.


CWEB

CWEB is a
computer programming Computer programming is the process of performing a particular computation (or more generally, accomplishing a specific computing result), usually by designing and building an executable computer program. Programming involves tasks such as anal ...
system created by
Donald Knuth Donald Ervin Knuth ( ; born January 10, 1938) is an American computer scientist, mathematician, and professor emeritus at Stanford University. He is the 1974 recipient of the ACM Turing Award, informally considered the Nobel Prize of computer sc ...
and Silvio Levy as a follow-up to Knuth's ''WEB''
literate programming Literate programming is a programming paradigm introduced in 1984 by Donald Knuth in which a computer program is given as an explanation of its logic in a natural language, such as English, interspersed (embedded) with snippets of macros an ...
system, using the C programming language (and to a lesser extent the
C++ C++ (pronounced "C plus plus") is a high-level general-purpose programming language created by Danish computer scientist Bjarne Stroustrup as an extension of the C programming language, or "C with Classes". The language has expanded significan ...
and
Java Java (; id, Jawa, ; jv, ꦗꦮ; su, ) is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea to the north. With a population of 151.6 million people, Java is the world's mos ...
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 Tex may refer to: People and fictional characters * Tex (nickname), a list of people and fictional characters with the nickname * Joe Tex (1933–1982), stage name of American soul singer Joseph Arrington Jr. Entertainment * ''Tex'', the Italian ...
.


Features

* Can enter manual TeX code as well as automatic. * Make formatting of C code for
pretty printing Pretty-printing (or prettyprinting) is the application of any of various stylistic formatting conventions to text files, such as source code, markup, and similar kinds of content. These formatting conventions may entail adhering to an indentati ...
. * 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


External links


The TeX Catalogue entry for Web
Free documentation generators Literate programming TeX {{Soft-eng-stub