Ändra sökning
RefereraExporteraLänk till posten
Permanent länk

Direktlänk
Referera
Referensformat
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Annat format
Fler format
Språk
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Annat språk
Fler språk
Utmatningsformat
  • html
  • text
  • asciidoc
  • rtf
Measuring Polymorphism in Python Programs
Stockholms universitet, Samhällsvetenskapliga fakulteten, Institutionen för data- och systemvetenskap.
Antal upphovsmän: 2
2016 (Engelska)Ingår i: SIGPLAN notices, ISSN 0362-1340, E-ISSN 1558-1160, Vol. 51, nr 2, 114-128 s.Artikel i tidskrift (Refereegranskat) Published
Abstract [en]

Following the increased popularity of dynamic languages and their increased use in critical software, there have been many proposals to retrofit static type system to these languages to improve possibilities to catch bugs and improve performance. A key question for any type system is whether the types should be structural, for more expressiveness, or nominal, to carry more meaning for the programmer. For retrofitted type systems, it seems the current trend is using structural types. This paper attempts to answer the question to what extent this extra expressiveness is needed, and how the possible polymorphism in dynamic code is used in practise. We study polymorphism in 36 real-world open source Python programs and approximate to what extent nominal and structural types could be used to type these programs. The study is based on collecting traces from multiple runs of the programs and analysing the polymorphic degrees of targets at more than 7 million call-sites. Our results show that while polymorphism is used in all programs, the programs are to a great extent monomorphic. The polymorphism found is evenly distributed across libraries and program-specific code and occur both during program start-up and normal execution. Most programs contain a few megamorphic call-sites where receiver types vary widely. The non-monomorphic parts of the programs can to some extent be typed with nominal or structural types, but none of the approaches can type entire programs.

Ort, förlag, år, upplaga, sidor
2016. Vol. 51, nr 2, 114-128 s.
Nyckelord [en]
Python, dynamic languages, polymorphism, trace-based analysis
Nationell ämneskategori
Data- och informationsvetenskap
Identifikatorer
URN: urn:nbn:se:su:diva-131566DOI: 10.1145/2816707.2816717ISI: 000376395600010OAI: oai:DiVA.org:su-131566DiVA: diva2:943878
Tillgänglig från: 2016-06-28 Skapad: 2016-06-21 Senast uppdaterad: 2016-06-28Bibliografiskt granskad

Open Access i DiVA

Fulltext saknas

Övriga länkar

Förlagets fulltext

Sök vidare i DiVA

Av författaren/redaktören
Åkerblom, Beatrice
Av organisationen
Institutionen för data- och systemvetenskap
I samma tidskrift
SIGPLAN notices
Data- och informationsvetenskap

Sök vidare utanför DiVA

GoogleGoogle Scholar

Altmetricpoäng

Totalt: 6 träffar
RefereraExporteraLänk till posten
Permanent länk

Direktlänk
Referera
Referensformat
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Annat format
Fler format
Språk
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Annat språk
Fler språk
Utmatningsformat
  • html
  • text
  • asciidoc
  • rtf