8. Errors
An error is a construct that bcdd recognises in its form but that violates a rule of the language. There are forty
errors (E01-E40).
| Code | When | Line indicated | Exact text of the message |
|---|---|---|---|
| E01 | two elements with the same name or short name in the same block; two parameters or two arguments with the same name in the same line; two blocks with the same name in the same file, whatever their type. In the entity: two parts, a part and a guarantee, or a scenario and a part or a guarantee, with the same name; two OFFERS with the same name, unless both write VERSION with different versions (section 5); likewise for two USES. In a CSC, also a value of a list of values equal to another name of the block |
the second | name already used at line N: X |
| E02 | DETAILS X where X is neither a GUARANTEE nor an ASSUME of the same block; in a DEFINE, X is not a DEFINE of the same block; in a scenario, X is not a scenario of the same block |
that of the DETAILS |
DETAILS names an id that is neither a GUARANTEE nor an ASSUME of this CSC: X; in an entity DETAILS names an id that is not a GUARANTEE of this ENTITY: X; DETAILS names a name that is not a DEFINE of this CSC: X; DETAILS names an id that is not a SCENARIO of this block: X. Also: in an entity with VARIANT segments, the line named stands in a choice that does not hold in all the compositions of the detail (section 4.10): DETAILS names a GUARANTEE that does not hold in all the compositions of this line: X (it is in VARIANT D = S) |
| E03 | a step or a GIVEN names as an event something that is not an EVENT, as a request something that is not a CAPABILITY, as a state something that is not a STATE, or an argument that the event does not have among its parameters. Also: in an entity scenario, a qualified name X.y in which X is a connector of the entity (OFFERS or USES) and its CSC is found, but y is missing or of the wrong kind, or an argument that X.y does not have; a simple name used as an event, a request or a state, because an entity has no elements of its own (section 4.6); in a CSC block, a name used as a value (G26) that is not a value of a list of values of the block |
that of the name (for a qualified name, that of X) |
name not declared as EVENT: X (and likewise CAPABILITY, STATE), or name not declared as a parameter of E: X; with a qualified name name not declared as EVENT: X.y, name not declared as a parameter of X.y: a; for a value name not declared as a value of TYPE: X |
| E04 | STATUS RATIFIED not followed exactly by BY and a Decision |
that of RATIFIED |
STATUS RATIFIED without a decision: BY D-number is needed |
| E05 | the DETAILS form a cycle (including a line that details itself), among contractual lines, among DEFINEs or among scenarios |
that of the member of the cycle that comes first in the file | circular DETAILS: A -> B -> A, starting from that member and following the DETAILS |
| E06 | an open string is not closed before the end of the file | that where the string opens | unclosed string: the file ends inside the string opened here |
| E07 | a block without END (the file ends, or another block begins), including a BINDING, a VERIFICATION, a profile or an extension (section 4.11) |
the header of the block | unclosed block: END of CSC X is missing or … of REFINEMENT VIEW X or … of ENTITY X; … of BINDING X, … of VERIFICATION X, … of PROFILE X, … of EXTENSION X, with X the second word of the header if it is a Nome; ? if the name cannot be read. An extension without END inside a profile without END gives a single E07, on the profile |
| E08 | END without an open block (an extension is an open block inside its profile, and so is the misplaced one of E32: its END does not give E08) |
that of END |
END without an open block |
| E09 | a line that begins with CSC, ENTITY, BINDING, VERIFICATION, PROFILE or EXTENSION (inside a profile) and does not respect G1, G31, G40, G48, G49 or G50 |
that line | invalid header: CSC Name VERSION number expected or invalid header: ENTITY Name VERSION number expected, … BINDING CSCName VERSION number [AS name] expected, … VERIFICATION CSCName VERSION number expected, … PROFILE Name VERSION number expected, … EXTENSION Name expected. For EXTENSION with a keyword or a reserved word as its name, E34 applies instead |
| E10 | a CSC, an entity or a profile without a recognised PURPOSE; a second PURPOSE; a second recognised STATUS in the header zone (sections 4.2, 4.9 and 4.11, including in a BINDING) |
the header of the block; the second PURPOSE; the second STATUS, column of STATUS |
PURPOSE missing in CSC X or PURPOSE missing in ENTITY X, PURPOSE missing in PROFILE X; PURPOSE repeated: the first is at line N; STATUS repeated: the first is at line N |
| E11 | the file contains no CSC, no entity, no BINDING, no VERIFICATION and no PROFILE (a block with an invalid header counts; a withdrawn block and an extension outside a profile do not) |
none | the file contains no CSC |
| E12 | in a scenario a step has a time smaller than the largest of the previous steps; or the scenario mixes steps with units and steps without | that of the step | the time of the step decreases: @T after @M; steps with and without a time unit in the same SCENARIO |
| E13 | a GUARANTEE or ASSUME with a valid line header whose property is only VERBAL and a string, without VERIFY (section 4.5) |
that of the word VERBAL |
VERBAL without VERIFY: VERIFY BY JUDGEMENT or INSPECTION and a string are needed |
| E15 | a declaration that begins with REFINEMENT, in a position where a block begins (section 4.8) |
that of REFINEMENT; column of REFINEMENT |
REFINEMENT VIEW has been withdrawn: a decomposition is written with ENTITY |
| E14 | inside an entity E with all parts found, a part P uses a CSC X that no other part of E provides and that E does not use from outside, with the match rule of section 9.4 | that of part P in the checked file; column of the name P | the part P uses connector X: no other part of E provides it, nor does E use it from outside, with X written as in the USES line of P, followed by VERSION w if present; E is the name of the entity, ? if it cannot be read |
| E16 | in an entity E with at least one part (G34), with or without COMPOSED OF, and all parts found; with compositions (4.10), in each one that has at least one part present: a public CSC of E (OFFERS X or USES X) that no part exposes on the same side, with the match rule of section 9.4 |
that of the OFFERS or USES line of E; column of the name |
the public connector X of E (provided) is not assigned to any part (or (used) for USES), with X written as in the line, followed by VERSION w if present |
| E17 | under the same condition, a part P provides X, no other part of E uses it and E does not provide it, with the match rule of section 9.4 | that of part P; column of the name P | the part P provides connector X: no other part of E uses it, nor does E provide it from outside, with X followed by VERSION w if the part states it |
| E18 | inside an ENTITY block, a declaration that begins with ASSUME, CAPABILITY, EVENT, STATE, DEFINE or TYPE (section 5) |
that of the keyword; column of the keyword | K cannot appear in an entity: write it in the CSC of one of its connectors, with K the keyword |
| E19 | a part with the form G35 but wrong bounds: a bound with a decimal point, or m > n, or n = 0 (section 4.9) |
that of the part; column of [ |
the part P has an invalid number of copies: [m .. n]. Write [minimum .. maximum] with two integers: the minimum 0 or more, the maximum at least 1 and not smaller than the minimum, with P the name of the part and m and n written as in the file |
| E20 | a qualified name X.y in a scenario or in an entity formula with X that is not among the OFFERS and USES of the entity; or a qualified name in a scenario of a CSC or in a phase of a formula of a CSC (sections 4.6, 4.12) |
that of X; column of X |
in the entity X.y: E neither provides nor uses connector X; a scenario can cite only the connectors of E; in the CSC X.y: in a CSC, names are not written with the connector in front. The order of two connectors is written in a SCENARIO of the entity. In an entity with several compositions, X is checked per composition and the message has the suffix (in: …) (sections 4.10 and 9.5) |
| E21 | a declaration that begins with VARIANT in a CSC block; in an entity, one that begins with VARIANT and does not respect G38; one that begins with PURPOSE inside a segment (section 4.10) |
that of the keyword; column of the keyword | VARIANT cannot appear in a CSC: variants are written in an entity; VARIANT badly written: VARIANT group = choice is needed; PURPOSE cannot appear in a VARIANT segment: write it before the first VARIANT |
| E22 | a choice group with a single choice; the same choice written twice; a segment without recognised declarations (section 4.10) | that of the VARIANT (for the repeated choice, the second); column of VARIANT |
choice group D has a single choice (S): at least two are needed; a part that may be missing is written with [0 .. 1]; the choice D = S is already written at line N; the VARIANT segment D = S is empty: a choice without lines is written with a part [0 .. 1] |
| E23 | an entity with more than 64 compositions (section 4.10) | that of the header; column 0 | entity E has more than 64 compositions: bcdd does not check them one by one. Remove a choice, or divide the entity into smaller entities, with E the name of the entity (? if it cannot be read) |
| E24 | in a formula, in a DEFINE, in a STATE … FOLLOWS line or in a use of an extension: a name that is not declared, or that is not of the kind the position requires (section 4.13); a field that does not exist; a call with wrong arguments; in an entity, a simple name where an element of a CSC is required (section 4.9) |
that of the name; column of the name (of X for X.y) |
name not declared: X; X is not an event: an EVENT, a DEFINE EVENT or a phase of a CAPABILITY is needed; X is not a CAPABILITY; X is not a STATE; X is a CAPABILITY: it is named with a phase (requested(X), …) or in ACCEPTS, REQUIRES, ENSURES, RESOLVES; X is not a value; name not declared as a field of T: c; X is not a DEFINE with parameters; name not declared as a parameter of X: p; the argument p is missing in the call to X; in an entity the names of the CSCs are written with the connector in front: x; with a qualified name name not declared as EVENT: X.y (and likewise STATE, CAPABILITY) |
| E25 | an expression of the wrong type for its position; a value written in INITIAL, GIVEN, in an assignment or in an argument that is not of the declared type (section 4.13) |
that of the first token of the expression or of the value | inconsistent type: A needed, B found; value not of type T: V |
| E26 | AND and OR at the same level without parentheses; IMPLIES, a comparison or ^ chained without parentheses (section 4.12) |
that of the second operator; column of the operator | AND and OR together without parentheses: write (a AND b) OR c, or a AND (b OR c); IMPLIES after IMPLIES without parentheses: write a IMPLIES (b IMPLIES c); chained comparisons: write a <= b AND b <= c; ^ after ^ without parentheses: write (a ^ b) ^ c |
| E27 | a nested pattern; two scopes; WITHIN and AT ONCE together; REQUIRES in a GUARANTEE (section 4.12) |
that of the word; column of the word | K inside another form: the language does not nest ALWAYS, EVENTUALLY, WHENEVER and their shorthands; a property has a single scope: K is the second; WITHIN and AT ONCE in the same property: choose one; REQUIRES is used only in an ASSUME: in a GUARANTEE write ALWAYS (requested(X) IMPLIES c) |
| E28 | DEFINEs that refer to one another circularly; named types (G41) that refer to one another circularly |
that of the member of the cycle that comes first in the file; column of the name | circular DEFINE: A -> B -> A; circular TYPE: A -> B -> A |
| E29 | the type of the index of a state (G11) or of FOR ALL is not finite; an index on a name that has none; an indexed state without an index; an index of the wrong type (sections 4.3, 4.6, 4.12) |
that of the name or of the index | the type of the index of X is not finite: T; X has no index; X has an index: write X[value of T]; index of X not of type T: v |
| E30 | a repetition written incorrectly (section 4.6) | that of the REPEAT line or of the step; column of REPEAT or of @ |
REPEAT repeated in the scenario: the first is at line N; invalid repetitions: m..n. Write REPEAT minimum..maximum, with the maximum at least 1 and not smaller than the minimum; the step @t is not shorter than the period of REPEAT: every repeated step has a time smaller than EVERY d; REPEAT without steps: the repeated steps are written after the REPEAT line; REPEAT … EVERY requires a scenario with time units |
| E31 | in a BINDING or in a VERIFICATION whose bound CSC is found with the written version: a BIND or MEANS line names an element that the CSC does not have; a translated scenario names a scenario that the CSC does not have (section 4.11) |
that of the element or of the short name; column of the element | X is not an element of CSC N VERSION v; TRANSLATES names a scenario that CSC N VERSION v does not have: id |
| E32 | an EXTENSION outside a PROFILE (section 4.11) |
that of EXTENSION; column of the word |
EXTENSION outside a PROFILE: an extension is declared in a profile |
| E33 | a missing or repeated field of an extension, or one with a value that is not admitted; a FORM that does not begin with the name; a parameter that does not appear exactly once in FORM; KIND FUNCTION without a result type; VERIFY V1 with a check that does not exist (section 4.11) |
for a missing field that of EXTENSION, column 0; otherwise that of the field, column of the field |
the messages of the table in section 4.11 |
| E34 | two extensions with the same name in the same profile; an extension whose name is a keyword or a reserved word | that of the second EXTENSION, or of the one with the reserved name; column of the name |
extension name already used at line N: X; the name of the extension is a word of the language: X |
| E35 | REDUCES TO names something that is not part of the language, nor a parameter, nor an extension of the same profile; extensions that refer to one another circularly through REDUCES TO |
that of the name; for the cycle, that of the member that comes first | REDUCES TO names X: it is not a word of the language, a parameter or an extension of PROFILE P; circular REDUCES TO: A -> B -> A |
| E36 | an extension whose REDUCES TO repeats a form of the language or another extension (section 4.11) |
that of REDUCES; column of REDUCES |
EXTENSION X repeats a form that the language already has: F; EXTENSION X repeats EXTENSION Y |
| E37 | a use of an extension that does not respect its FORM, its KIND or its LEVEL (section 4.14) |
that of the name of the extension; column of the name | use of X that does not respect FORM "F"; X has KIND K: it is not used in this position; X has LEVEL L: it is not used in a B block |
| E38 | a BINDING or a VERIFICATION imports a profile with a version different from the one with which the bound CSC, found, imports it |
that of the IMPORT PROFILE line of the bound block; column of IMPORT |
PROFILE P imported with VERSION v, but CSC N imports it with VERSION w |
| E39 | a STATUS in a VERIFICATION |
that of STATUS; column of STATUS |
STATUS cannot appear in a VERIFICATION: a verification plan is not approved |
| E40 | two BINDINGs for the same CSC and the same version without a name, or with the same name, in the checked file (section 4.11) |
that of the second; column 0 | second BINDING without a name for CSC N VERSION v: the first is at line M. With two or more BINDINGs, each has a name: AS name; BINDING name already used at line M: x |
In the messages, id is the short name, “connector” a CSC cited by an entity, “choice group” a group and
SCENARIO a scenario.
Clarifications:
- What is not an error: an unrecognised line; an undeclared type; a CSC without guarantees; an empty
PURPOSE. Nor, because they are not wrong elements written in the checked file: a citation not found, a cited file that cannot be read or has errors, a version different from the one expected; and a part that is not found suspends E14 for its entity. - E16 and E17 complete the closure of an entity: E14 looks at the
USESlines of the parts, E17 at theirOFFERS, E16 at the public boundaries. Like E14 they are errors (code 1), they preventratify, and a part not found suspends them for its entity. - E14 is an error like the others (code 1) and prevents
ratify. A part uses a CSC when its own block, found elsewhere, says so: the error is in the checked file because that is where the parts are put together. - E03 concerns only steps,
GIVENs and recognised values. Arguments are checked only if the event is declared as anEVENT. In an entity scenario, if the CSCXis not found,X.yand its arguments are not checked (section 4.6). - E18, E19, E20 are errors like the others (code 1) and prevent
ratify. A declaration with E18 is also unrecognised and appears in section 5; a part with E19 remains a part; a declaration with E20 remains recognised. - E21, E22, E23 are errors like the others (code 1) and prevent
ratify. A declaration with E21 is also unrecognised; a segment with E22 remains a segment; with E23 the closure of the entity is not checked. - E14, E16, E17 with compositions: in a composition with an optional part absent, those that
disappear when the part is put back are not errors but declared absences (sections 4.10 and 9.5): they do not count in the
outcomeline and do not change the code. With several compositions they carry the suffix(in: …). - E06, E08, E09, E15, E18, E21, E32: the line is also unrecognised, so it also appears in section 5 of the
report. A declaration with an unclosed string declares nothing. With E32 the
lines of the misplaced extension, up to its
END, are also unrecognised. - E24-E31 and E33-E40 are errors like the others (code 1) and prevent
ratify. The declaration that carries them remains recognised:bcddhas read its form in full, and the error states what is wrong. The exception is a field of an extension whose line is not recognised: E33field … is missingis on theEXTENSIONline. - An error is reported only when it is certain. When a check depends on a cited file that is not found (a bound CSC, the block of
Xin a qualified name, a profile), the check is suspended and gives no errors; the citation is in section 7. - E12: a step without a unit counts as a pure number;
sis worth 1000ms. The first step of the scenario decides whether the scenario uses units. In the message, times are written@+ number + (space + unit, if present):@3 s after @5 s,@4000 ms after @5 s. Two steps with the same time are admitted. - E12 with mixed units: “with units” means with
sor withms;sandmsin the same scenario are not a mixture. Every step that does not follow the choice of the first step gives its own E12, on its own line: whoever corrects sees all the steps to be fixed, not only the first. That step is excluded from the comparison of times: it cannot also give “the time decreases” and does not change the largest time against which the following steps are compared. A pure number and a time with a unit cannot be compared without inventing a unit. Example: after@0 s, the step@5gives E12 for the units, and the@3 sthat follows does not give an error, because the largest remains@0 s. - E13: in an assumption written over several lines the line indicated is the one where
VERBALis, which may be different from that ofASSUME. The line goes in section 2 asverbaland, if it is pending approval, in section 4; it does not go in section 5. - A forgotten quotation mark shifts the pairing of the quotation marks that follow: the lines in between become
string text or unrecognised lines. As a rule the last string of the file remains open, and
bcddsignals E06 on the line where that string opens, which can be far from the missing quotation mark. A stretch of lines becomes a string without errors only with two wrong quotation marks (section 5, “The parts of an entity”).

