Closed giovinazzo-kevin closed 2 years ago
personal notes:
Move data sources/sinks to CSharp library
Move tabling facilities and predicate transformations to Meta or (new) Tabling library
Move expansions to Lambda or (new) Expansions library
Should shell commands and abstract parsers be supplied by libraries?
Make sure that built-ins and directives declared by libraries come from the same module as the library, or make them unqualified to begin with.
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: