SlideShare una empresa de Scribd logo
1 de 61
Методы формальной
   верификации
Методы формальной
   верификации

        … в Java 8
Методы формальной
   верификации

        … в Java 8
          … да и вообще...
Pол
                                  евы
                                игр   е
                                    ы
    Владимир Иванов
     Разработчик HotSpot JVM
      Хардкорный девелопер


    Александр Ильин
Архитектор тестирования Oracle JDK
   Тролль из отдела тестирования
Program testing can be used to show the
presence of bugs, but never to show their
absence.
[“Structured programming”, Dahl O.J., Dijkstra E.W. and Hoare C.A.R.]   (1972)




[When] you have given the proof of [a
program's] correctness, … [you] can
dispense with testing altogether.
[“Software engineering”, Naur P., Randell B.]   (1969)
Testing
                              is


Running the tested software
   –   in different environment
   –   with different data
in an attempt to
   –   Certify conformance
   –   Prove program correctness
   –   Prove incorrectness
Fundamental Test Theorem
Just a few years after “Structured programming” ...


We prove … that properly structured tests are
capable of demonstrating the absence of
errors in a program.

[“Toward a Theory of Test Data Selection”, John B. Goodenough, Susan L.
Gerhart] (1975)
Fundamental Test Theorem
              Program F(d) for domain D
              Requirements: OUT(d, F(d)) = OK(d)
              Data selection criteria: C
COMPLETE (T ,C )=(∀d ∈T OK (d )⇒∀d ∈ D OK (d ))∨(∀d ∈T ¬OK (d )⇒∀d ∈ D ¬OK (d ))
                         SUCCESSFUL(T )=∀t ∈T OK (t)
       RELIABLE (C )=(∀T1 ,T2⊂ D)COMLPETE (T1 ,C )∧COMPLETE (T2 , C )⇒
                     (SUCCESSFUL(T1)≡SUCCESSFUL(T2))
    VALID(C )=∀d ∈ D ¬OK (d )⇒(∃T ⊆ D)(COMPLETE (T ,C )∧¬SUCCESSFUL(T ))


                                ∃T ⊆ D ,∃C
        (COMPLETE (T ,C )∧RELIABLE (C )∧VALID(C )∧SUCCESSFUL(T ))⇒
                              ∀d ∈ D OK (d )
But wait! It's not over yet!


I hope to have convinced you that by its very nature
responsible system design and development must
be an activity of an undeniably mathematical nature.
… programming became an industrial activity at a
moment that the American manager was extremely
fearful of relying on the education and the
intelligence of his company's employees. And
management tried to organize the industrial
programming task in such a way that each
individual programmer would need to think as little
as possible.

[“Why correctness must be a mathematical concern” E. W Dijkstra] (1979)
But wait! It's not over yet!


"Arrogance in computer science is measured in
               nano-Dijkstras."
                                         Alan Kay
But wait! It's not over yet!


"Arrogance in computer science is measured in
               nano-Dijkstras."
                                           Alan Kay


            "… and micro-Kays".
                                  Unknown source ;-)
Dynamic         Testing
                              is


Running the tested software
   –   in different environment
   –   with different data
in an attempt to
   –   Certify conformance
   –   Prove program correctness (requires formal proof)
   –   Prove program incorrectness (practically)
Static testing
                              is


Analysis of artifacts
   –   source code
   –   binaries
   –   data files
in an attempt to
   –   discover errors
   –   identify suspicious patterns
   –   verify conformance of the artifacts
Static testing
                             includes

●   Using static analyzers
    –   Big number of false positives
●   Code reviews
    –   Tedious manual work
    –   Many errors missed
    –   Non formalizable
What defects
          could by found by dynamic testing




                Any defect!
 You just need to invent enough test :)
                   only ...
It may take an indefinite amount of tests
 So, the testing is, effectively, endless
What defects
              could by found by static testing




                  Any defect!
You just need to look on the whole source long
                    enough
                       only ...
You can not know which ones you are detecting
                         and
      You never know how many are left
What defects
                  are hard to find by dynamic testing




●   Intermittent problems
    –   You may just missed it
●   Platform/environment specific problem
    –   You just may not have the environment
What defects
                   are hard to find by static analysis




●   Bugs in deep and wide class inheritance
    –   Virtual methods are resolved in runtime
●   Bugs in modular system
    –   Many modules implement the same features,
        modules are registered somewhere, etc.
    –   Same reason – modules are registered as runtime
Formal verification
                        is

Formal verification is the act of proving or
disproving the correctness of intended algorithms
underlying a system with respect to a certain
formal specification or property, using
formal methods of mathematics.
Formal verification vs Testing
                                 is also

●   Testing
    –   Upper bound for program quality
        ●   Passed test says nothing about quality
        ●   What matters is when test fails
●   Formal verification
    –   Lower bound for program quality
        ●   Passed test guarantees absence of some type of
            failures in a program
Formal verification
                           requires

●   Correctness of
    –   Language
    –   Compiler
    –   “Core” of the program
●   The specification is self-consistent
Formal verification
             applied




boolean isPowerOfTwo(int a) {
    return (a&(a-1)) == 0;
}
Formal verification
                          applied

                                                        n
∀0< a∈ N : a &(a−1)=0⇔∃ n∈ N : a=2
a > 0 => binary presentation of a has a least one 1 bit
                                                   m >= 0
 Let's take a binary representation of a: (a1…ak)10....0
                       m                          m
     a-1 = (a1…ak)01....1 => a&(a-1) = (a1…ak)00....0


       a&(a-1) = 0 => a1,...,ak = 0 => a = 2m
       a = 2n => m=n, a1,...,ak = 0 => a&(a-1) = 0
Formal verification
                        is

Formal verification is the act of proving or
disproving the correctness of intended algorithms
underlying a system with respect to a certain
formal specification or property, using
formal methods of mathematics.

Another approach is deductive verification. It
consists of generating from the system and its
specifications (and possibly other annotations) a
collection of mathematical proof obligations,
the truth of which imply conformance of the
system to its specification.
Deductive Verification
                         Theorem proving

●   Four color theorem (proved in 1976)
●   Curry-Howard isomorphism
    –   (Theorem, Proof) <=> (Type, Program)
●   Theorem provers
    –   Interactive environments for constructing proofs
    –   Coq, Agda, Isabelle, HOL
●   Real-world example
    –   COMPCERT: C Verified Compiler
Using tools
                           how about ...

●   We create a program
    –   Is capable of proving something about another
        program
    –   Is itself proven (yeah, yeah, a recursion)
●   Use the program to prove something about
    another program
●   Let's call it a “prover”

                Is this still a formal verification?
                                Sure!
Formal verification
                     compiler is a prover on it's own

●   Formal verification for Java is performed by
    Java compiler
    –   Types
    –   Uninitialized variable
    –   Missing of return statement
    –   Uncaught exceptions
    –   etc.
    –   etc.
Annotations in Java
@Stateless @LocalBean
public class GalleryFacade {
  @EJB
  private GalleryEAO galleryEAO;


  @TransactionAttribute(SUPPORTS)
  public Gallery findById(Long id) { ... }


  @TransactionAttribute(REQUIRED)
  public void create(String name) { … }
Annotations in Java
●   Introduced in Java 5
●   Metadata
●   May be reflective
    –   SOURCE, CLASS, RUNTIME
●   Standard (e.g. @Override) & custom annotations
●   Extensively used nowadays
    –   JavaEE 6, IoC containers, test harnesses, etc
Annotations: pre-Java 8
●   Allowed on declarations only
    –   Class declaration
          @A public class Test {
            @B private int a = 0;
            @C public void m(@D Object o) {
              @E int a = 1;
              ...
            }
          }
Annotations: pre-Java 8
●   Allowed on declarations only
    –   Field declaration
          @A public class Test {
            @B private int a = 0;
            @C public void m(@D Object o) {
               @E int a = 1;
               ...
            }
          }
Annotations: pre-Java 8
●   Allowed on declarations only
    –   Method declaration
          @A public class Test {
            @B private int a = 0;
            @C public void m(@D Object o) {
               @E int a = 1;
               ...
            }
          }
Annotations: pre-Java 8
●   Allowed on declarations only
    –   Method parameter declaration
          @A public class Test {
            @B private int a = 0;
            @C public void m(@D Object o) {
               @E int a = 1;
               ...
            }
          }
Annotations: pre-Java 8
●   Allowed on declarations only
    –   Local variable declaration
          @A public class Test {
            @B private int a = 0;
            @C public void m(@D Object o) {
               @E int a = 1;
               ...
            }
          }
Limitations
●   Consider @NonNull annotation
●   How to declare a Map with non-null keys and
    values?
Limitations
●   Consider @NonNull annotation
●   How to declare a Map with non-null keys and
    values?


               @NonNull Map<K,V>?
Limitations
●   Consider @NonNull annotation
●   How to declare a Map with non-null keys and
    values?


               @NonNull Map<K,V>?
                        NO!
Limitations
●   Consider @NonNull annotation
●   How to declare a Map with non-null keys and
    values?
                 @NonNull Map<K,V>?
                            NO!
●   Map<@NonNull K, @NonNull V>
      … but incorrect in Java 7 and earlier
      Type annotations in Java 8 for the rescue!
Type annotations in Java 8
●   Allowed anywhere you would write a type
      … including generics and casts
      … for array levels and receivers
Type annotations in Java 8:
               Examples
●   Class inheritance
      class UnmodifiableList<T>
           implements @ReadOnly List<T> { ... }
●   Casts
      myDate = (@ReadOnly Date) roDate;
●   Type tests
        myString instanceof @NonNull String;
●   Arrays
      String @NonNull [] messages;
Type annotations in Java 8:
               Examples
●   Generics
      List<@Interned String> messages;
●   Type parameter bounds
      Collection<? super @Exists File>
●   Generic type arguments in a generic method
      o.<@NonNull String>toString("...");
Pluggable types
●   User-defined (pluggable) type system
●   Extend built-in type system
    – express extra information about types via
      type qualifiers
●   Permit more expressive compile-time checking
    and guarantee the absence of additional errors
Checker Framework
●   Collection of compiler plugins (“checkers”)
●   Relies on Pluggable types and Type
    Annotations in Java 8
●   Find different sorts of bugs or verify their
    absence
    –   14 checkers are already provided
●   Supports custom compiler plugins (provides
    API)
    –   5 third-party checkers
Example: Nullness Checker
●   Annotations
    –   @NonNull
    –   @Nullable
●   Partial type hierarchy
Example: Nullness Checker
●   Annotations
    –   @NonNull
    –   @Nullable
●   Example:
        @Nullable Object o1; // might be null
        @NonNull Object o2; // never null
        o1.toString(); // warning
        o2 = o1; // warning
        if (o2 == null) // warning: redundant test
Example: Nullness Checker
●   Annotations
    –   @NonNull
    –   @Nullable
●   Example:


          public <@NonNull T> T process(T);
Example: Tainting Checker
●   Use case:
    –   Trusted vs untrusted data
    –   Verify before use
●   Examples
    –   SQL injection attack
        ●   validate SQL query before executing it
    –   information leakage
        ●   secret data vs data displayed to a user
Example: Tainting Checker
●   Annotations
    –   @Untainted
        ●   A type that includes only untainted, trusted values
    –   @Tainted
        ●   A type that includes only tainted, untrusted values
Example: Tainting Checker
●   Annotations
    –   @Untainted
    –   @Tainted
●   Example
        void execute(@Untainted String sql)
              throws SQLException;


        @Untainted String validate(@Tainted String)
            throws SQLException;
Credit card number
                 Annotation



@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE_USE,
   ElementType.TYPE_PARAMETER})
@TypeQualifier
@SubtypeOf(Unqualified.class)
public @interface CreditCard {}
Credit card number
                Checker




@TypeQualifiers(CreditCard.class)
@SuppressWarningsKey("credit.card")
public class CreditCardChecker
    extends BaseTypeChecker {
…
}
Credit card number
                      Usage


public class Account {
 private final @CreditCard String cardNumber;


 public Account(@CreditCard String number) {
     this.cardNumber = number;
 }


 public @CreditCard String getCardNumber() {
     return cardNumber;
 }
Credit card number
                      Sources


@SuppressWarnings("credit.card")
@CreditCard String convert(String input) {
    if(checkLuhn(input))
      return input;
    else
      throw IllegalArgumentException("...")
}


new Account("4111111111111111");
new Account("4111111111111110");
Credit card number
                        Conclusion



●   A card number in an account is always validated
●   That is guaranteed at compile time
●   You do not need to test with invalid numbers
●   You do need to test
    –   All @SuppressWarnings("credit.card")
    –   checkLuhn(String cardNum)
●   Better all … prove it!
More real life examples


String getProperty(@PropertyKey String key);


HashMap <@Adult Person, @NonNull Address>
    findSobutylnik(@NonNull Location);


void monitorTemperature()
    throws @Critical TemperatureException;
Checkers Framework:
                 Advanced features
●   Linear checker
    –   Implements linear types (based on linear logic)
    –   control aliasing and prevent re-use
    –   Single ownership abstraction
        ●   Prevents absence of ownership and multiple owners
●   Dependent types
    –   @Dependent annotation
    –   Changes the type depending on qualified type of
        the receiver (this)
    –   Example
            List[N] – list with it's length encoded into it's type
How to start using
●   No need to wait Java 8 release
    –   modified compiler already available
●   Incremental program annotation
    –   Partial program checking
    –   Warnings during compilation
    –   Easily convertible into compilation errors
        ●   -Werror flag to javac
    –   Default annotations for types w/o annotations
●   Ability to annotate external libraries
Links
●   Type Annotations Specification (JSR-308)
      http://types.cs.washington.edu/jsr308/specification/java-
●   Checker Framework
      http://types.cs.washington.edu/checker-framework/curre
Q&A
Владимир Иванов
vladimir.x.ivanov@oracle.com



 Александр Ильин
 alexandre.iline@oracle.com
Алло, мы ищем таланты!



  Приходите к нам работать!




   alexandre.iline@oracle.co
                m

Más contenido relacionado

La actualidad más candente

Java Tutorial | My Heart
Java Tutorial | My HeartJava Tutorial | My Heart
Java Tutorial | My HeartBui Kiet
 
05 junit
05 junit05 junit
05 junitmha4
 
Basics of reflection in java
Basics of reflection in javaBasics of reflection in java
Basics of reflection in javakim.mens
 
Testes? Mas isso não aumenta o tempo de projecto? Não quero...
Testes? Mas isso não aumenta o tempo de projecto? Não quero...Testes? Mas isso não aumenta o tempo de projecto? Não quero...
Testes? Mas isso não aumenta o tempo de projecto? Não quero...Comunidade NetPonto
 
Software Engineering - RS3
Software Engineering - RS3Software Engineering - RS3
Software Engineering - RS3AtakanAral
 
Java Unit Testing Tool Competition — Fifth Round
Java Unit Testing Tool Competition — Fifth RoundJava Unit Testing Tool Competition — Fifth Round
Java Unit Testing Tool Competition — Fifth RoundAnnibale Panichella
 
An introduction to mutation testing
An introduction to mutation testingAn introduction to mutation testing
An introduction to mutation testingdavidmus
 
SystemVerilog OOP Ovm Features Summary
SystemVerilog OOP Ovm Features SummarySystemVerilog OOP Ovm Features Summary
SystemVerilog OOP Ovm Features SummaryAmal Khailtash
 
Software Testing for Data Scientists
Software Testing for Data ScientistsSoftware Testing for Data Scientists
Software Testing for Data ScientistsAjay Ohri
 
Code Analysis-run time error prediction
Code Analysis-run time error predictionCode Analysis-run time error prediction
Code Analysis-run time error predictionNIKHIL NAWATHE
 
JUnit 5 - The Next Generation of JUnit - Ted's Tool Time
JUnit 5 - The Next Generation of JUnit - Ted's Tool TimeJUnit 5 - The Next Generation of JUnit - Ted's Tool Time
JUnit 5 - The Next Generation of JUnit - Ted's Tool TimeTed Vinke
 
Software Testing and the R language
Software Testing and the R languageSoftware Testing and the R language
Software Testing and the R languageLou Bajuk
 

La actualidad más candente (20)

Java Reflection
Java ReflectionJava Reflection
Java Reflection
 
Java Tutorial | My Heart
Java Tutorial | My HeartJava Tutorial | My Heart
Java Tutorial | My Heart
 
JUnit 5
JUnit 5JUnit 5
JUnit 5
 
05 junit
05 junit05 junit
05 junit
 
Java Unit Testing
Java Unit TestingJava Unit Testing
Java Unit Testing
 
Basics of reflection in java
Basics of reflection in javaBasics of reflection in java
Basics of reflection in java
 
Testes? Mas isso não aumenta o tempo de projecto? Não quero...
Testes? Mas isso não aumenta o tempo de projecto? Não quero...Testes? Mas isso não aumenta o tempo de projecto? Não quero...
Testes? Mas isso não aumenta o tempo de projecto? Não quero...
 
Software Engineering - RS3
Software Engineering - RS3Software Engineering - RS3
Software Engineering - RS3
 
Java Unit Testing Tool Competition — Fifth Round
Java Unit Testing Tool Competition — Fifth RoundJava Unit Testing Tool Competition — Fifth Round
Java Unit Testing Tool Competition — Fifth Round
 
An introduction to mutation testing
An introduction to mutation testingAn introduction to mutation testing
An introduction to mutation testing
 
SystemVerilog OOP Ovm Features Summary
SystemVerilog OOP Ovm Features SummarySystemVerilog OOP Ovm Features Summary
SystemVerilog OOP Ovm Features Summary
 
Java concurrency
Java concurrencyJava concurrency
Java concurrency
 
Software Testing for Data Scientists
Software Testing for Data ScientistsSoftware Testing for Data Scientists
Software Testing for Data Scientists
 
Javascript
JavascriptJavascript
Javascript
 
White Box Testing
White Box TestingWhite Box Testing
White Box Testing
 
Code Analysis-run time error prediction
Code Analysis-run time error predictionCode Analysis-run time error prediction
Code Analysis-run time error prediction
 
Junit
JunitJunit
Junit
 
JUnit 5 - The Next Generation of JUnit - Ted's Tool Time
JUnit 5 - The Next Generation of JUnit - Ted's Tool TimeJUnit 5 - The Next Generation of JUnit - Ted's Tool Time
JUnit 5 - The Next Generation of JUnit - Ted's Tool Time
 
Assessing Product Line Derivation Operators Applied to Java Source Code: An E...
Assessing Product Line Derivation Operators Applied to Java Source Code: An E...Assessing Product Line Derivation Operators Applied to Java Source Code: An E...
Assessing Product Line Derivation Operators Applied to Java Source Code: An E...
 
Software Testing and the R language
Software Testing and the R languageSoftware Testing and the R language
Software Testing and the R language
 

Destacado

Давайте хантить с пользой!
Давайте хантить с пользой!Давайте хантить с пользой!
Давайте хантить с пользой!SQALab
 
СI - модное увлечение или новая классика?
СI - модное увлечение или новая классика?СI - модное увлечение или новая классика?
СI - модное увлечение или новая классика?SQALab
 
Конфликт как двигатель прогресса
Конфликт как двигатель прогрессаКонфликт как двигатель прогресса
Конфликт как двигатель прогрессаSQALab
 
Тестирование производительности систем мониторинга на платформе Microsoft SCO...
Тестирование производительности систем мониторинга на платформе Microsoft SCO...Тестирование производительности систем мониторинга на платформе Microsoft SCO...
Тестирование производительности систем мониторинга на платформе Microsoft SCO...SQALab
 
Автоматизация тестирования WCF сервисов
Автоматизация тестирования WCF сервисовАвтоматизация тестирования WCF сервисов
Автоматизация тестирования WCF сервисовSQALab
 
Не умеешь - научим". Организация обучения тестировщиков до уровня, необходимо...
Не умеешь - научим". Организация обучения тестировщиков до уровня, необходимо...Не умеешь - научим". Организация обучения тестировщиков до уровня, необходимо...
Не умеешь - научим". Организация обучения тестировщиков до уровня, необходимо...SQALab
 
Модель компетенций в оценке, обучении и развитии специалиста по тестированию
Модель компетенций в оценке, обучении и развитии специалиста по тестированиюМодель компетенций в оценке, обучении и развитии специалиста по тестированию
Модель компетенций в оценке, обучении и развитии специалиста по тестированиюSQALab
 
Управление качеством в Agile. Как опередить баги
Управление качеством в Agile. Как опередить багиУправление качеством в Agile. Как опередить баги
Управление качеством в Agile. Как опередить багиSQALab
 
DDD — правильный курс в потоке изменений требований
DDD — правильный курс в потоке изменений требованийDDD — правильный курс в потоке изменений требований
DDD — правильный курс в потоке изменений требованийSQALab
 
Пример эффективного управления тест-кейсами при помощи Google docs
Пример эффективного управления тест-кейсами при помощи Google docsПример эффективного управления тест-кейсами при помощи Google docs
Пример эффективного управления тест-кейсами при помощи Google docsSQALab
 
Agile-тестировщик — миф или реальность
Agile-тестировщик — миф или реальностьAgile-тестировщик — миф или реальность
Agile-тестировщик — миф или реальностьSQALab
 
Человеко-дни на тестирование или как не ошибиться с оценкой
Человеко-дни на тестирование или как не ошибиться с оценкойЧеловеко-дни на тестирование или как не ошибиться с оценкой
Человеко-дни на тестирование или как не ошибиться с оценкойSQALab
 
Грабли автоматизации. Учимся на чужих ошибках
Грабли автоматизации. Учимся на чужих ошибкахГрабли автоматизации. Учимся на чужих ошибках
Грабли автоматизации. Учимся на чужих ошибкахSQALab
 
Система генерации чек-листов для регрессионного тестирования на основе анализ...
Система генерации чек-листов для регрессионного тестирования на основе анализ...Система генерации чек-листов для регрессионного тестирования на основе анализ...
Система генерации чек-листов для регрессионного тестирования на основе анализ...SQALab
 
Нагрузка и автоматизация в большой организации. Движение к DevOps
Нагрузка и автоматизация в большой организации. Движение к DevOpsНагрузка и автоматизация в большой организации. Движение к DevOps
Нагрузка и автоматизация в большой организации. Движение к DevOpsSQALab
 
Тестирование в условиях Lean: как приручить MVP?
Тестирование в условиях Lean: как приручить MVP?Тестирование в условиях Lean: как приручить MVP?
Тестирование в условиях Lean: как приручить MVP?SQALab
 
Как заводить баги понятно всем
Как заводить баги понятно всемКак заводить баги понятно всем
Как заводить баги понятно всемSQALab
 
Мини-школа тестировщиков, ориентированных на Web
Мини-школа тестировщиков, ориентированных на WebМини-школа тестировщиков, ориентированных на Web
Мини-школа тестировщиков, ориентированных на WebSQALab
 

Destacado (18)

Давайте хантить с пользой!
Давайте хантить с пользой!Давайте хантить с пользой!
Давайте хантить с пользой!
 
СI - модное увлечение или новая классика?
СI - модное увлечение или новая классика?СI - модное увлечение или новая классика?
СI - модное увлечение или новая классика?
 
Конфликт как двигатель прогресса
Конфликт как двигатель прогрессаКонфликт как двигатель прогресса
Конфликт как двигатель прогресса
 
Тестирование производительности систем мониторинга на платформе Microsoft SCO...
Тестирование производительности систем мониторинга на платформе Microsoft SCO...Тестирование производительности систем мониторинга на платформе Microsoft SCO...
Тестирование производительности систем мониторинга на платформе Microsoft SCO...
 
Автоматизация тестирования WCF сервисов
Автоматизация тестирования WCF сервисовАвтоматизация тестирования WCF сервисов
Автоматизация тестирования WCF сервисов
 
Не умеешь - научим". Организация обучения тестировщиков до уровня, необходимо...
Не умеешь - научим". Организация обучения тестировщиков до уровня, необходимо...Не умеешь - научим". Организация обучения тестировщиков до уровня, необходимо...
Не умеешь - научим". Организация обучения тестировщиков до уровня, необходимо...
 
Модель компетенций в оценке, обучении и развитии специалиста по тестированию
Модель компетенций в оценке, обучении и развитии специалиста по тестированиюМодель компетенций в оценке, обучении и развитии специалиста по тестированию
Модель компетенций в оценке, обучении и развитии специалиста по тестированию
 
Управление качеством в Agile. Как опередить баги
Управление качеством в Agile. Как опередить багиУправление качеством в Agile. Как опередить баги
Управление качеством в Agile. Как опередить баги
 
DDD — правильный курс в потоке изменений требований
DDD — правильный курс в потоке изменений требованийDDD — правильный курс в потоке изменений требований
DDD — правильный курс в потоке изменений требований
 
Пример эффективного управления тест-кейсами при помощи Google docs
Пример эффективного управления тест-кейсами при помощи Google docsПример эффективного управления тест-кейсами при помощи Google docs
Пример эффективного управления тест-кейсами при помощи Google docs
 
Agile-тестировщик — миф или реальность
Agile-тестировщик — миф или реальностьAgile-тестировщик — миф или реальность
Agile-тестировщик — миф или реальность
 
Человеко-дни на тестирование или как не ошибиться с оценкой
Человеко-дни на тестирование или как не ошибиться с оценкойЧеловеко-дни на тестирование или как не ошибиться с оценкой
Человеко-дни на тестирование или как не ошибиться с оценкой
 
Грабли автоматизации. Учимся на чужих ошибках
Грабли автоматизации. Учимся на чужих ошибкахГрабли автоматизации. Учимся на чужих ошибках
Грабли автоматизации. Учимся на чужих ошибках
 
Система генерации чек-листов для регрессионного тестирования на основе анализ...
Система генерации чек-листов для регрессионного тестирования на основе анализ...Система генерации чек-листов для регрессионного тестирования на основе анализ...
Система генерации чек-листов для регрессионного тестирования на основе анализ...
 
Нагрузка и автоматизация в большой организации. Движение к DevOps
Нагрузка и автоматизация в большой организации. Движение к DevOpsНагрузка и автоматизация в большой организации. Движение к DevOps
Нагрузка и автоматизация в большой организации. Движение к DevOps
 
Тестирование в условиях Lean: как приручить MVP?
Тестирование в условиях Lean: как приручить MVP?Тестирование в условиях Lean: как приручить MVP?
Тестирование в условиях Lean: как приручить MVP?
 
Как заводить баги понятно всем
Как заводить баги понятно всемКак заводить баги понятно всем
Как заводить баги понятно всем
 
Мини-школа тестировщиков, ориентированных на Web
Мини-школа тестировщиков, ориентированных на WebМини-школа тестировщиков, ориентированных на Web
Мини-школа тестировщиков, ориентированных на Web
 

Similar a Формальная верификация как средство тестирования (в Java)

DSR Testing (Part 1)
DSR Testing (Part 1)DSR Testing (Part 1)
DSR Testing (Part 1)Steve Upton
 
Test Driven iOS Development (TDD)
Test Driven iOS Development (TDD)Test Driven iOS Development (TDD)
Test Driven iOS Development (TDD)Babul Mirdha
 
Software testing: an introduction - 2017
Software testing: an introduction - 2017Software testing: an introduction - 2017
Software testing: an introduction - 2017XavierDevroey
 
Behaviour Driven Development and Thinking About Testing
Behaviour Driven Development and Thinking About TestingBehaviour Driven Development and Thinking About Testing
Behaviour Driven Development and Thinking About Testingdn
 
Bdd and-testing
Bdd and-testingBdd and-testing
Bdd and-testingmalcolmt
 
Testing and Building Android
Testing and Building AndroidTesting and Building Android
Testing and Building AndroidDroidcon Berlin
 
Tdd pecha kucha_v2
Tdd pecha kucha_v2Tdd pecha kucha_v2
Tdd pecha kucha_v2Paul Boos
 
Software Testing - Day One
Software Testing - Day OneSoftware Testing - Day One
Software Testing - Day OneGovardhan Reddy
 
When develpment met test(shift left testing)
When develpment met test(shift left testing)When develpment met test(shift left testing)
When develpment met test(shift left testing)SangIn Choung
 
Java Unit Test and Coverage Introduction
Java Unit Test and Coverage IntroductionJava Unit Test and Coverage Introduction
Java Unit Test and Coverage IntroductionAlex Su
 
Assessing Unit Test Quality
Assessing Unit Test QualityAssessing Unit Test Quality
Assessing Unit Test Qualityguest268ee8
 
Android Building, Testing and reversing
Android Building, Testing and reversingAndroid Building, Testing and reversing
Android Building, Testing and reversingEnrique López Mañas
 
Test Driven Development With Python
Test Driven Development With PythonTest Driven Development With Python
Test Driven Development With PythonSiddhi
 
Automated Developer Testing: Achievements and Challenges
Automated Developer Testing: Achievements and ChallengesAutomated Developer Testing: Achievements and Challenges
Automated Developer Testing: Achievements and ChallengesTao Xie
 
Grails unit testing
Grails unit testingGrails unit testing
Grails unit testingpleeps
 
May: Automated Developer Testing: Achievements and Challenges
May: Automated Developer Testing: Achievements and ChallengesMay: Automated Developer Testing: Achievements and Challenges
May: Automated Developer Testing: Achievements and ChallengesTriTAUG
 

Similar a Формальная верификация как средство тестирования (в Java) (20)

DSR Testing (Part 1)
DSR Testing (Part 1)DSR Testing (Part 1)
DSR Testing (Part 1)
 
Test Driven iOS Development (TDD)
Test Driven iOS Development (TDD)Test Driven iOS Development (TDD)
Test Driven iOS Development (TDD)
 
Software testing: an introduction - 2017
Software testing: an introduction - 2017Software testing: an introduction - 2017
Software testing: an introduction - 2017
 
Behaviour Driven Development and Thinking About Testing
Behaviour Driven Development and Thinking About TestingBehaviour Driven Development and Thinking About Testing
Behaviour Driven Development and Thinking About Testing
 
Bdd and-testing
Bdd and-testingBdd and-testing
Bdd and-testing
 
Testing and Building Android
Testing and Building AndroidTesting and Building Android
Testing and Building Android
 
Tdd pecha kucha_v2
Tdd pecha kucha_v2Tdd pecha kucha_v2
Tdd pecha kucha_v2
 
Software Testing - Day One
Software Testing - Day OneSoftware Testing - Day One
Software Testing - Day One
 
When develpment met test(shift left testing)
When develpment met test(shift left testing)When develpment met test(shift left testing)
When develpment met test(shift left testing)
 
Java Unit Test and Coverage Introduction
Java Unit Test and Coverage IntroductionJava Unit Test and Coverage Introduction
Java Unit Test and Coverage Introduction
 
Assessing Unit Test Quality
Assessing Unit Test QualityAssessing Unit Test Quality
Assessing Unit Test Quality
 
Android Building, Testing and reversing
Android Building, Testing and reversingAndroid Building, Testing and reversing
Android Building, Testing and reversing
 
Test driven development
Test driven developmentTest driven development
Test driven development
 
AutoTest.ppt
AutoTest.pptAutoTest.ppt
AutoTest.ppt
 
AutoTest.ppt
AutoTest.pptAutoTest.ppt
AutoTest.ppt
 
AutoTest.ppt
AutoTest.pptAutoTest.ppt
AutoTest.ppt
 
Test Driven Development With Python
Test Driven Development With PythonTest Driven Development With Python
Test Driven Development With Python
 
Automated Developer Testing: Achievements and Challenges
Automated Developer Testing: Achievements and ChallengesAutomated Developer Testing: Achievements and Challenges
Automated Developer Testing: Achievements and Challenges
 
Grails unit testing
Grails unit testingGrails unit testing
Grails unit testing
 
May: Automated Developer Testing: Achievements and Challenges
May: Automated Developer Testing: Achievements and ChallengesMay: Automated Developer Testing: Achievements and Challenges
May: Automated Developer Testing: Achievements and Challenges
 

Más de SQALab

Готовим стажировку
Готовим стажировкуГотовим стажировку
Готовим стажировкуSQALab
 
Куда приводят мечты? или Искусство развития тестировщика
Куда приводят мечты? или Искусство развития тестировщикаКуда приводят мечты? или Искусство развития тестировщика
Куда приводят мечты? или Искусство развития тестировщикаSQALab
 
Оптимизация Selenium тестов и ускорение их поддержки
Оптимизация Selenium тестов и ускорение их поддержкиОптимизация Selenium тестов и ускорение их поддержки
Оптимизация Selenium тестов и ускорение их поддержкиSQALab
 
Автоматизация 0.0: 0 - бюджет, 0 - опыт программирования
Автоматизация 0.0: 0 - бюджет, 0 - опыт программированияАвтоматизация 0.0: 0 - бюджет, 0 - опыт программирования
Автоматизация 0.0: 0 - бюджет, 0 - опыт программированияSQALab
 
Нагрузочное тестирование нестандартных протоколов с использованием Citrix и J...
Нагрузочное тестирование нестандартных протоколов с использованием Citrix и J...Нагрузочное тестирование нестандартных протоколов с использованием Citrix и J...
Нагрузочное тестирование нестандартных протоколов с использованием Citrix и J...SQALab
 
Continuous performance testing
Continuous performance testingContinuous performance testing
Continuous performance testingSQALab
 
Конфиги вместо костылей. Pytestconfig и зачем он нужен
Конфиги вместо костылей. Pytestconfig и зачем он нуженКонфиги вместо костылей. Pytestconfig и зачем он нужен
Конфиги вместо костылей. Pytestconfig и зачем он нуженSQALab
 
Команда чемпионов в ИТ стихии
Команда чемпионов в ИТ стихииКоманда чемпионов в ИТ стихии
Команда чемпионов в ИТ стихииSQALab
 
API. Серебряная пуля в магазине советов
API. Серебряная пуля в магазине советовAPI. Серебряная пуля в магазине советов
API. Серебряная пуля в магазине советовSQALab
 
Добиваемся эффективности каждого из 9000+ UI-тестов
Добиваемся эффективности каждого из 9000+ UI-тестовДобиваемся эффективности каждого из 9000+ UI-тестов
Добиваемся эффективности каждого из 9000+ UI-тестовSQALab
 
Делаем автоматизацию проектных KPIs
Делаем автоматизацию проектных KPIsДелаем автоматизацию проектных KPIs
Делаем автоматизацию проектных KPIsSQALab
 
Вредные привычки в тест-менеджменте
Вредные привычки в тест-менеджментеВредные привычки в тест-менеджменте
Вредные привычки в тест-менеджментеSQALab
 
Мощь переполняет с JDI 2.0 - новая эра UI автоматизации
Мощь переполняет с JDI 2.0 - новая эра UI автоматизацииМощь переполняет с JDI 2.0 - новая эра UI автоматизации
Мощь переполняет с JDI 2.0 - новая эра UI автоматизацииSQALab
 
Как hh.ru дошли до 500 релизов в квартал без потери в качестве
Как hh.ru дошли до 500 релизов в квартал без потери в качествеКак hh.ru дошли до 500 релизов в квартал без потери в качестве
Как hh.ru дошли до 500 релизов в квартал без потери в качествеSQALab
 
Стили лидерства и тестирование
Стили лидерства и тестированиеСтили лидерства и тестирование
Стили лидерства и тестированиеSQALab
 
"Давайте не будем про качество"
"Давайте не будем про качество""Давайте не будем про качество"
"Давайте не будем про качество"SQALab
 
Apache.JMeter для .NET-проектов
Apache.JMeter для .NET-проектовApache.JMeter для .NET-проектов
Apache.JMeter для .NET-проектовSQALab
 
Тестирование геолокационных систем
Тестирование геолокационных системТестирование геолокационных систем
Тестирование геолокационных системSQALab
 
Лидер или босс? Вот в чем вопрос
Лидер или босс? Вот в чем вопросЛидер или босс? Вот в чем вопрос
Лидер или босс? Вот в чем вопросSQALab
 
От Зефира в коробке к Structure Zephyr или как тест-менеджеру перекроить внут...
От Зефира в коробке к Structure Zephyr или как тест-менеджеру перекроить внут...От Зефира в коробке к Structure Zephyr или как тест-менеджеру перекроить внут...
От Зефира в коробке к Structure Zephyr или как тест-менеджеру перекроить внут...SQALab
 

Más de SQALab (20)

Готовим стажировку
Готовим стажировкуГотовим стажировку
Готовим стажировку
 
Куда приводят мечты? или Искусство развития тестировщика
Куда приводят мечты? или Искусство развития тестировщикаКуда приводят мечты? или Искусство развития тестировщика
Куда приводят мечты? или Искусство развития тестировщика
 
Оптимизация Selenium тестов и ускорение их поддержки
Оптимизация Selenium тестов и ускорение их поддержкиОптимизация Selenium тестов и ускорение их поддержки
Оптимизация Selenium тестов и ускорение их поддержки
 
Автоматизация 0.0: 0 - бюджет, 0 - опыт программирования
Автоматизация 0.0: 0 - бюджет, 0 - опыт программированияАвтоматизация 0.0: 0 - бюджет, 0 - опыт программирования
Автоматизация 0.0: 0 - бюджет, 0 - опыт программирования
 
Нагрузочное тестирование нестандартных протоколов с использованием Citrix и J...
Нагрузочное тестирование нестандартных протоколов с использованием Citrix и J...Нагрузочное тестирование нестандартных протоколов с использованием Citrix и J...
Нагрузочное тестирование нестандартных протоколов с использованием Citrix и J...
 
Continuous performance testing
Continuous performance testingContinuous performance testing
Continuous performance testing
 
Конфиги вместо костылей. Pytestconfig и зачем он нужен
Конфиги вместо костылей. Pytestconfig и зачем он нуженКонфиги вместо костылей. Pytestconfig и зачем он нужен
Конфиги вместо костылей. Pytestconfig и зачем он нужен
 
Команда чемпионов в ИТ стихии
Команда чемпионов в ИТ стихииКоманда чемпионов в ИТ стихии
Команда чемпионов в ИТ стихии
 
API. Серебряная пуля в магазине советов
API. Серебряная пуля в магазине советовAPI. Серебряная пуля в магазине советов
API. Серебряная пуля в магазине советов
 
Добиваемся эффективности каждого из 9000+ UI-тестов
Добиваемся эффективности каждого из 9000+ UI-тестовДобиваемся эффективности каждого из 9000+ UI-тестов
Добиваемся эффективности каждого из 9000+ UI-тестов
 
Делаем автоматизацию проектных KPIs
Делаем автоматизацию проектных KPIsДелаем автоматизацию проектных KPIs
Делаем автоматизацию проектных KPIs
 
Вредные привычки в тест-менеджменте
Вредные привычки в тест-менеджментеВредные привычки в тест-менеджменте
Вредные привычки в тест-менеджменте
 
Мощь переполняет с JDI 2.0 - новая эра UI автоматизации
Мощь переполняет с JDI 2.0 - новая эра UI автоматизацииМощь переполняет с JDI 2.0 - новая эра UI автоматизации
Мощь переполняет с JDI 2.0 - новая эра UI автоматизации
 
Как hh.ru дошли до 500 релизов в квартал без потери в качестве
Как hh.ru дошли до 500 релизов в квартал без потери в качествеКак hh.ru дошли до 500 релизов в квартал без потери в качестве
Как hh.ru дошли до 500 релизов в квартал без потери в качестве
 
Стили лидерства и тестирование
Стили лидерства и тестированиеСтили лидерства и тестирование
Стили лидерства и тестирование
 
"Давайте не будем про качество"
"Давайте не будем про качество""Давайте не будем про качество"
"Давайте не будем про качество"
 
Apache.JMeter для .NET-проектов
Apache.JMeter для .NET-проектовApache.JMeter для .NET-проектов
Apache.JMeter для .NET-проектов
 
Тестирование геолокационных систем
Тестирование геолокационных системТестирование геолокационных систем
Тестирование геолокационных систем
 
Лидер или босс? Вот в чем вопрос
Лидер или босс? Вот в чем вопросЛидер или босс? Вот в чем вопрос
Лидер или босс? Вот в чем вопрос
 
От Зефира в коробке к Structure Zephyr или как тест-менеджеру перекроить внут...
От Зефира в коробке к Structure Zephyr или как тест-менеджеру перекроить внут...От Зефира в коробке к Structure Zephyr или как тест-менеджеру перекроить внут...
От Зефира в коробке к Structure Zephyr или как тест-менеджеру перекроить внут...
 

Último

Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...Amil baba
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfDr Vijay Vishwakarma
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17Celine George
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxJisc
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the ClassroomPooky Knightsmith
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxDr. Ravikiran H M Gowda
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 

Último (20)

Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 

Формальная верификация как средство тестирования (в Java)

