A Computational Model For SAT-based Verification of Hardware-Dependent Low-Level Embedded System Software
A Computational Model For SAT-based Verification of Hardware-Dependent Low-Level Embedded System Software
A Computational Model For SAT-based Verification of Hardware-Dependent Low-Level Embedded System Software
SAT-based Verification
of
Hardware-Dependent Low-Level
Embedded System Software
Bernard Schmidt, Carlos Villarraga, Jrg Bormann,
Yokohama, 1/25/2013
Content
Motivation
Related Works
Model Generation
Basis: Abstract HW/SW Model
Flow
Advantages of Model
Experiment
Conclusion / Future Work
Motivation
Embedded System
Goal
Close interaction
between HW and SW
Examples: drivers,
communication
structures
Related Works
[2] R. Jhala and R. Majumdar, Software model checking, ACM Comput. Surv., vol. 41, pp. 21:121:54, October 2009.
[3] T. Ball, A. Podelski, and S. K. Rajamani, Boolean and Cartesian Abstraction for Model Checking C Programs, in Proceedings of the
7th International Conference on Tools and Algorithms for the Construction and Analysis of Systems, ser. TACAS 2001. London, UK:
Springer-Verlag, 2001, pp. 268283.
[4] D. Beyer, T. A. Henzinger, R. Jhala, and R. Majumdar, The software model checker Blast: Applications to Software Engineering, Int.
J. Softw. Tools Technol. Transf., vol. 9, pp. 505525, October 2007.
[5] P. Godefroid, Model
Checking for Programming Languages using VeriSoft, in Proceedings of the 24th ACM SIGPLAN-SIGACT
Sympo-sium on Principles of Programming Languages, ser. POPL 97. New York, NY, USA: ACM, 1997, pp. 174186.
[6] K. Havelund and Thomas Pressburger, Model Checking Java Programs Using Java PathFinder, International Journal on Software
Tools for Technology Transfer STTT, vol. 2, no. 4, pp. 366381, 2000.
[7] G. J. Holzmann, The model checker spin, IEEE Transactions On Software Engineering, 1997.
[8] D. Babic and A. J. Hu, Calysto: scalable and precise extended static checking, in Proceedings of the 30th International Conference on
Software Engineering,
ser. ICSE 08. New York, NY, USA: ACM, 2008, pp. 211220.
[9] F.Ivancic, Z. Yang, M. Ganai, A. Gupta, and P. Ashar, Efficient SATbased bounded model checking for software verification, in Proc.
In- ternational Symposium on Leveraging Applications of Formal Methods, 2004.
[10] E. Clarke, D. Kroening, and K. Yorav, Behavioral consistency of C and Verilog programs using Bounded Model Checking, in
Proceedings of the 40th annual Design Automation Conference, ser. DAC 03. New York, NY, USA: ACM, 2003, pp. 368371.
[11] D. W. Currie, A. J. Hu, and S. Rajan, Automatic formal verification of DSP software, in Proceedings of the 37th Annual Design
Automation Conference, ser. DAC 00. New York, NY, USA: ACM, 2000, pp. 130135.
[12] B. Schlich, Model checking of software for microcontrollers, ACM Trans. Embed. Comput. Syst., vol. 9, no. 4, pp. 36:136:27, Apr.
2010.
[13] C. S. Psreanu and W. Visser, A survey of new trends in symbolic execution for software testing and analysis, Int. J. Softw. Tools
Technol. Transf., vol. 11, no. 4, pp. 339353, Oct. 2009.
[14] T. Arons, E. Elster, S. Ozer, J. Shalev, and E. Singerman, Efficient symbolic simulation of low level software, in Design, Automation
and Test in Europe, 2008. DATE 08, march 2008, pp. 825 830.
[15] M. D. Nguyen, M. Wedler, D. Stoffel, and W. Kunz, Formal Hardware/Software Co-Verification by Interval Property Checking with
Abstraction, in Proceedings of the 48th Design Automation Conference, ser. DAC 11. New York, NY, USA: ACM, 2011, pp. 510515.
[16] D. Groe, U. Khne, and R. Drechsler, HW/SW co-verification of embedded systems using bounded model checking, in GLSVLSI
06: Proceedings of the 16th ACM Great Lakes symposium on VLSI, 2006, pp. 4348.
[17] A. Biere, A. Cimatti, E. M. Clarke, M. Fujita, and Y. Zhu, Symbolic model checking using SAT procedures instead of BDDs, in Proc.
International Design Automation Conference (DAC), June 1999, pp. 317320
Our focus:
New computational model for
hardware-dependent SW
Basic approach:
Unroll CPU + software in memory
Basic approach
Basic approach
is not compositional
8
Our Approach
New hardware-dependent computational model
Input Ports
Program
Instruction
Logic
State
(AS, memory
variables)
w
Program Control
Program
Counter
jump
Data Path
destination
Output Ports
Program
10
ADD
Program
PS
Output
Ports
Output
Ports
MUL
PS
MOV
...
(PC) a
ROT
Data Path
w
LOAD
Program Control
(icode) w
jump
Input Ports
State
(AS, memory
variables)
Instruction
Logic
destination
BEQ
Program
Counter
w
Program
J
11
Instruction Cell
program state
Hardware-dependent
new
program state
12
Program State
program state
Registers
new
program state
13
Active Signal
1st step
2nd step
Final EXG
always
inactive?
Execution graph:
always
inactive?
always
inactive!
15
Branch instruction
program state
Generated property:
taken
not
taken
16
PN generation
Merge cell
Advantages of PN Model
Replacing EXG nodes by instruction cells
PN is a combinational circuit
CFG-based unrolling
Supports SAT-based FV
Active flags:
Example:
a
Property:
A: = true
C: if b.active
then b=a
20
Interrupt-driven
21
Model generation:
Program
component
LIN-Init
LIN-Scheduler
LIN-ISR
#instructions
CFG
PN
225
385
85
790
84
1138
CPU mem.
(s) (MB)
1.32
36
0.13
11.00
27
102
22
CPU(s)
MEM(MB)
17
28
15
14
1641
1545
1584
1566
Conclusion
Future Work
Equivalence checking
Integrate PN with hardware for FV of firmware
24
Thank you!
Questions?