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

Possibility of derivation/integrarion rules implementation? #32

Open
vdikan opened this issue Dec 14, 2018 · 2 comments
Open

Possibility of derivation/integrarion rules implementation? #32

vdikan opened this issue Dec 14, 2018 · 2 comments

Comments

@vdikan
Copy link

vdikan commented Dec 14, 2018

Infix looks sophisticated yet simple. Are there plans or suggestions how to implement basic derivation/integration rules similar to those described in a text-book:
https://github.com/norvig/paip-lisp/blob/master/docs/chapter8.md

Can you give a hint where to start?

@rm-hull
Copy link
Owner

rm-hull commented Dec 14, 2018

No plans to slot that functionality into the infix library, but it looks interesting and I can see how you would use our $= to convert an infix expression into prefix, much like the definition in the book:

(defun infix->prefix (infix-exp)
  "Convert fully parenthesized infix-exp to a prefix expression"
  ;; Don't use this version for non-fully parenthesized exps!

I guess you would need to turn the simplifier (https://github.com/norvig/paip-lisp/blob/master/docs/chapter8.md#82-simplification-rules) into clojure-flavoured lisp as the first point.

However, one thing this library ought to do is to provide a mechanism to convert a prefix expression into infix. You would need that to implement the simplifier, I guess.

@vdikan
Copy link
Author

vdikan commented Dec 15, 2018

Ok, I'll see to it. Thanks!

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

2 participants