Chapter 12 — What lies behind the boundaries: the entity
The guarantees that bind the button and the light cannot be written in either of the two CSCs of chapter 11. This chapter introduces what lies behind the two boundaries and keeps those guarantees: the entity.
The entity
An entity is the system that lies behind one or more boundaries. It is described by stating three things:
- the boundaries on which it keeps the guarantees, that is, those of which it is the provider;
- the boundaries on which it relies on the guarantees of others, that is, those of which it is the consumer;
- the guarantees that bind two or more of its boundaries, called entity guarantees.
The description of an entity never states where the entity is located: on which wall, in which device, in which program. Its location is a choice of whoever implements it (chapter 1); an entity may also extend over several devices.
The staircase light is an entity, LuceScale, which lies behind the boundaries Pressione and Luce. The guarantee
“when someone presses the button, the light switches on” is one of its entity guarantees.
A used boundary: the power supply
The lighting installation is powered by the electrical mains of the block of flats. The mains is another
system, and between the mains and the installation there is a boundary, described by the CSC Alimentazione:
-- The electrical mains of the block of flats, as seen by the lighting installation.
CSC Alimentazione VERSION 0.1
STATUS HYPOTHESIS
PURPOSE "The electrical mains of the block of flats supplies voltage to the staircase lighting installation"
STATE presente : Boolean INITIAL true
GUARANTEE r1: VERBAL "The voltage is present, except for interruptions of the mains"
VERIFY BY INSPECTION "the register of interruptions of the block of flats"
ASSUME r-a1: VERBAL "The staircase lighting installation draws at most 100 W"
VERIFY BY INSPECTION "the rating plate data of the installed lamps"
END
The CSC is written from the side of the provider, the mains (chapter 4). On this boundary the staircase light is the
consumer: it relies on the guarantee r1 and must satisfy the assumption r-a1.
The entity file
-- The staircase light: what lies behind the button and the light.
ENTITY LuceScale VERSION 0.1
STATUS HYPOTHESIS
PURPOSE "The person on the stairs presses the button and has light to go up or down"
OFFERS Pressione
OFFERS Luce
USES Alimentazione
GUARANTEE ls1: VERBAL "When someone presses the button, the light switches on"
VERIFY BY JUDGEMENT "a person who presses the button and watches"
GUARANTEE ls2: VERBAL "The light switches off 90 s after the last press, with a tolerance of 5 s"
VERIFY BY JUDGEMENT "a person who measures with a stopwatch the time between the last press and switch-off"
GUARANTEE ls3: VERBAL "During cleaning a press of the button does not change the mode"
VERIFY BY JUDGEMENT "the caretaker, who presses the button during cleaning"
END
ENTITY LuceScale VERSION 0.1 opens the description of the entity, with its name and its version. STATUS and
PURPOSE have the same meaning they have in the CSC.
OFFERS Pressione states that the entity is the provider on the boundary Pressione: it keeps its guarantees and
relies on its assumptions. USES Alimentazione states that the entity is the consumer on the boundary Alimentazione:
it satisfies its assumptions and relies on its guarantees. After OFFERS and USES the name of a CSC is written.
The GUARANTEE lines are the entity guarantees. They have the same form as the guarantees of a CSC, with the short
name and the verification, but they name elements of several boundaries: ls1 binds the press and the light. The assumption
a1 of the CSC Pressione now has a guarantee that depends on it: ls1.
An entity has no elements of its own: it has no requests, events, states, types, named constants or assumptions. What
is observed is described in the CSCs of its boundaries. What the entity requires of other systems is in the
assumptions of the CSCs it provides, such as a1. What other systems require of the entity is in the
assumptions of the CSCs it uses, such as r-a1.
A CSC and an entity cannot have the same name: when the two names are in the same file, bcdd reports E01.
The report
$ bcdd check --strict LuceScale.csc
bcdd check --strict LuceScale.csc
lines: 17 (recognised 13, comments 1, blank 3, unrecognised 0)
blocks: 1
line 3: ENTITY LuceScale VERSION 0.1, STATUS HYPOTHESIS
line 7: OFFERS Pressione in Pressione.csc at line 3: VERSION 0.1, STATUS HYPOTHESIS, no errors
line 8: OFFERS Luce in Luce.csc at line 3: VERSION 0.1, STATUS HYPOTHESIS, no errors
line 9: USES Alimentazione in Alimentazione.csc at line 3: VERSION 0.1, STATUS HYPOTHESIS, no errors
1. ERRORS: 0
2. DEGREE OF THE CONTRACTUAL LINES
verbal: 3
formal: 0
declared extension: 0
unrecognised: 0
line 11: GUARANTEE ls1 verbal
line 13: GUARANTEE ls2 verbal
line 15: GUARANTEE ls3 verbal
3. UNDECIDED: 0
4. PENDING APPROVAL, NOT CONTRACT: 3
line 11: GUARANTEE ls1
line 13: GUARANTEE ls2
line 15: GUARANTEE ls3
5. UNRECOGNISED LINES: 0
6. UNDECLARED TYPES: 0
7. CSCs NAMED BUT NOT CHECKED: 0
8. USES WITHIN ENTITIES: 0
outcome: no errors
Below the entity line, indented, the citations appear: one line for each CSC cited by OFFERS or
by USES. For each of them bcdd looks for the file of the CSC, checks it and reports its version, its STATUS and
the outcome. The first citation reports that the CSC named at line 7 is in the file Pressione.csc,
at line 3; the CSC is at version 0.1, is pending approval and has no errors. The check of a cited CSC
concerns its form, not whether its guarantees are compatible with those of the entity: that
assessment is the responsibility of whoever writes.
Section 8 appears when the file contains an entity; it is described in chapter 13.
In the messages of bcdd a CSC cited by an entity is called a “connector”; the manual uses “boundary”.
In the header of an entity only STATUS HYPOTHESIS is allowed: the entity as a whole is not approved. Its
entity guarantees are approved one by one; the CSCs it cites are approved in their own files.
Summary
- An entity (
ENTITY) is the system that lies behind one or more boundaries; its description never states where it is located. OFFERSstates a boundary of which the entity is the provider,USESa boundary of which the entity is the consumer.- Entity guarantees bind two or more boundaries of the entity and have the form of the guarantees of a CSC.
- An entity has no elements of its own: what is observed is described in the CSCs of its boundaries.
bcddlooks for and checks the cited CSCs and reports their version,STATUSand outcome.
Special cases
Element of its own in an entity. If STATE accesa : Boolean INITIAL false is written in the entity:
1. ERRORS: 1
line 10: [E18] STATE cannot appear in an entity: write it in the CSC of one of its connectors
…
5. UNRECOGNISED LINES: 1
line 10: STATE accesa : Boolean INITIAL false
The same error appears for ASSUME, CAPABILITY, EVENT, DEFINE and TYPE.
Approved STATUS in the header. The line STATUS RATIFIED BY D-20 in the header of an entity is not
recognised, and the block turns out to have no STATUS:
blocks: 1
line 3: ENTITY LuceScale VERSION 0.1, without STATUS
…
5. UNRECOGNISED LINES: 1
line 4: STATUS RATIFIED BY D-20
Approval of entity guarantees. Since the header of the entity cannot be approved, bcdd ratify with
--all records the approval of the entity guarantees by writing the STATUS in each of them:
$ bcdd ratify LuceScale.csc --all D-20
approved with D-20 in ENTITY LuceScale: 3 lines
line 11: GUARANTEE ls1
line 13: GUARANTEE ls2
line 15: GUARANTEE ls3
contract: 3
Cited CSC that cannot be found. If the entity cites with OFFERS Citofono a CSC whose file does not exist,
the citation appears in section 7, entitled CSCs NAMED BUT NOT CHECKED:
7. CSCs NAMED BUT NOT CHECKED: 1
line 9: Citofono
It is not an error: the section reports that the CSC has not been checked. Section 7 also lists the entities cited as parts and not found (chapter 13).
Location of the entity. The fact that the button is in the entrance hall and the lamp on the ceiling is not written: no form of the language states where an entity is located.

