A report on Formal language

Structure of the syntactically well-formed, although nonsensical, English sentence, "Colorless green ideas sleep furiously" (historical example from Chomsky 1957).
This diagram shows the syntactic divisions within a formal system. Strings of symbols may be broadly divided into nonsense and well-formed formulas. The set of well-formed formulas is divided into theorems and non-theorems.

Alphabet and are well-formed according to a specific set of rules.

- Formal language
Structure of the syntactically well-formed, although nonsensical, English sentence, "Colorless green ideas sleep furiously" (historical example from Chomsky 1957).

34 related topics with Alpha

Overall

The source code for a simple computer program written in the C programming language. The gray lines are comments that help explain the program to humans in a natural language. When compiled and run, it will give the output "Hello, world!".

Programming language

7 links

The source code for a simple computer program written in the C programming language. The gray lines are comments that help explain the program to humans in a natural language. When compiled and run, it will give the output "Hello, world!".
A selection of programming language textbooks; only a few of the thousands available.
Parse tree of Python code with inset tokenization
Syntax highlighting is often used to aid programmers in recognizing elements of source code. The language above is Python.

A programming language is any set of rules that converts strings, or graphical program elements in the case of visual programming languages, to various kinds of machine code output.

Argument terminology used in logic

Logic

8 links

Study of correct reasoning or good arguments.

Study of correct reasoning or good arguments.

Argument terminology used in logic
Aristotle, 384–322 BCE.
A depiction from the 15th century of the square of opposition, which expresses the fundamental dualities of syllogistic.

One prominent approach associates their difference with the study of arguments expressed in formal or informal languages.

Strings are often made up of characters. They are useful for storing human-readable data, like sentences, or lists of alphabetical data, like the nucleic acid sequences of DNA.

String (computer science)

7 links

Traditionally a sequence of characters, either as a literal constant or as some kind of variable.

Traditionally a sequence of characters, either as a literal constant or as some kind of variable.

Strings are often made up of characters. They are useful for storing human-readable data, like sentences, or lists of alphabetical data, like the nucleic acid sequences of DNA.
(Hyper)cube of binary strings of length 3

In formal languages, which are used in mathematical logic and theoretical computer science, a string is a finite sequence of symbols that are chosen from a set called an alphabet.

Formal system

6 links

Abstract structure used for inferring theorems from axioms according to a set of rules.

Abstract structure used for inferring theorems from axioms according to a set of rules.

Each formal system uses primitive symbols (which collectively form an alphabet) to finitely construct a formal language from a set of axioms through inferential rules of formation.

This diagram shows the syntactic entities that may be constructed from formal languages. The symbols and strings of symbols may be broadly divided into nonsense and well-formed formulas. A formal language can be thought of as identical to the set of its well-formed formulas. The set of well-formed formulas may be broadly divided into theorems and non-theorems.

Symbol (formal)

5 links

Fundamental concept in logic, tokens of which may be marks or a configuration of marks which form a particular pattern.

Fundamental concept in logic, tokens of which may be marks or a configuration of marks which form a particular pattern.

This diagram shows the syntactic entities that may be constructed from formal languages. The symbols and strings of symbols may be broadly divided into nonsense and well-formed formulas. A formal language can be thought of as identical to the set of its well-formed formulas. The set of well-formed formulas may be broadly divided into theorems and non-theorems.

Although the term "symbol" in common use refers at some times to the idea being symbolized, and at other times to the marks on a piece of paper or chalkboard which are being used to express that idea; in the formal languages studied in mathematics and logic, the term "symbol" refers to the idea, and the marks are considered to be a token instance of the symbol.

Formal grammar

4 links

In formal language theory, a grammar (when the context is not given, often called a formal grammar for clarity) describes how to form strings from a language's alphabet that are valid according to the language's syntax.

An example parse tree

Context-free grammar

4 links

Set of all strings of terminal symbols that can be derived, by repeated rule applications, from some particular nonterminal symbol ("start symbol").Nonterminal symbols are used during the derivation process, but do not appear in its final result string.

Set of all strings of terminal symbols that can be derived, by repeated rule applications, from some particular nonterminal symbol ("start symbol").Nonterminal symbols are used during the derivation process, but do not appear in its final result string.

An example parse tree
Two different parse trees from the same input

Languages generated by context-free grammars are known as context-free languages (CFL).

The match results of the pattern At least two spaces are matched, but only if they occur directly after a period (.) and before an uppercase letter.

Regular expression

6 links

Sequence of characters that specifies a search pattern in text.

Sequence of characters that specifies a search pattern in text.

The match results of the pattern At least two spaces are matched, but only if they occur directly after a period (.) and before an uppercase letter.
Stephen Cole Kleene, who introduced the concept
Translating the Kleene star
(s* means "zero or more of s")
A blacklist on Wikipedia which uses regular expressions to identify bad titles

Regular expression techniques are developed in theoretical computer science and formal language theory.

Mathematical logic

7 links

Study of formal logic within mathematics.

Study of formal logic within mathematics.

These systems, though they differ in many details, share the common property of considering only expressions in a fixed formal language.

Well-formed formula

3 links

In mathematical logic, propositional logic and predicate logic, a well-formed formula, abbreviated WFF or wff, often simply formula, is a finite sequence of symbols from a given alphabet that is part of a formal language.