the epistemology of programming language paradigms

25
The epistemology of programming language paradigms HaPoC 2013 F. Gobbo & M. Benini Univ. of Torino & Univ. of Insubria [email protected] [email protected] CC BY: $ \ C 28-31 Oct, 2013 (1 of 23)

Upload: federico-gobbo

Post on 11-May-2015

360 views

Category:

Education


4 download

DESCRIPTION

Talk prepared and presented with Marco Benini at HaPoC2, ENS, Paris.

TRANSCRIPT

Page 1: The epistemology of programming language paradigms

The epistemology of programming language paradigmsHaPoC 2013

F Gobbo amp M Benini

Univ of Torino amp Univ of Insubriafedericogobbounitoit

marcobeniniuninsubriaitCCcopy BYcopy $copy Ccopy

28-31 Oct 2013

(1 of 23)

Modern computing in terms of information hiding

The whole history of modern computing can be seen in terms ofinformation hiding (Gobbo and Benini 2013)

in the early days there was only a machine-tailored assemblerletting programmers write one-to-one machine-readableinstructions

then a fundamental LoA was introduced by Backus (1978) duringthe design of Fortran and its implementation via a compiler iethe computer program that translates the source code intomachine code the Backus-Naur Form (BNF) abstracts over thelanguage allowing to compute on its structures

the next LoA in programming has been introduced after Boumlhm andJacopini (1966) a result that permitted to hide the way themachine interprets the flow of control and to change it tosomething which can be easily analysed mathematically

(2 of 23)

Modern computing in terms of information hiding

The whole history of modern computing can be seen in terms ofinformation hiding (Gobbo and Benini 2013)

in the early days there was only a machine-tailored assemblerletting programmers write one-to-one machine-readableinstructions

then a fundamental LoA was introduced by Backus (1978) duringthe design of Fortran and its implementation via a compiler iethe computer program that translates the source code intomachine code the Backus-Naur Form (BNF) abstracts over thelanguage allowing to compute on its structures

the next LoA in programming has been introduced after Boumlhm andJacopini (1966) a result that permitted to hide the way themachine interprets the flow of control and to change it tosomething which can be easily analysed mathematically

(2 of 23)

Modern computing in terms of information hiding

The whole history of modern computing can be seen in terms ofinformation hiding (Gobbo and Benini 2013)

in the early days there was only a machine-tailored assemblerletting programmers write one-to-one machine-readableinstructions

then a fundamental LoA was introduced by Backus (1978) duringthe design of Fortran and its implementation via a compiler iethe computer program that translates the source code intomachine code the Backus-Naur Form (BNF) abstracts over thelanguage allowing to compute on its structures

the next LoA in programming has been introduced after Boumlhm andJacopini (1966) a result that permitted to hide the way themachine interprets the flow of control and to change it tosomething which can be easily analysed mathematically

(2 of 23)

The early days of Structured Programming

In the end of the 1960s it became evident that computerprogramming ought to be more solid both theoretically andpractically In particular

the structured program theorem by Boumlhm and Jacopini (1966) the jrsquoaccuse against the goto statement by Dijkstra (1968) in 1968 the NATO Science Committee introduced the concept oflsquosoftware engineeringrsquo

in 1968 an IFIP Working Group on lsquoProgramming Methodologyrsquowas established

(3 of 23)

Why Structured Programming

Software projects were becoming more complex involving anincreasing number of programmers as for instance the IBMSystem360 family and in particular the OS360 (Brooks 1995)

[IBM] did not like the popularity of my text it stole the termldquoStructured Programmingrdquo and under its auspices Harlan DMills trivialized the original concept to the abolishment of thegoto statement mdash Dijkstra (2001)

Structured Programming permitted to cope with this complexityessentially through best practices and new ad-hoc programminglanguages (Ceruzzi 2003) Here we will analyse the latter

(4 of 23)

Programmers and their view of the machine

From the point of view of a programmer a program is the result of awork whose aim is to instruct a (given) machine to solve a givenproblem

Usually the machine is not just a piece of hardware but is alsoconsidered as an abstract machine possibly equipped with anoperative system and a number of services like a database graphicaluser interface networking etc

(5 of 23)

How programmers choose a programming language

To simplify terminology we will use the term solution to identify theresult of executing a program and we will reserve the term algorithmto identify what has to be coded as a program in a programminglanguage

The choice of the programming language defines how the way toachieve the solution is described to the machine In this respect themany different programming languages have been justified because oftheir ability to express the various problems and the ways to solvethem

(6 of 23)

The Method of Levels of Abstraction

The method of LoAs (Floridi 2008) can be used to describeprogramming in terms of informational organisms (inforgs)

1 the programmer is the informational agent2 the machine is the artificial artifact mdash where the Levels of

Organisation (LoOs) ie the apparatuses can be identified

A software project is an infosphere including processes and mutualrelations among the inforgs directed to the same goal

(7 of 23)

Machine solution program

From the point of view of the programmer the machine is describedby MO a LoO which specifies what can be inspected of the machineand MA a LoA that provides the description of how observables inMO are organised and what instructions can be used to manipulatethem

Similarly the solution of the problem is ultimately specified by a pairSA SO a (partial) LoA and the corresponding (partial) LoO whichshould become (part of) PA and PO the LoA and the LoO of theprogram to be constructed

(8 of 23)

The program in terms of Levels of abstraction

When the program will be completed the pair formed by PO and PAwill be a new abstract machine that can be used to calculate thesolution of the original problem mdash the purpose of the programmingactivity

The algorithm the programmer has to devise is the mapping betweenthe level of abstraction P and the level M which must become anobservable of M in the form of an executable program

The presence of a mapping is what distiguishescomputational-inforgs in these inforgs it is essential that theartifact is computational ie it is able to execute a coded algorithm

(9 of 23)

Programming as the creation of a c-inforg

It is worth remarking that in a sense the act of programming createsa new computational inforg from an existing one from the pairmachine + programmer the pair abstract machine + user arisesthanks to the programmerrsquos activity

If the above cited mapping would be absent the user would be unableto use the machine to solve the problem thus failing to fulfill thepurpose of programming

(10 of 23)

Why levels of explanations

The choice of the programming language determines theepistemological approach sustaining the programmersrsquo goals whichis identified as a Level of Explanation (LoE) by Floridi (2008)

Unlike LoAs and LoOs LoEs do not really pertain to the systemrather they are an epistemological lens through which theinformational agent(s) approaches the goal of programming

(11 of 23)

The epistemological priority of LoEs

As an example modular arithmetic is a LoE a machine-levelprogrammer adopts to explain what some instructions of the centralprocessing unit

It is worth noticing how some LoE of the would-be program areknown in advance to the programmer in fact the purpose theprogram is written for is well-known to the programmer and thisforms a LoE for the program even before it exists as a LoALoO pair

Thus the LoE adopted by the programmer has an epistemologicalpriority on the LoALoO pair

(12 of 23)

A taxonomy of programming languages

Paraphrasing the three-layered description of programming byHofstadter (1979) the source code is the novel the programmer is the novelist the programming language is the literary genre of the novelTo these levels we can add the executable code is the book the machine is the narratorWe can classify programming languages in various way applying themethod of LoAs we can find only three major paradigms accordingto the kind of information got hidden

(13 of 23)

1 The procedural paradigm

Mainly because of the historical development of computationalmachineries current computers can be seen as structures of vonNeumann machines (Gobbo and Benini 2013)

This class of languages abstracts over the structure of von Neumannmachines by allowing more data types than just computationalnumbers and by allowing more or different instructions than those bythe bare machine

(14 of 23)

The machine in the procedural paradigm

The essential structure of the von Neumann machine is retained anengine operating on a memory via a set of instructions from a fixedset the code is organised as a sequence of elementary instructionseach one modifying the state of the machine mdash the next instructionto execute chosen according to the state

most programming languages allow programs to perform actionsthat change the values of variables or which have otherirreversible effects (input or output for example) we say thatthese actions have side-effect mdash White (2004) in Floridi (2004)

(15 of 23)

2 The declarative paradigm

Historically the von Neumann machine was nothing but one of thepossible models of computation introduced in the beginning of thelast century Other models like Churchrsquos λ-calculus Herbranduniverses stable models etc where proposed and studied To someextent the actual evolutions of these systems are much closer tointeresting problems ie they allow to describe the problem almostdirectly in the terms of their language

Moreover these systems have an instrinsic computational meaningwhich amounts to say that the very description of the problem hidesin itself the algorithm to solve it The programming languages basedon these systems are called declarative

(16 of 23)

The machine in the declarative paradigm

This class of programming languages comprising logical languages asProlog or Answer Set Programming but also the functional languagesas ML or Haskell abstracts over the very structure of the vonNeumann machine

In fact each language in this class provides an abstract machineoperating on a different computational model perfectly described inmathematical terms ndash sometimes before von Neumannrsquos Theprogramming language contains some sort of simulator to enable theexecution of the code on a standard von Neumann architecture

(17 of 23)

3 The object-oriented paradigm

Another approach is by the introduction of the concept of objectwhich is conceived originally on a different LoE philosophically basedon Leibnizrsquos monads and the subsequent adapted notions of 20thcentury physics and biology (Kay 1993)

In fact the object-oriented paradigm abstracts over the organisationof memory and state of a von Neumann architecture by putting alayered structure of abstractions over them

(18 of 23)

The machine in the object-oriented paradigm

One can consider each object-oriented class as a LoA over thememorystate of the hosting machine which is equipped with aninternal map (its implementation) and an external interface (itsLoALoO pair)

These classes are in turn the building blocks for further levels ofabstractions whose aim is to construct the PAPO pair ie the levelsof abstraction the program has to provide to fulfill its goal

(19 of 23)

The relations between the three paradigms

It should be clear that the object-oriented paradigm is orthogonalto the declarative paradigm in fact nothing prevents fromintroducing layers of abstractions over a basically differentorganisation of memory like the database of clauses in Prolog or theheap of functions in Standard ML And of course this has alreadybeen done in many different ways

Also these paradigms can realised in a different degree by a languagefor example in LISP the grandfather of functional languages there isan implicit state while in most modern functional languages thestate is explicit and very limited

(20 of 23)

Observations

Thus the gradients of applications of the previously exposedparadigms allow to naturally place each existing programminglanguage in a multi-dimensional space The fact that thesegradients are not necessarily of a quantitative nature is the deepreason why philosophy and not engineering is the right disciplinewherein to analyse the principles of programming

When dealing with really complex problems which happens in mostcontemporary software design rarely a single language has the rightfeatures to model the whole problem

Probably the universal language is an unreachable dream ashidingshowing some features is essential to solve specific problemsmdash and what to hide in a problem is exactly what one wish to exposein another one

(21 of 23)

Essential References

Backus J (1978) lsquoThe history of FORTRAN I II and IIIrsquo SIGPLAN Not13(8) 165ndash180

Boumlhm C and Jacopini G (1966) lsquoFlow diagrams turing machines and languages withonly two formation rulesrsquo Communications of the ACM 9(5) 366ndash371

Brooks Jr F P (1995) The mythical man-month (anniversary ed) Addison-WesleyLongman Publishing Co Inc Boston MA USA

Ceruzzi P (2003) A history of modern computing History of computing MIT PressDijkstra E W (1968) lsquoLetters to the editor go to statement considered harmfulrsquo

Commun ACM 11(3) 147ndash148Dijkstra E W (2001) What led to notes on structured programming circulated

privatelyFloridi L (2008) lsquoThe method of levels of abstractionrsquo Minds Mach 18 303ndash329Floridi L ed (2004) The Blackwell guide to the philosophy of computing and

information Blackwell LondonGobbo F and Benini M (2013) lsquoFrom ancient to modern computing A history of

information hidingrsquo IEEE Annals of the History of Computing 99(PrePrints)Hofstadter D R (1979) Goumldel Escher Bach An Eternal Golden Braid Basic Books

New YorkKay A C (1993) lsquoThe early history of smalltalkrsquo SIGPLAN Not 28(3) 69ndash95Lloyd J W (1984) Foundations of logic programming Springer-Verlag New York Inc

New York NY USAWhite G (2004) The Philosophy of Computer Languages in Floridi (2004) chapter 18(22 of 23)

Thanks for your attention

Questions

For proposals ideas amp comments

federicogobbounitoit amp marcobeniniuninsubriait

Download amp share these slides herehttpfedericogobbonameen2013html

CCcopy BYcopy $copy Ccopy Federico Gobbo amp Marco Benini 2013

(23 of 23)

Page 2: The epistemology of programming language paradigms

Modern computing in terms of information hiding

The whole history of modern computing can be seen in terms ofinformation hiding (Gobbo and Benini 2013)

in the early days there was only a machine-tailored assemblerletting programmers write one-to-one machine-readableinstructions

then a fundamental LoA was introduced by Backus (1978) duringthe design of Fortran and its implementation via a compiler iethe computer program that translates the source code intomachine code the Backus-Naur Form (BNF) abstracts over thelanguage allowing to compute on its structures

the next LoA in programming has been introduced after Boumlhm andJacopini (1966) a result that permitted to hide the way themachine interprets the flow of control and to change it tosomething which can be easily analysed mathematically

(2 of 23)

Modern computing in terms of information hiding

The whole history of modern computing can be seen in terms ofinformation hiding (Gobbo and Benini 2013)

in the early days there was only a machine-tailored assemblerletting programmers write one-to-one machine-readableinstructions

then a fundamental LoA was introduced by Backus (1978) duringthe design of Fortran and its implementation via a compiler iethe computer program that translates the source code intomachine code the Backus-Naur Form (BNF) abstracts over thelanguage allowing to compute on its structures

the next LoA in programming has been introduced after Boumlhm andJacopini (1966) a result that permitted to hide the way themachine interprets the flow of control and to change it tosomething which can be easily analysed mathematically

(2 of 23)

Modern computing in terms of information hiding

The whole history of modern computing can be seen in terms ofinformation hiding (Gobbo and Benini 2013)

in the early days there was only a machine-tailored assemblerletting programmers write one-to-one machine-readableinstructions

then a fundamental LoA was introduced by Backus (1978) duringthe design of Fortran and its implementation via a compiler iethe computer program that translates the source code intomachine code the Backus-Naur Form (BNF) abstracts over thelanguage allowing to compute on its structures

the next LoA in programming has been introduced after Boumlhm andJacopini (1966) a result that permitted to hide the way themachine interprets the flow of control and to change it tosomething which can be easily analysed mathematically

(2 of 23)

The early days of Structured Programming

In the end of the 1960s it became evident that computerprogramming ought to be more solid both theoretically andpractically In particular

the structured program theorem by Boumlhm and Jacopini (1966) the jrsquoaccuse against the goto statement by Dijkstra (1968) in 1968 the NATO Science Committee introduced the concept oflsquosoftware engineeringrsquo

in 1968 an IFIP Working Group on lsquoProgramming Methodologyrsquowas established

(3 of 23)

Why Structured Programming

Software projects were becoming more complex involving anincreasing number of programmers as for instance the IBMSystem360 family and in particular the OS360 (Brooks 1995)

[IBM] did not like the popularity of my text it stole the termldquoStructured Programmingrdquo and under its auspices Harlan DMills trivialized the original concept to the abolishment of thegoto statement mdash Dijkstra (2001)

Structured Programming permitted to cope with this complexityessentially through best practices and new ad-hoc programminglanguages (Ceruzzi 2003) Here we will analyse the latter

(4 of 23)

Programmers and their view of the machine

From the point of view of a programmer a program is the result of awork whose aim is to instruct a (given) machine to solve a givenproblem

Usually the machine is not just a piece of hardware but is alsoconsidered as an abstract machine possibly equipped with anoperative system and a number of services like a database graphicaluser interface networking etc

(5 of 23)

How programmers choose a programming language

To simplify terminology we will use the term solution to identify theresult of executing a program and we will reserve the term algorithmto identify what has to be coded as a program in a programminglanguage

The choice of the programming language defines how the way toachieve the solution is described to the machine In this respect themany different programming languages have been justified because oftheir ability to express the various problems and the ways to solvethem

(6 of 23)

The Method of Levels of Abstraction

The method of LoAs (Floridi 2008) can be used to describeprogramming in terms of informational organisms (inforgs)

1 the programmer is the informational agent2 the machine is the artificial artifact mdash where the Levels of

Organisation (LoOs) ie the apparatuses can be identified

A software project is an infosphere including processes and mutualrelations among the inforgs directed to the same goal

(7 of 23)

Machine solution program

From the point of view of the programmer the machine is describedby MO a LoO which specifies what can be inspected of the machineand MA a LoA that provides the description of how observables inMO are organised and what instructions can be used to manipulatethem

Similarly the solution of the problem is ultimately specified by a pairSA SO a (partial) LoA and the corresponding (partial) LoO whichshould become (part of) PA and PO the LoA and the LoO of theprogram to be constructed

(8 of 23)

The program in terms of Levels of abstraction

When the program will be completed the pair formed by PO and PAwill be a new abstract machine that can be used to calculate thesolution of the original problem mdash the purpose of the programmingactivity

The algorithm the programmer has to devise is the mapping betweenthe level of abstraction P and the level M which must become anobservable of M in the form of an executable program

The presence of a mapping is what distiguishescomputational-inforgs in these inforgs it is essential that theartifact is computational ie it is able to execute a coded algorithm

(9 of 23)

Programming as the creation of a c-inforg

It is worth remarking that in a sense the act of programming createsa new computational inforg from an existing one from the pairmachine + programmer the pair abstract machine + user arisesthanks to the programmerrsquos activity

If the above cited mapping would be absent the user would be unableto use the machine to solve the problem thus failing to fulfill thepurpose of programming

(10 of 23)

Why levels of explanations

The choice of the programming language determines theepistemological approach sustaining the programmersrsquo goals whichis identified as a Level of Explanation (LoE) by Floridi (2008)

Unlike LoAs and LoOs LoEs do not really pertain to the systemrather they are an epistemological lens through which theinformational agent(s) approaches the goal of programming

(11 of 23)

The epistemological priority of LoEs

As an example modular arithmetic is a LoE a machine-levelprogrammer adopts to explain what some instructions of the centralprocessing unit

It is worth noticing how some LoE of the would-be program areknown in advance to the programmer in fact the purpose theprogram is written for is well-known to the programmer and thisforms a LoE for the program even before it exists as a LoALoO pair

Thus the LoE adopted by the programmer has an epistemologicalpriority on the LoALoO pair

(12 of 23)

A taxonomy of programming languages

Paraphrasing the three-layered description of programming byHofstadter (1979) the source code is the novel the programmer is the novelist the programming language is the literary genre of the novelTo these levels we can add the executable code is the book the machine is the narratorWe can classify programming languages in various way applying themethod of LoAs we can find only three major paradigms accordingto the kind of information got hidden

(13 of 23)

1 The procedural paradigm

Mainly because of the historical development of computationalmachineries current computers can be seen as structures of vonNeumann machines (Gobbo and Benini 2013)

This class of languages abstracts over the structure of von Neumannmachines by allowing more data types than just computationalnumbers and by allowing more or different instructions than those bythe bare machine

(14 of 23)

The machine in the procedural paradigm

The essential structure of the von Neumann machine is retained anengine operating on a memory via a set of instructions from a fixedset the code is organised as a sequence of elementary instructionseach one modifying the state of the machine mdash the next instructionto execute chosen according to the state

most programming languages allow programs to perform actionsthat change the values of variables or which have otherirreversible effects (input or output for example) we say thatthese actions have side-effect mdash White (2004) in Floridi (2004)

(15 of 23)

2 The declarative paradigm

Historically the von Neumann machine was nothing but one of thepossible models of computation introduced in the beginning of thelast century Other models like Churchrsquos λ-calculus Herbranduniverses stable models etc where proposed and studied To someextent the actual evolutions of these systems are much closer tointeresting problems ie they allow to describe the problem almostdirectly in the terms of their language

Moreover these systems have an instrinsic computational meaningwhich amounts to say that the very description of the problem hidesin itself the algorithm to solve it The programming languages basedon these systems are called declarative

(16 of 23)

The machine in the declarative paradigm

This class of programming languages comprising logical languages asProlog or Answer Set Programming but also the functional languagesas ML or Haskell abstracts over the very structure of the vonNeumann machine

