## Universal regular path queries (2003)

### Cached

### Download Links

- [www.dcs.warwick.ac.uk]
- [web.comlab.ox.ac.uk]
- [web.comlab.ox.ac.uk]
- [web.comlab.ox.ac.uk]
- DBLP

### Other Repositories/Bibliography

Venue: | Higher-Order and Symbolic Computation |

Citations: | 12 - 1 self |

### BibTeX

@INPROCEEDINGS{Moor03universalregular,

author = {Oege De Moor and David Lacey and Eric Van Wyk},

title = {Universal regular path queries},

booktitle = {Higher-Order and Symbolic Computation},

year = {2003},

pages = {16--1}

}

### Years of Citing Articles

### OpenURL

### Abstract

Given are a directed edge-labelled graph G with a distinguished node n0, and a regular expression P which may contain variables. We wish to compute all substitutions φ (of symbols for variables), together with all nodes n such that all paths n0 → n are in φ(P). We derive an algorithm for this problem using relational algebra, and show how it may be implemented in Prolog. The motivation for the problem derives from a declarative framework for specifying compiler optimisations. 1 Bob Paige and IFIP WG 2.1 Bob Paige was a long-standing member of IFIP Working Group 2.1 on Algorithmic Languages and Calculi. In recent years, the main aim of this group has been to investigate the derivation of algorithms from specifications by program transformation. Already in the mid-eighties, Bob was way ahead of the pack: instead of applying transformational techniques to well-worn examples, he was applying his theories of program transformation to new problems, and discovering new algorithms [16, 48, 52]. The secret of his success lay partly in his insistence on the study of general algorithm design strategies (in particular

### Citations

3836 | J.D.: Introduction to automata theory, languages, and computation - Hopcroft, Motwani, et al. |

1309 | Monads for Functional Programming
- Wadler
- 1995
(Show Context)
Citation Context ...computed these pairs, we check for each v that each of the ss it is paired up with contains asnal state in F . 4 A Haskell program We now aim to code the procedure given above as a program in Haskell =-=[11]-=-. The algebra [Init ; Step] that was formally derived in the previous section has an obvious interpretation in automata theory: it is the product automaton of thesow graph G = [InitG ; StepG ] with th... |

955 |
Advanced Compiler Design and Implementation
- Muchnick
- 1997
(Show Context)
Citation Context ...ions, although there have been many proposals, e.g. [4, 10, 17, 25, 31, 41, 43, 61–63]. In a traditional compiler, the optimising transformations are typically performed as rewrites on the flow graph =-=[2, 3, 46]-=-. The difficulty lies in the specification of the necessary side conditions. For example, consider constant propagation. In essence, it is simply the rewrite rule x := y ⇒ x := c where y is a program ... |

298 | Functional programming with bananas, lenses, envelopes and barbed wire
- Meijer, Fokkinga, et al.
- 1991
(Show Context)
Citation Context ... single pass over xs. Formally, there exists a composite machine G ⊗ P ′ such that a b c a 5,{7,8} 〈([G]), ([P ′ ])〉 = ([G ⊗ P ′ ]) . (5) This identity is affectionately known as the banana-split law =-=[44]-=-. It was not invented to reason about automata, but rather to capture the tupling transformation [23, 54] in a calculational style. Again we leave it to the interested reader to work out the detailed ... |

285 | Index structures for path expressions
- Milo, Suciu
- 1999
(Show Context)
Citation Context ...n requiring that all paths (between the relevant vertices) are in the regular language. It would be interesting to investigate whether the techniques used to speed up existential regular path queries =-=[45]-=- can be adapted for universal queries as well. This connection with database research also follows a lead of Bob Paige: his own language for expressing side conditions of transformations in APTS [49] ... |

179 |
The Synthesizer Generator: A System for Constructing Language–Based Editors
- Reps, Teitelbaum
- 1988
(Show Context)
Citation Context ...be generated from declarative specifications: for instance, there are commonly used tools for syntax analysis (lex and yacc), for semantic analysis (attribute grammar systems such as FNC-2 and the SG =-=[39, 56]-=-) and also for instruction selection (IBURG [33]). There is however no such widely accepted tool for the declarative specification of optimising transformations, although there have been many proposal... |

131 |
Modern Compiler Implementation in ML
- Appel
- 1998
(Show Context)
Citation Context ...ions, although there have been many proposals, e.g. [4, 10, 17, 25, 31, 41, 43, 61–63]. In a traditional compiler, the optimising transformations are typically performed as rewrites on the flow graph =-=[2, 3, 46]-=-. The difficulty lies in the specification of the necessary side conditions. For example, consider constant propagation. In essence, it is simply the rewrite rule x := y ⇒ x := c where y is a program ... |

111 | Engineering a simple, efficient codegenerator generator
- FRASER, HANSON, et al.
- 1992
(Show Context)
Citation Context ...stance, there are commonly used tools for syntax analysis (lex and yacc), for semantic analysis (attribute grammar systems such as FNC-2 and the SG [39, 56]) and also for instruction selection (IBURG =-=[33]-=-). There is however no such widely accepted tool for the declarative specification of optimising transformations, although there have been many proposals, e.g. [4, 10, 17, 25, 31, 41, 43, 61–63]. In a... |

111 |
Finite Differencing of Computable Expressions
- Paige, Koenig
- 1982
(Show Context)
Citation Context ...ew problems, and discovering new algorithms [16, 48, 52]. The secret of his success lay partly in his insistence on the study of general algorithm design strategies (in particular finite differencing =-=[47, 51]-=- and data structure selection [19]) rather than the study of tiny derivational steps that some of the working group had focussed on. His success in the systematic discovery of new algorithms was in it... |

109 | A Tolmach. Building program optimizers with rewriting strategies - Visser, Benaissa - 1998 |

107 | UnQL: A query language and algebra for semistructured data based on structural recursion
- Buneman, Fernandez, et al.
(Show Context)
Citation Context ...ect in the database community. In particular, the query language UnQL provides the possibility of querying hierarchically structured data through the use of regular expressions that contain variables =-=[18]-=-. The queries are existential in that it suffices to find some path that is in the regular language, rather than requiring that all paths (between the relevant vertices) are in the regular language. I... |

90 |
Fast algorithms for solving path problems
- Tarjan
- 1981
(Show Context)
Citation Context ...this motivated the exploration of universal regular path queries. In hindsight it is a very obvious thing to do, given the close connection between path problems, regular algebra and program analysis =-=[6, 60, 61]-=-. It remains to be seen how the algorithm presented here compares in practice with our use of a model checker. Two of us (Van Wyk and Lacey) have been working on a method of proving the correctness of... |

72 | An Approach for Exploring Code-Improving Transformations - Whitfield, Soffa - 1997 |

70 | Sharlit -- A Tool for Building Optimizers
- Tjiang, Hennessy
- 1992
(Show Context)
Citation Context ...this motivated the exploration of universal regular path queries. In hindsight it is a very obvious thing to do, given the close connection between path problems, regular algebra and program analysis =-=[6, 60, 61]-=-. It remains to be seen how the algorithm presented here compares in practice with our use of a model checker. Two of us (Van Wyk and Lacey) have been working on a method of proving the correctness of... |

55 |
The weakest prespecification
- Hoare, He
- 1986
(Show Context)
Citation Context ... S ⊆ R. Expressed as an equivalence, that means T ⊆ R/S ≡ T · S ⊆ R , for all T : X ← Y . Readers familiar with relational semantics of imperative programs will recognise the weakest prespecification =-=[34, 35]-=- in this formula. Specification Here is the problem that we wish to solve: compute each node n of the flow graph such that ∀xs ∈ A ∗ : n([G])xs ⇒ xs ∈ L(F , P) . We could also have formulated that req... |

53 | Proving correctness of compiler optimizations by temporal logic
- Lacey, Jones, et al.
- 2002
(Show Context)
Citation Context ... Two of us (Van Wyk and Lacey) have been working on a method of proving the correctness of program transformations whose side conditions are stated in temporal logic, in collaboration with Neil Jones =-=[42-=-]. It was a draft of their paper that prompted the exploration of a simplied formalism for the side conditions. It appears that the proof methods for the temporal formalism carry over without much mod... |

50 |
Data flow analysis as model checking
- Steffen
(Show Context)
Citation Context ...ve specified the side conditions of such transformations in a variant of temporal logic [42], inspired by the work of Steffen and his coworkers on specifying data flow analyses through temporal logic =-=[59]-=-. The formulae in temporal logic are verified using a model checker, which also finds instantiations of free variables. We noticed that many of our examples do not use the full power of temporal logic... |

49 | Merging Monads and Folds for Functional Programming
- Meijer, Jeuring
- 1995
(Show Context)
Citation Context ...titutions, we attempt to join it with the current substitution . If there are no con icts, the result is Just , and we proceed as before, using a monadic fold operator in lieu of the ordinary foldl [4=-=5-=-]. If, however, the two substitutions andscannot be combined, we have reached a dead end in the search, and the result of query 0 is the empty set. The new type of followers is followers :: FlowGraph... |

41 | Transformational design and implementation of a new efficient solution to the ready simulation problem
- Bloom, Paige
- 1995
(Show Context)
Citation Context ...as way ahead of the pack: instead of applying transformational techniques to well-worn examples, he was applying his theories of program transformation to new problems, and discovering new algorithms =-=[16, 48, 52]-=-. The secret of his success lay partly in his insistence on the study of general algorithm design strategies (in particular finite differencing [47, 51] and data structure selection [19]) rather than ... |

41 | Efficient tabling mechanisms for logic programs
- RAMAKRISHNAN, RAO, et al.
- 1995
(Show Context)
Citation Context ...nsformations and the associated path queries are known; the queries are then run when we also have a flow graph to transform. The particular implementation of Prolog that we have chosen is called XSB =-=[55, 58]-=-. It is particularly 11ssuitable for experiments in program transformation and analysis [24]. 3.1 Common Subexpression Elimination Common subexpression elimination is applicable at node N if all paths... |

35 | A Relational Theory of Datatypes - Backhouse, Hoogendijk, et al. - 1992 |

35 | Imperative program transformation by rewriting
- Lacey, Moor
- 2001
(Show Context)
Citation Context ...rger effort to construct a toolkit for easy experimentation with compiler optimisations. In previous work, we have specified the side conditions of such transformations in a variant of temporal logic =-=[42]-=-, inspired by the work of Steffen and his coworkers on specifying data flow analyses through temporal logic [59]. The formulae in temporal logic are verified using a model checker, which also finds in... |

34 | From regular expressions to DFAs using compressed NFAs
- Chang, Paige
- 1992
(Show Context)
Citation Context ...o see a further exploration of automata and language theory in this style (see also [5, 13, 53]). The application of program transformation to algorithms involving automata was pioneered by Bob Paige =-=[16, 22, 40]-=-. Very recently we became aware that existential regular path queries are a well studied subject in the database community. In particular, the query language UnQL provides the possibility of querying ... |

32 |
Programming with invariants
- Paige
- 1986
(Show Context)
Citation Context ...ew problems, and discovering new algorithms [16, 48, 52]. The secret of his success lay partly in his insistence on the study of general algorithm design strategies (in particular finite differencing =-=[47, 51]-=- and data structure selection [19]) rather than the study of tiny derivational steps that some of the working group had focussed on. His success in the systematic discovery of new algorithms was in it... |

31 | O.: Categories, relations and dynamic programming - Moor - 1992 |

30 |
Automata in general algebras
- Eilenberg, Wright
- 1967
(Show Context)
Citation Context ...Indeed, fold-left exactly operates like a deterministic state machine, with initial state init and transition relation step. In a pioneering paper on algebra and automata theory, Eilenberg and Wright =-=[30]-=- have shown that fold-left can be generalised to take relational arguments. This has the obvious intuitive interpretation, where each application of step makes a nondeterministic choice among the poss... |

29 | Regular algebra applied to path-finding problems
- Backhouse, Carré
- 1975
(Show Context)
Citation Context ...this motivated the exploration of universal regular path queries. In hindsight it is a very obvious thing to do, given the close connection between path problems, regular algebra and program analysis =-=[6, 60, 61]-=-. It remains to be seen how the algorithm presented here compares in practice with our use of a model checker. Two of us (Van Wyk and Lacey) have been working on a method of proving the correctness of... |

29 | der Woude. Relational catamorphisms - Backhouse, Bruin, et al. - 1991 |

29 |
Bonic R.: A linear time solution to the single function coarsest partition problem. Theoretical Computer Science 40
- Paige, Tarjan
- 1985
(Show Context)
Citation Context ...as way ahead of the pack: instead of applying transformational techniques to well-worn examples, he was applying his theories of program transformation to new problems, and discovering new algorithms =-=[16, 48, 52]-=-. The secret of his success lay partly in his insistence on the study of general algorithm design strategies (in particular finite differencing [47, 51] and data structure selection [19]) rather than ... |

27 | How to Uniformly Specify Program Analysis and Transformations with Graph Rewrite Systems - Assmann - 1996 |

27 | der Woude. Polynomial relators - Backhouse, Bruin, et al. - 1992 |

26 | Viewing a program transformation system at work
- Paige
- 1994
(Show Context)
Citation Context ...n. His success in the systematic discovery of new algorithms was in itself remarkable, but perhaps even more impressive was the fact that he succeeded in automating his derivations in the APTS system =-=[20, 49]-=-. This provided the ultimate proof that he had succeeded in identifying deep principles in algorithm design: an automated derivation leaves no room for cheating. The mechanism for applying transformat... |

25 | der Woude. A relational theory of datatypes. Available via World-Wide Web at http://www.cs.nott.ac.uk/~rcb/MPC/papers - Backhouse, Voermans, et al. - 1992 |

25 |
Finite di erencing of computable expressions
- Paige, Koenig
- 1982
(Show Context)
Citation Context ...o new problems, and discovering new algorithms [16, 48, 52]. The secret of his success lay partly in his insistence on the study of general algorithm design strategies (in particularsnite dierencing [=-=47, 51]-=- and data structure selection [19]) rather than the study of tiny derivational steps that some of the working group had focussed on. His success in the systematic discovery of new algorithms was in it... |

22 | More efficient bottom-up multipattern matching in trees
- Cai, Paige, et al.
- 1990
(Show Context)
Citation Context ...vation leaves no room for cheating. The mechanism for applying transformations in the APTS system was that of rewrite rules, and a fast pattern matching algorithm (invented, naturally, by Bob himself =-=[21]-=-) provided the basic engine. The rules could have side conditions expressed as queries on a ‘database’ of facts about the program under consideration. The facts in the database could be any result of ... |

20 |
Design, implementation and evaluation of the FNC-2 attribute grammar system
- Jourdan, Parigot, et al.
- 1990
(Show Context)
Citation Context ...be generated from declarative specifications: for instance, there are commonly used tools for syntax analysis (lex and yacc), for semantic analysis (attribute grammar systems such as FNC-2 and the SG =-=[39, 56]-=-) and also for instruction selection (IBURG [33]). There is however no such widely accepted tool for the declarative specification of optimising transformations, although there have been many proposal... |

19 |
Towards increased productivity of algorithm implementation
- Cai, Paige
- 1993
(Show Context)
Citation Context ...n. His success in the systematic discovery of new algorithms was in itself remarkable, but perhaps even more impressive was the fact that he succeeded in automating his derivations in the APTS system =-=[20, 49]-=-. This provided the ultimate proof that he had succeeded in identifying deep principles in algorithm design: an automated derivation leaves no room for cheating. The mechanism for applying transformat... |

19 | KHEPERA: A system for rapid implementation of domain specific languages - Faith, Nyland, et al. - 1997 |

18 | Reductivity arguments and program construction - Doornbos - 1996 |

17 | DFA & OPT-METAFrame: a toolkit for program analysis and optimization - Klein, Knoop, et al. - 1996 |

16 | Induction and recursion on datatypes - Doornbos, Backhouse - 1995 |

15 | Type analysis and data structure selection
- Cai, Facon, et al.
- 1991
(Show Context)
Citation Context ...ithms [16, 48, 52]. The secret of his success lay partly in his insistence on the study of general algorithm design strategies (in particular finite differencing [47, 51] and data structure selection =-=[19]-=-) rather than the study of tiny derivational steps that some of the working group had focussed on. His success in the systematic discovery of new algorithms was in itself remarkable, but perhaps even ... |

14 | From dynamic programming to greedy algorithms - Bird, Moor - 1993 |

13 | Program derivation with verified transformations
- Keller, Paige
- 1995
(Show Context)
Citation Context ...o see a further exploration of automata and language theory in this style (see also [5, 13, 53]). The application of program transformation to algorithms involving automata was pioneered by Bob Paige =-=[16, 22, 40]-=-. Very recently we became aware that existential regular path queries are a well studied subject in the database community. In particular, the query language UnQL provides the possibility of querying ... |

12 |
Relational Program Derivation and Context–free Language Recognition
- Bird, Moor
- 1995
(Show Context)
Citation Context ...lem, but the proof turned out to be so pretty that we decided to include it in this paper. It would be interesting to see a further exploration of automata and language theory in this style (see also =-=[5, 13, 53]-=-). The application of program transformation to algorithms involving automata was pioneered by Bob Paige [16, 22, 40]. Very recently we became aware that existential regular path queries are a well st... |

11 | O.: Solving Optimisation Problems with Catamorphisms - Bird, Moor |

11 | Future directions in program transformations
- Paige
- 1997
(Show Context)
Citation Context ...am analyses. A major difficulty, which we repeatedly discussed with Bob, was to express the queries in a declarative meta-language, and to maintain the database incrementally as the rules are applied =-=[50]-=-. These remain major problems in the field of automated program transformation, and the present paper is a small contribution towards solving them. We follow Bob’s example in our attempt to derive the... |

10 |
Real-time simulation of a set machine on a
- Paige
- 1989
(Show Context)
Citation Context ...as way ahead of the pack: instead of applying transformational techniques to well-worn examples, he was applying his theories of program transformation to new problems, and discovering new algorithms =-=[16, 48, 52]-=-. The secret of his success lay partly in his insistence on the study of general algorithm design strategies (in particular finite differencing [47, 51] and data structure selection [19]) rather than ... |

9 | Generic programming with relations and functors - Bird, Hoogendijk, et al. - 1993 |

9 | Categories, relations and dynamic programming. D.Phil. thesis - Moor - 1992 |