Semantically Reflected Programs

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Kamburjan, Eduard, Klungre, Vidar Norstein, Qu, Yuanwei, Schlatte, Rudolf, Kostylev, Egor V., Giese, Martin, Johnsen, Einar Broch
Natura: Preprint
Pubblicazione: 2025
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866915921554046976
author Kamburjan, Eduard
Klungre, Vidar Norstein
Qu, Yuanwei
Schlatte, Rudolf
Kostylev, Egor V.
Giese, Martin
Johnsen, Einar Broch
author_facet Kamburjan, Eduard
Klungre, Vidar Norstein
Qu, Yuanwei
Schlatte, Rudolf
Kostylev, Egor V.
Giese, Martin
Johnsen, Einar Broch
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2509_03318
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Semantically Reflected Programs
Kamburjan, Eduard
Klungre, Vidar Norstein
Qu, Yuanwei
Schlatte, Rudolf
Kostylev, Egor V.
Giese, Martin
Johnsen, Einar Broch
Programming Languages
Logic in Computer Science
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.
title Semantically Reflected Programs
topic Programming Languages
Logic in Computer Science
url https://arxiv.org/abs/2509.03318