In fact each language in this class provides an abstract machineoperating on a different computational model perfectly described inmathematical terms ndash sometimes before von Neumannrsquos Theprogramming language contains some sort of simulator to enable theexecution of the code on a standard von Neumann architecture

(17 of 23)

3 The object-oriented paradigm

Another approach is by the introduction of the concept of objectwhich is conceived originally on a different LoE philosophically basedon Leibnizrsquos monads and the subsequent adapted notions of 20thcentury physics and biology (Kay 1993)

In fact the object-oriented paradigm abstracts over the organisationof memory and state of a von Neumann architecture by putting alayered structure of abstractions over them

(18 of 23)

The machine in the object-oriented paradigm

One can consider each object-oriented class as a LoA over thememorystate of the hosting machine which is equipped with aninternal map (its implementation) and an external interface (itsLoALoO pair)

These classes are in turn the building blocks for further levels ofabstractions whose aim is to construct the PAPO pair ie the levelsof abstraction the program has to provide to fulfill its goal

(19 of 23)

The relations between the three paradigms

It should be clear that the object-oriented paradigm is orthogonalto the declarative paradigm in fact nothing prevents fromintroducing layers of abstractions over a basically differentorganisation of memory like the database of clauses in Prolog or theheap of functions in Standard ML And of course this has alreadybeen done in many different ways

Also these paradigms can realised in a different degree by a languagefor example in LISP the grandfather of functional languages there isan implicit state while in most modern functional languages thestate is explicit and very limited

(20 of 23)

Observations

Thus the gradients of applications of the previously exposedparadigms allow to naturally place each existing programminglanguage in a multi-dimensional space The fact that thesegradients are not necessarily of a quantitative nature is the deepreason why philosophy and not engineering is the right disciplinewherein to analyse the principles of programming

When dealing with really complex problems which happens in mostcontemporary software design rarely a single language has the rightfeatures to model the whole problem

Probably the universal language is an unreachable dream ashidingshowing some features is essential to solve specific problemsmdash and what to hide in a problem is exactly what one wish to exposein another one

(21 of 23)

Essential References

Backus J (1978) lsquoThe history of FORTRAN I II and IIIrsquo SIGPLAN Not13(8) 165ndash180

Boumlhm C and Jacopini G (1966) lsquoFlow diagrams turing machines and languages withonly two formation rulesrsquo Communications of the ACM 9(5) 366ndash371

Brooks Jr F P (1995) The mythical man-month (anniversary ed) Addison-WesleyLongman Publishing Co Inc Boston MA USA

Ceruzzi P (2003) A history of modern computing History of computing MIT PressDijkstra E W (1968) lsquoLetters to the editor go to statement considered harmfulrsquo

Commun ACM 11(3) 147ndash148Dijkstra E W (2001) What led to notes on structured programming circulated

privatelyFloridi L (2008) lsquoThe method of levels of abstractionrsquo Minds Mach 18 303ndash329Floridi L ed (2004) The Blackwell guide to the philosophy of computing and

information Blackwell LondonGobbo F and Benini M (2013) lsquoFrom ancient to modern computing A history of

information hidingrsquo IEEE Annals of the History of Computing 99(PrePrints)Hofstadter D R (1979) Goumldel Escher Bach An Eternal Golden Braid Basic Books

New YorkKay A C (1993) lsquoThe early history of smalltalkrsquo SIGPLAN Not 28(3) 69ndash95Lloyd J W (1984) Foundations of logic programming Springer-Verlag New York Inc

New York NY USAWhite G (2004) The Philosophy of Computer Languages in Floridi (2004) chapter 18(22 of 23)

Thanks for your attention

Questions

For proposals ideas amp comments

federicogobbounitoit amp marcobeniniuninsubriait

Download amp share these slides herehttpfedericogobbonameen2013html

CCcopy BYcopy $copy Ccopy Federico Gobbo amp Marco Benini 2013

(23 of 23)

Page 3: The epistemology of programming language paradigms

Modern computing in terms of information hiding

The whole history of modern computing can be seen in terms ofinformation hiding (Gobbo and Benini 2013)

in the early days there was only a machine-tailored assemblerletting programmers write one-to-one machine-readableinstructions

then a fundamental LoA was introduced by Backus (1978) duringthe design of Fortran and its implementation via a compiler iethe computer program that translates the source code intomachine code the Backus-Naur Form (BNF) abstracts over thelanguage allowing to compute on its structures

the next LoA in programming has been introduced after Boumlhm andJacopini (1966) a result that permitted to hide the way themachine interprets the flow of control and to change it tosomething which can be easily analysed mathematically

(2 of 23)

Modern computing in terms of information hiding

The whole history of modern computing can be seen in terms ofinformation hiding (Gobbo and Benini 2013)

in the early days there was only a machine-tailored assemblerletting programmers write one-to-one machine-readableinstructions

then a fundamental LoA was introduced by Backus (1978) duringthe design of Fortran and its implementation via a compiler iethe computer program that translates the source code intomachine code the Backus-Naur Form (BNF) abstracts over thelanguage allowing to compute on its structures

the next LoA in programming has been introduced after Boumlhm andJacopini (1966) a result that permitted to hide the way themachine interprets the flow of control and to change it tosomething which can be easily analysed mathematically

(2 of 23)

The early days of Structured Programming

In the end of the 1960s it became evident that computerprogramming ought to be more solid both theoretically andpractically In particular

the structured program theorem by Boumlhm and Jacopini (1966) the jrsquoaccuse against the goto statement by Dijkstra (1968) in 1968 the NATO Science Committee introduced the concept oflsquosoftware engineeringrsquo

in 1968 an IFIP Working Group on lsquoProgramming Methodologyrsquowas established

(3 of 23)

Why Structured Programming

Software projects were becoming more complex involving anincreasing number of programmers as for instance the IBMSystem360 family and in particular the OS360 (Brooks 1995)

[IBM] did not like the popularity of my text it stole the termldquoStructured Programmingrdquo and under its auspices Harlan DMills trivialized the original concept to the abolishment of thegoto statement mdash Dijkstra (2001)

Structured Programming permitted to cope with this complexityessentially through best practices and new ad-hoc programminglanguages (Ceruzzi 2003) Here we will analyse the latter

(4 of 23)

Programmers and their view of the machine

From the point of view of a programmer a program is the result of awork whose aim is to instruct a (given) machine to solve a givenproblem

Usually the machine is not just a piece of hardware but is alsoconsidered as an abstract machine possibly equipped with anoperative system and a number of services like a database graphicaluser interface networking etc

(5 of 23)

How programmers choose a programming language

To simplify terminology we will use the term solution to identify theresult of executing a program and we will reserve the term algorithmto identify what has to be coded as a program in a programminglanguage

The choice of the programming language defines how the way toachieve the solution is described to the machine In this respect themany different programming languages have been justified because oftheir ability to express the various problems and the ways to solvethem

(6 of 23)

The Method of Levels of Abstraction

The method of LoAs (Floridi 2008) can be used to describeprogramming in terms of informational organisms (inforgs)

1 the programmer is the informational agent2 the machine is the artificial artifact mdash where the Levels of

Organisation (LoOs) ie the apparatuses can be identified

A software project is an infosphere including processes and mutualrelations among the inforgs directed to the same goal

(7 of 23)

Machine solution program

From the point of view of the programmer the machine is describedby MO a LoO which specifies what can be inspected of the machineand MA a LoA that provides the description of how observables inMO are organised and what instructions can be used to manipulatethem

Similarly the solution of the problem is ultimately specified by a pairSA SO a (partial) LoA and the corresponding (partial) LoO whichshould become (part of) PA and PO the LoA and the LoO of theprogram to be constructed

(8 of 23)

The program in terms of Levels of abstraction

When the program will be completed the pair formed by PO and PAwill be a new abstract machine that can be used to calculate thesolution of the original problem mdash the purpose of the programmingactivity

The algorithm the programmer has to devise is the mapping betweenthe level of abstraction P and the level M which must become anobservable of M in the form of an executable program

The presence of a mapping is what distiguishescomputational-inforgs in these inforgs it is essential that theartifact is computational ie it is able to execute a coded algorithm

(9 of 23)

Programming as the creation of a c-inforg

It is worth remarking that in a sense the act of programming createsa new computational inforg from an existing one from the pairmachine + programmer the pair abstract machine + user arisesthanks to the programmerrsquos activity

If the above cited mapping would be absent the user would be unableto use the machine to solve the problem thus failing to fulfill thepurpose of programming

(10 of 23)

Why levels of explanations

The choice of the programming language determines theepistemological approach sustaining the programmersrsquo goals whichis identified as a Level of Explanation (LoE) by Floridi (2008)

Unlike LoAs and LoOs LoEs do not really pertain to the systemrather they are an epistemological lens through which theinformational agent(s) approaches the goal of programming

(11 of 23)

The epistemological priority of LoEs

As an example modular arithmetic is a LoE a machine-levelprogrammer adopts to explain what some instructions of the centralprocessing unit

It is worth noticing how some LoE of the would-be program areknown in advance to the programmer in fact the purpose theprogram is written for is well-known to the programmer and thisforms a LoE for the program even before it exists as a LoALoO pair

Thus the LoE adopted by the programmer has an epistemologicalpriority on the LoALoO pair

(12 of 23)

A taxonomy of programming languages

Paraphrasing the three-layered description of programming byHofstadter (1979) the source code is the novel the programmer is the novelist the programming language is the literary genre of the novelTo these levels we can add the executable code is the book the machine is the narratorWe can classify programming languages in various way applying themethod of LoAs we can find only three major paradigms accordingto the kind of information got hidden

(13 of 23)

1 The procedural paradigm

Mainly because of the historical development of computationalmachineries current computers can be seen as structures of vonNeumann machines (Gobbo and Benini 2013)

This class of languages abstracts over the structure of von Neumannmachines by allowing more data types than just computationalnumbers and by allowing more or different instructions than those bythe bare machine

(14 of 23)

The machine in the procedural paradigm

The essential structure of the von Neumann machine is retained anengine operating on a memory via a set of instructions from a fixedset the code is organised as a sequence of elementary instructionseach one modifying the state of the machine mdash the next instructionto execute chosen according to the state

most programming languages allow programs to perform actionsthat change the values of variables or which have otherirreversible effects (input or output for example) we say thatthese actions have side-effect mdash White (2004) in Floridi (2004)

(15 of 23)

2 The declarative paradigm

Historically the von Neumann machine was nothing but one of thepossible models of computation introduced in the beginning of thelast century Other models like Churchrsquos λ-calculus Herbranduniverses stable models etc where proposed and studied To someextent the actual evolutions of these systems are much closer tointeresting problems ie they allow to describe the problem almostdirectly in the terms of their language

Moreover these systems have an instrinsic computational meaningwhich amounts to say that the very description of the problem hidesin itself the algorithm to solve it The programming languages basedon these systems are called declarative

(16 of 23)

The machine in the declarative paradigm

This class of programming languages comprising logical languages asProlog or Answer Set Programming but also the functional languagesas ML or Haskell abstracts over the very structure of the vonNeumann machine

In fact each language in this class provides an abstract machineoperating on a different computational model perfectly described inmathematical terms ndash sometimes before von Neumannrsquos Theprogramming language contains some sort of simulator to enable theexecution of the code on a standard von Neumann architecture

(17 of 23)

3 The object-oriented paradigm

Another approach is by the introduction of the concept of objectwhich is conceived originally on a different LoE philosophically basedon Leibnizrsquos monads and the subsequent adapted notions of 20thcentury physics and biology (Kay 1993)

In fact the object-oriented paradigm abstracts over the organisationof memory and state of a von Neumann architecture by putting alayered structure of abstractions over them

(18 of 23)

The machine in the object-oriented paradigm

One can consider each object-oriented class as a LoA over thememorystate of the hosting machine which is equipped with aninternal map (its implementation) and an external interface (itsLoALoO pair)

These classes are in turn the building blocks for further levels ofabstractions whose aim is to construct the PAPO pair ie the levelsof abstraction the program has to provide to fulfill its goal

(19 of 23)

The relations between the three paradigms

It should be clear that the object-oriented paradigm is orthogonalto the declarative paradigm in fact nothing prevents fromintroducing layers of abstractions over a basically differentorganisation of memory like the database of clauses in Prolog or theheap of functions in Standard ML And of course this has alreadybeen done in many different ways

Also these paradigms can realised in a different degree by a languagefor example in LISP the grandfather of functional languages there isan implicit state while in most modern functional languages thestate is explicit and very limited

(20 of 23)

Observations

Thus the gradients of applications of the previously exposedparadigms allow to naturally place each existing programminglanguage in a multi-dimensional space The fact that thesegradients are not necessarily of a quantitative nature is the deepreason why philosophy and not engineering is the right disciplinewherein to analyse the principles of programming

When dealing with really complex problems which happens in mostcontemporary software design rarely a single language has the rightfeatures to model the whole problem

Probably the universal language is an unreachable dream ashidingshowing some features is essential to solve specific problemsmdash and what to hide in a problem is exactly what one wish to exposein another one

(21 of 23)

Essential References

Backus J (1978) lsquoThe history of FORTRAN I II and IIIrsquo SIGPLAN Not13(8) 165ndash180

Boumlhm C and Jacopini G (1966) lsquoFlow diagrams turing machines and languages withonly two formation rulesrsquo Communications of the ACM 9(5) 366ndash371

Brooks Jr F P (1995) The mythical man-month (anniversary ed) Addison-WesleyLongman Publishing Co Inc Boston MA USA

Ceruzzi P (2003) A history of modern computing History of computing MIT PressDijkstra E W (1968) lsquoLetters to the editor go to statement considered harmfulrsquo

Commun ACM 11(3) 147ndash148Dijkstra E W (2001) What led to notes on structured programming circulated

privatelyFloridi L (2008) lsquoThe method of levels of abstractionrsquo Minds Mach 18 303ndash329Floridi L ed (2004) The Blackwell guide to the philosophy of computing and

information Blackwell LondonGobbo F and Benini M (2013) lsquoFrom ancient to modern computing A history of

information hidingrsquo IEEE Annals of the History of Computing 99(PrePrints)Hofstadter D R (1979) Goumldel Escher Bach An Eternal Golden Braid Basic Books

New YorkKay A C (1993) lsquoThe early history of smalltalkrsquo SIGPLAN Not 28(3) 69ndash95Lloyd J W (1984) Foundations of logic programming Springer-Verlag New York Inc

New York NY USAWhite G (2004) The Philosophy of Computer Languages in Floridi (2004) chapter 18(22 of 23)

Thanks for your attention

Questions

For proposals ideas amp comments

federicogobbounitoit amp marcobeniniuninsubriait

Download amp share these slides herehttpfedericogobbonameen2013html

CCcopy BYcopy $copy Ccopy Federico Gobbo amp Marco Benini 2013

(23 of 23)

Page 4: The epistemology of programming language paradigms

Modern computing in terms of information hiding

The whole history of modern computing can be seen in terms ofinformation hiding (Gobbo and Benini 2013)

in the early days there was only a machine-tailored assemblerletting programmers write one-to-one machine-readableinstructions

then a fundamental LoA was introduced by Backus (1978) duringthe design of Fortran and its implementation via a compiler iethe computer program that translates the source code intomachine code the Backus-Naur Form (BNF) abstracts over thelanguage allowing to compute on its structures

the next LoA in programming has been introduced after Boumlhm andJacopini (1966) a result that permitted to hide the way themachine interprets the flow of control and to change it tosomething which can be easily analysed mathematically

(2 of 23)

The early days of Structured Programming

In the end of the 1960s it became evident that computerprogramming ought to be more solid both theoretically andpractically In particular

the structured program theorem by Boumlhm and Jacopini (1966) the jrsquoaccuse against the goto statement by Dijkstra (1968) in 1968 the NATO Science Committee introduced the concept oflsquosoftware engineeringrsquo

in 1968 an IFIP Working Group on lsquoProgramming Methodologyrsquowas established

(3 of 23)

Why Structured Programming

Software projects were becoming more complex involving anincreasing number of programmers as for instance the IBMSystem360 family and in particular the OS360 (Brooks 1995)

[IBM] did not like the popularity of my text it stole the termldquoStructured Programmingrdquo and under its auspices Harlan DMills trivialized the original concept to the abolishment of thegoto statement mdash Dijkstra (2001)

Structured Programming permitted to cope with this complexityessentially through best practices and new ad-hoc programminglanguages (Ceruzzi 2003) Here we will analyse the latter

(4 of 23)

Programmers and their view of the machine

From the point of view of a programmer a program is the result of awork whose aim is to instruct a (given) machine to solve a givenproblem

Usually the machine is not just a piece of hardware but is alsoconsidered as an abstract machine possibly equipped with anoperative system and a number of services like a database graphicaluser interface networking etc

(5 of 23)

How programmers choose a programming language

To simplify terminology we will use the term solution to identify theresult of executing a program and we will reserve the term algorithmto identify what has to be coded as a program in a programminglanguage

The choice of the programming language defines how the way toachieve the solution is described to the machine In this respect themany different programming languages have been justified because oftheir ability to express the various problems and the ways to solvethem

(6 of 23)

The Method of Levels of Abstraction

The method of LoAs (Floridi 2008) can be used to describeprogramming in terms of informational organisms (inforgs)

1 the programmer is the informational agent2 the machine is the artificial artifact mdash where the Levels of

Organisation (LoOs) ie the apparatuses can be identified

A software project is an infosphere including processes and mutualrelations among the inforgs directed to the same goal

(7 of 23)

Machine solution program

From the point of view of the programmer the machine is describedby MO a LoO which specifies what can be inspected of the machineand MA a LoA that provides the description of how observables inMO are organised and what instructions can be used to manipulatethem

Similarly the solution of the problem is ultimately specified by a pairSA SO a (partial) LoA and the corresponding (partial) LoO whichshould become (part of) PA and PO the LoA and the LoO of theprogram to be constructed

(8 of 23)

The program in terms of Levels of abstraction

When the program will be completed the pair formed by PO and PAwill be a new abstract machine that can be used to calculate thesolution of the original problem mdash the purpose of the programmingactivity

The algorithm the programmer has to devise is the mapping betweenthe level of abstraction P and the level M which must become anobservable of M in the form of an executable program

The presence of a mapping is what distiguishescomputational-inforgs in these inforgs it is essential that theartifact is computational ie it is able to execute a coded algorithm

(9 of 23)

Programming as the creation of a c-inforg

It is worth remarking that in a sense the act of programming createsa new computational inforg from an existing one from the pairmachine + programmer the pair abstract machine + user arisesthanks to the programmerrsquos activity

If the above cited mapping would be absent the user would be unableto use the machine to solve the problem thus failing to fulfill thepurpose of programming

(10 of 23)

Why levels of explanations

The choice of the programming language determines theepistemological approach sustaining the programmersrsquo goals whichis identified as a Level of Explanation (LoE) by Floridi (2008)

Unlike LoAs and LoOs LoEs do not really pertain to the systemrather they are an epistemological lens through which theinformational agent(s) approaches the goal of programming

(11 of 23)

The epistemological priority of LoEs

As an example modular arithmetic is a LoE a machine-levelprogrammer adopts to explain what some instructions of the centralprocessing unit

It is worth noticing how some LoE of the would-be program areknown in advance to the programmer in fact the purpose theprogram is written for is well-known to the programmer and thisforms a LoE for the program even before it exists as a LoALoO pair

Thus the LoE adopted by the programmer has an epistemologicalpriority on the LoALoO pair

(12 of 23)

A taxonomy of programming languages

Paraphrasing the three-layered description of programming byHofstadter (1979) the source code is the novel the programmer is the novelist the programming language is the literary genre of the novelTo these levels we can add the executable code is the book the machine is the narratorWe can classify programming languages in various way applying themethod of LoAs we can find only three major paradigms accordingto the kind of information got hidden

(13 of 23)

1 The procedural paradigm

Mainly because of the historical development of computationalmachineries current computers can be seen as structures of vonNeumann machines (Gobbo and Benini 2013)

This class of languages abstracts over the structure of von Neumannmachines by allowing more data types than just computationalnumbers and by allowing more or different instructions than those bythe bare machine

(14 of 23)

The machine in the procedural paradigm

The essential structure of the von Neumann machine is retained anengine operating on a memory via a set of instructions from a fixedset the code is organised as a sequence of elementary instructionseach one modifying the state of the machine mdash the next instructionto execute chosen according to the state

