A sort declaration SORT-DECL determines one or more sorts. A function declaration FUN-DECL determines one or more function symbols of a particular profile; similarly for a predicate declaration PRED-DECL. Function and predicate symbols may be overloaded, being declared with several different profiles in the same basic specification. The declaration of several symbols together in a single DECL is equivalent to their separate declarations in a series of similar DECLs.SIG-DECL ::= SORT-DECL | FUN-DECL | PRED-DECL
The internal structure of simple identifiers SIMPLE-ID, used to
identify sorts, functions, and predicates, is insignificant (ID
is extended with compound identifiers in a later
section). The same
identifier may be used for both a function and a predicate in the same
BASIC-SPEC, but not for a sort and for a function or predicate.
ID ::= SIMPLE-ID
SIMPLE-ID -- structure insignificant
[DTS]
When the BASIC-SPEC is used in an enrichment of
another specification, does this restriction apply to the whole
enriched specification and not just the enrichment, so e.g. it is
also forbidden for an identifier to be used for a sort in the
specification being enriched and for a function in the enrichment?
(Either the restriction should be abandoned, or it should be imposed
uniformly.)
Discharged:
The restriction is abandoned.
2.1.1 Sorts
A sort declaration SORT-DECL determines that each of the
sorts in the list SORT+ is in the signature.
SORT-DECL ::= sort-decl SORT+
SORT ::= ID
2.1.2 Constants and Functions
A constant is treated as a function with no arguments (thus its value
may be undefined when it is declared to be partial). A function
declaration FUN-DECL determines that each function name in the
list FUN-NAME+ is in the signature, being in the set of partial
or total function symbols, and with the specified argument sorts and
result sort, according to the function type FUN-TYPE.
FUN-DECL ::= fun-decl FUN-NAME+ FUN-TYPE
FUN-TYPE ::= fun-type TOTALITY SORT* SORT
TOTALITY ::= total | partial
FUN-NAME ::= ID
2.1.3 Predicates
A predicate declaration PRED-DECL determines that each predicate
name in the list PRED-NAME+ is in the signature, with the
specified argument sorts according to the predicate type
PRED-TYPE.
PRED-DECL ::= pred-decl PRED-NAME+ PRED-TYPE
PRED-TYPE ::= pred-type SORT*
PRED-NAME ::= ID
CoFI
Note: S-1 --Version 1.3-- 25 April 1997.
Comments to cofi-semantics@brics.dk