Using path-dependent types to build type safe javascript foreign function interfaces

被引:0
|
作者
Richard-Foy, Julien [1 ]
Barais, Olivier [1 ]
Jézéquel, Jean-Marc [1 ]
机构
[1] IRISA, Université de Rennes, France
关键词
Browser API - Dependent types - Expressive power - Foreign function interface - Static type systems - Static typing - Type safety - WEB application;
D O I
暂无
中图分类号
学科分类号
摘要
The popularity of statically typed programming languages compiling to JavaScript shows that there exists a fringe of the programmer population interested in leveraging the benefits of static typing to write Web applications. To be of any use, these languages need to statically expose the Web browser dynamically typed native API, which seems to be a contradiction in terms. Indeed, we observe that existing statically typed languages compiling to JavaScript expose the browser API in ways that either are not type safe, or when they are, typically over constrain the programmers. This article presents new ways to encode the challenging parts of theWeb browser API in static type systems such that both type safety and expressive power are preserved. Our first encoding relies on type parameters and can be implemented in most mainstream languages but drags phantom types up to the usage sites. The second encoding does not suffer from this inconvenience but requires the support of dependent types in the language. © Springer International Publishing Switzerland 2014.
引用
收藏
页码:308 / 321
相关论文
共 48 条
  • [21] Force control of robot manipulators using on-line scheduling and path-dependent linearization
    Sparmo, J.R.
    Nguyen, C.C.
    Kia, O.
    Zhou, Z.-L.
    Systems Science, 1992, 18 (03):
  • [22] Path-dependent human identification using a pyroelectric infrared sensor and Fresnel lens arrays
    Fang, JS
    Hao, Q
    Brady, DJ
    Shankar, M
    Guenther, BD
    Pitsianis, NP
    Hsu, KY
    OPTICS EXPRESS, 2006, 14 (02): : 609 - 624
  • [23] A Differential Tree Approach to Price Path-Dependent American Options using Malliavin Calculus
    Schellhorn, Henry
    Morris, Hedley
    IAENG TRANSACTIONS ON ENGINEERING TECHNOLOGIES, VOL II, 2009, 1127 : 217 - 221
  • [24] Validation of a path-dependent constitutive model for FCC and BCC metals using "symmetric" Taylor impact
    Walley, SM
    Church, PD
    Townsley, R
    Field, JE
    JOURNAL DE PHYSIQUE IV, 2000, 10 (P9): : 69 - 74
  • [25] Pricing path-dependent Bermudan options using Wiener chaos expansion: an embarrassingly parallel approach
    Lelong, Jerome
    JOURNAL OF COMPUTATIONAL FINANCE, 2020, 24 (02) : 1 - 31
  • [26] Continuous Estimation of Wrist Torque from Surface EMG Signals Using Path-dependent Model
    PAN Li-zhi
    ZHANG Ding-guo
    SHENG Xin-jun
    ZHU Xiang-yang
    ChineseJournalofBiomedicalEngineering, 2014, 23 (04) : 159 - 164
  • [27] A New Approach Using Symbolic Analysis to Compute Path-Dependent Effective Properties Preserving Hierarchy
    Srinivasan, Sridhar
    Cohen, Ellis
    Hofmann, Mark
    2014 27TH IEEE INTERNATIONAL SYSTEM-ON-CHIP CONFERENCE (SOCC), 2014, : 404 - 408
  • [28] NL2Type: Inferring Java']JavaScript Function Types from Natural Language Information
    Malik, Rabee Sohail
    Patra, Jibesh
    Pradel, Michael
    2019 IEEE/ACM 41ST INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE 2019), 2019, : 304 - 315
  • [29] PREDICTION OF PROCESS-INDUCED DEFORMATION IN THICK COMPOSITE LAMINATES USING A PATH-DEPENDENT CONSTITUTIVE MODEL
    Wang, Shuo
    Liu, Mingyu
    Cong, Fanglin
    Xue, Hongqian
    Cui, Xu
    COMPOSITES-MECHANICS COMPUTATIONS APPLICATIONS, 2022, 13 (01): : 1 - 24
  • [30] A molecular dynamics study of path-dependent grain boundary properties in nanocrystals prepared using different methods
    Sun, Hao
    Beland, Laurent Karim
    SCRIPTA MATERIALIA, 2021, 205