most programming languages allow programs to perform actionsthat change the values of variables or which have otherirreversible effects (input or output for example) we say thatthese actions have side-effect mdash White (2004) in Floridi (2004)

(15 of 23)

2 The declarative paradigm

Historically the von Neumann machine was nothing but one of thepossible models of computation introduced in the beginning of thelast century Other models like Churchrsquos λ-calculus Herbranduniverses stable models etc where proposed and studied To someextent the actual evolutions of these systems are much closer tointeresting problems ie they allow to describe the problem almostdirectly in the terms of their language

Moreover these systems have an instrinsic computational meaningwhich amounts to say that the very description of the problem hidesin itself the algorithm to solve it The programming languages basedon these systems are called declarative

(16 of 23)

The machine in the declarative paradigm

This class of programming languages comprising logical languages asProlog or Answer Set Programming but also the functional languagesas ML or Haskell abstracts over the very structure of the vonNeumann machine

In fact each language in this class provides an abstract machineoperating on a different computational model perfectly described inmathematical terms ndash sometimes before von Neumannrsquos Theprogramming language contains some sort of simulator to enable theexecution of the code on a standard von Neumann architecture

(17 of 23)

3 The object-oriented paradigm

Another approach is by the introduction of the concept of objectwhich is conceived originally on a different LoE philosophically basedon Leibnizrsquos monads and the subsequent adapted notions of 20thcentury physics and biology (Kay 1993)

In fact the object-oriented paradigm abstracts over the organisationof memory and state of a von Neumann architecture by putting alayered structure of abstractions over them

(18 of 23)

The machine in the object-oriented paradigm

One can consider each object-oriented class as a LoA over thememorystate of the hosting machine which is equipped with aninternal map (its implementation) and an external interface (itsLoALoO pair)

These classes are in turn the building blocks for further levels ofabstractions whose aim is to construct the PAPO pair ie the levelsof abstraction the program has to provide to fulfill its goal

(19 of 23)

The relations between the three paradigms

It should be clear that the object-oriented paradigm is orthogonalto the declarative paradigm in fact nothing prevents fromintroducing layers of abstractions over a basically differentorganisation of memory like the database of clauses in Prolog or theheap of functions in Standard ML And of course this has alreadybeen done in many different ways

Also these paradigms can realised in a different degree by a languagefor example in LISP the grandfather of functional languages there isan implicit state while in most modern functional languages thestate is explicit and very limited

(20 of 23)

Observations

Thus the gradients of applications of the previously exposedparadigms allow to naturally place each existing programminglanguage in a multi-dimensional space The fact that thesegradients are not necessarily of a quantitative nature is the deepreason why philosophy and not engineering is the right disciplinewherein to analyse the principles of programming

When dealing with really complex problems which happens in mostcontemporary software design rarely a single language has the rightfeatures to model the whole problem

Probably the universal language is an unreachable dream ashidingshowing some features is essential to solve specific problemsmdash and what to hide in a problem is exactly what one wish to exposein another one

(21 of 23)

Essential References

Backus J (1978) lsquoThe history of FORTRAN I II and IIIrsquo SIGPLAN Not13(8) 165ndash180

Boumlhm C and Jacopini G (1966) lsquoFlow diagrams turing machines and languages withonly two formation rulesrsquo Communications of the ACM 9(5) 366ndash371

Brooks Jr F P (1995) The mythical man-month (anniversary ed) Addison-WesleyLongman Publishing Co Inc Boston MA USA

Ceruzzi P (2003) A history of modern computing History of computing MIT PressDijkstra E W (1968) lsquoLetters to the editor go to statement considered harmfulrsquo

Commun ACM 11(3) 147ndash148Dijkstra E W (2001) What led to notes on structured programming circulated

privatelyFloridi L (2008) lsquoThe method of levels of abstractionrsquo Minds Mach 18 303ndash329Floridi L ed (2004) The Blackwell guide to the philosophy of computing and

information Blackwell LondonGobbo F and Benini M (2013) lsquoFrom ancient to modern computing A history of

information hidingrsquo IEEE Annals of the History of Computing 99(PrePrints)Hofstadter D R (1979) Goumldel Escher Bach An Eternal Golden Braid Basic Books

New YorkKay A C (1993) lsquoThe early history of smalltalkrsquo SIGPLAN Not 28(3) 69ndash95Lloyd J W (1984) Foundations of logic programming Springer-Verlag New York Inc

New York NY USAWhite G (2004) The Philosophy of Computer Languages in Floridi (2004) chapter 18(22 of 23)

Thanks for your attention

Questions

For proposals ideas amp comments

federicogobbounitoit amp marcobeniniuninsubriait

Download amp share these slides herehttpfedericogobbonameen2013html

CCcopy BYcopy $copy Ccopy Federico Gobbo amp Marco Benini 2013

(23 of 23)

Page 5: The epistemology of programming language paradigms

The early days of Structured Programming

In the end of the 1960s it became evident that computerprogramming ought to be more solid both theoretically andpractically In particular

the structured program theorem by Boumlhm and Jacopini (1966) the jrsquoaccuse against the goto statement by Dijkstra (1968) in 1968 the NATO Science Committee introduced the concept oflsquosoftware engineeringrsquo

in 1968 an IFIP Working Group on lsquoProgramming Methodologyrsquowas established

(3 of 23)

Why Structured Programming

Software projects were becoming more complex involving anincreasing number of programmers as for instance the IBMSystem360 family and in particular the OS360 (Brooks 1995)

[IBM] did not like the popularity of my text it stole the termldquoStructured Programmingrdquo and under its auspices Harlan DMills trivialized the original concept to the abolishment of thegoto statement mdash Dijkstra (2001)

Structured Programming permitted to cope with this complexityessentially through best practices and new ad-hoc programminglanguages (Ceruzzi 2003) Here we will analyse the latter

(4 of 23)

Programmers and their view of the machine

From the point of view of a programmer a program is the result of awork whose aim is to instruct a (given) machine to solve a givenproblem

Usually the machine is not just a piece of hardware but is alsoconsidered as an abstract machine possibly equipped with anoperative system and a number of services like a database graphicaluser interface networking etc

(5 of 23)

How programmers choose a programming language

To simplify terminology we will use the term solution to identify theresult of executing a program and we will reserve the term algorithmto identify what has to be coded as a program in a programminglanguage

The choice of the programming language defines how the way toachieve the solution is described to the machine In this respect themany different programming languages have been justified because oftheir ability to express the various problems and the ways to solvethem

(6 of 23)

The Method of Levels of Abstraction

The method of LoAs (Floridi 2008) can be used to describeprogramming in terms of informational organisms (inforgs)

1 the programmer is the informational agent2 the machine is the artificial artifact mdash where the Levels of

Organisation (LoOs) ie the apparatuses can be identified

A software project is an infosphere including processes and mutualrelations among the inforgs directed to the same goal

(7 of 23)

Machine solution program

From the point of view of the programmer the machine is describedby MO a LoO which specifies what can be inspected of the machineand MA a LoA that provides the description of how observables inMO are organised and what instructions can be used to manipulatethem

Similarly the solution of the problem is ultimately specified by a pairSA SO a (partial) LoA and the corresponding (partial) LoO whichshould become (part of) PA and PO the LoA and the LoO of theprogram to be constructed

(8 of 23)

The program in terms of Levels of abstraction

When the program will be completed the pair formed by PO and PAwill be a new abstract machine that can be used to calculate thesolution of the original problem mdash the purpose of the programmingactivity

The algorithm the programmer has to devise is the mapping betweenthe level of abstraction P and the level M which must become anobservable of M in the form of an executable program

The presence of a mapping is what distiguishescomputational-inforgs in these inforgs it is essential that theartifact is computational ie it is able to execute a coded algorithm

(9 of 23)

Programming as the creation of a c-inforg

It is worth remarking that in a sense the act of programming createsa new computational inforg from an existing one from the pairmachine + programmer the pair abstract machine + user arisesthanks to the programmerrsquos activity

If the above cited mapping would be absent the user would be unableto use the machine to solve the problem thus failing to fulfill thepurpose of programming

(10 of 23)

Why levels of explanations

The choice of the programming language determines theepistemological approach sustaining the programmersrsquo goals whichis identified as a Level of Explanation (LoE) by Floridi (2008)

Unlike LoAs and LoOs LoEs do not really pertain to the systemrather they are an epistemological lens through which theinformational agent(s) approaches the goal of programming

(11 of 23)

The epistemological priority of LoEs

As an example modular arithmetic is a LoE a machine-levelprogrammer adopts to explain what some instructions of the centralprocessing unit

It is worth noticing how some LoE of the would-be program areknown in advance to the programmer in fact the purpose theprogram is written for is well-known to the programmer and thisforms a LoE for the program even before it exists as a LoALoO pair

Thus the LoE adopted by the programmer has an epistemologicalpriority on the LoALoO pair

(12 of 23)

A taxonomy of programming languages

Paraphrasing the three-layered description of programming byHofstadter (1979) the source code is the novel the programmer is the novelist the programming language is the literary genre of the novelTo these levels we can add the executable code is the book the machine is the narratorWe can classify programming languages in various way applying themethod of LoAs we can find only three major paradigms accordingto the kind of information got hidden

(13 of 23)

1 The procedural paradigm

Mainly because of the historical development of computationalmachineries current computers can be seen as structures of vonNeumann machines (Gobbo and Benini 2013)

This class of languages abstracts over the structure of von Neumannmachines by allowing more data types than just computationalnumbers and by allowing more or different instructions than those bythe bare machine

(14 of 23)

The machine in the procedural paradigm

The essential structure of the von Neumann machine is retained anengine operating on a memory via a set of instructions from a fixedset the code is organised as a sequence of elementary instructionseach one modifying the state of the machine mdash the next instructionto execute chosen according to the state

most programming languages allow programs to perform actionsthat change the values of variables or which have otherirreversible effects (input or output for example) we say thatthese actions have side-effect mdash White (2004) in Floridi (2004)

(15 of 23)

2 The declarative paradigm

Historically the von Neumann machine was nothing but one of thepossible models of computation introduced in the beginning of thelast century Other models like Churchrsquos λ-calculus Herbranduniverses stable models etc where proposed and studied To someextent the actual evolutions of these systems are much closer tointeresting problems ie they allow to describe the problem almostdirectly in the terms of their language

Moreover these systems have an instrinsic computational meaningwhich amounts to say that the very description of the problem hidesin itself the algorithm to solve it The programming languages basedon these systems are called declarative

(16 of 23)

The machine in the declarative paradigm

This class of programming languages comprising logical languages asProlog or Answer Set Programming but also the functional languagesas ML or Haskell abstracts over the very structure of the vonNeumann machine

In fact each language in this class provides an abstract machineoperating on a different computational model perfectly described inmathematical terms ndash sometimes before von Neumannrsquos Theprogramming language contains some sort of simulator to enable theexecution of the code on a standard von Neumann architecture

(17 of 23)

3 The object-oriented paradigm

Another approach is by the introduction of the concept of objectwhich is conceived originally on a different LoE philosophically basedon Leibnizrsquos monads and the subsequent adapted notions of 20thcentury physics and biology (Kay 1993)

In fact the object-oriented paradigm abstracts over the organisationof memory and state of a von Neumann architecture by putting alayered structure of abstractions over them

(18 of 23)

The machine in the object-oriented paradigm

One can consider each object-oriented class as a LoA over thememorystate of the hosting machine which is equipped with aninternal map (its implementation) and an external interface (itsLoALoO pair)

These classes are in turn the building blocks for further levels ofabstractions whose aim is to construct the PAPO pair ie the levelsof abstraction the program has to provide to fulfill its goal

(19 of 23)

The relations between the three paradigms

It should be clear that the object-oriented paradigm is orthogonalto the declarative paradigm in fact nothing prevents fromintroducing layers of abstractions over a basically differentorganisation of memory like the database of clauses in Prolog or theheap of functions in Standard ML And of course this has alreadybeen done in many different ways

Also these paradigms can realised in a different degree by a languagefor example in LISP the grandfather of functional languages there isan implicit state while in most modern functional languages thestate is explicit and very limited

(20 of 23)

Observations

Thus the gradients of applications of the previously exposedparadigms allow to naturally place each existing programminglanguage in a multi-dimensional space The fact that thesegradients are not necessarily of a quantitative nature is the deepreason why philosophy and not engineering is the right disciplinewherein to analyse the principles of programming

When dealing with really complex problems which happens in mostcontemporary software design rarely a single language has the rightfeatures to model the whole problem

Probably the universal language is an unreachable dream ashidingshowing some features is essential to solve specific problemsmdash and what to hide in a problem is exactly what one wish to exposein another one

(21 of 23)

Essential References

Backus J (1978) lsquoThe history of FORTRAN I II and IIIrsquo SIGPLAN Not13(8) 165ndash180

Boumlhm C and Jacopini G (1966) lsquoFlow diagrams turing machines and languages withonly two formation rulesrsquo Communications of the ACM 9(5) 366ndash371

Brooks Jr F P (1995) The mythical man-month (anniversary ed) Addison-WesleyLongman Publishing Co Inc Boston MA USA

Ceruzzi P (2003) A history of modern computing History of computing MIT PressDijkstra E W (1968) lsquoLetters to the editor go to statement considered harmfulrsquo

Commun ACM 11(3) 147ndash148Dijkstra E W (2001) What led to notes on structured programming circulated

privatelyFloridi L (2008) lsquoThe method of levels of abstractionrsquo Minds Mach 18 303ndash329Floridi L ed (2004) The Blackwell guide to the philosophy of computing and

information Blackwell LondonGobbo F and Benini M (2013) lsquoFrom ancient to modern computing A history of

information hidingrsquo IEEE Annals of the History of Computing 99(PrePrints)Hofstadter D R (1979) Goumldel Escher Bach An Eternal Golden Braid Basic Books

New YorkKay A C (1993) lsquoThe early history of smalltalkrsquo SIGPLAN Not 28(3) 69ndash95Lloyd J W (1984) Foundations of logic programming Springer-Verlag New York Inc

New York NY USAWhite G (2004) The Philosophy of Computer Languages in Floridi (2004) chapter 18(22 of 23)

Thanks for your attention

Questions

For proposals ideas amp comments

federicogobbounitoit amp marcobeniniuninsubriait

Download amp share these slides herehttpfedericogobbonameen2013html

CCcopy BYcopy $copy Ccopy Federico Gobbo amp Marco Benini 2013

(23 of 23)

Page 6: The epistemology of programming language paradigms

Why Structured Programming

Software projects were becoming more complex involving anincreasing number of programmers as for instance the IBMSystem360 family and in particular the OS360 (Brooks 1995)

[IBM] did not like the popularity of my text it stole the termldquoStructured Programmingrdquo and under its auspices Harlan DMills trivialized the original concept to the abolishment of thegoto statement mdash Dijkstra (2001)

Structured Programming permitted to cope with this complexityessentially through best practices and new ad-hoc programminglanguages (Ceruzzi 2003) Here we will analyse the latter

(4 of 23)

Programmers and their view of the machine

From the point of view of a programmer a program is the result of awork whose aim is to instruct a (given) machine to solve a givenproblem

Usually the machine is not just a piece of hardware but is alsoconsidered as an abstract machine possibly equipped with anoperative system and a number of services like a database graphicaluser interface networking etc

(5 of 23)

How programmers choose a programming language

To simplify terminology we will use the term solution to identify theresult of executing a program and we will reserve the term algorithmto identify what has to be coded as a program in a programminglanguage

The choice of the programming language defines how the way toachieve the solution is described to the machine In this respect themany different programming languages have been justified because oftheir ability to express the various problems and the ways to solvethem

(6 of 23)

The Method of Levels of Abstraction

The method of LoAs (Floridi 2008) can be used to describeprogramming in terms of informational organisms (inforgs)

1 the programmer is the informational agent2 the machine is the artificial artifact mdash where the Levels of

Organisation (LoOs) ie the apparatuses can be identified

A software project is an infosphere including processes and mutualrelations among the inforgs directed to the same goal

(7 of 23)

Machine solution program

From the point of view of the programmer the machine is describedby MO a LoO which specifies what can be inspected of the machineand MA a LoA that provides the description of how observables inMO are organised and what instructions can be used to manipulatethem

Similarly the solution of the problem is ultimately specified by a pairSA SO a (partial) LoA and the corresponding (partial) LoO whichshould become (part of) PA and PO the LoA and the LoO of theprogram to be constructed

(8 of 23)

The program in terms of Levels of abstraction

When the program will be completed the pair formed by PO and PAwill be a new abstract machine that can be used to calculate thesolution of the original problem mdash the purpose of the programmingactivity

The algorithm the programmer has to devise is the mapping betweenthe level of abstraction P and the level M which must become anobservable of M in the form of an executable program

The presence of a mapping is what distiguishescomputational-inforgs in these inforgs it is essential that theartifact is computational ie it is able to execute a coded algorithm

(9 of 23)

Programming as the creation of a c-inforg

It is worth remarking that in a sense the act of programming createsa new computational inforg from an existing one from the pairmachine + programmer the pair abstract machine + user arisesthanks to the programmerrsquos activity

If the above cited mapping would be absent the user would be unableto use the machine to solve the problem thus failing to fulfill thepurpose of programming

(10 of 23)

Why levels of explanations

The choice of the programming language determines theepistemological approach sustaining the programmersrsquo goals whichis identified as a Level of Explanation (LoE) by Floridi (2008)

Unlike LoAs and LoOs LoEs do not really pertain to the systemrather they are an epistemological lens through which theinformational agent(s) approaches the goal of programming

(11 of 23)

The epistemological priority of LoEs

As an example modular arithmetic is a LoE a machine-levelprogrammer adopts to explain what some instructions of the centralprocessing unit

It is worth noticing how some LoE of the would-be program areknown in advance to the programmer in fact the purpose theprogram is written for is well-known to the programmer and thisforms a LoE for the program even before it exists as a LoALoO pair

Thus the LoE adopted by the programmer has an epistemologicalpriority on the LoALoO pair

(12 of 23)

A taxonomy of programming languages

Paraphrasing the three-layered description of programming byHofstadter (1979) the source code is the novel the programmer is the novelist the programming language is the literary genre of the novelTo these levels we can add the executable code is the book the machine is the narratorWe can classify programming languages in various way applying themethod of LoAs we can find only three major paradigms accordingto the kind of information got hidden

(13 of 23)

1 The procedural paradigm

Mainly because of the historical development of computationalmachineries current computers can be seen as structures of vonNeumann machines (Gobbo and Benini 2013)

This class of languages abstracts over the structure of von Neumannmachines by allowing more data types than just computationalnumbers and by allowing more or different instructions than those bythe bare machine

(14 of 23)

The machine in the procedural paradigm

The essential structure of the von Neumann machine is retained anengine operating on a memory via a set of instructions from a fixedset the code is organised as a sequence of elementary instructionseach one modifying the state of the machine mdash the next instructionto execute chosen according to the state

most programming languages allow programs to perform actionsthat change the values of variables or which have otherirreversible effects (input or output for example) we say thatthese actions have side-effect mdash White (2004) in Floridi (2004)

(15 of 23)

2 The declarative paradigm

Historically the von Neumann machine was nothing but one of thepossible models of computation introduced in the beginning of thelast century Other models like Churchrsquos λ-calculus Herbranduniverses stable models etc where proposed and studied To someextent the actual evolutions of these systems are much closer tointeresting problems ie they allow to describe the problem almostdirectly in the terms of their language

Moreover these systems have an instrinsic computational meaningwhich amounts to say that the very description of the problem hidesin itself the algorithm to solve it The programming languages basedon these systems are called declarative

(16 of 23)

The machine in the declarative paradigm

This class of programming languages comprising logical languages asProlog or Answer Set Programming but also the functional languagesas ML or Haskell abstracts over the very structure of the vonNeumann machine

In fact each language in this class provides an abstract machineoperating on a different computational model perfectly described inmathematical terms ndash sometimes before von Neumannrsquos Theprogramming language contains some sort of simulator to enable theexecution of the code on a standard von Neumann architecture

(17 of 23)

3 The object-oriented paradigm

Another approach is by the introduction of the concept of objectwhich is conceived originally on a different LoE philosophically basedon Leibnizrsquos monads and the subsequent adapted notions of 20thcentury physics and biology (Kay 1993)

In fact the object-oriented paradigm abstracts over the organisationof memory and state of a von Neumann architecture by putting alayered structure of abstractions over them

(18 of 23)

The machine in the object-oriented paradigm

One can consider each object-oriented class as a LoA over thememorystate of the hosting machine which is equipped with aninternal map (its implementation) and an external interface (itsLoALoO pair)

These classes are in turn the building blocks for further levels ofabstractions whose aim is to construct the PAPO pair ie the levelsof abstraction the program has to provide to fulfill its goal

(19 of 23)

The relations between the three paradigms

It should be clear that the object-oriented paradigm is orthogonalto the declarative paradigm in fact nothing prevents fromintroducing layers of abstractions over a basically differentorganisation of memory like the database of clauses in Prolog or theheap of functions in Standard ML And of course this has alreadybeen done in many different ways

Also these paradigms can realised in a different degree by a languagefor example in LISP the grandfather of functional languages there isan implicit state while in most modern functional languages thestate is explicit and very limited

(20 of 23)

Observations

Thus the gradients of applications of the previously exposedparadigms allow to naturally place each existing programminglanguage in a multi-dimensional space The fact that thesegradients are not necessarily of a quantitative nature is the deepreason why philosophy and not engineering is the right disciplinewherein to analyse the principles of programming

When dealing with really complex problems which happens in mostcontemporary software design rarely a single language has the rightfeatures to model the whole problem

Probably the universal language is an unreachable dream ashidingshowing some features is essential to solve specific problemsmdash and what to hide in a problem is exactly what one wish to exposein another one

(21 of 23)

Essential References

Backus J (1978) lsquoThe history of FORTRAN I II and IIIrsquo SIGPLAN Not13(8) 165ndash180

Boumlhm C and Jacopini G (1966) lsquoFlow diagrams turing machines and languages withonly two formation rulesrsquo Communications of the ACM 9(5) 366ndash371

Brooks Jr F P (1995) The mythical man-month (anniversary ed) Addison-WesleyLongman Publishing Co Inc Boston MA USA

Ceruzzi P (2003) A history of modern computing History of computing MIT PressDijkstra E W (1968) lsquoLetters to the editor go to statement considered harmfulrsquo

Commun ACM 11(3) 147ndash148Dijkstra E W (2001) What led to notes on structured programming circulated

privatelyFloridi L (2008) lsquoThe method of levels of abstractionrsquo Minds Mach 18 303ndash329Floridi L ed (2004) The Blackwell guide to the philosophy of computing and

information Blackwell LondonGobbo F and Benini M (2013) lsquoFrom ancient to modern computing A history of

information hidingrsquo IEEE Annals of the History of Computing 99(PrePrints)Hofstadter D R (1979) Goumldel Escher Bach An Eternal Golden Braid Basic Books

New YorkKay A C (1993) lsquoThe early history of smalltalkrsquo SIGPLAN Not 28(3) 69ndash95Lloyd J W (1984) Foundations of logic programming Springer-Verlag New York Inc

New York NY USAWhite G (2004) The Philosophy of Computer Languages in Floridi (2004) chapter 18(22 of 23)

Thanks for your attention

Questions

For proposals ideas amp comments

federicogobbounitoit amp marcobeniniuninsubriait

Download amp share these slides herehttpfedericogobbonameen2013html

CCcopy BYcopy $copy Ccopy Federico Gobbo amp Marco Benini 2013

(23 of 23)

Page 7: The epistemology of programming language paradigms

Programmers and their view of the machine

From the point of view of a programmer a program is the result of awork whose aim is to instruct a (given) machine to solve a givenproblem

Usually the machine is not just a piece of hardware but is alsoconsidered as an abstract machine possibly equipped with anoperative system and a number of services like a database graphicaluser interface networking etc

(5 of 23)

How programmers choose a programming language

To simplify terminology we will use the term solution to identify theresult of executing a program and we will reserve the term algorithmto identify what has to be coded as a program in a programminglanguage

The choice of the programming language defines how the way toachieve the solution is described to the machine In this respect themany different programming languages have been justified because oftheir ability to express the various problems and the ways to solvethem

(6 of 23)

The Method of Levels of Abstraction

The method of LoAs (Floridi 2008) can be used to describeprogramming in terms of informational organisms (inforgs)

1 the programmer is the informational agent2 the machine is the artificial artifact mdash where the Levels of

Organisation (LoOs) ie the apparatuses can be identified

A software project is an infosphere including processes and mutualrelations among the inforgs directed to the same goal

(7 of 23)

Machine solution program

From the point of view of the programmer the machine is describedby MO a LoO which specifies what can be inspected of the machineand MA a LoA that provides the description of how observables inMO are organised and what instructions can be used to manipulatethem

Similarly the solution of the problem is ultimately specified by a pairSA SO a (partial) LoA and the corresponding (partial) LoO whichshould become (part of) PA and PO the LoA and the LoO of theprogram to be constructed

(8 of 23)

The program in terms of Levels of abstraction

When the program will be completed the pair formed by PO and PAwill be a new abstract machine that can be used to calculate thesolution of the original problem mdash the purpose of the programmingactivity

The algorithm the programmer has to devise is the mapping betweenthe level of abstraction P and the level M which must become anobservable of M in the form of an executable program

The presence of a mapping is what distiguishescomputational-inforgs in these inforgs it is essential that theartifact is computational ie it is able to execute a coded algorithm

(9 of 23)

Programming as the creation of a c-inforg

It is worth remarking that in a sense the act of programming createsa new computational inforg from an existing one from the pairmachine + programmer the pair abstract machine + user arisesthanks to the programmerrsquos activity

If the above cited mapping would be absent the user would be unableto use the machine to solve the problem thus failing to fulfill thepurpose of programming

(10 of 23)

Why levels of explanations

The choice of the programming language determines theepistemological approach sustaining the programmersrsquo goals whichis identified as a Level of Explanation (LoE) by Floridi (2008)

Unlike LoAs and LoOs LoEs do not really pertain to the systemrather they are an epistemological lens through which theinformational agent(s) approaches the goal of programming

(11 of 23)

The epistemological priority of LoEs

As an example modular arithmetic is a LoE a machine-levelprogrammer adopts to explain what some instructions of the centralprocessing unit

It is worth noticing how some LoE of the would-be program areknown in advance to the programmer in fact the purpose theprogram is written for is well-known to the programmer and thisforms a LoE for the program even before it exists as a LoALoO pair

Thus the LoE adopted by the programmer has an epistemologicalpriority on the LoALoO pair

(12 of 23)

A taxonomy of programming languages

Paraphrasing the three-layered description of programming byHofstadter (1979) the source code is the novel the programmer is the novelist the programming language is the literary genre of the novelTo these levels we can add the executable code is the book the machine is the narratorWe can classify programming languages in various way applying themethod of LoAs we can find only three major paradigms accordingto the kind of information got hidden

(13 of 23)

1 The procedural paradigm

Mainly because of the historical development of computationalmachineries current computers can be seen as structures of vonNeumann machines (Gobbo and Benini 2013)

This class of languages abstracts over the structure of von Neumannmachines by allowing more data types than just computationalnumbers and by allowing more or different instructions than those bythe bare machine

(14 of 23)

The machine in the procedural paradigm

The essential structure of the von Neumann machine is retained anengine operating on a memory via a set of instructions from a fixedset the code is organised as a sequence of elementary instructionseach one modifying the state of the machine mdash the next instructionto execute chosen according to the state

most programming languages allow programs to perform actionsthat change the values of variables or which have otherirreversible effects (input or output for example) we say thatthese actions have side-effect mdash White (2004) in Floridi (2004)

(15 of 23)

2 The declarative paradigm

Historically the von Neumann machine was nothing but one of thepossible models of computation introduced in the beginning of thelast century Other models like Churchrsquos λ-calculus Herbranduniverses stable models etc where proposed and studied To someextent the actual evolutions of these systems are much closer tointeresting problems ie they allow to describe the problem almostdirectly in the terms of their language

Moreover these systems have an instrinsic computational meaningwhich amounts to say that the very description of the problem hidesin itself the algorithm to solve it The programming languages basedon these systems are called declarative

(16 of 23)

The machine in the declarative paradigm

This class of programming languages comprising logical languages asProlog or Answer Set Programming but also the functional languagesas ML or Haskell abstracts over the very structure of the vonNeumann machine

In fact each language in this class provides an abstract machineoperating on a different computational model perfectly described inmathematical terms ndash sometimes before von Neumannrsquos Theprogramming language contains some sort of simulator to enable theexecution of the code on a standard von Neumann architecture

(17 of 23)

3 The object-oriented paradigm

Another approach is by the introduction of the concept of objectwhich is conceived originally on a different LoE philosophically basedon Leibnizrsquos monads and the subsequent adapted notions of 20thcentury physics and biology (Kay 1993)

In fact the object-oriented paradigm abstracts over the organisationof memory and state of a von Neumann architecture by putting alayered structure of abstractions over them

(18 of 23)

The machine in the object-oriented paradigm

One can consider each object-oriented class as a LoA over thememorystate of the hosting machine which is equipped with aninternal map (its implementation) and an external interface (itsLoALoO pair)

These classes are in turn the building blocks for further levels ofabstractions whose aim is to construct the PAPO pair ie the levelsof abstraction the program has to provide to fulfill its goal

(19 of 23)

The relations between the three paradigms

It should be clear that the object-oriented paradigm is orthogonalto the declarative paradigm in fact nothing prevents fromintroducing layers of abstractions over a basically differentorganisation of memory like the database of clauses in Prolog or theheap of functions in Standard ML And of course this has alreadybeen done in many different ways

Also these paradigms can realised in a different degree by a languagefor example in LISP the grandfather of functional languages there isan implicit state while in most modern functional languages thestate is explicit and very limited

(20 of 23)

Observations

Thus the gradients of applications of the previously exposedparadigms allow to naturally place each existing programminglanguage in a multi-dimensional space The fact that thesegradients are not necessarily of a quantitative nature is the deepreason why philosophy and not engineering is the right disciplinewherein to analyse the principles of programming

When dealing with really complex problems which happens in mostcontemporary software design rarely a single language has the rightfeatures to model the whole problem

Probably the universal language is an unreachable dream ashidingshowing some features is essential to solve specific problemsmdash and what to hide in a problem is exactly what one wish to exposein another one

(21 of 23)

Essential References

Backus J (1978) lsquoThe history of FORTRAN I II and IIIrsquo SIGPLAN Not13(8) 165ndash180

Boumlhm C and Jacopini G (1966) lsquoFlow diagrams turing machines and languages withonly two formation rulesrsquo Communications of the ACM 9(5) 366ndash371

Brooks Jr F P (1995) The mythical man-month (anniversary ed) Addison-WesleyLongman Publishing Co Inc Boston MA USA

Ceruzzi P (2003) A history of modern computing History of computing MIT PressDijkstra E W (1968) lsquoLetters to the editor go to statement considered harmfulrsquo

Commun ACM 11(3) 147ndash148Dijkstra E W (2001) What led to notes on structured programming circulated

privatelyFloridi L (2008) lsquoThe method of levels of abstractionrsquo Minds Mach 18 303ndash329Floridi L ed (2004) The Blackwell guide to the philosophy of computing and

information Blackwell LondonGobbo F and Benini M (2013) lsquoFrom ancient to modern computing A history of

information hidingrsquo IEEE Annals of the History of Computing 99(PrePrints)Hofstadter D R (1979) Goumldel Escher Bach An Eternal Golden Braid Basic Books

New YorkKay A C (1993) lsquoThe early history of smalltalkrsquo SIGPLAN Not 28(3) 69ndash95Lloyd J W (1984) Foundations of logic programming Springer-Verlag New York Inc

New York NY USAWhite G (2004) The Philosophy of Computer Languages in Floridi (2004) chapter 18(22 of 23)

Thanks for your attention

Questions

For proposals ideas amp comments

federicogobbounitoit amp marcobeniniuninsubriait

Download amp share these slides herehttpfedericogobbonameen2013html

CCcopy BYcopy $copy Ccopy Federico Gobbo amp Marco Benini 2013

(23 of 23)

Page 8: The epistemology of programming language paradigms

How programmers choose a programming language

To simplify terminology we will use the term solution to identify theresult of executing a program and we will reserve the term algorithmto identify what has to be coded as a program in a programminglanguage

The choice of the programming language defines how the way toachieve the solution is described to the machine In this respect themany different programming languages have been justified because oftheir ability to express the various problems and the ways to solvethem

(6 of 23)

The Method of Levels of Abstraction

The method of LoAs (Floridi 2008) can be used to describeprogramming in terms of informational organisms (inforgs)

1 the programmer is the informational agent2 the machine is the artificial artifact mdash where the Levels of

Organisation (LoOs) ie the apparatuses can be identified

A software project is an infosphere including processes and mutualrelations among the inforgs directed to the same goal

(7 of 23)

Machine solution program

From the point of view of the programmer the machine is describedby MO a LoO which specifies what can be inspected of the machineand MA a LoA that provides the description of how observables inMO are organised and what instructions can be used to manipulatethem

Similarly the solution of the problem is ultimately specified by a pairSA SO a (partial) LoA and the corresponding (partial) LoO whichshould become (part of) PA and PO the LoA and the LoO of theprogram to be constructed

(8 of 23)

The program in terms of Levels of abstraction

When the program will be completed the pair formed by PO and PAwill be a new abstract machine that can be used to calculate thesolution of the original problem mdash the purpose of the programmingactivity

The algorithm the programmer has to devise is the mapping betweenthe level of abstraction P and the level M which must become anobservable of M in the form of an executable program

The presence of a mapping is what distiguishescomputational-inforgs in these inforgs it is essential that theartifact is computational ie it is able to execute a coded algorithm

(9 of 23)

Programming as the creation of a c-inforg

It is worth remarking that in a sense the act of programming createsa new computational inforg from an existing one from the pairmachine + programmer the pair abstract machine + user arisesthanks to the programmerrsquos activity

If the above cited mapping would be absent the user would be unableto use the machine to solve the problem thus failing to fulfill thepurpose of programming

(10 of 23)

Why levels of explanations

The choice of the programming language determines theepistemological approach sustaining the programmersrsquo goals whichis identified as a Level of Explanation (LoE) by Floridi (2008)

Unlike LoAs and LoOs LoEs do not really pertain to the systemrather they are an epistemological lens through which theinformational agent(s) approaches the goal of programming

(11 of 23)

The epistemological priority of LoEs

As an example modular arithmetic is a LoE a machine-levelprogrammer adopts to explain what some instructions of the centralprocessing unit

It is worth noticing how some LoE of the would-be program areknown in advance to the programmer in fact the purpose theprogram is written for is well-known to the programmer and thisforms a LoE for the program even before it exists as a LoALoO pair

Thus the LoE adopted by the programmer has an epistemologicalpriority on the LoALoO pair

(12 of 23)

A taxonomy of programming languages

Paraphrasing the three-layered description of programming byHofstadter (1979) the source code is the novel the programmer is the novelist the programming language is the literary genre of the novelTo these levels we can add the executable code is the book the machine is the narratorWe can classify programming languages in various way applying themethod of LoAs we can find only three major paradigms accordingto the kind of information got hidden

(13 of 23)

1 The procedural paradigm

Mainly because of the historical development of computationalmachineries current computers can be seen as structures of vonNeumann machines (Gobbo and Benini 2013)

This class of languages abstracts over the structure of von Neumannmachines by allowing more data types than just computationalnumbers and by allowing more or different instructions than those bythe bare machine

(14 of 23)

The machine in the procedural paradigm

The essential structure of the von Neumann machine is retained anengine operating on a memory via a set of instructions from a fixedset the code is organised as a sequence of elementary instructionseach one modifying the state of the machine mdash the next instructionto execute chosen according to the state

most programming languages allow programs to perform actionsthat change the values of variables or which have otherirreversible effects (input or output for example) we say thatthese actions have side-effect mdash White (2004) in Floridi (2004)

(15 of 23)

2 The declarative paradigm

Historically the von Neumann machine was nothing but one of thepossible models of computation introduced in the beginning of thelast century Other models like Churchrsquos λ-calculus Herbranduniverses stable models etc where proposed and studied To someextent the actual evolutions of these systems are much closer tointeresting problems ie they allow to describe the problem almostdirectly in the terms of their language

Moreover these systems have an instrinsic computational meaningwhich amounts to say that the very description of the problem hidesin itself the algorithm to solve it The programming languages basedon these systems are called declarative

(16 of 23)

The machine in the declarative paradigm

This class of programming languages comprising logical languages asProlog or Answer Set Programming but also the functional languagesas ML or Haskell abstracts over the very structure of the vonNeumann machine

In fact each language in this class provides an abstract machineoperating on a different computational model perfectly described inmathematical terms ndash sometimes before von Neumannrsquos Theprogramming language contains some sort of simulator to enable theexecution of the code on a standard von Neumann architecture

(17 of 23)

3 The object-oriented paradigm

Another approach is by the introduction of the concept of objectwhich is conceived originally on a different LoE philosophically basedon Leibnizrsquos monads and the subsequent adapted notions of 20thcentury physics and biology (Kay 1993)

In fact the object-oriented paradigm abstracts over the organisationof memory and state of a von Neumann architecture by putting alayered structure of abstractions over them

(18 of 23)

The machine in the object-oriented paradigm

One can consider each object-oriented class as a LoA over thememorystate of the hosting machine which is equipped with aninternal map (its implementation) and an external interface (itsLoALoO pair)

These classes are in turn the building blocks for further levels ofabstractions whose aim is to construct the PAPO pair ie the levelsof abstraction the program has to provide to fulfill its goal

(19 of 23)

The relations between the three paradigms

It should be clear that the object-oriented paradigm is orthogonalto the declarative paradigm in fact nothing prevents fromintroducing layers of abstractions over a basically differentorganisation of memory like the database of clauses in Prolog or theheap of functions in Standard ML And of course this has alreadybeen done in many different ways

Also these paradigms can realised in a different degree by a languagefor example in LISP the grandfather of functional languages there isan implicit state while in most modern functional languages thestate is explicit and very limited

(20 of 23)

Observations

Thus the gradients of applications of the previously exposedparadigms allow to naturally place each existing programminglanguage in a multi-dimensional space The fact that thesegradients are not necessarily of a quantitative nature is the deepreason why philosophy and not engineering is the right disciplinewherein to analyse the principles of programming

When dealing with really complex problems which happens in mostcontemporary software design rarely a single language has the rightfeatures to model the whole problem

Probably the universal language is an unreachable dream ashidingshowing some features is essential to solve specific problemsmdash and what to hide in a problem is exactly what one wish to exposein another one

(21 of 23)

Essential References

Backus J (1978) lsquoThe history of FORTRAN I II and IIIrsquo SIGPLAN Not13(8) 165ndash180

Boumlhm C and Jacopini G (1966) lsquoFlow diagrams turing machines and languages withonly two formation rulesrsquo Communications of the ACM 9(5) 366ndash371

Brooks Jr F P (1995) The mythical man-month (anniversary ed) Addison-WesleyLongman Publishing Co Inc Boston MA USA

Ceruzzi P (2003) A history of modern computing History of computing MIT PressDijkstra E W (1968) lsquoLetters to the editor go to statement considered harmfulrsquo

Commun ACM 11(3) 147ndash148Dijkstra E W (2001) What led to notes on structured programming circulated

privatelyFloridi L (2008) lsquoThe method of levels of abstractionrsquo Minds Mach 18 303ndash329Floridi L ed (2004) The Blackwell guide to the philosophy of computing and

information Blackwell LondonGobbo F and Benini M (2013) lsquoFrom ancient to modern computing A history of

information hidingrsquo IEEE Annals of the History of Computing 99(PrePrints)Hofstadter D R (1979) Goumldel Escher Bach An Eternal Golden Braid Basic Books

New YorkKay A C (1993) lsquoThe early history of smalltalkrsquo SIGPLAN Not 28(3) 69ndash95Lloyd J W (1984) Foundations of logic programming Springer-Verlag New York Inc

New York NY USAWhite G (2004) The Philosophy of Computer Languages in Floridi (2004) chapter 18(22 of 23)

Thanks for your attention

Questions

For proposals ideas amp comments

federicogobbounitoit amp marcobeniniuninsubriait

Download amp share these slides herehttpfedericogobbonameen2013html

CCcopy BYcopy $copy Ccopy Federico Gobbo amp Marco Benini 2013

(23 of 23)

Page 9: The epistemology of programming language paradigms

The Method of Levels of Abstraction

The method of LoAs (Floridi 2008) can be used to describeprogramming in terms of informational organisms (inforgs)

1 the programmer is the informational agent2 the machine is the artificial artifact mdash where the Levels of

Organisation (LoOs) ie the apparatuses can be identified

A software project is an infosphere including processes and mutualrelations among the inforgs directed to the same goal

(7 of 23)

Machine solution program

From the point of view of the programmer the machine is describedby MO a LoO which specifies what can be inspected of the machineand MA a LoA that provides the description of how observables inMO are organised and what instructions can be used to manipulatethem

Similarly the solution of the problem is ultimately specified by a pairSA SO a (partial) LoA and the corresponding (partial) LoO whichshould become (part of) PA and PO the LoA and the LoO of theprogram to be constructed

(8 of 23)

The program in terms of Levels of abstraction

When the program will be completed the pair formed by PO and PAwill be a new abstract machine that can be used to calculate thesolution of the original problem mdash the purpose of the programmingactivity

The algorithm the programmer has to devise is the mapping betweenthe level of abstraction P and the level M which must become anobservable of M in the form of an executable program

The presence of a mapping is what distiguishescomputational-inforgs in these inforgs it is essential that theartifact is computational ie it is able to execute a coded algorithm

(9 of 23)

Programming as the creation of a c-inforg

It is worth remarking that in a sense the act of programming createsa new computational inforg from an existing one from the pairmachine + programmer the pair abstract machine + user arisesthanks to the programmerrsquos activity

If the above cited mapping would be absent the user would be unableto use the machine to solve the problem thus failing to fulfill thepurpose of programming

(10 of 23)

Why levels of explanations

The choice of the programming language determines theepistemological approach sustaining the programmersrsquo goals whichis identified as a Level of Explanation (LoE) by Floridi (2008)

Unlike LoAs and LoOs LoEs do not really pertain to the systemrather they are an epistemological lens through which theinformational agent(s) approaches the goal of programming

(11 of 23)

The epistemological priority of LoEs

As an example modular arithmetic is a LoE a machine-levelprogrammer adopts to explain what some instructions of the centralprocessing unit

It is worth noticing how some LoE of the would-be program areknown in advance to the programmer in fact the purpose theprogram is written for is well-known to the programmer and thisforms a LoE for the program even before it exists as a LoALoO pair

Thus the LoE adopted by the programmer has an epistemologicalpriority on the LoALoO pair

(12 of 23)

A taxonomy of programming languages

Paraphrasing the three-layered description of programming byHofstadter (1979) the source code is the novel the programmer is the novelist the programming language is the literary genre of the novelTo these levels we can add the executable code is the book the machine is the narratorWe can classify programming languages in various way applying themethod of LoAs we can find only three major paradigms accordingto the kind of information got hidden

(13 of 23)

1 The procedural paradigm

Mainly because of the historical development of computationalmachineries current computers can be seen as structures of vonNeumann machines (Gobbo and Benini 2013)

This class of languages abstracts over the structure of von Neumannmachines by allowing more data types than just computationalnumbers and by allowing more or different instructions than those bythe bare machine

(14 of 23)

The machine in the procedural paradigm

The essential structure of the von Neumann machine is retained anengine operating on a memory via a set of instructions from a fixedset the code is organised as a sequence of elementary instructionseach one modifying the state of the machine mdash the next instructionto execute chosen according to the state

most programming languages allow programs to perform actionsthat change the values of variables or which have otherirreversible effects (input or output for example) we say thatthese actions have side-effect mdash White (2004) in Floridi (2004)

(15 of 23)

2 The declarative paradigm

Historically the von Neumann machine was nothing but one of thepossible models of computation introduced in the beginning of thelast century Other models like Churchrsquos λ-calculus Herbranduniverses stable models etc where proposed and studied To someextent the actual evolutions of these systems are much closer tointeresting problems ie they allow to describe the problem almostdirectly in the terms of their language

Moreover these systems have an instrinsic computational meaningwhich amounts to say that the very description of the problem hidesin itself the algorithm to solve it The programming languages basedon these systems are called declarative

(16 of 23)

The machine in the declarative paradigm

This class of programming languages comprising logical languages asProlog or Answer Set Programming but also the functional languagesas ML or Haskell abstracts over the very structure of the vonNeumann machine

In fact each language in this class provides an abstract machineoperating on a different computational model perfectly described inmathematical terms ndash sometimes before von Neumannrsquos Theprogramming language contains some sort of simulator to enable theexecution of the code on a standard von Neumann architecture

(17 of 23)

3 The object-oriented paradigm

Another approach is by the introduction of the concept of objectwhich is conceived originally on a different LoE philosophically basedon Leibnizrsquos monads and the subsequent adapted notions of 20thcentury physics and biology (Kay 1993)

In fact the object-oriented paradigm abstracts over the organisationof memory and state of a von Neumann architecture by putting alayered structure of abstractions over them

(18 of 23)

The machine in the object-oriented paradigm

One can consider each object-oriented class as a LoA over thememorystate of the hosting machine which is equipped with aninternal map (its implementation) and an external interface (itsLoALoO pair)

These classes are in turn the building blocks for further levels ofabstractions whose aim is to construct the PAPO pair ie the levelsof abstraction the program has to provide to fulfill its goal

(19 of 23)

The relations between the three paradigms

It should be clear that the object-oriented paradigm is orthogonalto the declarative paradigm in fact nothing prevents fromintroducing layers of abstractions over a basically differentorganisation of memory like the database of clauses in Prolog or theheap of functions in Standard ML And of course this has alreadybeen done in many different ways

Also these paradigms can realised in a different degree by a languagefor example in LISP the grandfather of functional languages there isan implicit state while in most modern functional languages thestate is explicit and very limited

(20 of 23)

Observations

Thus the gradients of applications of the previously exposedparadigms allow to naturally place each existing programminglanguage in a multi-dimensional space The fact that thesegradients are not necessarily of a quantitative nature is the deepreason why philosophy and not engineering is the right disciplinewherein to analyse the principles of programming

When dealing with really complex problems which happens in mostcontemporary software design rarely a single language has the rightfeatures to model the whole problem

Probably the universal language is an unreachable dream ashidingshowing some features is essential to solve specific problemsmdash and what to hide in a problem is exactly what one wish to exposein another one

(21 of 23)

Essential References

Backus J (1978) lsquoThe history of FORTRAN I II and IIIrsquo SIGPLAN Not13(8) 165ndash180

Boumlhm C and Jacopini G (1966) lsquoFlow diagrams turing machines and languages withonly two formation rulesrsquo Communications of the ACM 9(5) 366ndash371

Brooks Jr F P (1995) The mythical man-month (anniversary ed) Addison-WesleyLongman Publishing Co Inc Boston MA USA

Ceruzzi P (2003) A history of modern computing History of computing MIT PressDijkstra E W (1968) lsquoLetters to the editor go to statement considered harmfulrsquo

Commun ACM 11(3) 147ndash148Dijkstra E W (2001) What led to notes on structured programming circulated

privatelyFloridi L (2008) lsquoThe method of levels of abstractionrsquo Minds Mach 18 303ndash329Floridi L ed (2004) The Blackwell guide to the philosophy of computing and

information Blackwell LondonGobbo F and Benini M (2013) lsquoFrom ancient to modern computing A history of

information hidingrsquo IEEE Annals of the History of Computing 99(PrePrints)Hofstadter D R (1979) Goumldel Escher Bach An Eternal Golden Braid Basic Books

New YorkKay A C (1993) lsquoThe early history of smalltalkrsquo SIGPLAN Not 28(3) 69ndash95Lloyd J W (1984) Foundations of logic programming Springer-Verlag New York Inc

New York NY USAWhite G (2004) The Philosophy of Computer Languages in Floridi (2004) chapter 18(22 of 23)

Thanks for your attention

Questions

For proposals ideas amp comments

federicogobbounitoit amp marcobeniniuninsubriait

Download amp share these slides herehttpfedericogobbonameen2013html

CCcopy BYcopy $copy Ccopy Federico Gobbo amp Marco Benini 2013

(23 of 23)

Page 10: The epistemology of programming language paradigms

Machine solution program

From the point of view of the programmer the machine is describedby MO a LoO which specifies what can be inspected of the machineand MA a LoA that provides the description of how observables inMO are organised and what instructions can be used to manipulatethem

Similarly the solution of the problem is ultimately specified by a pairSA SO a (partial) LoA and the corresponding (partial) LoO whichshould become (part of) PA and PO the LoA and the LoO of theprogram to be constructed

(8 of 23)

The program in terms of Levels of abstraction

When the program will be completed the pair formed by PO and PAwill be a new abstract machine that can be used to calculate thesolution of the original problem mdash the purpose of the programmingactivity

The algorithm the programmer has to devise is the mapping betweenthe level of abstraction P and the level M which must become anobservable of M in the form of an executable program

The presence of a mapping is what distiguishescomputational-inforgs in these inforgs it is essential that theartifact is computational ie it is able to execute a coded algorithm

(9 of 23)

Programming as the creation of a c-inforg

It is worth remarking that in a sense the act of programming createsa new computational inforg from an existing one from the pairmachine + programmer the pair abstract machine + user arisesthanks to the programmerrsquos activity

If the above cited mapping would be absent the user would be unableto use the machine to solve the problem thus failing to fulfill thepurpose of programming

(10 of 23)

Why levels of explanations

The choice of the programming language determines theepistemological approach sustaining the programmersrsquo goals whichis identified as a Level of Explanation (LoE) by Floridi (2008)

Unlike LoAs and LoOs LoEs do not really pertain to the systemrather they are an epistemological lens through which theinformational agent(s) approaches the goal of programming

(11 of 23)

The epistemological priority of LoEs

As an example modular arithmetic is a LoE a machine-levelprogrammer adopts to explain what some instructions of the centralprocessing unit

It is worth noticing how some LoE of the would-be program areknown in advance to the programmer in fact the purpose theprogram is written for is well-known to the programmer and thisforms a LoE for the program even before it exists as a LoALoO pair

Thus the LoE adopted by the programmer has an epistemologicalpriority on the LoALoO pair

(12 of 23)

A taxonomy of programming languages

Paraphrasing the three-layered description of programming byHofstadter (1979) the source code is the novel the programmer is the novelist the programming language is the literary genre of the novelTo these levels we can add the executable code is the book the machine is the narratorWe can classify programming languages in various way applying themethod of LoAs we can find only three major paradigms accordingto the kind of information got hidden

(13 of 23)

1 The procedural paradigm

Mainly because of the historical development of computationalmachineries current computers can be seen as structures of vonNeumann machines (Gobbo and Benini 2013)

This class of languages abstracts over the structure of von Neumannmachines by allowing more data types than just computationalnumbers and by allowing more or different instructions than those bythe bare machine

(14 of 23)

The machine in the procedural paradigm

The essential structure of the von Neumann machine is retained anengine operating on a memory via a set of instructions from a fixedset the code is organised as a sequence of elementary instructionseach one modifying the state of the machine mdash the next instructionto execute chosen according to the state

most programming languages allow programs to perform actionsthat change the values of variables or which have otherirreversible effects (input or output for example) we say thatthese actions have side-effect mdash White (2004) in Floridi (2004)

(15 of 23)

2 The declarative paradigm

Historically the von Neumann machine was nothing but one of thepossible models of computation introduced in the beginning of thelast century Other models like Churchrsquos λ-calculus Herbranduniverses stable models etc where proposed and studied To someextent the actual evolutions of these systems are much closer tointeresting problems ie they allow to describe the problem almostdirectly in the terms of their language

Moreover these systems have an instrinsic computational meaningwhich amounts to say that the very description of the problem hidesin itself the algorithm to solve it The programming languages basedon these systems are called declarative

(16 of 23)

The machine in the declarative paradigm

This class of programming languages comprising logical languages asProlog or Answer Set Programming but also the functional languagesas ML or Haskell abstracts over the very structure of the vonNeumann machine

In fact each language in this class provides an abstract machineoperating on a different computational model perfectly described inmathematical terms ndash sometimes before von Neumannrsquos Theprogramming language contains some sort of simulator to enable theexecution of the code on a standard von Neumann architecture

(17 of 23)

3 The object-oriented paradigm

Another approach is by the introduction of the concept of objectwhich is conceived originally on a different LoE philosophically basedon Leibnizrsquos monads and the subsequent adapted notions of 20thcentury physics and biology (Kay 1993)

In fact the object-oriented paradigm abstracts over the organisationof memory and state of a von Neumann architecture by putting alayered structure of abstractions over them

(18 of 23)

The machine in the object-oriented paradigm

One can consider each object-oriented class as a LoA over thememorystate of the hosting machine which is equipped with aninternal map (its implementation) and an external interface (itsLoALoO pair)

These classes are in turn the building blocks for further levels ofabstractions whose aim is to construct the PAPO pair ie the levelsof abstraction the program has to provide to fulfill its goal

(19 of 23)

The relations between the three paradigms

It should be clear that the object-oriented paradigm is orthogonalto the declarative paradigm in fact nothing prevents fromintroducing layers of abstractions over a basically differentorganisation of memory like the database of clauses in Prolog or theheap of functions in Standard ML And of course this has alreadybeen done in many different ways

Also these paradigms can realised in a different degree by a languagefor example in LISP the grandfather of functional languages there isan implicit state while in most modern functional languages thestate is explicit and very limited

(20 of 23)

Observations

Thus the gradients of applications of the previously exposedparadigms allow to naturally place each existing programminglanguage in a multi-dimensional space The fact that thesegradients are not necessarily of a quantitative nature is the deepreason why philosophy and not engineering is the right disciplinewherein to analyse the principles of programming

When dealing with really complex problems which happens in mostcontemporary software design rarely a single language has the rightfeatures to model the whole problem

Probably the universal language is an unreachable dream ashidingshowing some features is essential to solve specific problemsmdash and what to hide in a problem is exactly what one wish to exposein another one

(21 of 23)

Essential References

Backus J (1978) lsquoThe history of FORTRAN I II and IIIrsquo SIGPLAN Not13(8) 165ndash180

Boumlhm C and Jacopini G (1966) lsquoFlow diagrams turing machines and languages withonly two formation rulesrsquo Communications of the ACM 9(5) 366ndash371

Brooks Jr F P (1995) The mythical man-month (anniversary ed) Addison-WesleyLongman Publishing Co Inc Boston MA USA

Ceruzzi P (2003) A history of modern computing History of computing MIT PressDijkstra E W (1968) lsquoLetters to the editor go to statement considered harmfulrsquo

Commun ACM 11(3) 147ndash148Dijkstra E W (2001) What led to notes on structured programming circulated

privatelyFloridi L (2008) lsquoThe method of levels of abstractionrsquo Minds Mach 18 303ndash329Floridi L ed (2004) The Blackwell guide to the philosophy of computing and

information Blackwell LondonGobbo F and Benini M (2013) lsquoFrom ancient to modern computing A history of

information hidingrsquo IEEE Annals of the History of Computing 99(PrePrints)Hofstadter D R (1979) Goumldel Escher Bach An Eternal Golden Braid Basic Books

New YorkKay A C (1993) lsquoThe early history of smalltalkrsquo SIGPLAN Not 28(3) 69ndash95Lloyd J W (1984) Foundations of logic programming Springer-Verlag New York Inc

New York NY USAWhite G (2004) The Philosophy of Computer Languages in Floridi (2004) chapter 18(22 of 23)

Thanks for your attention

Questions

For proposals ideas amp comments

federicogobbounitoit amp marcobeniniuninsubriait

Download amp share these slides herehttpfedericogobbonameen2013html

CCcopy BYcopy $copy Ccopy Federico Gobbo amp Marco Benini 2013

(23 of 23)

Page 11: The epistemology of programming language paradigms

The program in terms of Levels of abstraction

When the program will be completed the pair formed by PO and PAwill be a new abstract machine that can be used to calculate thesolution of the original problem mdash the purpose of the programmingactivity

The algorithm the programmer has to devise is the mapping betweenthe level of abstraction P and the level M which must become anobservable of M in the form of an executable program

The presence of a mapping is what distiguishescomputational-inforgs in these inforgs it is essential that theartifact is computational ie it is able to execute a coded algorithm

(9 of 23)

Programming as the creation of a c-inforg

It is worth remarking that in a sense the act of programming createsa new computational inforg from an existing one from the pairmachine + programmer the pair abstract machine + user arisesthanks to the programmerrsquos activity

If the above cited mapping would be absent the user would be unableto use the machine to solve the problem thus failing to fulfill thepurpose of programming

(10 of 23)

Why levels of explanations

The choice of the programming language determines theepistemological approach sustaining the programmersrsquo goals whichis identified as a Level of Explanation (LoE) by Floridi (2008)

Unlike LoAs and LoOs LoEs do not really pertain to the systemrather they are an epistemological lens through which theinformational agent(s) approaches the goal of programming

(11 of 23)

The epistemological priority of LoEs

As an example modular arithmetic is a LoE a machine-levelprogrammer adopts to explain what some instructions of the centralprocessing unit

It is worth noticing how some LoE of the would-be program areknown in advance to the programmer in fact the purpose theprogram is written for is well-known to the programmer and thisforms a LoE for the program even before it exists as a LoALoO pair

Thus the LoE adopted by the programmer has an epistemologicalpriority on the LoALoO pair

(12 of 23)

A taxonomy of programming languages

Paraphrasing the three-layered description of programming byHofstadter (1979) the source code is the novel the programmer is the novelist the programming language is the literary genre of the novelTo these levels we can add the executable code is the book the machine is the narratorWe can classify programming languages in various way applying themethod of LoAs we can find only three major paradigms accordingto the kind of information got hidden

(13 of 23)

1 The procedural paradigm

Mainly because of the historical development of computationalmachineries current computers can be seen as structures of vonNeumann machines (Gobbo and Benini 2013)

This class of languages abstracts over the structure of von Neumannmachines by allowing more data types than just computationalnumbers and by allowing more or different instructions than those bythe bare machine

(14 of 23)

The machine in the procedural paradigm

The essential structure of the von Neumann machine is retained anengine operating on a memory via a set of instructions from a fixedset the code is organised as a sequence of elementary instructionseach one modifying the state of the machine mdash the next instructionto execute chosen according to the state

most programming languages allow programs to perform actionsthat change the values of variables or which have otherirreversible effects (input or output for example) we say thatthese actions have side-effect mdash White (2004) in Floridi (2004)

(15 of 23)

2 The declarative paradigm

Historically the von Neumann machine was nothing but one of thepossible models of computation introduced in the beginning of thelast century Other models like Churchrsquos λ-calculus Herbranduniverses stable models etc where proposed and studied To someextent the actual evolutions of these systems are much closer tointeresting problems ie they allow to describe the problem almostdirectly in the terms of their language

Moreover these systems have an instrinsic computational meaningwhich amounts to say that the very description of the problem hidesin itself the algorithm to solve it The programming languages basedon these systems are called declarative

(16 of 23)

The machine in the declarative paradigm

This class of programming languages comprising logical languages asProlog or Answer Set Programming but also the functional languagesas ML or Haskell abstracts over the very structure of the vonNeumann machine

In fact each language in this class provides an abstract machineoperating on a different computational model perfectly described inmathematical terms ndash sometimes before von Neumannrsquos Theprogramming language contains some sort of simulator to enable theexecution of the code on a standard von Neumann architecture

(17 of 23)

3 The object-oriented paradigm

Another approach is by the introduction of the concept of objectwhich is conceived originally on a different LoE philosophically basedon Leibnizrsquos monads and the subsequent adapted notions of 20thcentury physics and biology (Kay 1993)

In fact the object-oriented paradigm abstracts over the organisationof memory and state of a von Neumann architecture by putting alayered structure of abstractions over them

(18 of 23)

The machine in the object-oriented paradigm

One can consider each object-oriented class as a LoA over thememorystate of the hosting machine which is equipped with aninternal map (its implementation) and an external interface (itsLoALoO pair)

These classes are in turn the building blocks for further levels ofabstractions whose aim is to construct the PAPO pair ie the levelsof abstraction the program has to provide to fulfill its goal

(19 of 23)

The relations between the three paradigms

It should be clear that the object-oriented paradigm is orthogonalto the declarative paradigm in fact nothing prevents fromintroducing layers of abstractions over a basically differentorganisation of memory like the database of clauses in Prolog or theheap of functions in Standard ML And of course this has alreadybeen done in many different ways

Also these paradigms can realised in a different degree by a languagefor example in LISP the grandfather of functional languages there isan implicit state while in most modern functional languages thestate is explicit and very limited

(20 of 23)

Observations

Thus the gradients of applications of the previously exposedparadigms allow to naturally place each existing programminglanguage in a multi-dimensional space The fact that thesegradients are not necessarily of a quantitative nature is the deepreason why philosophy and not engineering is the right disciplinewherein to analyse the principles of programming

When dealing with really complex problems which happens in mostcontemporary software design rarely a single language has the rightfeatures to model the whole problem

Probably the universal language is an unreachable dream ashidingshowing some features is essential to solve specific problemsmdash and what to hide in a problem is exactly what one wish to exposein another one

(21 of 23)

Essential References

Backus J (1978) lsquoThe history of FORTRAN I II and IIIrsquo SIGPLAN Not13(8) 165ndash180

Boumlhm C and Jacopini G (1966) lsquoFlow diagrams turing machines and languages withonly two formation rulesrsquo Communications of the ACM 9(5) 366ndash371

Brooks Jr F P (1995) The mythical man-month (anniversary ed) Addison-WesleyLongman Publishing Co Inc Boston MA USA

Ceruzzi P (2003) A history of modern computing History of computing MIT PressDijkstra E W (1968) lsquoLetters to the editor go to statement considered harmfulrsquo

Commun ACM 11(3) 147ndash148Dijkstra E W (2001) What led to notes on structured programming circulated

privatelyFloridi L (2008) lsquoThe method of levels of abstractionrsquo Minds Mach 18 303ndash329Floridi L ed (2004) The Blackwell guide to the philosophy of computing and

information Blackwell LondonGobbo F and Benini M (2013) lsquoFrom ancient to modern computing A history of

information hidingrsquo IEEE Annals of the History of Computing 99(PrePrints)Hofstadter D R (1979) Goumldel Escher Bach An Eternal Golden Braid Basic Books

New YorkKay A C (1993) lsquoThe early history of smalltalkrsquo SIGPLAN Not 28(3) 69ndash95Lloyd J W (1984) Foundations of logic programming Springer-Verlag New York Inc

New York NY USAWhite G (2004) The Philosophy of Computer Languages in Floridi (2004) chapter 18(22 of 23)

Thanks for your attention

Questions

For proposals ideas amp comments

federicogobbounitoit amp marcobeniniuninsubriait

Download amp share these slides herehttpfedericogobbonameen2013html

CCcopy BYcopy $copy Ccopy Federico Gobbo amp Marco Benini 2013

(23 of 23)

Page 12: The epistemology of programming language paradigms

Programming as the creation of a c-inforg

It is worth remarking that in a sense the act of programming createsa new computational inforg from an existing one from the pairmachine + programmer the pair abstract machine + user arisesthanks to the programmerrsquos activity

If the above cited mapping would be absent the user would be unableto use the machine to solve the problem thus failing to fulfill thepurpose of programming

(10 of 23)

Why levels of explanations

The choice of the programming language determines theepistemological approach sustaining the programmersrsquo goals whichis identified as a Level of Explanation (LoE) by Floridi (2008)

Unlike LoAs and LoOs LoEs do not really pertain to the systemrather they are an epistemological lens through which theinformational agent(s) approaches the goal of programming

(11 of 23)

The epistemological priority of LoEs

As an example modular arithmetic is a LoE a machine-levelprogrammer adopts to explain what some instructions of the centralprocessing unit

It is worth noticing how some LoE of the would-be program areknown in advance to the programmer in fact the purpose theprogram is written for is well-known to the programmer and thisforms a LoE for the program even before it exists as a LoALoO pair

Thus the LoE adopted by the programmer has an epistemologicalpriority on the LoALoO pair

(12 of 23)

A taxonomy of programming languages

Paraphrasing the three-layered description of programming byHofstadter (1979) the source code is the novel the programmer is the novelist the programming language is the literary genre of the novelTo these levels we can add the executable code is the book the machine is the narratorWe can classify programming languages in various way applying themethod of LoAs we can find only three major paradigms accordingto the kind of information got hidden

(13 of 23)

1 The procedural paradigm

Mainly because of the historical development of computationalmachineries current computers can be seen as structures of vonNeumann machines (Gobbo and Benini 2013)

This class of languages abstracts over the structure of von Neumannmachines by allowing more data types than just computationalnumbers and by allowing more or different instructions than those bythe bare machine

(14 of 23)

The machine in the procedural paradigm

The essential structure of the von Neumann machine is retained anengine operating on a memory via a set of instructions from a fixedset the code is organised as a sequence of elementary instructionseach one modifying the state of the machine mdash the next instructionto execute chosen according to the state

most programming languages allow programs to perform actionsthat change the values of variables or which have otherirreversible effects (input or output for example) we say thatthese actions have side-effect mdash White (2004) in Floridi (2004)

(15 of 23)

2 The declarative paradigm

Historically the von Neumann machine was nothing but one of thepossible models of computation introduced in the beginning of thelast century Other models like Churchrsquos λ-calculus Herbranduniverses stable models etc where proposed and studied To someextent the actual evolutions of these systems are much closer tointeresting problems ie they allow to describe the problem almostdirectly in the terms of their language

Moreover these systems have an instrinsic computational meaningwhich amounts to say that the very description of the problem hidesin itself the algorithm to solve it The programming languages basedon these systems are called declarative

(16 of 23)

The machine in the declarative paradigm

This class of programming languages comprising logical languages asProlog or Answer Set Programming but also the functional languagesas ML or Haskell abstracts over the very structure of the vonNeumann machine

In fact each language in this class provides an abstract machineoperating on a different computational model perfectly described inmathematical terms ndash sometimes before von Neumannrsquos Theprogramming language contains some sort of simulator to enable theexecution of the code on a standard von Neumann architecture

(17 of 23)

3 The object-oriented paradigm

Another approach is by the introduction of the concept of objectwhich is conceived originally on a different LoE philosophically basedon Leibnizrsquos monads and the subsequent adapted notions of 20thcentury physics and biology (Kay 1993)

In fact the object-oriented paradigm abstracts over the organisationof memory and state of a von Neumann architecture by putting alayered structure of abstractions over them

(18 of 23)

The machine in the object-oriented paradigm

One can consider each object-oriented class as a LoA over thememorystate of the hosting machine which is equipped with aninternal map (its implementation) and an external interface (itsLoALoO pair)

These classes are in turn the building blocks for further levels ofabstractions whose aim is to construct the PAPO pair ie the levelsof abstraction the program has to provide to fulfill its goal

(19 of 23)

The relations between the three paradigms

It should be clear that the object-oriented paradigm is orthogonalto the declarative paradigm in fact nothing prevents fromintroducing layers of abstractions over a basically differentorganisation of memory like the database of clauses in Prolog or theheap of functions in Standard ML And of course this has alreadybeen done in many different ways

Also these paradigms can realised in a different degree by a languagefor example in LISP the grandfather of functional languages there isan implicit state while in most modern functional languages thestate is explicit and very limited

(20 of 23)

Observations

Thus the gradients of applications of the previously exposedparadigms allow to naturally place each existing programminglanguage in a multi-dimensional space The fact that thesegradients are not necessarily of a quantitative nature is the deepreason why philosophy and not engineering is the right disciplinewherein to analyse the principles of programming

When dealing with really complex problems which happens in mostcontemporary software design rarely a single language has the rightfeatures to model the whole problem

Probably the universal language is an unreachable dream ashidingshowing some features is essential to solve specific problemsmdash and what to hide in a problem is exactly what one wish to exposein another one

(21 of 23)

Essential References

Backus J (1978) lsquoThe history of FORTRAN I II and IIIrsquo SIGPLAN Not13(8) 165ndash180

Boumlhm C and Jacopini G (1966) lsquoFlow diagrams turing machines and languages withonly two formation rulesrsquo Communications of the ACM 9(5) 366ndash371

Brooks Jr F P (1995) The mythical man-month (anniversary ed) Addison-WesleyLongman Publishing Co Inc Boston MA USA

Ceruzzi P (2003) A history of modern computing History of computing MIT PressDijkstra E W (1968) lsquoLetters to the editor go to statement considered harmfulrsquo

Commun ACM 11(3) 147ndash148Dijkstra E W (2001) What led to notes on structured programming circulated

privatelyFloridi L (2008) lsquoThe method of levels of abstractionrsquo Minds Mach 18 303ndash329Floridi L ed (2004) The Blackwell guide to the philosophy of computing and

information Blackwell LondonGobbo F and Benini M (2013) lsquoFrom ancient to modern computing A history of

information hidingrsquo IEEE Annals of the History of Computing 99(PrePrints)Hofstadter D R (1979) Goumldel Escher Bach An Eternal Golden Braid Basic Books

New YorkKay A C (1993) lsquoThe early history of smalltalkrsquo SIGPLAN Not 28(3) 69ndash95Lloyd J W (1984) Foundations of logic programming Springer-Verlag New York Inc

New York NY USAWhite G (2004) The Philosophy of Computer Languages in Floridi (2004) chapter 18(22 of 23)

Thanks for your attention

Questions

For proposals ideas amp comments

federicogobbounitoit amp marcobeniniuninsubriait

Download amp share these slides herehttpfedericogobbonameen2013html

CCcopy BYcopy $copy Ccopy Federico Gobbo amp Marco Benini 2013

(23 of 23)

Page 13: The epistemology of programming language paradigms

Why levels of explanations

The choice of the programming language determines theepistemological approach sustaining the programmersrsquo goals whichis identified as a Level of Explanation (LoE) by Floridi (2008)

Unlike LoAs and LoOs LoEs do not really pertain to the systemrather they are an epistemological lens through which theinformational agent(s) approaches the goal of programming

(11 of 23)

The epistemological priority of LoEs

As an example modular arithmetic is a LoE a machine-levelprogrammer adopts to explain what some instructions of the centralprocessing unit

It is worth noticing how some LoE of the would-be program areknown in advance to the programmer in fact the purpose theprogram is written for is well-known to the programmer and thisforms a LoE for the program even before it exists as a LoALoO pair

Thus the LoE adopted by the programmer has an epistemologicalpriority on the LoALoO pair

(12 of 23)

A taxonomy of programming languages

Paraphrasing the three-layered description of programming byHofstadter (1979) the source code is the novel the programmer is the novelist the programming language is the literary genre of the novelTo these levels we can add the executable code is the book the machine is the narratorWe can classify programming languages in various way applying themethod of LoAs we can find only three major paradigms accordingto the kind of information got hidden

(13 of 23)

1 The procedural paradigm

Mainly because of the historical development of computationalmachineries current computers can be seen as structures of vonNeumann machines (Gobbo and Benini 2013)

This class of languages abstracts over the structure of von Neumannmachines by allowing more data types than just computationalnumbers and by allowing more or different instructions than those bythe bare machine

(14 of 23)

The machine in the procedural paradigm

The essential structure of the von Neumann machine is retained anengine operating on a memory via a set of instructions from a fixedset the code is organised as a sequence of elementary instructionseach one modifying the state of the machine mdash the next instructionto execute chosen according to the state

most programming languages allow programs to perform actionsthat change the values of variables or which have otherirreversible effects (input or output for example) we say thatthese actions have side-effect mdash White (2004) in Floridi (2004)

(15 of 23)

2 The declarative paradigm

Historically the von Neumann machine was nothing but one of thepossible models of computation introduced in the beginning of thelast century Other models like Churchrsquos λ-calculus Herbranduniverses stable models etc where proposed and studied To someextent the actual evolutions of these systems are much closer tointeresting problems ie they allow to describe the problem almostdirectly in the terms of their language

Moreover these systems have an instrinsic computational meaningwhich amounts to say that the very description of the problem hidesin itself the algorithm to solve it The programming languages basedon these systems are called declarative

(16 of 23)

The machine in the declarative paradigm

This class of programming languages comprising logical languages asProlog or Answer Set Programming but also the functional languagesas ML or Haskell abstracts over the very structure of the vonNeumann machine

In fact each language in this class provides an abstract machineoperating on a different computational model perfectly described inmathematical terms ndash sometimes before von Neumannrsquos Theprogramming language contains some sort of simulator to enable theexecution of the code on a standard von Neumann architecture

(17 of 23)

3 The object-oriented paradigm

Another approach is by the introduction of the concept of objectwhich is conceived originally on a different LoE philosophically basedon Leibnizrsquos monads and the subsequent adapted notions of 20thcentury physics and biology (Kay 1993)

In fact the object-oriented paradigm abstracts over the organisationof memory and state of a von Neumann architecture by putting alayered structure of abstractions over them

(18 of 23)

The machine in the object-oriented paradigm

One can consider each object-oriented class as a LoA over thememorystate of the hosting machine which is equipped with aninternal map (its implementation) and an external interface (itsLoALoO pair)

These classes are in turn the building blocks for further levels ofabstractions whose aim is to construct the PAPO pair ie the levelsof abstraction the program has to provide to fulfill its goal

(19 of 23)

The relations between the three paradigms

It should be clear that the object-oriented paradigm is orthogonalto the declarative paradigm in fact nothing prevents fromintroducing layers of abstractions over a basically differentorganisation of memory like the database of clauses in Prolog or theheap of functions in Standard ML And of course this has alreadybeen done in many different ways

Also these paradigms can realised in a different degree by a languagefor example in LISP the grandfather of functional languages there isan implicit state while in most modern functional languages thestate is explicit and very limited

(20 of 23)

Observations

Thus the gradients of applications of the previously exposedparadigms allow to naturally place each existing programminglanguage in a multi-dimensional space The fact that thesegradients are not necessarily of a quantitative nature is the deepreason why philosophy and not engineering is the right disciplinewherein to analyse the principles of programming

When dealing with really complex problems which happens in mostcontemporary software design rarely a single language has the rightfeatures to model the whole problem

Probably the universal language is an unreachable dream ashidingshowing some features is essential to solve specific problemsmdash and what to hide in a problem is exactly what one wish to exposein another one

(21 of 23)

Essential References

Backus J (1978) lsquoThe history of FORTRAN I II and IIIrsquo SIGPLAN Not13(8) 165ndash180

Boumlhm C and Jacopini G (1966) lsquoFlow diagrams turing machines and languages withonly two formation rulesrsquo Communications of the ACM 9(5) 366ndash371

Brooks Jr F P (1995) The mythical man-month (anniversary ed) Addison-WesleyLongman Publishing Co Inc Boston MA USA

Ceruzzi P (2003) A history of modern computing History of computing MIT PressDijkstra E W (1968) lsquoLetters to the editor go to statement considered harmfulrsquo

Commun ACM 11(3) 147ndash148Dijkstra E W (2001) What led to notes on structured programming circulated

privatelyFloridi L (2008) lsquoThe method of levels of abstractionrsquo Minds Mach 18 303ndash329Floridi L ed (2004) The Blackwell guide to the philosophy of computing and

information Blackwell LondonGobbo F and Benini M (2013) lsquoFrom ancient to modern computing A history of

information hidingrsquo IEEE Annals of the History of Computing 99(PrePrints)Hofstadter D R (1979) Goumldel Escher Bach An Eternal Golden Braid Basic Books

New YorkKay A C (1993) lsquoThe early history of smalltalkrsquo SIGPLAN Not 28(3) 69ndash95Lloyd J W (1984) Foundations of logic programming Springer-Verlag New York Inc

New York NY USAWhite G (2004) The Philosophy of Computer Languages in Floridi (2004) chapter 18(22 of 23)

Thanks for your attention

Questions

For proposals ideas amp comments

federicogobbounitoit amp marcobeniniuninsubriait

Download amp share these slides herehttpfedericogobbonameen2013html

CCcopy BYcopy $copy Ccopy Federico Gobbo amp Marco Benini 2013

(23 of 23)

Page 14: The epistemology of programming language paradigms

The epistemological priority of LoEs

As an example modular arithmetic is a LoE a machine-levelprogrammer adopts to explain what some instructions of the centralprocessing unit

It is worth noticing how some LoE of the would-be program areknown in advance to the programmer in fact the purpose theprogram is written for is well-known to the programmer and thisforms a LoE for the program even before it exists as a LoALoO pair

Thus the LoE adopted by the programmer has an epistemologicalpriority on the LoALoO pair

(12 of 23)

A taxonomy of programming languages

Paraphrasing the three-layered description of programming byHofstadter (1979) the source code is the novel the programmer is the novelist the programming language is the literary genre of the novelTo these levels we can add the executable code is the book the machine is the narratorWe can classify programming languages in various way applying themethod of LoAs we can find only three major paradigms accordingto the kind of information got hidden

(13 of 23)

1 The procedural paradigm

Mainly because of the historical development of computationalmachineries current computers can be seen as structures of vonNeumann machines (Gobbo and Benini 2013)

This class of languages abstracts over the structure of von Neumannmachines by allowing more data types than just computationalnumbers and by allowing more or different instructions than those bythe bare machine

(14 of 23)

The machine in the procedural paradigm

The essential structure of the von Neumann machine is retained anengine operating on a memory via a set of instructions from a fixedset the code is organised as a sequence of elementary instructionseach one modifying the state of the machine mdash the next instructionto execute chosen according to the state

most programming languages allow programs to perform actionsthat change the values of variables or which have otherirreversible effects (input or output for example) we say thatthese actions have side-effect mdash White (2004) in Floridi (2004)

(15 of 23)

2 The declarative paradigm

Historically the von Neumann machine was nothing but one of thepossible models of computation introduced in the beginning of thelast century Other models like Churchrsquos λ-calculus Herbranduniverses stable models etc where proposed and studied To someextent the actual evolutions of these systems are much closer tointeresting problems ie they allow to describe the problem almostdirectly in the terms of their language

Moreover these systems have an instrinsic computational meaningwhich amounts to say that the very description of the problem hidesin itself the algorithm to solve it The programming languages basedon these systems are called declarative

(16 of 23)

The machine in the declarative paradigm

This class of programming languages comprising logical languages asProlog or Answer Set Programming but also the functional languagesas ML or Haskell abstracts over the very structure of the vonNeumann machine

In fact each language in this class provides an abstract machineoperating on a different computational model perfectly described inmathematical terms ndash sometimes before von Neumannrsquos Theprogramming language contains some sort of simulator to enable theexecution of the code on a standard von Neumann architecture

(17 of 23)

3 The object-oriented paradigm

Another approach is by the introduction of the concept of objectwhich is conceived originally on a different LoE philosophically basedon Leibnizrsquos monads and the subsequent adapted notions of 20thcentury physics and biology (Kay 1993)

In fact the object-oriented paradigm abstracts over the organisationof memory and state of a von Neumann architecture by putting alayered structure of abstractions over them

(18 of 23)

The machine in the object-oriented paradigm

One can consider each object-oriented class as a LoA over thememorystate of the hosting machine which is equipped with aninternal map (its implementation) and an external interface (itsLoALoO pair)

These classes are in turn the building blocks for further levels ofabstractions whose aim is to construct the PAPO pair ie the levelsof abstraction the program has to provide to fulfill its goal

(19 of 23)

The relations between the three paradigms

It should be clear that the object-oriented paradigm is orthogonalto the declarative paradigm in fact nothing prevents fromintroducing layers of abstractions over a basically differentorganisation of memory like the database of clauses in Prolog or theheap of functions in Standard ML And of course this has alreadybeen done in many different ways

Also these paradigms can realised in a different degree by a languagefor example in LISP the grandfather of functional languages there isan implicit state while in most modern functional languages thestate is explicit and very limited

(20 of 23)

Observations

Thus the gradients of applications of the previously exposedparadigms allow to naturally place each existing programminglanguage in a multi-dimensional space The fact that thesegradients are not necessarily of a quantitative nature is the deepreason why philosophy and not engineering is the right disciplinewherein to analyse the principles of programming

When dealing with really complex problems which happens in mostcontemporary software design rarely a single language has the rightfeatures to model the whole problem

Probably the universal language is an unreachable dream ashidingshowing some features is essential to solve specific problemsmdash and what to hide in a problem is exactly what one wish to exposein another one

(21 of 23)

Essential References

Backus J (1978) lsquoThe history of FORTRAN I II and IIIrsquo SIGPLAN Not13(8) 165ndash180

Boumlhm C and Jacopini G (1966) lsquoFlow diagrams turing machines and languages withonly two formation rulesrsquo Communications of the ACM 9(5) 366ndash371

Brooks Jr F P (1995) The mythical man-month (anniversary ed) Addison-WesleyLongman Publishing Co Inc Boston MA USA

Ceruzzi P (2003) A history of modern computing History of computing MIT PressDijkstra E W (1968) lsquoLetters to the editor go to statement considered harmfulrsquo

Commun ACM 11(3) 147ndash148Dijkstra E W (2001) What led to notes on structured programming circulated

privatelyFloridi L (2008) lsquoThe method of levels of abstractionrsquo Minds Mach 18 303ndash329Floridi L ed (2004) The Blackwell guide to the philosophy of computing and

information Blackwell LondonGobbo F and Benini M (2013) lsquoFrom ancient to modern computing A history of

information hidingrsquo IEEE Annals of the History of Computing 99(PrePrints)Hofstadter D R (1979) Goumldel Escher Bach An Eternal Golden Braid Basic Books

New YorkKay A C (1993) lsquoThe early history of smalltalkrsquo SIGPLAN Not 28(3) 69ndash95Lloyd J W (1984) Foundations of logic programming Springer-Verlag New York Inc

New York NY USAWhite G (2004) The Philosophy of Computer Languages in Floridi (2004) chapter 18(22 of 23)

Thanks for your attention

Questions

For proposals ideas amp comments

federicogobbounitoit amp marcobeniniuninsubriait

Download amp share these slides herehttpfedericogobbonameen2013html

CCcopy BYcopy $copy Ccopy Federico Gobbo amp Marco Benini 2013

(23 of 23)

Page 15: The epistemology of programming language paradigms

A taxonomy of programming languages

Paraphrasing the three-layered description of programming byHofstadter (1979) the source code is the novel the programmer is the novelist the programming language is the literary genre of the novelTo these levels we can add the executable code is the book the machine is the narratorWe can classify programming languages in various way applying themethod of LoAs we can find only three major paradigms accordingto the kind of information got hidden

(13 of 23)

1 The procedural paradigm

Mainly because of the historical development of computationalmachineries current computers can be seen as structures of vonNeumann machines (Gobbo and Benini 2013)

This class of languages abstracts over the structure of von Neumannmachines by allowing more data types than just computationalnumbers and by allowing more or different instructions than those bythe bare machine

(14 of 23)

The machine in the procedural paradigm

The essential structure of the von Neumann machine is retained anengine operating on a memory via a set of instructions from a fixedset the code is organised as a sequence of elementary instructionseach one modifying the state of the machine mdash the next instructionto execute chosen according to the state

most programming languages allow programs to perform actionsthat change the values of variables or which have otherirreversible effects (input or output for example) we say thatthese actions have side-effect mdash White (2004) in Floridi (2004)

(15 of 23)

2 The declarative paradigm

Historically the von Neumann machine was nothing but one of thepossible models of computation introduced in the beginning of thelast century Other models like Churchrsquos λ-calculus Herbranduniverses stable models etc where proposed and studied To someextent the actual evolutions of these systems are much closer tointeresting problems ie they allow to describe the problem almostdirectly in the terms of their language

Moreover these systems have an instrinsic computational meaningwhich amounts to say that the very description of the problem hidesin itself the algorithm to solve it The programming languages basedon these systems are called declarative

(16 of 23)

The machine in the declarative paradigm

This class of programming languages comprising logical languages asProlog or Answer Set Programming but also the functional languagesas ML or Haskell abstracts over the very structure of the vonNeumann machine

In fact each language in this class provides an abstract machineoperating on a different computational model perfectly described inmathematical terms ndash sometimes before von Neumannrsquos Theprogramming language contains some sort of simulator to enable theexecution of the code on a standard von Neumann architecture

(17 of 23)

3 The object-oriented paradigm

Another approach is by the introduction of the concept of objectwhich is conceived originally on a different LoE philosophically basedon Leibnizrsquos monads and the subsequent adapted notions of 20thcentury physics and biology (Kay 1993)

In fact the object-oriented paradigm abstracts over the organisationof memory and state of a von Neumann architecture by putting alayered structure of abstractions over them

(18 of 23)

The machine in the object-oriented paradigm

One can consider each object-oriented class as a LoA over thememorystate of the hosting machine which is equipped with aninternal map (its implementation) and an external interface (itsLoALoO pair)

These classes are in turn the building blocks for further levels ofabstractions whose aim is to construct the PAPO pair ie the levelsof abstraction the program has to provide to fulfill its goal

(19 of 23)

The relations between the three paradigms

It should be clear that the object-oriented paradigm is orthogonalto the declarative paradigm in fact nothing prevents fromintroducing layers of abstractions over a basically differentorganisation of memory like the database of clauses in Prolog or theheap of functions in Standard ML And of course this has alreadybeen done in many different ways

Also these paradigms can realised in a different degree by a languagefor example in LISP the grandfather of functional languages there isan implicit state while in most modern functional languages thestate is explicit and very limited

(20 of 23)

Observations

Thus the gradients of applications of the previously exposedparadigms allow to naturally place each existing programminglanguage in a multi-dimensional space The fact that thesegradients are not necessarily of a quantitative nature is the deepreason why philosophy and not engineering is the right disciplinewherein to analyse the principles of programming

When dealing with really complex problems which happens in mostcontemporary software design rarely a single language has the rightfeatures to model the whole problem

Probably the universal language is an unreachable dream ashidingshowing some features is essential to solve specific problemsmdash and what to hide in a problem is exactly what one wish to exposein another one

(21 of 23)

Essential References

Backus J (1978) lsquoThe history of FORTRAN I II and IIIrsquo SIGPLAN Not13(8) 165ndash180

Boumlhm C and Jacopini G (1966) lsquoFlow diagrams turing machines and languages withonly two formation rulesrsquo Communications of the ACM 9(5) 366ndash371

Brooks Jr F P (1995) The mythical man-month (anniversary ed) Addison-WesleyLongman Publishing Co Inc Boston MA USA

Ceruzzi P (2003) A history of modern computing History of computing MIT PressDijkstra E W (1968) lsquoLetters to the editor go to statement considered harmfulrsquo

Commun ACM 11(3) 147ndash148Dijkstra E W (2001) What led to notes on structured programming circulated

privatelyFloridi L (2008) lsquoThe method of levels of abstractionrsquo Minds Mach 18 303ndash329Floridi L ed (2004) The Blackwell guide to the philosophy of computing and

information Blackwell LondonGobbo F and Benini M (2013) lsquoFrom ancient to modern computing A history of

information hidingrsquo IEEE Annals of the History of Computing 99(PrePrints)Hofstadter D R (1979) Goumldel Escher Bach An Eternal Golden Braid Basic Books

New YorkKay A C (1993) lsquoThe early history of smalltalkrsquo SIGPLAN Not 28(3) 69ndash95Lloyd J W (1984) Foundations of logic programming Springer-Verlag New York Inc

New York NY USAWhite G (2004) The Philosophy of Computer Languages in Floridi (2004) chapter 18(22 of 23)

Thanks for your attention

Questions

For proposals ideas amp comments

federicogobbounitoit amp marcobeniniuninsubriait

Download amp share these slides herehttpfedericogobbonameen2013html

CCcopy BYcopy $copy Ccopy Federico Gobbo amp Marco Benini 2013

(23 of 23)

Page 16: The epistemology of programming language paradigms

1 The procedural paradigm

Mainly because of the historical development of computationalmachineries current computers can be seen as structures of vonNeumann machines (Gobbo and Benini 2013)

This class of languages abstracts over the structure of von Neumannmachines by allowing more data types than just computationalnumbers and by allowing more or different instructions than those bythe bare machine

(14 of 23)

The machine in the procedural paradigm

The essential structure of the von Neumann machine is retained anengine operating on a memory via a set of instructions from a fixedset the code is organised as a sequence of elementary instructionseach one modifying the state of the machine mdash the next instructionto execute chosen according to the state

most programming languages allow programs to perform actionsthat change the values of variables or which have otherirreversible effects (input or output for example) we say thatthese actions have side-effect mdash White (2004) in Floridi (2004)

(15 of 23)

2 The declarative paradigm

Historically the von Neumann machine was nothing but one of thepossible models of computation introduced in the beginning of thelast century Other models like Churchrsquos λ-calculus Herbranduniverses stable models etc where proposed and studied To someextent the actual evolutions of these systems are much closer tointeresting problems ie they allow to describe the problem almostdirectly in the terms of their language

Moreover these systems have an instrinsic computational meaningwhich amounts to say that the very description of the problem hidesin itself the algorithm to solve it The programming languages basedon these systems are called declarative

(16 of 23)

The machine in the declarative paradigm

This class of programming languages comprising logical languages asProlog or Answer Set Programming but also the functional languagesas ML or Haskell abstracts over the very structure of the vonNeumann machine

In fact each language in this class provides an abstract machineoperating on a different computational model perfectly described inmathematical terms ndash sometimes before von Neumannrsquos Theprogramming language contains some sort of simulator to enable theexecution of the code on a standard von Neumann architecture

(17 of 23)

3 The object-oriented paradigm

Another approach is by the introduction of the concept of objectwhich is conceived originally on a different LoE philosophically basedon Leibnizrsquos monads and the subsequent adapted notions of 20thcentury physics and biology (Kay 1993)

In fact the object-oriented paradigm abstracts over the organisationof memory and state of a von Neumann architecture by putting alayered structure of abstractions over them

(18 of 23)

The machine in the object-oriented paradigm

One can consider each object-oriented class as a LoA over thememorystate of the hosting machine which is equipped with aninternal map (its implementation) and an external interface (itsLoALoO pair)

These classes are in turn the building blocks for further levels ofabstractions whose aim is to construct the PAPO pair ie the levelsof abstraction the program has to provide to fulfill its goal

(19 of 23)

The relations between the three paradigms

It should be clear that the object-oriented paradigm is orthogonalto the declarative paradigm in fact nothing prevents fromintroducing layers of abstractions over a basically differentorganisation of memory like the database of clauses in Prolog or theheap of functions in Standard ML And of course this has alreadybeen done in many different ways

Also these paradigms can realised in a different degree by a languagefor example in LISP the grandfather of functional languages there isan implicit state while in most modern functional languages thestate is explicit and very limited

(20 of 23)

Observations

Thus the gradients of applications of the previously exposedparadigms allow to naturally place each existing programminglanguage in a multi-dimensional space The fact that thesegradients are not necessarily of a quantitative nature is the deepreason why philosophy and not engineering is the right disciplinewherein to analyse the principles of programming

When dealing with really complex problems which happens in mostcontemporary software design rarely a single language has the rightfeatures to model the whole problem

Probably the universal language is an unreachable dream ashidingshowing some features is essential to solve specific problemsmdash and what to hide in a problem is exactly what one wish to exposein another one

(21 of 23)

Essential References

Backus J (1978) lsquoThe history of FORTRAN I II and IIIrsquo SIGPLAN Not13(8) 165ndash180

Boumlhm C and Jacopini G (1966) lsquoFlow diagrams turing machines and languages withonly two formation rulesrsquo Communications of the ACM 9(5) 366ndash371

Brooks Jr F P (1995) The mythical man-month (anniversary ed) Addison-WesleyLongman Publishing Co Inc Boston MA USA

Ceruzzi P (2003) A history of modern computing History of computing MIT PressDijkstra E W (1968) lsquoLetters to the editor go to statement considered harmfulrsquo

Commun ACM 11(3) 147ndash148Dijkstra E W (2001) What led to notes on structured programming circulated

privatelyFloridi L (2008) lsquoThe method of levels of abstractionrsquo Minds Mach 18 303ndash329Floridi L ed (2004) The Blackwell guide to the philosophy of computing and

information Blackwell LondonGobbo F and Benini M (2013) lsquoFrom ancient to modern computing A history of

information hidingrsquo IEEE Annals of the History of Computing 99(PrePrints)Hofstadter D R (1979) Goumldel Escher Bach An Eternal Golden Braid Basic Books

New YorkKay A C (1993) lsquoThe early history of smalltalkrsquo SIGPLAN Not 28(3) 69ndash95Lloyd J W (1984) Foundations of logic programming Springer-Verlag New York Inc

New York NY USAWhite G (2004) The Philosophy of Computer Languages in Floridi (2004) chapter 18(22 of 23)

Thanks for your attention

Questions

For proposals ideas amp comments

federicogobbounitoit amp marcobeniniuninsubriait

Download amp share these slides herehttpfedericogobbonameen2013html

CCcopy BYcopy $copy Ccopy Federico Gobbo amp Marco Benini 2013

(23 of 23)

Page 17: The epistemology of programming language paradigms

The machine in the procedural paradigm

The essential structure of the von Neumann machine is retained anengine operating on a memory via a set of instructions from a fixedset the code is organised as a sequence of elementary instructionseach one modifying the state of the machine mdash the next instructionto execute chosen according to the state

most programming languages allow programs to perform actionsthat change the values of variables or which have otherirreversible effects (input or output for example) we say thatthese actions have side-effect mdash White (2004) in Floridi (2004)

(15 of 23)

2 The declarative paradigm

Historically the von Neumann machine was nothing but one of thepossible models of computation introduced in the beginning of thelast century Other models like Churchrsquos λ-calculus Herbranduniverses stable models etc where proposed and studied To someextent the actual evolutions of these systems are much closer tointeresting problems ie they allow to describe the problem almostdirectly in the terms of their language

Moreover these systems have an instrinsic computational meaningwhich amounts to say that the very description of the problem hidesin itself the algorithm to solve it The programming languages basedon these systems are called declarative

(16 of 23)

The machine in the declarative paradigm

This class of programming languages comprising logical languages asProlog or Answer Set Programming but also the functional languagesas ML or Haskell abstracts over the very structure of the vonNeumann machine

In fact each language in this class provides an abstract machineoperating on a different computational model perfectly described inmathematical terms ndash sometimes before von Neumannrsquos Theprogramming language contains some sort of simulator to enable theexecution of the code on a standard von Neumann architecture

(17 of 23)

3 The object-oriented paradigm

Another approach is by the introduction of the concept of objectwhich is conceived originally on a different LoE philosophically basedon Leibnizrsquos monads and the subsequent adapted notions of 20thcentury physics and biology (Kay 1993)

In fact the object-oriented paradigm abstracts over the organisationof memory and state of a von Neumann architecture by putting alayered structure of abstractions over them

(18 of 23)

The machine in the object-oriented paradigm

One can consider each object-oriented class as a LoA over thememorystate of the hosting machine which is equipped with aninternal map (its implementation) and an external interface (itsLoALoO pair)

These classes are in turn the building blocks for further levels ofabstractions whose aim is to construct the PAPO pair ie the levelsof abstraction the program has to provide to fulfill its goal

(19 of 23)

The relations between the three paradigms

It should be clear that the object-oriented paradigm is orthogonalto the declarative paradigm in fact nothing prevents fromintroducing layers of abstractions over a basically differentorganisation of memory like the database of clauses in Prolog or theheap of functions in Standard ML And of course this has alreadybeen done in many different ways

Also these paradigms can realised in a different degree by a languagefor example in LISP the grandfather of functional languages there isan implicit state while in most modern functional languages thestate is explicit and very limited

(20 of 23)

Observations

Thus the gradients of applications of the previously exposedparadigms allow to naturally place each existing programminglanguage in a multi-dimensional space The fact that thesegradients are not necessarily of a quantitative nature is the deepreason why philosophy and not engineering is the right disciplinewherein to analyse the principles of programming

When dealing with really complex problems which happens in mostcontemporary software design rarely a single language has the rightfeatures to model the whole problem

Probably the universal language is an unreachable dream ashidingshowing some features is essential to solve specific problemsmdash and what to hide in a problem is exactly what one wish to exposein another one

(21 of 23)

Essential References

Backus J (1978) lsquoThe history of FORTRAN I II and IIIrsquo SIGPLAN Not13(8) 165ndash180

Boumlhm C and Jacopini G (1966) lsquoFlow diagrams turing machines and languages withonly two formation rulesrsquo Communications of the ACM 9(5) 366ndash371

Brooks Jr F P (1995) The mythical man-month (anniversary ed) Addison-WesleyLongman Publishing Co Inc Boston MA USA

Ceruzzi P (2003) A history of modern computing History of computing MIT PressDijkstra E W (1968) lsquoLetters to the editor go to statement considered harmfulrsquo

Commun ACM 11(3) 147ndash148Dijkstra E W (2001) What led to notes on structured programming circulated

privatelyFloridi L (2008) lsquoThe method of levels of abstractionrsquo Minds Mach 18 303ndash329Floridi L ed (2004) The Blackwell guide to the philosophy of computing and

information Blackwell LondonGobbo F and Benini M (2013) lsquoFrom ancient to modern computing A history of

information hidingrsquo IEEE Annals of the History of Computing 99(PrePrints)Hofstadter D R (1979) Goumldel Escher Bach An Eternal Golden Braid Basic Books

New YorkKay A C (1993) lsquoThe early history of smalltalkrsquo SIGPLAN Not 28(3) 69ndash95Lloyd J W (1984) Foundations of logic programming Springer-Verlag New York Inc

New York NY USAWhite G (2004) The Philosophy of Computer Languages in Floridi (2004) chapter 18(22 of 23)

Thanks for your attention

Questions

For proposals ideas amp comments

federicogobbounitoit amp marcobeniniuninsubriait

Download amp share these slides herehttpfedericogobbonameen2013html

CCcopy BYcopy $copy Ccopy Federico Gobbo amp Marco Benini 2013

(23 of 23)

Page 18: The epistemology of programming language paradigms

2 The declarative paradigm

Historically the von Neumann machine was nothing but one of thepossible models of computation introduced in the beginning of thelast century Other models like Churchrsquos λ-calculus Herbranduniverses stable models etc where proposed and studied To someextent the actual evolutions of these systems are much closer tointeresting problems ie they allow to describe the problem almostdirectly in the terms of their language

Moreover these systems have an instrinsic computational meaningwhich amounts to say that the very description of the problem hidesin itself the algorithm to solve it The programming languages basedon these systems are called declarative

(16 of 23)

The machine in the declarative paradigm

This class of programming languages comprising logical languages asProlog or Answer Set Programming but also the functional languagesas ML or Haskell abstracts over the very structure of the vonNeumann machine

In fact each language in this class provides an abstract machineoperating on a different computational model perfectly described inmathematical terms ndash sometimes before von Neumannrsquos Theprogramming language contains some sort of simulator to enable theexecution of the code on a standard von Neumann architecture

(17 of 23)

3 The object-oriented paradigm

Another approach is by the introduction of the concept of objectwhich is conceived originally on a different LoE philosophically basedon Leibnizrsquos monads and the subsequent adapted notions of 20thcentury physics and biology (Kay 1993)

In fact the object-oriented paradigm abstracts over the organisationof memory and state of a von Neumann architecture by putting alayered structure of abstractions over them

(18 of 23)

The machine in the object-oriented paradigm

One can consider each object-oriented class as a LoA over thememorystate of the hosting machine which is equipped with aninternal map (its implementation) and an external interface (itsLoALoO pair)

These classes are in turn the building blocks for further levels ofabstractions whose aim is to construct the PAPO pair ie the levelsof abstraction the program has to provide to fulfill its goal

(19 of 23)

The relations between the three paradigms

It should be clear that the object-oriented paradigm is orthogonalto the declarative paradigm in fact nothing prevents fromintroducing layers of abstractions over a basically differentorganisation of memory like the database of clauses in Prolog or theheap of functions in Standard ML And of course this has alreadybeen done in many different ways

Also these paradigms can realised in a different degree by a languagefor example in LISP the grandfather of functional languages there isan implicit state while in most modern functional languages thestate is explicit and very limited

(20 of 23)

Observations

Thus the gradients of applications of the previously exposedparadigms allow to naturally place each existing programminglanguage in a multi-dimensional space The fact that thesegradients are not necessarily of a quantitative nature is the deepreason why philosophy and not engineering is the right disciplinewherein to analyse the principles of programming

