dynamic programming
Kilián Imre <[email protected]>
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Organization | Univ Pécs/Informatika |
| Message-ID | <[email protected]> |
Hi Jan! In my project (modal semantic web) I am using the dynamic programming ability of SWI Prolog pretty extensively. I am constructing and querying Prolog objects, modules, predicates etc. by another Prolog program. 1. One remark, that the whole stuff is a little bit clumsy or at least incoherent, that would well need a restructuring and maybe standardizing (among Prolog versions)... What is your opinion? 2. My problem is the following: if I add a new clause from a module x to a dynamic module, let say: assert((a:b:-c)). and then say listing(a:b). the result is b:-x:c. that is the c predicate is invoked from the module issuing the assert. If I insist on that the c predicate should also be called from module a, then invoke... assert((a:b:-a:c)). that results... b:- a:x:c. I have several problems with this result, but first of all I want to ask, if it is a feature, or a mistake? In my opinion the implementation of assert should notice, if right hand calls are made to the same module where the clause is placed (in our case 'a'), and optimize eventual chained ":" operators out... Or do you have another opinion? Is the problem clear? yours: -- Kilián Imre/Univ.Pécs Informatics <[email protected]>