Syntax Is Easy, Semantics Is Hard: Evaluating LLMs for LTL Translation

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Danso, Priscilla Kyei, Hasan, Mohammad Saqib, Balasubramanian, Niranjan, Chowdhury, Omar
Natura: Preprint
Pubblicazione: 2026
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866913016484724736
author Danso, Priscilla Kyei
Hasan, Mohammad Saqib
Balasubramanian, Niranjan
Chowdhury, Omar
author_facet Danso, Priscilla Kyei
Hasan, Mohammad Saqib
Balasubramanian, Niranjan
Chowdhury, Omar
contents Propositional Linear Temporal Logic (LTL) is a popular formalism for specifying desirable requirements and security and privacy policies for software, networks, and systems. Yet expressing such requirements and policies in LTL remains challenging because of its intricate semantics. Since many security and privacy analysis tools require LTL formulas as input, this difficulty places them out of reach for many developers and analysts. Large Language Models (LLMs) could broaden access to such tools by translating natural language fragments into LTL formulas. This paper evaluates that premise by assessing how effectively several representative LLMs translate assertive English sentences into LTL formulas. Using both human-generated and synthetic ground-truth data, we evaluate effectiveness along syntactic and semantic dimensions. The results reveal three findings: (1) in line with prior findings, LLMs perform better on syntactic aspects of LTL than on semantic ones; (2) they generally benefit from more detailed prompts; and (3) reformulating the task as a Python code-completion problem substantially improves overall performance. We also discuss challenges in conducting a fair evaluation on this task and conclude with recommendations for future work.
format Preprint
id arxiv_https___arxiv_org_abs_2604_07321
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Syntax Is Easy, Semantics Is Hard: Evaluating LLMs for LTL Translation
Danso, Priscilla Kyei
Hasan, Mohammad Saqib
Balasubramanian, Niranjan
Chowdhury, Omar
Logic in Computer Science
Artificial Intelligence
Propositional Linear Temporal Logic (LTL) is a popular formalism for specifying desirable requirements and security and privacy policies for software, networks, and systems. Yet expressing such requirements and policies in LTL remains challenging because of its intricate semantics. Since many security and privacy analysis tools require LTL formulas as input, this difficulty places them out of reach for many developers and analysts. Large Language Models (LLMs) could broaden access to such tools by translating natural language fragments into LTL formulas. This paper evaluates that premise by assessing how effectively several representative LLMs translate assertive English sentences into LTL formulas. Using both human-generated and synthetic ground-truth data, we evaluate effectiveness along syntactic and semantic dimensions. The results reveal three findings: (1) in line with prior findings, LLMs perform better on syntactic aspects of LTL than on semantic ones; (2) they generally benefit from more detailed prompts; and (3) reformulating the task as a Python code-completion problem substantially improves overall performance. We also discuss challenges in conducting a fair evaluation on this task and conclude with recommendations for future work.
title Syntax Is Easy, Semantics Is Hard: Evaluating LLMs for LTL Translation
topic Logic in Computer Science
Artificial Intelligence
url https://arxiv.org/abs/2604.07321