Вопрос

Is there any way to get the list of all relations defined in a loaded module in SICStus Prolog interpreter?

Это было полезно?

Решение

You can use the current_predicate/1 built_in predicate:

findall(Predicate, current_predicate(Module:Predicate), L)
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top