{'fraction_non_alphanumeric': 0.023737411978496253, 'fraction_numerical': 0.002612251078973272, 'mean_word_length': 5.48379970544919, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 7, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Automating Software Development for Mobile Computing Platforms (Doctoral Symposium)

Mobile devices such as smartphones and tablets have become ubiquitous in today's modern computing landscape. The applications that run on these mobile devices (often referred to as"apps") have become a primary means of computing for millions of users and, as such, have garnered immense developer interest. These apps allow for unique, personal software experiences through touch-based UIs and a complex assortment of sensors. However designing and implementing high quality mobile apps can be a difficult process. This is primarily due to challenges unique to mobile development including change-prone APIs and platform fragmentation, just to name a few. This paper presents the motivation and an overview of a dissertation which presents new approaches for automating and improving mobile app design and development practices. Additionally, this paper discusses potential avenues for future research based upon the work conducted, as well as general lessons learned during the author's tenure as a doctoral student in the general areas of software engineering, maintenance, and evolution.

Abstract-Mobile devices such as smartphones and tablets have become ubiquitous in today's modern computing landscape. The applications that run on these mobile devices (often referred to as "apps") have become a primary means of computing for millions of users and, as such, have garnered immense developer interest. These apps allow for unique, personal software experiences through touch-based UIs and a complex assortment of sensors. However designing and implementing high quality mobile apps can be a difficult process. This is primarily due to challenges unique to mobile development including change-prone APIs and platform fragmentation, just to name a few. This paper presents the motivation and an overview of a dissertation which presents new approaches for automating and improving mobile app design and development practices. Additionally, this paper discusses potential avenues for future research based upon the work conducted, as well as general lessons learned during the author's tenure as a doctoral student in the general areas of software engineering, maintenance, and evolution.
I. DISSERTATION OVERVIEW [1] "The essence of a software entity is a construct of interlocking concepts: data sets, relationships among data items, algorithms, and invocations of functions. This essence is abstract in that such a conceptual construct is the same under many different representations. It is nonetheless highly precise and richly detailed. I believe the hard part of building software to be the specification, design, and testing of this conceptual construct, not the labor of representing it and testing the fidelity of the representation." -Fredrick Brooks, No Silver Bullet -Essence and Accident in Software Engineering (1986) Software developers inherently reason about several different abstractions of ideas. In fact, the foundations of computer science more broadly are centered upon a hierarchy of abstractions (Fig. 1). This hierarchy begins at the lowest level with the physical representation of computers as a complex assortment of electrical signals, moves to representations of ideas in code that are able to carry out logical processes using these signals, and culminates at the highest level in mental models of logical processes for solving problems. At its core, computer science is largely concerned with the interplay between the various levels of this abstraction hierarchy. In his widely regarded "No Silver Bullet" essay [  face: (i) conceptual constructs (i.e., mental models of a given development task), and (ii) representations of these conceptual constructs (i.e., their concrete instantiation in a medium such as code, or natural language). Brooks argues that the most critical part of the software development process is not the transferral of concepts into a concrete representation, but rather the conceptualization of interlocking constructs that inherently constitute a piece of software. Although translating abstract mental models into a tangible artifact like code is not a trivial process, Brooks recognized that the mental formulation of what needs to be built is the most crucial step, as it is a distinctly abstract process requiring intellectual acuity. This is logically evident, as a faithful representation of ineffective ideas in code inevitably results in an unsuccessful program. This conceptualization of the mental model of a program is what Brooks refers to as the essence of software engineering. With this view of the software development process in mind, there are evidently two major courses of research for improving engineering practices. Namely, conducting studies to understand, and designing techniques to aid and automate (i) the derivation of a conceptual model embodying the requirements, specifications, and design of a software system, and (ii) the process of translating this conceptual model into a concrete representations that can be understood, executed, and maintained by both humans and computers. However, directly addressing this first course of research is exceedingly difficult, as it attempts to directly operate upon the essence of software engineering. As Brooks argues, due to the widely variable nature of software projects and the distinctly unique thought processes of humans, there is unlikely a "silver bullet" that dramatically improves the process of conceptualizing software.
Humans are likely to play a major role in the process of software development for the foreseeable future, and as such the process of developing conceptual constructs of software is likely to persist. Thus, in order to move the field forward, an appropriate avenue of research relates to the second course outlined above and involves helping to make the instantiation of conceptual software constructs as frictionless as possible.
In fact, such work directly targets Brook's prescriptions for dealing with the difficulties that arise related to the essence of software engineering namely, rapid prototyping and iteration and growing software organically [2].
The work presented in this dissertation attempts to facilitate the process of instantiating conceptual software development concepts into accurate, effective representations through automation. The hope is that by automating different parts of the software design, development and testing processes, we will be able to allow developers to focus more effectively on the important task of conceptualizing the data, algorithms and functions that underlie the problem or task to which the software will be applied; thus facilitating the rapid iteration and organic evolution of intuitive, elegant programs.

II. MOTIVATION -SOFTWARE LANGUAGE DICHOTOMIES
As explained in the previous section, the work conducted in the presented dissertation is aimed at designing techniques to automate various parts of the software development process. This automation is meant to facilitate the instantiation of conceptual constructs of software into concrete representations. However, these concepts can be concretely represented in several different manners, such as code, natural language, or in graphical user interfaces (GUIs). In this section, we further motivate the work conducted by examining development challenges that surface as a result of the interplay between different representations of software.
Specific challenges in software engineering often stem from difficulties navigating different pairs of languages. For instance, when considering challenges related to software traceability, developers must reason between program representations related to natural language and code, interpreting how concepts and functional specifications dictated in natural language are dispersed throughout a codebase. When designing the graphical user interface of program, designers and developers must reason between the modalities of code and pixelbased image representations of the app via the graphical user interface. These pairs of contrasting information modalities have been labeled as language dichotomies [3]. Developing solutions to help developers more effectively reason between various language dichotomies is a key factor in helping to overcome many program comprehensions challenges.
More specifically, a language dichotomy can be defined as a difficulty in program comprehension resulting from reasoning about different representations or modalities of information that describe a program [3]. There are several language dichotomies that contribute to a varied set of problems. In the presented dissertation we focus on three different modalities of information: 1) Natural Language: This modality represents languages that humans typically use to convey ideas or information to one another, such as English. 2) Code: This modality represents the languages that humans utilize to construct a program, such as Java or Swift. 3) Graphical User Interfaces (GUIs): Much of today's user facing software is graphical, and mobile apps are no exception. This information modality is highly visual, consisting of pixel-based representations of a program typically comprised of a logical set of building blocks often referred to as GUI-widgets or GUI-components. We assert that these language dichotomies can be effectively bridged through automation, thus helping to overcome several resulting software development problems. More specifically, by building upon techniques related to program analysis, machine learning, and computer vision, techniques can be derived to help automatically translate information across modalities, or detect anomalies between corresponding program representations in a single modality.

