Skip to content

N-Prolog Version 3.40

Compare
Choose a tag to compare
@sasagawa888 sasagawa888 released this 12 Nov 08:16

N-Prolog ver3.40 Release Notes

Compiler Improvements

  • Optimization of SLD Resolution
    Previously, the SLD resolution was handled by reusing the interpreter's prove_all. This has now been replaced with the dedicated compiler function exec_all. This change allows the process to bypass debugging features and thus run more quickly.

  • Static Analysis of Cut and Disjunctions
    The handling of cuts and disjunctions is now statically analyzed at compile time, leading to more efficient code generation. This results in a modest speed improvement, though not a dramatic one.

  • Static Linking of Functions and Inline Expansion
    Functions that were previously dynamically linked have now been statically linked, and inline expansion has been implemented. This has contributed to a measurable increase in execution speed.

Future Challenges

  • Optimization of Predicates That Can Be Treated as Functions
    The next focus will be on optimizing predicates that can be treated as functions at compile time. This will involve applying the concept of multi-valued functions to improve efficiency further. However, this is a long-term goal that will require considerable time and effort.

Summary

N-Prolog ver3.4 introduces significant compiler improvements, such as static analysis and inline expansion, which lead to better performance. The next step is to focus on optimizing predicates during compilation, with an emphasis on multi-valued functions, which will be explored in future releases.