SafeTalk: Transparent and Explainable Natural Command Execution
Abstract
SafeTalk: Transparent and Explainable Natural Command Execution is a group project report developed for the WIF3010 Programming Language Paradigms course (Semester 1, 2025/26). The project introduces SafeTalk, a prototype natural-language programming system designed to bridge the gap between rigid command-line interpreters and flexible but opaque AI agents. Unlike traditional shells that fail on typos or vague terms, SafeTalk combines a formal grammar-based interpreter (ANTLR4) with an AI-powered ambiguity resolution layer (Google Gemini API). This hybrid “Glass Box” architecture ensures safety, transparency, and explainability by: Enforcing strict grammar rules for deterministic execution. Catching ambiguous inputs (e.g., “recent” or “huge”) and resolving them via AI with human-readable justifications. Providing an explain command to trace and justify past actions. Operating within a sandbox to prevent unsafe file operations during testing. The report is structured using a Design Thinking framework, covering: Empathize & Define: Problem statement, motivation, requirements, and risk management. Ideate & Prototype: Grammar design, system architecture, and implementation details. Test: Comprehensive test suite validating arithmetic, control flow, ambiguity resolution, and exception handling. Reflection: Deliverables, limitations, and proposed future enhancements (e.g., full OS integration, loop structures, local LLM support). Key outcomes include a 100% test pass rate, successful ambiguity resolution, and verified correctness using axiomatic semantics (Hoare Logic). The project demonstrates that natural language programming can be made safe, transparent, and user-friendly when constrained by formal grammar and supported by explainable AI.
Fields of Study & Subjects
Natural Language Processing Techniques
Logic
programming
and type systems
Software Engineering Research
Publication details
- Journal / source
- Zenodo (CERN European Organization for Nuclear Research)
- Publication date
- 1 January 2026