Slashdot Mirror


English To Code Converter

prostoalex writes "Metafor from MIT is a code visualization utility, capable of converting high-level descriptions into class and function (or method, depending on which camp you're in) definitions. According to the screenshot, it looks like Metafor tries to figure out the components of the software application, defines classes, deduce actions, and generates some function (method) signatures. A PDF document by researchers is available from MIT: "We explore the idea of using descriptions in a natural language as a representation for programs. While we cannot yet convert arbi-trary English to fully specified code, we can use a reasonably expressive subset of English as a visualization tool. Simple descriptions of program objects and their behavior generate scaffolding (underspecified) code fragments, that can be used as feedback for the designer. Roughly speaking, noun phrases can be interpreted as program objects; verbs can be functions, adjectives can be properties. A surprising amount of what we call programmatic semantics can be inferred from linguistic structure. We present a program editor, Metafor, that dynamically converts a user's stories into program code, and in a user study, participants found it useful as a brainstorming tool." There's also an article about it on ACM."

4 of 56 comments (clear)

  1. Better link by Anonymous Coward · · Score: 0, Interesting
  2. Vaporware by eurleif · · Score: 2, Interesting

    Am I the only one here who's reminded of the countless other "amazing programs" with glowing writeups and great-looking screenshots that are never actually released? When I see a download link, I'll believe it.

  3. Literate Programming and the WEB by Pan+T.+Hose · · Score: 0, Interesting

    It sounds like yet another reinventing of Literate Programming and The CWEB System of Structured Documentation by Donald E. Knuth. See also: www.literateprogramming.com. Some quotes:

    "I believe that the time is ripe for significantly better documentation of programs, and that we can best achieve this by considering programs to be works of literature. Hence, my title: "Literate Programming."

    "Let us change our traditional attitude to the construction of programs: Instead of imagining that our main task is to instruct a computer what to do, let us concentrate rather on explaining to human beings what we want a computer to do.

    "The practitioner of literate programming can be regarded as an essayist, whose main concern is with exposition and excellence of style. Such an author, with thesaurus in hand, chooses the names of variables carefully and explains what each variable means. He or she strives for a program that is comprehensible because its concepts have been introduced in an order that is best for human understanding, using a mixture of formal and informal methods that reinforce each other." -- Donald Knuth. "Literate Programming (1984)" in Literate Programming. CSLI, 1992, pg. 99.

    More quotes:

    "The philosophy behind CWEB is that an experienced system programmer, who wants to provide the best possible documentation of his or her software products, needs two things simultaneously: a language like TeX for formatting, and a language like C for programming. Neither type of language can provide the best documentation by itself; but when both are appropriately combined, we obtain a system that is much more useful than either language separately.

    "The structure of a software program may be thought of as a "WEB" that is made up of many interconnected pieces. To document such a program we want to explain each individual part of the web and how it relates to its neighbors. The typographic tools provided by TeX give us an opportunity to explain the local structure of each part by making that structure visible, and the programming tools provided by languages like C make it possible for us to specify the algorithms formally and unambiguously. By combining the two, we can develop a style of programming that maximizes our ability to perceive the structure of a complex piece of software, and at the same time the documented programs can be mechanically translated into a working software system that matches the documentation.

    "Besides providing a documentation tool, CWEB enhances the C language by providing the ability to permute pieces of the program text, so that a large system can be understood entirely in terms of small sections and their local interrelationships. The CTANGLE program is so named because it takes a given web and moves the sections from their web structure into the order required by C; the advantage of programming in CWEB is that the algorithms can be expressed in "untangled" form, with each section explained separately. The CWEAVE program is so named because it takes a given web and intertwines the TeX and C portions contained in each section, then it knits the whole fabric into a structured document." -- Donald Knuth. The CWEB System of Structure Documentation. Addison-Wesley. 1994. pg. 1.

    In other words, paraphrasing Henry Spencer, "Those who do not understand the ideas of Donald Knuth are condemned to reinvent them, poorly."

    --
    Sincerely,
    Pan Tarhei Hosé, PhD.
    "Homo sum et cogito ergo odi profanum vulgus et libido."
  4. Why bother? by TheLink · · Score: 2, Interesting

    If you want something like that, just outsource to India :).

    The problem is not whether it's in English or something else.

    The benefit of experienced programmers is that they know Marketing is going to change their minds and want such and such a feature months later, so they just get ready for it well in advance. Even if it's not in the spec written in English or whatever language.

    You can already write code in English. If you write it well enough, cheap programmers can compile it to their programming language of choice. And the main benefit is the cheap programmers can continue maintaining the software, and you can move on to writing other stuff.

    --