SlideShare uma empresa Scribd logo
1 de 23
Baixar para ler offline
Theoretical foundation of source
coverage analysis from execution traces!




                          Thomas Quinot!
Summary!




•  Original Needs & Goals!


•  Challenges along the way!



•  Main Results!
Original Needs!


•  Structural Coverage Analysis is required by
   certification standards:!
  •    Open source Coverage Tools exist but are not usable in a HI context!

  •    Proprietary Tools exist but do not support all versions of Ada!




•  Complete the GNAT Pro Toolset for the High Integrity
   Market!



•  Better support for the rapidly evolving versions of
   Ada (83 … 95 … 2005 … 2012 …)!
Original Goals!


•  Provide an High Quality Open Source alternative to existing
   proprietary tools!


•  Provide Support for Agile/Lean Development!
  •    In particular: Continuous Integration/Certification!

  •    Open-DO initiative!




•  Find the best compromise between Source and Object Coverage!
The Couverture Project (2008-2010)!


•  One of the first FUI projects from the GTLL at System@atic!



•  4 partners (AdaCore, Openwide, Telecom PT, Paris 6)!



•  Effort of 160 man-month (2,23 M€) over 2 years	




•  45% Financed by the city of Paris, IdF region, DGE !


       This project gave us the capability to meet
       the unexpected challenges we were facing.
Object Coverage vs Source Coverage!


          •  Big debate in the Certification Community!



          •  Which one is the most Accurate / Appropriate ?!


          •  Which one is the most efficient ?!



                      Source	

                                       Object	

-  Statement/Decision are source concepts	

    -  on final code (no instrumentation)	

-  usually works by instrumenting the code	

   -  on final hardware 	

-  can be done on fast native platforms	

      -  not language specific	

-  requires double testing strategy 	

         -  more precise
Object Coverage vs Source Coverage!


•  Object coverage metrics:!

 •  Instruction Coverage!
 •  Object Branch Coverage (OBC)!

•  Source coverage metrics:!
 •  Statement Coverage!

 •  Decision Coverage (DC)!
 •  Modified Condition/Decision Coverage (MC/DC)

   Independent influence of each condition within a decision!
Challenge 1!



!It is difficult to provide accurate source coverage info
 from execution traces:!



! !- no trace of “statement” / “condition” / “decision” at
  ! binary level!


! !- optimization can change significantly the control flow
Accurate Source Coverage Info!




Sources
 Sources
  Sources
   Sources     GNAT Pro	

   Executable	





                                                Exec
             decorated                           Exec
              decorated                        traces
                                                  Exec
              sources
               decorated                        traces
               sources       GNATcoverage	

     traces
                sources
Accurate Source Coverage Info!


                             Not sufficient to locate
                             precise statements, decisions,
                             or conditions boundaries 	





Sources
 Sources
  Sources
   Sources     GNAT Pro	

              Executable	

                                              Debug info	





                                                               Exec
             decorated                                          Exec
              decorated                                       traces
                                                                 Exec
              sources
               decorated                                       traces
               sources                   GNATcoverage	

        traces
                sources
Accurate Source Coverage Info!



                                                                       Source Coverage
                                                                          Information	

                                                                        (Static analysis)	


               -fpreserve-control-flow	


                                           Executable	

Sources
 Sources                                        Debug info	

  Sources     Enhanced	

   Sources
              GNAT Pro	

                                              SCOs	





                                                                 Exec
             decorated                                            Exec
              decorated                                         traces
                                                                   Exec
              sources
               decorated                                         traces
               sources                        GNATcoverage	

     traces
                sources
Challenge 2!



     OBC does not imply MC/DC!




We need better theoretical foundations !
Initial ideas!



•  General Belief at beginning of project :!
   Object Coverage => Statement Coverage!

   Object Branch Coverage => Decision Coverage!
   Object Branch Coverage => MC/DC (when using short
    circuit operators)!


•  But a FAA study arrived after the beginning showing
   unexplainable differences between OBC and MC/DC
  DOT/FAA/AR-07/17!
