Skip to content

N-Prolog 4.82 – DCG Stability Update

Choose a tag to compare

@sasagawa888 sasagawa888 released this 23 Feb 22:21

N-Prolog 4.82 – DCG Stability Update

Release Notes

Release Date: February 2026
Release Type: Bug Fix & Stability Improvements


🔧 Bug Fixes

Fix: DCG definitions not properly overwritten on reconsult/1

  • Fixed an issue where DCG rules were appended instead of being replaced when using reconsult/1.
  • Previously, this caused duplicated or inconsistent grammar behavior after reloading a file.
  • DCG definitions are now correctly abolished and reloaded.

Fix: Error handling for built-in predicates during reconsult/1

  • Improved error handling when a file loaded via reconsult/1 contained built-in predicates.
  • Prevents improper overwriting and ensures safer reload behavior.

➕ New Feature

Added: subsumes_term/2

  • Implemented ISO-compatible subsumes_term/2.
  • Fully integrated with DCG expansion.
  • Ensures consistent behavior in grammar processing and term generality checks.

🧠 DCG Improvements

  • Strengthened internal consistency of DCG expansion.
  • Improved interaction between DCG and subsumes_term/2.
  • Stabilized behavior under repeated reconsult/1.

These improvements significantly enhance reliability when using N-Prolog for parser and compiler construction.


📘 Documentation Updates

  • Fixed typos in the manual.
  • Clarified several explanations for better readability.
  • Improved overall documentation consistency.

🎯 Summary

Version 4.82 focuses on internal stability and correctness.

This release strengthens:

  • DCG reliability
  • Reload stability (reconsult/1)
  • ISO compatibility (subsumes_term/2)

This version is recommended for users developing parsers, compilers, and grammar-based systems in N-Prolog.