What is Federico doing?

Preview:

DESCRIPTION

My PHD proposal informally presented at a group meeting.

Citation preview

What is Federico doing?

A secret now revealed!

Index

Language and tools

How is this stuff related to programming?

Model-driven development

Intentional Programming

Roadmap

Languages matter a lot

Linguistic relativity

Benjamin Lee Whorf, A chemical engineer

Native American languages impose on their speakers a picture of reality that is totally different from ours, so their speakers would simply not be able to understand some of our most basic concepts, like the flow of time or the distinction between objects (like “stone”) and actions (like “fall”) [Whorf as cited by 3]

We cut nature up, organize it into concepts, and ascribe significances as we do, largely because we are parties to an agreement […] codified in the patterns of our language. […] We cannot talk at all except by subscribing to the organization and classification of data which the agreement decrees. [2]

[2] B. Whorf, T. Review. Science and linguistics. 42(6), 1940. [3] G. Deutscher, Does Your Language Shape How You Think?, The New York Times, August 26, 2010

Linguistic relativity

As strange as it may sound, our experience of a Chagall painting actually depends to some extent on whether our language has a word for blue. [3]

We see and hear and otherwise experience very largely as we do because the language habits of our community predispose certain choices of interpretation. [1]

[1] E. Sapir. The status of linguistics as a science. Language, 5(209), 1929.

By relieving the brain of all unnecessary work, a good notation sets it free to concentrate on more advanced problems, and in effect increases the mental power of the race. [5]

[5] A. N. Whitehead. An introduction to Mathematics. Williams & Northgate, 1911.

120 x

14

CXX (?)

XIV

Linguistic relativity

Tools support a wide range of

activities…

…including reasoning

Just as you cannot do very much carpentry with your bare hands, there is not much thinking you can do with your bare brain. [7]

[7] Bo Dahlbom and Lars-Erik Janlert (unpublished, cited by Donnett, 2000)

Tools for the mind

We use intelligence to structure our environment so that we can succeed with less intelligence. Our brains make the world smart so we can be dumb in peace! –Andy Clark, 1997

Nersessian concludes that engineering scientists think by means of the artifact models they design and build and without them they are almost unable to think [6]

[6] Nersessian, N.J. (2009). How do engineering scientists think? Model-based simulation in biomedical engineering laboratories, Topics in Cognitive Science, 1:730-757.

The Extended Mind

Your mind is not just in your skull but it includes also the tools supporting reasoning,

which play an active role in thinking.

Andy Clark and David Chalmers

…what about programming?

Edsger Dijkstra 1972 Turing Award

The tools we are trying to use and

the language or notation we are

using to express or record our

thoughts are the major factors

determining what we can think or

express at all! [4]

[4] E. W. Dijkstra. The humble programmer. Commun. ACM, 15:859–866, October 1972.

…what about programming?

A language that doesn’t affect the way you think about programming, is not worth knowing.

Kenneth E. Iverson 1979 Turing Award

Model-driven development

Translation

Account number, Interest rate,

Bond, Inflation rate

JSP, Java class, Database, HTML, CSS

Express using the problem language Generate code using the solution language

Step 1) Tools to express and reason

Tools are created to manipulate the models

Step 2) Use the information to feed automatization

1

2

Model-driven development

• There are high barriers bewteen languages.

• It is costly to make GPLs and DSLs communicate

• GPLs are immutable.

public class ArrayOps { private /*@ spec_public @*/ Object[] a; //@ public invariant 0 < a.length; /*@ requires 0 < arr.length; @ ensures this.a == arr; @*/ public void init(Object[] arr) { this.a = arr; } @Contract

interface BankAccount { @Post(“$return >= 0”); float getBalance(); @Pre(“amount >= 0”) @Post(“$this.balance == $old($this.balance) +amount && $return == $this.balance”) float deposit(float amount); }

GPLs are immutable AspectJ

JML

Contract4J

1995: The Death Of Computer Languages, The

Birth of Intentional Programming

Microsoft choose .NET

2002: He found Intentational

Software

2006: Presentation at

OOPSLA

2009: Industrial case-studies

Intentional Programming

Charles Simonyi

• Inventor of the Hungarian notation

• Oversaw the development of Word and Excel

• He flight in the space

Intentional Programming

1.Languages can evolve 2.Languages can be mixed 3.More notations for each element

XPand

GMF XText

MWE

ATL

JET

EMFText

Teneo

All the information is stored in EMF models or «view» as EMF models

All the information is stored in EMF models or «view» as EMF models

Each editor component is able to represent certain information

class Order { boolean isPaid() String getNumber() }

All the information is stored in EMF models or «view» as EMF models

Each editor component is able to represent certain information

I can mix models and build new editor components reusing and composing existing components

class Order { boolean isPaid() String getNumber() }

Java C#

More notations

Roadmap 2011

Gen-Feb 2011 Read about cognitive linguistics, tools & mind

Feb-Apr 2011 Build a prototype of PrEdE and a Math DSL

May-Dec 2011 Work on a Java projectional editor May 2011… Composability of Web-Services

Roadmap 2012

2012 Case studies with PrEdE 2012 Bi-directional trasformations,

deeper integration with other EMF tools, complete bootstrapping