I have seen very compact Prolog implementations in Haskell, and I also know that constraints, modelled by CHRs can be evaluated directly in Prolog. Why not just bolt one of these compact Prologs onto the compiler, and just feed it the facts and rules... Keean.