ACL-OCL / Base_JSON /prefixI /json /iwpt /1993.iwpt-1.13.json
Benjamin Aw
Add updated pkl file v3
6fa4bc9
{
"paper_id": "1993",
"header": {
"generated_with": "S2ORC 1.0.0",
"date_generated": "2023-01-19T07:34:50.951344Z"
},
"title": "The Use of Bunch Notation in Parsing Theory",
"authors": [
{
"first": "Rene",
"middle": [],
"last": "Leerll1",
"suffix": "",
"affiliation": {},
"email": ""
},
{
"first": "!",
"middle": [],
"last": "Akers",
"suffix": "",
"affiliation": {},
"email": ""
}
],
"year": "",
"venue": null,
"identifiers": {},
"abstract": "Much of mathematics, and therefore much of computer science, is built on the notion of sets. In this paper it is argued that in parsing theory it is sometimes convenient to replace sets by a related notion, bunches. The replacement is not so much a matter of principle, but helps to create a more concise theory. Advantages of the bunch concept are illustrated by using it in descriptions of a formal semantics for context-free grammars and of functional parsing algorithms.",
"pdf_parse": {
"paper_id": "1993",
"_pdf_hash": "",
"abstract": [
{
"text": "Much of mathematics, and therefore much of computer science, is built on the notion of sets. In this paper it is argued that in parsing theory it is sometimes convenient to replace sets by a related notion, bunches. The replacement is not so much a matter of principle, but helps to create a more concise theory. Advantages of the bunch concept are illustrated by using it in descriptions of a formal semantics for context-free grammars and of functional parsing algorithms.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Abstract",
"sec_num": null
}
],
"body_text": [
{
"text": "applied to a bunch of elements that belong to that (Norvell -Hehner, 1992) Norvell -Hehner's (1992) (Dijkstra, 1976) .",
"cite_spans": [
{
"start": 51,
"end": 74,
"text": "(Norvell -Hehner, 1992)",
"ref_id": "BIBREF10"
},
{
"start": 75,
"end": 99,
"text": "Norvell -Hehner's (1992)",
"ref_id": "BIBREF10"
},
{
"start": 100,
"end": 116,
"text": "(Dijkstra, 1976)",
"ref_id": "BIBREF2"
}
],
"ref_spans": [],
"eq_spans": [],
"section": "Subsequently, a new Earley-like recursive-ascent parser is formulated with the same notation. There are two major differences between sets and bunches. One difference is that a bunch with one element is identified with that one element ( the singleton property). Moreover, a function or operator that is defined on some domain may be",
"sec_num": null
},
{
"text": "with one value (a singleton) is determin istic: it can only produce that one value. Therefore: a singleton is identified with its only element.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "The process that corresponds to a bunch",
"sec_num": "1."
},
{
"text": "produces definite values. Therefore: ele ments of bunches can not be bunches with cardinality f:. 1. With these properties, a bunch simultaneously al lows two interpretations. In the set-valued inter pretation it is just a collection of values. In the nondeterministic interpretation one value is ran domly taken out of this collection. Bunches are the result of bunch expressions. ",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "The process that corresponds to a bunch",
"sec_num": "2."
},
{
"text": "A simple bunch expression may be rewritten into an equivalent simple bunch expression using -Sesoft, 1990 ).",
"cite_spans": [
{
"start": 92,
"end": 105,
"text": "-Sesoft, 1990",
"ref_id": "BIBREF11"
}
],
"ref_spans": [],
"eq_spans": [],
"section": "if x and y are simple bunch expressions then xly is a simple bunch expression.",
"sec_num": "3."
},
{
"text": "This is practically all we need to know about bunches. Let us just add some notations:",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "if x and y are simple bunch expressions then xly is a simple bunch expression.",
"sec_num": "3."
},
{
"text": "P t> x di if P then x else null . def . let i \u2022 x = Ai \u2022 x( all)",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "if x and y are simple bunch expressions then xly is a simple bunch expression.",
"sec_num": "3."
},
{
"text": "The bunch all will in general be infinite, so that a function that distributes over it might produce an infinite bunch as well. In our application, how ever, the structure of bunch expressions will be such that let's produce only finite bunches.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "if x and y are simple bunch expressions then xly is a simple bunch expression.",
"sec_num": "3."
},
{
"text": "The following laws are useful for manipulating bunch expressions:",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "if x and y are simple bunch expressions then xly is a simple bunch expression.",
"sec_num": "3."
},
{
"text": "(Pi VA) t> x = (Pi t> x) l (P2 t> x), (3) let i \u2022 (i +-x t> l(i)) = l (x). (4)",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "if x and y are simple bunch expressions then xly is a simple bunch expression.",
"sec_num": "3."
},
{
"text": "In 4it is assumed that i does not occur free in x. These laws are easy to prove: the first two follow from the definition of t> , and the third follows from the distributivity of function appli cation over bunches. Normally, set-valued functions are defined us ing set comprehension according to the schema l (X) = {A(X, Y) l 3 z P(X, Y , Z)},",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "if x and y are simple bunch expressions then xly is a simple bunch expression.",
"sec_num": "3."
},
{
"text": "where P is a predicate, A is a function and X, Y, Z are variables or sets of variables. Now let us define a related bunch-valued function, called lb :",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "if x and y are simple bunch expressions then xly is a simple bunch expression.",
"sec_num": "3."
},
{
"text": "lb = AX \u2022 (letY \u2022 (letZ \u2022 (P(X, Y , Z) t> A(X, Y)))) (6)",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "if x and y are simple bunch expressions then xly is a simple bunch expression.",
"sec_num": "3."
},
{
"text": "It follows that 1 and lb are equivalent if the latter is interpreted as producing a set. A nice aspect of (6) is that its algorithmic content is more explicit than the algorithmic content of (5); because let is defined as a function application to all, it is explicit that (6) involves searching over all values of Y,Z.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "if x and y are simple bunch expressions then xly is a simple bunch expression.",
"sec_num": "3."
},
{
"text": "In this paper we will use a notational conven tion that removes the Ns and the let's from def initions such as (6). Instead of (6) we write ",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "if x and y are simple bunch expressions then xly is a simple bunch expression.",
"sec_num": "3."
},
{
"text": "Lastly, note that (7) is equivalent to fb (X) = 3z(P(X, Y, Z)) t> A(X, Y) . Z in (7) , it is implicitly subject to existential quantification.",
"cite_spans": [],
"ref_spans": [
{
"start": 76,
"end": 84,
"text": "Z in (7)",
"ref_id": null
}
],
"eq_spans": [],
"section": "Thus, whenever an expression P t> x is encoun tered in this paper, with some free variables, its meaning is that all possible values of the free vari ables must be tried to make the guard P true and all results x must be combined in one bunch.",
"sec_num": null
},
{
"text": "for all Yi such that Pi (X, Yi) do result:=result I A1 (X, Yi ) od; for all \ufffd such that P2 ( X, Y2 ) do result:=result I A2 (X, Y2 ) od;",
"cite_spans": [
{
"start": 55,
"end": 63,
"text": "(X, Yi )",
"ref_id": null
}
],
"ref_spans": [
{
"start": 119,
"end": 132,
"text": "I A2 (X, Y2 )",
"ref_id": null
}
],
"eq_spans": [],
"section": "Algorithmic interpretation J(X) = result:=null;",
"sec_num": null
},
{
"text": "for all Yk such that Pk ( X, Yk ) do result:=result I, Ak (X, Yk ) od; return result",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Algorithmic interpretation J(X) = result:=null;",
"sec_num": null
},
{
"text": "The natural semantics of grammars J(X) = Pi (X, Y 1 ) t> A 1 (X, Y1) I",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "In what follows, bunch-valued functions are either known computable fu nctions, or their definitions 3 have the following general format:",
"sec_num": null
},
{
"text": "A formal interpretation of this is that there are two symbols k and l here, that there is some as signment function h from these symbols to num bers, and that the inequalities restrict the possi ble values of h, via h(k) \ufffd h(l) + 3, h(l) \ufffd 5.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "P2 (X, Y2 ) t> A2(X, Y2 ) I where X is a collection of input parameters and Yi are collections of variables subject to let quantifi cation. P i are predicates and A i are bunch-valued fu nctions. Both Pi and Ai may involve other applications of bunch-valued functions. The in tention is that bunches are interpreted as collec tions: bunch-valued functions produce all their results simultaneously. Function f then has a simple algorithmic (imperative) interpretation, which makes use of a bunch-valued variable \"re-Within the family of rewriting systems, context free grammars have a distinguishing property : they have a declarative meaning. This means that a grammar can be understood not only by pro ducing a sample of trial sentences with it, but also by viewing it as a collection of static statements about the language to be defined. This is the un derlying reason for their intelligibility and their usefulness. In the natural interpretation, gram mar symbols are seen as variables over languages and grammar rules as stipulations of relations be tween these variables. A grammar, in this view, is analogous to a collection of arithmetic inequal ities with variables. Take, for instance, the fol lowing inequalities: k \ufffd l + 3, l \ufffd 5.",
"sec_num": null
},
{
"text": "Of course, there are still many functions h that satisfy these constraints but there is one that as signs the smallest possible numbers to the sym bols: h(k) = 8, h(l) = 5.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "P2 (X, Y2 ) t> A2(X, Y2 ) I where X is a collection of input parameters and Yi are collections of variables subject to let quantifi cation. P i are predicates and A i are bunch-valued fu nctions. Both Pi and Ai may involve other applications of bunch-valued functions. The in tention is that bunches are interpreted as collec tions: bunch-valued functions produce all their results simultaneously. Function f then has a simple algorithmic (imperative) interpretation, which makes use of a bunch-valued variable \"re-Within the family of rewriting systems, context free grammars have a distinguishing property : they have a declarative meaning. This means that a grammar can be understood not only by pro ducing a sample of trial sentences with it, but also by viewing it as a collection of static statements about the language to be defined. This is the un derlying reason for their intelligibility and their usefulness. In the natural interpretation, gram mar symbols are seen as variables over languages and grammar rules as stipulations of relations be tween these variables. A grammar, in this view, is analogous to a collection of arithmetic inequal ities with variables. Take, for instance, the fol lowing inequalities: k \ufffd l + 3, l \ufffd 5.",
"sec_num": null
},
{
"text": "A context-free grammar is a four-tuple G = Vr , P, S) x, y.-V r, \ufffd, TJ , p ,(.-V r, A, B.-V N , X, Y.-V, et., /3, 1 ,8,\u00b5, v.- ",
"cite_spans": [],
"ref_spans": [
{
"start": 43,
"end": 53,
"text": "Vr , P, S)",
"ref_id": null
},
{
"start": 54,
"end": 126,
"text": "x, y.-V r, \ufffd, TJ , p ,(.-V r, A, B.-V N , X, Y.-V, et., /3, 1 ,8,\u00b5, v.-",
"ref_id": null
}
],
"eq_spans": [],
"section": "Notation",
"sec_num": null
},
{
"text": "(V N ,",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Notation",
"sec_num": null
},
{
"text": "Equation 9 A --+ et.1 , . .. ,A --+ Ct.k , for the same non terminal, are often abbreviated to A --+ et.1 1 ---let.k . This is very natural here; it means that et.",
"cite_spans": [],
"ref_spans": [
{
"start": 11,
"end": 25,
"text": "A --+ et.1 , .",
"ref_id": null
}
],
"eq_spans": [],
"section": "xLa(B)y = La(x)La(B)La(y) = La(xBy).",
"sec_num": null
},
{
"text": "A rule A --+ (Wadler, 1985) . Note that f \ufffd fS] ( ! ), equivalent to S \ufffd ! , means that ! is a correct sentence. In (11), the argument is split into two parts, the first of which is derivable from a. The second part is output by the function. It follows, for all a and /3 , that [a /3 ]( ! ) = a /3 \ufffd 1/ I\\ ! = 1/P t> P = a \ufffd 1/1 A ! = 1/1 Pl A /3 \ufffd 1/2 /\\ Pl = TJ2P t> p = a \ufffd 1/1 A ! = 1/1 Pl t> ( /3 \ufffd 1/2 /\\ Pl = 1/2P t> p) \ufffd [a]( ! ) t> [ ,8 ]( p1) = [,B]([a]({) ). UHe ) = e I {f} ( J ( e )), (iterative f) UH e ) = e I f ( e ). [a] and [b] , defined in (12) . In other words, the recognition function [a] for regular expression a can be obtained by replacing every grammar symbol X that occurs in it by its function [X] and interpreting all con structors in the regular expression (alternation, concatenation, iteration, optionality) as combi nators of recognition functions. For a detailed exposition of combinator parsing, see (Hutton, 1992) . (Norvell -Hebner, 1992 ) issued a warn ing that higher-order programming with bunch valued functions may lead to paradoxes that were noted by (Meertens, 1986) in the case of nonde terministic functions. The above combinators do not suffer from problems of this kind.",
"cite_spans": [
{
"start": 13,
"end": 27,
"text": "(Wadler, 1985)",
"ref_id": "BIBREF12"
},
{
"start": 536,
"end": 565,
"text": "[a] and [b] , defined in (12)",
"ref_id": null
},
{
"start": 609,
"end": 612,
"text": "[a]",
"ref_id": null
},
{
"start": 724,
"end": 727,
"text": "[X]",
"ref_id": null
},
{
"start": 789,
"end": 841,
"text": "(alternation, concatenation, iteration, optionality)",
"ref_id": null
},
{
"start": 937,
"end": 951,
"text": "(Hutton, 1992)",
"ref_id": null
},
{
"start": 954,
"end": 976,
"text": "(Norvell -Hebner, 1992",
"ref_id": null
},
{
"start": 1096,
"end": 1112,
"text": "(Meertens, 1986)",
"ref_id": null
}
],
"ref_spans": [
{
"start": 428,
"end": 468,
"text": "\ufffd [a]( ! ) t> [ ,8 ]( p1) = [,B]([a]({)",
"ref_id": null
}
],
"eq_spans": [],
"section": "1---lak is a sub bunch of A.",
"sec_num": "1"
},
{
"text": "= P l",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "1---lak is a sub bunch of A.",
"sec_num": "1"
},
{
"text": "The singleton property of bunches is notation ally convenient if one applies a general parsing technique to grammars for which the technique happens to provide a deterministic recognizer. If the general technique is defined with set-valued recognition functions, in the deterministic case all these functions produce sets with at most one value. If a function produces the empty set, this means that an error has been detected. If one works with bunch-valued functions instead, in a deterministic recognizer these produce null if an error has occurred and definite values otherwise.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Deterministic recursive descent parsing",
"sec_num": "5"
},
{
"text": "There is a standard method to make parsing algorithms more deterministic: the addition of look-ahead (Aho -Ullman, 1977) . The applica tion of look-ahead techniques to recursive descent parsing involves two functions, first and follow: first(a) = x \ufffd Vr I\\ a \ufffd x/3 t> x,",
"cite_spans": [
{
"start": 101,
"end": 120,
"text": "(Aho -Ullman, 1977)",
"ref_id": "BIBREF0"
}
],
"ref_spans": [],
"eq_spans": [],
"section": "Deterministic recursive descent parsing",
"sec_num": "5"
},
{
"text": "Although fo llow not necessarily terminates if it is interpreted as an algorithm, it uniquely de fines a smallest bunch fo llow(X), for every X. A\ufffd a\" e = XTJ \" (x \ufffd first(a) (a \ufffd f A x \ufffd follaw(A) ",
"cite_spans": [],
"ref_spans": [
{
"start": 145,
"end": 174,
"text": "A\ufffd a\" e = XTJ \" (x \ufffd first(a)",
"ref_id": null
},
{
"start": 175,
"end": 197,
"text": "(a \ufffd f A x \ufffd follaw(A)",
"ref_id": null
}
],
"eq_spans": [],
"section": "A\ufffd o:X/3 A /3 \ufffd f t> follaw(A).",
"sec_num": null
},
{
"text": "V",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "A\ufffd o:X/3 A /3 \ufffd f t> follaw(A).",
"sec_num": null
},
{
"text": "Bunch notation is equally useful for bottom-up parsing. To illustrate this, let us start from the following specification of an Earley-like parser ( o \ufffd( v; iv N v; ) A \ufffd a \u2022 {3](8) investigates , which prefixes of 8 can be rewritten to /3, in a bottom-up way (using grammar rules from right to left). If a non-empty prefix can be found, this corresponds to a part of the input sentence, which is a string rewritable to the first symbol of 8 (i.e. X) followed by the remainder of the prefix ( which are terminals). If true can be computed\u2022 before parsing. To get an efficient implementation such pre-computation is to be compounded with function memoization (Leermakers, 1992; .",
"cite_spans": [
{
"start": 147,
"end": 166,
"text": "( o \ufffd( v; iv N v; )",
"ref_id": null
},
{
"start": 658,
"end": 676,
"text": "(Leermakers, 1992;",
"ref_id": "BIBREF7"
}
],
"ref_spans": [
{
"start": 167,
"end": 181,
"text": "A \ufffd a \u2022 {3](8)",
"ref_id": null
}
],
"eq_spans": [],
"section": "Recursive ascent parsing",
"sec_num": "6"
},
{
"text": "In the case of a grammar without \u20ac-rules, (16 ",
"cite_spans": [],
"ref_spans": [
{
"start": 3,
"end": 45,
"text": "the case of a grammar without \u20ac-rules, (16",
"ref_id": null
}
],
"eq_spans": [],
"section": "Recursive ascent parsing",
"sec_num": "6"
},
{
"text": "As far as I know, the recognizer of this sec tion is a new variant of Earley-like parsing. In (Leermakers, 1992) a closely related algorithm was given, with two functions per dotted rule, instead of one. The functional parsing algorithm given in (Matsumoto et al. , 1983) is also quite similar to ours, even though it does not involve dotted rules. For a discussion of the relation of the above algorithm with the standard Earley . , parser, see (Leermakers, 1993) . An analogous LR parser, with one fu nction for each state ( and, of course, without a parse stack), is also constructed in (Leermakers, 1993) .",
"cite_spans": [
{
"start": 94,
"end": 112,
"text": "(Leermakers, 1992)",
"ref_id": "BIBREF7"
},
{
"start": 246,
"end": 271,
"text": "(Matsumoto et al. , 1983)",
"ref_id": null
},
{
"start": 446,
"end": 464,
"text": "(Leermakers, 1993)",
"ref_id": "BIBREF8"
},
{
"start": 590,
"end": 608,
"text": "(Leermakers, 1993)",
"ref_id": "BIBREF8"
}
],
"ref_spans": [],
"eq_spans": [],
"section": "8=X( A /3=Xv t> [A -+a Xv](() I 8 = X ( A /3 \ufffd B 1 A B -+ Xv t> [A -+ et\u2022 /3]([B -+ X \u2022 v](()).",
"sec_num": null
},
{
"text": "This paper should serve two purposes. Firstly, it should show the beauty of functional parsing the ory. Secondly, the paper is meant to establish, by way of illustrative examples, that the bunch con cept is a mathematical notion as respectable as sets and lists. The reader is invited to translate any of the sections into set notation and observe the notational burden that he/she has to add.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Conclusions",
"sec_num": "7"
},
{
"text": "One could argue that almost the same con ciseness can be obtained using normal sets and an extra ('map') operator to distribute fu nctions over sets. However, one should keep in mind that the bunch notion is more primitive than its set relative: a bunch is an aggregation, a set is an en capsulated aggregation (Hebner, 1993) . It is the encapsulation aspect of sets that leads to concep tual problems, to students ( a set that contains nothing is not nothing) as well as to scientists ( the set that contains everything, including itself, leads to a paradox). Being essentially simpler,",
"cite_spans": [],
"ref_spans": [
{
"start": 236,
"end": 326,
"text": "relative: a bunch is an aggregation, a set is an en capsulated aggregation (Hebner, 1993)",
"ref_id": null
}
],
"eq_spans": [],
"section": "Conclusions",
"sec_num": "7"
}
],
"back_matter": [
{
"text": " (Norvell -Hehner, 1992) , it was Lex Augusteijn who in spired me to use bunches for the kind of parsing algorithms we are both engaged in.",
"cite_spans": [
{
"start": 1,
"end": 24,
"text": "(Norvell -Hehner, 1992)",
"ref_id": "BIBREF10"
}
],
"ref_spans": [],
"eq_spans": [],
"section": "I thank Theo Norvell for his useful comments on the first draft of this paper, and Lex Au gusteijn, Paul Jansen, Frans Kruseman Aretz and Mark-Jan Nederhoffor their constructive remarks about the second draft. Triggered by",
"sec_num": null
},
{
"text": "/3 \ufffd f, the prefix may be empty. Assuming that the function is invoked only if a directly preced ing part of the input sentence was rewritable to et, it is deduced that this preceding part, followed by the part that corresponds to the found prefix of 8,\"can be rewritten into A. The fu nction thus returns A, followed by the part of the input sen tence that has not yet been parsed. If more than one prefix can be found, the function delivers a bunch.We strive for an implementation of (15) of the recursive ascent type. To this end, we note that f3 \ufffd X 1/ means that either X is introduced by a grammar rule B -+ \u00b5Xv, with \u00b5 \ufffd f, or X is already in /3: f3 = \u00b5Xv, with \u00b5 \ufffd \u20ac:. \" /3 \ufffd \u20ac t> Ao I 8 = X ( A /3 = \u00b5Xv A \u00b5 \ufffd \u20ac A v \ufffd 1/ A ' = 1/P t> Ap I 8 = X' \" f3 \ufffd B111 \" B -+ \u00b5XV \" \u00b5 \ufffd \u20ac /\\ V \ufffd 1/2 I\\ ( = 1/21/lP t> A p . ",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "annex",
"sec_num": null
},
{
"text": "by another function, then its argument 8 is in v,;. .",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "The conciseness of the last line is due to the dis tributivity property of bunches. In deriving (16) a critical need is that not B +-V T, in other words, that terminals and nonterminals are disjoint. Note that if a function [A -+ a \u2022 /3] is invoked",
"sec_num": null
},
{
"text": "The notion of bunches has been introduced in (Hehner, 1984) . Sets with nondeterministic in terpretation, like bunches, were also proposed in (Hughes -O'Donnell, 1990) . In (Wadler, 1992) a kind of bunch-valued lambda-calculus is dis cussed. Bunch-valued functions also appear in (Meertens, 1986; Bauer et al., 1987; Norvell -Hehner, 1992) , as nondeterministic specifications of programs. I refer to (Hehner, 1993) ",
"cite_spans": [
{
"start": 45,
"end": 59,
"text": "(Hehner, 1984)",
"ref_id": null
},
{
"start": 142,
"end": 167,
"text": "(Hughes -O'Donnell, 1990)",
"ref_id": "BIBREF5"
},
{
"start": 173,
"end": 187,
"text": "(Wadler, 1992)",
"ref_id": null
},
{
"start": 280,
"end": 296,
"text": "(Meertens, 1986;",
"ref_id": null
},
{
"start": 297,
"end": 316,
"text": "Bauer et al., 1987;",
"ref_id": null
},
{
"start": 317,
"end": 339,
"text": "Norvell -Hehner, 1992)",
"ref_id": "BIBREF10"
},
{
"start": 401,
"end": 415,
"text": "(Hehner, 1993)",
"ref_id": "BIBREF4"
}
],
"ref_spans": [],
"eq_spans": [],
"section": "It may recursively call itself with rewritten ver sions of this 8, i.e., with prefixes of 8 replaced by some non terminal B, until this B appears in /3 in such a way that the symbols before B (in /3) may derive the empty string. The recognizer terminates for all non-cyclic grammars. Note that the conditions /3 \ufffd \u20ac /3 = \u00b5Xvi\\\u00b5\ufffd f 3 7 (/3 \ufffd B 1 ) A B-+ \u00b5Xv A \u00b5\ufffd\u20ac are independent of the input string, and for ev ery /3, X the values of \u00b5, v, B that make them bunches are not troubled by such intricacies. In practice, it is fine to implement bunches with sets, as long as one keeps in mind the difference be tween a notion and its implementation. After all, the possibility of implementing sets in terms of lists does not mean that sets can be dispensed with. One distinguishing aspect of bunch-valued functions, which goes beyond notational issues, is that normal functions are embedded in them. \"The conciseness of bunch notation is not its only virtue. Functions defined with bunch nota tion look more 'algorithmic' than their transla tion into set notation, which is not unimportant if one wants t. o define an algorithm, if only for pedagogical reasons.",
"sec_num": null
},
{
"text": "one. Thus, elements of V* are strings, not se.: quences. In (Leermakers, 1993) bunch notation is adopted as a tool for the formulation of parsing theory, in the spirit of this paper. In this book, bunches are also used in the theory of attribute grammars. In conventional attribute grammars, each attribute has an associated function that computes its value in terms of the values of other attributes. It is very natural to take such an at tribute function to be bunch-valued. If the func tion produces null, this means that the computa tion of its attribute fails. If it produces a bunch with more than one element, attribute computa tion is ambiguous. Bunch-valued attribute func tions are particularly apt for natural-language parsing, since both failure and ambiguity of at tribute computation are natural phenomena in this application of attribute grammars.",
"cite_spans": [
{
"start": 60,
"end": 78,
"text": "(Leermakers, 1993)",
"ref_id": "BIBREF8"
}
],
"ref_spans": [],
"eq_spans": [],
"section": "for further elabora tions on the bunch theme, and many other ap plications. This work also proposes to make a distinction between strings and sequences, which also exists between bunches and sets: strings have the singleton property, but sequences do not. As is apparent from the notation for elements of V*, it is natural to make no distinction between gram mar symbols and elements of V* that have length",
"sec_num": null
}
],
"bib_entries": {
"BIBREF0": {
"ref_id": "b0",
"title": "Principles of Compiler Design",
"authors": [
{
"first": "A",
"middle": [
"V"
],
"last": "Aho",
"suffix": ""
},
{
"first": "-J",
"middle": [
"D"
],
"last": "Ullman",
"suffix": ""
}
],
"year": 1977,
"venue": "",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Aho A.V. -J.D. Ullman (1977) Principles of Compiler Design. Reading, MA: Addison Wesley.",
"links": null
},
"BIBREF1": {
"ref_id": "b1",
"title": ") Th e Munich Project GIP: Vo lume II: Th e Program Transformation System CIP S",
"authors": [
{
"first": "F",
"middle": [
"L"
],
"last": "Bauer",
"suffix": ""
},
{
"first": "-H",
"middle": [],
"last": "Ehler",
"suffix": ""
},
{
"first": "-A",
"middle": [],
"last": "Horsch",
"suffix": ""
},
{
"first": "-B",
"middle": [],
"last": "Moller -H",
"suffix": ""
}
],
"year": null,
"venue": "",
"volume": "292",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Bauer F .L. -H. Ehler -A. Horsch -B. Moller -H. Partsch -0. Puakner -P. Pep per ( 198 7) Th e Munich Project GIP: Vo lume II: Th e Program Transformation System CIP S. Lecture Notes in Computer Science 292. Berlin: Springer-Verlag.",
"links": null
},
"BIBREF2": {
"ref_id": "b2",
"title": "A Discipline of Program ming",
"authors": [
{
"first": "E",
"middle": [
"W"
],
"last": "Dijkstra",
"suffix": ""
}
],
"year": 1976,
"venue": "",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Dijkstra E.W. (1976) A Discipline of Program ming. London: Prentice Hall.",
"links": null
},
"BIBREF3": {
"ref_id": "b3",
"title": "8 4) The Logic of Program ming",
"authors": [
{
"first": "E",
"middle": [
"C R"
],
"last": "Hehner",
"suffix": ""
}
],
"year": null,
"venue": "",
"volume": "19",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Hehner E.C.R. (19 8 4) The Logic of Program ming. London: Prentice-Hall.",
"links": null
},
"BIBREF4": {
"ref_id": "b4",
"title": "Practical Theory of Pro gramming",
"authors": [
{
"first": "E",
"middle": [
"C R"
],
"last": "Hehner",
"suffix": ""
}
],
"year": 1993,
"venue": "",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Hehner E.C.R. ( 1993 ) a Practical Theory of Pro gramming. Berlin: Springer-Verlag.",
"links": null
},
"BIBREF5": {
"ref_id": "b5",
"title": "Express ing and reasoning about non-deterministic functional programs",
"authors": [
{
"first": "J. -J. O'",
"middle": [],
"last": "Hughes",
"suffix": ""
},
{
"first": "",
"middle": [],
"last": "Donnell",
"suffix": ""
}
],
"year": 1990,
"venue": "Functional Programming",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Hughes J. -J. O'Donnell ( 1990), \"Express ing and reasoning about non-deterministic functional programs\" . In: K. Davis and J. Hughes (Eds), Functional Programming. Berlin: Springer-Verlag.",
"links": null
},
"BIBREF6": {
"ref_id": "b6",
"title": "Higher-order functions for parsing",
"authors": [
{
"first": "G",
"middle": [],
"last": "Hutton",
"suffix": ""
}
],
"year": 1992,
"venue": "Jo urnal of Functional Program ming",
"volume": "2",
"issue": "3",
"pages": "3--3",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Hutton G. ( 1 992) \"Higher-order functions for parsing\" . In: Jo urnal of Functional Program ming 2( 3 ), 3 2 3 -3 4 3 .",
"links": null
},
"BIBREF7": {
"ref_id": "b7",
"title": "A recursive ascent Earley parser",
"authors": [
{
"first": "R",
"middle": [],
"last": "Leermakers",
"suffix": ""
}
],
"year": 1992,
"venue": "Information Processing Letters",
"volume": "41",
"issue": "",
"pages": "7--91",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Leermakers R. (1992) \"A recursive ascent Earley parser\" . In: Information Processing Letters 41 , 8 7-91 .",
"links": null
},
"BIBREF8": {
"ref_id": "b8",
"title": "Th e Functional Treatment of Parsing",
"authors": [
{
"first": "R",
"middle": [],
"last": "Leermakers",
"suffix": ""
}
],
"year": 1993,
"venue": "",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Leermakers R. ( 1993) Th e Functional Treatment of Parsing. Amsterdam: Kluwer Academic Publishers.",
"links": null
},
"BIBREF9": {
"ref_id": "b9",
"title": "BUP: a bottom-up parser embedded in Prolog",
"authors": [],
"year": null,
"venue": "New Generation Comp uting",
"volume": "83",
"issue": "2",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Matsumoto Y. -H. Tanaka -H. Hirakawa - H. Miyoshi -H. Yasukawa (19 83 ) \"BUP: a bottom-up parser embedded in Prolog\" New Generation Comp uting 1(2).",
"links": null
},
"BIBREF10": {
"ref_id": "b10",
"title": "Logical Specifications for Functional Programs",
"authors": [
{
"first": "T",
"middle": [
"S E C R"
],
"last": "Norvell",
"suffix": ""
},
{
"first": "",
"middle": [],
"last": "Hehner",
"suffix": ""
}
],
"year": 1992,
"venue": "Proceedings of the Second International Con ference . on the Mathematics of Program Con struction",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Norvell T.S. -E.C.R. Hehner (1992) \"Logical Specifications for Functional Programs\" . In: Proceedings of the Second International Con ference . on the Mathematics of Program Con struction. Oxford: Oxford University Press.",
"links": null
},
"BIBREF11": {
"ref_id": "b11",
"title": "Referential Trans-. parency, Definiteness and Unfoldability",
"authors": [
{
"first": "",
"middle": [],
"last": "Sondergard -Sesoft",
"suffix": ""
}
],
"year": 1990,
"venue": "Act a Inf ormatica",
"volume": "27",
"issue": "",
"pages": "505--51",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Sondergard -Sesoft (1990) \"Referential Trans-. parency, Definiteness and Unfoldability\" . Act a Inf ormatica 27, 505-51 7.",
"links": null
},
"BIBREF12": {
"ref_id": "b12",
"title": "How to replace failure by a list of successes",
"authors": [
{
"first": "P",
"middle": [],
"last": "Wadler",
"suffix": ""
}
],
"year": 1985,
"venue": "Conference on Fu nctional Programming Lang;uages and Comp uter Ar chitecture",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Wadler P. ( 1985) \"How to replace failure by a list of successes\" . In: Conference on Fu nctional Programming Lang;uages and Comp uter Ar chitecture (Nancy, France);",
"links": null
},
"BIBREF14": {
"ref_id": "b14",
"title": "The essence of fu nctional pro gramming",
"authors": [
{
"first": "P",
"middle": [],
"last": "Wadler",
"suffix": ""
}
],
"year": 1992,
"venue": "19th Annual Symposium on Principles of Programming Languages",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Wadler P. ( 1 992) \"The essence of fu nctional pro gramming\" , In: 19th Annual Symposium on Principles of Programming Languages Santa Fe .",
"links": null
}
},
"ref_entries": {
"FIGREF2": {
"text": "So >i.X \u2022 has changed into a formal argument on sult\" : the left-hand side and we adopt the convention that free variables at the right-hand side (here Y , Z) are bound by let's. The scope of such an implicit let is in practice always clear: it is from the first occurrence of the variable usually until\"I'' , or else until the end of the bunch expression.",
"num": null,
"uris": null,
"type_str": "figure"
},
"FIGREF4": {
"text": "Jg )( ! ) = g(J ( ! )).",
"num": null,
"uris": null,
"type_str": "figure"
},
"FIGREF5": {
"text": "I\\ ( = TJ P t> A p . If applied to a string e of terminal symbols, this specification reduces to This means that, after adding a rule S' \ufffd S to the original grammar, it follows that s' \ufffd [s' \ufffd -s](e) if and only if e is a correct sentence. The in tuition behind this is that a function invocation [",
"num": null,
"uris": null,
"type_str": "figure"
},
"FIGREF6": {
"text": "v,;. \" /3 = f t> Ao I",
"num": null,
"uris": null,
"type_str": "figure"
},
"TABREF0": {
"content": "<table><tr><td colspan=\"2\">Complex bunch expressions are constructed with variables. Unless stated otherwise, variables have types that consist of definite values only. Such variables are called definite; they cannot be bound to bunches with cardinality unequal to one. Given a proposition P and bunch expres sions x and y, the expression</td></tr><tr><td>if P then x else y</td><td>(I)</td></tr><tr><td>is a complex bunch expression.</td><td/></tr></table>",
"html": null,
"type_str": "table",
"text": "Assuming some ordering on the set of definite values, it is not difficult to define a canonical form for each simple bunch expres sion, which may serve as a unique representation of the bunch denoted. The bunch expression all denotes the smallest bunch such that e +-all for all definite values e. It contains free variables if P, x, or y contain free variables ( non tri vial P do). It will be clear that for each as signment of values to the variables the complex expression (I) is equivalent to x if P is true and to y otherwise. Free variables in bunch expressions can be bound by A-abstraction. If i is a variable and x is a bunch expression, thenAi .",
"num": null
},
"TABREF1": {
"content": "<table><tr><td>of terminals. Furthermore, V = V N IVr is the bunch of grammar symbols. Relating to grammar symbols, the following typed variables are used:</td></tr></table>",
"html": null,
"type_str": "table",
"text": ", where S is the start symbol, V N is the bunch of nonterminals, Vr is the bunch",
"num": null
},
"TABREF2": {
"content": "<table><tr><td/><td>example, the grammar rule A --+ xBy. In the natural interpretation this rule means</td></tr><tr><td/><td>xLa(B)y .-La(A). That is, the grammar rule is a constraint on La. In principle, La need only apply to nonterminals, but it is convenient to extend it, via</td></tr><tr><td/><td>La(x) = x, for all x.-Vr, to all grammar symbols. Moreover, we further ex tend it to arbitrary strings of grammar symbols, via La(a/3) = La(a)La(/3), L a (\u20ac) =\u20ac, (9)</td></tr><tr><td/><td>so that the following equalities hold true:</td></tr><tr><td>we write a \ufffd /3.</td><td>in any number of steps,</td></tr><tr><td>Languages</td><td/></tr><tr><td colspan=\"2\">A language is a bunch of strings of terminals, i.e. a subbunch of v,; . Concatenation is an operation that is defined for (pairs of) strings. Therefore, it distributes over languages (8) This equation is referred to as the definition of language multiplication, although it is not really a definition: it follows from the distributivity prop erty.</td></tr><tr><td>The interpretation</td><td/></tr><tr><td colspan=\"2\">A nonterminal can be seen as a variable of type language (like k, l are variables of type integer), a terminal is a constant language (like 3,5 are con stant integers). Just like in the arithmetic exam ple, we assume an assignment function that per forms the mapping from symbols to their inter pretation. This function is called La, as its value will be determined by the grammar G. Take , for</td></tr></table>",
"html": null,
"type_str": "table",
"text": "",
"num": null
},
"TABREF5": {
"content": "<table><tr><td>Given some input string { of terminal symbols, a grammar determines for each string of grammar symbols a whether or not { can be derived in any number of steps from a, i.e. whether a\ufffd{. Also, for each substring 1/ of { it may be deter mined whether or not a \ufffd 1/ \u2022 Let us define for each a a bunch-valued recognition function [a] from Vr to Vr , as follows: [a]({) = a \ufffd 1/ I\\ ! = 1/P t&gt; p . (11) Stated differently, this defines a function [ \u2022 ] that operates on two strings of grammar symbols, such that [ \u2022 ](a, ! ) = [a]( ! ). Similar recognition f unc tions, with lists instead of bunches, were intro duced in</td></tr></table>",
"html": null,
"type_str": "table",
"text": "",
"num": null
},
"TABREF7": {
"content": "<table><tr><td>It is not difficult to verify that if for A =I-S' function [A] is redefined as</td></tr><tr><td>[A]( e ) =</td></tr></table>",
"html": null,
"type_str": "table",
"text": "It is convenient to add to each grammar the rule S' \ufffd S ..L, where S' and ..L are new symbols which appear only in this rule. S' is the new start sym bol and ..L is formally added to Vr. Of course, any correct input must now end with ..L. The above then implies that .1\ufffdfo llow(S), and it is guaranteed that fo llow(X) =I-null if :3 0 ,0(8 \ufffd aX {3). If X is one of the added symbols S' , ..L then",
"num": null
}
}
}
}