Elementary counter-example!




function P (A, B, C : Boolean) return Boolean is
begin                                           Conditions	


   if      ( A and then            B ) or else   C   then
        return True;
   end if;
end P;                                                       Decision	





                OBC	

                                              MC / DC	

                                                             A	

   B	

   C	

   if statement	

        A	

   B	

   C	

   if statement	

                                                             T	

   T	

   F	

         T	

        T	

   T	

   x	

         T	

                                                             A	

                                                             F	

   T	

   F	

         F	

        T	

   F	

   T	

         T	

                                                                    C	

   B	

                                                             F	

   T	

   T	

         T	

        F	

   x	

   F	

         F	

                                                             T	

   F	

   F	

         F	

          3 tests are sufficient	

                          At least n+1 tests	

                                                            n = number of conditions
Counter-measures!


•  Definition of a formal model to express
   coverage metrics based on BDD (Binary
   Decision Diagram)!


•  Express OBC and MC/DC in this model!

                                                Use	

•  Find counter-examples!                    Open Source
                                            Model Checker 	

•  Find precise perimeter where the             Alloy 	

   equivalence can be proven!
•  Formally prove this result!
Evaluation of short circuit boolean expressions!


 •  Evaluating a short circuit decision is a traversal

    of its Reduced Ordered Binary Decision Diagram!

   •  Each ROBDD node is a test for a condition!
   •  Evaluate conditions left to right!

   •  Do not evaluate RHS if LHS is sufficient!

 •  A condition vector denotes a path trough the ROBDD!

                                                        A
                                                T	

                                                                 F	


  ( A and then B ) or else C	


                                                       F	

                                                B                       C
                                  T	

                                                              T	

            F	


                                         T	

                 T	

          F
More counter-examples (Alloy)!

                                                                                  A
 function P (A, B, C : Boolean) return Boolean is
 begin                                                                     T	

                                                                                                F	

    if     ( A and then   B ) or else   C   then
          return True;                                                      B
                                                                                      F	

    end if;
 end P;                                                             T	

                                                                                                         C
                                                                                             T	

                 F	


                                                                                             T	

                 F	

                                                                                                                                              BDD	


                                                                                                          C0	



                                                                                                    T	

                  F	


function P (C0, C1, C2, C3, C4 … : Boolean) return Boolean is                                             C1	

