A specification language is a
formal language
In logic, mathematics, computer science, and linguistics, a formal language is a set of strings whose symbols are taken from a set called "alphabet".
The alphabet of a formal language consists of symbols that concatenate into strings (also c ...
in
computer science
Computer science is the study of computation, information, and automation. Computer science spans Theoretical computer science, theoretical disciplines (such as algorithms, theory of computation, and information theory) to Applied science, ...
used during
systems analysis,
requirements analysis, and
systems design to describe a system at a much higher level than a
programming language
A programming language is a system of notation for writing computer programs.
Programming languages are described in terms of their Syntax (programming languages), syntax (form) and semantics (computer science), semantics (meaning), usually def ...
, which is used to produce the executable code for a system.
[ Joseph Goguen
"One, None, A Hundred Thousand Specification Languages" Invited Paper, IFIP Congress 1986 pp 995-1004]
Overview
Specification languages are generally not directly executed. They are meant to describe the ''what'', not the ''how''. It is considered an error if a requirement specification is cluttered with unnecessary implementation detail.
A common fundamental assumption of many specification approaches is that programs are modelled as
algebra
Algebra is a branch of mathematics that deals with abstract systems, known as algebraic structures, and the manipulation of expressions within those systems. It is a generalization of arithmetic that introduces variables and algebraic ope ...
ic or
model-theoretic structures that include a collection of
sets of data values together with
functions over those sets. This level of abstraction coincides with the view that the correctness of the input/output behaviour of a program takes precedence over all its other properties.
In the ''property-oriented'' approach to specification (taken e.g. by
CASL), specifications of programs consist mainly of logical
axiom
An axiom, postulate, or assumption is a statement that is taken to be true, to serve as a premise or starting point for further reasoning and arguments. The word comes from the Ancient Greek word (), meaning 'that which is thought worthy or ...
s, usually in a
logical system
A formal system is an abstract structure and formalization of an axiomatic system used for deducing, using rules of inference, theorems from axioms.
In 1921, David Hilbert proposed to use formal systems as the foundation of knowledge in math ...
in which equality has a prominent role, describing the properties that the functions are required to satisfy—often just by their interrelationship.
This is in contrast to so-called
model-oriented specification in frameworks like
VDM and
Z, which consist of a simple realization of the required behaviour.
Specifications must be subject to a process of ''refinement'' (the filling-in of implementation detail) before they can actually be implemented. The result of such a refinement process is an executable algorithm, which is either formulated in a programming language, or in an executable subset of the specification language at hand. For example,
Hartmann pipelines, when properly applied, may be considered a
dataflow
In computing, dataflow is a broad concept, which has various meanings depending on the application and context. In the context of software architecture, data flow relates to stream processing or reactive programming.
Software architecture
Dat ...
specification which ''is'' directly executable. Another example is the
actor model
The actor model in computer science is a mathematical model of concurrent computation that treats an ''actor'' as the basic building block of concurrent computation. In response to a message it receives, an actor can: make local decisions, create ...
which has no specific application content and must be ''specialized'' to be executable.
An important use of specification languages is enabling the creation of
proofs of
program correctness (''see
theorem prover'').
Languages
See also
*
Formal specification
*
Language-independent specification
*
Pseudocode
*
Specification and Description Language
*
Unified Modeling Language
The Unified Modeling Language (UML) is a general-purpose visual modeling language that is intended to provide a standard way to visualize the design of a system.
UML provides a standard notation for many types of diagrams which can be roughly ...
References
External links
*
{{Computer language
Computer languages
Scientific modelling
Formal specification