Tomas Petricek, University of Cambridge
http://tomasp.net | tomas@tomasp.net | @tomaspetricek
If trials of three or four simple cases have been made, and are found to agree with the results given by the engine, it is scarcely possible that there can be any error (...).
Charles Babbage, On the mathematical
powers of the calculating engine (1837)
Errors in coding were only gradually recognized to be a significant problem: a typical early comment was that of Miller [circa 1949], who wrote that such errors, along with hardware faults, could be "expected, in time, to become infrequent".
Mark Priestley, Science of Operations (2011)
One of the goals (..) was to utilize the resources of logic to increase
the confidence (..) in the correctness of a program. As McCarthy had
put it, "[instead] of debugging a program, one should prove that it
meets its specifications (...)".Mark Priestley, Science of Operations (2011)
Tries to make proof a part of programming practice
[T]oday most people who write software (...) assume that the costs of formal program verification outweigh the benefits. The purpose of this book is to convince you that the technology of program verification is mature enough today (...).
Adam Chlipala, Certified Programming
with Dependent Types (2013)
Dream for the last 50 years
Common point of view in academic
programming language community
Mixed success in practice
Solid engineering practices are often good enough.
Testing software is one such practice.
[In TDD] we drive development with automated tests (...). We
- write new code only if an automated test has failed
- eliminate duplication.
These are two simple rules, but they generate complex
individual and group behavior (...).Kent Beck, Test-Driven
Development by Example (2003)
TDD incorporates miscomputation
as a part of the development cycle!
Tests serve as specification and documentation
Created by Ericsson for telecomunications
Distributed long-running reliable systems
- exceptions occur when the run-time does not know what to do.
- errors occur when the programmer doesn’t know what to do.
Joe Armstrong, Programming reliable systems (2003)
Errors are expected. Specification does not cover all cases.
What kind of code must the programmer write when they find an error? The philosophy is let some other process fix the error, but what does this mean for their code? The answer is let it crash.
Joe Armstrong, Programming reliable systems (2003)
Miscomputation is a normal part of execution.
(Should we still call it miscomputation?)
[Smalltalk approach] to the design of programming languages [is] quite different from what was familiar in the Algol [programme].
Programming was not thought of as the task of constructing a linguistic entity, but rather as a process of working interactively with the semantic representation of the program, using text as one possible interface.
Mark Priestley, Science of Operations (2011)
Live coding environments for performing music
In musical genres that are not notated so closely (...), there are no wrong notes – only notes that are more or less appropriate to the performance.
Alan Blackwell and Nick Collins, The Programming Language as a Musical Instrument (2005
[Live coders] may well prefer to accept the results of an imperfect execution. [They] might perhaps compensate for an unexpected result by manual intervention, or even accept the result as a serendipitous alternative to the original note.
Alan Blackwell and Nick Collins, The Programming Language as a Musical Instrument (2005)
Make miscomputations more apparent.
Enable quick human intervention.
Not limited to live coded art performances!
Not all miscomputation is bad
(Is it still a miscomputation when it's expected?)
Different research programmes
(No approach is better in general)