Skip to main content
Log in

Retrenching partial requirements into system definitions: a simple feature interaction case study

  • Original Article
  • Published:
Requirements Engineering Aims and scope Submit manuscript

Abstract

In conventional model-oriented formal refinement, the abstract model is supposed to capture all the properties of interest in the system, in an as-clutter-free-as-possible manner. Subsequently, the refinement process guides development inexorably towards a faithful implementation. However, refinement says nothing about how to obtain the abstract model in the first place. In reality developers experiment with prototype models and their refinements until a workable arrangement is discovered.

Retrenchment is a formal technique intended to capture some of the informal approach to a refinable abstract model in a formal manner that will integrate with refinement. This is in order that the benefits of a formal approach can migrate further up the development hierarchy. The basic ideas of retrenchment are presented, and a simple telephone system feature interaction case study is elaborated. This illustrates not only how retrenchment can relate incompatible and partial models to a more definitive consolidated model during the development of the contracted specification, but also that the same formalism is applicable in a re-engineering context, where the subsequent evolution of a system may be partly incompatible with earlier design decisions. The case study illustrates how the natural method of composing retrenchments can give results that are too liberal in certain cases, and stronger laws of composition are derived for systems possessing suitable properties. It is shown that the methodology can encompass more ad hoc and custom-built techniques such as Zave's layered feature engineering approach to applications exhibiting a feature-oriented architecture (such as telephony).

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1.
Fig. 2.

Similar content being viewed by others

Notes

  1. Several private communications.

  2. Taking some liberties with language, we mean not only 'made sanitary' but 'made sane'.

  3. Some comment on the word 'incomplete' is in order. We mean here incomplete in the sense that some of the functional requirements of the system are deliberately being ignored in order to better understand and define the ones being focused on; we call this requirement incompleteness. In other places incompleteness is intended to refer to the lack of viability of a model to serve as a system description in its own right from a user's perspective (irrespective of the totality of requirements that ultimately needs to be captured). In such cases the incompleteness refers to the lack within the model of any defined system response to at least some of what ought to be regarded as legitimate user demands or inputs to the system; we call this model incompleteness; another way of describing this would be lack of input readiness. Such scenarios usually arise when there is an intention to fill in the missing pieces during later refinements: these later refinements can be of such a nature that they are incompatible for technical reasons with natural completions of the abstract model in its own right, thus provoking the incompleteness of the abstract model in the first place (since a suitable extension of an adroitly designed but incomplete abstract model will usually yield a valid refinement).

  4. Most presentations of retrenchment speak of an abstract and a concrete system, in the spirit of moving towards an implementation.

  5. One can accept this situation as it stands; i.e. one can, if a more precise solution is desired, add any necessary information about the outputs in those cases where the retrieve relation is re-established (and the concedes clause is not otherwise verified) as a top-level disjunct in the concedes clause, making it true always; we have finessed this possibility. Alternatively to improve matters regarding outputs, one can move to a more expressive if more complicated formulation of retrenchment, e.g. sharp retrenchment or its close relatives [13, 9]. Among these possibilities, output retrenchment replaces G in the consequent of the operation PO by \( {G \wedge O} \), where O(o, p) relates higher- and lower-level outputs for the case that G is maintained (in our case reducing to just (o = p)). Then a sound law of composition supplements (55)–(57) with the composition of O relations for successive retrenchments.

  6. This is as opposed to inheritance by method overriding, where superclass behaviour is altered, in an inconsistent manner, in the subclass. This alteration could be described using the concedes relation in a retrenchment-based formulation of the inheritance relation.

  7. We could have opted for a variant in which components of the extended common state which are not intrinsic to the model at a given layer were unconstrained, generating retrieve relations which were equalities in some components and universal relations in other components; but (110) is simper and leads to equivalent results.

  8. Readers will be able to rework what follows for operation definitions involving \( \mathrel{\hbox{\underbar{$\cup$}}}\;and\; \cup \) without difficulty.

  9. Actually the location cannot be entirely unspecified. It must be chosen in such a way that the invariant in (121) is preserved. One could add a clause to (125) to ensure this.

References

  1. Wirth N (1971) The development of programs by stepwise refinement. Commun ACM 14:221–227

    Article  Google Scholar 

  2. Dijkstra EW (1972) Notes on structured programming. In: Structured programming. Academic Press, London

  3. Hoare CAR (1972) Proof of correctness of data representations. Acta Inform 1:271–281

    Google Scholar 

  4. de Roever W-P, Engelhardt K (1998) Data refinement: model-oriented proof methods and their comparison. Cambridge University Press, Cambridge

    Google Scholar 

  5. Back RJR, von Wright J (1998) Refinement calculus: a systematic introduction. Springer, Berlin Heidelberg New York

    Google Scholar 

  6. Barroca LM, McDermid JA (1992) Formal methods: use and relevance for the development of safety-critical systems. Comput J 35:579–599

    Google Scholar 

  7. Banach R, Poppleton M (1998) Retrenchment: an engineering variation on refinement. In: Bert D (ed) Proceedings of B-98. Lecture notes in computer science, vol 1393. Springer, Berlin Heidelberg New York, pp 129–147. See also Tech Rep UMCS-99–3-2, http://www.cs.man.ac.uk/cstechrep

  8. Banach R, Poppleton M (2000) Retrenchment, refinement and simulation. In: Bowen JP, Dunne S, Galloway A, King S (eds) Proceedings of ZB-00. Lecture notes in computer science, vol 1878. Springer, Berlin Heidelberg New York, pp 304–323

  9. Banach R, Poppleton M (1999) Sharp retrenchment, modulated refinement and simulation. Form Aspects Comput 11:498–540

    Article  Google Scholar 

  10. Banach R, Poppleton M (2001) Engineering and theoretical underpinnings of retrenchment (submitted) http://www.cs.man.ac.uk/~banach/some.pubs/Retrench.Underpin.ps.gz

  11. Calder M, Magill E (eds) (2000) Feature interactions in telecommunications and software systems VI. IOS Press, Amsterdam

  12. Kimbler K (ed) (1999) Feature interactions in telecommunications and software systems V. IOS Press, Amsterdam

  13. Banach R, Poppleton M (2000) Fragmented retrenchment, concurrency and fairness. In: Liu S, McDermid JA, Hinchey M (eds) Proceedings of ICFEM-00. IEEE Computer Society Press, Los Alamitos, CA

  14. Zave P (2001) Requirements for evolving systems: a telecommunications perspective. In: Proceedings of the 5th IEEE international symposium on requirements engineering, pp 2–9

  15. Kimbler K, Bouma LG (eds) (1998) Feature interactions in telecommunications and software systems V. IOS Press, Amsterdam

  16. Back RJR (2002) Software construction by stepwise feature introduction. In: Bert D, Bowen JP, Henson MC, Robinson K (eds) Proceedings of ZB-02. Lecture notes in computer science, vol 2272. Springer, Berlin Heidelberg New York, pp 162–183

  17. Back RJR, Sere K (1996) Superposition refinement of reactive systems. Form Aspects Comput 8:324–346

    Google Scholar 

  18. Jackson M, Zave P (1998) Distributed feature composition: a virtual architecture for telecommunications services. IEEE Trans Software Eng 24:831–847

    Article  Google Scholar 

  19. Cansell D, Mery D (2000) Playing with abstraction and refinement for managing features interactions. In: Bowen JP, Dunne S, Galloway A, King S (eds) Proceedings of ZB-00. Lecture notes in computer science 1878. Springer, Berlin Heidelberg New York, pp 148–167

  20. Calder M, Kolberg M, Magill E, Reiff-Marganiec S (2001) Feature interaction: a critical review and considered forecast. Comput Networks 41(1):115–141

    Article  Google Scholar 

  21. Crow J, Owre S, Rushby J, Shankar N, Sirvas M (1995) a tutorial introduction to PVS. In: France R, Gerhart S, Larrondo-Petrie M (eds) Proceedings of WIFT-95 workshop on industrial strength formal specification techniques. IEEE Computer Society Press, Los Alamitos, CA

  22. Schellhorn G (1999) Verification of abstract state machines. PhD thesis, University of Ulm Fakultät für Informatik

  23. Schellhorn G (2001) Verification of ASM refinements using generalized forward simulation. J Univers Comput Sci 7:952–979

    Google Scholar 

Download references

Acknowledgement

The authors would like to thank Michael Jackson for valuable interaction during the preparation of this paper.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to R. Banach.

Appendix: PHONE Development via Refinement

Appendix: PHONE Development via Refinement

In this section we examine the prospects for doing at least some of the development of the telephone case study using refinement. We had better start by saying what we mean by refinement in this context.

