Qualitätssicherung von Software (SWQS)

  • Upload
    dacey

  • View
    40

  • Download
    1

Embed Size (px)

DESCRIPTION

Qualitätssicherung von Software (SWQS). Prof. Dr. Holger Schlingloff Humboldt-Universität zu Berlin und Fraunhofer FOKUS. 21.5.2013: Modellprüfung. Fragen zur Wiederholung. Was ist ein Modell, ein Transitionssystem, ein endlicher Automat? Unterschied Systemmodell – Testmodell? - PowerPoint PPT Presentation

Citation preview

  • Qualittssicherung von Software (SWQS)Prof. Dr. Holger Schlingloff

    Humboldt-Universitt zu BerlinundFraunhofer FOKUS21.5.2013: Modellprfung

    Folie *H. Schlingloff, Software-Qualittssicherung

    Fragen zur WiederholungWas ist ein Modell, ein Transitionssystem, ein endlicher Automat?Unterschied Systemmodell Testmodell?Testgenerierung aus UML State Machines: Testziele und berdeckungskriterien?Was versteht man unter einer Transition Tour?Wie kann man die Effektivitt einer Testsuite nachweisen?

    Folie *H. Schlingloff, Software-Qualittssicherung

    Wo stehen wir?Einleitung, Begriffe, Software-QualittskriterienSoftwaretestVerifikation und Validierung, Modellprfungstatische und dynamische AnalysetechnikenSoftwarebewertung, SoftwaremetrikenCodereview- und andere InspektionsverfahrenZuverlssigkeitstheorie, FehlerbaumanalyseQualittsstandards, Qualittsmanagement, organisatorische Manahmen

    Folie *H. Schlingloff, Software-Qualittssicherung

    Sprachgebrauch im V-ModellVerifikation: Vergleich des Ergebnisses eines Entwicklungsschritts mit dem vorherigenValidierung: Vergleich des analytischen Artefaktes mit dem entsprechenden synthetischen Artefakt

    alternativer SprachgebrauchVerifikation = formaler Beweis (entspricht der Code der Spezifikation?)Validierung = informelle berprfung (entspricht die Spezifikation den Anforderungen?) Verifikation und Validierung

    Folie *H. Schlingloff, Software-Qualittssicherung

    Techniken fr V&VValidierungRequirements Engineering, strukturierte AnalyseKonsistenz- und VollstndigkeitsprfungSchablonentechnik, systematische FragebgenVerifikationHoare-Kalkl, mathematische ProgrammbeweiseModellprfung, Erreichbarkeitsgrapheninteraktive Abstraktions/Verfeinerungsbeweise

    Folie *H. Schlingloff, Software-Qualittssicherung

    Modellprfungberprfung eines formalen Modells des Systems gegenber einer formalen Spezifikation der Anforderungenvollautomatisch fr zustandsendliche Systeme

    Modellierung: Automaten, Petrinetze, StateCharts, SDL, Spezifikation: temporale Logik, Erreichbarkeit, Verklemmungsfreiheit,

    Folie *H. Schlingloff, Software-Qualittssicherung

    Beispiel (nuSMV)

    Folie *H. Schlingloff, Software-Qualittssicherung

    Ein SpielbeispielWie viele erreichbare Zustnde gibt es?Wie kann man feststellen, ob ein Zustand erreichbar ist?

    Folie *H. Schlingloff, Software-Qualittssicherung

    Coding in SMV

    Folie *H. Schlingloff, Software-Qualittssicherung

    Coding in SMV (cont.)SMV findet sofort eine Lsung (rrddlluurrddlluurrddlluurrdd)Lola (Humboldt Univ.) ist sogar noch schnellerfr 3*4 gut machbar, 4*4 machbar, 5*5 nicht machbar (1025)

    Folie *H. Schlingloff, Software-Qualittssicherung

    Ein Hardware-Beispiel gibts vielleicht noch besser (color)

    Folie *H. Schlingloff, Software-Qualittssicherung

    Verifikationsmodell des Schieberegisters

    Folie *H. Schlingloff, Software-Qualittssicherung

    Reale BeispieleHardware-Verifikation: Stand der TechnikALUs, PLAs, Memory Controller, Chip Design, ...Software-Verifikation: Stand der ForschungLuftfahrtcomputer, Zugsteuerungen, Automobil-Steuergerte, nichttriviale Suchprobleme, ...

    http://www-2.cs.cmu.edu/~modelcheck/tour.htm

    Folie *H. Schlingloff, Software-Qualittssicherung

    Another Example: Ivor Spences Sudokuhttp://www.cs.qub.ac.uk/~I.Spence/SuDoku/sudoku.jar

    Folie *H. Schlingloff, Software-Qualittssicherung

    How Does He Do It?Propositional modelling9 propositions per cell: proposition ijk indicates that row i, column j contains value kindividual cell clauseseach cell contains exactly one value(ij1 v ij2 v v ij9) ^ ~(ij1 ^ ij2) ^ ^ ~(ij8 ^ ij9)row and column clauseseach row i contains each number, exactly once(i11 v v i91) ^ (i12 v v i92) ^ (i19 v v i99)j1 j2, k=1..9: ~(ij1k ^ ij2k)same for columnsblock clauses similarpre-filled cells easySAT solving729 propositions, ca. 3200 clauses few seconds

    Folie *H. Schlingloff, Software-Qualittssicherung

    Propositional verificationIn order to validate a system, we need to represent the transition relation.The representation is of utmost importance for the success of a verification attemptAlgorithms and data structures are heavily dependent onto each otherNeeded: representation of sets, relations, boolean formulas, ...

    Folie *H. Schlingloff, Software-Qualittssicherung

    Binary Encoding of DomainsAny variable on a finite domain D can be replaced by log(D) binary variablessimilar to encoding of data types by compilerse.g. var v: {0..15} can be replaced by var v1,v2,v3,v4: boolean (0=0000, 1= 0001, 2=0010, 3=0011, ..., 15=1111)State spacestill in the order of original domain!e.g. three int8-variables can have 224=108 statese.g. buffer of length 10 with 10-bit values 1030 statesRepresentation of large sets of states?

    Folie *H. Schlingloff, Software-Qualittssicherung

    Representation of Sets

    Folie *H. Schlingloff, Software-Qualittssicherung

    Ordered Tree FormNormal form for propositional formulasUses only the connective Ite

    Linear ordering on the set of propositionse.g., most significant bit firstShannon expansion

    Folie *H. Schlingloff, Software-Qualittssicherung

    Truth table and tree form formulaReduction: Replace Ite (v,,) by

    Folie *H. Schlingloff, Software-Qualittssicherung

    AbbreviationsIntroduce abbreviations

    maximally abbreviated

    Folie *H. Schlingloff, Software-Qualittssicherung

    Binary Decision Trees (BDTs)Binary decision tree

    Elimination of isomorphic subtrees (abbreviations)

    Folie *H. Schlingloff, Software-Qualittssicherung

    Binary Decision Diagrams (BDDs)Elimination of redundant nodes (redundant subformulas) Ite (v,,) by

    *cd C:\Program Files\NuSMV\2.5.4\binnuSMV D:/Temp/example.smv******SuDoku Puzzle as a Satisfiability Problem *