III. RESEARCH CONTEXT: MOBILE APPLICATIONS
In order to devise new approaches that automate the various components of the software development lifecycle, we need a suitable domain within which we can instantiate and evaluate them. In the scope of the presented dissertation, we focus our efforts on mobile applications. Mobile applications, often referred to colloquially as "apps", are quite simply software applications that run on mobile hardware such as smartphones or tablets. Choosing mobile applications as our research domain is beneficial for at least the following three reasons: (i) there are open challenges unique to the software development process for mobile apps, providing a fertile research landscape, (ii) mobile apps, and by extension mobile app development, are extremely popular, giving our work a large potential for practical impact, and (iii) mobile platforms provide a wide array of frameworks and utilities that facilitate varying types of program analysis. It should be noted that the work carried out in the presented dissertation is instantiated for the Android platform, mainly due to its open source nature and the litany of supporting tools and frameworks surrounding the platform. However, there are no substantial technical barriers that prevent the techniques presented in this dissertation from being transferred to other platforms.

IV. SUMMARY OF CONTRIBUTIONS
The core premise of presented dissertation is as follows: Automating the process of instantiating and reasoning about concrete representations of conceptual software constructs in code, natural language, and graphical user interfaces allows for more effective software development by enabling rapid prototyping, fast iteration, and by allowing software to grow organically as abstract concepts evolve. To prove out this thesis, we develop models and approaches for automating the design, implementation, and testing of mobile applications. In particular, we develop novel approaches for automatically constructing and testing the Graphical User Interface (GUI) of mobile apps through novel applications program analysis, computer vision, and machine learning techniques. We illustrate that the techniques presented in this dissertation represent significant advancements in mobile development processes through a series of empirical investigations, user studies, and industrial case studies that demonstrate the effectiveness of these approaches and the benefit they provide developers.

