Jump to content

Metavariable

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Alan U. Kennington (talk | contribs) at 18:02, 1 January 2016 (Moved 4 out of 5 of the citations from footnotes into the references section. The fifth one is too much work to format.). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

In logic, a metavariable (also metalinguistic variable[1] or syntactical variable[2]) is a symbol or symbol string which belongs to a metalanguage and stands for elements of some object language. For instance, in the sentence

Let A and B be two sentences of a language ℒ

the symbols A and B are part of the metalanguage in which the statement about the object language ℒ is formulated.

John Corcoran considers this terminology unfortunate because it obscures the use of schemata and because such "variables" do not actually range over a domain.[3]: 220 

The convention is that a metavariable is to be uniformly substituted with the same instance in all its appearances in a given schema. This is in contrast with nonterminal symbols in formal grammars where the nonterminals on the right of a production can be substituted by different instances.[4]

Attempts to formalize the notion of metavariable result in some kind of type theory.[5]

In computing one often needs to specify and document the syntax and semantics of a computer language, more or less formally. A term often used for metavariable in that area is "metasyntactic variable". Furthermore, because of the common practice in hacker culture to use nonsense words like "foo" as metavariables, the term "metasyntactic variable" has come to denote such words by themselves; for instance, "foo" is referred to as "the first metasyntactic variable" in the first edition of The Hacker's Dictionary.

See also

Notes

  1. ^ Hunter, p. 13.
  2. ^ Shoenfield 2001, p. 7.
  3. ^ Corcoran 2006, p. 220.
  4. ^ Tennent 2002, pp. 36–37, 210.
  5. ^ Masahiko Sato, Takafumi Sakurai, Yukiyoshi Kameyama, and Atsushi Igarashi. "Calculi of Meta-variables" in Computer Science Logic. 17th International Workshop CSL 2003. 12th Annual Conference of the EACSL. 8th Kurt Gödel Colloquium, KGC 2003, Vienna, Austria, August 25-30, 2003. Proceedings, Springer Lecture Notes in Computer Science 2803. ISBN 3-540-40801-0. pp. 484–497

References

  • Corcoran, J. (2006). "Schemata: the Concept of Schema in the History of Logic". Bulletin of Symbolic Logic. 12: 219–240. {{cite journal}}: Invalid |ref=harv (help)
  • Hunter, Geoffrey. Metalogic: An Introduction to the Metatheory of Standard First-Order Logic. {{cite book}}: Invalid |ref=harv (help)
  • Shoenfield, Joseph R. (2001) [1967]. Mathematical Logic (2nd ed.). A K Peters. ISBN 978-1-56881-135-2. {{cite book}}: Invalid |ref=harv (help)
  • Tennent, R. D. (2002). Specifying Software: A Hands-On Introduction. Cambridge University Press. ISBN 978-0-521-00401-5. {{cite book}}: Invalid |ref=harv (help)