190 likes | 298 Views
Applying the Itacio Verification Model to a Component-Based Real-Time Sound Processing System. Agustín Cernuda, Jose E. Labra G . , Juan M. Cueva. Department of Computer Science University of Oviedo (Spain). Component-Based Software Development (I).
E N D
Applying the Itacio Verification Model to a Component-Based Real-Time Sound Processing System Agustín Cernuda, Jose E. Labra G., Juan M. Cueva Department of Computer Science University of Oviedo (Spain)
Component-Based Software Development (I) • Key idea: Use existing software components • Current verification habits. Usually: • type and signature checking • smoke tests • Testing component groups difficult • Result: Only some facets of the components are tested
Component-Based Software Development (II) • Goal: Automatic, static verification of component aggregates • Automatic verification of software difficult (data-flow and the like) • But developers know much about their components • This knowledge gets lost in docs
Not losing knowledge • Verifying component aggregates upon knowledge • State what you know / promise about your component • Component: deliberately open-minded approach • Generate a knowledge base from a component graph • Query the knowledge base looking for mismatches
Components w/ knowledge Input1 Input2 Input3 Requirements - Input1 must be less than Input2 + Input3 Guarantees - Output1 will always be between Input2 and Input3 ...signatures.... ...code... Different from pre/postconditions! Output1
A component system w/ knowledge o1 is 5 o1 is in [10..20] o1 o1 i1 i2 o1 positive i1 in [1..5] and i2 positive o1 ...... ? OK i1 i2 i1 acceptable i1 positive o1 o2
A is 5 B is in [10..20] C is positive if A in [1..5] ^ B positive C is acceptable if C positive KB generation o1 is 5 o1 is in [10..20] o1 o1 A B i1 i2 o1 positive i1 in [1..5] and i2 positive o1 ...... C i1 i2 i1 acceptable i1 positive o1 o2
Results XML Generator Java XSLT XML File HTML + VML Itacio System Component Description KB Generator Knowledge Base System Description Java CLP System ECLiPSe Web interface (ASP) Results
Distortion Capture Play Gain WaveX sound processing system (I) • DV_WaveInDevice • DV_WaveOutDevice • EF_Distortion • EF_Gain • EF_SepChannels • EF_JoinChannels • . . . • Flexibility building custom sound processors • Independent modules for sound processing • The user defines system topology C++ Components
WaveX sound processing system (II) Topology Description MODULE Input DV_WaveInDevice.DLL PARAM DesiredChannels 2 PARAM DesiredBitsPerSample 16 PARAM DesiredBufferSize 4096 PARAM DesiredSamplesPerSecond 44100 MODULE Separation EF_SepChannels.DLL MODULE Joining EF_JoinChannels.DLL MODULE Play DV_WaveOutDevice.DLL PARAM DesiredChannels 2 PARAM DesiredBitsPerSample 16 PARAM DesiredSamplesPerSecond 44100 LINK Input out Separation in LINK Separation left Joining right LINK Separation right Joining left LINKJoining out Play in
WaveX sound processing system (III) WaveX System in action
WaveX sound processing system (IV) • Components have their requirements possibility of errors such as: • Exceeding max. amplitude range • Sampling rate mismatch • Mono / stereo mismatch • Etc. etc. • Indirect relations between components • Desirable to verify topologies automatically
Component: EF_SepChannels Sinks: in Sources: left, right Requirements: channels($in$, 2). Guarantees: channels($left$, 1). bitsPerSample($left$, X) :- bitsPerSample($in$, X). samplesPerSec($left$, X) :- samplesPerSec($in$, X). bufferSize($left$, X) :- bufferSize($in$, X). channels($right$, 1). bitsPerSample($right$, X) :- bitsPerSample($in$, X). samplesPerSec($right$, X) :- samplesPerSec($in$, X). bufferSize($right$, X) :- bufferSize($in$, X). Applying Itacio to WaveX (I) Component Description
Applying Itacio to WaveX (II) Component Description (Web Interface)
Applying Itacio to WaveX (III) Automatically generated CLP Program /* Requirements */ verify_connection(n_ChannelInversion_Separation_in) :- channels(node_33_source_22, 2). /* Guarantees */ channels(node_34_source_24, 1). channels(node_34_source_25, 1). bitsPerSample(node_34_source_24, X) :- bitsPerSample(node_33_source_22, X). samplesPerSec(node_34_source_24, X) :- samplesPerSec(node_33_source_22, X). bufferSize(node_34_source_24, X) :- bufferSize(node_33_source_22, X). bitsPerSample(node_34_source_25, X) :- bitsPerSample(node_33_source_22, X). samplesPerSec(node_34_source_25, X) :- samplesPerSec(node_33_source_22, X). bufferSize(node_34_source_25, X) :- bufferSize(node_33_source_22, X). buffer_processing_time(node_34_source_24, X) :- buffer_processing_time(node_33_source_22, TIME_INPUT), X is 10 + TIME_INPUT. buffer_processing_time(node_34_source_25, X) :- buffer_processing_time(node_33_source_22, TIME_INPUT), X is 10 + TIME_INPUT.
Applying Itacio to WaveX (IV) Output generated by Itacio (HTML + VML) Error explanations
Conclusions • Advantages • Static verification vs. testing • No need of data flow or abstract interpretation • Knowledge doesn’t get lost • Components get better described / characterised • Well-known tools (automatically obtained) • Problems • Knowledge consistency • Naming, integrating third-party components • Lying statements
Future Work • Apart from Sound processing, Itacio has also been applied to • Time evolution of reuse contracts • Remote personal computer diagnostics • Reliability models of component platforms (Hamlet et al. 00) It would be interesting to apply it to other areas • Allow unfinished systems (no closed graph requirement) • Improve error information • Full fledged Itacio-based verification system • Graphical Editors • User interface • Integration with other tools
Further Information http://www.agustincernuda.com/itacio_eng.html Itacio Project Web Page The End