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 条
  • [41] A rewriting logic semantics for NCL
    dos Santos, Joel
    Braga, Christiano
    Muchaluat-Saade, Debora C.
    [J]. SCIENCE OF COMPUTER PROGRAMMING, 2015, 107 : 64 - 92
  • [42] A Rewriting Logic Semantics for ATL
    Troya, Javier
    Vallecillo, Antonio
    [J]. JOURNAL OF OBJECT TECHNOLOGY, 2011, 10 : 1 - 29
  • [43] Compositional Specification in Rewriting Logic
    Martin, Oscar
    Verdejo, Alberto
    Marti-Oliet, Narciso
    [J]. THEORY AND PRACTICE OF LOGIC PROGRAMMING, 2020, 20 (01) : 44 - 98
  • [44] The Rewriting Logic Semantics Project
    Meseguer, Jose
    Rosu, Grigore
    [J]. ELECTRONIC NOTES IN THEORETICAL COMPUTER SCIENCE, 2006, 156 (01) : 27 - 56
  • [45] A Dynamic Logic for Termgraph Rewriting
    Balbiani, Philippe
    Echahed, Rachid
    Herzig, Andreas
    [J]. GRAPH TRANSFORMATIONS, 2010, 6372 : 59 - +
  • [46] The rewriting logic semantics project
    Meseguer, Jose
    Rosu, Grigore
    [J]. THEORETICAL COMPUTER SCIENCE, 2007, 373 (03) : 213 - 237
  • [47] Equational rules for rewriting logic
    Viry, P
    [J]. THEORETICAL COMPUTER SCIENCE, 2002, 285 (02) : 487 - 517
  • [48] Reflection in conditional rewriting logic
    Clavel, M
    Meseguer, J
    [J]. THEORETICAL COMPUTER SCIENCE, 2002, 285 (02) : 245 - 288
  • [49] LOGIC PROGRAMMING AS HYPERGRAPH REWRITING
    CORRADINI, A
    ROSSI, F
    PARISIPRESICCE, F
    [J]. LECTURE NOTES IN COMPUTER SCIENCE, 1991, 493 : 275 - 295
  • [50] Rewriting the History of Connexive Logic
    Lenzen, Wolfgang
    [J]. JOURNAL OF PHILOSOPHICAL LOGIC, 2022, 51 (03) : 525 - 553