scispace - formally typeset
Open AccessBook ChapterDOI

Second-order simple grammars

TLDR
Higher-order notations for trees have a venerable history from the 1970s and 1980s when schemes and their relationship to formal language theory were first studied, and recently, model-checking techniques have been successfully extended to these higher- order notations in the deterministic case.
Abstract
Higher-order notations for trees have a venerable history from the 1970s and 1980s when schemes (that is, functional programs without interpretations) and their relationship to formal language theory were first studied. Included are higher-order recursion schemes and pushdown automata. Automata and language theory study finitely presented mechanisms for generating languages. Instead of language generators, one can view them as process calculi, propagators of possibly infinite labelled transition systems. Recently, model-checking techniques have been successfully extended to these higher-order notations in the deterministic case [18,9,8,21].

read more

Content maybe subject to copyright    Report

Edinburgh Research Explorer
Second-Order Simple Grammars
Citation for published version:
Stirling, C 2006, Second-Order Simple Grammars. in CONCUR 2006 - Concurrency Theory: 17th
International Conference, CONCUR 2006, Bonn, Germany, August 27-30, 2006, Proceedings. vol. 4137,
Springer Berlin Heidelberg, pp. 509-523. https://doi.org/10.1007/11817949_34
Digital Object Identifier (DOI):
10.1007/11817949_34
Link:
Link to publication record in Edinburgh Research Explorer
Document Version:
Peer reviewed version
Published In:
CONCUR 2006 - Concurrency Theory
General rights
Copyright for the publications made accessible via the Edinburgh Research Explorer is retained by the author(s)
and / or other copyright owners and it is a condition of accessing these publications that users recognise and
abide by the legal requirements associated with these rights.
Take down policy
The University of Edinburgh has made every reasonable effort to ensure that Edinburgh Research Explorer
content complies with UK legislation. If you believe that the public display of this file breaches copyright please
contact openaccess@ed.ac.uk providing details, and we will remove access to the work immediately and
investigate your claim.
Download date: 10. Aug. 2022

