Experiments with Composing Component Properties
暂无分享,去创建一个
A detailed, microscopic theory of software component composition into systems was presented in this workshop in 2000 and subsequently at ICSE 2001. The essential idea of this theory is that by decomposing the input domain of a component into appropriate subdomains, its properties can be measured so that a system developer can later use the measurements, factoring in usage and system-structure information when such system-defined information is available. In principle, the theory could be the basis for a CAD tool supporting system design, which would take as input: (1) the black-box components, (2) their developers’ subdomains and property measurements, and (3) a proposed system structure. The CAD tool could then calculate the system properties to be expected. This compositional theory was originally proposed for the reliability property, but it was soon recognized that it applies to almost any component/system property that is inputand structure-dependent. In particular, the run-time property is an ideal one for experimentation, because it is easier to measure than reliability, and does not depend on the somewhat dubious background theory of software reliability. While reliability measurements require random testing, run time measurements can be made systematically, since there is no issue of failure correlation. Thus run times can be measured with fewer evenly distributed test points. We report on initial validation experiments for this theory, using a rudimentary CAD tool that does calculations of run times. These experiments address the basic validity of the theory and the efficiency of the system-design calculations. 1 THEORY: COMPOSING COMPONENTS The theory presented in reference [1] describes (in the simplest case) calculating the run time of a system formed by placing two components in a series configuration from the run times of the two components. This calculation can only be accurately done if the component values are broken down by subdomains of the input space, in order to capture inputdependent behavior of the components. ∗Supported by NSF ITR grant CCR-0112654 Component Developer’s Measurements Suppose that the developer of a component C divides the input space of C into a finite number of subdomains S1, S2, ..., Sn, and measures an approximation to C ’s runtime function as a step function with constant value ti on subdomainSi. The vector<t1, t2, ..., tn> = <ti>i=1 (along with the impliedn subdomains) describes C. System Designer’s Measurements and Calculations Suppose that two components B andC are to be composed in a series system design with the output of B the input of C. Let the component subdomains be S 1 , S B 2 , ..., S B n andS 1 , S C 2 , ..., S C m respectively (usuallyn 6= m), and let their measured run time vectors be <t1 , t B 2 , ..., t B n > and <t1 , t C 2 , ..., t C m>. B’s contribution to the system run time on subdomainS i is t B i . The contribution ofC to the system run time is made up of a weighted combination of times from input values that reach its subdomains from B. The fraction of inputs fromS i reachingS C j is: rij = ∣∣{z ∈ S i |B(z) ∈ S j }∣∣ ∣∣SB i ∣∣ , (1) whereB(z) is the output of component B on inputz, which is input for component C. In equation (1),[rij ] is called the transfer matrix(from B to C), because it describes how the subdomains of B are mapped to those of C. A system designer, having chosen B andC and decided on serial composition for the system control structure, can obtain an estimate of the transfer matrix element given by equation (1). The transfer matrix allows calculation of the composed system run time from the component values, taking account of variations in run-time values over the input space. Let the systemSS composingB andC have a run time step function to be calculated: <t 1 , t SS 2 , ..., t SS n > (defined on the n subdomains ofB, since they form the input toSS). Then for the system, on an input in S i :
[1] Denise M. Woit,et al. Probabilistic program analysis for software component reliability , 2002 .
[2] Richard G. Hamlet,et al. Theory of software reliability based on components , 2001, Proceedings of the 23rd International Conference on Software Engineering. ICSE 2001.