@article{oai:ipsj.ixsq.nii.ac.jp:00233816, author = {Masahiro, Yasugi and Kento, Emoto and Tasuku, Hiraishi and Masahiro, Yasugi and Kento, Emoto and Tasuku, Hiraishi}, issue = {2}, journal = {情報処理学会論文誌プログラミング(PRO)}, month = {Apr}, note = {Mechanisms for legitimate execution stack access (LESA for short) provide legitimate access to values of callers' variables sleeping deeply in a C-like execution stack. LESA mechanisms enable efficient implementations of high-level services that require dynamic rearrangement of running software, such as garbage collection, first-class continuations, and dynamic load balancing, for implementing efficient and safe high-level languages. As a nested-function-style LESA mechanism, we can create a closure from a nested function definition and indirectly call the nested function via a pointer to the closure, achieving access to values of the variables captured in the closure-creation-time environment. In this study, we propose restartable exception handling mechanisms as new LESA mechanisms, which provide callable exception handlers without non-local exiting; handlers are found on the basis of dynamic scope without requiring pointers. In addition, the LESA mechanisms can be used at multiple levels; e.g., garbage collection can be started during the creation of a first-class continuation. In this paper, we design core languages that feature leveled restartable exception handling mechanisms and discuss their properties and implementations. ------------------------------ This is a preprint of an article intended for publication Journal of Information Processing(JIP). This preprint should not be cited. This article should be cited as: Journal of Information Processing Vol.32(2024) (online) ------------------------------, Mechanisms for legitimate execution stack access (LESA for short) provide legitimate access to values of callers' variables sleeping deeply in a C-like execution stack. LESA mechanisms enable efficient implementations of high-level services that require dynamic rearrangement of running software, such as garbage collection, first-class continuations, and dynamic load balancing, for implementing efficient and safe high-level languages. As a nested-function-style LESA mechanism, we can create a closure from a nested function definition and indirectly call the nested function via a pointer to the closure, achieving access to values of the variables captured in the closure-creation-time environment. In this study, we propose restartable exception handling mechanisms as new LESA mechanisms, which provide callable exception handlers without non-local exiting; handlers are found on the basis of dynamic scope without requiring pointers. In addition, the LESA mechanisms can be used at multiple levels; e.g., garbage collection can be started during the creation of a first-class continuation. In this paper, we design core languages that feature leveled restartable exception handling mechanisms and discuss their properties and implementations. ------------------------------ This is a preprint of an article intended for publication Journal of Information Processing(JIP). This preprint should not be cited. This article should be cited as: Journal of Information Processing Vol.32(2024) (online) ------------------------------}, title = {Designing Restartable Exception Handling Mechanisms for Implementing Efficient and Safe High-level Languages}, volume = {17}, year = {2024} }