Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Term Rewriting prolog code #29

Open
infogulch opened this issue Jan 16, 2022 · 3 comments
Open

Term Rewriting prolog code #29

infogulch opened this issue Jan 16, 2022 · 3 comments

Comments

@infogulch
Copy link

Hi! I liked your video about term rewriting with prolog. This made me curious if it's possible to do term rewriting on prolog code. You mentioned "narrowing" in passing which lead me to some interesting results after some light googling 1 2, but I'm not sure in which direction to go in to learn more.

My intuition tells me that to do this on a prolog query you'd first need to fold the query and all transitively referenced rules down into one very long query first, and then you could apply rewrite rules to it from there. But I'm not sure if this "folding" procedure could be valid for all possible rules.

Thoughts?

@triska
Copy link
Owner

triska commented Jan 16, 2022

Thank you very much for your kind words, and for your interest!

Maybe the Curry programming language could be an interesting starting point, its Wikipedia page also contains a brief section on narrowing, mentioning a specific variant of narrowing called needed narrowing:

https://en.wikipedia.org/wiki/Curry_(programming_language)

The Curry documentation could also be an interesting resource to find further documents and contacts about this topic!

@fnogatz
Copy link

fnogatz commented Feb 9, 2022

btw, the Curry people are active on GitHub as well: 👋 @mihanus, @ichistmeinname, @finnteegen

@mihanus
Copy link

mihanus commented Feb 9, 2022

You might also have a look at the Curry homepage where you find much more material. A short survey about the advantages of Curry's evaluation strategy (needed narrowing) is also available from Comm. ACM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants