What the study found
The study presents FLAT, a way to treat formal languages as types so that different kinds of strings, such as file paths, URLs, and email addresses, are not all handled as the same string type.
Why the authors say this matters
The authors say this matters because mainstream programming languages can allow incorrect or malicious strings to be passed where a different kind of string is expected, and the study suggests FLAT can help with documentation, input validation, malicious input detection, language-based fuzzing, and test oracles.
What the researchers tested
The researchers implemented the idea in FLAT-PY, a testing framework for Python. They attached annotations directly to Python code and used code instrumentation to perform runtime type checking, with user-annotated formal language types and, when needed, pre- and post-conditions.
What worked and what didn't
In case studies on real Python code fragments, FLAT-PY could detect logical bugs from random inputs generated by a language-based fuzzer. The abstract also says this was done with a reasonable number of user annotations.
What to keep in mind
The abstract does not describe detailed limitations, comparative performance, or failure cases beyond noting that semantic constraints and user annotations may be needed.
Key points
- FLAT treats formal languages as types to distinguish different kinds of strings.
- The approach targets strings such as file paths, URLs, and email addresses.
- FLAT-PY is a Python testing framework that performs runtime type checking through code instrumentation.
- Case studies on real Python code fragments found logical bugs from random inputs produced by a language-based fuzzer.
- The abstract says semantic constraints and user annotations may be needed.
Disclosure
- Research title:
- FLAT uses formal languages to type strings
- Authors:
- Fengmin Zhu, Andreas Zeller
- Institutions:
- Helmholtz Center for Information Security
- Publication date:
- 2026-03-07
- DOI:
- 10.1145/3799978
- OpenAlex record:
- View
Get the weekly research newsletter
Stay current with peer-reviewed research without reading academic papers — one filtered digest, every Friday.