  • 1. Методы формальной верификации
  • 2. Методы формальной верификации … в Java 8
  • 3. Методы формальной верификации … в Java 8 … да и вообще...
  • 4. Pол евы игр е ы Владимир Иванов Разработчик HotSpot JVM Хардкорный девелопер Александр Ильин Архитектор тестирования Oracle JDK Тролль из отдела тестирования
  • 5. Program testing can be used to show the presence of bugs, but never to show their absence. [“Structured programming”, Dahl O.J., Dijkstra E.W. and Hoare C.A.R.] (1972) [When] you have given the proof of [a program's] correctness, … [you] can dispense with testing altogether. [“Software engineering”, Naur P., Randell B.] (1969)
  • 6. Testing is Running the tested software – in different environment – with different data in an attempt to – Certify conformance – Prove program correctness – Prove incorrectness
  • 7. Fundamental Test Theorem Just a few years after “Structured programming” ... We prove … that properly structured tests are capable of demonstrating the absence of errors in a program. [“Toward a Theory of Test Data Selection”, John B. Goodenough, Susan L. Gerhart] (1975)
  • 8. Fundamental Test Theorem Program F(d) for domain D Requirements: OUT(d, F(d)) = OK(d) Data selection criteria: C COMPLETE (T ,C )=(∀d ∈T OK (d )⇒∀d ∈ D OK (d ))∨(∀d ∈T ¬OK (d )⇒∀d ∈ D ¬OK (d )) SUCCESSFUL(T )=∀t ∈T OK (t) RELIABLE (C )=(∀T1 ,T2⊂ D)COMLPETE (T1 ,C )∧COMPLETE (T2 , C )⇒ (SUCCESSFUL(T1)≡SUCCESSFUL(T2)) VALID(C )=∀d ∈ D ¬OK (d )⇒(∃T ⊆ D)(COMPLETE (T ,C )∧¬SUCCESSFUL(T )) ∃T ⊆ D ,∃C (COMPLETE (T ,C )∧RELIABLE (C )∧VALID(C )∧SUCCESSFUL(T ))⇒ ∀d ∈ D OK (d )
  • 9. But wait! It's not over yet! I hope to have convinced you that by its very nature responsible system design and development must be an activity of an undeniably mathematical nature. … programming became an industrial activity at a moment that the American manager was extremely fearful of relying on the education and the intelligence of his company's employees. And management tried to organize the industrial programming task in such a way that each individual programmer would need to think as little as possible. [“Why correctness must be a mathematical concern” E. W Dijkstra] (1979)
  • 10. But wait! It's not over yet! "Arrogance in computer science is measured in nano-Dijkstras." Alan Kay
  • 11. But wait! It's not over yet! "Arrogance in computer science is measured in nano-Dijkstras." Alan Kay "… and micro-Kays". Unknown source ;-)
  • 12. Dynamic Testing is Running the tested software – in different environment – with different data in an attempt to – Certify conformance – Prove program correctness (requires formal proof) – Prove program incorrectness (practically)
  • 13. Static testing is Analysis of artifacts – source code – binaries – data files in an attempt to – discover errors – identify suspicious patterns – verify conformance of the artifacts
  • 14. Static testing includes ● Using static analyzers – Big number of false positives ● Code reviews – Tedious manual work – Many errors missed – Non formalizable
  • 15. What defects could by found by dynamic testing Any defect! You just need to invent enough test :) only ... It may take an indefinite amount of tests So, the testing is, effectively, endless
  • 16. What defects could by found by static testing Any defect! You just need to look on the whole source long enough only ... You can not know which ones you are detecting and You never know how many are left
  • 17. What defects are hard to find by dynamic testing ● Intermittent problems – You may just missed it ● Platform/environment specific problem – You just may not have the environment
  • 18. What defects are hard to find by static analysis ● Bugs in deep and wide class inheritance – Virtual methods are resolved in runtime ● Bugs in modular system – Many modules implement the same features, modules are registered somewhere, etc. – Same reason – modules are registered as runtime
  • 19. Formal verification is Formal verification is the act of proving or disproving the correctness of intended algorithms underlying a system with respect to a certain formal specification or property, using formal methods of mathematics.
  • 20. Formal verification vs Testing is also ● Testing – Upper bound for program quality ● Passed test says nothing about quality ● What matters is when test fails ● Formal verification – Lower bound for program quality ● Passed test guarantees absence of some type of failures in a program
  • 21. Formal verification requires ● Correctness of – Language – Compiler – “Core” of the program ● The specification is self-consistent
  • 22. Formal verification applied boolean isPowerOfTwo(int a) { return (a&(a-1)) == 0; }
  • 23. Formal verification applied n ∀0< a∈ N : a &(a−1)=0⇔∃ n∈ N : a=2 a > 0 => binary presentation of a has a least one 1 bit m >= 0 Let's take a binary representation of a: (a1…ak)10....0 m m a-1 = (a1…ak)01....1 => a&(a-1) = (a1…ak)00....0 a&(a-1) = 0 => a1,...,ak = 0 => a = 2m a = 2n => m=n, a1,...,ak = 0 => a&(a-1) = 0
  • 24. Formal verification is Formal verification is the act of proving or disproving the correctness of intended algorithms underlying a system with respect to a certain formal specification or property, using formal methods of mathematics. Another approach is deductive verification. It consists of generating from the system and its specifications (and possibly other annotations) a collection of mathematical proof obligations, the truth of which imply conformance of the system to its specification.
  • 25. Deductive Verification Theorem proving ● Four color theorem (proved in 1976) ● Curry-Howard isomorphism – (Theorem, Proof) <=> (Type, Program) ● Theorem provers – Interactive environments for constructing proofs – Coq, Agda, Isabelle, HOL ● Real-world example – COMPCERT: C Verified Compiler
  • 26. Using tools how about ... ● We create a program – Is capable of proving something about another program – Is itself proven (yeah, yeah, a recursion) ● Use the program to prove something about another program ● Let's call it a “prover” Is this still a formal verification? Sure!
  • 27. Formal verification compiler is a prover on it's own ● Formal verification for Java is performed by Java compiler – Types – Uninitialized variable – Missing of return statement – Uncaught exceptions – etc. – etc.
  • 28. Annotations in Java @Stateless @LocalBean public class GalleryFacade { @EJB private GalleryEAO galleryEAO; @TransactionAttribute(SUPPORTS) public Gallery findById(Long id) { ... } @TransactionAttribute(REQUIRED) public void create(String name) { … }
  • 29. Annotations in Java ● Introduced in Java 5 ● Metadata ● May be reflective – SOURCE, CLASS, RUNTIME ● Standard (e.g. @Override) & custom annotations ● Extensively used nowadays – JavaEE 6, IoC containers, test harnesses, etc
  • 30. Annotations: pre-Java 8 ● Allowed on declarations only – Class declaration @A public class Test { @B private int a = 0; @C public void m(@D Object o) { @E int a = 1; ... } }
  • 31. Annotations: pre-Java 8 ● Allowed on declarations only – Field declaration @A public class Test { @B private int a = 0; @C public void m(@D Object o) { @E int a = 1; ... } }
  • 32. Annotations: pre-Java 8 ● Allowed on declarations only – Method declaration @A public class Test { @B private int a = 0; @C public void m(@D Object o) { @E int a = 1; ... } }
  • 33. Annotations: pre-Java 8 ● Allowed on declarations only – Method parameter declaration @A public class Test { @B private int a = 0; @C public void m(@D Object o) { @E int a = 1; ... } }
  • 34. Annotations: pre-Java 8 ● Allowed on declarations only – Local variable declaration @A public class Test { @B private int a = 0; @C public void m(@D Object o) { @E int a = 1; ... } }
  • 35. Limitations ● Consider @NonNull annotation ● How to declare a Map with non-null keys and values?
  • 36. Limitations ● Consider @NonNull annotation ● How to declare a Map with non-null keys and values? @NonNull Map<K,V>?
  • 37. Limitations ● Consider @NonNull annotation ● How to declare a Map with non-null keys and values? @NonNull Map<K,V>? NO!
  • 38. Limitations ● Consider @NonNull annotation ● How to declare a Map with non-null keys and values? @NonNull Map<K,V>? NO! ● Map<@NonNull K, @NonNull V> … but incorrect in Java 7 and earlier Type annotations in Java 8 for the rescue!
  • 39. Type annotations in Java 8 ● Allowed anywhere you would write a type … including generics and casts … for array levels and receivers
  • 40. Type annotations in Java 8: Examples ● Class inheritance class UnmodifiableList<T> implements @ReadOnly List<T> { ... } ● Casts myDate = (@ReadOnly Date) roDate; ● Type tests myString instanceof @NonNull String; ● Arrays String @NonNull [] messages;
  • 41. Type annotations in Java 8: Examples ● Generics List<@Interned String> messages; ● Type parameter bounds Collection<? super @Exists File> ● Generic type arguments in a generic method o.<@NonNull String>toString("...");
  • 42. Pluggable types ● User-defined (pluggable) type system ● Extend built-in type system – express extra information about types via type qualifiers ● Permit more expressive compile-time checking and guarantee the absence of additional errors
  • 43. Checker Framework ● Collection of compiler plugins (“checkers”) ● Relies on Pluggable types and Type Annotations in Java 8 ● Find different sorts of bugs or verify their absence – 14 checkers are already provided ● Supports custom compiler plugins (provides API) – 5 third-party checkers
  • 44. Example: Nullness Checker ● Annotations – @NonNull – @Nullable ● Partial type hierarchy
  • 45. Example: Nullness Checker ● Annotations – @NonNull – @Nullable ● Example: @Nullable Object o1; // might be null @NonNull Object o2; // never null o1.toString(); // warning o2 = o1; // warning if (o2 == null) // warning: redundant test
  • 46. Example: Nullness Checker ● Annotations – @NonNull – @Nullable ● Example: public <@NonNull T> T process(T);
  • 47. Example: Tainting Checker ● Use case: – Trusted vs untrusted data – Verify before use ● Examples – SQL injection attack ● validate SQL query before executing it – information leakage ● secret data vs data displayed to a user
  • 48. Example: Tainting Checker ● Annotations – @Untainted ● A type that includes only untainted, trusted values – @Tainted ● A type that includes only tainted, untrusted values
  • 49. Example: Tainting Checker ● Annotations – @Untainted – @Tainted ● Example void execute(@Untainted String sql) throws SQLException; @Untainted String validate(@Tainted String) throws SQLException;
  • 50. Credit card number Annotation @Documented @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER}) @TypeQualifier @SubtypeOf(Unqualified.class) public @interface CreditCard {}
  • 51. Credit card number Checker @TypeQualifiers(CreditCard.class) @SuppressWarningsKey("credit.card") public class CreditCardChecker extends BaseTypeChecker { … }
  • 52. Credit card number Usage public class Account { private final @CreditCard String cardNumber; public Account(@CreditCard String number) { this.cardNumber = number; } public @CreditCard String getCardNumber() { return cardNumber; }
  • 53. Credit card number Sources @SuppressWarnings("credit.card") @CreditCard String convert(String input) { if(checkLuhn(input)) return input; else throw IllegalArgumentException("...") } new Account("4111111111111111"); new Account("4111111111111110");
  • 54. Credit card number Conclusion ● A card number in an account is always validated ● That is guaranteed at compile time ● You do not need to test with invalid numbers ● You do need to test – All @SuppressWarnings("credit.card") – checkLuhn(String cardNum) ● Better all … prove it!
  • 55. More real life examples String getProperty(@PropertyKey String key); HashMap <@Adult Person, @NonNull Address> findSobutylnik(@NonNull Location); void monitorTemperature() throws @Critical TemperatureException;
  • 56. Checkers Framework: Advanced features ● Linear checker – Implements linear types (based on linear logic) – control aliasing and prevent re-use – Single ownership abstraction ● Prevents absence of ownership and multiple owners ● Dependent types – @Dependent annotation – Changes the type depending on qualified type of the receiver (this) – Example List[N] – list with it's length encoded into it's type
  • 57. How to start using ● No need to wait Java 8 release – modified compiler already available ● Incremental program annotation – Partial program checking – Warnings during compilation – Easily convertible into compilation errors ● -Werror flag to javac – Default annotations for types w/o annotations ● Ability to annotate external libraries
  • 58. Links ● Type Annotations Specification (JSR-308) http://types.cs.washington.edu/jsr308/specification/java- ● Checker Framework http://types.cs.washington.edu/checker-framework/curre
  • 59. Q&A
  • 61. Алло, мы ищем таланты! Приходите к нам работать! alexandre.iline@oracle.co m

Notas del editor

  1. A static type system helps programmers to detect and prevent errors. However, a language’s built-in type system does not help to detect and prevent enough errors, because it cannot express certain important invariants. A user-defined, or pluggable, type system enriches the built-in type system by expressing extra information about types via type qualifiers. Pluggable types permit more expressive compile-time checking and guarantee the absence of additional errors.
  2. @GuardedBy(&quot;MyClass.myLock&quot;) Object myMethod() { ... } // reassignments without holding the lock are OK. @GuardedBy(&quot;MyClass.myLock&quot;) Object x = myMethod(); @GuardedBy(&quot;MyClass.myLock&quot;) Object y = x; Object z = x; // ILLEGAL (assuming no lock inference), // because z can be freely accessed. x.toString() // ILLEGAL because the lock is not held synchronized(MyClass.myLock) { y.toString(); // OK: the lock is held } =================================================== void helper1(@GuardedBy(&quot;MyClass.myLock&quot;) Object a) { a.toString(); // ILLEGAL: the lock is not held synchronized(MyClass.myLock) { a.toString(); // OK: the lock is held } } @Holding(&quot;MyClass.myLock&quot;) void helper2(@GuardedBy(&quot;MyClass.myLock&quot;) Object b) { b.toString(); // OK: the lock is held } void helper3(Object c) { helper1(c); // OK: passing a subtype in place of a the @GuardedBy supertype c.toString(); // OK: no lock constraints } void helper4(@GuardedBy(&quot;MyClass.myLock&quot;) Object d) { d.toString(); // ILLEGAL: the lock is not held } void myMethod2(@GuardedBy(&quot;MyClass.myLock&quot;) Object e) { helper1(e); // OK to pass to another routine without holding the lock e.toString(); // ILLEGAL: the lock is not held synchronized (MyClass.myLock) { helper2(e); helper3(e); helper4(e); // OK, but helper4&apos;s body still does not type-check } }
  3. @GuardedBy(&quot;MyClass.myLock&quot;) Object myMethod() { ... } // reassignments without holding the lock are OK. @GuardedBy(&quot;MyClass.myLock&quot;) Object x = myMethod(); @GuardedBy(&quot;MyClass.myLock&quot;) Object y = x; Object z = x; // ILLEGAL (assuming no lock inference), // because z can be freely accessed. x.toString() // ILLEGAL because the lock is not held synchronized(MyClass.myLock) { y.toString(); // OK: the lock is held } =================================================== void helper1(@GuardedBy(&quot;MyClass.myLock&quot;) Object a) { a.toString(); // ILLEGAL: the lock is not held synchronized(MyClass.myLock) { a.toString(); // OK: the lock is held } } @Holding(&quot;MyClass.myLock&quot;) void helper2(@GuardedBy(&quot;MyClass.myLock&quot;) Object b) { b.toString(); // OK: the lock is held } void helper3(Object c) { helper1(c); // OK: passing a subtype in place of a the @GuardedBy supertype c.toString(); // OK: no lock constraints } void helper4(@GuardedBy(&quot;MyClass.myLock&quot;) Object d) { d.toString(); // ILLEGAL: the lock is not held } void myMethod2(@GuardedBy(&quot;MyClass.myLock&quot;) Object e) { helper1(e); // OK to pass to another routine without holding the lock e.toString(); // ILLEGAL: the lock is not held synchronized (MyClass.myLock) { helper2(e); helper3(e); helper4(e); // OK, but helper4&apos;s body still does not type-check } }
  4. @GuardedBy(&quot;MyClass.myLock&quot;) Object myMethod() { ... } // reassignments without holding the lock are OK. @GuardedBy(&quot;MyClass.myLock&quot;) Object x = myMethod(); @GuardedBy(&quot;MyClass.myLock&quot;) Object y = x; Object z = x; // ILLEGAL (assuming no lock inference), // because z can be freely accessed. x.toString() // ILLEGAL because the lock is not held synchronized(MyClass.myLock) { y.toString(); // OK: the lock is held } =================================================== void helper1(@GuardedBy(&quot;MyClass.myLock&quot;) Object a) { a.toString(); // ILLEGAL: the lock is not held synchronized(MyClass.myLock) { a.toString(); // OK: the lock is held } } @Holding(&quot;MyClass.myLock&quot;) void helper2(@GuardedBy(&quot;MyClass.myLock&quot;) Object b) { b.toString(); // OK: the lock is held } void helper3(Object c) { helper1(c); // OK: passing a subtype in place of a the @GuardedBy supertype c.toString(); // OK: no lock constraints } void helper4(@GuardedBy(&quot;MyClass.myLock&quot;) Object d) { d.toString(); // ILLEGAL: the lock is not held } void myMethod2(@GuardedBy(&quot;MyClass.myLock&quot;) Object e) { helper1(e); // OK to pass to another routine without holding the lock e.toString(); // ILLEGAL: the lock is not held synchronized (MyClass.myLock) { helper2(e); helper3(e); helper4(e); // OK, but helper4&apos;s body still does not type-check } }