This article is about a technical term in mathematics and computer science. For any formal type of language usage, see Literary language. For studies about natural languages, see Formal semantics (natural language).
This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed. Find sources: "Formal language" – news · newspapers · books · scholar · JSTOR(March 2024) (Learn how and when to remove this message)
Part of a series on
Formal languages
Key concepts
Formal system
Alphabet
Syntax
Semantics
Semantics (logic)
Formal grammar
Automata theory
Ground expression
Regular expression
Well-formed formula
Production
Applications
Formal methods
Propositional calculus
Predicate logic
Mathematical notation
Natural language processing
Programming language theory
Computational linguistics
Syntax analysis
Formal verification
v
t
e
In logic, mathematics, computer science, and linguistics, a formal language consists of words whose letters are taken from an alphabet and are well-formed according to a specific set of rules called a formal grammar.
The alphabet of a formal language consists of symbols, letters, or tokens that concatenate into strings called words.[1] Words that belong to a particular formal language are sometimes called well-formed words or well-formed formulas. A formal language is often defined by means of a formal grammar such as a regular grammar or context-free grammar, which consists of its formation rules.
In computer science, formal languages are used, among others, as the basis for defining the grammar of programming languages and formalized versions of subsets of natural languages, in which the words of the language represent concepts that are associated with meanings or semantics. In computational complexity theory, decision problems are typically defined as formal languages, and complexity classes are defined as the sets of the formal languages that can be parsed by machines with limited computational power. In logic and the foundations of mathematics, formal languages are used to represent the syntax of axiomatic systems, and mathematical formalism is the philosophy that all of mathematics can be reduced to the syntactic manipulation of formal languages in this way.
The field of formal language theory studies primarily the purely syntactic aspects of such languages—that is, their internal structural patterns. Formal language theory sprang out of linguistics, as a way of understanding the syntactic regularities of natural languages.
^See e.g. Reghizzi, Stefano Crespi (2009). Formal Languages and Compilation. Texts in Computer Science. Springer. p. 8. Bibcode:2009flc..book.....C. ISBN 9781848820500. An alphabet is a finite set
formallanguage consists of words whose letters are taken from an alphabet and are well-formed according to a specific set of rules called a formal grammar...
A formal grammar describes which strings from an alphabet of a formallanguage are valid according to the language's syntax. A grammar does not describe...
it Formal verification, proves correctness of a system Formal system, an abstract means of generating inferences in a formallanguageFormallanguage, comprising...
methods, the formal sciences use language tools concerned with characterizing abstract structures described by formal systems. The formal sciences aid...
robustness of a design. Formal methods employ a variety of theoretical computer science fundamentals, including logic calculi, formallanguages, automata theory...
their syntax (form) and semantics (meaning), usually defined by a formallanguage. Languages usually provide features such as a type system, variables and...
A computer language is a formallanguage used to communicate with a computer. Types of computer languages include: Construction language – all forms of...
mathematics, a formal proof or derivation is a finite sequence of sentences (called well-formed formulas in the case of a formallanguage), each of which...
theoretical computer science and formallanguage theory, a regular language (also called a rational language) is a formallanguage that can be defined by a regular...
Literary language is the form (register) of a language used when writing in a formal, academic, or particularly polite tone; when speaking or writing...
In formallanguage theory and computer science, a substring is a contiguous sequence of characters within a string.[citation needed] For instance, "the...
in natural language while formal logic uses formallanguage. When used as a countable noun, the term "a logic" refers to a logical formal system that...
The field is divided into three major branches: automata theory and formallanguages, computability theory, and computational complexity theory, which are...
namely either a spoken language or a sign language. Natural languages are distinguished from constructed and formallanguages such as those used to program...
A specification language is a formallanguage in computer science used during systems analysis, requirements analysis, and systems design to describe...
between dialects. Here the formallanguage does not mean a language spoken in formal occasions but the standard language which exists practically only...
grammar Context-sensitive language Decidable language ECLR-attributed grammar Finite languageFormal grammar FormallanguageFormal system Generalized star...
pronunciation: [reːxtaː]); the more formal register is sometimes referred to as زبانِ اُردُوئے معلّٰى, zabān-i Urdū-yi muʿallá, 'language of the exalted camp' (Urdu...
them. In this context, statements become well-formed formulas of some formallanguage. A theory consists of some basis statements called axioms, and some...
Z notation is an example of a leading formal specification language. Others include the Specification Language (VDM-SL) of the Vienna Development Method...