Monday, April 27, 2009

Building Common Lisp library

I've talked about the negative impact of hackbraries in my previous blog is time to take my own advise and build a lisp library myself. It was a long time ago since I wanted to make portable s-expression syntax prolog,covered with tests, that works out of the box on Windows,Linux at least over the major lisp implementations.Also I want to be modular in order to switch unification functionality if there is better one in the market such as Marco Antoniotti cl-unification And now its a good moment to do it. First I will Implement the algorithm described in Yet Another Efficient Unification Algorithm paper. Then I will start building the actual s-expression syntax prolog.
Suciu algorithm has two steps,parsing terms into unification table then unifying the terms using the table . Thanks to Maciej Katafiasz and Madhu I already had a functions for parsing the unification table, you can see them lisp paste . However both solutions lacked the way or returning the indices of p & q term that are needed in the next step so I wrote parsing unification table functionality from scratch. My solution is probably slower, but Its shorter and easier to understand.Then I've pack everything into asdf file and added another asdf file for the tests. I decided to go with cl-rt test framework since its simple and doesn't have any dependencies. If I need something more complex I'll check other testing frameworks later.
I have enough to cal it a project so lets apply for hosting at

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.