5.3. Quantifying design by contract pluggability
Finally, the AO implementations are clearly superior in the change scenarios CS3
and CS4, which basically involves the partial and total removal of the design by
contract concern. The change scenario CS3 is responsible for removing a use case in
the HW system and its DbC-related code. The change scenario CS4 goes beyond where it completely removes the design by contract concern of the ¯nal production
HW system. We consider that a design by contract code is completely removed from
the system when we exclude or comment the lines of code related to its realization
on classes or aspects. Hence, as observable in Table 3, the e®ort to unplug or plug a
DbC feature such as preconditions is much easier in the AO implementation of HW
system. We need less changes in components, and also fewer lines of code need to be
eliminated to partial or complete remove the DbC concern from the HW system.
Even though an aspect declaration has a lot of pointcuts, advice, and DbC-related
features, the e®ort to completely unplug the design by contract concern in practice is
to remove 11 aspects from the HW build and remove the class which encapsulate all
the DbC operations; whereas in the OO version, we need to make 67 invasive changes
to OO classes to remove several lines of code related to DbC.
5.3. Quantifying design by contract pluggabilityFinally, the AO implementations are clearly superior in the change scenarios CS3and CS4, which basically involves the partial and total removal of the design bycontract concern. The change scenario CS3 is responsible for removing a use case inthe HW system and its DbC-related code. The change scenario CS4 goes beyond where it completely removes the design by contract concern of the ¯nal productionHW system. We consider that a design by contract code is completely removed fromthe system when we exclude or comment the lines of code related to its realizationon classes or aspects. Hence, as observable in Table 3, the e®ort to unplug or plug aDbC feature such as preconditions is much easier in the AO implementation of HWsystem. We need less changes in components, and also fewer lines of code need to beeliminated to partial or complete remove the DbC concern from the HW system.Even though an aspect declaration has a lot of pointcuts, advice, and DbC-relatedfeatures, the e®ort to completely unplug the design by contract concern in practice isto remove 11 aspects from the HW build and remove the class which encapsulate allthe DbC operations; whereas in the OO version, we need to make 67 invasive changesto OO classes to remove several lines of code related to DbC.
การแปล กรุณารอสักครู่..
