Intentional Programming

Discussions on everything related to the software, electronic, and mechanical components of information systems and instruments.

Intentional Programming

Postby Terry on April 29th, 2013, 1:40 pm 

Intentional Programming demo (Part 1) - Editor

Intentional Programming demo (Part 2) - Compiler

Isn't IP cool? It has many revolutionary ideas in it. But it seems pretty old stuff from the video.
Why Microsoft never make it popular?
Posts: 449
Joined: 01 Sep 2008

Re: Intentional Programming

Postby Natural ChemE on April 30th, 2013, 5:01 pm 


Realistically speaking, what does intentional programming offer that we’d want?
Natural ChemE
Forum Moderator
Posts: 2744
Joined: 28 Dec 2009

Re: Intentional Programming

Postby Terry on May 2nd, 2013, 1:28 pm 

Intentional Programming was a research project at Microsoft Research until Spring 2001. It was led by Charles Simonyi, was very advanced, and was very "close to productization". The research project was cancelled by Microsoft, and its further development curtailed.

Main features mentioned
Separating source code storage and presentation - source code is not stored in text files, but in a binary file that bears a resemblance to XML.(IP Tree)
Identity - all definitions not only assign symbolic names, but also unique private identifiers to objects. (program generated from definition database)
Levels of detail - a higher level of abstraction that conveys the intention of the programmer. (Intentional level)

It is an attempt to raise the level of abstraction close to the intentional level of our consciousness. Imagine how we do thing in our intention with all the underlying physical functioning of our body being totally abstracted away from our conscious awareness. The higher intentional level might help to bridge the gap with the system level expressed in UML. One day we can make UML executable when it has a more precise semantics and generate the implementation code from a top-down approach.
Posts: 449
Joined: 01 Sep 2008

Re: Intentional Programming

Postby kidjan on May 17th, 2013, 3:14 pm 

After reading the wikipedia article...honestly, it seems sort of silly.

On some basic level, all code represents the "intent of the programmer." For example, the wikipedia article has the following Java code:

Code: Select all
for (int i = 1; i <= 10; i++) {
   System.out.println("the number is " + i);

In their "intentional" programming language, they simply claim to write:

Code: Select all
print the numbers 1 to 10

It's rather obvious to me, looking at either of these pieces of code, that the "intent" of the programmer was to print out the numbers 1 to 10.

That said...

First, I should mention that this is an incredibly simplistic example, and in that regard, the wikipedia article is rather lacking.

Second, for either language, you need a compiler that understands that language, and can generate some sort of machine code that can then in turn be run by a computer. Backing up a bit, nearly all languages (be they formal or natural) have syntax and semantics; that is, there is a rigid syntax that is grammatically correct, and that syntax itself has actionable meaning within the context of a given program.

Natural languages, however, have properties that are much more difficult to convey. They frequently have context (saying "give me your money" means entirely different things if you're at a bank teller verses working a cash register), frequently have information communicated out of band (the intonation, rhythm and inflection of how you speak, for example--or your body language), and often make use of ambiguous phrases that aren't meaningful to a computer (e.g. "Get thee to a nunnery"), or even worse, have multiple meanings that differ dramatically.

So the obvious problem with this "intentional programming" is as best I can see, it implies some sort of "natural language" parser, and that is a phenomenally complicated thing to do right (today, we cannot currently do it right. It's definitely an outstanding problem in the field of artificial intelligence). It also implies the programmer knows what they want, which as much as I am sorry to say, is not always the case.

If you were going to argue that this IP paradigm does have formal elements, then I don't see how it's really any more fundamentally different from regular old imperative programming models where you have BNF to represent your language, parsing code, a generator, etc., and you massage your BNF until it doesn't contain ambiguities or nonsensical constructs. At the very least, to parse the previous example, you'd have to have keywords "print", "the", "number" and "to", as well as the associated semantics. And one of the big problems with languages with a lot of keywords is the BNF gets huge, and it's very hard to fully understand all of permutations of those keywords.

As far as why MSFT stopped working on it, as best I can see, they decided to do .NET instead, which I think was a much more pragmatic course of action.
User avatar
Active Member
Posts: 1920
Joined: 25 Jul 2007
Location: Earth.

Re: Intentional Programming

Postby Terry on May 18th, 2013, 1:24 pm 

Yes, there is really nothing concrete about intentional programming in wiki and I am not sure how he is going to achieve his intent of IP. But just to think of how to raise the abstraction level of the next generation of language. Isn't visual programming and the underlying automatic code generation the only way to go? Or something more flexible is needed such as a kind of declarative language that state the intent much like the SQL statements do?

I think the example given (print the numbers 1 to 10) is much more like a declarative statement that map to the for-loop code block. It is not going to use natural language which is beyond the scope for programming. Think of how the SQL statements work. What is under the hood? Does it map to a lower level language of how to carry out the query? I really don't know as I never bother...I am a novice.
Posts: 449
Joined: 01 Sep 2008

Return to Computers

Who is online

Users browsing this forum: No registered users and 2 guests