We are working in a straightforward transition system-based framework. For this reason, notions of potential non-termination and attendant complexities, often taken into account in refinement formalisms, just do not arise: there are transitions that initiate and terminate successfully as described in an operation's transition relation, and there is nothing else. We revert to the usual convention of speaking about an abstract and a concrete system, as is prevalent in the refinement literature.

With the notational conventions we have been using up to now, we define the precondition for say an abstract operation m A, whose transition relation is stp mA, by:

$$pre_{m_A } \left( {u,i} \right) = \exists u',o \bullet stp_{m_A } \left( {u,i,u',o} \right)$$
(117)

(So pre mA is just what we called dom mA before, but we now conform to the terminology more common in refinement.)

Now we define refinement from an abstract system to a concrete system to be characterised by the following Z-refinement-like conditions:

$$ {\bf{Ops}}_A = {\bf{Ops}}_C $$
(118)
$$ pre_{m_A } \left( {u,i} \right) \wedge G\left( {u,v} \right) \Rightarrow pre_{m_C } \left( {v,i} \right) $$
(119)
$$\begin{array}{*{20}c} {{G{\left( {u,v} \right)} \wedge stp_{{m_{C} }} {\left( {v,i,v',o} \right)} \Rightarrow } \aftergroup \hfill} \\ {{{\;\;\;\left( {\exists u' \bullet stp_{{m_{A} }} {\left( {u,i,u',o} \right)} \wedge G{\left( {u',v'} \right)}} \right)}} \aftergroup \hfill} \\ \end{array} $$
(120)

Note that we are being strict here about I/O. The inputs and outputs must be identical at the two levels of abstraction. This is in line with viewing refinement as an implementation mechanism which can silently replace an abstract model with an implementation, without the user's awareness. (Also it finesses a couple of minor logical niggles.)

What are now the prospects of doing, for example, the PHONE to PHONE CF development step via refinement? Immediately we say nil, because (118) is violated by the additional table management operations of PHONE CF . Let us agree to ignore this for the sake of not falling at the first fence. We next examine one model for PHONE that has prospects for refinement.

PHONE′

In this system the state space is just as for the original PHONE model:

$$ \eqalign{ & calls:NUM \rightarrowtailbar NUM\;{\rm{ where}} \cr & \;\;\;dom\left( {calls} \right) \cap rng\left( {calls} \right) = \emptyset \cr} $$
(121)

The two operations, connect n and break n , look like:

$$ \eqalign{ & calls\;{\textrm{-}}\!\left( {i,connect_n ,o} \right)\!\textrm{-}\raisebox{1pt}{\small${>}$}\;calls'\;{\rm{ where}} \cr & \;\;\;{\rm{free}}\left( n \right) \wedge {\rm{free}}\left( i \right) \wedge \left( {n \ne i} \right) \wedge \cr & \;\;\;o = OK \wedge calls' = calls \cup \left\{ {n \mapsto i} \right\} \cr} $$
(122)
$$ \eqalign{ & calls\;{\textrm{-}}\!\left( {break_n } \right)\!\textrm{-}\raisebox{1pt}{\small${>}$}\;calls'\;{\rm{ where}} \cr & \;\;\;{\rm{busy}}\left( n \right) \wedge calls' = \left\{ n \right\} \leftsubtractoper calls \rightsubtractoper \left\{ n \right\} \cr} $$
(123)

Note that this differs from PHONE in that the specification of connect n has nothing corresponding to the 'else' clause of (6). It is thus a partial operation since in the \( {{\rm{busy}}{\left( i \right)} \vee {\left( {n = i} \right)}} \) case we are outside the precondition of connect n . Some stratagem like this is forced on us, however, because if PHONE CF 's connect CF,n operation is to be a valid refinement of connect n , then up to the latitude permitted by the retrieve relation (which will continue to be (23) and thus effectively affords no latitude whatsoever), the actions of connect CF,n and connect n must agree in the \( {{\rm{busy}}{\left( i \right)} \vee {\left( {n = i} \right)}} \) case should they both be defined, otherwise (120) will fail. This effect is rendered even more acute when we remember that, in refinement, outputs must agree.

Unfortunately this kind of partiality of operations is not acceptable in a high-level model that purports to capture a coherent set of user requirements, and is a manifestation of the model incompleteness described in the Introduction. User requirements at this level must express a defensively drawn and complete model, as it is quite unreasonable to assume that users can flawlessly adhere to the need to never call a connect n operation from a before-state/input combination for which there exists no connect n transition.

(It is thus clear that model incompleteness is unavoidably a user-level or meta-level issue, not deducible from the mathematics of the model alone. For example, whereas it is certainly the case that there are never any connect n transitions when busy(n) holds, this is not a symptom of model incompleteness due to the different significance of n and i at user level—users accept that it is semantically self-contradictory to expect a transition in the busy(n) case.)

Since this refinement attempt has spawned some unsatisfactory features, we give an alternative construction, exploiting non-determinism rather than partiality this time.

PHONE′′

In this system the state space is just as before:

$$\eqalign{ & calls:NUM \rightarrowtailbar NUM\;{\rm where} \cr & \;\;\;dom\left( {calls} \right) \cap rng\left( {calls} \right) = \emptyset \cr} $$
(124)

The operations connect n and break n this time look like:

$$ \eqalign{ & calls\;{\textrm{-}}\!\left( {i,connect_n ,o} \right)\!\textrm{-}\raisebox{1pt}{\small${>}$}\;calls'\;{\rm{where}} \cr & \;\;\;{\rm{free}}\left( n \right) \wedge \cr & \;\;\;{\rm{if}}\;{\rm{free}}\left( i \right) \wedge \left( {n \ne i} \right) \cr & \;\;\;{\rm{then}}\;o = OK \wedge calls' = calls \cup \left\{ {n \mapsto i} \right\} \cr & \;\;\;{\rm{else}}\;{\rm{either }}\;o = NO \wedge calls' = calls \cr & \;\;\;{\rm{or}}\;o = OK \wedge \left\{ n \right\} \leftsubtractoper calls' = calls \cr} $$
(125)
$$ \eqalign{ & calls\;{\textrm{-}}\!\left( {break_n } \right)\!\textrm{-}\raisebox{1pt}{\small${>}$}\;calls'\;{\rm{where}} \cr & \;\;\;{\rm{busy}}\left( n \right) \wedge calls' = \left\{ n \right\} \leftsubtractoper calls \rightsubtractoper \left\{ n \right\} \cr} $$
(126)

In this version of events, in the \( {{\rm{busy}}{\left( i \right)} \vee {\left( {n = i} \right)}} \) case, the operation connect n has the capacity to non-deterministically connect to some unspecified location.Footnote 9 The non-determinism is resolved in the refinement to PHONE CF (still using the same retrieve relation), in which the connect CF,n operation specifies when and where a connection can be made in the \( {{\rm{busy}}{\left( i \right)} \vee {\left( {n = i} \right)}} \) case.

The abstract operation is now total, overcoming the objection in the previous version. However, the price for this is the non-deterministic else clause in (125). For sure, the PHONE′′ model is a more abstract entity than the PHONE CF model, but when one asks the question as to what extent PHONE′′ deserves to be called a specification of the POTS model in the sense that PHONE′′ captures a coherent set of functional requirements of the POTS system the answer is less than satisfactory. Is the specific non-determinism present in PHONE′′ a requirement of the POTS model? The answer is surely that it is not. The PHONE′′ model was specifically construed to withhold those features from PHONE CF that could neatly be reinstated by the definition of refinement that we are using; i.e. it was reverse engineered from PHONE CF . Thus the abstract and concrete levels have become entangled in this development, and vestiges of properties of the envisaged lower-level model have had to migrate to the higher-level one in order to satisfy the exigencies of refinement. This is the kind of reverse engineering we alluded to in the Introduction; and while it might not be too problematic in such a small example, in larger systems it can become a serious nuisance. The pollution of the perspicuity of the higher-level models, arising from the forced incorporation of very specific perspectives on inappropriate lower-level detail forced upwards by the demands of refinement, can merely serve to bring an otherwise blameless refinement-based specification development methodology into disrepute among designers.

Thus refinement based-developments of the evolution of a more complex specification from a simpler one (each of which captures a coherent set of functional requirements of the system at a suitable level of abstraction) are replete with difficulties. We have illustrated these just in the case of the PHONE to PHONE CF development step; however, extending the same approach to the other parts of the feature interaction case study would simply cause the illustrated difficulties to proliferate.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Banach, R., Poppleton, M. Retrenching partial requirements into system definitions: a simple feature interaction case study. Requirements Eng 8, 266–288 (2003). https://doi.org/10.1007/s00766-002-0157-6

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00766-002-0157-6

Keywords

Navigation