Logo BCDDLogo CSC
BCDDBehavioural Contract-Driven Design
version 1.0-beta
ITEN

Appendix A — Keywords, in the order in which they are introduced

The table lists the words of the language in the order of the chapters, with the chapter in which each is described and its use. It comprises the keywords, the operators, the names of the basic types, the time units and the reserved lower-case words. bcdd recognises all the words of the table. The complete list of reserved words follows the table.

Word Ch. Use
CSC … END 2 opens and closes the description of a boundary
-- 2 comment, ignored by the program
VERSION 2 version number of a CSC or of an entity
PURPOSE 2 purpose: in one sentence, what the boundary is for
EVENT IN 2 input event: what arrives at the boundary from the other side
STATE … INITIAL 2 state, that is what is observed at the boundary at every instant, with its initial value
Boolean, true, false 2 logical type (true or false) and its two values
GUARANTEE 2 guarantee
VERBAL 2 guarantee written in words
VERIFY BY JUDGEMENT 2 verification by the judgement of a person
VERIFY BY INSPECTION 2 verification by inspection of a document or a recording
ASSUME 3 assumption: condition on the other side on which the guarantee depends
EVENT OUT 4 output event: what leaves the boundary towards the other side
CAPABILITY 5 request that the other side can make
requested, accepted, rejected, completed, failed 5 the phases of the lifecycle of a request
AUTONOMOUS 5 request started by the provider
TYPE 6 named type: list of values or type described in words
:= 6 introduces the content of a named type (TYPE) or the value of a named constant (DEFINE)
Integer, Real, String 6 basic types: integers, real numbers, strings
[a .. b] 6 interval of values of Integer and Real
Duration, s, ms 6 duration, in seconds or milliseconds
Sequence of, Optional 6 sequence of values; value that may be missing
Record, ABSENT 6, 23 type with several fields; absence of an Optional value
STATUS 7 approval status of the CSC or of a line
HYPOTHESIS 7 pending approval
RATIFIED BY 7 approved, with the decision reference
DETAILS 8 detail: specifies a guarantee or an assumption more precisely
DEFINE 8, 23 named constant; with parameters, function
UNDECIDED 8 undecided number
SCENARIO 9 scenario described instant by instant
@ 9 time of an instant of a scenario
EXPECT ADMITTED, EXPECT REJECTED 9 the scenario must be admitted, or rejected
GIVEN 9 starting state of a scenario
ENTITY 12 entity: what stands behind one or more boundaries
OFFERS, USES 12 boundary that the entity provides, or uses
COMPOSED OF 13 parts list of an entity
[m .. n] 16 multiplicity: minimum and maximum number of copies of a part
VARIANT 20 variant: one of the alternatives of an aspect of the entity, declared with VARIANT group = choice
ALWAYS 21 always
EVENTUALLY 21 sooner or later
WHENEVER … THEN 21 whenever… then
AT ONCE 21 in the same step
WHILE 21 while
NOT, AND, OR, IMPLIES 21 combination of conditions
= <> < <= > >= 21 comparisons
+ - * / ^ 21 sum, difference, product, quotient, power
IN { … } 21 the value is one of those listed
IF … THEN … ELSE 21 value chosen on the basis of a condition; the expression goes in parentheses
ABS, MIN, MAX, LOG10, ROUND, FLOOR, CEIL 21 mathematical functions
WITHIN 22 within a certain time
TIME SINCE 22 time elapsed since an event
COUNT, COUNT … IN LAST 22 count of an event, from the start or in an interval
SINCE 22 in COUNT(e SINCE f): count after the last f
WITH 22 filter on the parameters of an event
LAST 22, 23 in IN LAST; in LAST(e), the last e that occurred
REPEAT … EVERY, FOREVER 22 steps of a scenario that repeat
PREV 22 value of a state in the previous step
NEVER 23 never; shorthand
ONCE 23 occurred at least once; shorthand
CHANGED 23 the state has changed value; shorthand
PRECEDES 23 an event precedes a condition; shorthand
BEFORE, AFTER 23 before the first event, from the first event onwards; shorthands
ACCEPTS … ONLY WHILE 23 condition for accepting a request; shorthand
ENSURES 23 what holds when a request succeeds; shorthand
RESOLVES … WITHIN 23 maximum time of the response to a request; shorthand
REQUIRES 23 condition for making a request, written in an assumption; shorthand
AFTER … UNTIL, BETWEEN … AND, FOR AT LEAST 23 shorthands that the manual does not use; for BETWEEN and FOR AT LEAST the expanded form is not yet defined
TRANSITION … -> … ON … WHEN 23 closed set of the transitions of a state; shorthand
DEFINE EVENT 23 derived event
FOR ALL … IN 23 for every value of a finite type; shorthand
x[T], . 23 indexed state; field of a record
FOLLOWS 23 state that follows the parameter of an event; shorthand
PRESENT 23 an Optional value is present
BINDING … END 25 block of the concrete forms of a boundary
BIND 25 concrete form of an element
AS 25 distinguishing name of a BINDING block
VERIFICATION … END 26 block of the verification plan
MEANS … OBSERVES … RESOLUTION 26 recording instrument, with the elements it observes and the resolution
USING 26 BINDING block through which an instrument observes
TRANSLATES 26 scenario translated into the concrete forms
EXTENSION 27 extension: new form of the language, declared in a profile
KIND, LEVEL, PARAMS, FORM, MEANING, REDUCES TO, SOURCE 27 fields of an extension, with VERIFY
PATTERN, SCOPE, FUNCTION, DECLARATION, RELATION, SCENARIO-FORM 27 values of the KIND field
Name, Type, Event, Condition, Expression, Duration, Property 27 categories of the parameters of an extension
PROFILE, IMPORT PROFILE 27 profile, and the line with which a block imports it