When dealing with really complex problems which happens in mostcontemporary software design rarely a single language has the rightfeatures to model the whole problem

Probably the universal language is an unreachable dream ashidingshowing some features is essential to solve specific problemsmdash and what to hide in a problem is exactly what one wish to exposein another one

(21 of 23)

Essential References

Backus J (1978) lsquoThe history of FORTRAN I II and IIIrsquo SIGPLAN Not13(8) 165ndash180

Boumlhm C and Jacopini G (1966) lsquoFlow diagrams turing machines and languages withonly two formation rulesrsquo Communications of the ACM 9(5) 366ndash371

Brooks Jr F P (1995) The mythical man-month (anniversary ed) Addison-WesleyLongman Publishing Co Inc Boston MA USA

Ceruzzi P (2003) A history of modern computing History of computing MIT PressDijkstra E W (1968) lsquoLetters to the editor go to statement considered harmfulrsquo

Commun ACM 11(3) 147ndash148Dijkstra E W (2001) What led to notes on structured programming circulated

privatelyFloridi L (2008) lsquoThe method of levels of abstractionrsquo Minds Mach 18 303ndash329Floridi L ed (2004) The Blackwell guide to the philosophy of computing and

information Blackwell LondonGobbo F and Benini M (2013) lsquoFrom ancient to modern computing A history of

information hidingrsquo IEEE Annals of the History of Computing 99(PrePrints)Hofstadter D R (1979) Goumldel Escher Bach An Eternal Golden Braid Basic Books

New YorkKay A C (1993) lsquoThe early history of smalltalkrsquo SIGPLAN Not 28(3) 69ndash95Lloyd J W (1984) Foundations of logic programming Springer-Verlag New York Inc

New York NY USAWhite G (2004) The Philosophy of Computer Languages in Floridi (2004) chapter 18(22 of 23)

Thanks for your attention

Questions

For proposals ideas amp comments

federicogobbounitoit amp marcobeniniuninsubriait

Download amp share these slides herehttpfedericogobbonameen2013html

CCcopy BYcopy $copy Ccopy Federico Gobbo amp Marco Benini 2013

(23 of 23)

Page 19: The epistemology of programming language paradigms

The machine in the declarative paradigm

This class of programming languages comprising logical languages asProlog or Answer Set Programming but also the functional languagesas ML or Haskell abstracts over the very structure of the vonNeumann machine

In fact each language in this class provides an abstract machineoperating on a different computational model perfectly described inmathematical terms ndash sometimes before von Neumannrsquos Theprogramming language contains some sort of simulator to enable theexecution of the code on a standard von Neumann architecture

(17 of 23)

3 The object-oriented paradigm

Another approach is by the introduction of the concept of objectwhich is conceived originally on a different LoE philosophically basedon Leibnizrsquos monads and the subsequent adapted notions of 20thcentury physics and biology (Kay 1993)

In fact the object-oriented paradigm abstracts over the organisationof memory and state of a von Neumann architecture by putting alayered structure of abstractions over them

(18 of 23)

The machine in the object-oriented paradigm

One can consider each object-oriented class as a LoA over thememorystate of the hosting machine which is equipped with aninternal map (its implementation) and an external interface (itsLoALoO pair)

These classes are in turn the building blocks for further levels ofabstractions whose aim is to construct the PAPO pair ie the levelsof abstraction the program has to provide to fulfill its goal

(19 of 23)

The relations between the three paradigms

It should be clear that the object-oriented paradigm is orthogonalto the declarative paradigm in fact nothing prevents fromintroducing layers of abstractions over a basically differentorganisation of memory like the database of clauses in Prolog or theheap of functions in Standard ML And of course this has alreadybeen done in many different ways

Also these paradigms can realised in a different degree by a languagefor example in LISP the grandfather of functional languages there isan implicit state while in most modern functional languages thestate is explicit and very limited

(20 of 23)

Observations

Thus the gradients of applications of the previously exposedparadigms allow to naturally place each existing programminglanguage in a multi-dimensional space The fact that thesegradients are not necessarily of a quantitative nature is the deepreason why philosophy and not engineering is the right disciplinewherein to analyse the principles of programming

When dealing with really complex problems which happens in mostcontemporary software design rarely a single language has the rightfeatures to model the whole problem

Probably the universal language is an unreachable dream ashidingshowing some features is essential to solve specific problemsmdash and what to hide in a problem is exactly what one wish to exposein another one

(21 of 23)

Essential References

Backus J (1978) lsquoThe history of FORTRAN I II and IIIrsquo SIGPLAN Not13(8) 165ndash180

Boumlhm C and Jacopini G (1966) lsquoFlow diagrams turing machines and languages withonly two formation rulesrsquo Communications of the ACM 9(5) 366ndash371

Brooks Jr F P (1995) The mythical man-month (anniversary ed) Addison-WesleyLongman Publishing Co Inc Boston MA USA

Ceruzzi P (2003) A history of modern computing History of computing MIT PressDijkstra E W (1968) lsquoLetters to the editor go to statement considered harmfulrsquo

Commun ACM 11(3) 147ndash148Dijkstra E W (2001) What led to notes on structured programming circulated

privatelyFloridi L (2008) lsquoThe method of levels of abstractionrsquo Minds Mach 18 303ndash329Floridi L ed (2004) The Blackwell guide to the philosophy of computing and

information Blackwell LondonGobbo F and Benini M (2013) lsquoFrom ancient to modern computing A history of

information hidingrsquo IEEE Annals of the History of Computing 99(PrePrints)Hofstadter D R (1979) Goumldel Escher Bach An Eternal Golden Braid Basic Books

New YorkKay A C (1993) lsquoThe early history of smalltalkrsquo SIGPLAN Not 28(3) 69ndash95Lloyd J W (1984) Foundations of logic programming Springer-Verlag New York Inc

New York NY USAWhite G (2004) The Philosophy of Computer Languages in Floridi (2004) chapter 18(22 of 23)

Thanks for your attention

Questions

For proposals ideas amp comments

federicogobbounitoit amp marcobeniniuninsubriait

Download amp share these slides herehttpfedericogobbonameen2013html

CCcopy BYcopy $copy Ccopy Federico Gobbo amp Marco Benini 2013

(23 of 23)

Page 20: The epistemology of programming language paradigms

3 The object-oriented paradigm

Another approach is by the introduction of the concept of objectwhich is conceived originally on a different LoE philosophically basedon Leibnizrsquos monads and the subsequent adapted notions of 20thcentury physics and biology (Kay 1993)

In fact the object-oriented paradigm abstracts over the organisationof memory and state of a von Neumann architecture by putting alayered structure of abstractions over them

(18 of 23)

The machine in the object-oriented paradigm

One can consider each object-oriented class as a LoA over thememorystate of the hosting machine which is equipped with aninternal map (its implementation) and an external interface (itsLoALoO pair)

These classes are in turn the building blocks for further levels ofabstractions whose aim is to construct the PAPO pair ie the levelsof abstraction the program has to provide to fulfill its goal

(19 of 23)

The relations between the three paradigms

It should be clear that the object-oriented paradigm is orthogonalto the declarative paradigm in fact nothing prevents fromintroducing layers of abstractions over a basically differentorganisation of memory like the database of clauses in Prolog or theheap of functions in Standard ML And of course this has alreadybeen done in many different ways

Also these paradigms can realised in a different degree by a languagefor example in LISP the grandfather of functional languages there isan implicit state while in most modern functional languages thestate is explicit and very limited

(20 of 23)

Observations

Thus the gradients of applications of the previously exposedparadigms allow to naturally place each existing programminglanguage in a multi-dimensional space The fact that thesegradients are not necessarily of a quantitative nature is the deepreason why philosophy and not engineering is the right disciplinewherein to analyse the principles of programming

When dealing with really complex problems which happens in mostcontemporary software design rarely a single language has the rightfeatures to model the whole problem

Probably the universal language is an unreachable dream ashidingshowing some features is essential to solve specific problemsmdash and what to hide in a problem is exactly what one wish to exposein another one

(21 of 23)

Essential References

Backus J (1978) lsquoThe history of FORTRAN I II and IIIrsquo SIGPLAN Not13(8) 165ndash180

Boumlhm C and Jacopini G (1966) lsquoFlow diagrams turing machines and languages withonly two formation rulesrsquo Communications of the ACM 9(5) 366ndash371

Brooks Jr F P (1995) The mythical man-month (anniversary ed) Addison-WesleyLongman Publishing Co Inc Boston MA USA

Ceruzzi P (2003) A history of modern computing History of computing MIT PressDijkstra E W (1968) lsquoLetters to the editor go to statement considered harmfulrsquo

Commun ACM 11(3) 147ndash148Dijkstra E W (2001) What led to notes on structured programming circulated

privatelyFloridi L (2008) lsquoThe method of levels of abstractionrsquo Minds Mach 18 303ndash329Floridi L ed (2004) The Blackwell guide to the philosophy of computing and

information Blackwell LondonGobbo F and Benini M (2013) lsquoFrom ancient to modern computing A history of

information hidingrsquo IEEE Annals of the History of Computing 99(PrePrints)Hofstadter D R (1979) Goumldel Escher Bach An Eternal Golden Braid Basic Books

New YorkKay A C (1993) lsquoThe early history of smalltalkrsquo SIGPLAN Not 28(3) 69ndash95Lloyd J W (1984) Foundations of logic programming Springer-Verlag New York Inc

New York NY USAWhite G (2004) The Philosophy of Computer Languages in Floridi (2004) chapter 18(22 of 23)

Thanks for your attention

Questions

For proposals ideas amp comments

federicogobbounitoit amp marcobeniniuninsubriait

Download amp share these slides herehttpfedericogobbonameen2013html

CCcopy BYcopy $copy Ccopy Federico Gobbo amp Marco Benini 2013

(23 of 23)

Page 21: The epistemology of programming language paradigms

The machine in the object-oriented paradigm

One can consider each object-oriented class as a LoA over thememorystate of the hosting machine which is equipped with aninternal map (its implementation) and an external interface (itsLoALoO pair)

These classes are in turn the building blocks for further levels ofabstractions whose aim is to construct the PAPO pair ie the levelsof abstraction the program has to provide to fulfill its goal

(19 of 23)

The relations between the three paradigms

It should be clear that the object-oriented paradigm is orthogonalto the declarative paradigm in fact nothing prevents fromintroducing layers of abstractions over a basically differentorganisation of memory like the database of clauses in Prolog or theheap of functions in Standard ML And of course this has alreadybeen done in many different ways

Also these paradigms can realised in a different degree by a languagefor example in LISP the grandfather of functional languages there isan implicit state while in most modern functional languages thestate is explicit and very limited

(20 of 23)

Observations

Thus the gradients of applications of the previously exposedparadigms allow to naturally place each existing programminglanguage in a multi-dimensional space The fact that thesegradients are not necessarily of a quantitative nature is the deepreason why philosophy and not engineering is the right disciplinewherein to analyse the principles of programming

When dealing with really complex problems which happens in mostcontemporary software design rarely a single language has the rightfeatures to model the whole problem

Probably the universal language is an unreachable dream ashidingshowing some features is essential to solve specific problemsmdash and what to hide in a problem is exactly what one wish to exposein another one

(21 of 23)

Essential References

Backus J (1978) lsquoThe history of FORTRAN I II and IIIrsquo SIGPLAN Not13(8) 165ndash180

Boumlhm C and Jacopini G (1966) lsquoFlow diagrams turing machines and languages withonly two formation rulesrsquo Communications of the ACM 9(5) 366ndash371

Brooks Jr F P (1995) The mythical man-month (anniversary ed) Addison-WesleyLongman Publishing Co Inc Boston MA USA

Ceruzzi P (2003) A history of modern computing History of computing MIT PressDijkstra E W (1968) lsquoLetters to the editor go to statement considered harmfulrsquo

Commun ACM 11(3) 147ndash148Dijkstra E W (2001) What led to notes on structured programming circulated

privatelyFloridi L (2008) lsquoThe method of levels of abstractionrsquo Minds Mach 18 303ndash329Floridi L ed (2004) The Blackwell guide to the philosophy of computing and

information Blackwell LondonGobbo F and Benini M (2013) lsquoFrom ancient to modern computing A history of

information hidingrsquo IEEE Annals of the History of Computing 99(PrePrints)Hofstadter D R (1979) Goumldel Escher Bach An Eternal Golden Braid Basic Books

New YorkKay A C (1993) lsquoThe early history of smalltalkrsquo SIGPLAN Not 28(3) 69ndash95Lloyd J W (1984) Foundations of logic programming Springer-Verlag New York Inc

New York NY USAWhite G (2004) The Philosophy of Computer Languages in Floridi (2004) chapter 18(22 of 23)

Thanks for your attention

Questions

For proposals ideas amp comments

federicogobbounitoit amp marcobeniniuninsubriait

Download amp share these slides herehttpfedericogobbonameen2013html

CCcopy BYcopy $copy Ccopy Federico Gobbo amp Marco Benini 2013

(23 of 23)

Page 22: The epistemology of programming language paradigms

The relations between the three paradigms

It should be clear that the object-oriented paradigm is orthogonalto the declarative paradigm in fact nothing prevents fromintroducing layers of abstractions over a basically differentorganisation of memory like the database of clauses in Prolog or theheap of functions in Standard ML And of course this has alreadybeen done in many different ways

Also these paradigms can realised in a different degree by a languagefor example in LISP the grandfather of functional languages there isan implicit state while in most modern functional languages thestate is explicit and very limited

(20 of 23)

Observations

Thus the gradients of applications of the previously exposedparadigms allow to naturally place each existing programminglanguage in a multi-dimensional space The fact that thesegradients are not necessarily of a quantitative nature is the deepreason why philosophy and not engineering is the right disciplinewherein to analyse the principles of programming

When dealing with really complex problems which happens in mostcontemporary software design rarely a single language has the rightfeatures to model the whole problem

Probably the universal language is an unreachable dream ashidingshowing some features is essential to solve specific problemsmdash and what to hide in a problem is exactly what one wish to exposein another one

(21 of 23)

Essential References

Backus J (1978) lsquoThe history of FORTRAN I II and IIIrsquo SIGPLAN Not13(8) 165ndash180

Boumlhm C and Jacopini G (1966) lsquoFlow diagrams turing machines and languages withonly two formation rulesrsquo Communications of the ACM 9(5) 366ndash371

Brooks Jr F P (1995) The mythical man-month (anniversary ed) Addison-WesleyLongman Publishing Co Inc Boston MA USA

Ceruzzi P (2003) A history of modern computing History of computing MIT PressDijkstra E W (1968) lsquoLetters to the editor go to statement considered harmfulrsquo

Commun ACM 11(3) 147ndash148Dijkstra E W (2001) What led to notes on structured programming circulated

privatelyFloridi L (2008) lsquoThe method of levels of abstractionrsquo Minds Mach 18 303ndash329Floridi L ed (2004) The Blackwell guide to the philosophy of computing and

information Blackwell LondonGobbo F and Benini M (2013) lsquoFrom ancient to modern computing A history of

information hidingrsquo IEEE Annals of the History of Computing 99(PrePrints)Hofstadter D R (1979) Goumldel Escher Bach An Eternal Golden Braid Basic Books

New YorkKay A C (1993) lsquoThe early history of smalltalkrsquo SIGPLAN Not 28(3) 69ndash95Lloyd J W (1984) Foundations of logic programming Springer-Verlag New York Inc

New York NY USAWhite G (2004) The Philosophy of Computer Languages in Floridi (2004) chapter 18(22 of 23)

Thanks for your attention

Questions

For proposals ideas amp comments

federicogobbounitoit amp marcobeniniuninsubriait

Download amp share these slides herehttpfedericogobbonameen2013html

CCcopy BYcopy $copy Ccopy Federico Gobbo amp Marco Benini 2013

(23 of 23)

Page 23: The epistemology of programming language paradigms

Observations

Thus the gradients of applications of the previously exposedparadigms allow to naturally place each existing programminglanguage in a multi-dimensional space The fact that thesegradients are not necessarily of a quantitative nature is the deepreason why philosophy and not engineering is the right disciplinewherein to analyse the principles of programming

When dealing with really complex problems which happens in mostcontemporary software design rarely a single language has the rightfeatures to model the whole problem

Probably the universal language is an unreachable dream ashidingshowing some features is essential to solve specific problemsmdash and what to hide in a problem is exactly what one wish to exposein another one

(21 of 23)

Essential References

Backus J (1978) lsquoThe history of FORTRAN I II and IIIrsquo SIGPLAN Not13(8) 165ndash180

Boumlhm C and Jacopini G (1966) lsquoFlow diagrams turing machines and languages withonly two formation rulesrsquo Communications of the ACM 9(5) 366ndash371

Brooks Jr F P (1995) The mythical man-month (anniversary ed) Addison-WesleyLongman Publishing Co Inc Boston MA USA

Ceruzzi P (2003) A history of modern computing History of computing MIT PressDijkstra E W (1968) lsquoLetters to the editor go to statement considered harmfulrsquo

Commun ACM 11(3) 147ndash148Dijkstra E W (2001) What led to notes on structured programming circulated

privatelyFloridi L (2008) lsquoThe method of levels of abstractionrsquo Minds Mach 18 303ndash329Floridi L ed (2004) The Blackwell guide to the philosophy of computing and

information Blackwell LondonGobbo F and Benini M (2013) lsquoFrom ancient to modern computing A history of

information hidingrsquo IEEE Annals of the History of Computing 99(PrePrints)Hofstadter D R (1979) Goumldel Escher Bach An Eternal Golden Braid Basic Books

New YorkKay A C (1993) lsquoThe early history of smalltalkrsquo SIGPLAN Not 28(3) 69ndash95Lloyd J W (1984) Foundations of logic programming Springer-Verlag New York Inc

New York NY USAWhite G (2004) The Philosophy of Computer Languages in Floridi (2004) chapter 18(22 of 23)

Thanks for your attention

Questions

For proposals ideas amp comments

federicogobbounitoit amp marcobeniniuninsubriait

Download amp share these slides herehttpfedericogobbonameen2013html

CCcopy BYcopy $copy Ccopy Federico Gobbo amp Marco Benini 2013

(23 of 23)

Page 24: The epistemology of programming language paradigms

Essential References

Backus J (1978) lsquoThe history of FORTRAN I II and IIIrsquo SIGPLAN Not13(8) 165ndash180

Boumlhm C and Jacopini G (1966) lsquoFlow diagrams turing machines and languages withonly two formation rulesrsquo Communications of the ACM 9(5) 366ndash371

Brooks Jr F P (1995) The mythical man-month (anniversary ed) Addison-WesleyLongman Publishing Co Inc Boston MA USA

Ceruzzi P (2003) A history of modern computing History of computing MIT PressDijkstra E W (1968) lsquoLetters to the editor go to statement considered harmfulrsquo

Commun ACM 11(3) 147ndash148Dijkstra E W (2001) What led to notes on structured programming circulated

privatelyFloridi L (2008) lsquoThe method of levels of abstractionrsquo Minds Mach 18 303ndash329Floridi L ed (2004) The Blackwell guide to the philosophy of computing and

information Blackwell LondonGobbo F and Benini M (2013) lsquoFrom ancient to modern computing A history of

information hidingrsquo IEEE Annals of the History of Computing 99(PrePrints)Hofstadter D R (1979) Goumldel Escher Bach An Eternal Golden Braid Basic Books

New YorkKay A C (1993) lsquoThe early history of smalltalkrsquo SIGPLAN Not 28(3) 69ndash95Lloyd J W (1984) Foundations of logic programming Springer-Verlag New York Inc

New York NY USAWhite G (2004) The Philosophy of Computer Languages in Floridi (2004) chapter 18(22 of 23)

Thanks for your attention

Questions

For proposals ideas amp comments

federicogobbounitoit amp marcobeniniuninsubriait

Download amp share these slides herehttpfedericogobbonameen2013html

CCcopy BYcopy $copy Ccopy Federico Gobbo amp Marco Benini 2013

(23 of 23)

Page 25: The epistemology of programming language paradigms

Thanks for your attention

Questions

For proposals ideas amp comments

federicogobbounitoit amp marcobeniniuninsubriait

Download amp share these slides herehttpfedericogobbonameen2013html

CCcopy BYcopy $copy Ccopy Federico Gobbo amp Marco Benini 2013

(23 of 23)