An axiom is well-formed when it is constructed from well-formed atomic formulae (with respect to the local environment), and, moreover, all the variables that occur in it are declared in enclosing quantifications or in variable declarations of the enclosing basic specification. A well-formed axiom determines a sentence of the underlying basic specification (closed by universal quantification over declared variables).AXIOM ::= FORMULA
An APPLICATION of a function symbol FUN-SYMB is
well-sorted when there is a declaration of FUN-SYMB (with a
particular FUN-TYPE, if specified) such that all the argument
terms are well-sorted for the declared argument sorts. It then
expands to an application of the qualified function symbol to the
fully-qualified expansions of the argument terms for those sorts.
A formula is constructed from atomic formulae of the form ATOM
using quantification and the usual logical connectives.
FORMULA ::= QUANTIFICATION | CONJUNCTION | DISJUNCTION
| IMPLICATION | EQUIVALENCE | NEGATION | ATOM
Quantifiers
A quantification with more than one variable declaration VAR-DECL
abbreviates a nest of quantifications with the same quantifier. A
quantification with a declaration declaring more than one variable
abbreviates a nest of quantifications with the same quantifier and
sort. The scope of a variable declaration in a QUANTIFICATION is
the component FORMULA, and an inner declaration for a variable
with the same identifier as in an outer declaration overrides the
outer declaration.
QUANTIFICATION ::= quantification QUANTIFIER VAR-DECL+ FORMULA
QUANTIFIER ::= forall | exists | exists-uniquely
Logical Connectives
These formulae determine the usual logical connectives on
sub-formulae. Conjunction and disjunction are generalized to lists
of formulae FORMULA+, and are only well-formed when the list
contains at least two formulae.
CONJUNCTION ::= conjunction FORMULA+
DISJUNCTION ::= disjunction FORMULA+
IMPLICATION ::= implication FORMULA FORMULA
EQUIVALENCE ::= equivalence FORMULA FORMULA
NEGATION ::= negation FORMULA
Atomic Formulae and Terms
An atomic formula is well-formed (with respect to the local
environment
and variable declarations) if it is well-sorted and
expands to a unique atomic formula for constructing sentences. The
notions of when an atomic formula or term is well-sorted and of
its expansion are indicated below for the various constructs.
Due to overloading of predicate and/or function symbols, a well-sorted
atomic formula or term may have several expansions, preventing it from
being well-formed. Qualifications on function and predicate symbols
may be used to determine the intended expansion and make it
well-formed; explicit sorts on arguments and/or results may also help
to avoid unintended expansions.
ATOM ::= TRUTH | PREDICATION | DEFINEDNESS
! | EXISTL-EQUATION | STRONG-EQUATION
The atomic formulae true and false are always well-sorted,
and expand to
primitive sentences, such that the sentence for
true always holds, and that for false never holds.
TRUTH ::= true | false
An application of a predicate symbol PRED-SYMB is well-sorted
when there is a declaration of PRED-SYMB (with the specified
PRED-TYPE, if any) such that all the argument terms are well-sorted for the
declared argument sorts. It then expands to an application of the
qualified predicate symbol to the fully-qualified expansions of the
argument terms for those sorts.
PREDICATION ::= predication PRED-SYMB TERM*
PRED-SYMB ::= pred-symb PRED-NAME PRED-TYPE?
A definedness formula is well-sorted when the term is well-sorted for
some sort. It then expands to a definedness assertion on the
fully-qualified expansion of the term.
DEFINEDNESS ::= definedness TERM
An equation is well-sorted if there is a sort such that both the terms
are well-sorted for that sort. It then expands to the corresponding
existential or strong equation on the fully-qualified expansions of
the terms for that sort.
! EXISTL-EQUATION ::= existl-equation TERM TERM
! STRONG-EQUATION ::= strong-equation TERM TERM
A variable VAR is well-sorted for the sort specified in its
declaration; it expands to the variable itself.
! TERM ::= VAR | CONSTANT | APPLICATION | SORTED-TERM
A CONSTANT is well-sorted when the FUN-SYMB is declared
as a constant (with a particular FUN-TYPE, if specified); it
expands to an application of the fully-qualified function symbol to no
arguments.
! CONSTANT ::= FUN-SYMB
! APPLICATION ::= application FUN-SYMB TERM+
FUN-SYMB ::= fun-symb FUN-NAME FUN-TYPE?
A sorted term is well-sorted if the component term is well-sorted for
the specified sort. It then expands to those of the fully-qualified
expansions of the component term that have the specified sort.
SORTED-TERM ::= sorted-term TERM SORT
CoFI Document: LanguageSummary --DRAFT, Version 0.96-- 30 April 1997.
Comments to cofi-language@brics.dk