Lec 20, Fixpoint Theory, Static Analysis
CS 6110, Software Correctness Analysis, Spring 2023
Ganesh Gopalakrishnan
School of Computing
University of Utah
Salt Lake City, UT 84112
Outline, Motivations
The topic is vast; good material online also
Gives me a chance to talk about Fixpoints also
Overview of fixpoints
Overview of fixpoints
Overview of fixpoints: Mutual Recursion
Overview of fixpoints
Overview of fixpoints
Overview of fixpoints
Overview of fixpoints
Overview of fixpoints
Overview of fixpoints
Overview of fixpoints: BDDs to compute … these were done using an interactive BDD calculator called BED
We can revive such a system and write a CTL forward model-checker or a backward checker…
Overview of fixpoints using CTL (McMillan)
Overview of fixpoints
Overview of fixpoints
Overview of fixpoints
Overview of fixpoints: in solving for recursion
Overview of fixpoints: in solving for recursion
If you lambda-abstract F and write it in fixpoint form we get'
F = lambda x: lambda y: (x==y) → y+1 , F(x, F(x-1, y+1))
or
F = [ lambda G : (lambda x : lambda y: (x==y) → y+1 , G(x, G(x-1, y+1))) ] F
Thus compute the LFP of
[ lambda G : (lambda x : lambda y: (x==y) → y+1 , G(x, G(x-1, y+1))) ]
by starting with F_0 = bottom (fully undefined function
F_1 = [ lambda G : (lambda x : lambda y: (x==y) → y+1 , G(x, G(x-1, y+1))) ] F_0
This reduces to F_1 = lambda x: lambda y: (x==y) → y+1 , bottom
In the limit, we get f3 .
f1 and f2 are unattainable (through computational rules) fixpoints!
E.g., Analysis (from Moller/Schwartzbach)
E.g., Analysis (from Moller/Schwartzbach)
E.g., Analysis (from Moller/Schwartzbach)
E.g., Analysis (from Moller/Schwartzbach)
E.g., Analysis (from Moller/Schwartzbach)
See the recursion here!
E.g., Analysis (from Moller/Schwartzbach)
E.g., Analysis (from Moller/Schwartzbach)
Flow-Sensitive Type Inference
Lattice-Engineering is important!
Solving Recursion
The “f” function that is recursively defined
Has an increasing chain of approximations
Going top to bottom
And these functions can all
Be situated in
Lattice-Like structures
(often Complete Partial Orders)
Lattices in Circuit Simulation
Definitions pertaining to lattices in Alloy
Lattices in Alloy
Static Analysis
Why Prolog? Why Prolog in 6110?
Prolog Illustration: �a ‘map’ of linearly situated states a,b,c,d,e,f
Prolog Illustration: �a ‘map’ of linearly situated states a,b,c,d,e,f
Prolog Illustration: �appending lists reversed (and a 2-line Append relation)
Unification in type-inference : We will study flow-insensitive type inference
Unification in type-inference
Unification in type-inference
Unification in type-inference
Unification in type-inference