• Nenhum resultado encontrado

An application of KLEE to aerospace industrial software

N/A
N/A
Protected

Academic year: 2024

Share "An application of KLEE to aerospace industrial software"

Copied!
25
0
0

Texto

(1)

An application of KLEE to aerospace industrial software

Juan Francisco Garc´ıa, Daniel Jurjo, Fernando Mac´ıas, Jos´e F. Morales, Alessandra Gorla

IMDEA Software Institute

June 10, 2021

IMDEA MFoC June 10, 2021 1 / 17

(2)

Motivation

Testing is a critical process in aerospace software.

Unit test generation is currently done manually, in a trial and error process.

(3)

Aerospace Software Nature

Loops are bounded.

1 f o r ( i = 0 ; i <= 2 ; i ++) {

2 . . .

3 }

4

IMDEA MFoC June 10, 2021 3 / 17

(4)

Aerospace Software Nature

The decision variables are mostly:

Boolean.

Floating point, usually normalized in a range.

1 f o r ( i = 0 ; i <= 2 ; i ++) {

2 i f ( v a l i d i t y [ i ] ){

3 i f ( s e n s o r [ i ]>t h r e s h o l d ){

4 s t a t u s [ i ]=1

5 }

6 }

7 }

8

(5)

The company approach

Build Simulink

Model

Verify using physics

simu- lations

Generate C code from the

model

Make tests inputs by

“ramp- ing”

Run the tests inputs on the model

Run tests inputs on the code

Check I/O con- formance with model

IMDEA MFoC June 10, 2021 5 / 17

(6)

The company approach

Model is assumed to be correct if it passes series of tests designed from the physical/engineering perspective.

There is a lack of specification.

(7)

The company approach

IMDEA MFoC June 10, 2021 7 / 17

(8)

Our approach

Build Simulink

Model

Verify using physics

simu- lations

Generate C code from the

model

Parse C and generate symbolic calls

Run KLEE

Get outputs

from KLEE

tests

Check I/O con- formance with model

(9)

Simulink and C code conformance

Make state symbolic, get pairs of values for state and input (S,I). It is needed to reach stateS in the model to test the input I.

IMDEA MFoC June 10, 2021 9 / 17

(10)

Simulink and C code conformance

Make state symbolic, get pairs of values for state and input (S,I).

It is needed to reach stateS in the model to test the input I.

(11)

Results

Experiment Company Approach Our approach Tests Decision

Coverage1 Tests Decision Coverage1

Exp. 1 6000 78% 54 100%

Exp. 2 34 100% 6 100%

Exp. 3 10 100% 2 100%

1Measured with Simulink Coverage Tool

IMDEA MFoC June 10, 2021 10 / 17

(12)

Benefits of our approach

An equivalent process that is automatic.

Reduce human bias. Reduce number of tests.

Assure path coverage instead of decision coverage.

(13)

Benefits of our approach

An equivalent process that is automatic.

Reduce human bias.

Reduce number of tests.

Assure path coverage instead of decision coverage.

IMDEA MFoC June 10, 2021 11 / 17

(14)

Benefits of our approach

An equivalent process that is automatic.

Reduce human bias.

Reduce number of tests.

Assure path coverage instead of decision coverage.

(15)

Benefits of our approach

An equivalent process that is automatic.

Reduce human bias.

Reduce number of tests.

Assure path coverage instead of decision coverage.

IMDEA MFoC June 10, 2021 11 / 17

(16)

Challenge: Floating Point

KLEE does not support floating point. The alternatives we have considered are:

KLEE-Float.

Fuzzing.

Combining KLEE with Fuzzers.

(17)

Work in progress: libFuzzer

Why libFuzzer?

Function oriented.

Structure-aware fuzzing. Coverage-guided.

Custom mutation and recombination function.

IMDEA MFoC June 10, 2021 13 / 17

(18)

Work in progress: libFuzzer

Why libFuzzer?

Function oriented.

Structure-aware fuzzing.

Coverage-guided.

Custom mutation and recombination function.

(19)

Work in progress: libFuzzer

Why libFuzzer?

Function oriented.

Structure-aware fuzzing.

Coverage-guided.

Custom mutation and recombination function.

IMDEA MFoC June 10, 2021 13 / 17

(20)

Work in progress: libFuzzer

Why libFuzzer?

Function oriented.

Structure-aware fuzzing.

Coverage-guided.

Custom mutation and recombination function.

(21)

Work in progress: libFuzzer

It does not generate a test for each path.

1 f o r ( i = 0 ; i <= 2 ; i ++) {

2 i f ( b o o l e a n [ i ] ){

3 . . .

4 }

5 }

6

IMDEA MFoC June 10, 2021 14 / 17

(22)

Work in progress: libFuzzer

It does not generate a test for each path.

It provides meaningful values for floating point.

1 f o r ( i = 0 ; i <= 2 ; i ++) {

2 i f ( f p v a l u e [ i ]>t h r e s h o l d ){

3 . . .

4 }

5 }

6

(23)

Work in progress: KLEE-Float

It works well on the simpler models.

It suffers of path explosion on more complex ones.

IMDEA MFoC June 10, 2021 15 / 17

(24)

Future lines

Evaluate KLEE/KLEE-Float+fuzz with different configurations.

Memory-based equivalence relation for better oracles.

Perform symbolic execution of the hardware constants.

(25)

Questions

IMDEA MFoC June 10, 2021 17 / 17

Referências

Documentos relacionados

The data retrieved with the questionnaire was used to support an explanatory model of the perception of quality, satisfaction and subsequent loyalty of the tourists related to

Furthermore, this paper has induced this work which intends to verified some of the theoretical points about an implementation of a consolidated conceptual model and, then to study

Long memory and asymmetry in volatility are exhibited on Fractionally Integrated Asymmetric Power ARCH (FIAPARCH) model, proposed by Tse (1998).. An extension proposal of the

K- and L-shell (dashed black lines) and total (solid black lines) ion- ization cross sections of the carbon atom and ions calculated with the MRBEB model and total cross sections

The aim of the paper is to create a formal model of the humor in the text, focusing both on narrative levels and on the humorous fragments of text that exist within the novel

developed an analysis of the energy sector using the aforemen- tioned model and submitted for the first time the Bolivia's Intended Nationally Determined Contribution (INDC) to

The explanation why Michael Grossman’s Model has remained the same since its beginning with many economists emphasizing that it is as relevant today as it was 40

We move from a discrete state-space model to a continuous state-space model by introducing a Kalman smoother to estimate the true incoming transition probabilities for all insurers