Riyadh Jemal wrote: > My problem was similar to that faced by Simone Pascucci on the mailing > list and it led me to suggest that some information including examples > on the use of dynamic clauses be included in the tutorial. > Hi Riyadh, The tutorial and examples do not include examples using dynamic predicates (i.e. clauses you can assert/retract) because there aren't many uses for them that are not better done with other features in ECLiPSe/Prolog. Support for dynamic predicates in ECLiPSe is mainly meant for backwards compatibility with Prolog (and also for the few cases where it is a good idea). As you mentioned in your email to me, you assert the data you want to use as facts, and then use them. If the data is available before you run the program, then it is much better to generate a program with the facts in them, and compile this. I assume you are using facts for your data because the examples I suggested you look at uses facts to store the data. This was mainly done this way because it is convenient to show everything in one file in the examples. A better approach if you want your code to work with different data set is to read in the data directly (using the I/O facilities of ECLiPSe), and create your data constraints from them, rather than having them as facts, and creating the constraints from the facts. Having the facts means you are duplicating the information, and makes it difficult if you want to run the program again with a different set of data. Cheers, Kish -- This e-mail may contain confidential and privileged material for the sole use of the intended recipient. Any review, use, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender by reply e-mail and delete all copies of this message. Cisco Systems Limited (Company Number: 02558939), is registered in England and Wales with its registered office at 1 Callaghan Square, Cardiff, South Glamorgan CF10 5BT.Received on Wed Oct 14 2009 - 11:05:52 CEST
This archive was generated by hypermail 2.3.0 : Wed Sep 25 2024 - 15:13:20 CEST