Diseño e implementación de un DSL para programación lógica en Elixir
Loading...
Official URL
Full text at PDC
Publication date
2023
Authors
Advisors (or tutors)
Editors
Journal Title
Journal ISSN
Volume Title
Publisher
Citation
Abstract
El presente trabajo trata sobre la implementación de un lenguaje específco de dominio que permite defnir predicados lógicos dentro de un lenguaje funcional y hacer consultas sobre los mismos, por medio del uso de técnicas de metaprogramación que aprovechan los mecanismos de evaluación perezosa que ofrece el lenguaje Elixir.El trabajo tiene cinco partes bien diferenciadas: un capítulo de preliminares, donde se comentarán conceptos de programación lógica y funcional que el lector debe conocer para entender el resto de la memoria; la presentación de LogicElixir, la biblioteca desarrollada para este trabajo, desde el punto de vista del usuario; la presentación de un lenguaje Core
de bajo nivel, que servirá como vehículo entre el lenguaje de alto nivel (LogicElixir) y Elixir; el proceso de traducción de lenguaje Core a Elixir y, finalmente, un capítulo dedicado a cómo realizar consultas sobre los predicados lógicos que el usuario declare con los mecanismos que ofrece la librería.
This paper deals with the implementation of a domain-specific language that allows the defnition of logical predicates within a functional language and making queries on them, through the use of metaprogramming techniques that take advantage of the lazy evaluation mechanisms ofered by the Elixir language. This work is divided into five diferent parts: a chapter on preliminaries, where concepts of logic programming and functional programming will be discussed. The presentationof LogicElixir, the library developed for this work, from the user's point of view; the presentation of a low-level Core language, which will serve as a vehicle between the highlevel language LogicElixir and Elixir; the translation process from Core language to Elixir and, finally, a chapter dedicated to how to perform queries on the logical predicates that the user declares with the mechanisms are ofered by the library.
This paper deals with the implementation of a domain-specific language that allows the defnition of logical predicates within a functional language and making queries on them, through the use of metaprogramming techniques that take advantage of the lazy evaluation mechanisms ofered by the Elixir language. This work is divided into five diferent parts: a chapter on preliminaries, where concepts of logic programming and functional programming will be discussed. The presentationof LogicElixir, the library developed for this work, from the user's point of view; the presentation of a low-level Core language, which will serve as a vehicle between the highlevel language LogicElixir and Elixir; the translation process from Core language to Elixir and, finally, a chapter dedicated to how to perform queries on the logical predicates that the user declares with the mechanisms are ofered by the library.
Description
Trabajo de Fin de Máster en Ingeniería Informática, Facultad de Informática UCM, Departamento de Sistemas Informáticos y Computación, Curso 2022/2023.
El proyecto se encuentra depositado en la siguiente url: https://github.com/MiguelERuiz/logic_elixir