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."

6 of 56 comments (clear)

  1. Add this to the list... by NorbMan · · Score: 3, Funny

    Shooting yourself in the foot (in Metafor):

    "Shoot yourself in the foot."

  2. Hey, wow... by k4_pacific · · Score: 5, Funny

    Maybe they can combine this with voice recognition software and just turn it on during the design meetings. After a while, the meeting will inevitably go off-topic into a discussion of the NCAA final four or something. The final product is then a combination business middleware/basketball game which is good as neither.

    --
    Unknown host pong.
  3. Natural language inherently ambiguous by spencerogden · · Score: 4, Insightful

    I'm sure if something lke this will be able to succeed until we see some big advances in AI and computers that are as tollerant of ambiguity as humans are.

    Programming languages grew out of a neccesity to have something that was easy to remember (by virtue of its similarities to english), yet still precise enough for the computer to interpret. At a certain point you still need to define a vocabulary with consistent semantics to be applied to programming concepts.

    Whether or not that vocabulary is very rich and sounds almost like spoken english, it all goes out the window when a phrase is used by the speaker in a different meaning than the system had in mind.

    There is a good reason that mathematics has its own language. In fact, any specialised are has its own jargon, even its not technical. General purpose English is just too vague to use in some domains.

    AI problems always seem to be perpetualy 'a decade' in the future.

  4. program, i can! by halber_mensch · · Score: 3, Funny

    yoda: When 900 years old you reach, look as good you will not!

    class You:
    look = as_good
    def reach(years):
    if( years = 900 ):
    self.look = not as_good

    --
    perl -e "eval pack(q{H*},join q{},qw{70 72696e74207061636b28717b482a7d2c717b343 637323635363534323533343430617d293b})"
  5. English to Code Converter by tcopeland · · Score: 3, Funny

    Yup, they're called "programmers".

  6. COBOL, fun, and lawyers by pocari · · Score: 4, Insightful
    The idea of basing a programming language upon natural lan-guage dates back to the earliest days of high-level programming languages. COBOL was an attempt to make programming code as similar as possible to English, in contrast to FORTRAN's metaphor of mathematical formulae. The hope was to make programming accessible to non-technical business users....most importantly, we hope interfaces like Metafor can put some of the fun back into programming.

    When did programming in conventional non-COBOL languages cease to be fun? In fact, I've never hear someone describe COBOL programming as fun (cf. COBOL fingers). I've even had fun using FORTRAN, as it was the only way to use a cool plotter, and, later, a parallel supercomputer.

    Besides, people who try to express things precisely in English are called lawyers, and we don't want to become that, do we?