• Keine Ergebnisse gefunden

4.5 Handling floating points dominated C-programs – experiments in industrial-

4.5.6 BTC-ES benchmarks

We interface our tool with BTC-ES AG tools interfaces in order to verify large-scale problems that come from real life applications with CFG-based representation. From BTC-ES AG, the C-code embedded program is auto-generated from Simulink model. After that, the auto-generated code will be simplified/elaborated to SMI code. At this point, our interface comes to the scene by converting the latter SMI code to corresponding iSAT3-CFG syntax such that the wholewhile-loop in SMI code will be considered as a complete CFG program in iSAT3.8

In this subsection, we concisely show a result of verifying 18 benchmarks given by BTC-ES AG. These benchmarks represent several test-cases generated from SMI code. In each benchmark, the model checker is asked whether the negation of invariant is reachable or not. Four test cases are safe, because there exists no counterexample such that it violates the invariant of the model.

The others have been reported with unsafe verdicts, since they contain counterexamples at different depths as shown in Table4.4. We verify the list of converted BTC benchmarks by using several options:

• CEGAR with ITP, where refinement is performed by using inductive interpolants, however the abstraction is progressively verified by using interpolation-based model checking approach.

• CEGAR with BMC , where refinement is performed by using inductive interpolants too, however the abstraction is verified by using bounded model checking till depth 250. This combination takes the advantage of using CEGAR to avoid the state space explosion, and the advantage of using BMC to dis/prove bounded safety.

• (ITP) interpolation-based model checking approach is used, where McMillan’s rules are employed (cf. Subsection 4.2.3).

8We refer to the fact that BTC-ES tools treat each execution of the wholewhile-loop as one step in contrast to our approach. Thus, our step is a micro-step in comparison to BTC-ES terminology.

4.5. HANDLING FLOATING POINTS DOMINATED C-PROGRAMS – EXPERIMENTS IN INDUSTRIAL-SCALE

ProgramfeaturesApproachiSAT3iSAT3iSAT3iSAT3iSAT3 CEGAR,BMCtill250,FPCEGAR,ITP,FPITP,FPBMC,max-depth250,FPBMC,max-preprocess250,FP NoName Non-linear Loops

#Nodes

#Edges Time(s) Memory(KB) Iteration Result Time(s) Memory(KB) Iteration Result Time(s) Memory(KB) Depth Result Time(s) Memory(KB) Depth Result Time(s) Memory(KB) Depth Result

