Upgrade to Pro — share decks privately, control downloads, hide ads and more …

End-to-End Validation of Input Model Transforma...

End-to-End Validation of Input Model Transformations in Model Checking Tools

With the enhancement of model checking and formal verification methods, there is a rise in both the complexity of verification tools and their application across numerous domains. Besides the core analysis, toolchains include several layers of model transformations to intermediate languages, different formal representations, and many optimization steps. The complexity of these steps combined with often ambiguous semantics of the input languages, e.g., in the case of engineering design models, means that ensuring the correctness of the whole process is a challenging task, which cannot be handled by unit tests and example models only. We propose an end-to-end validation method, utilizing the state space traversing capabilities of model checking tools, to examine what behaviors the tool enables for validation model suites.

More Decks by Critical Systems Research Group

Other Decks in Research

Transcript

  1. End-to-End Validation of Input Model Transformations in Model Checking Tools

    Zsófia Ádám Budapest University of Technology and Economics AVM’24
  2. AVM’24 Automatic Model Transformations in Model Checking Design Tool /

    IDE / … Model Transformation(s) Back -Translation Model Checking Analysis Input Model Formal Model Trace(s) (Counterexamples) Counterexample Design Modeling Language Formal Representation Language references references Transformation Steps Optimization Passes Intermediate Repr. 3
  3. AVM’24 Such as… • C, LLVM IR • Verilog, AIGER,

    Btor2 • UML, SysML, (XSTS) • PLC code, (CFA) • Boogie • Promela • SMV • Automata formats (tool specific) • Timed Automata (UPPAAL) • CFA, STS (Theta) • GOTO (CBMC) • MoXI • ... Modeling Languages for Design and Verification 4 Design Modeling Language • Complex • Lots of language elements, Syntactic sugar • Human readable, Succinct • Informal / Semi-formal Semantics Formal representation • Few language elements • Contains all necessary information for model checker • Verbose, not necessarily readable • Formal Semantics More and more model transformation chains!
  4. Fault Models [1] for Model Transformations AVM’24 Intended Behaviour Observable

    Behaviour Model Transformation(s) Input Model Formal Model Model Checking Analysis Result NOT reliable! ≠ Examples • Lost in Translation • e.g., information lost due to SSA • Same Element, Different Semantics • e.g., size of integers • Incorrect Translation of Element Combinations 6
  5. • Example models o Handwritten examples o Models from case

    studies o Corner cases? Other language elements? • Unit tests o Usually present o Complex toolchains - integration testing, end-to-end? • Verify transformation rules [2] o In practice: see Gamma example o many layers and technologies How to Find Model Transformation Issues? AVM’24 7
  6. • Validate (as in certify) results o e.g., SV-COMP software

    witnesses, btor2 violation witnesses o Not always available o No community format and tools o Some design models: not directly executable, validation harder o Also, why not both? • E2E validation o Validation Suites (compiler testing) [3] o Idea from testing with model checkers [4] o Coverage criteria (e.g., transition or decision coverage) o Generate properties, check resulting counterexamples AVM’24 How to Find Model Transformation Issues? + 8
  7. E2E Validation Method Proposal 1. Property Property Model Checking Analysis

    Back Annotation Model Transform ation Model Trace Set Validation of correctness Validation Framework (generates properties, executes model checker) Counter example Property Intended Semantics Observed Semantics Conforms? Validation Model Suite 10
  8. AVM’24 • Based on coverage criteria (Testing with Model Checking

    [4]) – State, transition, decision – even path coverage [5] – Can generate properties – Can not necessarily show more specific behaviour – e.g., concurrency - which interleavings are possible • Based on the input model – What do we want to test and show with the model? – Can not fully automate How do we know that we did not miss any wrong behaviour? How to Create Properties? 11
  9. Case Study: Hugo-RT AVM’24 https://www.uni-augsburg.de/en/fakultaet/fai/informatik/prof/swtsse/hugo-rt/ UML Model* Hugo- RT Formal

    Model* Model Checker Counter example UML Run SPIN, UPPAAL Promela, XTA, traces *and property Smile, XML, UTE • Translation both ways, • Verifier configuration and execution, • Visualization UTL „A UML model translator for model checking and code generation” 12
  10. AVM’24 assertion reach_state_C0_S0 { G not stm1.inState(C0.S0); } assertion reach_state_C0_S1

    { G not stm1.inState(C0.S1); } assertion reach_transition_3 { G stm1.transition != 3; } Coverage Goal Covered # traces State Coverage S0, S1 (2/2) 1 Transition Coverage t=3 (1/1) 1 1, Validation models 2, Generate properties (parse statechart) 3, Generate traces (parse traces to check coverage) 4, Check traces Transition reachability not possible directly! Case Study: E2E Validation of Hugo-RT 13
  11. Issues with Validation Method Proposal 1. Property Property Model Checking

    Analysis Back Annotation Model Transform ation Model Trace Set Validation of correctness Validation Framework (generates properties, executes model checker) Counter example Property Validation Model Suite AVM’24 14 • How can we cover all possible behaviors? • Model checker executed for each property • High effort framework implementation
  12. E2E Validation Method Proposal 2. Validation Model Suite Model Transformation

    Trace Generation Back Annotation Model n Trace Set Model 01 Trace Set … Validation of correctness Modified Analysis Process 15 AVM’24 Utilize State Space Traversal
  13. AVM’24 Theta/Gamma Implementation Example Prototype Implementation: Gamma/Theta Toolchain E2E Validation

    Real World Models γ NASA JPL, Prolan Generated Traces • Mostly 1-4 traces per model • Readable length (maximum 4) Findings • Bugs, limitations • Missing default values • Unexpected ordering of operations 17 www.github.com/ftsrg/gamma www.github.com/ftsrg/theta
  14. Validation Bottlenecks AVM’24 Validation Model Suite Model Transformation Trace Generation

    Back Annotation Model n Trace Set Model 01 Trace Set … Validation of correctness Modified Analysis Process • Manual steps – highly limiting • Reason: specification of input model language informal • Size and number of models and traces 1. Validation Suite: Generate Models • Refinery ( refinery.tools ) 2. Validation of Correctness: some kind of „summary" • Generate Automata from Traces (“High-Level/Input Level (A)RG”) 19 1. 2.
  15. Summary • E2E validation of model transformations in model checking

    toolchains • Utilize state space traversal • Next: generate validation model suites and behaviour summaries • Looking for more Ideas, Tools to Validate and Use Cases • Where would you use this? AVM’24 20
  16. [1] Varró, D., et al., Automated formal verification of visual

    modeling languages by model checking, https://doi.org/10.1007/s10270-003-0050-x [2] Pretschner, A. et al., A Generic Fault Model for Quality Assurance, https://doi.org/10.1007/978-3-642-41533-3_6 [3] Chen, J., et al., A Survey of Compiler Testing, https://doi.org/10.1145/3363562 [4] Fraser, G. et al., Testing with model checkers: a survey, https://doi.org/10.1002/stvr.402 [5] Groce, A., (Quickly) testing the tester via path coverage, https://doi.org/10.1145/2134243.2134249 Bibliography 22