The analysis of programming language syntax usually entails the transformation of a linear sequence of tokens (a token is akin to an individual word or punctuation mark in a natural language) into a hierarchical syntax tree (abstract syntax trees are one convenient form of syntax tree). This process, called parsing, is in some respects analogous to syntactic analysis in linguistics; in fact, certain concepts, such as the Chomsky hierarchy and context-free grammars, are common to the study of syntax in both linguistics and computer science. However, the applications of these concepts vary widely between the two fields, and the practical resemblances are small.
Aristotelian logic is sometimes referred to as formal logic because it specifically deals with forms of reasoning, but is not formal in the sense we use it here or as is common in current usage.
Mathematicallogic refers to two distinct areas of research: The first, primarily of historical interest, is the use of formal logic to study mathematical reasoning, and the second, in the other direction, the application of mathematics to the study of formal logic.
Logics such as fuzzy logic have since been devised with an infinite number of "degrees of truth", e.g., represented by a real number between 0 and 1.
The logics discussed above are all "bivalent" or "two-valued"; that is, the semantics for each of these languages will assign to every sentence either the value "True" or the value "False." Systems which do not always make this distinction are known as non-Aristotelian logics, or multi-valued logics.
Logic programming is an attempt to make computers do logical reasoning and Prolog programming language is commonly used for it.
See also computability logic; this is a formal theory of computability in the same sense as classical logic is a formal theory of truth.