Program synthesis is one of the most active research fields today, e.g. works by Microsoft Research https://arxiv.org/abs/2208.05950 and SalesForce Research https://arxiv.org/abs/2203.13474. I intentionally selected those 2 references, because they clearly resemble the actual programming work by specifying the program intent in the gradual fashion.
All that is fine. But the bulk of the actual program development happens as part of software maintenance and evolution. Which has the several features:
- existing code base contains predefined functions and workflows and sometimes all this can be in the form of spaghetti and this should be tolerated to track the code base and to preserve the trust. So - program synthesis should expand its vocabulary by both the predefined functions (with their signature and their semantics) and existing code workflow into which the newly synthesized program (function) should be inserted and which provides the wider context for the evaluation of the correctness of the synthesized function. The user of program synthesis may specify the synthesizable function in the terms of system wide consequences and in the terms how the new function should collaborate with other functions and how it should fit into the code base.
So, the program synthesis for program maintenance and evolution requires more features:
- machine comprehension of the existing code base, existing design artifacts (UML diagrams) and test suites and existing user documentation.
- ability to extract more or less formal semantics of the existing code and use it to compound the user specified intentions.
- ability to do abstract execution or other analysis to predict the consequence of the synthesized function. That is important if the user specifies the intent in the terms how the function should alter the system behavior if function is synthesizes and inserted in some predefined place.
Many of those feature are active research fields, so, some integration can be desired (and even suffice) arrive at the answer to my question.
I have tried to search for some more or less advanced work in this field (e.g. program synthesis for software maintenance
, program synthesis for program repair
, program synthesis and program comprehension
), but I can not find even the initial efforts in this field.
So - is it possible to use program synthesis in software maintenance and how? And are the some efforts and some research work on this?