Setting up the use of this module.

§1. This section simply sets up the module in ways expected by foundation, and contains no code of interest. The following constant exists only in tools which use this module:

define KNOWLEDGE_MODULE TRUE

§2. Like all modules, this one must define a start and end function:

COMPILE_WRITER(booking *, RuleBookings::log)
COMPILE_WRITER(inference *, Inferences::log)
COMPILE_WRITER(inference_subject *, InferenceSubjects::log)
COMPILE_WRITER(property *, Properties::log)
COMPILE_WRITER(rulebook *, Rulebooks::log)
COMPILE_WRITER(inference_family *, Inferences::log_family)

§3.

enum ACTIVITY_CREATIONS_DA
enum INFERENCES_DA
enum OBJECT_COMPILATION_DA
enum PROPERTY_CREATIONS_DA
enum PROPERTY_PROVISION_DA
enum PROPERTY_TRANSLATIONS_DA
enum RULE_ATTACHMENTS_DA
enum RULEBOOK_COMPILATION_DA
enum INSTANCE_COUNTING_MREASON
enum COMPILATION_SIZE_MREASON
enum OBJECT_COMPILATION_MREASON
void KnowledgeModule::start(void) {
    PropertyInferences::start();
    RelationInferences::start();
    InstanceAdjectives::start();
    EitherOrPropertyAdjectives::start();
    MeasurementAdjectives::start();
    SameAsRelations::start();
    SettingPropertyRelations::start();
    ComparativeRelations::start();
    ProvisionRelation::start();
    REGISTER_WRITER('b', RuleBookings::log);
    REGISTER_WRITER('I', Inferences::log);
    REGISTER_WRITER('j', InferenceSubjects::log);
    REGISTER_WRITER('K', Rulebooks::log);
    REGISTER_WRITER('n', Inferences::log_family)
    REGISTER_WRITER('Y', Properties::log);
    Log::declare_aspect(ACTIVITY_CREATIONS_DA, U"activity creations", FALSE, FALSE);
    Log::declare_aspect(INFERENCES_DA, U"inferences", FALSE, TRUE);
    Log::declare_aspect(OBJECT_COMPILATION_DA, U"object compilation", FALSE, FALSE);
    Log::declare_aspect(PROPERTY_CREATIONS_DA, U"property creations", FALSE, FALSE);
    Log::declare_aspect(PROPERTY_PROVISION_DA, U"property provision", FALSE, FALSE);
    Log::declare_aspect(PROPERTY_TRANSLATIONS_DA, U"property translations", FALSE, FALSE);
    Log::declare_aspect(RULE_ATTACHMENTS_DA, U"rule attachments", FALSE, FALSE);
    Log::declare_aspect(RULEBOOK_COMPILATION_DA, U"rulebook compilation", FALSE, FALSE);
    Memory::reason_name(INSTANCE_COUNTING_MREASON, "instance-of-kind counting");
    Memory::reason_name(COMPILATION_SIZE_MREASON, "size estimates for compiled objects");
    Memory::reason_name(OBJECT_COMPILATION_MREASON, "compilation workspace for objects");
}
void KnowledgeModule::end(void) {
}

§4. This module works closely with calculus, hanging the following functions on its hooks:

define TERM_DOMAIN_CALCULUS_TYPE struct inference_subject
define TERM_DOMAIN_WORDING_FUNCTION InferenceSubjects::get_name_text
define TERM_DOMAIN_TO_KIND_FUNCTION KindSubjects::to_kind
define TERM_DOMAIN_FROM_KIND_FUNCTION KindSubjects::from_kind