| |||
|
Location http://www.cs.mun.ca/~ulf/mod/appdom.html. Written 250304 by Ulf Schünemann. Copyright (C) 2004 Ulf Schünemann. Related: how real are object-oriented models | meaning by effective coupling | software decomposition paradigms |
System and Domain and Function
|
|
|
|
«Every
computer system is concerned with a real world, a reality, outside itself.
... A payroll system is
concerned with employees, the work they do, the pay the earn, the tax they must
pay, the holidays they are entitled to. A process control system for a chemical
plant is concerned with the vessels, pipes and vales of the plant, the flow of
liquids and gases, the temperatures and pressures at the various points in the
plant.» [SysD 4] |
| | \|/ | | \|/
«Although we regard the real world as given, we do not, of course, exclude the
possibility that some or all of the real world must be invented or changed. For
most part, the invention or change is not itself an integral part of the JSD
development.» [SysD x]
| specification | of system function
| model | of the domain
«Model and function are inseparable:
we cannot say anything about system function without implying a model of the real world;
we cannot say anything about the real world without implying some purpose in our view.
The question is: where should we begin?
In the functional approach, the model of reality is
implicit in the functional specification, and never fully articulated.
In JSD, the functional capability of the system is implicit in the model,
but in the steps which follow the modelling, system functions
are fully specified to whatever extent they can be known during development.»
[SysD 13] |
invent [normative]
| :
| describe [factual]
|
«[T]o model the real world [around the system] is to describe what already exists,
while to define and specify system functions is to create something new.
Of course, sometimes the system function will be no more
than a reproduction of the function of an existing system;
and sometimes a part, at least, of the real world for a system will need to be invented
rather than merely described. But the point remains true for most systems. | In JSD, recognizing that the developer must practise both description and invention in producing the specification, we adopt a procedure in which the description comes first and the invention afterwards: the developer first models the real world, the defines the system function.» [SysD 14]. volatile
| :
| stable
|
«The greater stability of the model is a consequence of the fact that
the system functions must be expressed in words
whose meaning depends upon the user's view of reality.
If the view of reality changes, the functions must change, but not vice versa:
function can change while the underlying view of reality remains
constant.» [SysD 12] | I want to add: The model is also more stable, because it is "older", based on the domain expert's traditional understanding of the real world (around the new system). But the function for which the system is to be developed, may be something totally new, something not well understood at the start of development. | ||||||
|
The most convincing little counter-example for resuability/maintainability I've ever encountered
From [SysD 9-11]:
For example, a company operates boats for hire on a pleasure lake.
At an online terminal, the boatman enters
the boat-nr,
as a S[tart-session] event, when a boat leaves,
and again, as an E[nd-session] event, when a boat returns.
Functional requirement:
report the number of sessions and the everage session time.
For this function, it suffices in a loop to
increment a session counter on each S event,
and sum up the current times of all S events
minus the current times of all E events.
Some extensions which for the boat manager seem minor things to ask for: -> «Careful examination of the existing system convinces the developer that the requested enhancement cannot be made except by throwing away what has already been done and building a completely new system.» [SysD 10]
«The developer ... would claim that he was very unlucky.
[ there are other extensions which are much easier to add ] «[T]he developer has failed to understand how the user sees the real world ... [T]he system, even when its function specification appears to satisfy the user's needs, is somehow not quite right: it embodies distortions of the reality seen by the user, and these distortions give rise to operational and maintenance difficulties. In the trivial illustration of the boating lake system, the user sees the world as one in which there are a number of sessions, each with a beginning and ending; but the developer sees it as one in which there are a number of events, each of which is either an S[tart-session] event or an E[nd-session] event. The difference is in some ways subtle; but it is enought to make the system absurdly inflexible.» [SysD 13f] «Many experienced system developers would claim, with justice, that they would not have developed the bad solution we are castigating. They would have recognized that the rearrangement of the computation of totaltime [from length-#1 + length-#2 ... to end-#1 + end-#2 + ... - start-#1 - start-#2 ...] was a dangerous optimization, and would have developed the system differently. Quite so. A good `function designer' is, in fact, applying criteria to system development which lie outside the realm of functional decomposition itself. JSD analyzes those criteria, places them in the appropriate early stage of the development procedure, and makes them fully explicit ...» [SysD 12, my red] |
Domain Model
= 1. Abstract description (symbolic object)
+ 2. Concrete model (realization of description in computer connected physically with its environment=domain)
|
«Making a JSD model of the real world involves two distinct tasks:
| --- first, making an abstract description of the real world, and --- second, making a realization, in the computer, of that abstract description.» [SysD 5].
For example, developing a system to control traffic on the a certain part of a railroad network
starts with an abstract description of that railroad:
|
| 1. «An abstract description of the real world is, as we have seen [in the railroad example on pp. 5-7], a partial description: we chose to describe certain parts of reality and to omit others. In the railroad model, the developer apparently chose to describe the arrangement of the tracks in segments, the connections between segments, and the movements of trains over the segments; the curvature of the main segments, their physical construction, the varying gradient of the track, the size of each train, and an infinity of other aspects of reality have all been omitted. This kind of selectivity is inevitable in any description: the only complete description of reality is reality itself, as the Ruritanian map-makers learnt when they set out to construct a perfect one-to-one scale map of their country.» [SysD 7]
| \|/
2. «The realization in the computer
is then a model of the real world in the same sense that
an architectural model is a model of the real building, or a naval model
is a model of the real ship, or an economic model is a model of the real
economy, or a map is a model of the real terrain. The abstract description of
the real world is simply a description in which relevant aspects are described
and irrelevant aspects are omitted ... The realization must satisfy the abstract description closely
enough for the purpose the model is to serve» [SysD 5].
|
«This description
can be realized in an electronic model.
|
3. «Given a computer model which simulates the real world,
we will be able to add functions for displaying the state of the real world,
either continuously or on request, for producing exceptional outputs
to indicate the occurence of particular conditions, and for producing outputs
that can be fed back to the real world to affect its subsequent
behavior.» [SysD 7]
|
«This electronic model has, in itself,
no function. It does nothing except fulfil its role as a model,
faithfully simulating the described behavior of the real
world.» [SysD 6]
| \|/ | ||
|
Advantage:
Give unambiguous meaning to system environment=domain description (abstract model)
by connecting computer system with its environment (concrete model)
«To make a realized working model corresponding to the abstract description requires that we establish some connection between the real world and the model. In the railroad model, the tracks and trains must be connected to the parts of the electronic apparatus which simulate their behavior, ensuring that when a real train enters a real segment of track the states of circuits corresponding to the train and track segment are correspondingly changed. The abstract description and its realization together provide the context for functional specifications. They define a set of words---train, track, segment--- to be used in specifying system functions; the meaning of each word in the real world is given by the connections between the real world and the model. Once the model has been created, we can be in no doubt about the meaning, for example of 'train'. In the model itself, a train is that part of the circuitry which realizes the description of a train; in the real world, a train is whatever is connected to that part of the model. Functions concerned with trains can then be specified unambiguously: any ambiguity must perforce have been resolved when the abstract description and its realization were made and agreed with the user of the system. By contrast, a development procedure starting with functional specifications is inevitably dealing in undefined terms. In a banking system, a function specified as 'report when a customer's account is overdrawn' relies in an obvious way on the meanings of the words 'customer', 'account', and 'overdrawns'. If these meanings have not been defined in an earlier stage of development, the functional specification is necessarily ambigusous. Of course, as this illustration shows, we may well suppose that the meanings of the terms are so clear and so well known that no explicit definition is necessary. The consequence of this supposition is often that hidden ambiguities in functional specifications remain to plague the later stages of the development. In JSD we ensure that functions can be unambiguously specified in terms of a previously created model.» [SysD 7f] |