PAPER / ARXIV:2609.20334
Zin, Fungwacharakorn, Satoh, Nitta
RESUMO
Traffic regulations are written for human interpretation and therefore rely on shared background knowledge and flexible phrasing, which inherently introduce ambiguity, context dependence, and semantic underspecification. These linguistic characteristics conflict with the precision required by computational reasoning engines such as Prolog, which demand explicit logical structure. This study evaluates two baseline translation approaches, Natural Language to Prolog (NL→Prolog) and Logical English to Prolog (LE→Prolog), introduces a new reasoning-guided framework called Structured Four-Stage Legal Translation (S4L→Prolog). The proposed S4L performs semantic role extraction, scene completion, logical mapping, and rule generation within a single guided prompt, enabling direct translation of raw traffic rules into executable logic without human intervention. A benchmark consisting of twenty real-world traffic rules was used to evaluate each approach in terms of syntactic validity, semantic correctness, and completeness. S4L→Prolog achieves the highest accuracy, correctly formalizing 75 percent of rules, while NL→Prolog reaches 60 percent and LE→Prolog reaches 55 percent. Qualitative analysis further shows that S4L captures implicit causal relations, deontic modality, exception structure more reliably than baselines. These results demonstrate that structured prompts can substantially improve the reliability of natural-language-to-logic translation for legal safety-critical applications.
NO MESMO MAPA