begin                                                                                                                            C2	

                                                                                                                  F	

   if ((((…(C0 and then C1) or else C2) and then C3) or else C4 …                                       T	

                                                                                                                         T	

               F	

   then
      return True;                                                                                        C3	


   end if;                                                                                                                F	

                C4	

end P;                                                                                                 T	

                                                                                                                                                      F	

                                                                                                                                     T
Pathological case!

(((C0 AND THEN C1) OR ELSE C2) AND THEN C3) OR ELSE C4...	


•  N conditions	

•  MC/DC requires at least N + 1 tests	

•  OBC can be achieved in 3 tests!	


                                              C0	


                     T	

                               C1	

                              F	

                     T	

                        F	

                                                        C2	

                                       T	

                               C3	

                              F	

                     T	

                       F	

                                                        C4	

                                        T	

                      F	

                        T	

                  T	

              F	

                                                          3 tests sufficient instead of N+1, for any N
What does that mean?!


•  For a given test campaign!

  •  OBC (BDDBC) are local properties of each BDD
     node: stateless (union of all paths are covering
     the BDD)!
  •  MC/DC is a property of trajectories taken through
     the ROBDD: stateful (all paths through the BDD
     are taken)!
•  In general MC/DC requires complete history of each
   conditional branch instruction (each BDD node)!
•  Are there specific cases where we can do better?!
Equivalence can be proven when !


•  There are no diamonds in the BDD (nodes that can
   be reached through multiple paths)!
•  How does this translate in “User Terms” ?!

•  No easy formulation… the best we found is!

  •  Transform Boolean expression in “Negative
     Normal Form”!

  •  No “and then” in left operand of a “or else”!
  •  No “or else” in left operand of a “and then”!
Proof sketch!


•  In the no-diamond case, each path covers a distinct
   terminal edge

   ⇒ all terminal edges covered implies all paths
   covered, MC/DC is achieved!
•  If thereʼs a diamond, we construct a covering path
   set that fails to show independent influence of one
   condition (all paths through that condition have the
   same outcome)!
                                   A

                            T	

                                                 F	


                             B
                                       F	


                     T	

                                                        C
                                              T	

          F	


                                              T	

          F
Main Results!


•  Emulation is key to Agile cross development!

•  GNATcoverage takes advantage of the theoretical
   results to:!

  •  Implement properly MC/DC in the complex case!

  •  Optimize the simple case by using OBC!
•  Definition of specific compilation artefacts (SCOs)
   and of a certification-friendly code generation mode
   in GCC (-fpreserve-control-flow)!

•  Creation of “open source” qualification material as
   part of Open-DO!
Conclusion!



•  The Couverture project allowed us to concentrate on
   solving properly the unexpected challenges!



•  Existing Open-Source technologies have played a
   key role:!

  •  Qemu is the base of GNATemulator!
  •  Alloy helped a lot for the mathematical proofs!



•  As a result, new industrial-ready Open Source tools
   are now available for the HI developersʼ community !

Mais conteúdo relacionado

Semelhante a Coverage analysis from execution traces

Object Detection with Transformers
Object Detection with TransformersObject Detection with Transformers
Object Detection with TransformersDatabricks
 
Verification Of 1 M+ Transistors Mixed Signal Ic Presentation
Verification Of 1 M+ Transistors Mixed Signal Ic   PresentationVerification Of 1 M+ Transistors Mixed Signal Ic   Presentation
Verification Of 1 M+ Transistors Mixed Signal Ic PresentationRégis SANTONJA
 
Design Of A Usb Device Driver (Overview)
Design Of A Usb Device Driver (Overview)Design Of A Usb Device Driver (Overview)
Design Of A Usb Device Driver (Overview)allankliu
 
Enforcing Behavioral Constraints in Evolving Aspect-Oriented Programs
 Enforcing Behavioral Constraints in Evolving Aspect-Oriented Programs Enforcing Behavioral Constraints in Evolving Aspect-Oriented Programs
Enforcing Behavioral Constraints in Evolving Aspect-Oriented ProgramsRaffi Khatchadourian
 
GNATcoverage/GNATemulator launch
GNATcoverage/GNATemulator launchGNATcoverage/GNATemulator launch
GNATcoverage/GNATemulator launchAdaCore
 
Functionality testing techniqu
Functionality testing techniquFunctionality testing techniqu
Functionality testing techniqugaoliang641
 
Nanometer Testing: Challenges and Solutions
Nanometer Testing: Challenges and SolutionsNanometer Testing: Challenges and Solutions
Nanometer Testing: Challenges and SolutionsDVClub
 
Scalable Elastic Systems Architecture (SESA)
Scalable Elastic Systems Architecture (SESA)Scalable Elastic Systems Architecture (SESA)
Scalable Elastic Systems Architecture (SESA)Eric Van Hensbergen
 
Industry - Relating Developers' Concepts and Artefact Vocabulary in a Financ...
Industry -  Relating Developers' Concepts and Artefact Vocabulary in a Financ...Industry -  Relating Developers' Concepts and Artefact Vocabulary in a Financ...
Industry - Relating Developers' Concepts and Artefact Vocabulary in a Financ...ICSM 2011
 
Leveraging The Open Provenance Model as a Multi-Tier Model for Global Climate...
Leveraging The Open Provenance Model as a Multi-Tier Model for Global Climate...Leveraging The Open Provenance Model as a Multi-Tier Model for Global Climate...
Leveraging The Open Provenance Model as a Multi-Tier Model for Global Climate...Eric Stephan
 
Open-DO Update
Open-DO UpdateOpen-DO Update
Open-DO UpdateAdaCore
 
Graph processing
Graph processingGraph processing
Graph processingyeahjs
 

Semelhante a Coverage analysis from execution traces (20)

Object Detection with Transformers
Object Detection with TransformersObject Detection with Transformers
Object Detection with Transformers
 
Elastic Search
Elastic SearchElastic Search
Elastic Search
 
Verification Of 1 M+ Transistors Mixed Signal Ic Presentation
Verification Of 1 M+ Transistors Mixed Signal Ic   PresentationVerification Of 1 M+ Transistors Mixed Signal Ic   Presentation
Verification Of 1 M+ Transistors Mixed Signal Ic Presentation
 
Scot baxtor cdma
Scot baxtor cdmaScot baxtor cdma
Scot baxtor cdma
 
Design Of A Usb Device Driver (Overview)
Design Of A Usb Device Driver (Overview)Design Of A Usb Device Driver (Overview)
Design Of A Usb Device Driver (Overview)
 
High speed-pcb-board-design-and-analysis
High speed-pcb-board-design-and-analysis High speed-pcb-board-design-and-analysis
High speed-pcb-board-design-and-analysis
 
Enforcing Behavioral Constraints in Evolving Aspect-Oriented Programs
 Enforcing Behavioral Constraints in Evolving Aspect-Oriented Programs Enforcing Behavioral Constraints in Evolving Aspect-Oriented Programs
Enforcing Behavioral Constraints in Evolving Aspect-Oriented Programs
 
IPDPS PhDForum 2011
IPDPS PhDForum 2011IPDPS PhDForum 2011
IPDPS PhDForum 2011
 
GNATcoverage/GNATemulator launch
GNATcoverage/GNATemulator launchGNATcoverage/GNATemulator launch
GNATcoverage/GNATemulator launch
 
STI Summit 2011 - Mlr-sm
STI Summit 2011 - Mlr-smSTI Summit 2011 - Mlr-sm
STI Summit 2011 - Mlr-sm
 
Cloud robotics
Cloud roboticsCloud robotics
Cloud robotics
 
Functionality testing techniqu
Functionality testing techniquFunctionality testing techniqu
Functionality testing techniqu
 
Nanometer Testing: Challenges and Solutions
Nanometer Testing: Challenges and SolutionsNanometer Testing: Challenges and Solutions
Nanometer Testing: Challenges and Solutions
 
Abraham q3 2008
Abraham q3 2008Abraham q3 2008
Abraham q3 2008
 
Scalable Elastic Systems Architecture (SESA)
Scalable Elastic Systems Architecture (SESA)Scalable Elastic Systems Architecture (SESA)
Scalable Elastic Systems Architecture (SESA)
 
Industry - Relating Developers' Concepts and Artefact Vocabulary in a Financ...
Industry -  Relating Developers' Concepts and Artefact Vocabulary in a Financ...Industry -  Relating Developers' Concepts and Artefact Vocabulary in a Financ...
Industry - Relating Developers' Concepts and Artefact Vocabulary in a Financ...
 
Leveraging The Open Provenance Model as a Multi-Tier Model for Global Climate...
Leveraging The Open Provenance Model as a Multi-Tier Model for Global Climate...Leveraging The Open Provenance Model as a Multi-Tier Model for Global Climate...
Leveraging The Open Provenance Model as a Multi-Tier Model for Global Climate...
 
Fraca Flow Presentation
Fraca Flow PresentationFraca Flow Presentation
Fraca Flow Presentation
 
Open-DO Update
Open-DO UpdateOpen-DO Update
Open-DO Update
 
Graph processing
Graph processingGraph processing
Graph processing
 

Mais de AdaCore

RCA OCORA: Safe Computing Platform using open standards
RCA OCORA: Safe Computing Platform using open standardsRCA OCORA: Safe Computing Platform using open standards
RCA OCORA: Safe Computing Platform using open standardsAdaCore
 
Have we a Human Ecosystem?
Have we a Human Ecosystem?Have we a Human Ecosystem?
Have we a Human Ecosystem?AdaCore
 
Rust and the coming age of high integrity languages
Rust and the coming age of high integrity languagesRust and the coming age of high integrity languages
Rust and the coming age of high integrity languagesAdaCore
 
SPARKNaCl: A verified, fast cryptographic library
SPARKNaCl: A verified, fast cryptographic librarySPARKNaCl: A verified, fast cryptographic library
SPARKNaCl: A verified, fast cryptographic libraryAdaCore
 
Developing Future High Integrity Processing Solutions
Developing Future High Integrity Processing SolutionsDeveloping Future High Integrity Processing Solutions
Developing Future High Integrity Processing SolutionsAdaCore
 
Taming event-driven software via formal verification
Taming event-driven software via formal verificationTaming event-driven software via formal verification
Taming event-driven software via formal verificationAdaCore
 
Pushing the Boundary of Mostly Automatic Program Proof
Pushing the Boundary of Mostly Automatic Program ProofPushing the Boundary of Mostly Automatic Program Proof
Pushing the Boundary of Mostly Automatic Program ProofAdaCore
 
RCA OCORA: Safe Computing Platform using open standards
RCA OCORA: Safe Computing Platform using open standardsRCA OCORA: Safe Computing Platform using open standards
RCA OCORA: Safe Computing Platform using open standardsAdaCore
 
Product Lines and Ecosystems: from customization to configuration
Product Lines and Ecosystems: from customization to configurationProduct Lines and Ecosystems: from customization to configuration
Product Lines and Ecosystems: from customization to configurationAdaCore
 
Securing the Future of Safety and Security of Embedded Software
Securing the Future of Safety and Security of Embedded SoftwareSecuring the Future of Safety and Security of Embedded Software
Securing the Future of Safety and Security of Embedded SoftwareAdaCore
 
Spark / Ada for Safe and Secure Firmware Development
Spark / Ada for Safe and Secure Firmware DevelopmentSpark / Ada for Safe and Secure Firmware Development
Spark / Ada for Safe and Secure Firmware DevelopmentAdaCore
 
Introducing the HICLASS Research Programme - Enabling Development of Complex ...
Introducing the HICLASS Research Programme - Enabling Development of Complex ...Introducing the HICLASS Research Programme - Enabling Development of Complex ...
Introducing the HICLASS Research Programme - Enabling Development of Complex ...AdaCore
 
The Future of Aerospace – More Software Please!
The Future of Aerospace – More Software Please!The Future of Aerospace – More Software Please!
The Future of Aerospace – More Software Please!AdaCore
 
Adaptive AUTOSAR - The New AUTOSAR Architecture
Adaptive AUTOSAR - The New AUTOSAR ArchitectureAdaptive AUTOSAR - The New AUTOSAR Architecture
Adaptive AUTOSAR - The New AUTOSAR ArchitectureAdaCore
 
Using Tiers of Assurance Evidence to Reduce the Tears! Adopting the “Wheel of...
Using Tiers of Assurance Evidence to Reduce the Tears! Adopting the “Wheel of...Using Tiers of Assurance Evidence to Reduce the Tears! Adopting the “Wheel of...
Using Tiers of Assurance Evidence to Reduce the Tears! Adopting the “Wheel of...AdaCore
 
Software Engineering for Robotics - The RoboStar Technology
Software Engineering for Robotics - The RoboStar TechnologySoftware Engineering for Robotics - The RoboStar Technology
Software Engineering for Robotics - The RoboStar TechnologyAdaCore
 
MISRA C in an ISO 26262 context
MISRA C in an ISO 26262 contextMISRA C in an ISO 26262 context
MISRA C in an ISO 26262 contextAdaCore
 
Application of theorem proving for safety-critical vehicle software
Application of theorem proving for safety-critical vehicle softwareApplication of theorem proving for safety-critical vehicle software
Application of theorem proving for safety-critical vehicle softwareAdaCore
 
The Application of Formal Methods to Railway Signalling Software
The Application of Formal Methods to Railway Signalling SoftwareThe Application of Formal Methods to Railway Signalling Software
The Application of Formal Methods to Railway Signalling SoftwareAdaCore
 
Bounded Model Checking for C Programs in an Enterprise Environment
Bounded Model Checking for C Programs in an Enterprise EnvironmentBounded Model Checking for C Programs in an Enterprise Environment
Bounded Model Checking for C Programs in an Enterprise EnvironmentAdaCore
 

Mais de AdaCore (20)

RCA OCORA: Safe Computing Platform using open standards
RCA OCORA: Safe Computing Platform using open standardsRCA OCORA: Safe Computing Platform using open standards
RCA OCORA: Safe Computing Platform using open standards
 
Have we a Human Ecosystem?
Have we a Human Ecosystem?Have we a Human Ecosystem?
Have we a Human Ecosystem?
 
Rust and the coming age of high integrity languages
Rust and the coming age of high integrity languagesRust and the coming age of high integrity languages
Rust and the coming age of high integrity languages
 
SPARKNaCl: A verified, fast cryptographic library
SPARKNaCl: A verified, fast cryptographic librarySPARKNaCl: A verified, fast cryptographic library
SPARKNaCl: A verified, fast cryptographic library
 
Developing Future High Integrity Processing Solutions
Developing Future High Integrity Processing SolutionsDeveloping Future High Integrity Processing Solutions
Developing Future High Integrity Processing Solutions
 
Taming event-driven software via formal verification
Taming event-driven software via formal verificationTaming event-driven software via formal verification
Taming event-driven software via formal verification
 
Pushing the Boundary of Mostly Automatic Program Proof
Pushing the Boundary of Mostly Automatic Program ProofPushing the Boundary of Mostly Automatic Program Proof
Pushing the Boundary of Mostly Automatic Program Proof
 
RCA OCORA: Safe Computing Platform using open standards
RCA OCORA: Safe Computing Platform using open standardsRCA OCORA: Safe Computing Platform using open standards
RCA OCORA: Safe Computing Platform using open standards
 
Product Lines and Ecosystems: from customization to configuration
Product Lines and Ecosystems: from customization to configurationProduct Lines and Ecosystems: from customization to configuration
Product Lines and Ecosystems: from customization to configuration
 
Securing the Future of Safety and Security of Embedded Software
Securing the Future of Safety and Security of Embedded SoftwareSecuring the Future of Safety and Security of Embedded Software
Securing the Future of Safety and Security of Embedded Software
 
Spark / Ada for Safe and Secure Firmware Development
Spark / Ada for Safe and Secure Firmware DevelopmentSpark / Ada for Safe and Secure Firmware Development
Spark / Ada for Safe and Secure Firmware Development
 
Introducing the HICLASS Research Programme - Enabling Development of Complex ...
Introducing the HICLASS Research Programme - Enabling Development of Complex ...Introducing the HICLASS Research Programme - Enabling Development of Complex ...
Introducing the HICLASS Research Programme - Enabling Development of Complex ...
 
The Future of Aerospace – More Software Please!
The Future of Aerospace – More Software Please!The Future of Aerospace – More Software Please!
The Future of Aerospace – More Software Please!
 
Adaptive AUTOSAR - The New AUTOSAR Architecture
Adaptive AUTOSAR - The New AUTOSAR ArchitectureAdaptive AUTOSAR - The New AUTOSAR Architecture
Adaptive AUTOSAR - The New AUTOSAR Architecture
 
Using Tiers of Assurance Evidence to Reduce the Tears! Adopting the “Wheel of...
Using Tiers of Assurance Evidence to Reduce the Tears! Adopting the “Wheel of...Using Tiers of Assurance Evidence to Reduce the Tears! Adopting the “Wheel of...
Using Tiers of Assurance Evidence to Reduce the Tears! Adopting the “Wheel of...
 
Software Engineering for Robotics - The RoboStar Technology
Software Engineering for Robotics - The RoboStar TechnologySoftware Engineering for Robotics - The RoboStar Technology
Software Engineering for Robotics - The RoboStar Technology
 
MISRA C in an ISO 26262 context
MISRA C in an ISO 26262 contextMISRA C in an ISO 26262 context
MISRA C in an ISO 26262 context
 
Application of theorem proving for safety-critical vehicle software
Application of theorem proving for safety-critical vehicle softwareApplication of theorem proving for safety-critical vehicle software
Application of theorem proving for safety-critical vehicle software
 
The Application of Formal Methods to Railway Signalling Software
The Application of Formal Methods to Railway Signalling SoftwareThe Application of Formal Methods to Railway Signalling Software
The Application of Formal Methods to Railway Signalling Software
 
Bounded Model Checking for C Programs in an Enterprise Environment
Bounded Model Checking for C Programs in an Enterprise EnvironmentBounded Model Checking for C Programs in an Enterprise Environment
Bounded Model Checking for C Programs in an Enterprise Environment
 

Último

08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 

Último (20)

08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 

Coverage analysis from execution traces

  • 1. Theoretical foundation of source coverage analysis from execution traces! Thomas Quinot!
  • 2. Summary! •  Original Needs & Goals! •  Challenges along the way! •  Main Results!
  • 3. Original Needs! •  Structural Coverage Analysis is required by certification standards:! •  Open source Coverage Tools exist but are not usable in a HI context! •  Proprietary Tools exist but do not support all versions of Ada! •  Complete the GNAT Pro Toolset for the High Integrity Market! •  Better support for the rapidly evolving versions of Ada (83 … 95 … 2005 … 2012 …)!
  • 4. Original Goals! •  Provide an High Quality Open Source alternative to existing proprietary tools! •  Provide Support for Agile/Lean Development! •  In particular: Continuous Integration/Certification! •  Open-DO initiative! •  Find the best compromise between Source and Object Coverage!
  • 5. The Couverture Project (2008-2010)! •  One of the first FUI projects from the GTLL at System@atic! •  4 partners (AdaCore, Openwide, Telecom PT, Paris 6)! •  Effort of 160 man-month (2,23 M€) over 2 years •  45% Financed by the city of Paris, IdF region, DGE ! This project gave us the capability to meet the unexpected challenges we were facing.
  • 6. Object Coverage vs Source Coverage! •  Big debate in the Certification Community! •  Which one is the most Accurate / Appropriate ?! •  Which one is the most efficient ?! Source Object -  Statement/Decision are source concepts -  on final code (no instrumentation) -  usually works by instrumenting the code -  on final hardware -  can be done on fast native platforms -  not language specific -  requires double testing strategy -  more precise
  • 7. Object Coverage vs Source Coverage! •  Object coverage metrics:! •  Instruction Coverage! •  Object Branch Coverage (OBC)! •  Source coverage metrics:! •  Statement Coverage! •  Decision Coverage (DC)! •  Modified Condition/Decision Coverage (MC/DC)
 Independent influence of each condition within a decision!
  • 8. Challenge 1! !It is difficult to provide accurate source coverage info from execution traces:! ! !- no trace of “statement” / “condition” / “decision” at ! binary level! ! !- optimization can change significantly the control flow
  • 9. Accurate Source Coverage Info! Sources Sources Sources Sources GNAT Pro Executable Exec decorated Exec decorated traces Exec sources decorated traces sources GNATcoverage traces sources
  • 10. Accurate Source Coverage Info! Not sufficient to locate precise statements, decisions, or conditions boundaries Sources Sources Sources Sources GNAT Pro Executable Debug info Exec decorated Exec decorated traces Exec sources decorated traces sources GNATcoverage traces sources
  • 11. Accurate Source Coverage Info! Source Coverage Information (Static analysis) -fpreserve-control-flow Executable Sources Sources Debug info Sources Enhanced Sources GNAT Pro SCOs Exec decorated Exec decorated traces Exec sources decorated traces sources GNATcoverage traces sources
  • 12. Challenge 2! OBC does not imply MC/DC! We need better theoretical foundations !
  • 13. Initial ideas! •  General Belief at beginning of project :!  Object Coverage => Statement Coverage!  Object Branch Coverage => Decision Coverage!  Object Branch Coverage => MC/DC (when using short circuit operators)! •  But a FAA study arrived after the beginning showing unexplainable differences between OBC and MC/DC DOT/FAA/AR-07/17!
  • 14. Elementary counter-example! function P (A, B, C : Boolean) return Boolean is begin Conditions if ( A and then B ) or else C then return True; end if; end P; Decision OBC MC / DC A B C if statement A B C if statement T T F T T T x T A F T F F T F T T C B F T T T F x F F T F F F 3 tests are sufficient At least n+1 tests n = number of conditions
  • 15. Counter-measures! •  Definition of a formal model to express coverage metrics based on BDD (Binary Decision Diagram)! •  Express OBC and MC/DC in this model! Use •  Find counter-examples! Open Source Model Checker •  Find precise perimeter where the Alloy equivalence can be proven! •  Formally prove this result!
  • 16. Evaluation of short circuit boolean expressions! •  Evaluating a short circuit decision is a traversal
 of its Reduced Ordered Binary Decision Diagram! •  Each ROBDD node is a test for a condition! •  Evaluate conditions left to right! •  Do not evaluate RHS if LHS is sufficient! •  A condition vector denotes a path trough the ROBDD! A T F ( A and then B ) or else C F B C T T F T T F
  • 17. More counter-examples (Alloy)! A function P (A, B, C : Boolean) return Boolean is begin T F if ( A and then B ) or else C then return True; B F end if; end P; T C T F T F BDD C0 T F function P (C0, C1, C2, C3, C4 … : Boolean) return Boolean is C1 begin C2 F if ((((…(C0 and then C1) or else C2) and then C3) or else C4 … T T F then return True; C3 end if; F C4 end P; T F T
  • 18. Pathological case! (((C0 AND THEN C1) OR ELSE C2) AND THEN C3) OR ELSE C4... •  N conditions •  MC/DC requires at least N + 1 tests •  OBC can be achieved in 3 tests! C0 T C1 F T F C2 T C3 F T F C4 T F T T F 3 tests sufficient instead of N+1, for any N
  • 19. What does that mean?! •  For a given test campaign! •  OBC (BDDBC) are local properties of each BDD node: stateless (union of all paths are covering the BDD)! •  MC/DC is a property of trajectories taken through the ROBDD: stateful (all paths through the BDD are taken)! •  In general MC/DC requires complete history of each conditional branch instruction (each BDD node)! •  Are there specific cases where we can do better?!
  • 20. Equivalence can be proven when ! •  There are no diamonds in the BDD (nodes that can be reached through multiple paths)! •  How does this translate in “User Terms” ?! •  No easy formulation… the best we found is! •  Transform Boolean expression in “Negative Normal Form”! •  No “and then” in left operand of a “or else”! •  No “or else” in left operand of a “and then”!
  • 21. Proof sketch! •  In the no-diamond case, each path covers a distinct terminal edge
 ⇒ all terminal edges covered implies all paths covered, MC/DC is achieved! •  If thereʼs a diamond, we construct a covering path set that fails to show independent influence of one condition (all paths through that condition have the same outcome)! A T F B F T C T F T F
  • 22. Main Results! •  Emulation is key to Agile cross development! •  GNATcoverage takes advantage of the theoretical results to:! •  Implement properly MC/DC in the complex case! •  Optimize the simple case by using OBC! •  Definition of specific compilation artefacts (SCOs) and of a certification-friendly code generation mode in GCC (-fpreserve-control-flow)! •  Creation of “open source” qualification material as part of Open-DO!
  • 23. Conclusion! •  The Couverture project allowed us to concentrate on solving properly the unexpected challenges! •  Existing Open-Source technologies have played a key role:! •  Qemu is the base of GNATemulator! •  Alloy helped a lot for the mathematical proofs! •  As a result, new industrial-ready Open Source tools are now available for the HI developersʼ community !