G3Kappa / Ergo

Other
4 stars 0 forks source link

Libraries #10

Closed G3Kappa closed 1 year ago

G3Kappa commented 2 years ago

https://www.swi-prolog.org/pldoc/man?section=reexport

Modules are the individual Ergo code unit. A module exposes a list of public predicates that become available to all derived modules. A module might also reserve special semantics, such as in the case of attribute modules.

A library is a special type of module that is used to group together other modules under one package that is accessible to both C# and Ergo. Libraries are also the entry point for several engine extensions that only become available once the library is imported, thus providing a mechanism to implement the aforementioned semantics while limiting their scope.

Structure

A library is an ordinary Ergo module. From C#, a matching class is added to the interpreter (if defined). That class contains:

G3Kappa commented 1 year ago

personal notes: