+ All Categories
Home > Education > Ingenierría de Software Automática

Ingenierría de Software Automática

Date post: 10-May-2015
Category:
Upload: jorge-ivan-pincay-ponce
View: 369 times
Download: 2 times
Share this document with a friend
Description:
Ingenierría de Software Automática
Popular Tags:
109
2
Transcript
Page 1: Ingenierría de Software Automática

2

Page 2: Ingenierría de Software Automática

Comunicaciones

Navegacion

Comercio

Seguridad de instalaciones

Page 3: Ingenierría de Software Automática

4

ATRIBUTOS CLÁSICOS:

FIABILIDAD SEGURIDAD ROBUSTEZ CORRECCIÓN EFICIENCIA

Page 4: Ingenierría de Software Automática

5

Page 5: Ingenierría de Software Automática

6

Performance-critical open networking systems that are costly to shut down.

“Systems must never crash and must always meet their deadlines.”

“Systems must be dependable” available, trustworthy, maintainable, safe and secure -integrity and confidentiality (secrecy, anonymity)-

Page 6: Ingenierría de Software Automática

7

Page 7: Ingenierría de Software Automática

8

Page 8: Ingenierría de Software Automática
Page 9: Ingenierría de Software Automática

10

Page 10: Ingenierría de Software Automática

Software ErrorsSoftware Correctness

Model CheckingCourse Details

Therac-25 Radiation Overdosing (1985-87)

Radiation machine for treatment ofcancer patients

At least 6 cases of overdosis in period1985–1987 (! 100-times dosis)

Three cancer patients died

Source: Design error in the controlsoftware (race condition)

Prof. Dr. Ir. Joost-Pieter Katoen Introduction to Model Checking

Page 11: Ingenierría de Software Automática

Software ErrorsSoftware Correctness

Model CheckingCourse Details

AT&T Telephone Network Outage (1990)

January 1990: problem in New YorkCity leads to 9 h-outage of large partsof U.S. telephone network

Costs: several 100 million US$

Source: software flaw (wronginterpretation of break statement inC)

Prof. Dr. Ir. Joost-Pieter Katoen Introduction to Model Checking

Page 12: Ingenierría de Software Automática

13

Page 13: Ingenierría de Software Automática

(-ilities)

extensibility!

Page 14: Ingenierría de Software Automática

15 Source: NASA Jet Propulsion Lab

Bandwidth: < 1KB/sec Latency: > hours

Data: > 10MB/sec

Como lograr extensibilidad y eficiencia sin sacrificar la seguridad?

Page 15: Ingenierría de Software Automática

16 Source: Carnegie Mellon

Page 16: Ingenierría de Software Automática

17 Often download occurs without approval! (virus..)

Page 17: Ingenierría de Software Automática

18

Page 18: Ingenierría de Software Automática

19

Page 19: Ingenierría de Software Automática

20

Page 20: Ingenierría de Software Automática

21

Page 21: Ingenierría de Software Automática
Page 22: Ingenierría de Software Automática

23

Page 23: Ingenierría de Software Automática

24

Page 24: Ingenierría de Software Automática

25

Consequences (7.000 M euro)

Until Ariane, it was not fully appreciated how software can contribute to a system failure. Software cannot fail, this was the repeated cry.

- Ariane 5 development programme at risk - SOHO (Multi-national research programme studying the behaviour of the Sun’s heliosphere interrupted) - Many research careers jeapordised - Future satellite launches not insured

Page 25: Ingenierría de Software Automática

26

Page 26: Ingenierría de Software Automática

27

“After a crew member mistakenly entered a zero into the data field of an application, the computer system proceeded to divide another quantity by that zero. The operation caused a buffer overflow, and the error eventually brought down the ship's propulsion system.

The result: the Yorktown was dead in the water for more than two days.”

Page 27: Ingenierría de Software Automática

28

Page 28: Ingenierría de Software Automática
Page 29: Ingenierría de Software Automática

  Non-exhaustive: miss unseen cases   Trust entities required   Slow down performance   Burden on consumers

Page 30: Ingenierría de Software Automática

31

Page 31: Ingenierría de Software Automática
Page 32: Ingenierría de Software Automática

33

Page 33: Ingenierría de Software Automática

34

Page 34: Ingenierría de Software Automática

35

Page 35: Ingenierría de Software Automática

36

Page 36: Ingenierría de Software Automática
Page 37: Ingenierría de Software Automática

programa

Page 38: Ingenierría de Software Automática

Heavy and weak FMs Lightweight and strong FMs

Page 39: Ingenierría de Software Automática

44

Page 40: Ingenierría de Software Automática

45

Page 41: Ingenierría de Software Automática

46

Page 42: Ingenierría de Software Automática

47

Page 43: Ingenierría de Software Automática

48

Page 44: Ingenierría de Software Automática

49

Page 45: Ingenierría de Software Automática

50

A Lightweight Approach _____________________________________

“A lightweight approach, in comparison to the traditional approach, lacks power of expression and breadth of coverage.

A surgical laser likewise produces less power and poorer coverage than a lightbulb, but it makes more efficient use of the energy it consumes, and its effect is more dramatic”

