Misplaced Pages

Metasyntactic variable

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.

A metasyntactic variable is a specific word or set of words identified as a placeholder in computer science and specifically computer programming . These words are commonly found in source code and are intended to be modified or substituted before real-world usage. For example, foo and bar are used in over 330 Internet Engineering Task Force Requests for Comments , the documents which define foundational internet technologies like HTTP (web), TCP/IP , and email protocols .

#697302

63-397: By mathematical analogy , a metasyntactic variable is a word that is a variable for other words, just as in algebra letters are used as variables for numbers . Metasyntactic variables are used to name entities such as variables, functions, and commands whose exact identity is unimportant and serve only to demonstrate a concept, which is useful for teaching programming. Since English

126-416: A child may spontaneously engage in comparison and learn an abstract relationship, without the need for prompts. Comparison is more likely when the objects to be compared are close together in space and/or time, are highly similar (although not so similar that they match, which interfere with identifying relationships), or share common labels. In law , analogy is a method of resolving issues on which there

189-515: A circuit. In a circuit, the electricity is carried through wires and the current, or rate of flow of electricity, is determined by the voltage, or electrical pressure. Given the similarity in structure, or structural alignment, between these domains, structure mapping theory would predict that relationships from one of these domains, would be inferred in the other using analogy. Children do not always need prompting to make comparisons in order to learn abstract relationships. Eventually, children undergo

252-419: A conclusion about the analogy and comparing the new material with the already learned material. Typically this method is used to learn topics in science. In 1989, teacher Kerry Ruef began a program titled The Private Eye Project . It is a method of teaching that revolves around using analogies in the classroom to better explain topics. She thought of the idea to use analogies as a part of curriculum because she

315-432: A domain is viewed as consisting of objects, their properties, and the relationships that characterise their interactions. The process of analogy then involves: In general, it has been found that people prefer analogies where the two systems correspond highly to each other (e.g. have similar relationships across the domains as opposed to just having similar objects across domains) when these people try to compare and contrast

378-504: A functor f from C to D can be thought of as an analogy between C and D, because f has to map objects of C to objects of D and arrows of C to arrows of D in such a way that the structure of their respective parts is preserved. This is similar to the structure mapping theory of analogy of Dedre Gentner, because it formalises the idea of analogy as a function which makes certain conditions true. A computer algorithm has achieved human-level performance on multiple-choice analogy questions from

441-408: A program, so @code is correct for them.") Another point reflected in the above example is the convention 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. It is common to use

504-460: A programming language being documented in some texinfo file as: "Use the @var command to indicate metasyntactic variables. A metasyntactic variable is something that stands for another piece of text. For example, you should use a metasyntactic variable in the documentation of a function to describe the arguments that are passed to that function. Do not use @var for the names of particular variables in programming languages. These are specific names from

567-497: A relational shift, after which they begin seeing similar relations across different situations instead of merely looking at matching objects. This is critical in their cognitive development as continuing to focus on specific objects would reduce children's ability to learn abstract patterns and reason analogically. Interestingly, some researchers have proposed that children's basic brain functions (i.e., working memory and inhibitory control) do not drive this relational shift. Instead, it

630-548: A renewed interest in analogy, most notably in cognitive science . Cajetan named several kinds of analogy that had been used but previously unnamed, particularly: In ancient Greek the word αναλογια ( analogia ) originally meant proportionality , in the mathematical sense, and it was indeed sometimes translated to Latin as proportio . Analogy was understood as identity of relation between any two ordered pairs , whether of mathematical nature or not. Analogy and abstraction are different cognitive processes, and analogy

693-425: A significant role in problem solving , as well as decision making , argumentation , perception , generalization , memory , creativity , invention , prediction, emotion , explanation , conceptualization and communication . It lies behind basic tasks such as the identification of places, objects and people, for example, in face perception and facial recognition systems . Hofstadter has argued that analogy

SECTION 10

#1732791471698

756-461: A special case of induction . In their view analogy is an inductive inference from common known attributes to another probable common attribute, which is known about only in the source of the analogy, in the following form: Contemporary cognitive scientists use a wide notion of analogy, extensionally close to that of Plato and Aristotle, but framed by Gentner's (1983) structure-mapping theory . The same idea of mapping between source and target

819-419: A teacher may refer to other concepts, items or phenomena that pupils are more familiar with. It may help to create or clarify one theory (or theoretical model) via the workings of another theory (or theoretical model). Thus an analogy, as used in teaching, would be comparing a topic that students are already familiar with, with a new topic that is being introduced, so that students can get a better understanding of

