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

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: