Update on LOGICBIZ v2.0: 100% Passed Automated Security Audit (And some mind-blowing memory stats from a 2-month beginner)

Hi everyone,

First of all, thank you so much for the incredible warmth and feedback on my first post! As a complete beginner who just started learning Prolog two months ago from scratch, your encouragement meant the world to me. I’m still just adjusting predicates, matching arities, and leaning heavily on AI to fix my messy typos, but I am learning every single day.

Over the last 4 days, I managed to run a comprehensive, automated security test suite on my retail engine, LOGICBIZ v2.0. The test script executed 67+ rigorous checks across 15 different categories—testing everything from SQL injection vulnerabilities to math boundary limits.

Thanks to the help I got from tuning my rules, the engine just passed 100% of the security checks! But what really blew my mind as a novice was running the statistics. command right after the audit finished. I don’t fully understand all the underlying computer science yet, but these numbers look absolutely beautiful to me:

========================================================================

LOGICBIZ SECURITY AUDIT SUMMARY REPORT

CATEGORY 15: DATA INTEGRITY & CONSISTENCY
[✓] PASSED (Data Konsisten) - Product Data Consistency : Cross-Validation
[✓] PASSED (Referential OK) - Referential Integrity : Foreign Key Check
[✓] PASSED (No Orphan) - Orphan Transactions : Data Completeness
[✓] PASSED (Audit OK) - Audit Trail Completeness : Log Validation

AUDIT STATUS: 100% PASSED (All Core Logical Shield Modules Safe)

24,848,825 inferences, 4.375 CPU in 4.606 seconds (95 CPU, 5,679,731 LIPS)
true.

103 ?- statistics.
% Started at Fri Jul 17 21:51:37 2026
% 18.812 seconds cpu time for 35,552,823 inferences
% 225,514 atoms, 9,468 functors, 8,892 predicates, 175 modules, 19,752,495 VM-codes
%
% Limit Allocated In use
% Local stack: - 20 Kb 2,976 b
% Global stack: - 28 Kb 22 Kb
% Trail stack: - 30 Kb 544 b
% Total: 4,096 Mb 78 Kb 26 Kb
%
% 16 garbage collections gained 70,276,904 bytes in 0.062 seconds.
% 16 clause garbage collections gained 2,399 clauses in 0.000 seconds.
% Stack shifts: 4 local, 12 global, 15 trail in 0.016 seconds

For those who are more experienced, I noticed that despite evaluating almost 20 Million VM-codes, the total stack allocated was only 78 KB, and the garbage collector managed to sweep 70 MB of data in just 0.062 seconds after the intense loops finished.

I am just a hobbyist who loves of first-order predicate logic, but seeing how SWI-Prolog effortlessly cleans up memory and keeps things this lightweight makes me fall in love with logic programming even more. It proves to me that even a beginner can build something incredibly solid if they let Prolog handle the heavy lifting.

Next, I am working on adding an automated Markdown report exporter (.md) to the audit tool so I can save these logs locally using working_directory/2.

*Thank you again for guiding me through this journey. Any beginner-friendly tips on how to interpret these memory shifts or stack frames better would be highly appreciated!
*