Embedding a family of logic languages with custom monadic unification in Scala

Author:

,Shevchenko R.S.ORCID,Doroshenko А.Yu.ORCID, ,Yatsenko O.A.ORCID,

Abstract

The paper proposes a framework for embedding logic programming and constraint programming methods in Scala by building a logical object-oriented language around the unification of typed logic based on monads. Two types of API are considered — high-level for language embeddings and low-level for organization of the bidirectional flow of data during the execution of logic programs. Differences in the capabilities of logical mechanisms can be expressed as subclasses of the class of unification monad types. This design makes it possible to share the implementation of custom unification between different frameworks and to use other languages’ embeddings in Scala from the declarative side. The monadic API provides the application developer with a simple and intuitive tool to implement custom logic within the unification. Our frameworks provide a clear representation of logical deduction: Scala code is only used for ad hoc unification. But the overall goal execution is an external interpretation that can implement different strategies. This design provides modularity and good integration with the rest of the ecosystem.

Publisher

National Academy of Sciences of Ukraine (Co. LTD Ukrinformnauka) (Publications)

Reference15 articles.

1. 1. The Flix Programming Language [Online]. Available from: https://flix.dev

2. 2. Magnus, M., Starup, J.L. & Lhoták, O. (2022) Flix: a meta programming language for Datalog. Datalog. 4th International Workshop on the Resurgence of Datalog in Academia and Industry (Datalog 2.0 2022). p. 202-206. [Online]. Available from: https://ceur-ws.org/Vol-3203/short8.pdf

3. 3. Logtalk [Online]. Available from: https://logtalk.org

4. 4. Doroshenko, A. & Shevchenko, R. (2006) A rewriting framework for rule-based programming dynamic applications. Fundamenta Informaticae. 72 (1-3). p. 95-108.

5. 5. Mamedov, T.A., Doroshenko, А.Yu. & Shevchenko, R.S. (2020) Static analysis of .NET programs using rewriting rules. Problems in programming. (2-3). p. 157-163. (in Ukrainian)

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3