A. Automated Reporting of GUI Design Violations for Mobile Apps
First, we develop a new technique, called GVT , for detecting and reporting instances where the GUI of a mobile application does not adhere to its intended design specifications as stipulated in a mock-up. This technique receives as input two images with accompanying metadata, one for the mock-up and one screenshot of the implemented GUI, and generates a detailed report stipulating instances where the specifications of the mock-up were not properly implemented. Our approach generates hierarchal models of the mock-up and implementation of a particular screen of an application's GUI and relates this model to the pixel-based images using coordinates. It then applies a computer vision technique for measuring perpetual differences in images modeled after the human visual system, and categorizes image differences according to an empirically derived taxonomy of GUI implementation errors (See Figure  2 for example report). To evaluate GVT we carried out both a controlled empirical evaluation with open-source applications as well as an industrial evaluation with designers and developers from Huawei, a major software and telecommunications company. The results show that GVT is able to detect and Fig. 3: Prototype Applications Generated by REDRAW report violations of GUI design specifications with remarkable efficiency and accuracy and is both useful and scalable from the point of view of industrial designers and developers. GVT'S industrial applicability is bolstered by the fact that, at the time of this dissertation's publication, over one-thousand industrial designers and developers at Huawei actively utilize our approach to improve the quality of their mobile apps. This work is based primarily on the paper from Moran, Li, Bernal-Cardenas, Jelf, and Poshyvanyk [4].

B. Machine Learning-Based Prototyping of Graphical User Interfaces for Mobile Apps
Second, we devise a technique, called REDRAW, to automate the process of translating an image-based mock-up of a mobile application's GUI into suitable code. Our approach decomposes this translation process into three major steps: (i) detection of GUI elements, (ii) classification of these GUI elements into domain-specific, programmatic categories, and (iii) the construction and assembly of these categorized GUI elements into hierarchical code representation. Techniques from computer vision are utilized to detect GUI elements in image-based representations of GUIs. A deep convolutional neural network (CNN) trained on automatically derived image labels from tens of thousands applications screens is utilized to accurately classify GUI elements into programmatic categories. Finally, we develop a data-driven k-nearest neighbors (KNN) algorithm for constructing realistic hierarchical representations of an app's GUI before translating this representation into code. Our evaluation of REDRAW illustrates that our approach's CNN achieves an average GUI-component classification accuracy of 91% and assembles prototype applications that closely mirror target mock-ups in terms of visual affinity while exhibiting reasonable code structure (See Figure 3). Furthermore, interviews with industrial practitioners from Google, Facebook, and Huawei illustrate REDRAW'S potential to improve real design and development workflows. This technique is based primarily on work by Moran, Bernal-Cardenas, Curcio, Bonett, and Poshyvanyk [5].

