A Sound Type System for Typing Runtime Errors

Dynamically typed languages such as Scheme are widely adopted because of their rich expressiveness. However, there is the drawback that dynamic typing cannot detect runtime errors at compile time. In this paper, we propose a type system which enables static detection of runtime errors. The key idea...

Ausführliche Beschreibung

Gespeichert in:
Bibliographische Detailangaben
Veröffentlicht in:IPSJ Online Transactions 2012, Vol.5, pp.96-104
Hauptverfasser: Yamada, Akihisa, Kusakari, Keiichirou, Sakabe, Toshiki, Sakai, Masahiko, Nishida, Naoki
Format: Artikel
Sprache:eng
Schlagworte:
Online-Zugang:Volltext
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
container_end_page 104
container_issue
container_start_page 96
container_title IPSJ Online Transactions
container_volume 5
creator Yamada, Akihisa
Kusakari, Keiichirou
Sakabe, Toshiki
Sakai, Masahiko
Nishida, Naoki
description Dynamically typed languages such as Scheme are widely adopted because of their rich expressiveness. However, there is the drawback that dynamic typing cannot detect runtime errors at compile time. In this paper, we propose a type system which enables static detection of runtime errors. The key idea of our approach is to introduce a special type, called the error type, for expressions that cause runtime errors. The proposed type system brings out the benefit of the error type with set-theoretic union, intersection and complement types, recursive types, parametric polymorphism and subtyping. While existing type systems usually ensure that evaluation never causes runtime errors for typed expressions, our system ensures that evaluation always causes runtime errors for expressions typed with the error type. Likewise, our system also ensures that evaluation never causes errors for expressions typed with any type that does not contain the error type. Under the usual definition of subtyping, it is difficult to syntactically prove the soundness of our type system. We redefine subtyping by introducing the notion of intransitive subtyping, and syntactically prove the soundness under the new definition.
doi_str_mv 10.2197/ipsjtrans.5.96
format Article
fullrecord <record><control><sourceid>proquest_cross</sourceid><recordid>TN_cdi_proquest_miscellaneous_1082208279</recordid><sourceformat>XML</sourceformat><sourcesystem>PC</sourcesystem><sourcerecordid>1082208279</sourcerecordid><originalsourceid>FETCH-LOGICAL-c3646-35777bee17e2a623d40e838f01fe4903f450a7b5e8536dfc365c8d6ca803587c3</originalsourceid><addsrcrecordid>eNpVkL1PwzAQxS0EEqWwMmdkSXDi-GssVSlIlZBomS3XOZdU-cKXDP3vSSmqYHi6O93vveERcp_SJEu1fCw73PfBNpjwRIsLMkmVymIhBL38s1-TG8Q9pUJpRicknkXrdmiKaHPoIFofsIc68m043mWzi96Hpi9riBYhtAFvyZW3FcLd75ySj-fFZv4Sr96Wr_PZKnZM5CJmXEq5BUglZFZkrMgpKKY8TT3kmjKfc2rlloPiTBR-NHGnCuGsoowr6diUPJxyu9B-DYC9qUt0UFW2gXZAk1KVZaOkHtHkhLrQIgbwpgtlbcNhhMyxF3PuxXCjxWh4Ohn22NsdnHEb-tJV8A-nP9Li_HSfNhho2DepHG_w</addsrcrecordid><sourcetype>Aggregation Database</sourcetype><iscdi>true</iscdi><recordtype>article</recordtype><pqid>1082208279</pqid></control><display><type>article</type><title>A Sound Type System for Typing Runtime Errors</title><source>J-STAGE Free</source><source>Elektronische Zeitschriftenbibliothek - Frei zugängliche E-Journals</source><creator>Yamada, Akihisa ; Kusakari, Keiichirou ; Sakabe, Toshiki ; Sakai, Masahiko ; Nishida, Naoki</creator><creatorcontrib>Yamada, Akihisa ; Kusakari, Keiichirou ; Sakabe, Toshiki ; Sakai, Masahiko ; Nishida, Naoki</creatorcontrib><description>Dynamically typed languages such as Scheme are widely adopted because of their rich expressiveness. However, there is the drawback that dynamic typing cannot detect runtime errors at compile time. In this paper, we propose a type system which enables static detection of runtime errors. The key idea of our approach is to introduce a special type, called the error type, for expressions that cause runtime errors. The proposed type system brings out the benefit of the error type with set-theoretic union, intersection and complement types, recursive types, parametric polymorphism and subtyping. While existing type systems usually ensure that evaluation never causes runtime errors for typed expressions, our system ensures that evaluation always causes runtime errors for expressions typed with the error type. Likewise, our system also ensures that evaluation never causes errors for expressions typed with any type that does not contain the error type. Under the usual definition of subtyping, it is difficult to syntactically prove the soundness of our type system. We redefine subtyping by introducing the notion of intransitive subtyping, and syntactically prove the soundness under the new definition.</description><identifier>ISSN: 1882-6660</identifier><identifier>EISSN: 1882-6660</identifier><identifier>DOI: 10.2197/ipsjtrans.5.96</identifier><language>eng</language><publisher>Information Processing Society of Japan</publisher><subject>Complement ; Dynamical systems ; dynamically typed languages ; Dynamics ; Error detection ; Errors ; On-line systems ; Polymorphism ; type systems ; Unions</subject><ispartof>IPSJ Online Transactions, 2012, Vol.5, pp.96-104</ispartof><rights>2012 by the Information Processing Society of Japan</rights><oa>free_for_read</oa><woscitedreferencessubscribed>false</woscitedreferencessubscribed><cites>FETCH-LOGICAL-c3646-35777bee17e2a623d40e838f01fe4903f450a7b5e8536dfc365c8d6ca803587c3</cites></display><links><openurl>$$Topenurl_article</openurl><openurlfulltext>$$Topenurlfull_article</openurlfulltext><thumbnail>$$Tsyndetics_thumb_exl</thumbnail><link.rule.ids>314,776,780,1877,4010,27900,27901,27902</link.rule.ids></links><search><creatorcontrib>Yamada, Akihisa</creatorcontrib><creatorcontrib>Kusakari, Keiichirou</creatorcontrib><creatorcontrib>Sakabe, Toshiki</creatorcontrib><creatorcontrib>Sakai, Masahiko</creatorcontrib><creatorcontrib>Nishida, Naoki</creatorcontrib><title>A Sound Type System for Typing Runtime Errors</title><title>IPSJ Online Transactions</title><addtitle>IPSJ Online Transactions</addtitle><description>Dynamically typed languages such as Scheme are widely adopted because of their rich expressiveness. However, there is the drawback that dynamic typing cannot detect runtime errors at compile time. In this paper, we propose a type system which enables static detection of runtime errors. The key idea of our approach is to introduce a special type, called the error type, for expressions that cause runtime errors. The proposed type system brings out the benefit of the error type with set-theoretic union, intersection and complement types, recursive types, parametric polymorphism and subtyping. While existing type systems usually ensure that evaluation never causes runtime errors for typed expressions, our system ensures that evaluation always causes runtime errors for expressions typed with the error type. Likewise, our system also ensures that evaluation never causes errors for expressions typed with any type that does not contain the error type. Under the usual definition of subtyping, it is difficult to syntactically prove the soundness of our type system. We redefine subtyping by introducing the notion of intransitive subtyping, and syntactically prove the soundness under the new definition.</description><subject>Complement</subject><subject>Dynamical systems</subject><subject>dynamically typed languages</subject><subject>Dynamics</subject><subject>Error detection</subject><subject>Errors</subject><subject>On-line systems</subject><subject>Polymorphism</subject><subject>type systems</subject><subject>Unions</subject><issn>1882-6660</issn><issn>1882-6660</issn><fulltext>true</fulltext><rsrctype>article</rsrctype><creationdate>2012</creationdate><recordtype>article</recordtype><recordid>eNpVkL1PwzAQxS0EEqWwMmdkSXDi-GssVSlIlZBomS3XOZdU-cKXDP3vSSmqYHi6O93vveERcp_SJEu1fCw73PfBNpjwRIsLMkmVymIhBL38s1-TG8Q9pUJpRicknkXrdmiKaHPoIFofsIc68m043mWzi96Hpi9riBYhtAFvyZW3FcLd75ySj-fFZv4Sr96Wr_PZKnZM5CJmXEq5BUglZFZkrMgpKKY8TT3kmjKfc2rlloPiTBR-NHGnCuGsoowr6diUPJxyu9B-DYC9qUt0UFW2gXZAk1KVZaOkHtHkhLrQIgbwpgtlbcNhhMyxF3PuxXCjxWh4Ohn22NsdnHEb-tJV8A-nP9Li_HSfNhho2DepHG_w</recordid><startdate>2012</startdate><enddate>2012</enddate><creator>Yamada, Akihisa</creator><creator>Kusakari, Keiichirou</creator><creator>Sakabe, Toshiki</creator><creator>Sakai, Masahiko</creator><creator>Nishida, Naoki</creator><general>Information Processing Society of Japan</general><scope>AAYXX</scope><scope>CITATION</scope><scope>7SC</scope><scope>8FD</scope><scope>JQ2</scope><scope>L7M</scope><scope>L~C</scope><scope>L~D</scope></search><sort><creationdate>2012</creationdate><title>A Sound Type System for Typing Runtime Errors</title><author>Yamada, Akihisa ; Kusakari, Keiichirou ; Sakabe, Toshiki ; Sakai, Masahiko ; Nishida, Naoki</author></sort><facets><frbrtype>5</frbrtype><frbrgroupid>cdi_FETCH-LOGICAL-c3646-35777bee17e2a623d40e838f01fe4903f450a7b5e8536dfc365c8d6ca803587c3</frbrgroupid><rsrctype>articles</rsrctype><prefilter>articles</prefilter><language>eng</language><creationdate>2012</creationdate><topic>Complement</topic><topic>Dynamical systems</topic><topic>dynamically typed languages</topic><topic>Dynamics</topic><topic>Error detection</topic><topic>Errors</topic><topic>On-line systems</topic><topic>Polymorphism</topic><topic>type systems</topic><topic>Unions</topic><toplevel>online_resources</toplevel><creatorcontrib>Yamada, Akihisa</creatorcontrib><creatorcontrib>Kusakari, Keiichirou</creatorcontrib><creatorcontrib>Sakabe, Toshiki</creatorcontrib><creatorcontrib>Sakai, Masahiko</creatorcontrib><creatorcontrib>Nishida, Naoki</creatorcontrib><collection>CrossRef</collection><collection>Computer and Information Systems Abstracts</collection><collection>Technology Research Database</collection><collection>ProQuest Computer Science Collection</collection><collection>Advanced Technologies Database with Aerospace</collection><collection>Computer and Information Systems Abstracts – Academic</collection><collection>Computer and Information Systems Abstracts Professional</collection><jtitle>IPSJ Online Transactions</jtitle></facets><delivery><delcategory>Remote Search Resource</delcategory><fulltext>fulltext</fulltext></delivery><addata><au>Yamada, Akihisa</au><au>Kusakari, Keiichirou</au><au>Sakabe, Toshiki</au><au>Sakai, Masahiko</au><au>Nishida, Naoki</au><format>journal</format><genre>article</genre><ristype>JOUR</ristype><atitle>A Sound Type System for Typing Runtime Errors</atitle><jtitle>IPSJ Online Transactions</jtitle><addtitle>IPSJ Online Transactions</addtitle><date>2012</date><risdate>2012</risdate><volume>5</volume><spage>96</spage><epage>104</epage><pages>96-104</pages><issn>1882-6660</issn><eissn>1882-6660</eissn><abstract>Dynamically typed languages such as Scheme are widely adopted because of their rich expressiveness. However, there is the drawback that dynamic typing cannot detect runtime errors at compile time. In this paper, we propose a type system which enables static detection of runtime errors. The key idea of our approach is to introduce a special type, called the error type, for expressions that cause runtime errors. The proposed type system brings out the benefit of the error type with set-theoretic union, intersection and complement types, recursive types, parametric polymorphism and subtyping. While existing type systems usually ensure that evaluation never causes runtime errors for typed expressions, our system ensures that evaluation always causes runtime errors for expressions typed with the error type. Likewise, our system also ensures that evaluation never causes errors for expressions typed with any type that does not contain the error type. Under the usual definition of subtyping, it is difficult to syntactically prove the soundness of our type system. We redefine subtyping by introducing the notion of intransitive subtyping, and syntactically prove the soundness under the new definition.</abstract><pub>Information Processing Society of Japan</pub><doi>10.2197/ipsjtrans.5.96</doi><tpages>9</tpages><oa>free_for_read</oa></addata></record>
fulltext fulltext
identifier ISSN: 1882-6660
ispartof IPSJ Online Transactions, 2012, Vol.5, pp.96-104
issn 1882-6660
1882-6660
language eng
recordid cdi_proquest_miscellaneous_1082208279
source J-STAGE Free; Elektronische Zeitschriftenbibliothek - Frei zugängliche E-Journals
subjects Complement
Dynamical systems
dynamically typed languages
Dynamics
Error detection
Errors
On-line systems
Polymorphism
type systems
Unions
title A Sound Type System for Typing Runtime Errors
url https://sfx.bib-bvb.de/sfx_tum?ctx_ver=Z39.88-2004&ctx_enc=info:ofi/enc:UTF-8&ctx_tim=2025-01-31T15%3A02%3A44IST&url_ver=Z39.88-2004&url_ctx_fmt=infofi/fmt:kev:mtx:ctx&rfr_id=info:sid/primo.exlibrisgroup.com:primo3-Article-proquest_cross&rft_val_fmt=info:ofi/fmt:kev:mtx:journal&rft.genre=article&rft.atitle=A%20Sound%20Type%20System%20for%20Typing%20Runtime%20Errors&rft.jtitle=IPSJ%20Online%20Transactions&rft.au=Yamada,%20Akihisa&rft.date=2012&rft.volume=5&rft.spage=96&rft.epage=104&rft.pages=96-104&rft.issn=1882-6660&rft.eissn=1882-6660&rft_id=info:doi/10.2197/ipsjtrans.5.96&rft_dat=%3Cproquest_cross%3E1082208279%3C/proquest_cross%3E%3Curl%3E%3C/url%3E&disable_directlink=true&sfx.directlink=off&sfx.report_link=0&rft_id=info:oai/&rft_pqid=1082208279&rft_id=info:pmid/&rfr_iscdi=true