84 research outputs found
Higher-Order Operator Precedence Languages
Floyd's Operator Precedence (OP) languages are a deterministic context-free
family having many desirable properties. They are locally and parallely
parsable, and languages having a compatible structure are closed under Boolean
operations, concatenation and star; they properly include the family of Visibly
Pushdown (or Input Driven) languages. OP languages are based on three relations
between any two consecutive terminal symbols, which assign syntax structure to
words. We extend such relations to k-tuples of consecutive terminal symbols, by
using the model of strictly locally testable regular languages of order k at
least 3. The new corresponding class of Higher-order Operator Precedence
languages (HOP) properly includes the OP languages, and it is still included in
the deterministic (also in reverse) context free family. We prove Boolean
closure for each subfamily of structurally compatible HOP languages. In each
subfamily, the top language is called max-language. We show that such languages
are defined by a simple cancellation rule and we prove several properties, in
particular that max-languages make an infinite hierarchy ordered by parameter
k. HOP languages are a candidate for replacing OP languages in the various
applications where they have have been successful though sometimes too
restrictive.Comment: In Proceedings AFL 2017, arXiv:1708.0622
Co-tabulations, Bicolimits and Van-Kampen Squares in Collagories
We previously defined collagories essentially as âdistributive allegories without zero morphismsâ. Collagories are sufficient for accommodating the relation-algebraic approach to graph transformation, and closely correspond to the adhesive categories important for the categorical DPO approach to graph transformation.
Heindel and Sobocinski have recently characterised the Van-Kampen colimits used in adhesive categories as bicolimits in span categories.
In this paper, we study both bicolimits and lax colimits in collagories. We show that the relation-algebraic co-tabulation concept is equivalent to lax colimits of difunctional morphisms and to bipushouts, but much more concise and accessible. From this, we also obtain an interesting characterisation of Van-Kampen squares in collagories
Parallel Parsing of Context-Free Languages on an Array of Processors
Kosaraju [Kosaraju 69] and independently ten years later, Guibas, Kung and
Thompson [Guibas 79] devised an algorithm (K-GKT) for solving on an array of
processors a class of dynamic programming problems of which general context-free
language (CFL) recognition is a member. I introduce an extension to K-GKT
which allows parsing as well as recognition. The basic idea of the extension is to
add counters to the processors. These act as pointers to other processors. The
extended algorithm consists of three phases which I call the recognition phase, the
marking phase and the parse output phase. I first consider the case of unambiguous
grammars. I show that in that case, the algorithm has O(n2log n) space complexity
and a linear time complexity. To obtain these results I rely on a counter implementation
that allows the execution in constant time of each of the operations:
set to zero, test if zero, increment by 1 and decrement by 1. I provide a proof of
correctness of this implementation. I introduce the concept of efficient grammars.
One factor in the multiplicative constant hidden behind the O(n2log n) space complexity
measure for the algorithm is related to the number of non-terminals in the
(unambiguous) grammar used. I say that a grammar is k-efficient if it allows the
processors to store not more than k pointer pairs. I call a 1-efficient grammar an
efficient grammar. I show that two properties that I call nt-disjunction and rhsdasjunction
together with unambiguity are sufficient but not necessary conditions
for grammar efficiency. I also show that unambiguity itself is not a necessary condition
for efficiency. I then consider the case of ambiguous grammars. I present
two methods for outputting multiple parses. Both output each parse in linear time.
One method has O(n3log n) space complexity while the other has O(n2log n) space
complexity. I then address the issue of problem decomposition. I show how part of
my extension can be adapted, using a standard technique, to process inputs that
would be too large for an array of some fixed size. I then discuss briefly some issues
related to implementation. I report on an actual implementation on the I.C.L.
DAP. Finally, I show how another systolic CFL parsing algorithm, by Chang,
Ibarra and Palis [Chang 87], can be generalized to output parses in preorder and
inorder
- âŠ