Two New NetLogo Tools: Protector and Auditor — Feedback Welcome

Hi everyone!

I’d like to share two new apps for NetLogo. I’d really appreciate any comments, suggestions, or bug reports to help improve them for the whole community:

1) Netlogo Protector

Conceptually inspired by Peter Brooks’ NetLogo Obfuscator, this app is designed to make NetLogo code difficult to read while preserving the model’s original behavior. It does not upload or store your models.

Link: https://simulacionurbana.com/apps/netlogo-protector/

App has an English language option in the top right corner.

2) Netlogo Auditor

This app helps detect potentially obsolete elements, inconsistencies, and disconnected procedures. It also turns code into understandable explanations and diagrams. Your model file is analyzed entirely in your browser.

Link: https://simulacionurbana.com/apps/netlogo-auditor/

App has an English language option in the top right corner.

Netlogo Auditor Key Features:

1. Model Loading and Analysis

· Load files using a file picker or drag and drop.

· Read classic .nlogo models and the .nlogox format used by NetLogo 7.

· Process models locally in the browser, without uploading them to a server.

2. Diagnostic Overview

· Count procedures, variables, agent breeds, and interface elements.

· Display the main findings from the analysis.

· Classify findings as critical, warnings, items for review, or informational.

· Filter findings by severity.

· Explain each finding, with supporting evidence and a confidence level.

3. Variable Review

· Identify global variables, agent variables, and variables linked to interface controls.

· Detect declared variables with no apparent use.

· Flag variables with assignments and few references for further review.

· Detect assignments using set to variables whose definitions could not be found.

· Provide an inventory showing each variable’s scope, detected references, and usage status.

4. Procedure and Agent Breed Review

· Identify command procedures and reporter procedures.

· Detect empty and potentially orphaned procedures.

· Identify entry points through setup, go, the interface, and BehaviorSpace.

· Reconstruct calls and dependencies between procedures.

· Identify procedures reachable from entry points.

· List agent breeds, including link breeds.

· Flag potentially obsolete breeds or breeds with no detected explicit creation commands.

5. Time Management Review

· Check for time advancement through tick or tick-advance in go and the procedures it calls.

· Check for reset-ticks in setup and its associated procedures when the model uses ticks.

· Identify multiple procedures that advance time, helping users review possible duplicate advances.

· Summarize the detected time management structure.

6. Natural Language Model Explanations

· Describe each procedure’s instructions in everyday language.

· Distinguish initial setup, the main cycle, and auxiliary calculations.

· Explain recognized actions, conditions, agents, and operations.

· Make the original code available alongside each procedure’s explanation.

7. Conceptual Diagram

· Visually reconstruct the mechanism represented by the model.

· Group instructions that serve the same purpose and simplify technical helper procedures.

· Represent phases, actions, decisions, start and end points, and time advancement.

· Distinguish Yes/No branches and loops.

· Present setup and go as preparation and simulation phases.

8. Logical Diagram and Technical Structure

· Represent execution order, decisions, actors, agent creation, and loops.

· Offer three levels of detail: general, intermediate, and complete.

· Incorporate called procedures into the flow according to the selected detail level.

· Display a procedure dependency map.

· Provide tables showing which procedures call others and where their calls originate.

· Display the code with line numbers.

· List recognized NetLogo primitives used in the model, with their meanings and categories.

9. Diagram Navigation and Export

· Zoom in and out, fit diagrams to the view, and center them.

· Pan horizontally and vertically by dragging.

· Export conceptual and logical diagrams as PNG, SVG, and PDF.

· Export the complete diagram, regardless of which portion is currently visible.

10. Bilingual Interface and Local Use

· Switch between Spanish and English for the interface, findings, explanations, and diagrams.

· Preserve the model’s original identifiers and code.

· Use a bilingual semantic dictionary based on NetLogo 7.0.4.

Thanks for trying them out! Comments, suggestions, and bug reports are welcome.

Javier