Type inference for unique pattern matching

被引:14
|
作者
Vansummeren, Stijn [1 ]
机构
[1] Hasselt Univ, Dept WNI, B-3590 Diepenbeek, Belgium
关键词
pattern matching; disambiguation policies; programming languages; XML;
D O I
10.1145/1133651.1133652
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Regular expression patterns provide a natural, declarative way to express constraints on semistructured data and to extract relevant information from it. Indeed, it is a core feature of the programming language Perl, surfaces in various UNIX tools such as sed and awk, and has recently been proposed in the context of the XML programming language XDuce. Since regular expressions can be ambiguous in general, different disambiguation policies have been proposed to get a unique matching strategy. We formally define the matching semantics under both (1) the POSIX, and (2) the first and longest match disambiguation strategies. We show that the generally accepted method of defining the longest match in terms of the first match and recursion does not conform to the natural notion of longest match. We continue by solving the type inference problem for both disambiguation strategies, which consists of calculating the set of all subparts of input values a subexpression can match under the given policy.
引用
收藏
页码:389 / 428
页数:40
相关论文
共 50 条
  • [1] Type Inference for Regular Expression Pattern Matching
    Marin, Mircea
    Craciun, Adrian
    12TH INTERNATIONAL SYMPOSIUM ON SYMBOLIC AND NUMERIC ALGORITHMS FOR SCIENTIFIC COMPUTING (SYNASC 2010), 2011, : 366 - 373
  • [2] Type inference with extended pattern matching and subtypes
    Jategaonkar, Lalita A.
    Mitchell, John C.
    Fundamenta Informaticae, 1993, 19 (1-2) : 127 - 165
  • [3] A Dependently Typed Calculus with Pattern Matching and Erasure Inference
    Tejiscak, Matus
    PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2020, 4 (ICFP):
  • [4] Associative Pattern Matching and Inference Using Associative Graph Data Structures
    Horzyk, Adrian
    Czajkowska, Agata
    ARTIFICIAL INTELLIGENCE AND SOFT COMPUTING, ICAISC 2019, PT II, 2019, 11509 : 371 - 383
  • [5] PATTERN-MATCHING MACHINE IMPLEMENTATION OF A FAST TEST FOR UNIQUE DECIPHERABILITY
    APOSTOLICO, A
    GIANCARLO, R
    INFORMATION PROCESSING LETTERS, 1984, 18 (03) : 155 - 158
  • [6] A Very Unique, Fast and Efficient Approach for Pattern Matching (The Jumping Algorithm)
    Fatehpuria, Suresh
    Goyal, Ankur
    2014 INTERNATIONAL CONFERENCE ON ADVANCED COMMUNICATION CONTROL AND COMPUTING TECHNOLOGIES (ICACCCT), 2014, : 1241 - 1245
  • [7] Static Type Analysis of Pattern Matching by Abstract Interpretation
    Ferrara, Pietro
    FORMAL TECHNIQUES FOR DISTRIBUTED SYSTEMS, PROCEEDINGS, 2010, 6117 : 186 - 200
  • [8] Adaptive neuro fuzzy inference system for chart pattern matching in financial time series
    Wan, Yuqing
    Si, Yain-Whar
    APPLIED SOFT COMPUTING, 2017, 57 : 1 - 18
  • [9] Is the HEFT matching unique?
    Dawson, Sally
    Fontes, Duarte
    Quezada-Calonge, Carlos
    Sanz-Cillero, Juan Jose
    PHYSICAL REVIEW D, 2024, 109 (05)
  • [10] Intermediate Representation of Programs with Type Specification Based on Pattern Matching
    V. A. Vasenin
    M. A. Krivchikov
    Programming and Computer Software, 2020, 46 : 57 - 66