- Количество слайдов: 25
The Verifying Compiler: a Grand Challenge for Computing Research Tony Hoare Leiden 5 November, 2003
Typical Grand Challenges Prove Fermat’s last theorem Put a man on the moon Cure cancer within ten years Map the Human Genome Map the Human Proteome Find the Higgs boson Find Gravity waves Unify the four forces of Physics Hilbert’s program for math foundations (accomplished) (failed in 1970 s) (accomplished) (too difficult now) (in progress) (abandoned 1930 s)
In Computing Science Prove that P is not equal to NP (open) The Turing test (outstanding) The verifying compiler (abandoned in 1970 s) A championship chess program (completed 1997) A GO program at professional standard (too hard) Machine translation English to Russian (failed in 1960 s)
A Grand Challenge n Is a fifteen-year project n With world-wide participation, n And clear test of success or failure. n It offers fundamental and radical advance n In basic Science or Engineering.
A Grand Challenge needs n Maturity of the state of the art n General support from the international scientific community n Long-term commitment from the teams who engage in it n Understanding from funding agencies
The Verifying Compiler A verifying compiler uses automated mathematical and logical reasoning to check the correctness of the programs that it compiles. Correctness is specified by types, assertions, and other redundant annotations that are associated with the code of the program.
Test of success On completion of the project, significant and representative samples of software products will be mechanically verified. n Each sample will be suitable to replace existing software in routine use, and to serve as a basis for further software evolution. n A prototype verifying compiler will be available as part of a software engineering toolset n
GC criteria n Fundamental n Beneficial n Historical n Revolutionary n Astonishing n Feasible n Idealistic n Risky n Inspiring n Rare
Fundamental How does a software system work? n Annotation of interfaces explains how. n Why does it work? n The theory of programming explains why. n A verifying compiler checks the correctness of the answers… n And enables the engineer to exploit the basic science. n
Historical. n The prestigious challenges are those which were formulated long ago; without concerted effort, they would be likely to stand for many years to come. n The challenge of program verification goes back to Turing (1948), Mc. Carthy (1962), Floyd (1967).
Idealistic n The project does not duplicate commercially motivated evolution of existing products. n Commercial tools follow market demand, and discover more and more faults; only academic research pursues ideals of purity, accuracy, completeness and correctness.
Astonishing n It gives scope for engineering ambition to build something useful that was earlier thought impractical. n It is amazing that computers can check the correctness of their own programs, using logical proof in the same way as mathematicians through the ages.
Testable The project has a clear measure of success or failure at the end; and ideally, at intermediate stages too. n A verifying compiler will certify total correctness of embedded software up to 10 k lines, the safety of critical systems up to 100 k lines, and the soundness and security of software up to a million lines. Many subtle bugs will be found and removed. n
Inspiring n The goals are generally comprehensible, and capture the imagination of the general public, as well as the esteem of scientists in other disciplines n The general public is well aware of the problem of software errors, and should welcome an attempt by computer scientists to solve a problem attributed to their own creation.
Beneficial n The understanding and knowledge gained after completion of the project could bring scientific, economic or social benefits. n Reduction in program errors could save $22 -60 billion per year in US (US Dept. Commerce Planning Report 02 -03, May 2002 ).
Revolutionary. n The project involves a paradigm shift in scientific research practices. n At present large-scale long-term projects are rare among computer scientists. So is co-operation between theorists, tool-builders and tool users.
The team must include … Programming theorists n Programming tool-set builders n Compiler writers and optimisers n Sympathetic users n Open source code contributors n Proof-tool builders, model checkers, … n Teachers and students can help n
Feasible. n The reasons for previous failure to meet the challenge are well understood and believable plans are under way to overcome them. Gigabytes and Gigacycles are now cheap n Beneficiaries number in billions n The state of the art is much advanced n
State of the art n n n Smart-card applications have been manually proved (eg. Logica). Safety-critical systems have been developed from specification (eg. Praxis). Commodity software includes many assertions (eg. Microsoft Office) Open Source software is freely available for research as well as use (eg. Apache). Programming theories cover O-O and concurrency (eg. this conference)
Available Tools Assertion generators (eg. DAIKON) n Program analysers (eg. PREfix, SPLINT) n Abstract Syntax Tree compiler (eg. PREfast) n Verification Condition Generator (eg. ESC) n Program Development Environment (eg. B) n Theorem provers (eg. simplify, HOL) n Decision procedures (eg. SAT, PVS) n Model checkers (eg. SPIN, FDR) n
Risks Poor quality of legacy code/languages. n Errors are just missing preconditions. n Errors are exploited for functionality or compatibility reasons. n Spec of external interfaces impractical. n Build/configuration files can’t be proved. n Multiple languages in a single application. n
Rare Requires maturity of the Science n (but not too mature) n Requires general support of the many n Long-term commitment of the few n Sympathy from funding agencies n It is hard to start the bandwagon n
Early decisions What language(s)? n What compiler/loaders/run-time checkers? n Which particular applications? n Smartcard n Embedded n Critical n Commodity n n What collaborators?
Timetable n 2005 start of project n 2010 smartcard software proved correct n 2015 critical applications proved safe n 2020 commodity software proved secure
Acknowledgements Jim Woodcock n Greg Morrisett n Jay Misra n Peter O’Hearn n Richard Bornat n Carl Gunter n and many others n