882-485: A very important part in morality . This may be because morality is supposed to be impartial and fair. If it is wrong to do something in a situation A, and situation B corresponds to A in all related features, then it is also wrong to perform that action in situation B. Moral particularism accepts such reasoning, instead of deduction and induction, since only the first can be used regardless of any moral principles. Structure mapping, originally proposed by Dedre Gentner ,

945-598: A wider notion of analogy. They saw analogy as a shared abstraction. Analogous objects did not share necessarily a relation, but also an idea, a pattern, a regularity, an attribute, an effect or a philosophy. These authors also accepted that comparisons, metaphors and "images" (allegories) could be used as arguments , and sometimes they called them analogies . Analogies should also make those abstractions easier to understand and give confidence to those who use them. James Francis Ross in Portraying Analogy (1982),

1008-410: Is "the core of cognition". An analogy is not a figure of speech but a kind of thought. Specific analogical language uses exemplification , comparisons , metaphors , similes , allegories , and parables , but not metonymy . Phrases like and so on , and the like , as if , and the very word like also rely on an analogical understanding by the receiver of a message including them. Analogy

1071-420: Is a comparison or correspondence between two things (or two groups of things) because of a third element that they are considered to share. In logic, it is an inference or an argument from one particular to another particular, as opposed to deduction , induction , and abduction . It is also used of where at least one of the premises , or the conclusion, is general rather than particular in nature. It has

1134-462: Is a theory in psychology that describes the psychological processes involved in reasoning through, and learning from, analogies. More specifically, this theory aims to describe how familiar knowledge, or knowledge about a base domain, can be used to inform an individual's understanding of a less familiar idea, or a target domain. According to this theory, individuals view their knowledge of ideas, or domains, as interconnected structures. In other words,

1197-480: Is called a heuristic function of analogical reasoning. Analogical arguments can also be probative, meaning that they serve as a means of proving the rightness of particular theses and theories. This application of analogical reasoning in science is debatable. Analogy can help prove important theories, especially in those kinds of science in which logical or empirical proof is not possible such as theology , philosophy or cosmology when it relates to those areas of

1260-409: Is driven by their relational knowledge, such as having labels for the objects that make the relationships clearer(see previous section). However, there is not enough evidence to determine whether the relational shift is actually because basic brain functions become better or relational knowledge becomes deeper. Additionally, research has identified several factors that may increase the likelihood that

1323-417: Is high-level perception. Forbus et al. (1998) claim that this is only a metaphor. It has been argued (Morrison and Dietrich 1995) that Hofstadter's and Gentner's groups do not defend opposite views, but are instead dealing with different aspects of analogy. In anatomy , two anatomical structures are considered to be analogous when they serve similar functions but are not evolutionarily related, such as

SECTION 20

#1732791471698

1386-447: Is important not only in ordinary language and common sense (where proverbs and idioms give many examples of its application) but also in science , philosophy , law and the humanities . The concepts of association , comparison, correspondence, mathematical and morphological homology , homomorphism , iconicity , isomorphism , metaphor, resemblance, and similarity are closely related to analogy. In cognitive linguistics ,

1449-457: Is no clear line between perception , including high-level perception, and analogical thinking. In fact, analogy occurs not only after, but also before and at the same time as high-level perception. In high-level perception, humans make representations by selecting relevant information from low-level stimuli . Perception is necessary for analogy, but analogy is also necessary for high-level perception. Chalmers et al. concludes that analogy actually

1512-433: Is no previous authority. The legal use of analogy is distinguished by the need to use a legally relevant basis for drawing an analogy between two situations. It may be applied to various forms of legal authority , including statutory law and case law . In the civil law tradition, analogy is most typically used for filling gaps in a statutory scheme. In the common law tradition, it is most typically used for extending

1575-401: Is not apparent in some lexical definitions of palm and sole , where the former is defined as the inner surface of the hand , and the latter as the underside of the foot . Kant's Critique of Judgment held to this notion of analogy, arguing that there can be exactly the same relation between two completely different objects. Greek philosophers such as Plato and Aristotle used

