v0.3.0
A language-mode release. A mode now carries the initial ISO flag values that go with its predefined
surface, not just the surface itself, and the new opt-in Modern mode starts double_quotes at
chars — so a double-quoted token reads as a list of one-character atoms, which is the convention
the newer Prolog systems settled on and what makes DCGs over text readable. Extended remains the
default and keeps the ISO initial value codes, so existing programs are unaffected.
Selecting a mode is now done by name everywhere, which replaces the 0.2.0 strict-ISO booleans.
Added
- A
Modernlanguage mode: the extended predefined surface withdouble_quotesseeded atchars.
It is available from the embedding constructor,dotnet prolog, generated code, and.dplproj
builds, and generated source still refuses to install into an engine created in a different mode. dotnet prolog run --mode extended|strict-iso|modern, and theDotPrologLanguageModeproperty
for.dplprojprojects. Mode names parse case-insensitively from one shared table, so the command
line and MSBuild cannot drift apart.BytecodeProgram.InitialDoubleQuotes, recording the value the flag was seeded with before any
source was read.- A
TextGrammarsample: a.dplprojapplication inModernmode that decomposes a string, sums a
run of numbers, and splits a sentence into words with DCGs written against characters. - NativeAOT acceptance coverage for
Modernmode, exercising build-time compiled clauses, the
reader running inside the published binary, a consulted grammar, load-unit flag scope, and the
mode-mismatch guard. - Benchmarks comparing engine construction and consulting across language modes.
Changed
double_quotesis scoped to the load unit. Aset_prolog_flag(double_quotes, _)directive still
governs the rest of the file that issued it, and the value in force when that file began is
restored when it finishes, including when a directive throws. A library that declares its own
convention can no longer change how whatever is consulted next is read. Deferred
initialization/1goals observe the restored value.- The bundled bootstrap and standard libraries are read under
codesin every mode; they are
processor implementation, so a host's choice of dialect does not reinterpret them. - A program's language mode is validated against an explicit allowlist, so a mode cannot be accepted
before it has been given its initial flag values.
Removed
dotnet prolog run --strict-iso, replaced by--mode strict-iso.- The
DotPrologStrictIsoMSBuild property, replaced byDotPrologLanguageMode. A project setting
the old property now fails the build rather than silently ignoring it.
Compatibility
- The initial
double_quotesvalue stayscodesinExtendedandStrictIso, as ISO/IEC 13211-1
requires.Modernis an extension and sits outside the conformance claim. - Scoping
double_quotesto the load unit changes an observable behavior that no previous release
pinned. Source that relied on a directive outliving its file must set the flag in each file that
needs it.