provable apis

12
PROVABLE APIS Q.E.D. Hour 2

Upload: verena

Post on 22-Feb-2016

32 views

Category:

Documents


0 download

DESCRIPTION

Q.E.D. Hour 2. Provable APIs. Homework. Let M be a movement with 1 degree of freedom. Let g(M) be the number of gears in M. Let c(M) be the number of connections in M. Prove c(M) = g(M)-1. Start with one gear. Let M 0 be the movement having one gear. g(M 0 ) = 1. c(M 0 ) = 0. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Provable APIs

PROVABLE APISQ.E.D. Hour 2

Page 2: Provable APIs

Homework Let M be a movement with 1 degree of

freedom. Let g(M) be the number of gears in M. Let c(M) be the number of connections

in M. Prove c(M) = g(M)-1.

Page 3: Provable APIs

Start with one gear Let M0 be the movement having one

gear. g(M0) = 1. c(M0) = 0. c(M0) = g(M0)-1.

Page 4: Provable APIs

Add one gear Let Mj+1 be a movement constructed by adding

one gear to Mj. Assume c(Mj) = g(Mj)-1. Prove c(Mj+1) = g(Mj+1)-1. g(Mj+1) = g(Mj)+1. c(Mj+1) = c(Mj)+1. c(Mj+1) = g(Mj)-1 + 1. c(Mj+1) = g(Mj+1)-1. Q.E.D.

Page 5: Provable APIs

Bertrand MeyerOnly through a precise definition of every module’s claims and responsibilities can we home to attain a significant degree of trust in large software systems.

Page 6: Provable APIs

Unhelpful API

Page 7: Provable APIs

Parameters

Page 8: Provable APIs

Callbacks

Page 9: Provable APIs

Foreign keys

Page 10: Provable APIs

Factories

Page 11: Provable APIs

Constructors

Page 12: Provable APIs

Q.E.D.