The Pyttern Program Query Language

Saved in:
Bibliographic Details
Title: The Pyttern Program Query Language
Authors: Liénard, Julien, Mens, Kim, Nijssen, Siegfried
Source: ISBN:978-3-95977-382-9 ; Companion Proceedings of the 9th International Conference on the Art, Science, and Engineering of Programming (Programming 2025), vol. 134 (23) ; 9th Symposium on Computer Languages, Implementations and Tools, Prague, Czechia, 2-6 June 2025.
Publisher Information: Dagstuhl Publishing
Publication Year: 2025
Description: Despite the availability of numerous tools and languages for detecting structural patterns in programs, their complexity often presents a steep learning curve. This highlights the need for a program query language that is easier to learn, use, and read while remaining sufficiently expressive for defining and detecting relevant structural coding patterns in program code. To address this challenge, we present Pyttern, a query language that extends Python syntax with regular-expression-inspired wildcards, enabling intuitive pattern-based querying of Python code. Its implementation relies upon a custom pushdown automaton describing how to match patterns over program parse trees, thus providing a robust foundation for structural code analysis. We evaluate Pyttern’s usability and effectiveness through a study involving 35 master’s students, who were asked to write seven different patterns to identify known programming misconceptions. The results demonstrate that Pyttern is both easy to learn and practical to use, at least for analysing small-scale programs. ; status: Published
Document Type: conference object
File Description: application/pdf
Language: unknown
ISBN: 978-3-95977-382-9
3-95977-382-X
Relation: https://lirias.kuleuven.be/handle/20.500.12942/779981; https://doi.org/10.4230/OASIcs.Programming.2025.23
DOI: 10.4230/OASIcs.Programming.2025.23
Availability: https://lirias.kuleuven.be/handle/20.500.12942/779981
https://hdl.handle.net/20.500.12942/779981
https://lirias.kuleuven.be/retrieve/59bdca85-2d08-4494-b3d2-62ddd0d485a1
https://doi.org/10.4230/OASIcs.Programming.2025.23
Rights: info:eu-repo/semantics/openAccess ; public ; https://creativecommons.org/licenses/by/4.0/
Accession Number: edsbas.6046F8AF
Database: BASE
Be the first to leave a comment!
You must be logged in first