Design Compiler Verification
Design Compiler Verification
Design Compiler Verification
Verifying compiler
Group Members
Function sum(int[]items)->(int r)
Requires all {iin0..|items||items[i]>=0}
Ensures r>=0:
//
Int i=0
Int r=0
While i<|items|where i>=0&&r>=0:
r=r+items[i]
i=i+1
Return r
Type checking is separate from
verification
Function f(int|null x)->bool|null:
//
If x is int && x>=0:
Return true
Else if x is int &&x<0:
Return false
else:
Return x
Verification Approaches
Testing-based approach
Test and validation suite to verify compilers
Test suite to qualify the compiler’s output
Formal method-based approach
Formal verification of compilers
Formal verification of compiler’s output.
Translation validation to check the correctness of the compilation
Conclusion