arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2509.03318cs.PLcs.LO
收藏

语义反射程序

Semantically Reflected Programs

IT University of Copenhagen(哥本哈根信息技术大学);University of Oslo(奥斯陆大学)

Eduard Kamburjan, Vidar Norstein Klungre, Yuanwei Qu, Rudolf Schlatte, Egor V. Kostylev, Martin Giese, Einar Broch Johnsen

AI总结:

本文通过语义提升程序解决结构化与行为化知识形式化之间的矛盾,提出面向对象编程语言的语义反射层,通过地质建模案例展示其应用。

摘要:

本文探讨了通过语义提升程序解决结构化与行为化知识形式化之间的矛盾。通过将执行程序的状态提升为知识图谱,为面向对象编程语言引入语义反射层,使程序员能利用应用领域知识。本文对小型编程语言SMOL的语义提升和反射进行形式化,解释语言的操作方面,并通过语义反射层考虑类型正确性和虚拟化。通过地质建模案例展示语义提升和反射,并讨论不同应用。语言实现为开源并在线提供。

英文摘要:

This paper addresses the dichotomy between the formalization of structural and the formalization of behavioral knowledge by means of semantically lifted programs, which explore an intuitive connection between programs and knowledge graphs. While knowledge graphs and ontologies are eminently useful to represent formal knowledge about a system's individuals and universals, programming languages are designed to describe the system's evolution. To address this dichotomy, we introduce a semantic lifting of the program states of an executing program into a knowledge graph, for an object-oriented programming language. The resulting graph is exposed as a semantic reflection layer within the programming language, allowing programmers to leverage knowledge of the application domain in their programs. In this paper, we formalize semantic lifting and semantic reflection for a small programming language, SMOL, explain the operational aspects of the language, and consider type correctness and virtualisation for runtime program queries through the semantic reflection layer. We illustrate semantic lifting and semantic reflection through a case study of geological modelling and discuss different applications of the technique. The language implementation is open source and available online.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