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

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

    1. Re:Add this to the list... by Reorax · · Score: 2, Funny

      "Shoot yourself in the foot. No, the other foot. No, with the gun! Bah, you're doing this all wrong. Let me show y..OW!!!

      --
      This sig is only here so people stop skipping the last lines of my posts.
  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. Bringing programming to the masses? by RootsLINUX · · Score: 2, Funny

    I shudder at the thought of some computer-tard (like my mother) using English to write programs. Just imagine the havoc that will result!

    (15 yr old male during peak of puberty)
    "Computer, write me a program that downloads all the pr0n on the internet to the my PC!!!!111one"

    (80 yr old male, retired and bored out of his mind)
    "Noisy hunk of crap on the floor, send every naked picture of every woman ever to my printer! Oh wait, make sure they are 19 or younger too!!! Keh keh keh!"

    ...>_>

    --
    Hero of Allacrost, a FOSS RPG for *NIX/*BSD/OS X/Win
  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. Intriguing. by CDarklock · · Score: 2, Funny

    I'd be interested in seeing how well this sort of thing works with procedural code, e.g. the overview descriptions you might write as a comment in a function body before you start writing the "real" function. I don't see a lot of productive stuff coming out of this as it stands now... nouns turn into classes and verbs turn into methods, but that seems to be about it.

    --
    Microsoft cheerleader, blue flag waving, you got a problem with that?
  6. English to Code Converter by tcopeland · · Score: 3, Funny

    Yup, they're called "programmers".

  7. DWIM by tengwar · · Score: 2, Funny
    They're actually pretty advanced in the work, and they've already bootstrapped the compiler. They've not actually released the source, so I'm taking bit of a risk in putting it up on the net, but here it is:

    Compile a METAFOR compiler.