Introduction Information flow example WCET example
Contracts as a support to static analysis of
- pen systems
Work in progress Nadia Bel Hadj Aissa Dorina Ghindici Gilles Grimaud Isabelle Simplot-Ryl
INRIA/LIFL/Univ. Lille 1
FLACOS’07 1 / 13
Contracts as a support to static analysis of open systems Work in - - PowerPoint PPT Presentation
Introduction Information flow example W CET example Contracts as a support to static analysis of open systems Work in progress Nadia Bel Hadj Aissa Dorina Ghindici Gilles Grimaud Isabelle Simplot-Ryl INRIA/LIFL/Univ. Lille 1 FLACOS07 1
Introduction Information flow example WCET example
FLACOS’07 1 / 13
Introduction Information flow example WCET example
◮ Precision of the abstract domains ◮ Restriction of the input domains
FLACOS’07 2 / 13
Introduction Information flow example WCET example
◮ Exact types computation ◮ Extra-knowledge: call graph, class hierarchy
FLACOS’07 3 / 13
Introduction Information flow example WCET example
◮ New code must respect required contracts
◮ New code uses contracts of old code
FLACOS’07 4 / 13
Introduction Information flow example WCET example
◮ New code must respect required contracts
◮ New code uses contracts of old code
FLACOS’07 4 / 13
Introduction Information flow example WCET example
◮ New code must respect required contracts
◮ New code uses contracts of old code
FLACOS’07 4 / 13
Introduction Information flow example WCET example
◮ New code must respect required contracts
◮ New code uses contracts of old code
FLACOS’07 4 / 13
Introduction Information flow example WCET example
adds new contracts/ updates requires/generates requires/generates checks contracts of
FLACOS’07 5 / 13
Introduction Information flow example WCET example
FLACOS’07 6 / 13
Introduction Information flow example WCET example
FLACOS’07 7 / 13
Introduction Information flow example WCET example
FLACOS’07 7 / 13
Introduction Information flow example WCET example
◮ For native methodes ➠ trusted base ◮ For conceptions reasons ➠ verified when the code arrives
◮ Set to the greatest element of the lattice ➠ respected by
◮ We are not able to infer the missing contracts yet FLACOS’07 8 / 13
Introduction Information flow example WCET example
◮ Estimation of execution time of basic blocks ◮ Bound of the number of iterations ◮ . . .
◮ Usually: for each method invocation, the algorithm is called
◮ For polymorphic calls
C’⊑C W(C′.m)
FLACOS’07 9 / 13
Introduction Information flow example WCET example
Class L
f()
Class P
m()
Class X Class Z
m()
Class Y
m()
public void f (P o) { … O .m(); … }
25 ms 46 ms 210 ms
FLACOS’07 9 / 13
Introduction Information flow example WCET example
◮ estimation of single execution time ◮ bound of the number of iterations ◮ . . .
◮ In closed world: for each method invocation, the algorithm
◮ For polymorphic calls
C’⊑C W(C′.m)
FLACOS’07 9 / 13
Introduction Information flow example WCET example
FLACOS’07 10 / 13
Introduction Information flow example WCET example
FLACOS’07 10 / 13
Introduction Information flow example WCET example
◮ No need to solve equation ➠ only replace the unknown by
◮ When contracts have several unknowns ➠ first in is right
FLACOS’07 11 / 13
Introduction Information flow example WCET example
◮ If W(B.m) is known, check that W(B.m) ≥ W(C.m) and
◮ Else check that W(C.m) respects the pending contracts
FLACOS’07 12 / 13
Introduction Information flow example WCET example
FLACOS’07 13 / 13