1btc_test000133306527TO461400126UNKNOWNTO472392114UNKNOWNTO175703246UNKNOWN3587.5438328048121UNSAFE2208.3449502356121UNSAFE 2btc_test000233304522TO679860108UNKNOWNTO68177297UNKNOWNTO192967672UNKNOWN1101.5588301284125UNSAFE1006.0239605640125UNSAFE 3btc_test000333326557TO660352117UNKNOWNTO1891528107UNKNOWNTO187993250UNKNOWN3723.34711249848143UNSAFE3098.89611587728143UNSAFE 4btc_test000433330570TO46747682UNKNOWNTO54614067UNKNOWNTO190269224UNKNOWNTO10540136122UNKNOWNaTO11572152130UNKNOWNb 5btc_test000533326557TO664740118UNKNOWNTO1513140108UNKNOWNTO184311636UNKNOWN4285.10811395676143UNSAFE4365.19911868120143UNSAFE 6btc_test000633314538TO475568118UNKNOWNTO510964109UNKNOWNTO168127636UNKNOWN3925.0228769804129UNSAFE3055.0899699020129UNSAFE 7btc_test000733300515TO655108120UNKNOWNTO1085276112UNKNOWNTO173666848UNKNOWN2451.9137206168121UNSAFE1408.4408525276121UNSAFE 8btc_test000833306445804.17936031228MODELERROR1173.90441058428MODELERROR739.866144290020SAFE21.336197525236MODELERROR41.015313800436MODELERROR 9btc_test000933314538TO481200114UNKNOWNTO511900107UNKNOWNTO160075646UNKNOWN4186.5398644148129UNSAFE2889.2009605472129UNSAFE 10btc_test001033300436407.35535305623MODELERROR821.63237103623MODELERROR431.567170368828SAFE13.168154612832MODELERROR35.852282630432MODELERROR 11btc_test001133312535TO685556103UNKNOWNTO68739288UNKNOWNTO205767262UNKNOWN1977.3828715148129UNSAFE1484.23410074184129UNSAFE 12btc_test001233326477284.87936578014MODELERROR707.92538132014MODELERROR270.010207226828SAFE7.89193457616MODELERROR40.755328397616MODELERROR 13btc_test0013333404961275.80139889226MODELERROR1855.94947965626MODELERROR1600.442172570420SAFE19.435224363232MODELERROR46.200376041232MODELERROR 14btc_test001433306526TO687248105UNKNOWNTO68044891UNKNOWNTO203864070UNKNOWN1984.3028603456127UNSAFE925.9909952384127UNSAFE 15btc_test001533300515TO655476124UNKNOWNTO1086608112UNKNOWNTO165121252UNKNOWN2271.0467341844121UNSAFE1162.6198529512121UNSAFE 16btc_test001633332568TO688348102UNKNOWNTO63627293UNKNOWNTO225154856UNKNOWNTO12477784146UNKNOWN4488.25713024712147UNSAFE 17btc_test001733300515TO665956125UNKNOWNTO1019304114UNKNOWNTO167276842UNKNOWN2061.1617307576121UNSAFE1326.0448453152121UNSAFE 18btc_test001833314538TO481056114UNKNOWNTO507320106UNKNOWNTO173064434UNKNOWN5033.5788648460129UNSAFE3045.8129517036129UNSAFE Table4.4:Verificationresultsoflinear/non-linearBTCmodelswhilesupportingIEEE754standardforfloatingpoints.Thesemodels areconvertedtoiSAT-CFGsyntaxthenverified.Allbenchmarkscontainloopsandpolynomials,butnotranscendental functions.IncaseofboundedmodelcheckingtechniquesasinBMCorpreprocessing,iftheresultisSAFE,itmeanstill depth250.Generally,iftheresultisMODELERROR,itmeansthemodelisSAFEindependentofproblem-depth.These resultswereobtainedwhilerunningtestsonAMDOpteron(tm)Processor6328@2.0GHZwith505GBRAM. aWhentheverificationtimeislimitedto180minutes,thiscaseisreportedasUNSAFEatdepth131with8457sand10.5GB. bWhentheverificationtimeislimitedto180minutes,thiscaseisreportedasUNSAFEatdepth131with5508sand12GB.

4.5. HANDLING FLOATING POINTS DOMINATED C-PROGRAMS – EXPERIMENTS IN INDUSTRIAL-SCALE

• (BMC) bounded model checking with maximum depth 250.

• control flow automaton preprocessing which is nothing but BMC with preprocessing applied in advance in order to minimize the computations of instantiating the whole transitions at each depth. That is, the post image of current reachable set of edges which respects the flow of the graph is provided to the model checker. The maximum number of preprocessing steps is 250.

Table4.4summarises the results of our experimental evaluation. It comprises six groups of columns. The first groups has the same description as Table4.1. The second group has the same structure, yet reports results for using iSAT3 with CEGAR however by using inductive interpolant technique where abstraction is verified by using BMC till depth 250. The third group has the same structure, yet reports results for using iSAT3 with CEGAR however by using inductive interpolants technique where abstraction is verified by using ITP. The fourth group has the same structure, yet reports results for using ITP technique. The fifth group has the same structure, yet reports results for using BMC till depth 250. Finally, the sixth group reports the results for using preprocessing approach, where BMC technique is applied after computing the post-image of current reachable set of transitions. The latter technique optimises the deduce and deicide steps, but requires more preprocessing steps.

0 10.000 20.000 30.000 40.000 50.000 60.000 70.000 80.000 90.000

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18

Time in seconds

Benchmarks

CEGAR_BMC_250 CEGAR_ITP ITP BMC_250 Preprocessing_250

Figure 4.23: Accumulated verification times for the first nbenchmarks.

Figures 4.23 and 4.24 summarize the main findings. Concerning verifica-tion time, we observe that preprocess-ing with BMC till 250 scores the best results. Namely, it needs about 36035 s for processing the full set of bench-marks, equivalent to an average verifica-tion time of 2002 s, BMC till depth 250 needs 47452 s total and 2636 s on aver-age, CEGAR with BMC till depth 250 needs 78374 s total and 4354 s on aver-age, interpolation-based model checking needs 78653 s total and 4370 s on aver-age, and CEGAR with ITP needs 80161 s total and 4453 s on average.