[Jackson and Wing 1996]

Page 46: Ingenierría de Software Automática

51

Page 47: Ingenierría de Software Automática
Page 48: Ingenierría de Software Automática

53

Page 49: Ingenierría de Software Automática

55

Software Components Sofware Processes

Page 50: Ingenierría de Software Automática

Propiedades

Datos Programas

Especificaciones Requerimientos Tipos ...

Juegos de Datos

Output: Escenarios Input: Ejemplos Código

Documentación

Page 51: Ingenierría de Software Automática

Datos Programas

Inferencia Inductiva

Generación Escenarios

Propiedades

Transformación de Programas

Prototipado automático

Minería de Datos

Page 52: Ingenierría de Software Automática

Propiedades

Programas

Page 53: Ingenierría de Software Automática

Ejemplo de derivación

{Y>0} - precondición

{X=Y*Q+R, R>=0} - postcondición

Propiedades

Programas

Page 54: Ingenierría de Software Automática

Ejemplo de derivación

{Y>0} - precondición

Q:=0; R:=X; while R>Y do R:= R - Y; Q:= Q + 1 end while;

{X=Y*Q+R, R>=0} - postcondición

Propiedades

Programas

Page 55: Ingenierría de Software Automática

Ejemplo de derivación

{Y>0} - precondición

Q:=0; R:=X; while R>Y do R:= R - Y; Q:= Q + 1 end while;

{X=Y*Q+R, R>=0} - postcondición

Propiedades

Programas

Page 56: Ingenierría de Software Automática

Transformación de Programas:

•  Compilación •  Especialización •  Deforestación •  Slicing

Programas

Propiedades

Page 57: Ingenierría de Software Automática
Page 58: Ingenierría de Software Automática
Page 59: Ingenierría de Software Automática
Page 60: Ingenierría de Software Automática

Datos Programas

Inferencia Inductiva (Síntesis de Programas a partir de Ejemplos)

Generación Juegos de Datos Testing Estructural (white-box)

Page 61: Ingenierría de Software Automática
Page 62: Ingenierría de Software Automática

1. Definir caminos de prueba 2. Generar bancos o juegos de datos que hagan seguir cada camino (acumulando las ‘constraints’ que definen los arcos del camino y aplicando técnicas de CONSTRAINT SOLVING)

Datos Programas

Generación Juegos de Datos

Page 63: Ingenierría de Software Automática

Datos

Propiedades

Minería de Datos

Page 64: Ingenierría de Software Automática

+*..

Page 65: Ingenierría de Software Automática

Propiedades

Programas

Page 66: Ingenierría de Software Automática
Page 67: Ingenierría de Software Automática
Page 68: Ingenierría de Software Automática

Datos Programas

Inferencia Inductiva

Generación Escenarios

Propiedades

Transformación de Programas

Prototipado

Minería de Datos

Page 69: Ingenierría de Software Automática

Programas

Propiedades

Datos

Diagnóstico Declarativo 2. Especificación

de la Semántica (ORACULO)

3. Analiza (abstract) CORRECCIÓN COMPLETITUD

(1. Síntoma)

4. Diagnostica fuentes de error 5. Repara código

Page 70: Ingenierría de Software Automática

Criterio: Si existe A ∈ Tr(S) tal que A ∉ S entonces r es incorrecta

Ejemplo: Sea el programa incorrecto: par(0) = true���

par(s(X)) = par(X).

