14
$\begingroup$

I am studying formal languages and production bases systems (rule-bases systems) and I am a little confused about why do these two word "production" and "rule" mean the same thing in so many context in Computer Science.

In English Language they do not seem to mean the same thing. I am not a native English speaker but I know that a rule refers to something that one should/should not do when talking about people or something that if repeated for many times will give the same result and we say that it works by some rules (the way it works defined by some protocol/procedures that are the same every time).

Production refers to something completely different... the phase of some physical goods or software that are currently being made/produced. THe act of making something either physical or some piece of art, some writing, some drawing, something that is made with physical or mental capacities of someone. We say that the specific thing is produced.

However in Computer science these words that represent completely different things in English mean the same thing in CS. How did this terms ended up being similar in CS.

Is there some sort of etymological dictionary for computer science. A dictionary that tells us how the terms in computer science ended up to be ?

BTW: Interesting fact: neither production neither rule are tags in this Stack Exchange site.

$\endgroup$
1
  • $\begingroup$ Despite the major application of formal grammars today being in parsers, their origin comes from natural languages, specifically the linguistics field of generative grammar. Chomsky used them to describe how to produce sentences, which is why they are called production rules. $\endgroup$
    – mrr
    Commented Dec 19, 2016 at 22:16

2 Answers 2

23
$\begingroup$

A grammar has "Production rules:" rules about the new sequences of symbols that you can produce from old sequences. In the cases of context-free grammars, this the old sequence is always a single non-terminal symbol.

Sometimes people abbreviate "production rules" to "productions". Sometimes people abbreviate "production rules" to "rules".

The two are not synonymous: there are plenty of things which are rules but are not productions, and people may call a single use of a rule a production, or the rule itself a production. Generally, the hope is that it's clear from the context what is meant.

$\endgroup$
3
  • $\begingroup$ What sort of contexts would distinguish a production from a rule? $\endgroup$ Commented Dec 14, 2016 at 23:58
  • 9
    $\begingroup$ For example, in type inference (or any sort of inductive definition in Programming Languages) we have inference rules, but these are separate from (though related to) productions in a grammar. Likewise, there's such a thing as "rule-based systems" in AI which is a whole different thing. $\endgroup$ Commented Dec 15, 2016 at 0:31
  • 2
    $\begingroup$ Prolog's inference rules historically developed from production rules (via a form of attribute grammar). $\endgroup$ Commented Dec 15, 2016 at 11:13
6
$\begingroup$

One of the foundational articles of formal language theory, Three models for the description of language (Noam Chomsky, 1956), describes mathematical mechanisms by which sentences can be produced (generated), similar to the way in which humans produce sentences when speaking or writing. The sentences are produced by applying rewriting rules, so these rules are language production rules.

The shorthand name productions for production rules arose later and is technically inaccurate (Chomsky uses that term in his article to name what is produced by the rules, not as a term for the rules themselves).

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.