Presentation is loading. Please wait.

Presentation is loading. Please wait.

Refinement, reusable libraries, instantiable classes K. Rustan M. Leino Research in Software Engineering (RiSE) Microsoft Research, Redmond Joint work.

Similar presentations


Presentation on theme: "Refinement, reusable libraries, instantiable classes K. Rustan M. Leino Research in Software Engineering (RiSE) Microsoft Research, Redmond Joint work."— Presentation transcript:

1 Refinement, reusable libraries, instantiable classes K. Rustan M. Leino Research in Software Engineering (RiSE) Microsoft Research, Redmond Joint work with Kuat Yessenov, MIT IFIP WG 2.3 meeting Santa Barbara, CA 20 January 2011

2

3 Raise level of abstraction of programming languages Connect modeling and programming Simulate, test, model check, verify at all levels of the design

4 Higher-level data structures No loops Allow as much as possible … K. Rustan M. Leino

5 Bertrand’s programmer spectrum: Casual, Professional, Critical Refinement has had success for Critical Can refinement help Professional? What are good examples? How? Textual model for language? What IDE features? K. Rustan M. Leino

6 Critical embedded systems fixed variables and memory write code from scratch Professional applications programs dynamic variables and memory reuse libraries  Is refinement up to this? K. Rustan M. Leino

7 class Cell { var data: int; } class Counter { var n: int; method Init() { n := 0; } method Inc() { n := n + 1; } method Get() returns (k: int) { k := n; } method M() returns (c: Cell) { } } K. Rustan M. Leino

8 method Main() { var cnt := new Counter; … call s := cnt.Get(); call t := cnt.Get(); assert s = t; } K. Rustan M. Leino

9 method Main() { var cnt := new Counter; … call s := cnt.Get(); call c := cnt.M(); c.data := c.data + 1; call t := cnt.Get(); assert s = t; } K. Rustan M. Leino

10 class CounterImpl refines Counter { var cell: Cell; coupling-invariant n = cell.data; … method Get() returns (k: int) { k := cell.data; } method M() returns (c: Cell) { c := cell;} K. Rustan M. Leino


Download ppt "Refinement, reusable libraries, instantiable classes K. Rustan M. Leino Research in Software Engineering (RiSE) Microsoft Research, Redmond Joint work."

Similar presentations


Ads by Google