Hi,
I need a way to find if a given predicate is dynamic, static or built-in. The Reference Manual lists the usual predicate_property/2 but does not enumerate the possible predicate properties. Can someone provide me with some more info or a possible solution? Thanks.
Regards,
Paulo
----------------------------------------------------------- Paulo Jorge Lopes de Moura Dep. of Mathematics and Informatics Office 4.32 University of Beira Interior Phone: +351 75 319700 6200 Covilhc Fax: +351 75 319732 Portugal
mailto:pmoura(a)noe.ubi.pt http://www.ci.uc.pt/logtalk/pmoura.html -----------------------------------------------------------
Dear Paulo,
Possible outputs of predicate_property/2 predicate are:
interpreted: Predicate is currently interpreted (because it is loaded in debug mode or it is dynamic) compiled: Predicate is not interpreted dynamic: Predicate is dynamic (or data) concurrent: Predicate is to be used as data interchange among concurrent threads wait: Predicate is blocking (in development) multifile: Predicate is multifile
On the other hand, as predicate_property/2 is provided to access internal information, the format of the first argument is a bit odd: to know about predicate foo/2 in module bar, you have to write 'bar:foo'(_,_) (this may change in next versions).
Thus, the goal predicate_property(P,dynamic) succeeds only if P (in the above format) exists and is dynamic.
Regarding whether a given predicate is built-in is a more involved question, at least in Ciao. Almost all predefined predicates in Ciao can be redefined, and even using package 'pure' you can undefine all of them (except control constructs '->', ';', '!', etc). Anyway, if you tell me what is exactly your idea of "built-in predicate" and/or for what purpose do you need to know which predicates are so, perhaps I can find a hacking to find it out.
Hi!
I'm trying to get the latest development version of CIAO to work on Linux/PowerPC. Anyone have this combo already working or tried it before?
TIA,
Paulo
----------------------------------------------------------- Paulo Jorge Lopes de Moura Dep. of Mathematics and Informatics Office 4.32 Ext. 3251 University of Beira Interior Phone: +351 275319700 6201-001 Covilhã Fax: +351 275319732 Portugal
mailto:pmoura(a)noe.ubi.pt http://www.ci.uc.pt/logtalk/pmoura.html -----------------------------------------------------------