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.AXIOM ::= FORMULA
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 current
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 | EQUATION
The atomic formulae true and false are always well-sorted,
and expand to reserved, pre-declared constant predicate symbols, such
that true always holds and 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
explicitly-sorted expansions 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
equation on the explicitly-sorted expansions of the terms for that
sort.
EQUATION ::= equation QUALITY TERM TERM
QUALITY ::= existential | strong
A variable VAR is well-sorted for the sort specified in its
declaration. It expands to the variable itself.
TERM ::= VAR | APPLICATION | SORTED-TERM
An application of a function symbol FUN-SYMB is well-sorted when
there is a declaration of FUN-SYMB (with the specified
FUN-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 function symbol to the fully-qualified
expansions of the argument terms for those sorts.
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 explicitly-sorted
expansions of the component term that have the specified sort.
SORTED-TERM ::= sorted-term TERM SORT
CoFI Tentative Document: LanguageSummary --Version 0.95-- March 6, 1997.
Comments to cofi-language@brics.dk