Translating Formal Specs: Event-B to English
Fatemeh Kazemi Vanhari · 2024
In software development, formal specifications are essential for providing precision and conciseness in describing system behavior. The Event-B specification language is a powerful tool in this domain, offering a variety of data types and a rich set of operations to model complex systems. However, some of these operations use less common notation, which can be challenging to understand. To assist readers of these specifications, we propose translating Event-B expressions and predicates into English. Our primary goal is to ensure that the translations are both accurate and comprehensible. We employ a rule-based system to generate accurate translations, adhering to predefined linguistic rules, and utilize a large language model to select the most readable translation. This hybrid approach ensures both fidelity and readability. Our evaluation includes measuring perplexity scores and human assessments of fluency and adequacy. The results show that GPT-4 aligns best with human evaluators, followed by GPT-3.5, with LLaMA-3 performing slightly lower.