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 条
  • [31] Topology optimization for three-dimensional elastoplastic architected materials using a path-dependent adjoint method
    Abueidda, Diab W.
    Kang, Ziliang
    Koric, Seid
    James, Kai A.
    Jasiuk, Iwona M.
    INTERNATIONAL JOURNAL FOR NUMERICAL METHODS IN ENGINEERING, 2021, 122 (08) : 1889 - 1910
  • [32] A Highly Efficient Implementation on GPU Clusters of PDE-Based Pricing Methods for Path-Dependent Foreign Exchange Interest Rate Derivatives
    Duy-Minh Dang
    Christara, Christina C.
    Jackson, Kenneth R.
    COMPUTATIONAL SCIENCE AND ITS APPLICATIONS - ICCSA 2013, PT V, 2013, 7975 : 107 - 126
  • [33] ANALYSIS OF MULTI-AXIAL FATIGUE TEST DATA USING A PATH-DEPENDENT EFFECTIVE STRESS/STRAIN DEFINITION
    Wei, Zhigang
    Dong, Pingsha
    Batra, Romesh C.
    Nikbin, Kamran
    PROCEEDINGS OF THE ASME PRESSURE VESSELS AND PIPING CONFERENCE - 2013, VOL 3: DESIGN AND ANALYSIS, 2014,
  • [34] Print path-dependent contact temperature dependency for 3D printing using fused filament fabrication
    Xu, Yao
    Huang, Miaozi
    Schlarb, Alois K.
    JOURNAL OF APPLIED POLYMER SCIENCE, 2022, 139 (24)
  • [35] Prediction of Process-Induced Distortions in L-Shaped Composite Profiles Using Path-Dependent Constitutive Law
    Ding, Anxin
    Li, Shuxin
    Wang, Jihui
    Ni, Aiqing
    Sun, Liangliang
    Chang, Lei
    APPLIED COMPOSITE MATERIALS, 2016, 23 (05) : 1027 - 1045
  • [36] Prediction of Process-Induced Distortions in L-Shaped Composite Profiles Using Path-Dependent Constitutive Law
    Anxin Ding
    Shuxin Li
    Jihui Wang
    Aiqing Ni
    Liangliang Sun
    Lei Chang
    Applied Composite Materials, 2016, 23 : 1027 - 1045
  • [37] Path-dependent nonlinear analysis of a concrete reactor containment vessel subjected to internal pressure using a volume control technique
    Song, Ha-Won
    Nam, Sang-Hyeok
    Shim, Byul
    Kim, Sang-Hyo
    ENGINEERING STRUCTURES, 2009, 31 (04) : 990 - 998
  • [38] Fast and Safe Path-Following Control using a State-Dependent Directional Metric
    Li, Zhichao
    Arslan, Omur
    Atanasov, Nikolay
    2020 IEEE INTERNATIONAL CONFERENCE ON ROBOTICS AND AUTOMATION (ICRA), 2020, : 6176 - 6182
  • [39] Asymptotic finite-time ruin probabilities for a class of path-dependent heavy-tailed claim amounts using Poisson spacings
    Biard, Romain
    Lefevre, Claude
    Loisel, Stephane
    Nagaraja, Haikady N.
    APPLIED STOCHASTIC MODELS IN BUSINESS AND INDUSTRY, 2011, 27 (05) : 503 - 518
  • [40] Using stress path-dependent permeability law to evaluate permeability enhancement and coalbed methane flow in protected coal seam: a case study
    Cun Zhang
    Qingsheng Bai
    Yanhong Chen
    Geomechanics and Geophysics for Geo-Energy and Geo-Resources, 2020, 6