Techset Composition India (P) Ltd., Bangalore and Chennai, India THPL1121439.TeX Page#: 22 Printed: 29/12/2015
HISTORY AND PHILOSOPHY OF LOGIC, 2015
http://dx.doi.org/10.1080/01445340.2015.1121439
1
2
3
4
5
6
P¯anini’s Grammar and Modern Computation
7
˙
JOHN KADVANY
8 Policy & Decision Science, USA
9 john@johnkadvany.com
10
11 Received 13 August 2015 Accepted 14 November 2015
12
13 P¯anini’s fourth (?) century BC Sanskrit grammar uses rewrite rules utilizing an explicit formal language defined Q1
˙
through a semi-formal metalanguage. The grammar is generative, meaning that it is capable of expressing a
14 potential infinity of well-formed Sanskrit sentences starting from a finite symbolic inventory. The grammar’s
15 operational rules involve extensive use of auxiliary markers, in the form of Sanskrit phonemes, to control
16 grammatical derivations. P¯anini’s rules often utilize a generic context-sensitive format to identify terms used in
replacement, modification or˙deletion operations. The context-sensitive rule format is itself defined using P¯anini’s
17 more general method of auxiliary markers, the latter used to define many dozens of linguistic categories and ˙rules
18 controlling derivations of Sanskrit sentences through the manipulation of ‘non-terminal’ and ‘terminal’ symbols.
19 This technique for controlling formal derivations was rediscovered by Emil Post in the 1920s and later shown by
him to be capable of representing universal computation. The same implicit computational strength of P¯anini’s
20 formalism follows as a consequence: while P¯anini’s Sanskrit grammar is computationally limited, the metalan- ˙
21 ˙ be directly used to define any rule-based system by mimicking
Coll:
guage through which his formalism is defined can
22 standard formal language definitions as an extension of the grammatical system proper. P¯anini’s formal achieve-
ment is historically distinctive, as derivations of grammatically correct, spoken Sanskrit, ˙are designed for oral
23 recitation, with the grammar itself constructed as an organic extension of the spoken object language. P¯anini’s
CE: KS QA:
24 formulation of what amounts to an orally realized symbolic calculus stands in contrast to the implicit inscrip-˙
25 tional methods of contemporary formalisms, such as Gottlob Frege’s appropriately named Begriffsschrift and the
early computing paradigms of Post and Alan Turing. Nonetheless, contemporary views on the cognitive status of
26 phonemic recognition and historical writing systems support the conjecture that, in spite of P¯anini’s rigorous oral
27 formulation, construction of the grammar almost surely relied on alphabetic writing. ˙
28
29
30
31
32 1. Grammar and computation
33 For purposes of this paper, ‘computing language’ means a formal calculus capable of
34 representing universal computation according to the rules of some formal language, explic-
35 itly described through a metalanguage characterizing language categories and expression
36 formation. The language should also have some implicit or explicit realization in some
37 media, such as inscription or electronic storage. In this sense, modern machine and high-
38 level programing languages are computing languages. So too are the classical computing
39 models of Emil Post, Alan Turing, Alonzo Church, Stephen Kleene and others, including
40 Kurt Gödel’s formalization of metamathematics via number theory. Though not ‘pro-
41 graming’ languages intended for machine implementation, the classical models are all
42 ‘computing languages’ by virtue of an operational formalism which can be then used to
43 represent all effective procedures. Gottlob Frege’s first-order logic may be included here
44 just because, as recognized by Church and Turing, Gödel’s number-theoretic coding, as
45 well as their own formalisms, may be translated into axioms expressed in first-order logic
46 (and so showing the valid sentences of first-order logic to be undecidable). We tend to think
47 of formalisms capable of expressing arbitrary algorithms as thoroughly modern, typically
48 late nineteenth and early twentieth century creations. It is also a modern idea, following
49 Gödel, to see how to describe the derivational rules of a formal language also through the
50 language, so that object- and metalanguage are unified as one.
© 2015 Taylor & Francis
2 J. Kadvany
51 But the nineteenth and early twentieth century formalisms for algorithmic expression are
52 not the earliest such, by about two millennia. The first computing language – again, for our
53 purposes, a generic formalism, described through a metalanguage for representing exact
54 generative symbolic procedures of any kind – was devised circa 350 BC by the Indian
55 grammarian and linguist P¯anini.1 The formalism is not identical with P¯anini’s Sanskrit
56 grammar, but is a significant ˙part of it, constituting the grammar’s formidable ˙ derivational
57 methods. Those methods are allied with several centuries of Indian linguistic theory to
58 define the grammar as a whole. It has been linguistic folklore for decades that P¯anini
59 was formally sophisticated, and adept at defining linguistic categories and rules for their ˙
60 application (Ostler 2005, p. 181). At the start of Aspects of the Theory of Syntax, Noam
61 Chomsky cites P¯anini’s grammar as a generative ancestor (Chomsky 1965, p. v). As put
62 ˙
by the Sanskritist S.D. Joshi, the grammar ‘is also a generative calculus, which is actually
63 [its] main thrust’ (Joshi 2009, p. 5). P¯anini’s formal method has been compared specifically
64 ˙
with the Backus-Naur style rules of programing language definition (Ingerman 1967).2
65 Left open is the scope of P¯anini’s formal methods, in contrast to his linguistics, and
66 ˙
their relationship to modern computing concepts. This paper completes the characteriza-
67 tion of P¯anini’s formal skills by noting that his grammar relies on the method of auxiliary
68 markers, or ˙ terminal and non-terminal symbols, as the primary heuristic for expressing
69 formal rules. P¯anini’s rules are defined using a semi-formal metalanguage for defining
70 ˙
linguistic categories and rules which operate on those categories to generate Sanskrit
71 expressions.
72 P¯anini’s basic method was rediscovered, we can now say, in the 1920s and 1930s by
73 Emil ˙Post through his production/rewrite systems. As an example of rewrite methods,
74 three-letter palindromes can be enumerated using a non-terminal marker p and terminal
75 symbols a, b, c. Expressions start with pa, pb, pc and p. Three rewrite rules allow an
76 expression pX, starting with p, to be rewritten as paXa, pbXb or pcXc. Palindromes using
77 a, b, c are generated and marked with an initial p. A final rule allows any expression pX
78 to drop the p (or substitute a null sign), leaving only terminal symbols. Alternatively, in
79 Backus-Naur form, the same expressions could be defined recursively as P : = blank | a |
80 b | c | aPa | bPb | cPc, with P a metalanguage label for object language palindromes, and
81 blank standing for an empty or null string. Post’s methods are now widely used as a for-
82 malism for defining programing languages and the programs written in them. In this way,
83 Post’s method become a standardized metalanguage for language definition and program
84 validity.3
85 Post then also proved, as P¯anini could not even conceive, that his systems were capable
86 ˙ that fact has also to be true of P¯anini’s grammar, even as
of universal computation. But then
87 the latter is meant for computationally modest linguistic derivations˙and not calculation nor
88 computation generally, though the latter are wholly possible. Parallel to Euclid’s codifica-
89 tion of the earliest deductive systems, including proof by contradiction, P¯anini’s Sanskrit
90 grammar formulates and applies the world’s first formal language for generic ˙ symbolic
91 manipulation. As put by the late Frits Staal, P¯anini is indeed the ‘Indian Euclid’ (Staal
92 1965a). ˙
93
94
1
95 Houben 2009 (p. 6) suggests that P¯anini’s use of r¯upya at s¯utra 5.2.120 refers to a coin appearing only from the fourth century.
2
John Backus, lead designer of Fortran, ˙ said he adapted Post’s methods to describe an early version of Algol (Backus 1959, p.
96 129; 1980, p. 132). P¯anini preceded Post, so Ingeman’s partial comparison is apt. See also note 14.
97 3 ˙
In the same way, first-order logic is a metalanguage for theories expressed in predicate logic; Turing machines, Church’s lambda
98 calculus and Kleene’s partial recursive functions do the same for their respective computing idioms. As explained below, P¯anini
˙
solves the problem of bootstrapping a metalanguage from its targeted object language by utilizing affixing methods of Sanskrit
99
itself. On Post systems, see Davis et al. 1994, ch. 5, Minsky 1967, ch. 12; for Post’s history including work antedating Turing,
100 see Urquhart 2009, sec. 4.
P¯anini’s Grammar and Modern Computation 3
˙
101 P¯anini’s grammar has the further property, relevant to contemporary programing
102 ˙
languages, that it is formulated for oral recitation, not inscription; indeed, P¯anini’s
103 formalism can be construed as a grammatical generalization of the spoken Sanskrit object ˙
104 language which the grammar describes. The grammar’s derivations are designed to pro-
105 duce well-formed Sanskrit speech, using a finite set of discrete Sanskrit phonemes as its
106 elementary symbols Samskr ˙ ta, prefixing the root kr with sams,
˙ itself means ‘polished, well-
107 ˙ grammar is the realization
formed’. In this way, P¯anini’s ˙ of a computing environment as
108 ˙
formally recited human speech. That is consistent with the modern idea that computing
109 software can be expressed in any medium compatible with the representation of discrete
110 symbols and their systematic manipulation. Whether the grammar may also have been
111 formulated lacking inscriptional help, especially that of alphabetic writing, is a separate
112 question taken up in paper’s final section, along with consequences for modern computing
113 languages and formal systems.
114 What follows is an expository summary of P¯anini’s grammar including the metalinguis-
115 ˙
tic apparatus through which its formalism is defined. The main goal is to show P¯anini’s
116 expertise at utilizing Post-style rewrite throughout the construction and operation of ˙ his
117 grammar. By way of historical context, P¯anini’s grammar is motivated to construct ‘cer-
118 tificates of authenticity’, so to speak, for ˙Sanskrit expressions, for both scientific and
119 ideological reasons. Procedural exactness has deep roots in Indian culture, particularly
120 via older traditions of ritual theory. The earliest Indian linguistic theories were conceived
121 through the latter, including the characterization of grammar as representing continuous
122 speech (samhit¯a) using artificial discrete simplifications (pada). More generally, language
123 ˙
and linguistics had a preeminent scientific role in ancient India, comparable to geome-
124 try and astronomy in Greece, but with a complementary prestige associated in India with
125 algorithmic thinking of all kinds. The oldest theoretical formulations of the topic appear
126 to be those of so-called ritual ‘manuals’, guiding explicit ritual design and execution in
127 the Vedas and elsewhere. Already here are several grammatical ideas, including s¯utras as
128 rules, and rule guidelines, or paribh¯asa¯ s, describing ritual protocols and their execution.
129 Ritual procedures were seen as recursive˙ in that one ritual could be designated to precede,
130 follow, or be embedded as a complete step within another, and with such steps repeatable.4
131 These early concepts were considerably extended by P¯anini for Sanskrit linguistics, created
132 originally as a subtopic of ancient Indian ritual analysis˙ (See Renou 1941; Staal 1990).5
133
134
135
136 2. P¯anini grammar
137 Like many modern grammars, and much ˙ like all modern formal languages, P¯anini’s
138 ˙
grammar includes a tiered hierarchy of progressively more powerful representations,
139 the ‘levels’ being: physical sounds to symbolic phonemes; phonemes to meaningful
140
141
4
142 As an example of recursive procedural embedding: (i) I enter the room. I leave the room. (ii) I enter the room. I turn on the TV. I
turn off the TV. I leave the room; etc. In ritual the activities might include oblations, chants, participant actions, etc. (Staal 1990,
143
Part II). Patañjali (ca. second century BC) compared the grammatical infinity of language to the same feature in ritual theory:
144 ‘There are indeed linguistic expressions which are never used . . . Even though they are not used, they have of necessity to be
145 laid down by rules, just like protracted sattras,’ a type of Vedic ritual performed only by priests (Staal 1990, p. 89). P¯anini,
˙
146 K¯aty¯ayana and Patañjali are considered the three great linguists of ancient India. Modern expressions of generativity famously
147 appear in Antoine Arnauld and Claude Lancelot’s 1660 Port-Royal Grammar and Wilhelm von Humboldt (von Humboldt
1999/1836, p. 91), for whom thought is potentially infinite, hence requiring the same for language.
148 5
For additional features of ritual theory specialized for Indian linguistics see note 10. On Sanskrit as the Indian language of
149 science, see Staal 1995. On language as goddess and its social aspect see Rig Veda hymns 10.71, 10.71.2, 10.125 and Staal
150 2008, p. 291. For history of Sanskrit and its influence, see Ostler 2005 (ch. 5) and Pollock 2006.
4 J. Kadvany
151 morphemes; and morphemes to syntactically well-formed words and sentences.6 The
152 grammar includes a great deal of implicit semantics through its linguistic content and a
153 set of basic semantical categories used to initiate derivations, as explained below. P¯anini’s
154 ´ ˙
finitary basis includes the basic set of Sanskrit phonemes (Sivas¯ utras); Sanskrit verbal
155 roots (Dh¯atup¯attha) and nominal stems (Ganap¯atha), from which words and compound
156 words are formed ˙ 7 ; and, for metalinguistic purposes,
˙ ˙ additional phonemic markers, used
157 as affixes, to control the derivation of Sanskrit words and sentences. P¯anini’s grammar is
158 known as the Asta¯ dhy¯ay¯ı, meaning ‘eight books’, with some 4000 rules˙ codified as terse
159 mnemonic s¯utras ˙ ˙ (literally ‘threads’), conventionally numbered b.c.n for book b, chapter
160 c, s¯utra n. 8
161 Along with the initial symbol sets, categorical definitions are introduced which are given
162 functional roles through the grammar. Terms such as vrddhi (sound segment), dh¯atu (nom-
163 inal stem), pada (fully derived word) and about a hundred ˙ others are of this type, providing
164 a stock of linguistic concepts which the grammar’s rules organize and act upon. Definitions
165 may include simple lists, a category of words, a category of words labeled in a certain way,
166 or even a collection of rules appearing at a given location in the grammar. Such definitions
167 occur through the grammar’s metalanguage, with samjñ¯a referring broadly to many types
168 and subcategories of definitions. Technical terms may ˙ be ordinary Sanskrit or specially
169 invented terms; the latter are used for ‘theoretical’ grammatical concepts and categories,
170 and the former used for non-grammatical ‘givens’. For example, phonetic sounds are taken
171 as given and ‘primitive’, but not phonological classifications of word segments. Meta-
172 grammatical terms are also taken as given, being assumed as common ground, or ‘basic
173 equipment’, needed for use of the grammatical system (Kiparsky 1980, ch. 6). Samjñin
174 is the ‘object’ to which a term is assigned, such as a list of vowels, a type of compound ˙
175 word, words with a fixed set of assigned affixes and so forth. This widely applied appara-
176 tus for defining symbolic categories implicitly makes the grammar formally general, since
177 most any symbolic category can be so defined from the starting symbol set. P¯anini’s def-
178 initions transition from informal linguistic notions to their formal characterization ˙ in the
179 grammar. ‘Derivation’ can be taken not entirely, but very much, in the modern sense, as
180 rule-governed, step-wise expression formation. The typical action or event is to rewrite – or
181 ‘respeak’ – a current expression E with some modified E′ . Important differences between
182 P¯anini’s and typical modern formal derivational steps are indicated below.
183 ˙
The user of the grammar, like the user of a formal proof system or programing lan-
184 guage, will start with some Sanskrit target word, compound word or sentence in mind as
185 the goal. Generally, P¯anini’s grammar is ‘a derivational word-generating device’ (Joshi
186 ˙
187
188 6
No theory of language accompanies the grammar, hence this starting point is justified only by contemporary interests and
189 linguistic theory; on emergent features of P¯anini’s grammar, such as the tiered structure noted in the text, see Kiparsky 2009
˙
(p. 34).
190 7
For languages not relying (like English) on word order and serial prepositions (e.g. at, by, in, from, etc.), generativity occurs
191 through other means, while Sanskrit allows several types of recursively defined compound words. The simplest are those
192 converting a list like horse, man, stream, sun into a single word which in English would be combined using ‘and’, called a
193 dvandva compound by linguists still today. Other compounds modify a single member (either the first or last constituent), or
combine words using a shared case structure (husband of the sister of Sally). Newly created compound verbs or nominals can
194
then be inputs to appropriate syntactic slots, leading directly to ordinary recursive constructions. Sanskrit poets may create
195 compounds using more than a dozen constituents, although historically such usage may have appeared only after P¯anini’s
196 ˙
grammar. On the centrality of Sanskrit compounds, see Williams 1846 (ch. 9) and Staal 1995 (p. 84) on complex recursive
197 branching. An important example of Sanskrit compounding is positional Sanskrit number words, which can be construed as a
198 8
grammaticalization of numeric place or position (Kadvany 2007, p. 501).
On P¯anini’s grammar generally, see Cardona 1988, Sharma 1987; and from more specific linguistic perspectives, see Gillon
199 ˙
2007 and Staal 1988 (Part II). Mishra 2009 and Scharf 2009 address the grammar’s structure in the context of Sanskrit
200 computational linguistics.
P¯anini’s Grammar and Modern Computation 5
˙
201 2009, p. 2). The grammar is used constructively, like a spreadsheet, and is not gener-
202 ally capable of directly ‘testing’ candidate expressions for grammaticality, though invalid
203 derivations will at some point fail. In the end there is no master definition of ‘grammatical
204 expression’, no ‘if and only if’ statement. Rather, an expression qualifies as grammatical
205 just in case it can be produced by the rules. P¯anini’s rules are also ‘non-deterministic’,
206 meaning derivation options are sometimes possible, ˙ such as putting a sentence into an
207 active or passive voice. The non-deterministic formulation further compacts the gram-
208 mar and reduces its size for memorization. As a means of better characterizing empirical
209 speech, P¯anini also marks variant usage as occurring ‘usually’ versus ‘rarely’, or ‘some-
210 ˙
times’ (Kiparsky 1980, ch. 1). Generally, any applicable rule is applied to any derived
211 form until no more rules are applicable, subject to constraints, not all of which are stated
212 explicitly, preventing incorrect derivations. As a modern parallel, interpretive rules writ-
213 ten in the programing language Mathematica are similarly applied: user input is scanned
214 and rewritten until that is no longer possible, including detection of an error condition.
215 As in most empirical linguistic analysis, there are sentences whose syntax is not quite
216 produced by the grammar, or produced only through some ad hoc interpretation of rule
217 application. Nonetheless, the grammar is recognized as one of the greatest ever devised for
218 its many linguistic insights, ingenious methods, comprehensiveness and rigor (Bloomfield
219 1934, p. 11). Q2
220 Needed roots and stems are user-selected to initiate the derivational process,9 and
221 because Sanskrit is mostly a free-order language, like Latin or Old English, the ordering of
222 these elements is largely irrelevant (through ordering within several types of compounds
223 can matter). From this starting point, metalinguistic rules (paribh¯asa¯ s – a term assumed
224 by the tradition but not used by P¯anini) are used to mark roots and˙ stems as having their
225 ˙
intended syntactic roles, using six functional categories which today’s linguists may char-
226 acterize as agent, goal, patient, instrument, location and source. As put by Paul Kiparsky,
227 ‘P¯anini’s grammar represents a sentence as a little drama consisting of an action with dif-
228 ˙ participants, which are classified into role types call k¯arakas [which are] roles, or
ferent
229 functions assigned to nominal expressions in relation to a verbal root’ (Kiparsky 2005,
230 p. 60). While such choices are made by the user, the k¯araka metarules list the categories
231 and rules for using them. ‘P¯anini thus takes meanings into consideration from the very
232 outset of a derivation’ (Cardona˙ 1988, p. 160). Because of that, and the need to interpret
233 rules through working knowledge of Sanskrit, the grammar is not sharply divided into
234 phonology, morphology syntax and semantics as in some modern linguistics (Cardona
235 2009, p. 14).
236 From this starting point of the k¯araka roles and selected proto-words, P¯anini’s met-
237 alanguage guides the arduous process of identifying and applying relevant operational˙
238 rules (vidhi) which step-wise transform roots and stems into valid Sanskrit words and sen-
239 tences, primarily through affixing and compounding. The proper prioritization, exception-
240 allowing, rule-blocking and other uses of operational rules are also laid out by the guiding
241 metarules. The process is comparable to the formation of an individual, concrete and well-
242 formed program by the rules of the programing language in which it is expressed. The
243 ‘output’ here is a single well-formed word, or set of words constituting a sentence. All
244 through the process, rule application relies on considerable expertise, and some subjective
245 judgment, for rule identification and application. While employing a rigorous formalism
246 throughout, the organization of rules and their application is subtle and intricate, as happens
247 with the linguistic analysis of many natural languages. This blending of linguistic theory,
248
249
9
250 This approach for initiating derivations is a received account of how the grammar is to be applied, e.g. the grammar ‘clearly
requires a user who wants to check and possibly improve a preliminary statement’ (Houben 2009, p. 14).
6 J. Kadvany
251 ordinary Sanskrit fluency, grammatical expertise and formal method is one reason many
252 Sanskritists are averse to characterizing P¯anini’s grammar as anything but sui generis.
253 ˙
Given that caveat, rule formulation and application themselves use concepts formulated
254 next in modern times, particularly through the formalisms of modern mathematical logic.
255 First is that of step-wise derivations, with those steps driven by rules operating on cate-
256 gories defined over initial discrete symbol sets, as noted. Then, most importantly, rules
257 are codified using what we today think of as ‘auxiliary markers’ (or ‘non-terminals’),
258 simply additional metalinguistic signs whose role is to control the derivational process:
259 what to do if a stem is marked as a past tense verb, what to do if a noun is marked as
260 an instrumental object, how to indicate passive versus active, what sound adjustments to
261 make for adjacent phonemes, and so forth. These auxiliary markers (anubandha), iden-
262 tified by P¯anini using the term it (using boldface for markers and defined terms), are
263 almost always ˙ appended to intermediate strings as affixes (i.e. stringˆaffix) and retained
264 as long as needed, or until the marker is changed or deleted in the derivation.10 The term
265 it derives from the Sanskrit particle iti, used as a quotation marker, and whose deictic
266 status is reflected in allied terms such as idam/this, iha/here, id¯an¯ım/now (Staal 1975, p.
267 345). A derivation concludes with application of many phonological rules which convert
268 an expression so that it is ready for speech, particularly through use of sandhi rules for
269 adjusting adjacent sound forms, comparable to pronouncing the plural boy + s as /boyz/.
270 As mentioned above, Indian linguistics long recognized the discrete terms used in their
271 analysis as abstractions; hence derived expressions required (internal and between-word)
272 ‘smoothing’ to better approximate empirical speech. The last auxiliary markers for a set
273 of derived words may be deleted, resulting in the finished Sanskrit sentence (with case
274 endings and inflections basically dictate sentence structure), akin to a proved theorem or
275 computer program. Alternatively, a set of final markers may be retained so that, among
276 other uses, derived words may be recursively used as components in one of many types of
277 Sanskrit compounds, a major focus of all Sanskrit linguistics, not only P¯anini’s. A derived
278 pada with its last marking retained is available for assignment to a k¯araka ˙ role to initiate
279 a new derivation of either a new word or sentence. In the grammar, pada certifies a word
280 derived via the rules, and specifically as ending with exactly one of two suffix types, sup or
281 ˙ a ‘suffix’ being itself defined as a ‘following element’. With tin,
tin, ˙ there are two subsets
282 of first-second-and third-person endings whose number is either singular, dual or plural
283 (hence 2 × 3 × 3 = 18 total). Similarly sup represents a class of 21 nominal endings
284 organized as seven cases × singular-dual-plural.
285 Here is a sketch of a sentence derivation (Sharma 1987, ch. 3; Gillon 2007). Suppose the
286 goal is to derive a correct Sanskrit expression of ‘Devadatta is cooking rice in a pot with
287 firewood for Yajñadatta’: devadatta odanam yajñadatt¯aya sth¯aly¯am k¯asthaih pacati. The
288 ˙˙ ˙
k¯araka roles chosen would be the verbal action of cooking, an agent Devadatta, a patient
289 of the action which is rice, an instrument of firewood, a location of the pot, and a recipi-
290 ent Yajñadatta of the action. The k¯araka categories are formally defined and regulated by
291
292
10
293 Before P¯anini, ritual theorists described sound changes and combinations in words, also using grammatical case endings as
˙
markers for combined phonemes, but limited to concrete examples, not defined categories using specialized nomenclature as
294 occurred later. Categories of ritual acts or participants were described using special terms, and these streamlined the representa-
295 tion of ritual processes in oral recitation. Without such abbreviatory devices, long procedural descriptions would be laboriously
296 repeated, thereby undermining the goal of compact and generic characterizations of ritual structure (Staal 1990, ch. 26). With
297 P¯anini, technical terms are extended to language as a whole, making possible an extension of the generative methods seen
˙
298 in ritual formulations. The use of case endings as markers is similarly adopted, but now to linguistic categories, and not just
individual words. The s¯utra style of abbreviated summary, and the paired notions of s¯utra/rule and paribh¯asa¯ / metarule, are
299 ˙
also taken over by P¯anini and his tradition to perfect the metalinguistic analysis begun by the ritual theorists, for whom exact
300 ˙
linguistic expression was only one component of procedural correctness.
P¯anini’s Grammar and Modern Computation 7
˙
301
302
Colour online, B/W in print
303
304
305
306
307
308
309
310
311
312
313
314
315 Figure 1. Schematic of derivation steps.
316
317
318 metarules, and provide a powerful heuristic for constructing a wide range of sentences.
319 The categories mediate informal semantic meaning through their functional syntactic role.
320 The free word order of Sanskrit means the selection initial stems, roots or words to asso-
321 ciate with k¯araka roles can be thought of as an unordered set: {devadatta, firewood, rice,
322 cooking, pot, yajñadatta}, i.e. {devadatta, k¯astha, odana, pac, sth¯ali, yajñadatta}. Again,
323 as put Kiparsky, the grammar is a ‘pure form of ˙ lexicalism’ (Kiparksy 2009, p. 49).
324 These elements, schematized in Figure 1, now require rule applications to mark their
325 assigned k¯araka roles and to create new expressions. For example, the pot is singular and
326 the location of the action, and that is marked by the suffix –ni, ˙ producing sth¯ali-ni.
˙ The
327 boldface n˙ represents an auxiliary and non-terminal marker used in the derivation process,
328 with italicized i being a terminal sound, and the hyphen indicating concatenation. Similarly,
329 yajñadatta is the recipient of the action, marked by the suffix –ne˙ and yielding yajñadatta–
330 ˙ The patient and instrumental roles, for rice and firewood respectively, can be marked
ne.
331 with suffixes not needing auxiliary markers: odana-am and k¯astha-bhis.
332 Derivation of the verb and its inflection for the cooking action,˙ pac, involves more
333 steps. There is first an assignment of the present tense using the suffix –lat, chosen from
334 ˙
a set of l suffixes (lak¯ara) including perfect, imperfect, subjunctive, imperative, and other
335 tenses. The verb can also refer actively to the agent Devadatta (cooking the rice . . . ),
336 or passively to Devadatta by focusing on the rice ( . . . cooked by Devadatta), an exam-
337 ple of non-deterministic choice in the derivation. Devadatta is singular and is cooking for
338 another, leading to the –lat suffix being replaced by –tip. The verb root pac also happens
339 to require the vowel a between˙ root and suffix, leading to pac-´sap-tip. To now consis-
340 tently mark the agent Devadatta as actively cooking, as planned with the active verb and
341 required by the marker tip, means use of the –su suffix on devadatta. The marked-up
342 roles lead to {devadatta–su, k¯astha-bhis, odana-am, pac- s´ap-tip, sth¯ali–ni, ˙ yajñadatta–
343 ˙ An important caveat: each ‘step’
ne}. ˙ involves several substeps to identify the operational
344 rule which can actually be applied, with a typical derivation citing all rules certifying a
345 single rewrite step.11 The substeps may involve numerous cross-references in the grammar
346
347 11
‘In essence, operational rules cannot apply unless their interpretational or definitional rules are coupled with them. This can
348 only be accomplished by the device of reference which is triggered by encountering a technical term or its denotation in an
349 operational rule. This device reconstructs the term origin which, in turn, yields a referential index and it is this index that
350 retrieves necessary information, explication or constraints relative to rule application’ (Sharma 1987, p. 68).
8 J. Kadvany
351 or the application of metarules to resolve rule conflicts, possibly extending across several
352 of the grammar’s eight ‘books’.12 P¯anini’s complex derivations in this way differ signifi-
353 cantly from those found in most modern ˙ formalisms. Nonetheless, once so obtained, rule
354 application is largely a formal procedure.
355 Given Panini’s process, intermediate expressions can be used to derive actual words by
356 deletion of non-terminal markers, here u, s´, p, n; ˙ that is finally followed by derivation
357 of correct terminal sounds through phonological rules adjusting for transitions between
358 phonemes, such as a plural boy + s pronounced /boyz/ but cat + s pronounced /cats/.
359 The derivation above is typical in that auxiliary markers are similarly used throughout
360 the grammar for rule expression and their application. Sanskrit syntax is already highly
361 governed by case endings, so this basic means by which P¯anini’s grammar extends the
362 Sanskrit object language by its own means. The systematic role˙ for affixing makes P¯anini’s
363 innovation a kind of grammaticalization, which is often central to language change gener- ˙
364 13
ally. Here, existing affixing resources of the object language, Sanskrit, are generalized to
365 describe the object language itself. In modern computational theory, the analogous boot-
366 strapping innovation is to use Post-type rewrite rules to formulate a metarule, or system, for
367 all rewrite rules; or to use Turing machine grammar to define a universal Turing machine;
368 or as shown by Gödel, to use number theory to define a metalanguage for its own deriva-
369 tions; and so forth. Such bootstrapping also occurs practically when a programing language
370 like C + + or Pascal is used to write its own compiler, with successive versions accommo-
371 dating larger swaths of the language. With P¯anini, though, what differs is that we assume
372 ˙
the spoken natural language Sanskrit and its structure to begin with. The object language
373 is neither a mathematical invention nor is it necessarily even written.
374 Here is a related and final example of P¯anini’s care in distinguishing what we call in
375 modern terms, following Frege, the use and ˙mention of symbols or linguistic categories.
376 P¯anini throughout the grammar clearly distinguishes his object-level Sanskrit from the
377 ˙
metalinguistic rules capable of generating it. As mentioned above, a Sanskrit particle iti is
378 used to mark quotation, related to the technical term it for P¯anini’s auxiliary markers. Since
379 the grammar abounds with object language stems, roots, and ˙ case endings, and these are
380 mentioned rather than used, a morass of iti markers might seem inevitable. Instead P¯anini
381 reverses normal usage and makes mention of Sanskrit expressions his default, e.g. as repre- ˙
382 sented in our writing by italics, a, e, i, o, u. The Sanskritist John Brough in 1951 identified
383
384
12
385 For example, Book I includes global rules to which a derivation returns once other domains have been exhausted. Compounds
are covered in Book II, while the recursive apparatus needed to form their inputs, two previously derived padas, is covered in
386 subsequent books. Rules occurring later generally take precedence over earlier and typically more general rules. A complete
387 rule may use multiple s¯utras to address sub-conditions and exceptions. Header s¯utras (adhik¯arasutra) announce a new section,
388 identified through a special accent (svarita) which is not always recognizable. The s¯utras following share assumptions which
389 then need not be restated, because their ‘recurrence’ (anuvrtti) is assumed from the header onward. That makes for complexity,
˙
390 but the gain is fewer s¯utras codifying more conditions. Such organization follows ordinary references such as Sally drove home,
went in and turned on the television, with the agent Sally remaining implicit. S¯utras can be marked to indicate their scope as
391 applying to rules enumerated later, for which they should be assumed. Many rules, even when spelled out, may also require
392 judgment for their proper application. That includes compound formation, in which input words are expected to be ‘suitable’
393 candidates relative to one another when combined. One might nonetheless form a strange compound, but not expect it to be
394 13
heard in Sanskrit usage, analogous to Chomsky’s Colorless green ideas sleep furiously.
Through grammaticalization (Brinton and Traugott 2005, ch. 1) speakers may collectively and gradually modify content
395
words, such as Old English willan (to want), as only a psychological state of desire, to become will, which today in English
396 acts as a function word marking future intention (Aitchison 2001, ch. 7). More radically, the erosion and loss of Old English
397 case endings and inflections led to the appearance of modern linear word order to identify roles earlier marked by affixes, which
398 also occurred in the formation of French from Latin. With P¯anini, affixing of the object language itself gets grammaticalized
˙
399 as a metalinguistic abstraction. On Sanskrit as object language and a basis for the metalanguage extending it, see Houben 2009
(sec. 2) and Staal 1995 (p. 107).
400
P¯anini’s Grammar and Modern Computation 9
˙
401 this assumption in s¯utra 1.1.68 as stating that ‘a word in a grammatical rule which is not
402 a technical term denotes its own form’ (Brough 1951, p. 403). P¯anini’s approach is again
403 ˙ the programing lan-
rediscovered millennia later. In 1963 the Algol 60 report describing
404 guage, and known for use of Backus-Naur form in programing language design, explains
405 that ‘Any mark in a formula which is not a variable or a connective, denotes itself (or the
406 class of marks which are similar to it)’ (Naur 1976, p. 47, emphasis added).14 Q3
407
408
409 3. P¯aninian computation
410 The basic claim then is that P¯anini’s˙ system is sufficiently structured to qualify as the
earliest known computing language, ˙ in the sense defined at the start of this paper. Here
411
412 are supporting details, along with several caveats. The idea of metalanguage and object
413 language is understood by P¯anini, and is present throughout his approach. The paribh¯asa¯
˙
metarules elaborate how the system is to be used, which is to apply operational rules ˙to
414
415 increasingly transformed symbolic expressions. As illustrated by the example, the principle
416 method to express rules and rule application is through the auxiliary markers. That central
417 technique means P¯anini first devised the method of rewrite systems discovered by Emil
˙
Post starting in the 1920s but not recognized through publication until the 1930s (Urquhart
418
419 2009, sec. 4). The method is very much here, with even more formal rigor than found in
420 Euclid’s derivations.
421 P¯anini goes so far as to devise a quite general formulation of a method he applies repeat-
422 edly, ˙especially in his phonological rules, that of context-sensitive rules. We express those
423 today as, e.g. A → B /C__D, meaning: replace expression A by B when A follows C and
424 precedes D, with C or D possibly empty – so deletions can be treated as a kind of replace-
425 ment (as done by P¯anini). P¯anini formulates an equivalent notion of generic string positions
˙ his most
and their roles, perhaps ˙ elaborate formal construct which is directly comparable
426
427 to a modern equivalent. So it is not possible to argue that P¯anini has some serendipitous
428 notion of rewrite rules; to the contrary, he developed the first ˙expression of a central idea
429 of linguistic rule types initiated by Chomsky and others in the 1950s, himself building on
430 Post’s ideas (Pullum 2011, sec. 2).
431 Here is an illustration of how P¯anini’s formal terminology works for a phonological
˙
rule, perhaps noted earliest as a context-sensitive formulation by Staal 1965b. The rule is
432
433 to replace i by y when followed by any of nine Sanskrit vowels. That could be expressed
434 as nine separate rules, but is better codified by a single rule referring to a right-context D
435 of ‘all following vowels’ (and null left-context C). Similar replacements u → w, r → r, l
→ l occur, again with any following vowel. In modern terms, this means a summary ˙ rule˙
436
437 to be codified is the ordered replacement < i, u, r, l > → < y, v, r, l > when followed
by a vowel, meaning a phoneme from the list {a, ˙ ˙ i, u, r, l, e, o, ai, au}. This list and
438
439 ´
others are coded as sublists in the Sivas¯ utra phoneme set, interpreted as being ordered as
440 14 separate ‘rows’. Sublists of phonemes are identified by auxiliary markers for ‘start’
441 and ‘endpoints’, with those markers skipped or deleted in the sublist enumeration; that
442 guidance is also spelled out as a metarule. It is also worth noting that P¯anini’s phoneme
´ ´ ˙
443 set, the Sivas¯utras (suggesting deliverance by the god Siva), while nominally expressed
444 as a sequence of linear s¯utras, is apparently optimally designed to enable its systematic
445 reference to some 42 sublists of vowels and consonants.15 The sounds and basic phonetics
446
447 14
Algol 60 was the first programing language to be designed and described using formalized rewrite rules (Preiestley 2011, ch.
448
8). See also note 2 on Backus and Algol.
449 15 ´
The Sivas¯ utras imply 292 possible abbreviations (pr¯aty¯aharas) of which P¯anini utilizes 42. On the optimality properties of
450 ´ ˙ utras alone is suggestive of inscriptional help.
this organization, see Petersen 2004. The matrix-like complexity of the Sivas¯
10 J. Kadvany
Q15
451 Table 1.
452
Articulation moving from back to front of mouth
453
454 Velar Palatal Retroflex Dental Labial
455
456 From unaspirated k c t t p
to aspirated kh ch t˙h th ph
457 unvoiced and g j ˙d d b
458 voiced consonants gh jh d˙h dh bh
459 to nasals n˙ Ñ ˙n n m
˙
460
Notes: Diacritics represent sound differences, e.g. as created by tongue placement in the retroflex n. After Staal 2008 (Figure 24).
461 ˙
462
463 associated with linguistic phonemes are assumed known by the grammar’s user (Cardona
464 1988, p. 166) as illustrated by Table 1:
465 Table 1 uses place and manner of articulation in the vocal apparatus as two dimensions
466 defining the discrete sound forms needed for grammatical analysis. This older 5 × 5 Vedic
467 table is not the form used by P¯anini, but already shows considerable knowledge of phone-
468 mic structure. Rows and columns˙ are ancient predecessors of today’s ‘distinctive features’,
469 or dimensions characterizing a language’s allowed phonemes. Relevant to computation,
470 such is the grammar’s ‘hardware’, or media realization, as speech rather than inscription.
471 ´
Here then is the organization of Sanskrit phonemes as the Sivas¯utras:
472
473 a i u n / r l k / e o n˙ / ai au c / ha ya va ra t / la n / ña ma n˙ a na na m /
˙ ˙˙ ˙ ˙ ˙
474
jha bha ñ / gha dha dha s / ja ba ga da da s´ /
475 ˙ ˙ ˙
476 kha pha cha tha tha ca ta ta v / ka pa y / s´a sa sa r / ha l //
477 ˙ ˙ ˙
478 This 14-row ordering can be used to select sublists by identifying start and end points,
479 with auxiliary markers, in bold, being skipped or deleted in the sublist enumeration. So,
´
in the Sivas¯ utras, ik stands for {i, u, r, l } and ac refers to {a, i, u, r , l , e, o, ai, au},
480
481 which is the vowel list needed above;˙ the ˙ convention.
˙ braces { . . . } are our written ˙ The
482 other list needed is yan or {y, w, r, l}. A s¯utra applies for taking same-sized pairs of lists
as ordered sequences instead˙ of unordered sets; the rule basically allows the definition of
483
484 finite mappings between defined lists.
485 Given names for desired lists (e.g. ik, ac, yan), the second step is using them to construct
486 a context-sensitive rule A → B / C __ D. The˙ challenge then is to define these functional
487 roles for A, B, C, D. P¯anini’s solution is to give the lists, through their names (ik, ac,
yan), k¯araka case endings ˙ in a s¯utra statement, and thereby to grammaticalize the rule.
488 ˙
489 That is, the case endings are added to the names of the lists, treated as syntactic objects, to
490 contextually define their roles in stating a context-sensitive rule.
491 P¯anini’s artificial case endings are therefore used to express ‘in the place of A, substitute
˙ after C and D follows’, using several metarules: genitive case ending marks A
B, when
492
493 as what is to be substituted; nominative case ending marks B to substitute for A; ablative
494 case ending marks a preceding segment C; locative case ending marks a trailing segment
495 D. The context-sensitive conventions also are used as a master format for s¯utra coding
496 and hence are a consistent clue to their meaning. That is, many operational rules are have
497 their s¯utra form framed as AGenitive BNominative CAblative DLocative . This paradigm simplifies the
498
499 See also Staal 1995 (p. 103) on an early notion of ‘homorganic’, or ‘having the same place, producing organ and effort of
500 articulation in the mouth’: sam¯anasth¯anakarana¯ syaprayatnah.
˙ ˙
P¯anini’s Grammar and Modern Computation 11
˙
501 statement and recognition of grammatical rules in abbreviated s¯utra form. Hence P¯anini’s
502 ‘operational rules are generally [context-sensitive] substitution rules’ (Joshi 2009, p. ˙3).16
503 In the (well-known) example, the rule leads to: ik + genitive, yan + nominative, ac +
504 ˙
locative, or {ikah, yan, aci}. When the words are combined in that order, a sound-changing
505 ˙ ˙
sandhi rule completes the derivation as iko yan aci, s¯utra 6.1.77. The rule in effect is a
506 metalinguistic sentence which is meaningless in˙ Sanskrit proper. That is a remarkable use
507 of Sanskrit to bootstrap itself into a metalanguage. Given a rule like iko yan aci, its case
508 marking has to be decoded, which can be written as [iko]gen [yan]nom [aci]loc˙. From that, a
509 skilled user may use the case endings to unwind the s¯utra into the ˙ named lists and ordered
510 17
mappings. The grammar does not perform that task for you.
511 The clarity and directness of P¯anini’s system also comes at considerable cost. There are
512 thousands of rules and metarules,˙ organized as the grammar’s eight books. The depen-
513 dencies across rules, and the organization of rules into subgroups controlled by marked
514 ‘headings’, are highly complex. The system should be thought of as containing a rigor-
515 ous rewrite formalism, especially via the metalanguage through which rules are expressed,
516 but with the grammar as a whole organized using many intricate linking, structural and
517 referential devices. Critically, rules are codified as its thousands of brief and memorizable
518 s¯utras, which should not be identified with grammatical rules themselves. P¯anini’s overall
519 motivation is one of economic efficiency (l¯aghava), rationally motivated by ˙the oral cod-
520 ification of the grammar (Kiparsky 2005, p. 65; 2007).18 S¯utras are versified mnemonics
521 for a grammar which today has to be reconstructed from commentary dating from some
522 few, to many hundreds, of years following P¯anini. The grammar’s rules are glossed in
523 summary form, or vrtti, and other commentary ˙styles, spelling out tacit assumptions and
524 the intended content˙ of terse s¯utra formulations.19 That re-expression should not be taken
525 to marginalize the s¯utras’ linguistic function. The s¯utras demonstrate the most elaborate
526 means by which large amounts of information – the grammar’s generative rules, matrices
527 of case endings, linguistic categories – can be compactly communicated given constraints
528 of human memory, oral transmission and Sanskrit structure.
529 Hence P¯anini’s mnemonic s¯utras have been decoded and recoded through the ongo-
530 ˙
ing oral tradition of grammarians, who have evolved nomenclature and guidelines for
531 stating P¯anini’s rules in explicit form, along with examples, variant interpretations and
532 ˙
criticism. Whether P¯anini’s grammar was originally formulated without inscriptional aids
533 ˙
is unknown, controversial, and very doubtful for some (Goody 1987, ch. 4). However, even
534 assuming considerable inscriptional help, the finished product is highly refined and ready
535 for oral expression by communities of experts. The grammar makes almost no explicit
536 ´
reference to inscribed signs, with the Sivas¯ utra phoneme set identified through the place
537 and manner of sound formation in the vocal apparatus. P¯anini’s grammar itself, both in
538 ˙
539
16
540 Rule types include: introduced definitions (samjñ¯a), such as types of compounds, tenses, cases and others; derivational or oper-
˙
ational (vidhi) rules, whose application to user-selected inputs leads stepwise to Sanskrit sentences by rewriting successive
541
expressions; metarules/paribh¯asa¯ s defining and guiding operational rules through rule precedence, resolution of rule clashes,
542 ˙
default assignments, rule options, constraints and other guidelines for the grammar’s use; and heading rules (adhik¯ara),
543 organizing rule groups into topical domains subject to shared constraints.
17
544 The grammar is ‘monotone’, meaning not all derivations are reversible, hence no algorithm is implied for grammatical marking
working backward from a phonemic representation (Kiparsky 2009, p. 36).
545 18
Efficiency, or ‘economy’, is a driving factor in much language change (Aitchison 2001, ch. 11; Deutscher 2005, p. 88), with
546 the difference here, in the construction of a formal grammar, being that its formulations, as an extension of Sanskrit itself, are
547 pursued methodically and consciously.
19
548 For example, s¯utra 3.1.97 aco yat is glossed as ‘affix yat occurs after a verbal root which ends in a vowel [ac]’. Or 3.2.1
karmany an: ‘affix an occurs after a verbal root which co-occurs with a pada denoting an object [karman]’ (Sharma 1987, p.
549
81). The reference ac is to a codified list of vowels as discussed above. On difficulties of interpreting grammatical affixing
550 through oral transmission, see Cardona 1988 (pp. 54ff., 115).
12 J. Kadvany
551 complexity and organization, is like a user’s manual for an early programing language
552 including the language definitions themselves, all expressed for using speech as phonemic
553 ‘hardware’.
554 Let us return to our main point, regarding the implicit computing power of P¯anini’s sys-
555 tem. In terms of the techniques P¯anini needs and explicitly uses for his linguistic ˙ theory,
556 ˙
the computational ‘maximum’ is that of context-sensitive rules, which are not sufficiently
557 general to represent all computable functions (Davis et al. 1994, ch. 11). Hence the com-
558 putational power of the grammar proper falls short of universal computation, while that
559 limitation does not hold for the metalanguage through which the Sanskrit ‘application’
560 is defined. The flexibility of context-sensitive rules makes them easier to formulate and
561 interpret, but for some, this rule type is already overkill for representing natural language
562 syntax (Pullum and Gazdar 1982), which largely is P¯anini’s scope too. Leaving aside the
563 issue of the ‘right’ level of algorithmic power needed for ˙ natural language grammars, it is
564 nonetheless a simple observation, given the explicitness of P¯anini’s metalanguage, that his
565 grammar can be directly extended, using his same method of ˙auxiliary markers, to repre-
566 sent any rewrite system desired. For Emil Post’s achievement was to show that it was just
567 the method of auxiliary markers which could be used to simulate the derivations of any
568 rewrite system. So that must be true of P¯anini’s system as well.
569 ˙ r: g X g . . . X g → h Y h Y . . . Y h .
In general, a rewrite rule can be of the form 0 1 1 n n 0 1 1 2 m m
570 The g’s and h’s are fixed strings of symbols from a finite symbol set S, including null
571 strings. Each Xi is an arbitrary variable string over S. The Y ’s can be any of the X ’s includ-
572 ing repetitions. Post showed that productions generated by rewrite rules over a symbol set
573 S could be reproduced in a canonical way by extending S to an S* including new auxiliary
574 symbols, and using metarules RS ∗ and standardized axioms AS ∗ , allowing new symbols
575 from S*. This is much as P¯anini’s uses his case affixes, namely to control production of
576 exactly the target language LR˙ , with Post showing that his normal form is completely gen-
577 eral. Post’s canonical rules are all even in ‘affixing’ form gX → Xh, with X a variable
578 symbol and g and h fixed strings.20 Post’s methods show, for example, that axiom systems
579 with rules such as {A, if A then B} → B, can also be reproduced in rewrite form, with
580 Post himself noting applicability to Russell and Whitehead’s Principia Mathematica. Post
581 has no linguistic rules, just algorithmic ones, and Panini’s grammar as a whole is poorly
582 thought of as a Post system simpliciter. But the modern rewrite notation for expressions,
583 E → E′ , is not anachronistic for P¯anini’s rule application, nor is the notion of a succession
584 ˙
of rule applications by which a produced expression is derived.
585 Using his canonical form for rewrite systems, Post demonstrated that his produc-
586 tion/rewrite systems are equivalent to the representational power of Turing machines by
587 showing that his standardized rules can be used to enumerate all rewrite rules and their pro-
588 ductions. So, modulo use of spoken phonemes rather than inscripted graphemes, according
589 to Post’s theorems P¯anini’s methods can also be used to represent any target language
590 LR , and are in that way ˙ capable of expressing universal computation through a largely
591 direct application of the grammar’s rule system. The basic reason is that, as with a mod-
592 ern computing language, P¯anini has a systematic method for introducing new symbolic
593 categories and rules applying˙ to those categories. It is not as if P¯anini devised a single ad
594 hoc rewrite system of ambiguous generality, something like a missionary˙ grammar. P¯anini
595 completed the difficult metalinguistic work needed to lay the groundwork for universal ˙
596
597
20
598 The scare quotes are meant as a reminder that terms such as ‘prefix’ and ‘suffix’, like ‘place’ and ‘position’, are spatial
metaphors, since an abstraction has no ‘pre’, ‘post’ or any other location. P¯anini uses words for ‘earlier’ and ‘later’ in context-
599 ˙
sensitive rules (Scharfe 2009, p. 29) with visual metaphors used elsewhere. For Post’s normal form analysis, see Post 1943,
600 Minsky 1967 (ch. 13).
P¯anini’s Grammar and Modern Computation 13
˙
601 computation through a Sanskrit* as his grammar, described through the grammar’s meta-
602 language. P¯anini is actually close to formulating a computing paradigm, given his generic
603 and rigorous ˙formulation of context-sensitive rules, but as mentioned, this rule class falls
604 short of universal computation.
605 As another way of seeing the power of P¯anini’s methods, a thought experiment can be
606 formulated to complete the steps by which a ˙Sanskrit** is constructed on top of P¯anini’s
607 Sanskrit* which then affords universal computation. To construct such a Sanskrit**,˙ one
608 might introduce a k¯araka role which, by some new affixing marker, segregates numeri-
609 cal or computing terms from ordinary Sanskrit. Derivations starting from this new starting
610 point would be isolated from the original grammar. Categorical definitions, for ‘numbers’,
611 ‘constants’, ‘variables’, ‘addition’, ‘multiplication’ and other logical and computing cat-
612 egories need would be introduced using samjñ¯a style rules, just as P¯anini introduces his
613 own technical terms. These may involve simple ˙
˙ recursive definitions typical of computing
614 syntax for categories such as ‘formulas’, ‘sentences’, ‘proofs’ and ‘theorems’. Applied to
615 such categories, just as with a modern formalism, rules for new derivations could be cast
616 as replacement rules of many kinds, including the context-sensitive rules described earlier.
617 The expression of computations using P¯anini’s grammar can be almost just a transcription
618 of a modern formalism into the grammar,˙ enabled by its native techniques for categorical
619 and rule definitions.
620 The difference in computing scope is an important feature of the thought experiment in
621 which P¯anini’s grammar is extended to represent universal computation. Natural language
622 can involve˙ intricate syntactical or semantical constructs, but these are not computationally
623 complex. The complexity of languages is captured rather by language-specific formu-
624 lations involving word order, affixing, inflection, anaphor, long-distance dependencies
625 and much else. So P¯anini’s grammar, however intricate the phonological, morphological,
626 and syntactic relations˙ defined there, still falls short of implying general multiplication,
627 exponentiation and other computable functions, until that functionality is specifically intro-
628 duced. Multiplicative arithmetic (including + and × , not + alone) is undecidable, so its
629 conceptualization should be seen as a cognitively bold and creative step. That includes
630 more complex recursions than are implicit in natural language syntax without additional
631 grammaticalizations or equivalent changes. Many, if not most, modern languages can be
632 used to define any computational or mathematical theory at all, but that does not mean that
633 arbitrary mathematical or computational content is implicit in their rules of grammatical
634 formation.
635 The heavy lifting to define the metalinguistic framework is completed by P¯anini, while
636 ˙
he has just limited his target application to be the grammatical expressions of spoken San-
637 skrit.21 For that, he needs a complex linguistic theory, and a precise metalanguage for
638 codifying the grammar of his Sanskrit object language. So the computing power needed
639 by P¯anini is not ‘universal’, but everything is in place for a computing environment real-
640 ized in˙ Sanskrit speech. The paribh¯asa¯ metarules enable definitions of linguistic categories
641 ˙
with which most vidhi/ operational rules are concerned. That structure implies the gram-
642 mar is formally open-ended for category and operational rule formation, but limited by
643 the goal of characterizing existing Sanskrit. Hence it is prima facie possible to use the
644 grammar’s metarules to formulate rules for numeric or computational tasks, or symbolic
645
646
21
647 Limiting computational power of grammars was noted as early as Chomsky 1963, p. 359. On linguistic completeness and
mathematical modesty, see Culicover 2004, Pullum and Scholz 2005 and Pullum 2011. Another characterization of a language
648 plus its grammatical rules, with minimal computational assumptions, is that of a ‘structured inventory of symbolic units’
649 (Langacker 1999, p. 73; Tomasello 2003, p. 105) with rules themselves being yet more constructions. For that approach
650 applied to P¯anini, see Houben 2009.
˙
14 J. Kadvany
651 manipulations of formal systems generally. The basic historical observation is that P¯anini’s
652 grammar, while not a formalism, includes a modern formalism constructed from the˙ nat-
653 ural language it takes as its idealized object. In this way, P¯anini’s grammar, including its
654 metalinguistic apparatus, includes the earliest known computing ˙ language, created by gen-
655 eralizing grammatical devices of Sanskrit itself. The parallel between a modern computing
656 language, or formalism, and P¯anini’s grammar can be thought of in terms his four major
657 ˙
functional components: (i) the rewrite formalism by which Sanskrit expressions are ulti-
658 mately constructed; (ii) the metalinguistic paribh¯asa¯ rules guiding those operations; (iii)
659 the finite inventory of phonemes, stems and roots ˙to which rules initially apply; (iv) the
660 versified s¯utras codifying all the rules in reduced form. The s¯utra formulation of the gram-
661 mar can be compared to a computing language summarized in a terse programing manual
662 intended for a certain class of machines and their programers. Here the machine is that of
663 oral recitation, not inscription, and the programers are ancient linguists or grammarians.
664 It can be hazardous to project contemporary mathematical ideas into its distant history,
665 but much evidence shows that such is not the case here in attributing understanding of
666 advanced formal methods to ancient Indian linguists, heirs to a centuries-long algorithmic
667 traditions of ritual description and analysis.22 P¯anini shows broad mastery of Post’s rewrite
668 ˙
technique, including the formulation of context-sensitive rules as a special case, and an
669 understanding of many critical metalinguistic steps. Neither P¯anini nor his contemporaries
670 had an idea of universal computation, nor would anyone else for˙ millennia. P¯anini’s gram-
671 mar as a whole is not a computing language, nor a Post rewrite system. P¯anini ˙ is unique
672 ˙
and mostly a linguist, with his formalism a handmaiden to that role. But P¯anini practiced
673 ˙ rediscov-
modern rewrite methods, in their basics, with facility; then Post, millennia later,
674 ering rewrite techniques, conjectured the method is completely general and proved that is
675 so. Post’s methods today are also no marginal curiosity, but are ubiquitous in programing
676 theory and design.
677
678 4. The phonemic hypothesis
679 Given our emphasis on P¯anini’s grammar as an extension of spoken Sanskrit, a con-
680 clusion is in order on the role˙ of inscription in P¯anini’s grammar and, more generally, in
681 formalisms such as computing languages and some˙ modern grammars.
682 The status of P¯anini’s grammar vis à vis ancient literacy versus orality has long been
683 the subject of some˙debate. Staal proposed decades ago that linguistic concepts preceding
684 P¯anini’s work were the product of an orally dominant culture (Staal 1990, pp. 37, 371), one
˙
lacking expertise with writing, though there is no fundamental evidence for just how the
685
686 ´
grammar was designed and refined. The complexity of the codified lists of the Sivas¯ utras,
687 or the matrix-like sup and tin˙ word classifications mentioned above, should make one
688 wary of any judgment based on tradition alone. Dissenting from Staal, the anthropologist
689 Jack Goody argued that stratified lists, tables and related analytic concepts of moderate
690 complexity require inscriptional technology (whether arithmetical, linguistic or a mix) for
691 facile manipulation and consistent accuracy (Goody 1987, ch. 10). P¯anini’s grammar, once
˙
created, is formulated for recitation and the expression of spoken Sanskrit. But it is still
692
693 possible that writing played a critical role in the design and formulation of the grammar,
694 left behind for ideological and institutional reasons regarding how the grammar was to be
695 reproduced across generations and continued as a cultural enterprise.23 A first question to
696 ask is whether there are further reasons to believe that P¯anini’s grammar could or could
˙
697
698 22
See notes 5, 10 and text above.
699 23
Sanskrit is ‘a language of the gods in the world of men’ (Pollack 2006, ch. 1), with V¯ac in the Rig Veda being language
700 and a goddess manifested through proper language use, attainable through rule-oriented methods to protect against incorrect
P¯anini’s Grammar and Modern Computation 15
˙
701 not have been developed as the product of an oral tradition with no or virtually no inscrip-
702 tional skills. A second question is what the answer could mean for modern computation,
703 given the expression of formal methods, in P¯anini, as an extension of Sanskrit speech. The
704 proposal will be that P¯anini’s grammar must have˙ relied on alphabetic writing for its elabo-
705 rate segmented structure. ˙ The reasons cited, from modern ideas about writing systems, will
706 suggest the further conclusion that all generative computing languages, and modern sym-
707 bolic formalisms built on a finite discrete symbolic inventory, implicitly involve principles
708 of alphabetic writing.
709 A start toward seeing why P¯anini’s grammar almost certainly used inscriptional aids,
710 specifically alphabetic writing, in˙ its formulation comes from the study of the nonliterate
711 oral traditions and the introduction of writing systems. In the West, Homer’s Iliad and
712 Odyssey are famous examples of extensive works originally learned through repeated per-
713 formances lacking a standardized written form. For centuries before the Greeks adopted
714 the Phoenician alphabet for their own language, around the eighth century BC, Greece had
715 been a nonliterate culture. For works like Homer’s, recitation and recreation was entirely
716 different from how that can occur when writing is available. The classicist Milman Parry
717 identified the mnemonic role for Homer’s metrical structure and the use of standardized
718 mnemonic formulas: the ‘wine-dark sea’, ‘swift-footed Achilles’, ‘long-dressed’ Helen
719 and so forth. While not referring to a standardized text, varied Homeric ‘epithets’ could
720 be interpolated as needed in poetic recitation, either to fit existing verses or as lead-ins
721 for the singer’s improvization (Foley 1988, ch. 2). This is one means through which the
722 epics could be transmitted across generations, with some faithfulness, in spite of there
723 being no independent ‘original’ version to refer to, only individual performances. Without
724 operational criteria for defining what counts as the same or different in poetic verses, the
725 mnemonic stability provided by writing appears to have had no equivalent substitute.
726 More radically, in their joint field work with bards from the former Yugoslavia, Parry
727 and his student Albert Lord found that notions such as poetic lines, beginnings and endings,
728 and even separate words, were not easily grasped by these nonliterate singers, who were
729 also expert at reciting long traditional verse. What members of a literate culture readily
730 identify as structural features of spoken language did not appear to be so easily available
731 to those lacking experience with inscriptional methods. Relevant to P¯anini, Lord argued
732 ˙
for the difficulty, if not the impossibility, of formulating various grammatical categories
733 and distinctions in a purely oral tradition for which segmented language patterns are not
734 apparent. Lord says of the Yugoslav ‘guslars’ he and Parry lived with that:
735
736 When asked what a word is, he will reply that he does not know, or he will give a
737 sound group which may vary in length from what we call a word to an entire line of
738 poetry, or even an entire song. The word for ‘word’ means an ‘utterance’. When the
739 singer is pressured then to say what a line is, he, whose chief claim to fame’s that
740 he traffics in lines of poetry, will be entirely baffled by the question, or he will say
741 that since he has been dictating and has seen his utterances being written down, he
742 has discovered what a line is, although he did not know it as such before, because
743 he had never gone to school. (Lord 1960, p. 25)
744
745 The suggestion, followed up by later anthropologists such as Goody, is that writing pro-
746 vides cognitive support critical not just to consistent memorization and reproduction in
747 the oral register, but to the formulation of segmented grammatical categories themselves,
748
749 expression. The idealized role for speech meant that linguistic theory itself had to be unpolluted by extra-Sanskrit and extra-
750 oral ingredients, especially writing.
16 J. Kadvany
751 comparable to the bards’ challenges with linguistic categories of ‘lines’, ‘verses’ or
752 ‘words’. That is evidently relevant to P¯anini’s grammar with its explicit reliance on dis-
753 ˙
crete phonemic versions of continuous speech, not to mention more elaborate grammatical
754 categorizations.
755 The Greeks devised their alphabet by adopting the Phoenicians’ writing system, devel-
756 oped for their Semitic language, to the Indo-European sounds and grammatical patterns
757 found in Greek. Until the Phoenicians (or perhaps related Semitic speakers), writing sys-
758 tems relied on signs for syllables or concepts directly, through syllabic signs or logograms,
759 often combined together. These varied writing systems all involve some implicit gram-
760 matical theory of speech represented: through logograms that people, ordinary objects,
761 categories and processes are represented through speech; and through syllabograms that
762 speech is composed of linearly ordered molecular sound segments.24 Until the alpha-
763 bet, the implicit analytical units did not make exclusive use of phonemes, approximated
764 by consonants and vowels as productive elementary sounds. For comparison, Sumerian
765 writing is likely the earliest writing system for a whole language, and was weighted rel-
766 atively heavily toward logograms, like to represent the sun, or also god and sky, with
767 some phonographic representation of syllables.25 Sumerian was agglutinative, with most
768 words monosyllabic, and suffixed or prefixed morphemes ‘glued’ directly onto a root word
769 without additional inflectional changes. Hence this form of writing could work reason-
770 ably well for predominantly word-morpheme-syllabic sound groups, and even though that
771 ended up requiring many hundreds of cuneiform signs. The writing was prominent for
772 some 1300 years, up until about 1900 BC. Administrative or temple settings, and pub-
773 lic proclamations, helped to infer logographic meanings inferred from context. When
774 the Akkadians, who finally conquered Sumer, adapted Sumerian writing for their own
775 inflected, and grammatically quite different, Semitic language, they were necessarily led to
776 expand the inventory of syllabograms to represent many sounds impossible in Sumerian.
777 For the Akkadians, the ‘theory’ of language did not fundamentally change and did not fit
778 the new target language so very well either.
779 The Phoenicians’ Semitic language used consonantal roots, similar to Arabic ktb for
780 write, srb/drink, qbr/ bury. Roots are given syntactic roles by adding vowels ‘inside’, as
781 in k¯atib/writer, kutt¯ab/writers, kataba/he wrote. Vowels are not important for signaling
782 lexical differences, as English dog/dig or ten/tan, so only using consonants for writing
783 could still work well in typical ancient communication contexts. Bi- or tri-consonants, like
784 br and spr, could also be constructed without new signs, something not possible with a
785 syllabary, and diacritical marks, like a superscript , were also used to mark vowels. In
786 this way, the Phoenician system is close to a alphabet based on signs for consonants and
787 vowels. With that different (implicit) linguistic model, the writing system can be adapted
788 to sounds and sound groups of any spoken language, quite unlike a syllabary. The innova-
789 tion of Phoenician consonantal/alphabetic writing was the implicit discovery that language
790 sounds needed for any language can be represented as combinations of consonant and
791 vowel sounds.26 The problem of ‘translation’ experienced by the Akkadians was mostly
792 dissolved. The alphabet, in this way, is the means by which duality of patterning, or the
793
794
24
795 On writing systems as implicit linguistic models, see Coulmas 2003 (p. 139) and Olson 1994 (ch. 12).
25
With the writing of whole sentences, some signs were also used as determinatives to mark some another sign’s category: so
796 signs for ‘man’ or ‘woman’ could determine the gender of a name, or using a sign for ‘wood’ added to a sign for ‘plough’
797 could indicate the tool rather ploughing as an activity. The rebus principle is a simple way to create phonograms, like using a
798 picture of a sun to sound out /son/ in English.
26
Gelb 1952 (ch. 4) argues that Phoenician writing functioned as a syllabary with vowels marked only in an ‘irregular and
799
sporadic fashion’ (p. 182).
800
P¯anini’s Grammar and Modern Computation 17
˙
801 construction of meaningful language components from a structured finite set of mean-
802 ingless elements, is first implicitly expressed as a universal and non-ad hoc linguistic
803 principle.27 The alphabet takes advantage of the ‘recognized fact for millennia that there
804 exists two complementary classes of speech sounds, consonants and vowels’ (Coulmas
805 2003, p. 109). This is the linguistic reason alphabets are such a useful cognitive technology,
806 and among the greatest inventions ever.
807 In contrast to neighboring Semitic languages, Greek needed vowels to discriminate
808 many words, and ways to mark syntactic roles through both affixing and inflection. Vowels
809 were also needed in starting positions of words, while that did not occur for Phoenician.
810 The solution for the Greeks was to add signs for vowels, using some unneeded Phoenician
811 letters where the associated Phoenician sounds did not appear in Greek. But having done
812 that, what was true for the Greeks would hold for most, if not all, of the world’s languages,
813 meaning to represent phonemic structure using consonants and vowels as proxies for place
814 and manner of sound formation, with the latter being understood by ancient Indian linguists
815 as in Table 1. With that change, the Greeks’ Phoenician letters (phoinikeia grammata),
816 as they called their alphabet, is a writing system whose basis is formed by meaningless
817 graphic signs mapped onto meaningless speech signs which approximate Greek phonol-
818 ogy. Plato himself notes in the Theaetetus that the consonant s is ‘a mere sound like a
819 hissing of the tongue. B again has neither voice nor sound, and that’s true of most letters’
820 (Theaetetus 203b in Burnyeat 1990, p. 340, emphasis added).
821 The C + V abstraction represents Greek or other speech sounds with sufficient accuracy
822 for speech and its grammar to be efficiently bootstrapped into written form, then finessed
823 as on its own terms using word breaks, punctuation and an amplified written grammar*,
824 so to speak. Grammatical structure of the target language need no longer lead to hun-
825 dreds of extra signs, as it did for Sumerians and Akkadians; nor some fundamentally new
826 model of linguistic analysis on which to base a writing system. Alphabets work because
827 natural languages, while ‘conventional’, are far from totally arbitrary in their sign sets.
828 Speech sounds are limited by the human vocal apparatus, with Indian linguists appar-
829 ently the first to explicitly identify their language’s phonemes in that way. At the same
830 time, the study of oral traditions suggests that the segmentation of speech patterns for an
831 entire language needs a writing system for that segmentation to be reasonably successful.
832 The Indian linguists, even before P¯anini, also were conscious of the differences between
833 continuous speech (samhit¯a) and its˙ description through a grammar using discrete ele-
834 ments (padap¯atha). Hence˙ the question of whether inscription was needed for constructing
835 ˙
P¯anini’s grammar involves some of the most advanced linguistic knowledge found in the
836 ˙
ancient world, far more than the ‘lines’ or ‘words’ of poetic verse.
837 For purposes of this paper, the proposal that writing systems are essential for the facile
838 perception and manipulation of segmented phonemic patterns will be called the phonemic
839 hypothesis. That narrows the proposals of Lord, Parry and Goody to a necessary role for
840 alphabetic writing to conceptualize phonemes as linguistic building blocks. The power of
841 alphabetic writing, as noted, is that it implicitly internalizes duality of patterning as realized
842 across natural languages, namely through the approximation of a complete phoneme set
843 using consonants and vowels. The phonemic hypothesis is a converse to that, meaning that,
844 alphabetic inscriptional aids are needed to identify, classify and combine these sound forms
845 with facility. The historical writing systems are examples of how writing involves some
846 implicit model of language structure, through syllabograms, logograms, phonographic
847 signs and their combined use. In all cases the representation of language is enabled by
848
849
27
850 On duality of patterning and writing, see Sampson 1985 (ch. 2).
18 J. Kadvany
851 fixing the essential temporal nature of speech through the spatial stability and comparative
852 objectivity of graphic signs. But only an alphabetic rendering induces sufficient order
853 through phonemic sound groups so that morphemes and other segmented grammatical pat-
854 terns are readily transferred from speech to graphics. Alphabetic writing expresses duality
855 of patterning by transferring the stability of inscribed signs to the transient and rapidly
856 fading flow of speech, and then efficiently inheriting and amplifying spoken grammatical
857 patterns back in script, whether in clay, papyrus or other media.28 The phonemic hypothesis
858 then is an alternative to direct evidence for the use of writing in the composition of P¯anini’s
859 ´ ˙
grammar, given the ubiquitous role of phonemes through the Sivas¯ utras, their roles as con-
860 trolling and classificatory markers, and the detailed formulation of sandhi/phonological
861 rules.
862 Three kinds of evidence support the phonemic hypothesis in addition to the historical
863 and anthropological works mentioned. First is that discrete phonemic sounds have not been
864 found to correlate with any physical signature in the waveforms of continuous speech. Iso-
865 lated vowel or consonant sounds do show characteristic patterns, but in connected speech
866 sounds are produced rapidly, influencing one another and causing boundaries to smear
867 together. Upon hearing different instances of a word we can recognize them as ‘the same’,
868 but the physical waveforms can be far from identical. For example, reversing a word’s
869 physical sound pattern, like that of dog to god, leads to an unintelligible result. Words dif-
870 fering only by a single sound, like /cap/ versus /cab/ will have physical differences spread
871 further than at the single place changed (Crystal 1987, pp. 132ff.). Hence as recognized
872 by Indian linguists, the characterization of speech into discrete segments is a considerable
873 idealization of cognitively stereotyped sound patterns of continuous speech. The general
874 finding is that it is ‘impossible in general to disarticulate phonological representations into
875 a string of non-overlapping units’ (Coulmas 2003, p. 89).
876 A second type of evidence for the phonemic hypothesis includes controlled follow-up
877 studies on the Lord-Parry field work. In a 1986 study, dozens of Portuguese adult volun-
878 teers, half of them nonliterate and the other half newly trained readers, were asked to play
879 speech games involving removing or adding sounds to words. The results were that non-
880 literates failed in tasks requiring attention at the phoneme level, even though they could
881 discriminate other speech sounds. Problems occurred, for example, when asked whether
882 the same phonemes recurred at different places within words, or when asked to swap
883 sounds in a word (Morais et al. 1986). Similar experiments show the difficulties nonlit-
884 erates have in identifying morphemes and correct syntax (Scholes and Willis 1991). Third
885 and finally as evidence for the phonemic hypothesis, there are clinical and neurophysiolog-
886 ical theories relating phonemic awareness to reading ability. Stanislas Dehaene has argued
887 that in child development, the mastery of letters and the understanding of phonemes
888
889
890 are so tightly linked that it is impossible to tell which comes first, the grapheme or
891 the phoneme – both arise together and enhance each other . . . .the relation between
892 grapheme and phoneme development is probably one of constant reciprocal inter-
893 action . . . When we learn the alphabet, we acquire the new ability to carve speech
894 into its elementary components. We become aware of the presence of phonemes
895 in what initially sounded like a continuous speech stream. The well-read acquire a
896
897 28
For duality, the phone [p] is a sound form regardless of its functional role in any language. The phoneme /p/ has an additional
898 functional role in discriminating morphemes and words in the shared context of some language’s phoneme set and its nor-
899 mative phonological rules. A given phone may be a phoneme in one language but not in another, or follow different rules if
900 present in both.
P¯anini’s Grammar and Modern Computation 19
˙
901 universal phonemic code that facilitates the storage of speech sounds in memory,
902 even if they are meaningless. (Dehaene 2009, pp. 202, 208)29
903
Dehaene’s neuropsychological model is that facile reading of graphic signs relies on the
904 brain’s ability to ‘recruit’ neural areas associated with skills of line, edge and vertex pat-
905
tern recognition which, outside of reading, facilitate physical object identification across a
906 range of scales and spatial translations.30 The evolution of reduced sign systems from pic-
907 tograms, such as happened with cuneiform, exploits this ability through development of
908
neural associations of graphic signs with spoken language elements and their grammatical
909 or conceptual roles. This may explain reading deficits of dyslexia, reflected in single-word
910 decoding, as due to impairments in grapheme–phoneme conversion. The positive conclu-
911
sion, for Dehaene, is that it is a contingent fact of our plastic neural anatomy that we have
912 writing systems, and facile recognition of phonemes, in any moderately sophisticated sense
913 at all.
914
With this evidence for the phonemic hypothesis, the null hypothesis regarding P¯anini’s
915 grammar should be that its formulation likely made use of alphabetic writing, even ˙ as
916
the larger Indian culture was at the time nonliterate. Anything to the contrary would be
917
a dramatic refutation of modern research on the psychology of phonemes and alphabetic
918 writing. That is nonetheless consistent with the finished product, P¯anini’s grammar proper,
919 ˙
being formulated for speakers facile with phonemic analysis of Sanskrit, and with speech
920
being the grammar’s home media and its s¯utra-driven derivations.
921 As far as writing goes in India, the Br¯ahm¯ı script originated around 300 BC, so per-
922
haps even the same century as P¯anini’s grammar. The script marks vowels using diacritics
923 ˙ design codes place and manner of sound articulation
rather than letters, but its graphical
924 in the vocal apparatus, much as understood by Vedic linguists centuries earlier. Given that
925
Greek alphabetic writing was invented by the eighth century, following by centuries well-
926 developed writing systems and neo-alphabets of the Middle East, the use of Indian script
927 several centuries later is not implausible. Even if Indian writing emerged independently
928
from Semitic and Greek systems, early Indian linguists could have relied on it to model
929 speech, later discarding the inscriptional apparatus when the oral formulation was suffi-
930 ciently codified through versified and memorable s¯utras. Presumably versions of the vrtti
931 ˙
commentary used today to interpret s¯utras as rules existed in P¯anini’s time. The gram-
932 ˙
mar’s s¯utras are ‘first’ in describing the grammar today but would have been ‘last’ in
933 the grammar’s construction as a compact distillation of rules in more useful vrtti form.31
934
Unfortunately we may never know just what inscriptional technology may have˙ been used
935 in ancient Indian linguistics, especially given the ideological rejection of writing as pol-
936
luting. Even with that, it is possible that the use of graphic techniques was followed by a
937
938
939 29
A main and subtle point of Olson 1994 (p. 85) is to neither over- nor under-attribute the contribution of writing to phonemic
940 30
awareness and understanding.
These geometrical transformations are also ones for which we can recognize graphemes as representing the ‘same’ letter, such
941
as through font size changes.
942 31
Deshpande 2011 addresses many internal features of P¯anini’s grammar relevant to possible inscriptional help and intrinsi-
˙
943 cally oral formulations both, arguing that while some types of writing may have been known to P¯anini and used as an aid,
˙
944 the grammar’s oral conventions, particularly metalanguage markers using vowels or accents, would have been difficult to
represent in script; see also Scharfe 2009 (p. 69). For comparison, Knox 1990 (pp. 16–19) argues that writing likely aided
945
composition of our versions of the Iliad, even as the verses were still designed for recitation and using traditional metrical
946 and mnemonic forms. The last oral versions were therefore augmented by inscriptional help, the word processing of its time.
947 That conjecture, Knox argues, explains anomalies in epic structure and the implausibility of completely oral composition for
948 the work we know. A comparable process may have occurred with the construction of P¯anini’s s¯utras and their composition
˙
949 from early vrttis. Kiparsky 1980 (p. 240) suggests that P¯anini’s great interpreters, K¯aty¯ayana and Patañjali, may have known
˙ ˙
the grammar ‘not as living oral tradition, but in the form of a manuscript, and that whatever vrtti went along with it was of
950 ˙
secondary origin, and considered as such by them’.
20 J. Kadvany
951 purification ceremony accompanying memorialization in speech. All that notwithstanding,
952 P¯anini’s grammar is still an organic extension of spoken Sanskrit, just one possible only
953 via˙ alphabetic writing for the conceptualization of phonemes, their new role as auxiliary
954 markers, and the generative products so created.
955 In conclusion, we note the modern idea that computation can be expressed in any media
956 you like, with software an abstraction independent of any hardware implementation. P¯anini
957 is almost an historical example of just that media freedom, as his grammar is formulated ˙
958 for orally expressed, spoken Sanskrit. But according to the phonemic hypothesis that oral
959 formulation must have relied on lost inscriptional aids. A similar dependence of segmen-
960 tation skills on the duality principles grounding alphabetic writing then must also be true
961 of modern symbolic calculi, whether formal logics or computing languages. Modern com-
962 puting languages, like structured grammars, require the tiered, hierarchical structures of
963 symbolic forms found first in P¯anini. That power requires a systematic approach to duality
964 ˙
of patterning, like that of alphabets, which then can be applied to written language and
965 formal systems too. The modern notion of a formal metalanguage requires the inherently
966 metalinguistic tools of an alphabet or its equivalent to get started at all. This basis is taken
967 for granted in Frege’s 1879 Begriffsschrift, or ‘concept-script’32 ; in the classic computing Q4
968 paradigms of Post and Turing with their explicit inscriptional metaphors; and in computing
969 languages and modern formal systems generally. Such a basis was almost surely used by
970 P¯anini, his grammar’s formalism being the earliest historical example of the kind ubiqui-
971 ˙ today in computer science and mathematical logic. Nonetheless, P¯anini showed, by
tous
972 constructing a whole formal language through the affixing resources of the˙ Sanskrit object
973 language itself, that the differences between natural and artificial computing languages are
974 smaller than often thought. Not because natural languages are, or are close to being, com-
975 puting languages, but because the development of computing languages, whether ancient
976 or modern, is a continuation of natural language constructions by their own means.
977
978
979 References
980 Aitchison, J. 2001. Language Change: Progress or Decay? 3rd ed., Cambridge: Cambridge University Press.
981 Backus, J. 1959. ‘The syntax and semantics of the proposed international algebraic language of the Zurich ACM-
GAMM conference’, in Proceedings of the International Conference on Information Processing, Paris:
982 UNESCO, June 1959, pp. 125–32.
983 Backus, J. 1980. ‘Programming in the 1950s – some personal impressions’, in N. Metropoliset al., A History of
984 Computing in the Twentieth Century, New York: Academic Press.
Bloomfield, L. 1935. Language, London: George Allen & Unwin. Q5
985 Brinton, L., and Traugott, E. 2005. Lexicalization and Language Change, New York: Cambridge University
986 Press.
987 Brough, J. 1951. ‘Theories of general linguistics in the Sanskrit grammarians’, in J. F. Staal, A Reader in the
Sanskrit Grammarians, Cambridge, MA: MIT Press, pp. 402–14.
988 Burnyeat, M., ed. 1990. The Theaetetus of Plato, trans. M. J. Jevett, Cambridge: Hackett.
989 Cardona, G. 1988. P¯anini: His Work and Its Traditions, Vol. 1, Delhi: Motilal Banarsidrass.
Cardona, G. 2009. ‘On ˙ the structure of P¯anini’s system’, in G. Huet, A. Kulkarni, and P. Scharf, Sanskrit
990 ˙
Computational Linguistics, Lecture Notes 5402, Berlin: Springer-Verlag, pp. 1–32.
991 Chomsky, N. 1963. ‘Formal properties of grammars’, in R. D. Luceet al., Handbook of Mathematical Psychology
992 II, New York: John Wiley and Sons.
993 Chomsky, N. 1965. Aspects of the Theory of Syntax, Cambridge: MIT Press.
Coulmas, F. 2003. Writing Systems: An Introduction to Their Linguistic Analysis, New York: Cambridge
994 University Press.
995 Crystal, D. 1987. The Cambridge Encyclopedia of Language, New York: Cambridge University Press.
996
997 32
Frege 1997, 1879 (pp. 49–51) comments on the relation of his new Begriffsschrift to language, but not writing per se; the
998 translation ‘ideography’ in van Heijenoort 1967 (pp. 6–7) for Begriffsschrift is then potentially misleading. Frege’s labeling
999 his system a ‘script’ is wholly appropriate but can today be reconsidered in light of the historical development of writing
1000 systems and their linguistic analysis.
P¯anini’s Grammar and Modern Computation 21
˙
1001 Culicover, P. 2004. ‘The Cambridge English grammar’, Review of R. Huddleston and G. Pullum, eds., Language,
1002 80(1), 127–41.
Davis, M., Sigal, R., and Weyuker, E. 1994. Computability, Complexity, and Languages: Fundamentals of
1003 Theoretical Computer Science, 2nd ed., Boston, MA: Academic Press.
1004 Dehaene, S. 2009. Reading in the Brain: The Science and Evolution of a Human Invention, New York: Viking.
1005 Deshpande, M. M. 2011. ‘From orality to writing: transmission and interpretation of P¯anini’s Asta¯ dhy¯ay¯ı’, in Le
˙ ˙˙
1006 Symposium International Le Livre. La Roumanie. L’Europe 2010 vol. III, Bucharest: Éditeur Bibliothèque
de Bucarest, pp. 57–100.
1007 Deutscher, G. 2005. The Unfolding of Language, New York: Metropolitan Books.
1008 Foley, J. M. 1988. The Theory of Oral Composition: History and Methodology, Bloomington: Indiana University
1009 Press.
Frege, G. 1997. ‘Begriffsschrift’, trans. M. Beaney, in M. Beaney, The Frege Reader, New York: Blackwell, pp.
1010 47–78 (first published 1879 in German).
1011 Gelb, I. J. 1952. A Study of Writing, rev. 1962, Chicago, IL: University of Chicago Press.
1012 Gillon, B. 2007. ‘P¯anini’s Asta¯ dhy¯ay¯ı and linguistic theory’, Journal of Indian Philosophy, 35(5), 445–68.
Goody, J. 1987. The ˙Interface ˙ ˙ Between the Written and the Oral, New York: Cambridge University Press.
1013 van Heijenoort, J., ed. 1967. From Frege to Gödel: A Sourcebook in Mathematical Logic, Cambridge: Harvard
1014 University Press.
Q6 1015 Horowitz, E., ed. 1983. Programming Languages: A Grand Tour, Rockville, MD: Computer Science Press.
Houben, J. E. M. 2009. ‘P¯anini’s grammar and its computerization: a construction grammar approach’, in A.
1016 Kulkarni and G. Huet,˙ Sanskrit Computational Linguistics, Lecture Notes 5406, Berlin: Springer-Verlag,
1017 pp. 6–25.
1018 Huet, G., Kulkarni, A., and Scharf, P., eds. 2009. Sanskrit Computational Linguistics, Lecture Notes 5402, Berlin:
Q7 Springer-Verlag.
1019 von Humboldt, W. 1999. On Language: The Diversity of Human Language Construction and Its Influence on the
1020 Mental Development of the Human Species, ed. M. Losonsky and trans. P. Heath, New York: Cambridge
1021 University Press (first published 1836 in German).
Q8 Ingerman, P. 1967. ‘P¯anini Backus form suggested’, Communications of the ACM, 10(3), 137.
1022 Jakobson, R. 1990. On˙ Language, eds. L. Waugh and M. Monville-Burston, Cambridge: Harvard University
Q9 1023 Press.
1024 Joshi, S. D. 2009. ‘Background of the Asta¯ dhy¯ay¯ı’, in G. Huet, A. Kulkarni, and P. Scharf, Sanskrit Computational
Linguistics, Lecture Notes 5402,˙ ˙ Berlin: Springer-Verlag, pp. 1–5.
1025 Kadvany, J. 2007. ‘Positional value and linguistic recursion’, Journal of Indian Philosophy, 35(5), 487–520.
1026 Kiparsky, P. 1980. P¯anini as a Variationist, ed. S. D. Joshi, Cambridge: MIT Press.
1027 Kiparsky, P. 2005. ‘P¯a˙ ninian linguistics’, in E. F. K. Koerner and R. E. Asher, Concise History of the Language
˙
Sciences, Cambridge: Pergamon/Cambridge University Press.
1028 Kiparsky, P. 2007. ‘P¯anini’s razor’, Paris, Lecture Notes. http://web.stanford.edu/ kiparsky/
1029 Kiparsky, P. 2009. ‘On˙ the architecture of Panini’s grammar’, in G. Huet, A. Kulkarni, and P. Scharf, Sanskrit
1030 Computational Linguistics, Lecture Notes 5402, Berlin: Springer-Verlag, pp. 33–94.
Q10 Knox, B. 1990. ‘Introduction’, in The Iliad, trans. R. Fagles, New York: Viking Penguin, pp. 3–64.
1031 Kulkarni, A., and Huet, G., eds. 2009. Sanskrit Computational Linguistics, Lecture Notes 5406, Berlin: Springer-
Q11 1032 Verlag.
1033 Langacker, R. W. 1999. The Foundations of Cognitive Grammar: Volume I: Theoretical Prerequisites, Stanford:
Stanford University Press.
1034 Lord, A. 1960. The Singer of Tales, Cambridge: Harvard University Press.
1035 Minsky, M. 1967. Computation: Finite and Infinite Machines, New York: Prentice-Hall.
1036 Mishra, A. 2009. ‘Simulating the P¯aninian system of Sanskrit grammar’, in G. Huet, A. Kulkarni, and P. Scharf,
˙
Sanskrit Computational Linguistics, Lecture Notes 5402, Berlin: Springer-Verlag, pp. 127–38.
1037 Morais, J., Bertelson, P., Cary, L., and Alegria, J. 1986. ‘Literacy training and speech segmentation’, Cognition,
1038 24(1–2), 45–64.
1039 Naur, P.et al. 1963. ‘Report on the algorithmic language ALGOL 60’, in E. Horowitz, Programming Languages:
Q12 A Grand Tour, Rockville, MD: Computer Science Press, pp. 44–60.
1040 Olson, D. 1994. The World on Paper, New York: Cambridge University Press.
Q13 1041 Olson, D., and Torrance, N., eds. 1991. Literacy and Orality, New York: Cambridge University Press.
1042 Ostler, N. 2005. Empires of the Word, New York: Harper Collins.
Petersen, W. 2004. ‘A mathematical analysis of P¯anini’s Sivas¯´ utras’, Journal of Logic, Language and Informa-
1043 tion, 13(4), 471–89. ˙
1044 Pollack, S. 2006. The Language of the Gods in the World of Men: Sanskrit, Culture, and Power in Premodern
1045 India, Berkeley: University of California Press.
Post, E. 1943. ‘Formal reductions of the general combinatorial decision problem’, American Journal of
1046 Mathematics, 65(2), 197–215.
1047 Priestley, M. 2011. A Science of Operations: Machines, Logic and the Invention of Programming, London:
1048 Springer-Verlag.
Pullum, G. 2011. ‘On the mathematical foundations of Syntactic Structures’, Journal of Logic, Language and
1049 Information, 20(3), 277–96.
1050
22 J. Kadvany
1051 Pullum, G., and Gazdar, G. 1982. ‘Natural languages and context-free languages’, Linguistics and Philosophy,
1052 4(4), 471–504.
Pullum, G., and Scholz, B. 2005. ‘Contrasting applications of logic in natural language syntactic description’, in
1053 Petr Hájek et al., Logic, Methodology and Philosophy of Science: Proceedings of the Twelfth International
1054 Congress, London: King’s College Publications, pp. 481–503.
1055 Renou, L. 1941. ‘Les connexions entre le rituel et la grammaire en sanskrit’, in J. F. Staal, A Reader in the Sanskrit
Grammarians, Cambridge, MA: MIT Press, pp. 435–69.
1056 Sampson, G. 1985. Writing Systems, Stanford: Stanford University Press.
1057 Scharf, P. 2009. ‘Modeling P¯aninian grammar’, in G. Huet, A. Kulkarni, and P. Scharf, Sanskrit Computational
˙ 5402, Berlin: Springer-Verlag, pp. 95–126.
Linguistics, Lecture Notes
1058
Scharfe, H. 2009. ‘A new perspective on P¯anini’, Indologica Taurinensia: Online Journal of the International
1059 ˙
Association of Sanskrit Studies, 35, 1–270. http://www.indologica.com/index-volume35.asp
1060 Scholes, R., and Willis, B. 1991. ‘Linguists, literacy and the intensionality of Marshall McLuhan’s Western man’,
1061 in D. Olson and N. Torrance, Literacy and Orality, New York: Cambridge University Press, pp. 215–35.
Sharma, R. N. 1987. The Asta¯ dhy¯ay¯ı of P¯anini I: Introduction to the Asta¯ dhy¯ay¯ı as a Grammatical Device, New
1062 ˙˙
Delhi: Munshiram Manoharlal. ˙ ˙˙
1063 Staal, J. F. 1965a. ‘Euclid and P¯anini’, in J. F. Staal, Universals: Studies in Indian Logic and Linguistics, Chicago,
1064 IL: University of Chicago˙ Press, pp. 143–60.
Staal, J. F. 1965b. ‘Context-sensitive rules in P¯anini’, in J. F. Staal, Universals: Studies in Indian Logic and
1065 Linguistics, Chicago, IL: University of Chicago˙ Press, pp. 171–80.
1066 Staal, J. F., ed., 1972. A Reader in the Sanskrit Grammarians, Cambridge, MA: MIT Press. Q14
1067 Staal, J. F. 1975. ‘The concept of metalanguage and its Indian background’, Journal of Indian Philosophy, 3(3),
315–54.
1068 Staal, J. F. 1988. Universals: Studies in Indian Logic and Linguistics, Chicago, IL: University of Chicago Press.
1069 Staal, J. F. 1990. Ritual and Mantras: Rules Without Meaning, Delhi: Motilal Banarsidass.
1070 Staal, J. F. 1995. ‘The Sanskrit of science’, Journal of Indian Philosophy, 23(1), 73–127.
Staal, J. F. 2008. Discovering the Vedas: Origins, Mantras, Rituals, Insights, Kundli: Penguin.
1071 Tomasello, M. 2003. Constructing a Language: A Usage-based Theory of Language Acquisition, Cambridge,
1072 MA: Harvard University Press.
1073 Urquhart, A. 2009. ‘Emil post’, in D. M. Gabbay and J. Woods, Handbook of the History of Logic, Vol. 5: Logic
from Russell to Church, Amsterdam: North-Holland.
1074 Williams, M. 1846/2005. An Elementary Grammar of the Sanscrit Language, New Delhi: Cosmo.
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100