Add prelude.pl: a Prolog file consulted at conversation start - #3
Merged
Merged
Conversation
Point MANIFOLD_PRELUDE (config :manifold, :prelude_path) at a .pl file and
it is consult/1'ed into every conversation's own engine at boot, ahead of
replay and ahead of the unknown=fail flag — so a directive that references
something undefined still throws instead of silently failing, and anything
the prelude defines is already there for the first replayed clause or live
turn to see.
It is background knowledge shared by every conversation's engine, not a
conversation input: never part of kb_snapshot, never written to the
per-conversation log, and reconsulted fresh into each conversation's own
swipl process (never shared, per the per-conversation-engine architecture).
A prelude that fails to load — missing file, an erroring directive — fails
that conversation's startup the same way a dead swipl does, surfacing as
error{prolog_unavailable} rather than booting a conversation silently short
of the rules it was told to have.
Unset by default, so no existing deployment or test is affected.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Point MANIFOLD_PRELUDE (config :manifold, :prelude_path) at a .pl file and
it is consult/1'ed into every conversation's own engine at boot, ahead of
replay and ahead of the unknown=fail flag — so a directive that references
something undefined still throws instead of silently failing, and anything
the prelude defines is already there for the first replayed clause or live
turn to see.
It is background knowledge shared by every conversation's engine, not a
conversation input: never part of kb_snapshot, never written to the
per-conversation log, and reconsulted fresh into each conversation's own
swipl process (never shared, per the per-conversation-engine architecture).
A prelude that fails to load — missing file, an erroring directive — fails
that conversation's startup the same way a dead swipl does, surfacing as
error{prolog_unavailable} rather than booting a conversation silently short
of the rules it was told to have.
Unset by default, so no existing deployment or test is affected.