Seond-Order Simple Grammars
Colin Stirling
Shool of Informatis
University of Edinburgh
Edinburgh EH9 3JZ, UK
email: psinf.ed.a.uk
1 Intro dution
Higher-order notations for trees have a venerable history from the 1970s and
1980s when shemes (that is, funtional programs without interpretations) and
their relationship to formal language theory were rst studied. Inluded are
higher-order reursion shemes and pushdown automata. Automata and lan-
guage theory study nitely presented mehanisms for generating languages. In-
stead of language generators, one an view them as pro ess aluli, propagators
of possibly innite labelled transition systems. Reently, mo del-heking teh-
niques have b een suessfully extended to these higher-order notations in the
deterministi ase [18, 9, 8, 21℄.
A long standing open question is: given two
n
th-order shemes do they gen-
erate the same tree? Courelle [10℄ showed that for
n
= 1 the problem oin-
ides with the language equivalene problem for deterministi pushdown au-
tomata (DPDA) that was subsequently solved p ositively by Senizergues [23℄.
For
n >
1, equivalene of
safe
n
th-order reursion shemes oinides with equiv-
alene between determinisiti
n
th-order pushdown automata [12, 18℄. It is not
known whether safety is a genuine restrition on expressive power: see [1℄.
Seond-order pushdown automata involve nite-state ontrol over a stak
of staks. They have appliations in language theory as they haraterize the
indexed
languages introdued by Aho [2℄. Also, they generalize the \mildly"
ontext-sensitive languages used in omputational linguistis [29℄. Aho dened
these languages using indexed grammars and also haraterized them in terms
of nested stak automata [3℄. Their haraterization in terms of seond-order
pushdown automata is due to Maslov, who also dened a hierarhy of higher-
order indexed languages haraterized by higher-order pushdown automata, [20℄.
A more detailed aount is given by Damm and Goerdt [12℄.
There has b een onsiderable researh ativity on deision pro edures for
bisimulation equivalene between rst-order systems, initiated with [4℄ for normed
ontext-free grammars and then extended to lasses of pushdown automata [26℄.
Reent results show that bisimulation equivalene is undeidable [17℄.
Here, we present a deidability result for equivalene of seond-order sys-
tems. A onguration of a seond-order pushdown automaton is a state and a
stak of staks. The operations p op staks and push staks onto it. We examine

deterministi seond-order pushdown automata whih generalize DPDA. A on-
guration of a DPDA is a state and a stak. Simple grammars are an instane
of DPDA when there is a single state and no
-transitions. So a onguration of
a simple grammar is justa stak. Korenjak and Hop roft showed that language
equivalene is deidable between ongurations of simple grammars [19℄. Here,
we introdue seond-order simple grammars as the subset of seond-order deter-
ministi pushdown automata when there is a single state and no
-transitions.
A onguration of suh a grammar is, therefore, a stak of staks. We show that
language equivalene is deidable for a subset of seond-order simple grammars.
The pro of tehnique is based on bisimulation equivalene and some ombina-
toris ab out rep etitions of stak extensions (lo osely based on ideas from [28℄).
We view this result as a rst step towards understanding the general equivalene
problem for higher-order shemes.
In Setion 2, we desrib e 2nd-order (deterministi) pushdown automata and
in Setion 3 we introdue 2nd-order simple grammars and the subset that we
study. Some properties of the grammars are outlined in Setion 4. In Setions 5
and 6 we present the equivalene deision pro edure, using tableaux.
2 2nd-order pushdown automata
The following four nite sets are ingredients of a 2nd-order pushdown automaton,
a 2PDA: states
P
, stak symb ols
S
, alphabet
A
and basi transitions
T
. A basi
transition is
pX
a
!
q
where
p
and
q
are states in
P
,
X
is a stak symbol in
S
,
a
2
A
[ f
g
and
is an operation belonging to
f
swap
;
push
;
pop :
2
S
g
.
A 2-stak is a sequene of non-empty staks
1
:
: : :
:
n
, so eah
i
2
S
+
.
We use
for the empty stak and apital greek letters
,
,
: : :
to range over
sequenes of staks with
for the empty sequene. An operation
is dened on
a 2-stak as follows:
swap
(
X
:
) =

:
push(
:
) =
:
:
pop (
:
) =
A onguration of a 2PDA onsists of a state
p
2
P
and a 2-stak
. The
transitions of a onguration are dened by the following rule from the basi
transitions
T
.
PRE If
pX
a
!
q
2
T
then
pX
:
a
!
q
(
X
:
)
A traditional automaton interpretation is that on input
a
with basi transition
pX
a
!
q
the onguration
pX
:
in state
p
with
X
at the top of the
rst stak hanges to state
q
and
(
X
:
) replaes
X
:
. Alternatively,
with resp et to a generational or pro ess alulus persp etive the onguration
pX
:
generates, or p erforms,
a
and b eomes
q
(
X
:
). In b oth aounts
-transitions have a speial status. If
a
=
then the onguration may hange

without reading an input or it may beome
q
(
X
:
) silently without p er-
forming an observable ation. In the following we abbreviate a basi transition
pX
a
!
q
swap
to
pX
a
!
q
.
The
transition graph
G
(
p
) is generated by deriving all possible transitions
from
p
and every onguration reahable from it using the rule PRE.
Example 1.
Consider the following basi transitions.
pZ
a
!
q Z q Z
a
!
q AZ q A
a
!
q AA q A
b
!
r
push
rA
b
!
r rZ
!
s
pop
sA
!
s sZ
!
s
pop
Part of the transition graph
G
(
pZ
) is depited in Figure 1.
ut
pZ
a
!
q Z
a
!
q AZ
a
!
q AAZ
a
!
: : :
#
b
#
b
rAZ
:
AZ rAAZ
:
AAZ
#
b
#
b
sZ
sAZ
rZ
:
AZ rAZ
:
AAZ
#
"
#
b
s : : :
.
.
.
Fig. 1.
A 2PDA
A 2PDA is presentable in normal form, up to isomorphism of transition
graphs, where eah transition of the form
pX
a
!
q
2
T
obeys the onstraint
that the length of
,
j
j
, is at most 2. Enforement of the normal form is easy
to ahieve, by intro duing extra stak symbols.
Denition 1.
The
language
of a onguration
p
,
L
(
p
)
, is the set of words
w
2
A
suh that
p
w
!
q
for some
q
.
When reognising any suh word the 2-stak is thereby emptied. For instane,
L
(
pZ
) in the ase of Example 1 is
f
a
n
b
n
n
:
n
2
g
whih is a ontext-sensitive
language. This is alled
empty stak aeptane
. A word
w
2
A
is in
L
(
p
) if
there is a
w
-path from
p
to a terminal state
q
for some
q
in the graph
G
(
p
).
The languages reognized oinide with those reognized if nal states were also
inluded.
Our denition of a 2PDA is based on [18℄ exept that it expliitly extends
a standard PDA (beause of swap transitions). It is simpler than Maslov's,
Damm and Go erdt's denition [20, 12℄. In their ase, a 2-stak is a sequene
of pairs (
X
i
;
i
) where
X
i
2
S
, with operations pop
1
, pop
2
, push
1
(
), push
2
(
)
whih work as follows: pop
1
[(
X;
1
) :
=
, p op
2
[(
X; Y
) :
= (
X;
) :
,
push
1
(
Z
1
Z
2
)[(
X;
) :
= (
Z
1
;
) : (
Z
2
;
) :
and push
2
(
Z
1
Z
2
)[(
X;
) :

= (
X; Z
1
Z
2
) :
. There is no loss in expressive p ower (with respet to lan-
guage equivalene) as these op erations an b e simulated by families of 2PDA
operations.
The family of languages reognized by 2PDA is the
indexed languages
, intro-
dued by Aho in 1968 [2, 3℄, whih p ermit some ontext-dependeny, as Exam-
ple 1 illustrates. Aho oers a grammatial metho d for generating them as well as
an automata theoreti metho d (using nested stak automata) whih turns out
to b e equivalent to the 2PDA, as shown by Maslov [20℄. An equivalent, shema-
like, formalism is the OI maro-grammars of Fisher [14℄. Aho also shows that
the indexed languages are ontext-sensitive whih is not obvious beause re-
peated push transitions an inrease the size of a onguration non-linearly.
They form an AFL and are a prop er subset of the ontext-sensitive languages:
f
(
ab
n
)
n
:
n
0
g
is not an indexed language via a pumping lemma for them
[16, 5℄. The subset of
linear
indexed languages is the mildly ontext-sensitive
languages generated by tree adjoining grammars [29℄.
A 2PDA is
deterministi
if
T
obeys the following onditions.
{
if
pX
a
!
q
and
pX
a
!
r
then
q
=
r
and
=
{
if
pX
!
q
and
pX
a
!
r
then
a
=
Example 1 is a determinisiti 2PDA. The equivalene question, whether two
ongurations of a determinisiti 2PDA reognise the same language, general-
izes the DPDA equivalene problem, that was solved p ositively by Senizergues
[25, 23, 24, 27, 28℄. A DPDA onguration
p
an b e oded as a deterministi
2PDA onguration
pZ
where
Z
is a new end of stak marker with the extra
transitions
q Z
!
q
pop for eah state
q
.
Due to empty stak aeptane, the language reognized by a deterministi
2PDA has the prex free property: if
w
2
L
(
p
) then no proper prex
v
of
w
an
belong to
L
(
p
). However, as with DPDA and empty stak aeptane, for any
deterministi indexed language
L
, when dened in the Maslov style [22℄ with nal
state aeptane, there is a deterministi 2PDA that aepts
f
w
$ :
w
2
L
g
where
$ is a new alphab et symbol: deterministi 2PDA oinide with deterministi
Maslov pushdown automata with empty stak aeptane. The deterministi
indexed languages are losed under omplement (and are therefore a proper
subset of the indexed languages) and inlude inherently ambiguous ontext-free
languages suh as
f
a
i
b
j
k
:
i; j; k >
0 and
i
=
j
or
j
=
k
g
[22℄.
3 Seond-order simple grammars
In this setion we onsider seond-order simple grammars, 2SGs. These are de-
terminisiti 2PDAs whih have just one state and no
-transitions. We an there-
fore drop the state from transitions and ongurations: transitions now have the
form
X
a
!
and a onguration has the form
. Reahability prop erties of
their nondeterministi version, at higher-orders, have been examined in [6℄. We
onjeture that simple grammars dened from Maslov pushdown automata are
more expressive than 2SGs.

Citations
More filters
Book ChapterDOI

Equivalences of Pushdown Systems Are Hard

TL;DR: Language equivalence of deterministic pushdown automata (DPDA) was shown to be decidable by Senizergues (1997, 2001); Stirling (2002) then showed that the problem is primitive recursive.
Proceedings ArticleDOI

On Bisimilarity of Higher-Order Pushdown Automata: Undecidability at Order Two

TL;DR: It is shown that bisimulation equivalence of order-two pushdown automata is undecidable, and the lower order problem of higher-order pushdown Automata, which asks, given an order-k push down automaton and some k' = 2 even when the input k-PDA is deterministic and real-time, is studied.
Posted Content

Note on Undecidability of Bisimilarity for Second-Order Pushdown Processes

TL;DR: Broadbent and Goller (FSTTCS 2012) proved the undecidability of bisimulation equivalence for processes generated by epsilon-free second-order pushdown automata by using Defender's forcing.
Journal ArticleDOI

Equivalence of pushdown automata via first-order grammars

TL;DR: The presented proof for bisimulation equivalence of first-order grammars is an alternative proof for a result by Senizergues (1998, 2005) that subsumes his affirmative solution of the famous decidability question for deterministic pushdown automata.
References
More filters
Journal ArticleDOI

Indexed Grammars—An Extension of Context-Free Grammars

TL;DR: A new type of grammar for generating formal languages, called an indexed grammar, is presented, and the class of languages generated by indexed grammars has closure properties and decidability results similar to those for context-free languages.
Book ChapterDOI

Fundamental properties of infinite trees

TL;DR: This paper investigates some of their combinatorial and algebraic properties that are especially relevant to semantics of programming languages.
Proceedings ArticleDOI

On Model-Checking Trees Generated by Higher-Order Recursion Schemes

TL;DR: It is proved that the modal mu-calculus model-checking problem for (ranked and ordered) node-labelled trees that are generated by order-n recursion schemes is n-EXPTIME complete, and it follows that the monadic second-order theories of these trees are decidable.
Journal ArticleDOI

The equivalence of four extensions of context-free grammars

TL;DR: The result presented in this paper is that all four of the formalisms under consideration generate exactly the same class of string languages.
Book ChapterDOI

Verification on Infinite Structures

TL;DR: This chapter presents a hierarchy of infinite-state systems based on the primitive operations of sequential and parallel composition; the hierarchy includes a variety of commonly-studied classes of systems such as context-free and pushdown automata, and Petri net processes.
Related Papers (5)