osdir.com
mailing list archive

Subject: Armenian Genocide Plagues Ankara 90 Years On - msg#00114

List: ai.prolog.swi

Date: Prev Next Index Thread: Prev Next Index
Full Article:
http://service.spiegel.de/cache/international/0,1518,353274,00.html



Was this page helpful?
Yes No
Thread at a glance:

Previous Message by Date: click to view message preview

Re: Debugging while using a meta-solver

On Saturday 21 May 2005 00:52, Roy Haddad wrote: > > Add the following to the file that defines the meta interpreter. > > > > :- set_prolog_flag(generate_debug_info, false). > > > > It will make the predicates behave like system predicates as far as the > > debugger is concerned: it shows the first call from userland to > > non-debug code, as well as calls from non-debug code to userland code, > > but hides all the internal calls. > > That can't be all of it though, because when the meta-solver calls itself > (that is, because of stuff like this: > > solve(H) :- !, > clause(H,B), > solve(B). > ), > > the recursive call does not show in the debugger. So whenever I try to > debug something that is being interpreted with it, it just succeeds or > fails instantly, without going into sub-goals. I've been trying to finagle > it with a "public" solve predicate that is outside of the scope of the > set_prolog_flag(...) that calls the "private" solve predicate and having > the "private" solve predicate call the public whenever it is doing a > proper recursive call... So far it has not produced quite the right effect > (Ideally debugging with the meta-interpreter should look exactly the same, > except all the Goals are surrounded by 'solve( )' ), but it's getting > close. Can get very tricky. There is an undocumented '$set_predicate_attribute'(Name/Arity, Key, 0/1). with Key (amoung many others) having the values 'trace' and 'hide_childs'. Success --- Jan

Next Message by Date: click to view message preview

Armenian Genocide Plagues Ankara 90 Years On

Full Article: http://service.spiegel.de/cache/international/0,1518,353274,00.html

Previous Message by Thread: click to view message preview

Armenian Genocide Plagues Ankara 90 Years On

Full Article: http://service.spiegel.de/cache/international/0,1518,353274,00.html

Next Message by Thread: click to view message preview

Armenian Genocide Plagues Ankara 90 Years On

Full Article: http://service.spiegel.de/cache/international/0,1518,353274,00.html
Sign up for updates to this mailing list. email:
Loading Comments...
Home | News | Patents | Sitemap | FAQ | advertise

Advertising by