Grammar-Constrained Refinement of Safety Operational Rules Using Language in the Loop: What Could Go Wrong

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Gaaloul, Khouloud, Ghazal, Zaid, Pulimi, Madhu Latha, Kathiravan, Sam Emmanuel
Format: Preprint
Published: 2026
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866910166584131584
author Gaaloul, Khouloud
Ghazal, Zaid
Pulimi, Madhu Latha
Kathiravan, Sam Emmanuel
author_facet Gaaloul, Khouloud
Ghazal, Zaid
Pulimi, Madhu Latha
Kathiravan, Sam Emmanuel
contents Safety specifications in cyber-physical systems (CPS) capture the operational conditions the system must satisfy to operate safely within its intended environment. As operating environments evolve, operational rules must be continuously refined to preserve consistency with observed system behavior during simulation-based verification and validation. Revising inconsistent rules is challenging because the changes must remain syntactically correct under a domain-specific grammar. Language-in-the-loop refinement further raises safety concerns beyond syntactic violations, as it can produce semantically unjustified refinements that overfit to the observed outcomes. We introduce a framework that combines counterfactual reasoning with a grammar-constrained refinement loop to refine operational rules, aligning them with the observed system behavior. Applied to an autonomous driving control system, our approach successfully resolved the inconsistencies in an operational rule inferred by a conventional baseline while remaining grammar compliant. An empirical large language model (LLM) study further revealed model-dependent refinement quality and safety lessons, which motivate rigorous grammar enforcement, stronger semantic validation, and broader evaluation in future work.
format Preprint
id arxiv_https___arxiv_org_abs_2604_23523
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Grammar-Constrained Refinement of Safety Operational Rules Using Language in the Loop: What Could Go Wrong
Gaaloul, Khouloud
Ghazal, Zaid
Pulimi, Madhu Latha
Kathiravan, Sam Emmanuel
Software Engineering
Artificial Intelligence
Safety specifications in cyber-physical systems (CPS) capture the operational conditions the system must satisfy to operate safely within its intended environment. As operating environments evolve, operational rules must be continuously refined to preserve consistency with observed system behavior during simulation-based verification and validation. Revising inconsistent rules is challenging because the changes must remain syntactically correct under a domain-specific grammar. Language-in-the-loop refinement further raises safety concerns beyond syntactic violations, as it can produce semantically unjustified refinements that overfit to the observed outcomes. We introduce a framework that combines counterfactual reasoning with a grammar-constrained refinement loop to refine operational rules, aligning them with the observed system behavior. Applied to an autonomous driving control system, our approach successfully resolved the inconsistencies in an operational rule inferred by a conventional baseline while remaining grammar compliant. An empirical large language model (LLM) study further revealed model-dependent refinement quality and safety lessons, which motivate rigorous grammar enforcement, stronger semantic validation, and broader evaluation in future work.
title Grammar-Constrained Refinement of Safety Operational Rules Using Language in the Loop: What Could Go Wrong
topic Software Engineering
Artificial Intelligence
url https://arxiv.org/abs/2604.23523