2 research outputs found

    Automatic Error Localization for Software using Deductive Verification

    Full text link
    Even competent programmers make mistakes. Automatic verification can detect errors, but leaves the frustrating task of finding the erroneous line of code to the user. This paper presents an automatic approach for identifying potential error locations in software. It is based on a deductive verification engine, which detects errors in functions annotated with pre- and post-conditions. Using an automatic theorem prover, our approach finds expressions in the code that can be modified such that the program satisfies its specification. Scalability is achieved by analyzing each function in isolation. We have implemented our approach in the widely used Frama-C framework and present first experimental results. This is an extended version of [8], featuring an additional appendix.Comment: This is an extended version of [8], featuring an additional appendi

    ΠšΠΎΠΌΠΏΠ»Π΅ΠΊΡΠ½Ρ‹ΠΉ ΠΏΠΎΠ΄Ρ…ΠΎΠ΄ систСмы C-lightVer ΠΊ Π°Π²Ρ‚ΠΎΠΌΠ°Ρ‚ΠΈΠ·ΠΈΡ€ΠΎΠ²Π°Π½Π½ΠΎΠΉ Π»ΠΎΠΊΠ°Π»ΠΈΠ·Π°Ρ†ΠΈΠΈ ошибок Π² C-ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ°Ρ…

    Get PDF
    The C-lightVer system for the deductive verification of C programs is being developed at the IIS SB RAS. Based on the two-level architecture of the system, the C-light input language is translated into the intermediate C-kernel language. The meta generator of the correctness conditions receives the C-kernel program and Hoare logic for the C-kernel as input. To solve the well-known problem of determining loop invariants, the definite iteration approach was chosen. The body of the definite iteration loop is executed once for each element of the finite dimensional data structure, and the inference rule for them uses the substitution operation rep, which represents the action of the cycle in symbolic form. Also, in our meta generator, the method of semantic markup of correctness conditions has been implemented and expanded. It allows to generate explanations for unproven conditions and simplifies the errors localization. Finally, if the theorem prover fails to determine the truth of the condition, we can focus on proving its falsity. Thus a method of proving the falsity of the correctness conditions in the ACL2 system was developed. The need for more detailed explanations of the correctness conditions containing the replacement operation rep has led to a change of the algorithms for generating the replacement operation, and the generation of explanations for unproven correctness conditions. Modifications of these algorithms are presented in the article. They allow marking rep definition with semantic labels, extracting semantic labels from rep definition and generating description of break execution condition.Π’ ИБИ БО РАН разрабатываСтся систСма C-lightVer для Π΄Π΅Π΄ΡƒΠΊΡ‚ΠΈΠ²Π½ΠΎΠΉ Π²Π΅Ρ€ΠΈΡ„ΠΈΠΊΠ°Ρ†ΠΈΠΈ Π‘-ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌ. Π˜ΡΡ…ΠΎΠ΄Ρ ΠΈΠ· Π΄Π²ΡƒΡ…ΡƒΡ€ΠΎΠ²Π½Π΅Π²ΠΎΠΉ Π°Ρ€Ρ…ΠΈΡ‚Π΅ΠΊΡ‚ΡƒΡ€Ρ‹ систСмы, Π²Ρ…ΠΎΠ΄Π½ΠΎΠΉ язык C-light транслируСтся Π² ΠΏΡ€ΠΎΠΌΠ΅ΠΆΡƒΡ‚ΠΎΡ‡Π½Ρ‹ΠΉ язык C-kernel. ΠœΠ΅Ρ‚Π°Π³Π΅Π½Π΅Ρ€Π°Ρ‚ΠΎΡ€ условий коррСктности ΠΏΡ€ΠΈΠ½ΠΈΠΌΠ°Π΅Ρ‚ Π½Π° Π²Ρ…ΠΎΠ΄ C-kernel ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΡƒ ΠΈ Π»ΠΎΠ³ΠΈΠΊΡƒ Π₯ΠΎΠ°Ρ€Π° для C-kernel. Для Ρ€Π΅ΡˆΠ΅Π½ΠΈΡ извСстной ΠΏΡ€ΠΎΠ±Π»Π΅ΠΌΡ‹ задания ΠΈΠ½Π²Π°Ρ€ΠΈΠ°Π½Ρ‚ΠΎΠ² Ρ†ΠΈΠΊΠ»ΠΎΠ² Π²Ρ‹Π±Ρ€Π°Π½ ΠΏΠΎΠ΄Ρ…ΠΎΠ΄ Ρ„ΠΈΠ½ΠΈΡ‚Π½Ρ‹Ρ… ΠΈΡ‚Π΅Ρ€Π°Ρ†ΠΈΠΉ. Π’Π΅Π»ΠΎ Ρ†ΠΈΠΊΠ»Π° Ρ„ΠΈΠ½ΠΈΡ‚Π½ΠΎΠΉ ΠΈΡ‚Π΅Ρ€Π°Ρ†ΠΈΠΈ исполняСтся ΠΎΠ΄ΠΈΠ½ Ρ€Π°Π· для ΠΊΠ°ΠΆΠ΄ΠΎΠ³ΠΎ элСмСнта структуры Π΄Π°Π½Π½Ρ‹Ρ… ΠΊΠΎΠ½Π΅Ρ‡Π½ΠΎΠΉ размСрности, Π° ΠΏΡ€Π°Π²ΠΈΠ»ΠΎ Π²Ρ‹Π²ΠΎΠ΄Π° для Π½ΠΈΡ… ΠΈΡΠΏΠΎΠ»ΡŒΠ·ΡƒΠ΅Ρ‚ ΠΎΠΏΠ΅Ρ€Π°Ρ†ΠΈΡŽ Π·Π°ΠΌΠ΅Π½Ρ‹ rep, Π²Ρ‹Ρ€Π°ΠΆΠ°ΡŽΡ‰ΡƒΡŽ дСйствиС Ρ†ΠΈΠΊΠ»Π° Π² символичСской Ρ„ΠΎΡ€ΠΌΠ΅. Π’Π°ΠΊΠΆΠ΅ Π² нашСм ΠΌΠ΅Ρ‚Π°Π³Π΅Π½Π΅Ρ€Π°Ρ‚ΠΎΡ€Π΅ Π²Π½Π΅Π΄Ρ€Π΅Π½ ΠΈ Ρ€Π°ΡΡˆΠΈΡ€Π΅Π½ ΠΌΠ΅Ρ‚ΠΎΠ΄ сСмантичСской Ρ€Π°Π·ΠΌΠ΅Ρ‚ΠΊΠΈ условий коррСктности. Он позволяСт ΠΏΠΎΡ€ΠΎΠΆΠ΄Π°Ρ‚ΡŒ пояснСния для Π½Π΅Π΄ΠΎΠΊΠ°Π·Π°Π½Π½Ρ‹Ρ… условий ΠΈ ΡƒΠΏΡ€ΠΎΡ‰Π°Π΅Ρ‚ Π»ΠΎΠΊΠ°Π»ΠΈΠ·Π°Ρ†ΠΈΡŽ ошибок. НаконСц, Ссли систСма ACL2 Π½Π΅ справляСтся с установлСниСм истинности условия, ΠΌΠΎΠΆΠ½ΠΎ ΡΠΎΡΡ€Π΅Π΄ΠΎΡ‚ΠΎΡ‡ΠΈΡ‚ΡŒΡΡ Π½Π° Π΄ΠΎΠΊΠ°Π·Π°Ρ‚Π΅Π»ΡŒΡΡ‚Π²Π΅ Π΅Π³ΠΎ лоТности. Π Π°Π½Π΅Π΅ Π½Π°ΠΌΠΈ Π±Ρ‹Π» Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚Π°Π½ способ Π΄ΠΎΠΊΠ°Π·Π°Ρ‚Π΅Π»ΡŒΡΡ‚Π²Π° лоТности условий коррСктности для систСмы ACL2. ΠΠ΅ΠΎΠ±Ρ…ΠΎΠ΄ΠΈΠΌΠΎΡΡ‚ΡŒ Π² Π±ΠΎΠ»Π΅Π΅ ΠΏΠΎΠ΄Ρ€ΠΎΠ±Π½Ρ‹Ρ… ΠΎΠ±ΡŠΡΡΠ½Π΅Π½ΠΈΡΡ… условий коррСктности, содСрТащих ΠΎΠΏΠ΅Ρ€Π°Ρ†ΠΈΡŽ Π·Π°ΠΌΠ΅Π½Ρ‹ rep, ΠΏΡ€ΠΈΠ²Π΅Π»Π° ΠΊ измСнСнию Π°Π»Π³ΠΎΡ€ΠΈΡ‚ΠΌΠΎΠ² Π³Π΅Π½Π΅Ρ€Π°Ρ†ΠΈΠΈ ΠΎΠΏΠ΅Ρ€Π°Ρ†ΠΈΠΈ Π·Π°ΠΌΠ΅Π½Ρ‹, извлСчСния сСмантичСских ΠΌΠ΅Ρ‚ΠΎΠΊ ΠΈ Π³Π΅Π½Π΅Ρ€Π°Ρ†ΠΈΠΈ объяснСний Π½Π΅Π΄ΠΎΠΊΠ°Π·Π°Π½Π½Ρ‹Ρ… условий коррСктности. Π’ ΡΡ‚Π°Ρ‚ΡŒΠ΅ прСдставлСны ΠΌΠΎΠ΄ΠΈΡ„ΠΈΠΊΠ°Ρ†ΠΈΠΈ Π΄Π°Π½Π½Ρ‹Ρ… Π°Π»Π³ΠΎΡ€ΠΈΡ‚ΠΌΠΎΠ². Π­Ρ‚ΠΈ измСнСния ΠΏΠΎΠ·Π²ΠΎΠ»ΡΡŽΡ‚ ΠΏΠΎΠΌΠ΅Ρ‚ΠΈΡ‚ΡŒ исходный ΠΊΠΎΠ΄ Ρ„ΡƒΠ½ΠΊΡ†ΠΈΠΈ rep сСмантичСскими ΠΌΠ΅Ρ‚ΠΊΠ°ΠΌΠΈ, ΠΈΠ·Π²Π»Π΅ΠΊΠ°Ρ‚ΡŒ сСмантичСскиС ΠΌΠ΅Ρ‚ΠΊΠΈ ΠΈΠ· опрСдСлСния rep, Π° Ρ‚Π°ΠΊΠΆΠ΅ Π³Π΅Π½Π΅Ρ€ΠΈΡ€ΠΎΠ²Π°Ρ‚ΡŒ описаниС условия исполнСния инструкции break
    corecore