.NET 的逻辑变量支持

发布于 2024-08-21 16:01:35 字数 1539 浏览 2 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

挽容 2024-08-28 16:01:35

我在 F# 中有基本的逻辑编程嵌入。我为我教授的“编程范式”课程开发了它,该课程自始至终都使用 F#,并包括一些关于逻辑编程的讲座。

该代码使用命令式更新来反映由于统一而进行的替换,并且它使用成功延续。所以它与 Kanren 等相对不同。

我不确定这些注释本身有多大意义,但您可以在以下内容的末尾找到此嵌入:
http://undergraduate.csse.uwa.edu。 au/units/CITS3242/16-logic-prog.pdf

我可以根据要求提供此嵌入的改进版本。

I have a basic embedding of logic programming in F#. I developed it for the course I teach on "Programing Paradigms", which uses F# throughout and includes a couple of lectures on logic programming.

The code uses imperative updates to reflect substitutions due to unification, and it uses success continuations. So it is relatively different from, e.g., Kanren.

I'm not sure how much sense the notes will make by themselves, but you can find this embedding at the end of:
http://undergraduate.csse.uwa.edu.au/units/CITS3242/16-logic-prog.pdf

I can provide a refined version of this embedding on request.

银河中√捞星星 2024-08-28 16:01:35

我不知道哪个图书馆可以满足您的需求。但是,我确实在 中实现了“F# 中的 union-find”此博客条目。从我大学时代起,我似乎记得一些关于Scheme的流行书有一个基本的统一算法,我当时用它来编写一个“迷你序言”实现。所以我觉得这是一个有合适经验的人可以在周末整理出来的东西,以防有人正在寻找一个项目。 (也许我会把它添加到我自己的周末待办事项列表中。)

I don't know a library offhand that does what you want. However, I do have an implementation of "union-find in F#" in this blog entry. And from my college days, I seem to recall some popular book on Scheme had a basic unification algorithm in it which I used to code up a 'mini-prolog' implementation back in the day. So I feel like this is something that someone with the right experience could put together in a weekend, in case someone out there is looking for a project. (Perhaps I'll add it to my own weekend TODO list.)

无需解释 2024-08-28 16:01:35

Mini-Kanren 已为 Scala 实现。我不是 .NET 程序员,不能说这对您有多大用处,但 Mini-Kanren 满足您在编程逻辑变量语言方面的要求:如果 .NET 中的 Scala 嵌入具有与什么兼容的属性你在追随,那么你应该在那里。

Mini-Kanren has been implemented for Scala. I'm not a .NET programmer, and can't say how useful this is to you, but Mini-Kanren fits your requirements in terms of a programmatic logic-variable language: if the Scala embedding in .NET has properties compatible with what you are after, then you should be there.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文