A formal language is a set of strings of symbols drawn from a finite alphabet, defined precisely by formal rules such as a grammar or automaton rather than by usage or convention. The Chomsky hierarchy classifies formal languages by the generative power required to describe them, ranging from regular languages recognised by finite automata to recursively enumerable languages recognised by Turing machines. Formal languages provide the mathematical foundation for specifying syntax in programming languages, parsers, logic, and knowledge representation. They are studied in automata theory and underpin compilers and ontology languages.

Overview

  • Formal languages replace ambiguous natural usage with mathematically exact membership rules, enabling rigorous reasoning about what strings belong to a language.
  • The Chomsky hierarchy orders language classes by expressive power and the computational machinery needed to recognise them.
  • They are the bedrock of parsing, compilation, and machine-interpretable specification.

Key aspects

  • Alphabet, strings, and a membership-defining grammar or automaton.
  • The Chomsky hierarchy: regular, context-free, context-sensitive, recursively enumerable.
  • Recognisers from finite automata to Turing machines.

Applications

Provenance