Releases: sasagawa888/nprolog
N-Prolog version3.77
N-Prolog ver3.77 Release Notes
This version 3.77 introduces minor improvements to the compiled code. The main updates are as follows:
1. Efficiency Improvement through Static Analysis by the Compiler
The N-Prolog compiler performs static analysis of unify
operations and converts them into more efficient code. In this version, we have particularly optimized the instruction for handling unification with []
(the empty list).
2. Improvement of the unify_nil
Instruction
Previously, the following instruction was used to check unification with []
:
unify_nil(x, y, th)
However, since the other side is always fixed as []
, this instruction has been simplified to:
unify_nil(x, th)
x
: The value on the other side of[]
th
: The thread number
This change simplifies the code slightly and improves its efficiency.
3. Bug Reports from Users
We continue to welcome bug reports and feedback from users. Your input helps us improve N-Prolog further.
Thank you for your continued support of N-Prolog.
N-Prolog ver3.76
Emergency Release of N-Prolog ver3.76
Thank you for using N-Prolog. We have identified an issue where arithmetic operations and arithmetic functions were not fully thread-safe. This problem has been fixed in the newly released N-Prolog ver3.76.
We sincerely apologize for any inconvenience caused and appreciate your understanding.
We continue to welcome bug reports and feedback to further improve the system.
Thank you for your continued support of N-Prolog.
N-Prolog Version 3.75
N-Prolog ver3.75 Release Notes
Improvements and New Features
-
Enhanced Thread Safety for Multithreading
- Thread safety has been thoroughly implemented to ensure that multiple threads can operate simultaneously without issues.
-
Safe Termination on Error
- In the event of an error during thread operation, the system is now designed to terminate safely and appropriately.
-
Thread-Safe Parser
- The parser, responsible for program analysis, has been optimized for thread safety, significantly improving operational stability.
Known Issues and Future Improvements
- While we have addressed as many known bugs as possible in this release, we encourage users to continue reporting any issues they encounter. Your feedback is invaluable for further improvements.
Bug Reporting
If you discover any bugs or issues, please report them with detailed reproduction steps and relevant information. We greatly appreciate your support and cooperation.
Thank you for using N-Prolog ver3.75!
N-Prolog Version 3.71
N-Prolog ver3.71 Release Notes
-
Fixes
Fixed one compiler bug. -
Verification
Verified correct operation using test code after the fix.
Confirmed smooth operation on Raspberry Pi 400.
Verified that parallel processing functions correctly through testing. -
Future Plans
With this release, the specifications of N-Prolog are finalized.
Moving forward, we will focus on addressing user-reported bugs and ensuring stable operation. -
Request
To further improve the stability of N-Prolog, we welcome bug reports from users.
If you encounter a bug, please include detailed reproduction steps in your report.
Thank you for your continued support of N-Prolog!
N-Prolog Version 3.70
N-Prolog ver3.70 Release Notes
Key Improvements
-
Multithreading Support:
- This version incorporates multithreading support using the
pthread
library, making the interpreter and compiler thread-safe. This allows parallel processing with multiple threads, resulting in improved performance.
- This version incorporates multithreading support using the
-
QuickSort Functionality Confirmed:
- The Hoare QuickSort algorithm has been confirmed to work correctly. This confirmation ensures that parallel processing improves performance, particularly with sorting tasks.
-
10-Queens Problem Parallel Processing:
- The 10-Queens problem was split and executed across 2 threads, and a scaling effect was observed. This demonstrates that the multithreading approach is effective, showcasing the potential of parallel processing to improve performance.
-
Affordable Parallel Prolog Machine:
- By combining the newly implemented multithreading parallel processing with the existing distributed parallel capabilities, it is now possible to create an affordable parallel Prolog machine. This approach, different from Parlog and GHC, allows for exploring Prolog's parallel performance based on modern, more powerful hardware from the 1980s onward.
Notes
- Potential Bugs:
- While this version introduces significant improvements, there may still be some minor bugs. If any issues arise during use, please report them to help us improve the system.
Future Outlook
- With hardware much more advanced than that of the 1980s, we aim to continue exploring and optimizing Prolog's parallel performance. Future updates will include further performance improvements and the addition of new features.
Bug Reports and Feedback
- If you encounter any bugs or issues, please let us know. Your feedback is crucial for improving the system and making it better for everyone.
N-Prolog version3.60
N-Prolog ver3.60 Release Notes
N-Prolog ver3.60 has been released! This release introduces major improvements, particularly the support for tree-structured networks, enabling recursive parallelism. This makes it easier to operate in cluster environments. Below are the key new features.
New Features
-
Support for Tree-Structured Networks
- Functions like dp_compile/1 are now compatible with tree-structured networks. This allows easy command propagation to child, grandchild, and further descendant machines.
- Hierarchical parallelism in cluster environments is now more straightforward.
-
Parallel Computation Control
- The new function dp_close/0 has been added. This ensures that all child and grandchild machines terminate properly, and ultimately shuts down the operating system on the parent machine. This feature provides consistent shutdown handling in cluster environments.
-
Timing Adjustment Features
- dp_wait/1 has been introduced, allowing you to adjust the start-up timing of child and grandchild machines. This helps in synchronizing parallel tasks within the cluster.
-
Improved Network Mode
- When starting N-Prolog in network mode, it automatically executes network.pl, ensuring the parallel computation starts at the correct time.
- dp_create/1 allows explicit connections to be set up with grandchildren, facilitating efficient network communication.
-
Auto-Startup Feature (Linux)
- With N-Prolog, you can now leverage Linux's auto-start feature to power on the parent, child, and grandchild machines all at once. This simplifies the setup of cluster systems.
Features
- N-Prolog operates outside the CSP (Communicating Sequential Processes) paradigm, simplifying communication timing and enabling parallel computation directly in Prolog's standard syntax. This avoids the complexity of CSP, making parallel computation easier to implement.
- While the scope of parallel computation may be limited, N-Prolog emphasizes an approach that leverages Prolog’s core characteristics. Prolog's close alignment with human thought processes allows for parallel computation without necessarily targeting general-purpose parallelism.
Future Directions
- N-Prolog will continue to explore non-CSP approaches for parallel computation. The goal is to develop a more intuitive and understandable parallel processing model, without relying on the complexities of CSP.
This new version adds significant functionality to simplify parallel computation, especially in cluster environments. We hope that you will make use of N-Prolog’s simple and flexible parallel computation features in your projects going forward.
N-Prolog Version 3.51
N-Prolog Ver 3.51 Release Notes
Release Date: December 1, 2024
Version: 3.51
Key Changes
This release addresses several important issues, including backtracking behavior, the handling of op/3, and general system stability improvements.
-
Bug Fix in Backtracking Handling
Overview
In certain cases, the last successfully executed predicate failed to properly invoke its continuation. This issue caused some complex rules and predicate combinations to behave unexpectedly.Affected Cases
The issue was observed in cases like the following:seq :- test1, test2, write(done).
test1 :- fail.
test1.test2 :- fail.
test2.Before the fix, running the seq predicate did not output done as expected.
Resolution
The compiler has been updated to ensure that the continuation is properly invoked after the last successful predicate. As a result, the example above now behaves as intended. -
Fix in op/3 Predicate
Issue with the Third Argument
A bug was discovered where providing a list as the third argument to op/3 resulted in incorrect behavior. This bug has now been fixed, and op/3 correctly accepts lists as valid third arguments.Constraint on the First Argument
The first argument of op/3 (denoting the precedence) now correctly enforces the specification that the value must be between 1 and 1200 (inclusive). If the precedence is outside this range, an "Operator priority error" is raised.Error Example
?- op(0, xfx, test).
Operator priority error op 0
?- op(500, xfx, [relation1, relation2]).
yes
-
New Test Cases Added
A new test case, tests/bug.o, has been added to validate the fix for backtracking behavior.
Additional test cases for op/3 have been included to verify correct handling of lists and precedence values.
Verification Example
The following demonstrates the correct behavior after the fixes:
?- ['./tests/bug.o'].
yes
?- seq.
done
yes
?- op(600, xfy, [and, or]).
yes
?- op(1300, xfx, test).
ERROR: op/3: The precedence must be between 1 and 1200.
?- op(0, xfx, test).
Operator priority error op 0
Looking Ahead
We are committed to further improving N-Prolog based on user feedback. If you encounter any issues or have suggestions, please let us know!
N-Prolog Version 3.50
N-Prolog ver3.50 Release Notes
N-Prolog ver3.50 has been released. This version introduces the distributed parallel functionality, allowing connections to up to 100 child devices. Below are the new features and improvements in this release.
Key New Features
-
Addition of Distributed Parallel Functionality
In N-Prolog ver3.50, parallel processing support has been enhanced, enabling connections to up to 100 child devices. This allows for larger-scale parallel computations. -
Parallel Processing Within the Scope of the Prolog Language Specification
Parallel processing is implemented within the standard Prolog language specification, meaning that no new learning is required to use parallel functionality. The parallel predicates have been extended, allowing easy integration of parallel execution into existing Prolog code. -
How Parallel Execution is Structured
Parallel execution is structured by extracting parallel parts of the code manually and explicitly writing them for parallel execution. This approach allows for seamless integration of traditional Prolog code with parallel processing. -
Documentation
For detailed instructions and specifications, please refer to the PARA.md document. It provides in-depth explanations on how to set up, use, and execute parallel processing with examples.
With this release, N-Prolog becomes a more powerful and flexible tool, ready to be used in projects that take advantage of parallel computation. We hope you try out ver3.50!
v3.45
N-Prolog v3.45 Release Notes
Key Updates
-
Raspberry Pi Compilation Issue Fix
It was discovered that N-Prolog could not be compiled correctly on Raspberry Pi. The issue was identified as a conflict with the WiringPi installation. This has now been resolved, and users can install WiringPi without encountering name conflicts.
-
Partial Addition of Distributed Parallel Predicates
Some early-stage distributed parallel predicates have been added to the system. These are still under development and are planned to be fully completed in the next version.
N-Prolog Version 3.41
Release Notes: N-Prolog ver3.41
In this release, we have addressed a bug introduced in the previous compiler improvements. This issue caused predicates that execute directly, such as :- op(...)
, to fail to compile properly.
Key Fixes:
- Fixed the compilation process for direct execution predicates (e.g.,
:- op(...)
). - Verified correct compilation functionality using Professor Iitaka's code.
Background:
The bug stemmed from recent updates to improve the compiler. It was difficult to detect the issue with my own code, so a swift fix was implemented.
Thank you for your reports and cooperation.