A Fragment of ML Decidable by Visibly Pushdown Automata

The simply-typed, call-by-value language, RML, may be viewed as a canonical restriction of Standard ML to ground-type references, augmented by a "bad variable" construct in the sense of Reynolds. By a short type, we mean a type of order at most 2 and arity at most 1. We consider the O-strict fragment of (finitary) RML, RMLO-Str, consisting of terms-in-context x1 : θ1, ..., xn : θn ⊢ M : θ such that θ is short, and every argument type of every θi is short. RMLO-Str is surprisingly expressive; it includes several instances of (in)equivalence in the literature that are challenging to prove using methods based on (state-based) logical relations. We show that it is decidable whether a given pair of RMLO-Str terms-in-context is observationally equivalent. Using the fully abstract game semantics of RML, our algorithm reduces the problem to the language equivalence of visibly pushdown automata. When restricted to terms in canonical form, the problem is EXPTIME-complete.

[1]  Andrzej S. Murawski,et al.  Idealized Algol with Ground Recursion, and DPDA Equivalence , 2005, ICALP.

[2]  Andrew M. Pitts,et al.  Higher order operational techniques in semantics , 1999 .

[3]  Robin Milner,et al.  On Observing Nondeterminism and Concurrency , 1980, ICALP.

[4]  Andrzej S. Murawski About the undecidability of program equivalence in finitary languages with state , 2005, TOCL.

[5]  Peter W. O'Hearn,et al.  Algol-like Languages , 1997, Progress in Theoretical Computer Science.

[6]  Derek Dreyer,et al.  State-dependent representation independence , 2009, POPL '09.

[7]  Andrzej S. Murawski Functions with local state: Regularity and undecidability , 2005, Theor. Comput. Sci..

[8]  Ian David Bede Stark,et al.  Names and higher-order functions , 1994 .

[9]  Samson Abramsky,et al.  A fully abstract game semantics for general references , 1998, Proceedings. Thirteenth Annual IEEE Symposium on Logic in Computer Science (Cat. No.98CB36226).

[10]  Dan R. Ghica,et al.  The regular-language semantics of second-order idealized ALGOL , 2003, Theor. Comput. Sci..

[11]  C.-H. Luke Ong,et al.  On Full Abstraction for PCF: I, II, and III , 2000, Inf. Comput..

[12]  Andrzej S. Murawski,et al.  Third-order Idealized Algol with iteration is decidable , 2008, Theor. Comput. Sci..

[13]  Andrzej S. Murawski,et al.  Block Structure vs. Scope Extrusion: Between Innocence and Omniscience , 2010, FoSSaCS.

[14]  Samson Abramsky,et al.  Call-by-Value Games , 1997, CSL.

[15]  Nobuko Yoshida,et al.  Game-Theoretic Analysis of Call-by-Value Computation , 1997, Theor. Comput. Sci..

[16]  Brian Campbell,et al.  Amortised Memory Analysis Using the Depth of Data Structures , 2009, ESOP.

[17]  Alex K. Simpson,et al.  Computational Adequacy in an Elementary Topos , 1998, CSL.

[18]  Samson Abramsky,et al.  Linearity, Sharing and State: a fully abstract game semantics for Idealized Algol with active expressions , 1996, Electron. Notes Theor. Comput. Sci..

[19]  John C. Reynolds,et al.  The essence of ALGOL , 1997 .

[20]  Ian Stark,et al.  Free-Algebra Models for the pi-Calculus , 2005, FoSSaCS.

[21]  Rajeev Alur,et al.  Visibly pushdown languages , 2004, STOC '04.

[22]  Andrzej S. Murawski,et al.  Algorithmic Nominal Game Semantics , 2011, ESOP.

[23]  Dan R. Ghica Regular-Language Semantics for a Call-by-Value Programming Language , 2001, MFPS.

[24]  Helmut Seidl Deciding Equivalence of Finite Tree Automata , 1990, SIAM J. Comput..

[25]  I. Stark,et al.  Operational reasoning for functions with local state , 1999 .

[26]  C.-H. Luke Ong,et al.  Homer: A Higher-Order Observational Equivalence Model checkER , 2009, CAV.