y la semántica: S={par(0),par(s(s(0))}

Page 71: Ingenierría de Software Automática
Page 72: Ingenierría de Software Automática
Page 73: Ingenierría de Software Automática
Page 74: Ingenierría de Software Automática
Page 75: Ingenierría de Software Automática
Page 76: Ingenierría de Software Automática

Exitos clamorosos al descubrir errores en:

FTP - file transfer Autentificación claves Coherencia caché disk Encriptación Alg. div. Pentium Comercio electrónico

Edmund M. Clarke, E. Allen Emerson, and Joseph Sifakis the winners of the 2007 A.M. Turing Award

Page 77: Ingenierría de Software Automática

Datos Programas

Propiedad 3. ¿?

K |= Ψ

2. Compilación

a Kripke K

4. Generación de escenarios (contraejemplo)

1. Especificación en Lógica Temporal

Ψ

Page 78: Ingenierría de Software Automática

Propiedades típicas

  Alcanzabilidad EF Restart Es posible alcanzar la estación de llegada

  Seguridad AG ¬Boom No es posible alcanzar el estado ¬Boom

  Vivacidad AG [Req → AFAck] Todo requerimiento alguna vez se atenderá

  Equidad AG AF DeviceEnabled La propiedad DeviceEnabled se satisface infinitas veces en toda computación

Page 79: Ingenierría de Software Automática

Some Disadvantages

Page 80: Ingenierría de Software Automática
Page 81: Ingenierría de Software Automática

91

Proof-Carrying Code: A Language-Based Security Approach

Page 82: Ingenierría de Software Automática

Programas

Propiedades

Proof Carrying code

2. Validar prueba

1. Compilador Certificante: Código + prueba

Page 83: Ingenierría de Software Automática

Code producer Host

Page 84: Ingenierría de Software Automática

This store instruction is dangerous!

Code producer Host

Page 85: Ingenierría de Software Automática

I am convinced it is safe to execute only if all([a:exp] (all([b:exp] (=> (/\ a b) (/\ b a)))

Code producer Host

A verification condition

Page 86: Ingenierría de Software Automática

… (impi (/\ a b) (/\ b a) ([ab:pf(/\ a b)] (andi b a (ander a b ab) (andel a b ab))))…)

λ

Code producer Host

Page 87: Ingenierría de Software Automática

Your proof typechecks. I believe you because I believe in logic.

λ

Code producer Host

Page 88: Ingenierría de Software Automática

Automation via Certifying Compilation

Source code

Type safety

Proof

Object code

Certifying Compiler

% spj foo.java bar.class baz.c -ljdk1.2.2

Looks and smells like a compiler.

CPU

Proof Checking

Trusted Host

Page 89: Ingenierría de Software Automática

102

A

B

Prueba formal o “explicación” de seguridad

Código (optimizado)

Page 90: Ingenierría de Software Automática

Good Things About PCC   Agnostic to how the code is produced

  Someone else does the really hard work (shifts the burden of ensuring the safety from code consumer to code producer)

  Requires minimal infrastructure (simpler, smaller, and faster TCB)

  Proofs are a “semantic checksum”

Page 91: Ingenierría de Software Automática

Curry-Howard Isomorphism

In a logical framework language: predicates (properties) can be represented as types

and proofs as programs (i.e., expression terms).

! Under certain conditions typechecking is sufficient to ensure the validity of the proofs.

Page 92: Ingenierría de Software Automática
Page 93: Ingenierría de Software Automática

La lógica proporciona una formulación simbólica e independiente del dominio de las leyes del pensamiento humano

Este doble carácter de la lógica hace posible mecanizar sus técnicas y métodos

Page 94: Ingenierría de Software Automática
Page 95: Ingenierría de Software Automática
Page 96: Ingenierría de Software Automática
Page 97: Ingenierría de Software Automática

clausal logic Relational (Prolog)

equational logic Functional (Haskell)

many sorted logic types order sorted logic inheritance modal logic: dynamic objects temporal concurrency epistemic knowledge deontic norms

Multiparadigm Programming

Page 98: Ingenierría de Software Automática

The ELP Group 30 Researchers (15 PhDs) (the biggest group of GPLIS)

María Alpuente Salvador Lucas

Germán Vidal Jose Hernández

Javier Oliver M. José Ramírez

Santiago Escobar Cesar Ferri

Christophe Joubert Marisa Llorens

Josep Silva Alicia Villanueva

_______________ 15 PhD Fellows

Beatriz Alarcón, Mauricio Alba, Gustavo Arroyo, Antonio Bella, Aristides Dasso, Marco A. Feliu, Ana Funes, Raul Gutierrez, Jose Iborra, Alexei Lescaylle, Rafael Navarro, Daniel Romero, Salvador Tamarit

Page 99: Ingenierría de Software Automática

Data Programs Test data generation

Program learning

Properties Refinement

Declarative debugging

Program transformation Program certification

specifications types…

data batteries examples…

The ELP group explores all arcs of this triangle

with the aim of automating the corresponding

phases of the software process.

Page 100: Ingenierría de Software Automática

program analyzers and certifiers program transformers (filtering, slicing, correction) declarative debuggers model checkers web verifiers net simulators

Multi- Paradigm Declarative Programs

Page 101: Ingenierría de Software Automática

NPA Protocol Analyzer Implementation size: 8000 lines source Maude code

Implementation size: 2.000 lines source Haskell code

(collaboration with U. Illinois at Urbana-Champaigne, NRL, and SRI)

Page 102: Ingenierría de Software Automática

The Java certification tool Implementation size: 600 lines source Maude code

Page 103: Ingenierría de Software Automática

:Load Web site directory W Web Specification S

GVerdi Web Verification System Implementation size: 8.000 lines source Java code; 800 lines Maude code

Page 104: Ingenierría de Software Automática

:Load TRS (+ eval strategy)

Mu-Term termination prover Implementation size: 14.000 lines source Haskell code

Page 105: Ingenierría de Software Automática

A Tool for Slicing Curry Programs Implementation size: 2.000 lines source Haskell code

Page 106: Ingenierría de Software Automática

The user interface basically consists of a graphical editor and a pane for consistency analysis.

The user can execute the net (fire the enabled transitions) as well as transform it (reconfiguration).

MCReNet analyzer for Petri Nets Implementation size: 2.000 lines source Java code

Page 107: Ingenierría de Software Automática

Equational (AC) Generalization Implementation size: 700 lines source Maude code

Page 108: Ingenierría de Software Automática

DBDT is a machine learning tool for inferring classifiers, implemented in JBuilder using the WEKA libraries

Applications to Web categorization (classification of Web documents into one or more categories)

DBDT machine learning tool

Page 109: Ingenierría de Software Automática

Recommended