Mining inline cache data to order inferred types in dynamic languages.

Saved in:
Bibliographic Details
Title: Mining inline cache data to order inferred types in dynamic languages.
Authors: Milojković, Nevena1 nevena@inf.unibe.ch, Béra, Clément2, Ghafari, Mohammad1, Nierstrasz, Oscar1
Source: Science of Computer Programming. Sep2018, Vol. 161, p105-121. 17p.
Subjects: Dylan (Computer program language), Cache memory, Algorithms, Smalltalk (Computer program language), Run time systems (Computer science)
Abstract: The lack of static type information in dynamically-typed languages often poses obstacles for developers. Type inference algorithms can help, but inferring precise type information requires complex algorithms that are often slow. A simple approach that considers only the locally used interface of variables can identify potential classes for variables, but popular interfaces can generate a large number of false positives. We propose an approach called inline-cache type inference (ICTI) to augment the precision of fast and simple type inference algorithms. ICTI uses type information available in the inline caches during multiple software runs, to provide a ranked list of possible classes that most likely represent a variable's type. We evaluate ICTI through a proof-of-concept that we implement in Pharo Smalltalk. The analysis of the top- n + 2 inferred types (where n is the number of recorded run-time types for a variable) for 5486 variables from four different software systems shows that ICTI produces promising results for about 75% of the variables. For more than 90% of variables, the correct run-time type is present among first six inferred types. Our ordering shows a twofold improvement when compared with the unordered basic approach, i.e. , for a significant number of variables for which the basic approach offered ambiguous results, ICTI was able to promote the correct type to the top of the list. [ABSTRACT FROM AUTHOR]
Copyright of Science of Computer Programming is the property of Elsevier B.V. and its content may not be copied or emailed to multiple sites without the copyright holder's express written permission. Additionally, content may not be used with any artificial intelligence tools or machine learning technologies. However, users may print, download, or email articles for individual use. This abstract may be abridged. No warranty is given about the accuracy of the copy. Users should refer to the original published version of the material for the full abstract. (Copyright applies to all Abstracts.)
Database: Engineering Source
FullText Text:
  Availability: 0
Header DbId: egs
DbLabel: Engineering Source
An: 129647089
AccessLevel: 6
PubType: Academic Journal
PubTypeId: academicJournal
PreciseRelevancyScore: 0
IllustrationInfo
Items – Name: Title
  Label: Title
  Group: Ti
  Data: Mining inline cache data to order inferred types in dynamic languages.
– Name: Author
  Label: Authors
  Group: Au
  Data: <searchLink fieldCode="AR" term="%22Milojković%2C+Nevena%22">Milojković, Nevena</searchLink><relatesTo>1</relatesTo><i> nevena@inf.unibe.ch</i><br /><searchLink fieldCode="AR" term="%22Béra%2C+Clément%22">Béra, Clément</searchLink><relatesTo>2</relatesTo><br /><searchLink fieldCode="AR" term="%22Ghafari%2C+Mohammad%22">Ghafari, Mohammad</searchLink><relatesTo>1</relatesTo><br /><searchLink fieldCode="AR" term="%22Nierstrasz%2C+Oscar%22">Nierstrasz, Oscar</searchLink><relatesTo>1</relatesTo>
– Name: TitleSource
  Label: Source
  Group: Src
  Data: <searchLink fieldCode="JN" term="%22Science+of+Computer+Programming%22">Science of Computer Programming</searchLink>. Sep2018, Vol. 161, p105-121. 17p.
– Name: Subject
  Label: Subjects
  Group: Su
  Data: <searchLink fieldCode="DE" term="%22Dylan+%28Computer+program+language%29%22">Dylan (Computer program language)</searchLink><br /><searchLink fieldCode="DE" term="%22Cache+memory%22">Cache memory</searchLink><br /><searchLink fieldCode="DE" term="%22Algorithms%22">Algorithms</searchLink><br /><searchLink fieldCode="DE" term="%22Smalltalk+%28Computer+program+language%29%22">Smalltalk (Computer program language)</searchLink><br /><searchLink fieldCode="DE" term="%22Run+time+systems+%28Computer+science%29%22">Run time systems (Computer science)</searchLink>
– Name: Abstract
  Label: Abstract
  Group: Ab
  Data: The lack of static type information in dynamically-typed languages often poses obstacles for developers. Type inference algorithms can help, but inferring precise type information requires complex algorithms that are often slow. A simple approach that considers only the locally used interface of variables can identify potential classes for variables, but popular interfaces can generate a large number of false positives. We propose an approach called inline-cache type inference (ICTI) to augment the precision of fast and simple type inference algorithms. ICTI uses type information available in the inline caches during multiple software runs, to provide a ranked list of possible classes that most likely represent a variable's type. We evaluate ICTI through a proof-of-concept that we implement in Pharo Smalltalk. The analysis of the top- n + 2 inferred types (where n is the number of recorded run-time types for a variable) for 5486 variables from four different software systems shows that ICTI produces promising results for about 75% of the variables. For more than 90% of variables, the correct run-time type is present among first six inferred types. Our ordering shows a twofold improvement when compared with the unordered basic approach, i.e. , for a significant number of variables for which the basic approach offered ambiguous results, ICTI was able to promote the correct type to the top of the list. [ABSTRACT FROM AUTHOR]
– Name: AbstractSuppliedCopyright
  Label:
  Group: Ab
  Data: <i>Copyright of Science of Computer Programming is the property of Elsevier B.V. and its content may not be copied or emailed to multiple sites without the copyright holder's express written permission. Additionally, content may not be used with any artificial intelligence tools or machine learning technologies. However, users may print, download, or email articles for individual use. This abstract may be abridged. No warranty is given about the accuracy of the copy. Users should refer to the original published version of the material for the full abstract.</i> (Copyright applies to all Abstracts.)
PLink https://search.ebscohost.com/login.aspx?direct=true&site=eds-live&db=egs&AN=129647089
RecordInfo BibRecord:
  BibEntity:
    Identifiers:
      – Type: doi
        Value: 10.1016/j.scico.2017.11.003
    Languages:
      – Code: eng
        Text: English
    PhysicalDescription:
      Pagination:
        PageCount: 17
        StartPage: 105
    Subjects:
      – SubjectFull: Dylan (Computer program language)
        Type: general
      – SubjectFull: Cache memory
        Type: general
      – SubjectFull: Algorithms
        Type: general
      – SubjectFull: Smalltalk (Computer program language)
        Type: general
      – SubjectFull: Run time systems (Computer science)
        Type: general
    Titles:
      – TitleFull: Mining inline cache data to order inferred types in dynamic languages.
        Type: main
  BibRelationships:
    HasContributorRelationships:
      – PersonEntity:
          Name:
            NameFull: Milojković, Nevena
      – PersonEntity:
          Name:
            NameFull: Béra, Clément
      – PersonEntity:
          Name:
            NameFull: Ghafari, Mohammad
      – PersonEntity:
          Name:
            NameFull: Nierstrasz, Oscar
    IsPartOfRelationships:
      – BibEntity:
          Dates:
            – D: 01
              M: 09
              Text: Sep2018
              Type: published
              Y: 2018
          Identifiers:
            – Type: issn-print
              Value: 01676423
          Numbering:
            – Type: volume
              Value: 161
          Titles:
            – TitleFull: Science of Computer Programming
              Type: main
ResultId 1