1638-402: Is now used by thousands of schools around the country. The Fourth Lateran Council of 1215 taught: For between creator and creature there can be noted no similarity so great that a greater dissimilarity cannot be seen between them. The theological exploration of this subject is called the analogia entis . The consequence of this theory is that all true statements concerning God (excluding

1701-569: Is often (though not always) a similarity , as in the biological notion of analogy . Analogy plays a significant role in human thought processes. It has been argued that analogy lies at "the core of cognition". The English word analogy derives from the Latin analogia , itself derived from the Greek ἀναλογία , "proportion", from ana- "upon, according to" [also "again", "anew"] + logos "ratio" [also "word, speech, reckoning"]. Analogy plays

1764-484: Is often an easier one. This analogy is not comparing all the properties between a hand and a foot, but rather comparing the relationship between a hand and its palm to a foot and its sole. While a hand and a foot have many dissimilarities, the analogy focuses on their similarity in having an inner surface. The same notion of analogy was used in the US -based SAT college admission tests, that included "analogy questions" in

1827-573: Is the analogue ear based on electrical, electronic or mechanical devices. Some types of analogies can have a precise mathematical formulation through the concept of isomorphism . In detail, this means that if two mathematical structures are of the same type, an analogy between them can be thought of as a bijection which preserves some or all of the relevant structure. For example, R 2 {\displaystyle \mathbb {R} ^{2}} and C {\displaystyle \mathbb {C} } are isomorphic as vector spaces, but

1890-662: Is the foundation language or lingua franca of most computer programming languages, variables that originate in English are commonly seen even in programs and examples of programs written for other spoken-language audiences. The variables used in a particular context may depend on subcultures that develop around programming languages . Metasyntactic variables used commonly across all programming languages include foobar , foo , bar , baz , qux , quux , corge , grault , garply , waldo , fred , plugh , xyzzy , and thud . Two of these words, plugh and xyzzy , are taken from

1953-422: Is to and as when representing the analogous relationship between two pairs of expressions, for example, "Smile is to mouth, as wink is to eye." In the field of mathematics and logic, this can be formalized with colon notation to represent the relationships, using single colon for ratio, and double colon for equality. In the field of testing, the colon notation of ratios and equality is often borrowed, so that

Metasyntactic variable - Misplaced Pages Continue

2016-400: Is used by conceptual metaphor and conceptual blending theorists. Structure mapping theory concerns both psychology and computer science . According to this view, analogy depends on the mapping or alignment of the elements of source and target. The mapping takes place not only between objects, but also between relations of objects and between relations of relations. The whole mapping yields

2079-550: The IETF RFCs and computer programming languages are rendered in plain text , making it necessary to distinguish metasyntactic variables by a naming convention, since it would not be obvious from context. Here is an example from the official IETF document explaining the e-mail protocols (from RFC 772 - cited in RFC 3092): (The documentation for texinfo emphasizes the distinction between metavariables and mere variables used in

2142-453: The MONIAC (an analogue computer ) used the flow of water in its pipes as an analogue to the flow of money in an economy. Where two or more biological or physical participants meet, they communicate and the stresses produced describe internal models of the participants. Pask in his conversation theory asserts an analogy that describes both similarities and differences between any pair of

2205-672: The SAT test. The algorithm measures the similarity of relations between pairs of words (e.g., the similarity between the pairs HAND:PALM and FOOT:SOLE) by statistically analysing a large collection of text. It answers SAT questions by selecting the choice with the highest relational similarity. The analogical reasoning in the human mind is free of the false inferences plaguing conventional artificial intelligence models, (called systematicity ). Steven Phillips and William H. Wilson use category theory to mathematically demonstrate how such reasoning could arise naturally by using relationships between

2268-430: The complex numbers , C {\displaystyle \mathbb {C} } , have more structure than R 2 {\displaystyle \mathbb {R} ^{2}} does: C {\displaystyle \mathbb {C} } is a field as well as a vector space . Category theory takes the idea of mathematical analogy much further with the concept of functors . Given two categories C and D,

2331-514: The function overloading capabilities of the C++ language Spam , ham , and eggs are the principal metasyntactic variables used in the Python programming language . This is a reference to the famous comedy sketch, " Spam ", by Monty Python , the eponym of the language. In the following example spam , ham , and eggs are metasyntactic variables and lines beginning with # are comments. Both

2394-450: The legs of vertebrates and the legs of insects . Analogous structures are the result of independent evolution and should be contrasted with structures which shared an evolutionary line. Often a physical prototype is built to model and represent some other physical object. For example, wind tunnels are used to test scale models of wings and aircraft which are analogous to (correspond to) full-size wings and aircraft. For example,

2457-519: The " coherence " of an analogy depends on structural consistency, semantic similarity and purpose. Structural consistency is the highest when the analogy is an isomorphism , although lower levels can be used as well. Similarity demands that the mapping connects similar elements and relationships between source and target, at any level of abstraction. It is the highest when there are identical relations and when connected elements have many identical attributes. An analogy achieves its purpose if it helps solve

2520-606: The 90's like LeMan. The words do not mean anything, and are used for precisely that reason. The terms were popularized more widely by the actor and stand-up comedian Cem Yılmaz in the late 90's and early 2000's. In Italian software programming culture, it is common to encounter names of Walt Disney characters (as found in the Italian versions of the shows) being used as variables. These names often appear in pseudo-code, are referenced in software engineering classes, and are commonly employed when explaining algorithms to colleagues. Among

2583-460: The University of Georgia, developed a theory on teaching with analogies and developed steps to explain the process of teaching with this method. The steps for teaching with analogies are as follows: Step one is introducing the new topic that is about to be taught and giving some general knowledge on the subject. Step two is reviewing the concept that the students already know to ensure they have

Metasyntactic variable - Misplaced Pages Continue

2646-457: The assignment of a predicate or a relation to the target. Structure mapping theory has been applied and has found considerable confirmation in psychology . It has had reasonable success in computer science and artificial intelligence (see below). Some studies extended the approach to specific subjects, such as metaphor and similarity. Logicians analyze how analogical reasoning is used in arguments from analogy . An analogy can be stated using

2709-400: The base analogue is selected and mapping from base to target occurs in series. Empirical evidence shows that humans are better at using and creating analogies when the information is presented in an order where an item and its analogue are placed together.. Eqaan Doug and his team challenged the shared structure theory and mostly its applications in computer science. They argue that there

2772-505: The concrete details of Jesus' earthly life) are rough analogies, without implying any falsehood. Such analogical and true statements would include God is , God is Love , God is a consuming fire , God is near to all who call him , or God as Trinity, where being , love , fire , distance , number must be classed as analogies that allow human cognition of what is infinitely beyond positive or negative language. Variable (programming) Too Many Requests If you report this error to

2835-617: The cosmos (the universe) that are beyond any data-based observation and knowledge about them stems from the human insight and thinking outside the senses. Analogy can be used in theoretical and applied sciences in the form of models or simulations which can be considered as strong indications of probable correctness. Other, much weaker, analogies may also assist in understanding and describing nuanced or key functional behaviours of systems that are otherwise difficult to grasp or prove. For instance, an analogy used in physics textbooks compares electrical circuits to hydraulic circuits. Another example

2898-473: The example above might be rendered, "Smile : mouth :: wink : eye" and pronounced the same way. Analogy is also a term used in the Neogrammarian school of thought as a catch-all to describe any morphological change in a language that cannot be explained merely sound change or borrowing. Analogies are mainly used as a means of creating new ideas and hypotheses, or testing them, which

2961-406: The first substantive examination of the topic since Cajetan's De Nominum Analogia , demonstrated that analogy is a systematic and universal feature of natural languages, with identifiable and law-like characteristics which explain how the meanings of words in a sentence are interdependent. On the contrary, Ibn Taymiyya , Francis Bacon and later John Stuart Mill argued that analogy is simply

3024-543: The form "A is to B as C is to what ?" For example, "Hand is to palm as foot is to ____?" These questions were usually given in the Aristotelian format: HAND : PALM : : FOOT : ____ While most competent English speakers will immediately give the right answer to the analogy question ( sole ), it is more difficult to identify and describe the exact relation that holds both between pairs such as hand and palm , and between foot and sole . This relation

3087-485: The game Colossal Cave Adventure . A fuller reference can be found in The Hacker's Dictionary from MIT Press . In Japanese, the words hoge (ほげ) and fuga (ふが) are commonly used, with other common words and variants being piyo (ぴよ), hogera (ほげら), and hogehoge (ほげほげ). The origin of hoge as a metasyntactic variable is not known, but it is believed to date to the early 1980s. In France,

3150-403: The general form A is to B as C is to D . In a broader sense, analogical reasoning is a cognitive process of transferring some information or meaning of a particular subject (the analog, or source) onto another (the target); and also the linguistic expression corresponding to such a process. The term analogy can also refer to the relation between the source and the target themselves, which

3213-449: The internal arrows that keep the internal structures of the categories rather than the mere relationships between the objects (called "representational states"). Thus, the mind, and more intelligent AIs, may use analogies between domains whose internal structures transform naturally and reject those that do not. Keith Holyoak and Paul Thagard (1997) developed their multiconstraint theory within structure mapping theory. They defend that

SECTION 50

#1732791471698

3276-584: The most frequently used are "pippo" (Goofy), "pluto," and "paperino" (Donald Duck). In German software programming culture, it is common to encounter the personal name Klaus as a placeholder name for a class; it sounds similar to "Klasse", the German word for "class". In the following example the function name foo and the variable name bar are both metasyntactic variables. Lines beginning with // are comments. Function prototypes with examples of different argument passing mechanisms: Example showing

3339-481: The name ACME in example SQL databases and as a placeholder company-name for the purpose of teaching. The term 'ACME Database' is commonly used to mean a training or example-only set of database data used solely for training or testing. ACME is also commonly used in documentation which shows SQL usage examples, a common practice with in many educational texts as well as technical documentation from companies such as Microsoft and Oracle . Analogy Analogy

3402-413: The new topic by relating back to existing knowledge. This can be particularly helpful when the analogy serves across different disciplines: indeed, there are various teaching innovations now emerging that use sight-based analogies for teaching and research across subjects such as science and the humanities. Shawn Glynn, a professor in the department of educational psychology and instructional technology at

3465-449: The notion of conceptual metaphor may be equivalent to that of analogy. Analogy is also a basis for any comparative arguments as well as experiments whose results are transmitted to objects that have been not under examination (e.g., experiments on rats when results are applied to humans). Analogy has been studied and discussed since classical antiquity by philosophers, scientists, theologists and lawyers . The last few decades have shown

3528-430: The participants' internal models or concepts exists. In historical science, comparative historical analysis often uses the concept of analogy and analogical reasoning. Recent methods involving calculation operate on large document archives, allowing for analogical or corresponding terms from the past to be found as a response to random questions by users (e.g., Myanmar - Burma) and explained. Analogical reasoning plays

3591-509: The problem at hand. The multiconstraint theory faces some difficulties when there are multiple sources, but these can be overcome. Hummel and Holyoak (2005) recast the multiconstraint theory within a neural network architecture. A problem for the multiconstraint theory arises from its concept of similarity, which, in this respect, is not obviously different from analogy itself. Computer applications demand that there are some identical attributes or relations at some level of abstraction. The model

3654-403: The proper knowledge to assess the similarities between the two concepts. Step three is finding relevant features within the analogy of the two concepts. Step four is finding similarities between the two concepts so students are able to compare and contrast them in order to understand. Step five is indicating where the analogy breaks down between the two concepts. And finally, step six is drawing

3717-434: The scope of precedent . The use of analogy in both traditions is broadly described by the traditional maxim Ubi eadem est ratio, ibi idem ius (where the reason is the same, the law is the same). Analogies as defined in rhetoric are a comparison between words, but an analogy more generally can also be used to illustrate and teach. To enlighten pupils on the relations between or within certain concepts, items or phenomena,

3780-476: The systems. This is also known as the systematicity principle. An example that has been used to illustrate structure mapping theory comes from Gentner and Gentner (1983) and uses the base domain of flowing water and the target domain of electricity. In a system of flowing water, the water is carried through pipes and the rate of water flow is determined by the pressure of the water towers or hills. This relationship corresponds to that of electricity flowing through

3843-439: The word toto is widely used, with variants tata , titi , tutu as related placeholders. One commonly-raised source for the use of toto is a reference to the stock character used to tell jokes with Tête à Toto . In Turkey, the words hede and hödö (usually spelt hodo due to ASCII -only naming constraints of programming languages) are well-known metasyntactic variables that stem from popular humorous cartoon magazines of

SECTION 60

#1732791471698

3906-400: Was extended (Doumas, Hummel, and Sandhofer, 2008) to learn relations from unstructured examples (providing the only current account of how symbolic representations can be learned from examples). Mark Keane and Brayshaw (1988) developed their Incremental Analogy Machine (IAM) to include working memory constraints as well as structural, semantic and pragmatic constraints, so that a subset of

3969-605: Was observing objects once and she said, "my mind was noting what else each object reminded me of..." This led her to teach with the question, "what does [the subject or topic] remind you of?" The idea of comparing subjects and concepts led to the development of The Private Eye Project as a method of teaching. The program is designed to build critical thinking skills with analogies as one of the main themes revolving around it. While Glynn focuses on using analogies to teach science, The Private Eye Project can be used for any subject including writing, math, art, social studies, and invention. It

#697302