A Rewriting Logic Approach to Type Inference

被引:0
|
作者
Ellison, Chucky [1 ]
Serbanuta, Traian Florin [1 ]
Rosu, Grigore [1 ]
机构
[1] Univ Illinois, Dept Comp Sci, Urbana, IL USA
关键词
SEMANTICS; LANGUAGE;
D O I
暂无
中图分类号
TP301 [理论、方法];
学科分类号
081202 ;
摘要
Meseguer and Rosu proposed rewriting logic semantics (RLS) as a programing language definitional framework that unifies operational and algebraic denotational semantics. RLS has already been used to define a series of didactic and real languages, but its benefits in connection with defining and reasoning about type systems have riot been fully investigated. This paper shows how the same RLS style employed for giving formal definitions of languages can be used to define type systems. The same term-rewriting mechanism used to execute RLS language definitions can now be used to execute type systems, giving type checkers or type inferencers. The proposed approach is exemplified by defining the Hindley-Milner polymorphic type inferencer W as a rewrite logic theory and using this definition to obtain a type inferencer by executing it in a rewriting logic engine. The inferencer obtained this way compares favorably with other definitions or implementations of W. The performance of the executable definition is within air order of magnitude of that of highly optimized implementations of type inferencers, such as that of OCaml.
引用
收藏
页码:135 / 151
页数:17
相关论文
共 50 条
  • [1] A rewriting semantics for type inference
    Kuan, George
    MacQueen, David
    Findler, Robert Bruce
    [J]. PROGRAMMING LANGUAGES AND SYSTEMS, PROCEEDINGS, 2007, 4421 : 426 - +
  • [2] A rewriting logic approach to operational semantics
    Serbanuta, Traian Florin
    Rosu, Grigore
    Meseguer, Jose
    [J]. INFORMATION AND COMPUTATION, 2009, 207 (02) : 305 - 340
  • [3] Regular Language Type Inference with Term Rewriting
    Haudebourg, Timothee
    Genet, Thomas
    Jensen, Thomas
    [J]. PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2020, 4 (ICFP):
  • [4] An approach to declarative programming based on a rewriting logic
    González-Moreno, JC
    Hortalá-González, MT
    López-Fraguas, FJ
    Rodríguez-Artalejo, M
    [J]. JOURNAL OF LOGIC PROGRAMMING, 1999, 40 (01): : 47 - 87
  • [5] Transforming Proof Tableaux of Hoare Logic into Inference Sequences of Rewriting Induction
    Mizutani, Shinnosuke
    Nishida, Naoki
    [J]. ELECTRONIC PROCEEDINGS IN THEORETICAL COMPUTER SCIENCE, 2018, (265): : 35 - 51
  • [6] A Rewriting Logic Approach to Operational Semantics (Extended Abstract)
    Serbanuta, Traian Florin
    Rosu, Grigore
    Meseguer, Jose
    [J]. ELECTRONIC NOTES IN THEORETICAL COMPUTER SCIENCE, 2007, 192 (01) : 125 - 141
  • [7] Type Inference by Coinductive Logic Programming
    DISI, Univ. of Genova, v. Dodecaneso 35, Genova 16146, Italy
    [J]. Lect. Notes Comput. Sci., (1-18):
  • [8] Type Inference by Coinductive Logic Programming
    Ancona, Davide
    Lagorio, Giovanni
    Zucca, Elena
    [J]. TYPES FOR PROOFS AND PROGRAMS, 2009, 5497 : 1 - 18
  • [9] Directional type inference for logic programs
    Charatonik, W
    Podelski, A
    [J]. STATIC ANALYSIS, 1998, 1503 : 278 - 294
  • [10] Data Type Inference for Logic Programming
    Barbosa, Joao
    Florido, Mario
    Costa, Vitor Santos
    [J]. LOGIC-BASED PROGRAM SYNTHESIS AND TRANSFORMATION (LOPSTR 2021), 2022, 13290 : 16 - 37