Solving regular path queries

被引:0
作者
Liu, YA [1 ]
Yu, FX [1 ]
机构
[1] SUNY Stony Brook, Comp Sci Dept, Stony Brook, NY 11794 USA
来源
MATHEMATICS OF PROGRAM CONSTRUCTION | 2002年 / 2386卷
关键词
D O I
暂无
中图分类号
TP301 [理论、方法];
学科分类号
081202 ;
摘要
Regular path queries are a way of declaratively specifying program analyses as a kind of regular expressions that are matched against paths in graph representations of programs. These and similar queries are useful for other path analysis problems as well. This paper describes the precise specification, derivation, and analysis of a complete algorithm and data structures for solving regular path queries. We first show two ways of specifying the problem and deriving a high-level algorithmic solution, using predicate logic and language inclusion, respectively. Both lead to a set-based fixed-point specification. We then derive a complete implementation from this specification using Paige's methods that consist of dominated convergence, finite differencing, and real-time simulation. This formal derivation allows us to analyse the time and space complexity of the implementation precisely in terms of size parameters of the graph and the deterministic finite automaton that corresponds to the regular expression. In particular, the time and space complexity is linear in the size of the graph. We also note that the problem is PSPACE-complete in terms of the size of the regular expression. In applications such as program analysis, the size of the graph may be very large, but the size of the regular expression is small and can be considered a constant.
引用
收藏
页码:195 / 208
页数:14
相关论文
共 18 条
[1]  
Aho A. V., 1983, DATA STRUCTURES ALGO
[2]   PROGRAM DERIVATION BY FIXED-POINT COMPUTATION [J].
CAI, J ;
PAIGE, R .
SCIENCE OF COMPUTER PROGRAMMING, 1989, 11 (03) :197-261
[3]  
Cai Jiazhen, 1991, CONSTRUCTING PROGRAM, P126
[4]   From regular expressions to DFA's using compressed NFA's [J].
Chang, CH ;
Paige, R .
THEORETICAL COMPUTER SCIENCE, 1997, 178 (1-2) :1-36
[5]  
DEMOOR O, 2001, HIGHER ORDER SYMBOLI
[6]  
DU DZ, 2000, WIL INT S D, P3
[7]   Efficiency by incrementalization: an introduction [J].
Liu, Yanhong A. .
2000, Kluwer Academic Publishers, Dordrecht, Netherlands (13)
[8]  
Müller-Olm M, 1999, LECT NOTES COMPUT SC, V1694, P330
[9]   FINITE DIFFERENCING OF COMPUTABLE EXPRESSIONS [J].
PAIGE, R ;
KOENIG, S .
ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS, 1982, 4 (03) :402-454
[10]   PROGRAMMING WITH INVARIANTS [J].
PAIGE, R .
IEEE SOFTWARE, 1986, 3 (01) :56-69