C. Improving GUI-based Testing for Mobile Applications
Finally, we present a novel approach, called CRASHSCOPE for automated testing of mobile applications. Our approach develops a new technique for constructing an on-the-fly event flow model of an application using systematic GUI exploration. Furthermore, our approach is capable of analyzing an Fig. 4: Example Section of a CRASHSCOPE Report application both statically and dynamically, extracting program features more likely to induce crashes, and stress-testing these features according to one of several strategies. We evaluated CRASHSCOPE'S effectiveness in discovering crashes as compared to five state-of-the-art Android input generation tools on 61 applications. The results demonstrate that CRASHSCOPE is able to uncover crashes that other tools failed to detect and provides more detailed fault information. Additionally, in a study analyzing eight real-world Android app crashes, we found that CRASHSCOPE'S reports are easily readable (See Figure 4) and allow for reliable reproduction of crashes by presenting more explicit information than human written reports. This approach is based primarily on work related to the CRASHSCOPE, FUSION, and MONKEYLAB approaches conducted by Moran, Linares-Vasquez, Bernal-Cardenas, Vendome, White, and Poshyvanyk [6,7,8,9,10,11].

V. FUTURE RESEARCH VISION
The dissertation described in this paper presents several different approaches for automating the software development process of mobile applications. More specifically, we have helped to automate various aspects of the design, implementation, and testing of apps. However, the presented work only touches the surface of various components of the development process that are ripe for automation. Thus, there are several promising avenues of future work related to software development automation. In this chapter, we outline three such topics.

A. Short Term: Toward Automatically Documenting GUIs
Modern software development practices in nearly all domains are tightly constrained by aggressive release deadlines and pressure to continuously evolve software over time. This situation is worsened by the fact that developers often spend a majority of their development time comprehending code [12,13]. As outlined in Section III, many of the challenges that developers face in comprehending code can be traced back to difficulties in reasoning between different abstractions of software, such as screenshots and functional code, or bug reports and code [3,8]. Thus, one promising avenue for future work lies in automatically documenting different aspects related to the graphical user interface of GUI-based software applications. This work could lie in automatically summarizing changes as an app evolves over time, or in automatically documenting test cases based on information inferred from the GUI of screens that are tested.
The overarching goals of this future research thrust regarding automated GUI documentation are as follows: • Goal 1: Understanding Developer's and User's Information Needs in Documenting GUIs: In order to create effective automated documentation for graphical user interfaces, it is important to first understand what documentation information both developers and users find useful. Thus, the first goal of this research thrust is to conduct studies that will shed light on information needs for GUI documentation. • Goal 2: Designing Developer and User-Centric Approaches for Automated GUI Documentation: Once we have established a set of guidelines for effective GUI documentation in eyes of developers and users, we will leverage this knowledge to create approaches that are capable of automatically documenting GUIs as software evolves.

