Slashdot Log In
English To Code Converter
Posted by
Zonk
on Fri Mar 25, 2005 04:52 PM
from the universal-translator dept.
from the universal-translator dept.
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."
This discussion has been archived.
No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
Add this to the list... (Score:3, Funny)
"Shoot yourself in the foot."
Finally... (Score:1)
(Last Journal: Wednesday August 03 2005, @09:23AM)
uh oh... (Score:2)
(Last Journal: Sunday May 18 2003, @11:53PM)
"you f-ckin' piece of sh-t! Work right or I'm gonna throw you in the d-mn river!"
"syntax error."
MIT (Score:2)
I was worried that today would pass without a reference, but here it is...
Hey, wow... (Score:5, Funny)
(http://www.livejournal.com/users/k4_pacific | Last Journal: Tuesday May 25 2004, @10:16PM)
Natural language inherently ambiguous (Score:5, Insightful)
(http://spencerogden.com/)
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.
Bringing programming to the masses? (Score:2, Funny)
(http://www.ece.utexas.edu/~olsen)
(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!"
*ponder* (Score:2)
(http://molybdenum-platypus.net/ | Last Journal: Thursday September 16 2004, @01:14PM)
program, i can! (Score:3, Funny)
class You:
look = as_good
def reach(years):
if( years = 900 ):
self.look = not as_good
Intriguing. (Score:2, Funny)
(http://www.darklock.com/blog/ | Last Journal: Tuesday August 28, @02:44PM)
English to Code Converter (Score:4, Funny)
(http://tomcopeland.blogs.com/)
Vaporware (Score:2, Interesting)
I'm skeptical... (Score:3, Insightful)
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
Graphic detail (Score:1)
(http://www.geocities.com/tablizer | Last Journal: Saturday March 15 2003, @01:22PM)
Why is everyone crapping on this idea? (Score:3, Insightful)
Binary? (Score:1)
COBOL, fun, and lawyers (Score:4, Insightful)
(http://brian2.blogspot.com/)
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 [outpost9.com]). 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?
Maze... (Score:1)
(http://meta-meta.blogspot.com/ | Last Journal: Saturday September 11 2004, @02:30PM)
> Create a map
Exception `NorthPoleError' thrown from Compass.eng:87 ( `Can't find north' )
from stdio.eng:56
from pacman.eng:22
F&W EOS DB: _
Idiot Check (Score:1)
(http://slashdot.org/~Doc%20Ruby/journal | Last Journal: Thursday March 31 2005, @01:48PM)
Why bother? (Score:3, Interesting)
(Last Journal: Saturday January 06 2007, @01:13AM)
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.
What's their true talent? (Score:2, Insightful)
(http://www.cs.chalmers.se/~josefs)
There is some related work which I find much more convincing. It's the work on Grammatical Framework [chalmers.se] (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.
Hell, gimme the user description! (Score:2)
(http://juddy.org/)
"Now that we're done thinking about eating, we're going to resume thinking about _main_..."
If that's plain english to the converter, it seems like it would need another level of conversion before you could stand back and watch a cluster chew through the Million Book Project and generate executable Shakespeare.
Romeo and Juliet in C.
You'd have to break down the semantics of literature, the generalities at least - with the whole beginning, subject, character attributes, etc., and make the appropriate translations into C, Java, what have you..
But wow - what a fulfillment of the promise of a giant Computer Brain. One step closer to JOSHUA!
But the point is, I personally would get a lot out of colorful, storybook-like Programming Instruction, even with something as simple as Pac-Man.
This was done 46 years ago; it was called... (Score:2)
Welcome to 1959! [wikipedia.org]
UML to Code (Score:1)
(http://www.benjaminarai.com/)
Naive view of natural language semantics (Score:1)
I can't find anything about the details of this system in the links, but if it really is using such a simplistic mapping between sentence structure and OO design, it's going to get in trouble. For example, consider the fact that subjects of different verbs can have completely different semantic roles:
John angered Bill.
John disliked Bill.
Translated into OO language, the first sentence talks about the John object modifying a property of the Bill object, but the second sentence talks about the Bill object (perhaps indirectly) modifying a property of the John object. I suppose it's possible that the system's database of common sense knowledge could be used to get around this sort of issue.
However, there are more difficult situations, such as the one described by this sentence:
Bill and John hate each other.
It's not clear whether this situation should be represented by giving Bill the "hates John" property and John the "hates Bill" property, or by having a list of hates(X, Y) statements separate from the properties of individual objects (this would be much more efficient in some cases). The problem is more acute with some predicates than others; consider the following:
The ball is near John's foot
It is clearly absurd to give the ball a "near John's foot" property and John a "near the ball property" -- imagine how many properties each object would have to have if there were 100 objects in the same space!
Finally, if you wanted to tell the system about a new verb, you'd have to have some way of telling it about all the verb's subtle semantic properties.
It's possible that the system solves these problems, but I'll believe it when I see it. Natural language interpretation is very, very hard.
Before we do this... (Score:1)
Then whats our work ??? (Score:1)