1 / 11

Programming in stages

Programming in stages. K. Rustan M. Leino Principal Researcher Research in Software Engineering ( RiSE ), Microsoft Research, Redmond Visiting Professor Department of Computing, Imperial College London. VSSE 2014, 5 Apr 2014, Grenoble, France. Software engineering. Costly

trapper
Download Presentation

Programming in stages

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Programming in stages K. Rustan M. Leino Principal ResearcherResearch in Software Engineering (RiSE), Microsoft Research, Redmond Visiting ProfessorDepartment of Computing, Imperial College London VSSE 2014, 5 Apr 2014, Grenoble, France

  2. Software engineering • Costly • Two programming problems • Development of software • Maintenance of software

  3. Evolving program complexity • Destructive maintenance vs. staged development • Not just a problem with evolution, but also with initial conception

  4. Example: developing a BDD package • Simple data structures • Reductions • Hash-consing • Caches for performance • Garbage collection and node reuse • Evaluate variable ordering and dynamic change it • Etc.

  5. Helping the developer • Programming language is the developer’s most important tool • Capture more of the design in the program text

  6. Present details at the right time • a) Procedural abstraction • b) Modules and interfaces • Parnas’s decomposition guide, 1972 • c) Subclassing • d) Aspects • Cut points, advice • Not enough focus on correctness and reasoning • e) Refinement • Specification and program are introduced in stages

  7. Program refinement • Ideas • Edsger W. Dijkstra, 1968 • Niklaus Wirth, 1971 • Formalization • Ralph Back, 1978 • Use and extensions • Numerous people, 1980s • Language design • Gries, Prins, Volpano, mid and late 1980s • Doug Smith: KIDS, 1980s • Jean-Raymond Abrial: the B method, Event-B, 1990s and 2000s

  8. Dafny • Programming language and system designed with reasoning in mind • Research tool • Interplay between language, verifier, compiler, IDE • Push the envelope in automatic verification • Try combination of language features • Applications • Ironclad (MSR), ExpressOS (UIUC) • Teaching • Imperial College London, Rice U., Caltech, Moscow State U., KSU, NUI Maynooth, ETH Zurich, UW, U. Iowa, KoçU., UNSW, Princeton, CMU, Eindhoven TU, Ohio State U., FCT Universidade Nova de Lisboa, U. Basque Country, U. Southhampton, …

  9. Refinement in Dafny Joint work with Jason Koenig • Reduction of non-determinism • Superposition • No direct support for data refinement • Use superpositions and ghost variables instead • Refinement is provided as a structuring device • Refinements have to be anticipated • “Shims” already in place

  10. Demos Specification M0: Model implementation Verify M1: Client Simple implementation Compile Optimized client M2: Optimized implementation Compile M3:

  11. Conclusions • Preserve, in the program text, more design decisions and the design evolution • Refinement allows programs to be structured in stages • Layer the complexity, not just the call graph • Language design for refinement • What constructs to use? • How to make more independent of formality? • Evaluation • Is the mental overhead really lower? • Is maintenance really cheaper this way?

More Related