B. Long-Term: Toward GUI-centric Automated Program Understanding & Synthesis
The Graphical User Interfaces of software applications contain a wealth of information that may be useful for aiding in automated program understanding, and in the future, program synthesis. In this dissertation, we have illustrated an effective and promising approach for automated synthesis of code that implements a specified graphical user interface of a mobile app. However, this is only the first step toward a more complete process of program synthesis. Given recent advancements in artificial intelligence and machine learning techniques, particularly as they relate to computer vision, one could conceive of moving beyond the capabilities of REDRAW, towards implementing different functional properties of a GUI. However, to accomplish this, the extent to which the visual semantics of graphical user interfaces can encode underlying functional information of a software GUI must be thoroughly explored.
The overarching goals of this future research thrust in program understanding and synthesis are as follows: • Goal 1: Explore the Representational Power of Graphical User Interfaces: In order to move toward approaches capable of automatically generating functional GUI-related code, the degree to which this functional information can be learned from GUIs must be explored. In essence, this requires studies focused on ascertaining the representational properties of GUIs as related to software functionality.
• Goal 2: Designing Approaches for Synthesizing functional GUI-related Code: According to the information gleaned from studying the representational power of GUIs, we will design approaches for synthesizing code related to various discrete functional properties of software GUIs.
C. Long Term: Toward a Practical, Comprehensive Framework for Automated GUI-based Testing GUI-based testing is a critical component of the of the testing pipelines of some of the most prevalent types of modern software, such as mobile apps. There has been a wide range of research that aims to help automate various parts of the GUI-based testing process, with a particular focus on mobile apps [14,15]. However, many of these approaches have not yet been adapted in practice due to several practical shortcomings [15,16,17,18]. Thus, it is important that research on GUI-based testing continues with a focus on tailoring automated approaches toward practical workflows commonly employed by modern developers. As future work, we aim to help bring about a paradigm shift in the thinking related to GUI-based testing, based upon the research vision of CEL testing for mobile apps introduced by Linares-Vasquez, Moran, and Poshyvanyk [14]. CEL mobile testing [14] is founded on three principles aimed to overcome the shortcomings of current mobile GUI-based testing practices: Continuous, Evolutionary, and Large-scale (CEL). At a high level, these principles dictate that (i) mobile apps should be tested continuously according to different goals, (ii) testing artifacts should change in an evolutionary fashion according to the often rapid development process of mobile apps, and (iii) GUI-based testing must be performed at a large-scale to keep pace with software evolution and the ever growing landscape of mobile devices.
To achieve the vision of CEL testing, we aim to focus on the following three research thrusts adapted from [14]: • Goal 1: Develop Improved Model-Based Representations of Mobile Apps: Current approaches for modeling the behavior or user interface of mobile apps fail to capture all program attributes necessary for enabling effective GUI-based testing. Thus, we aim to explore modeling techniques that lead to a unified program model which takes into consideration information from the GUI, typical usage scenarios, expected (or unexpected) contextual states, and typical faults that befall mobile apps. • Goal 2: Expanding Automated Testing Goals: Current techniques for mobile GUI testing are chiefly concerned with a common goal, called destructive testing, which attempts to "stress test" and application to uncover faults. However, little attention, has been given to automating other types of testing goals, such as use case-based testing, which would automatically generate tests around specific use cases to help uncover software regressions. We aim to explore and evaluate [19,20] automated approaches that facilitate different testing goals. • Goal 2: Mining Software Repositories and User Reviews to Drive Automated Testing: The wealth of information in software repositories and user reviews of mobile apps can used to drive automated testing techniques toward more beneficial outcomes. For example, using user reviews to help guide testing toward potential bugs. Thus, we aim to leverage this information to inform next-generation automated techniques.

A. Lesson 1: Develop a Strong Sense of Persistence
For every successful project, there may be several failed ideas or scientific explorations. The most successful academic researchers are often those that have a relentless sense of persistence and dedication when it comes to their work. They will always be willing to try a new approach, or attack a problem from a different angle, and rarely get discouraged by negative initial results or findings. This sense of drive and dedication is a key facet of becoming a successful researcher.

B. Lesson 2: Follow your Research Passion
People tend to do their best work when they are truly passionate about the task at hand. This also tends to be true in research. If a researcher is working on a project they are truly passionate about, or that they feel might truly have an impact on developers, or the research community, they tend to work harder to ensure the success of that project. Therefore, find the topics that truly excite you, or that you feel have the potential for a large impact, and pursue them relentlessly.

C. Lesson 3: Collaborate with Industry
In the course of the dissertation work presented in this paper, we were lucky enough to collaborate with industry professionals in developing approaches aimed to help aid software developers and designers. Such collaborations are invaluable, as they help to (i) ground research in reailty, (ii) help guide research toward practical problems, and (iii) facilitate research impact. All prospective PhD students in SE should strive toward some form collaboration with industry to reap these benefits. However, such collaborations can be hard to form and sustain. Thus, the following three pieces of advice may be beneficial for future students: (i) make it a point to meet and discuss your work with industry practitioners to establish relationships, (ii) during collaboration, build prototypes, not products, and evaluate them in a way that shows value to collaborators, and (iii) be open to tackling industrial problems.