The list of reserved words

The keywords and reserved words number 136. None can be a name. The language distinguishes upper and lower case, so pattern and level are valid names. The words of the CSC, of the entity, of the blocks and of the header:

CSC VERSION END STATUS HYPOTHESIS RATIFIED BY PURPOSE CAPABILITY AUTONOMOUS
EVENT IN OUT STATE INITIAL DEFINE UNDECIDED GUARANTEE ASSUME DETAILS VERBAL VERIFY
JUDGEMENT INSPECTION SCENARIO GIVEN EXPECT ADMITTED REJECTED COMPOSED OF
TYPE ENTITY OFFERS USES VARIANT
IMPORT PROFILE BINDING VERIFICATION EXTENSION

The words of formulas and scenarios, with the type Record:

WHILE ALWAYS EVENTUALLY WHENEVER THEN WITHIN AT ONCE REPEAT FOREVER EVERY
AND OR NOT IMPLIES IF ELSE COUNT LAST TIME SINCE PREV WITH ABSENT PRESENT Record

The words of shorthands and the mathematical functions:

NEVER AFTER BEFORE BETWEEN UNTIL PRECEDES FOR LEAST ACCEPTS ONLY REQUIRES ENSURES RESOLVES
CHANGED TRANSITION ON WHEN FOLLOWS ALL
ABS MIN MAX LOG10 ROUND FLOOR CEIL

The fields of an extension, the values of the KIND field and the categories of parameters:

KIND LEVEL PARAMS FORM MEANING REDUCES TO SOURCE
PATTERN SCOPE FUNCTION DECLARATION RELATION SCENARIO-FORM
Name Type Event Condition Expression Duration Property

The words of concrete forms and of the verification plan:

BIND AS MEANS OBSERVES RESOLUTION USING TRANSLATES

The words of two forms reserved for future use and those of withdrawn forms:

REFINED REFINES
FACE LINK MAP REFINEMENT VIEW

Finally, in lower case, true, false, the five names of the lifecycle (requested, accepted, rejected, completed, failed) and _. The codes V1, V2 and C1 … C8 are recognised as codes only in the VERIFY field of an extension; elsewhere they are valid names. The names of the extensions of a profile are not reserved.