{"title":"Breaking Through the n3 Barrier: Faster Object Type Inference","authors":"F. Henglein","doi":"10.1002/(SICI)1096-9942(199901/03)5:1<57::AID-TAPO5>3.0.CO;2-U","DOIUrl":null,"url":null,"abstract":"Abadi and Cardelli [1] present a series of type systems for their object calculi, four of which are first-order. Palsberg [22] has shown how typability in each one of these systems can be decided in time O(n3) and space O(n2), where n is the size of an untyped object expression, using an algorithm based on dynamic transitive closure. \n \n \n \nIn this paper we improve each one of the four type inference problems from O(n3) to the following time complexities: [see article pdf to view table] \n \n \n \nFurthermore, our algorithms improve the space complexity from O(n2) to O(n) in each case. \n \n \n \nThe key ingredient that lets us “beat” the worst-case time and space complexity induced by general dynamic transitive closure or similar algorithmic methods is that object subtyping, in contrast to record subtyping, is invariant: an object type is a subtype of a “shorter” type with a subset of the method names if and only if the common components have equal types. © 1999 John Wiley & Sons, Inc.","PeriodicalId":293061,"journal":{"name":"Theory Pract. Object Syst.","volume":"4 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"1900-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"16","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Theory Pract. Object Syst.","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1002/(SICI)1096-9942(199901/03)5:1<57::AID-TAPO5>3.0.CO;2-U","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 16
突破n3障碍:更快的对象类型推断
Abadi和Cardelli[1]给出了他们的对象演算的一系列类型系统,其中四个是一阶的。Palsberg[22]展示了如何使用基于动态传递闭包的算法,在时间O(n3)和空间O(n2)中决定这些系统中的可类型性,其中n是无类型对象表达式的大小。在本文中,我们将四种类型推理问题中的每一个从O(n3)提高到以下时间复杂度:[见文章pdf查看表]此外,我们的算法在每种情况下将空间复杂度从O(n2)提高到O(n)。让我们“战胜”由一般动态传递闭包或类似算法方法引起的最坏情况的时间和空间复杂性的关键因素是,与记录子类型相比,对象子类型是不变的:当且仅当公共组件具有相同类型时,对象类型是具有方法名子集的“较短”类型的子类型。©1999 John Wiley & Sons, Inc
本文章由计算机程序翻译,如有差异,请以英文原文为准。