A method satisfies Modular Protection if it yields architectures in which the effect of an abnormal condition occurring at run time in a module will remain confined to that module, or at worst will only propagate to a few neighboring modules.The underlying issue, that of failures and errors, is central to software engineering. The errors considered here are run-time errors, resulting from hardware failures, erroneous input or exhaustion of needed resources.
The criterion does not address the avoidance or correction of errors, but the aspect that is directly relevant to modularity their propagation.Languages such as PL/I, CLU, Ada,C++ and Java support the notion of exception. An exception is a special signal that may be “raised” by a certain instruction and “handled” in another, possibly remote part of the system. When the exception is raised, control is transferred to the handler. Such facilities make it possible to decouple the algorithms for normal cases from the processing of erroneous cases. But they must be used carefully to avoid hindering modular protection.
The designer of every module must select a subset of the module’s properties as the official information about the module, to be made available to authors of client modules.the whole text of the module itself could serve as the description.It provides a correct view of the module since it is the module.The Information Hiding rule states that this should not in general be the case: the description should only include some of the module’s properties. The rest should remain non-public or secret. Instead of public and secret properties, one may also talk of exported and private properties. The public properties of a module are also known as the interface of the module.
The fundamental reason behind the rule of Information Hiding is the continuity criterion. Assume a module changes, but the changes apply only to its secret elements,leaving the public ones untouched,then other modules who use it, called its clients, will not be affected.The smaller the public part, the higher the chances that changes to the module will indeed be in the secret part.
No comments:
Post a Comment