4. We see and hear and otherwise experience
very largely as we do because the language
habits of our community predispose certain
choices of interpretation
Sapir 1929
…the world is presented in a kaleidoscopic
flux of impressions which has to be
organized by our minds - and this means
largely by the linguistic systems in our minds.
Whorf 1940
5. 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!
Dijkstra 1972 (EWD340)
6. A cosa serve un linguaggio?
Cos’è il Meta Programming System?
Come si usa?
Per cosa viene usato?
7. MPS è un Language Workbench
Language workbenches support the idea
of Language-Oriented
Programming, which is the notion of
building a sofware system by identifying
the various areas of the system and using
(perhaps building) a Domain Specific
Language for each area.
The workbench both supports the
definition of these languages and also Martin Fowler
integrating them together into a coherent
whole.
8. MPS è un Projectional Editor
Source Editing (quello cui siamo abituati)
Immagine tratta da http://martinfowler.com/bliki/ProjectionalEditing.html
9. MPS è un Projectional Editor
Proiezione
Forma visualizzata ed editata
Rappresentazione astratta
Forma di persistenza
Rappresentazione eseguibile
Forma eseguibile
Projectional Editing
Immagine tratta da http://martinfowler.com/bliki/ProjectionalEditing.html
10. A cosa serve un linguaggio?
Cos’è il Meta Programming System?
Come si usa?
Per cosa viene usato?
11. A cosa serve un linguaggio?
Cos’è il Meta Programming System?
Come si usa?
Per cosa viene usato?
12. Syntax sugar Clojure invece che classi
anonime, foreach, switch stringhe
Supporto a tecniche Event driven programming, MVC, aspect
generali oriented programming, design by contract
Supporto domain- Unità di misura per le grandezze fisiche o
specific valute monetarie.
Wrapping di librerie Trasformare una libreria in una estensione del
linguaggio per poter verificare a compile time
che sia utilizzata correttamente.
Sostituzione di XML Sostituire XML o simili con estensioni che
dialoghino con il resto del codice scritto in
Java.
13. Estensioni per C per realizzare sistemi embedded.
Progetto finanziato dal governo tedesco.
Coinvolge Markus Völter, itemis, Lear, Fortiss.
- Uso di state-machine che si possono verificare
- Supporto alla tracciature dei requisiti
- Supporto alle Software Product Lines
- Notazioni tabulari e grafiche
16. Vantaggi
Definizione precisa della semantica
Nel definire un’estensione formalizzo un concetto e
definisco nel dettaglio come funzioni, riducendo lo spazio
per le interpretazioni.
Base per astrazioni successive
Dopo aver formalizzato dei costrutti li trasformo in
mattoncini elementari per riflettere su nuove astrazion (es.
OOP e Design Pattern).
Supporto da parte del tool
Se definisco nuovi costrutti il compilatore e l’editor sono in
grado di effettuare la validazione e proporre refactoring
opportuni.
Notas del editor
----- Meeting Notes (4/15/12 12:46) -----Riferimento a supporto OOP in C in tutti e tre i passaggi.