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

Add arithmetic #11

Open
sjl opened this issue Aug 23, 2016 · 1 comment
Open

Add arithmetic #11

sjl opened this issue Aug 23, 2016 · 1 comment

Comments

@sjl
Copy link
Owner

sjl commented Aug 23, 2016

Arithmetic operations on numbers would be good. We can lean heavily on Lisp, probably just need to implement is as a special form.

@jsjolen
Copy link

jsjolen commented Mar 8, 2019

Are you sure that is is what you want?

Consider CLPFD:

https://www.metalevel.at/prolog/clpfd

https://github.com/triska/clpz

CLPFD is a form of constraint programming, and would ensure that your programs remain declarative.

This is what Screamer implements by the way: nikodemus.github.io/screamer/

If you'd choose to go this route then you could either:

  1. Write it in CL and expose the predicates themselves as black-box abstractions (all_distinct/1 is basically an impl. of bipartite matching for example).

  2. Write it in your fact language (but you'd have to have native support in the compiler to not have to resort to Peano arithmetic).

You're more familiar with the codebase so can probably see what would be the easiest.

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

No branches or pull requests

2 participants