Formal language

From testwiki
Revision as of 02:40, 26 December 2023 by imported>InternetArchiveBot (Bluelink 1 book for Wikipedia:Verifiability (20231225)) #IABot (v2.0.9.5) (GreenC bot)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

In mathematics, computer science and linguistics, a formal language is one that has a particular set of symbols, and whose expressions are made according to a particular set of rules. The symbol is often used as a variable for formal languages in logic.[1]

Unlike natural languages, the symbols and formulas in formal languages are syntactically and semantically related to one another in a precise way.[2] As a result, formal languages are completely (or almost completely) void of ambiguity.[3]

Examples

Some examples of formal languages include:

  • The set of all words over a,b
  • The set {an}, where n is a natural number and an means a repeated n times
  • Finite languages, such as {{a,b},{a,aa,bba}}
  • The set of syntactically correct programs in a given programming language
  • The set of inputs upon which a certain Turing machine halts

Specification

A formal language can be specified in a great variety of ways, such as:

References

Further reading

Other websites

Template:Mathematical logic