Open Access. Powered by Scholars. Published by Universities.®
Programming Languages and Compilers Commons™
Open Access. Powered by Scholars. Published by Universities.®
- Discipline
-
- Software Engineering (63)
- Artificial Intelligence and Robotics (14)
- Social and Behavioral Sciences (5)
- Data Science (4)
- Databases and Information Systems (4)
-
- Graphics and Human Computer Interfaces (4)
- Other Computer Sciences (3)
- Science and Technology Studies (3)
- Statistics and Probability (3)
- Theory and Algorithms (3)
- Communication (2)
- Information Security (2)
- Life Sciences (2)
- Numerical Analysis and Scientific Computing (2)
- Animal Sciences (1)
- Anthropology (1)
- Applied Linguistics (1)
- Applied Statistics (1)
- Art and Design (1)
- Arts and Humanities (1)
- Behavior and Ethology (1)
- Biochemistry, Biophysics, and Structural Biology (1)
- Biophysics (1)
- Climate (1)
- Communication Technology and New Media (1)
- Computational Linguistics (1)
- Computer Engineering (1)
- Keyword
-
- Refactoring (23)
- Java (17)
- Java 8 (12)
- Software engineering (11)
- Deep learning (10)
-
- Imperative programs (9)
- Programming languages (9)
- Default methods (8)
- Static analysis (8)
- Streams (8)
- Automated refactoring (7)
- Empirical studies (7)
- Scala (7)
- Software evolution (7)
- Software maintenance (6)
- Software tools (6)
- Typestate analysis (6)
- Aspect-oriented programming (5)
- Automatic parallelization (4)
- Computer science (4)
- Enumerated types (4)
- Graph execution (4)
- Hybrid programming paradigms (4)
- Interfaces (4)
- Introduction to computer programming (4)
- Programming (4)
- Python (4)
- Aspect-Oriented programming (3)
- Aspect-oriented software (3)
- Concurrency (3)
- Publication Year
- Publication
- Publication Type
- File Type
Articles 61 - 90 of 92
Full-Text Articles in Programming Languages and Compilers
On The Use Of Semantic-Based Aig To Automatically Generate Programming Exercises, Laura Zavala, Benito Mendoza
On The Use Of Semantic-Based Aig To Automatically Generate Programming Exercises, Laura Zavala, Benito Mendoza
Publications and Research
In introductory programming courses, proficiency is typically achieved through substantial practice in the form of relatively small assignments and quizzes. Unfortunately, creating programming assignments and quizzes is both, time-consuming and error-prone. We use Automatic Item Generation (AIG) in order to address the problem of creating numerous programming exercises that can be used for assignments or quizzes in introductory programming courses. AIG is based on the use of test-item templates with embedded variables and formulas which are resolved by a computer program with actual values to generate test-items. Thus, hundreds or even thousands of test-items can be generated with a single …
Relating Justification Logic Modality And Type Theory In Curry–Howard Fashion, Konstantinos Pouliasis
Relating Justification Logic Modality And Type Theory In Curry–Howard Fashion, Konstantinos Pouliasis
Dissertations, Theses, and Capstone Projects
This dissertation is a work in the intersection of Justification Logic and Curry--Howard Isomorphism. Justification logic is an umbrella of modal logics of knowledge with explicit evidence. Justification logics have been used to tackle traditional problems in proof theory (in relation to Godel's provability) and philosophy (Gettier examples, Russel's barn paradox). The Curry--Howard Isomorphism or proofs-as-programs is an understanding of logic that places logical studies in conjunction with type theory and -- in current developments -- category theory. The point being that understanding a system as a logic, a typed calculus and, a language of a class of categories constitutes …
Defaultification Refactoring: A Tool For Automatically Converting Java Methods To Default, Raffi Khatchadourian, Hidehiko Masuhara
Defaultification Refactoring: A Tool For Automatically Converting Java Methods To Default, Raffi Khatchadourian, Hidehiko Masuhara
Publications and Research
Enabling interfaces to declare (instance) method implementations, Java 8 default methods can be used as a substitute for the ubiquitous skeletal implementation software design pattern. Performing this transformation on legacy software manually, though, may be non-trivial. The refactoring requires analyzing complex type hierarchies, resolving multiple implementation inheritance issues, reconciling differences between class and interface methods, and analyzing tie-breakers (dispatch precedence) with overriding class methods. All of this is necessary to preserve type-correctness and confirm semantics preservation. We demonstrate an automated refactoring tool called Migrate Skeletal Implementation to Interface for transforming legacy Java code to use the new default construct. The …
Automated Refactoring Of Legacy Java Software To Default Methods, Raffi Khatchadourian, Hidehiko Masuhara
Automated Refactoring Of Legacy Java Software To Default Methods, Raffi Khatchadourian, Hidehiko Masuhara
Publications and Research
Java 8 default methods, which allow interfaces to contain (instance) method implementations, are useful for the skeletal implementation software design pattern. However, it is not easy to transform existing software to exploit default methods as it requires analyzing complex type hierarchies, resolving multiple implementation inheritance issues, reconciling differences between class and interface methods, and analyzing tie-breakers (dispatch precedence) with overriding class methods to preserve type-correctness and confirm semantics preservation. In this paper, we present an efficient, fully-automated, type constraint-based refactoring approach that assists developers in taking advantage of enhanced interfaces for their legacy Java software. The approach features an extensive …
Automated Refactoring Of Legacy Java Software To Default Methods, Raffi Khatchadourian, Hidehiko Masuhara
Automated Refactoring Of Legacy Java Software To Default Methods, Raffi Khatchadourian, Hidehiko Masuhara
Publications and Research
Java 8 introduces enhanced interfaces, allowing for default (instance) methods that implementers will inherit if none are provided [3]. Default methods can be used [2] as a replacement of the skeletal implementation pattern [1], which creates abstract skeletal implementation classes that implementers extend. Migrating legacy code using the skeletal implementation pattern to instead use default methods can require significant manual effort due to subtle language and semantic restrictions. It requires preserving typecorrectness by analyzing complex type hierarchies, resolving issues arising from multiple inheritance, reconciling differences between class and interface methods, and ensuring tie-breakers with overriding class methods do not alter …
Comparing Tensorflow Deep Learning Performance Using Cpus, Gpus, Local Pcs And Cloud, John Lawrence, Jonas Malmsten, Andrey Rybka, Daniel A. Sabol, Ken Triplin
Comparing Tensorflow Deep Learning Performance Using Cpus, Gpus, Local Pcs And Cloud, John Lawrence, Jonas Malmsten, Andrey Rybka, Daniel A. Sabol, Ken Triplin
Publications and Research
Deep learning is a very computational intensive task. Traditionally GPUs have been used to speed-up computations by several orders of magnitude. TensorFlow is a deep learning framework designed to improve performance further by running on multiple nodes in a distributed system. While TensorFlow has only been available for a little over a year, it has quickly become the most popular open source machine learning project on GitHub. The open source version of TensorFlow was originally only capable of running on a single node while Google’s proprietary version only was capable of leveraging distributed systems. This has now changed. In this …
Cst1101–Problem Solving With Computer Programming, Syllabus, Elena Filatova
Cst1101–Problem Solving With Computer Programming, Syllabus, Elena Filatova
Open Educational Resources
No abstract provided.
Automated Refactoring Of Legacy Java Software To Default Methods, Raffi Khatchadourian, Hidehiko Masuhara
Automated Refactoring Of Legacy Java Software To Default Methods, Raffi Khatchadourian, Hidehiko Masuhara
Publications and Research
Java 8 default methods, which allow interfaces to contain (instance) method implementations, are useful for the skeletal implementation software design pattern. However, it is not easy to transform existing software to exploit default methods as it requires analyzing complex type hierarchies, resolving multiple implementation inheritance issues, reconciling differences between class and interface methods, and analyzing tie-breakers (dispatch precedence) with overriding class methods to preserve type-correctness and confirm semantics preservation. In this paper, we present an efficient, fully-automated, type constraint-based refactoring approach that assists developers in taking advantage of enhanced interfaces for their legacy Java software. The approach features an extensive …
Make A Twitter Bot In Python: Iterative Code Examples, Robin Camille Davis, Mark E. Eaton
Make A Twitter Bot In Python: Iterative Code Examples, Robin Camille Davis, Mark E. Eaton
Publications and Research
A tutorial based upon the LACUNY Emerging Technologies Committee’s “Build Your Own Twitter Bot” day in December 2015, which was billed as a gentle introduction to programming in Python.
Towards Improving Interface Modularity In Legacy Java Software Through Automated Refactoring, Raffi T. Khatchadourian, Olivia Moore, Hidehiko Masuhara
Towards Improving Interface Modularity In Legacy Java Software Through Automated Refactoring, Raffi T. Khatchadourian, Olivia Moore, Hidehiko Masuhara
Publications and Research
The skeletal implementation pattern is a software design pattern consisting of defining an abstract class that provides a partial interface implementation. However, since Java allows only single class inheritance, if implementers decide to extend a skeletal implementation, they will not be allowed to extend any other class. Also, discovering the skeletal implementation may require a global analysis. Java 8 enhanced interfaces alleviate these problems by allowing interfaces to contain (default) method implementations, which implementers inherit. Java classes are then free to extend a different class, and a separate abstract class is no longer needed; developers considering implementing an interface need …
Towards Improving Interface Modularity In Legacy Java Software Through Automated Refactoring, Raffi Khatchadourian, Olivia Moore, Hidehiko Masuhara
Towards Improving Interface Modularity In Legacy Java Software Through Automated Refactoring, Raffi Khatchadourian, Olivia Moore, Hidehiko Masuhara
Publications and Research
The skeletal implementation pattern is a software design pattern that defines an abstract class that provides a partial interface implementation. However, since Java allows only single class inheritance, if implementers decide to extend a skeletal implementation, they will not be allowed to extend any other class. Also, discovering the skeletal implementation may require a global analysis. Java 8 enhanced interfaces alleviate these problems by enabling interfaces to contain (default) method implementations, which implementers inherit. Java classes are then free to extend a different class, and a separate abstract class is no longer needed; developers considering implementing an interface need only …
Automated Refactoring Of Legacy Java Software To Enumerated Types, Raffi Khatchadourian
Automated Refactoring Of Legacy Java Software To Enumerated Types, Raffi Khatchadourian
Publications and Research
Modern Java languages introduce several new features that offer significant improvements over older Java technology. In this article we consider the new enum construct, which provides language support for enumerated types. Prior to recent Java languages, programmers needed to employ various patterns (e.g., the weak enum pattern) to compensate for the absence of enumerated types in Java. Unfortunately, these compensation patterns lack several highly-desirable properties of the enum construct, most notably, type safety. We present a novel fully-automated approach for transforming legacy Java code to use the new enumeration construct. This semantics-preserving approach increases type safety, produces code that is …
Detecting Broken Pointcuts Using Structural Commonality And Degree Of Interest, Raffi Khatchadourian, Awais Rashd, Hidehiko Masuhara, Takuya Watanabe
Detecting Broken Pointcuts Using Structural Commonality And Degree Of Interest, Raffi Khatchadourian, Awais Rashd, Hidehiko Masuhara, Takuya Watanabe
Publications and Research
Pointcut fragility is a well-documented problem in Aspect-Oriented Programming; changes to the base code can lead to join points incorrectly falling in or out of the scope of pointcuts. Deciding which pointcuts have broken due to base-code changes is daunting, especially in large and complex systems. We present an automated approach that recommends pointcuts that are likely to require modification due to a certain base-code change and ones that do not. Our hypothesis is that join points selected by a pointcut exhibit common structural characteristics. Patterns describing such commonalities recommend pointcuts that have potentially broken to the developer. The approach …
Porting The Netbeans Java 8 Enhanced For Loop Lambda Expression Refactoring To Eclipse, Md Arefin, Raffi Khatchadourian
Porting The Netbeans Java 8 Enhanced For Loop Lambda Expression Refactoring To Eclipse, Md Arefin, Raffi Khatchadourian
Publications and Research
Java 8 is one of the largest upgrades to the popular language and framework in over a decade. However, the Eclipse IDE is missing several key refactorings that could help developers take advantage of new features in Java 8 more easily. In this paper, we discuss our ongoing work in porting the enhanced for loop to lambda expression refactoring from the NetBeans IDE to Eclipse. We also discuss future plans for new Java 8 refactorings not found in any current IDE.
Porting The Netbeans Java 8 Enhanced For Loop Lambda Expression Refactoring To Eclipse, Md Arefin, Raffi Khatchadourian
Porting The Netbeans Java 8 Enhanced For Loop Lambda Expression Refactoring To Eclipse, Md Arefin, Raffi Khatchadourian
Publications and Research
Java 8 is one of the largest upgrades to the popular language and framework in over a decade. However, the Eclipse IDE is missing several key refactorings that could help developers take advantage of new features in Java 8 more easily. In this paper, we discuss our ongoing work in porting the enhanced for loop to lambda expression refactoring from the NetBeans IDE to Eclipse. We also discuss future plans for new Java 8 refactorings not found in any current IDE.
Fraglight: Shedding Light On Broken Pointcuts In Evolving Aspect-Oriented Software, Raffi Khatchadourian, Awais Rashid, Hidehiko Masuhara, Takuya Watanabe
Fraglight: Shedding Light On Broken Pointcuts In Evolving Aspect-Oriented Software, Raffi Khatchadourian, Awais Rashid, Hidehiko Masuhara, Takuya Watanabe
Publications and Research
Pointcut fragility is a well-documented problem in Aspect-Oriented Programming; changes to the base code can lead to join points incorrectly falling in or out of the scope of pointcuts. Deciding which pointcuts have broken due to base-code changes is daunting, especially in large and complex systems. We demonstrate an automated tool called FRAGLIGHT that recommends a set of pointcuts that are likely to require modification due to a certain base-code change. The underlying approach is rooted in harnessing unique and arbitrarily deep structural commonality between program elements corresponding to join points selected by a pointcut in a particular software version. …
Assessing Satellite Image Data Fusion With Information Theory Metrics, James Cross
Assessing Satellite Image Data Fusion With Information Theory Metrics, James Cross
Dissertations and Theses
A common problem in remote sensing is estimating an image with high spatial and high spectral resolution given separate sources of measurements from satellite instruments, one having each of these desirable properties. This thesis presents a survey of seven families of algorithms which have been developed to provide this common pattern of satellite image data fusion. They are all tested on artificially degraded sets of satellite data from the Moderate Resolution Imaging Spectroradiometer (“MODIS”) with known ideal results, and evaluated using the commonly accepted data fusion assessment metrics spectral angle mapper (“SAM”) and Erreur Relative Globale Adimensionelle de Synth`ese (“ERGAS”). …
Pointcut Rejuvenation: Recovering Pointcut Expressions In Evolving Aspect-Oriented Software, Raffi Khatchadourian, Phil Greenwood, Awais Rashid, Harry Xu
Pointcut Rejuvenation: Recovering Pointcut Expressions In Evolving Aspect-Oriented Software, Raffi Khatchadourian, Phil Greenwood, Awais Rashid, Harry Xu
Publications and Research
Pointcut fragility is a well-documented problem in Aspect-Oriented Programming; changes to the base code can lead to join points incorrectly falling in or out of the scope of pointcuts. In this paper, we present an automated approach that limits fragility problems by providing mechanical assistance in pointcut maintenance. The approach is based on harnessing arbitrarily deep structural commonalities between program elements corresponding to join points selected by a pointcut. The extracted patterns are then applied to later versions to offer suggestions of new join points that may require inclusion. To illustrate that the motivation behind our proposal is well founded, …
Formalizing Reusable Aspect-Oriented Concurrency Control, Neelam Soundarajan, Derek Bronish, Raffi Khatchadourian
Formalizing Reusable Aspect-Oriented Concurrency Control, Neelam Soundarajan, Derek Bronish, Raffi Khatchadourian
Publications and Research
Java and its library provide powerful concurrency control mechanisms. However, their use can lead to similar synchronization code scattered across multiple classes, synchronization and functional code being tangled together, and similar code being duplicated in many applications. Aspect-oriented (AO) programming makes it possible to address these problems. However, the specific behavior of systems built using AO techniques can be challenging to comprehend. We propose a specification approach to precisely express such systems' critical concurrency and synchronization properties. We illustrate the method with a simple example.
Enumeration Refactoring: A Tool For Automatically Converting Java Constants To Enumerated Types, Raffi Khatchadourian, Benjamin Muskalla
Enumeration Refactoring: A Tool For Automatically Converting Java Constants To Enumerated Types, Raffi Khatchadourian, Benjamin Muskalla
Publications and Research
Java 5 introduces several new features that significantly improve older Java technology. We consider the new enum construct, which provides language support for enumerated types. Before Java 5, programmers needed to employ various patterns to compensate for the absence of enumerated types in Java. Unfortunately, these compensation patterns lack several highly desirable properties of the enum construct, notably type-safety. We demonstrate an automated refactoring tool called Convert Constants to Enum for transforming legacy Java code to use the new enumeration construct. An interprocedural type inferencing algorithm that tracks the flow of enumerated values drives the approach, and the tool is …
Optimal Cryptographic Hardness Of Learning Monotone Functions, Dana Dachman-Soled, Homin K. Lee, Tal Malkin, Rocco A. Servedio, Andrew Wan, Hoeteck Wee
Optimal Cryptographic Hardness Of Learning Monotone Functions, Dana Dachman-Soled, Homin K. Lee, Tal Malkin, Rocco A. Servedio, Andrew Wan, Hoeteck Wee
Publications and Research
Over the years a range of positive algorithmic results have been obtained for learning various classes of monotone Boolean functions from uniformly distributed random examples. Prior to our work, however, the only negative result for learning monotone functions in this model has been an information-theoretic lower bound showing that certain super-polynomial-size monotone circuits cannot be learned to accuracy 1/2+w(log n/ p n) (Blum, Burch, and Langford, FOCS’98). This is in contrast with the situation for nonmonotone functions, where a wide range of cryptographic hardness results establish that various “simple” classes of polynomial-size circuits are not learnable by polynomial-time algorithms.
In …
Pointcut Rejuvenation: Recovering Pointcut Expressions In Evolving Aspect-Oriented Software, Raffi Khatchadourian, Phil Greenwood, Awais Rashid, Guoqing Harry Xu
Pointcut Rejuvenation: Recovering Pointcut Expressions In Evolving Aspect-Oriented Software, Raffi Khatchadourian, Phil Greenwood, Awais Rashid, Guoqing Harry Xu
Publications and Research
Pointcut fragility is a well-documented problem in Aspect-Oriented Programming; changes to the base-code can lead to join points incorrectly falling in or out of the scope of pointcuts. We present an automated approach that limits fragility problems by providing mechanical assistance in pointcut maintenance. The approach is based on harnessing arbitrarily deep structural commonalities between program elements corresponding to join points selected by a pointcut. The extracted patterns are then applied to later versions to offer suggestions of new join points that may require inclusion. We demonstrate the usefulness of our technique by rejuvenating pointcuts in multiple versions of several …
Contributing Factors To Pointcut Fragility, Phil Greenwood, Awais Rashid, Raffi Khatchadourian
Contributing Factors To Pointcut Fragility, Phil Greenwood, Awais Rashid, Raffi Khatchadourian
Publications and Research
Pointcut fragility is a well-documented problem of Aspect-Oriented Programming with changes to the base-code causing join points to incorrectly fall in or out of scope. In order to combat this problem a tool was developed that provides mechanical assistance to pointcut maintenance. This tool relied on the deep structural commonalities between program elements to detect when pointcut fragility occurs. During the assessment of this tool a number of common practices were uncovered that were employed both in the aspect and base-code that contributed to or prevented pointcut fragility. This paper documents the practices uncovered and describes how they can affect …
Specifying Reusable Aspects, Neelam Soundarajan, Raffi Khatchadourian
Specifying Reusable Aspects, Neelam Soundarajan, Raffi Khatchadourian
Publications and Research
Aspect-Oriented Programming enables developers to manage, in a more modular fashion, implementations of crosscutting concerns that might be scattered or tangled if aspect-oriented techniques were not utilized. Our interest in this paper is in considering techniques for specifying precise properties of aspects. In particular, we are interested in specifying reusable aspects; i.e., aspects that correspond to crosscutting concerns that occur in many systems. These abstract aspects can be reused in various systems where a particular concern is applicable. Although there has been work on issues related to reasoning about aspects and the behaviors of aspect-oriented systems, specifying reusable abstract aspects …
On The Assessment Of Pointcut Design In Evolving Aspect-Oriented Software, Raffi Khatchadourian, Phil Greenwood, Awais Rashid
On The Assessment Of Pointcut Design In Evolving Aspect-Oriented Software, Raffi Khatchadourian, Phil Greenwood, Awais Rashid
Publications and Research
No abstract provided.
Rejuvenate Pointcut: A Tool For Pointcut Expression Recovery In Evolving Aspect-Oriented Software, Raffi Khatchadourian, Awais Rashid
Rejuvenate Pointcut: A Tool For Pointcut Expression Recovery In Evolving Aspect-Oriented Software, Raffi Khatchadourian, Awais Rashid
Publications and Research
Aspect-oriented programming (AOP) strives to localize the scattered and tangled implementations of crosscutting concerns (CCCs) by allowing developers to declare that certain actions (advice) should be taken at specific points (join points) during the execution of software where a CCC (an aspect) is applicable. However, it is non-trivial to construct optimal pointcut expressions (a collection of join points) that capture the true intentions of the programmer and, upon evolution, maintain these intentions. We demonstrate an AspectJ source-level inferencing tool called rejuvenate pointcut which helps developers maintain pointcut expressions over the lifetime of a software product. A key insight into the …
Pointcut Rejuvenation: Recovering Pointcut Expressions In Evolving Aspect-Oriented Software, Raffi Khatchadourian, Phil Greenwood, Awais Rashid, Guoqing Harry Xu
Pointcut Rejuvenation: Recovering Pointcut Expressions In Evolving Aspect-Oriented Software, Raffi Khatchadourian, Phil Greenwood, Awais Rashid, Guoqing Harry Xu
Publications and Research
Pointcut fragility is a well-documented problem in Aspect-Oriented Programming; changes to the base-code can lead to join points incorrectly falling in or out of the scope of pointcuts. In this paper, we present an automated approach which limits fragility problems by providing mechanical assistance in pointcut maintenance. The approach is based on harnessing arbitrarily deep structural commonalities between program elements corresponding to join points selected by a pointcut. The extracted patterns are then applied to later versions to offer suggestions of new join points that may require inclusion. To illustrate that the motivation behind our proposal is well-founded, we first …
Enforcing Behavioral Constraints In Evolving Aspect-Oriented Programs, Raffi Khatchadourian, Johan Dovland, Neelam Soundarajan
Enforcing Behavioral Constraints In Evolving Aspect-Oriented Programs, Raffi Khatchadourian, Johan Dovland, Neelam Soundarajan
Publications and Research
Reasoning, specification, and verification of Aspect-Oriented (AO) programs presents unique challenges especially as such programs evolve over time. Components, base-code and aspects alike, may be easily added, removed, interchanged, or presently unavailable at unpredictable frequencies. Consequently, modular reasoning of such programs is highly attractive as it enables tractable evolution, otherwise necessitating that the entire program be reexamined each time a component is changed. It is well known, however, that modular reasoning about AO programs is difficult. In this paper, we present our ongoing work in constructing a rely-guarantee style reasoning system for the Aspect-Oriented Programming (AOP) paradigm, adopting a trace-based …
Reasoning About The Behavior Of Aspect-Oriented Programs, Neelam Soundarajan, Raffi Khatchadourian, Johan Dovland
Reasoning About The Behavior Of Aspect-Oriented Programs, Neelam Soundarajan, Raffi Khatchadourian, Johan Dovland
Publications and Research
Aspect-oriented programming (AOP) has become increasingly popular over the last few years. At the same time, reasoning about the behavior of these programs poses serious challenges. In this paper, we present a rely-guarantee approach to such reasoning. The rely-guarantee approach has proven useful in reasoning about concurrent and distributed programs. We show that some of the key problems encountered in reasoning about aspect-oriented programs are similar to those encountered in reasoning about concurrent programs; and that the rely-guarantee approach, appropriately modified, helps address these problems. We illustrate our approach with a simple example.
Automated Refactoring Of Legacy Java Software To Enumerated Types, Raffi Khatchadourian, Jason Sawin, Atanas Rountev
Automated Refactoring Of Legacy Java Software To Enumerated Types, Raffi Khatchadourian, Jason Sawin, Atanas Rountev
Publications and Research
Modern Java languages introduce several new features that offer significant improvements over older Java technology. In this article we consider the new enum construct, which provides language support for enumerated types. Prior to recent Java languages, programmers needed to employ various patterns (e.g., the weak enum pattern) to compensate for the absence of enumerated types in Java. Unfortunately, these compensation patterns lack several highly-desirable properties of the enum construct, most notably, type safety. We present a novel fully-automated approach for transforming legacy Java code to use the new enumeration construct. This semantics-preserving approach increases type safety, produces code that is …