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

  2. I'm skeptical... by bergeron76 · · Score: 2, Insightful

    Even AskJeeves.com doesn't come up with the right answers to many "plain-english" questions; why would one think that something as complex as writing software would be an easier feat?

    In a few years, this might be more plausible; but I think it's going to take a hell of a lot of work.

    Perhaps they should focus on the new hybrid english/weblish dialect. More kids/teenagers/new-hires will speak that language; and it seems much easier to dissect because of the lack of adjectives and adverbs.

    L8tr

    --
    Don't think that a small group of dedicated individuals can't change the world. It's the only thing that ever has.
  3. Why is everyone crapping on this idea? by Stevyn · · Score: 2, Insightful

    Yeah, sure right now it's not perfect, but it's a good idea. Computers should be a tool to help people, not require them to learn a new language just to communicate with them. I think this is a step in the direction of computers being a part of our lives that actually helps us instead just becoming another appliance.

  4. 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?

  5. If it can be converted to a program, it is one by pocari · · Score: 2, Insightful
    The same problem exists for a lot of specs that get as detailed as a program. The actual thinking needs to take place at a higher level. I am not convinced that you get more people who can think about software at a high level because of the tools; that takes some combination of education, experience, and natural inclination.

    Programming languages have the advantage of precision and programmers' tools like debuggers and syntax checkers. Toy language developers overlook this big step. So how exactly do you go backward from finding a problem in the running program to the conceptual problem in your high-level thinking? Perhaps this is easy for people who are already programmers, but for the supposed audience for stuff like this, that's the most difficult thing of all.

    Turning input into some arbitrary computer program isn't interesting. Helping programmers to reason about programs is. That means tools that aren't just one-way translations.

  6. What's their true talent? by ralejs · · Score: 2, Insightful
    Like many other posters I'm not totally impressed with this piece of work. I guess that ever since programming languages have been around people have tried the idea of programming a computer with natural language. But natural language is inherently bad for this task due to its imprecision.

    There is some related work which I find much more convincing. It's the work on Grammatical Framework (GF). GF is a programming language for writing multi lingual grammars. In GF you can if you wish specify the relation between a natural language and a programming language and write programs in the natural language. But that would not be idiomatic GF. Instead they have an editor where you can construct your natural language text out of a number of choices which makes sense in that particular context. The GF guys have also made successful experiments with converting OCL specification to and from several natural languages such as English, Swedish and German.

    But the MIT people seem to have one big talent for making publicity. And I'll give them credit for that.