0 20.000.000 40.000.000 60.000.000 80.000.000 100.000.000 120.000.000 140.000.000 160.000.000 180.000.000

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18

Memory in KB

Benchmarks

CEGAR_BMC_250 CEGAR_ITP ITP BMC_250 Preprocessing

Figure 4.24: Memory usage (#benchmarks pro-Figure 4.23 shows the verification time

results where the plot refers to the accu-mulated verification times for 18 bench-marks. Concerning memory, we observe that CEGAR with BMC till depth 250 needs about 536 MB on average, CE-GAR with ITP needs 731 MB on av-erage, interpolation-based model check-ing needs 1772 MB on average, BMC till depth 250 needs 7282 MB on average, and preprocessing with BMC till depth 250 needs 8384 MB on average.

4.5. HANDLING FLOATING POINTS DOMINATED C-PROGRAMS – EXPERIMENTS IN INDUSTRIAL-SCALE

From Table4.4and Figures 4.23and 4.24, we observe:

• proving that such a model is safe can be achieved by any of the aforementioned approaches. Of course, they differ in the verification time and memory, however all can achieve this task partially or totally.

• proving such a model unsafe cannot be achieved by CEGAR or ITP methods within 90 minutes. Both went adrift while computing invariants at each depth, since these test cases are unsafe, thus no safe invariants would be obtained.

• BMC with(out) preprocessing achieves best results with respect to the verification time, however they laboriously overload the memory as shown in Figure 4.24.

• in general, encoding SMI programs in iSAT3-CFG has a good potential to verify the problems with several techniques, in particular preprocessing the problem before applying BMC, where the latter scored the best results.

• the BTC ES AG benchmarks are originally prepared for some in-house tools which can encode the whole while-block as one formula. In contrast to that, we tried to show the feasibility of our iSAT3-CEGAR with its encodings and techniques in solving the same problems without necessarily encoding the whole while-block as one formula. Thus, our tool obviously needs more time and memory due to explicit assignments propagations and due to step-bounded solving of while-blocks.

timed and (probabilisitc) hybird models + arithmetic programs

safetyproperty:invariantsorcontracts

safe(95%) unsafe(7%)

safe unsafe Is probabilistic?

Abstract the mode + eliminate the continous behaviour

Apply resolution calculus for SSMT

Use Generalized Craig interpolation for SSMT

Hastheproperty aPQform? Slicethemodelbyapplyingtransformationfunctions Useadmissbletransformatione.g.redirctingedges

Usesemi-admissbletransformatione.g.removingedges

YES

NO

convert model to CFG encode the problem in iSAT3

UseCEGAR+Craiginterpolation UseCDCL(T)+ICP UseCraiginterpolation

Stochastic reachabilit

y

Classical reachabilit

y

Chapter 3 Chapter

4 Chapter

5

5

Generalized Craig Interpolation for SSMT

An idea is always a

generalization, and generalization is a property of thinking. To generalize means to think.

(Georg Wilhelm Friedrich Hegel)

Contents

5.1 Introduction . . . 123 5.1.1 Motivation . . . 123 5.1.2 Related work . . . 124 5.2 Stochastic Satisfiability Modulo theories (SSMT) . . . 124 5.2.1 SSMT: syntax . . . 125 5.2.2 SSMT: semantics . . . 125 5.2.3 SSMT: illustrative example . . . 126 5.2.4 Complexity of SSMT. . . 127 5.2.5 Structure of SSMT formula . . . 127 5.3 Resolution Calculus for SSMT . . . 129 5.3.1 Resolution rules for SSMT. . . 129 5.3.2 Soundness and completeness of SSMT-resolution . . . 131 5.3.3 Example of applying SSMT-resolution . . . 133 5.4 Generalized Craig interpolation for SSMT . . . 134 5.4.1 Generalized Craig Interpolants . . . 135 5.4.2 Computation of Generalized Craig Interpolants – Púdlak’s rules

extension . . . 136 5.5 Interpolation-based probabilistic bounded model checking. . . 142 5.5.1 Probabilistic bounded reachability – probabilistic safety analysis 143 5.5.2 SSMT encoding scheme for PHAs . . . 144 5.5.3 PBMC solving by means of generalized Craig interpolation . . . 144 5.5.4 Interpolation-based approach for reachability . . . 146 5.5.5 Generalized Craig interpolation for Stability analysis . . . 151

5.1. INTRODUCTION

5.1 Introduction