Machine Learning and Software Engineering
Dr. Akhilesh Tyagi
Machine learning has created many exciting opportunities within the last 5-10 years. Machine learning learns to classify objects on the basis of the targeted property correlation with some structural features. For example, let us take an arbitrary Obj-C program to determine if it contains a buggy release of an object after it has already been released. The existing methodology involves extensive dynamic testing to see if an execution path containing a release of an object Obj followed by another release without a new intervening instantiation of Obj exists. This, of course, is combinatorially very expensive task which is computationally impractical. Machine learning, on the other hand, might learn correlations between the existence of this bug and some other features (clues) within a program. Deep learning constructs multi-layer correlation: X0 -> X1 -> X2 -> X3 correlates some primitive, visible feature X0 with existence of a derived abstract feature X1, which in turn is correlated to another abstract feature X2, which in turn is correlated to a desired property X3. Human brain is not necessarily that good at detecting such subtle correlations.
Software engineering has not deployed machine learning in any significant way yet. Machine learning can assist software engineering in two broad ways. First, machine learning based software may be more efficient compared to traditional algorithmic versions. This has been evident in natural language processing with Google Translate & Google assistant where 500 lines of TensorFlow code have replaced 500,000 lines of traditional code. Second way involves machine learning easing software development, testing, deployment, and maintenance tasks. The following narrative postulates some of these scenarios.
Machine learning is a proxy for human judgement. In iterative compiler optimization, determining the quality the machine level program is an approximate process or requires a human in the loop. It may be feasible to replace the human in the loop or the approximate quality models with machine learning.
Automated code generation from some high level behavior specification has been a holy grail of software engineering for a long time. Machine learning may help us map specific design and code patterns to behavior specification slices, and to create smooth seams between such code bricks.
With heterogeneous computing systems, there is a need for software systems that are polymorphic – can morph into a code form appropriate for a given virtual platform (as opposed to a virtual platform adapting to code as is done in modern cloud computing). Requirements to behavior verification is a complicated step in this flow. Machine learning may expedite such verification by learning some intermediate features in the code refinement.
These examples are merely to get your own imagination going regarding the relevance of machine learning within the context of software engineering. I hope some of you will come up with many imaginative solutions in the machine learning driven software engineering frontier in the years to come!
Some additional reading on this topic includes (1) https://www.worldscientific.com/worldscibooks/10.1142/5700, (2) https://www.oreilly.com/ideas/what-machine-learning-means-for-software-development, (3) https://ieeexplore.ieee.org/document/1180784, (4) https://www.forbes.com/sites/forbestechcouncil/2017/08/31/how-will-ai-im....