San Juan, PR July 23 – 28, 2006
A Cross-Disciplinary Software Engineering Project
Implemented as a Web Service
Pearl Brazier
Department of Computer Science, University of Texas-Pan American Edinburg, TX 78539 [email protected]
María Cristina Villalobos, Monty B. Taylor, Kanadpriya Basu, and Treena Sircar Department of Mathematics, University of Texas-Pan American
[email protected], [email protected], [email protected] [email protected],
Abstract - Semantic Web Services and Grids have come of
age and are ripe for supporting specific scientific application areas. This paper describes an undergraduate course in Software Engineering at the University of Texas-Pan American that demonstrates a cooperative cross-disciplinary approach, integrating a problem from mathematics with the processes from software engineering. The mathematics discipline has the task of scheduling the faculty teaching workload each semester and modeled the problem as a linear program. The software engineering class developed the user interface to automate the task of gathering information, such as, instructor course or time preferences for classes, and the classes offered during a semester. These parameters are then written into the modeling language format required by the optimization solver. The software automatically invokes the Web optimization solver program, captures the results and displays the results for further user processing. The entire process is implemented as a Web Service.
Index Terms - Cross-Disciplinary, Optimization, Software
Engineering Project, Web Service INTRODUCTION
Semantic Web Services and Grid Services have come of age and are ripe for supporting scientific application areas. Software Engineering has also matured and is recognized as an area that can exist as a separate discipline or as a major component of a computer science program. The undergraduate bachelor degree plan in Computer Science at the University of Texas-Pan American (UTPA) requires a course in Software Engineering. This course requires students to work on a semester-long project on a real-life application, which is driven by a client. For the Spring 2006 semester, the project involved the Departments of Computer Science and Mathematics at UTPA. Each year, academic departments have the task of assigning faculty their course load for the semester. The Department of Mathematics modeled the assignment of faculty teaching workload as a linear program [1] and used the
GAMS modeling language, along with solvers available in the NEOS server, to model and solve the optimization problem [2,3]. However, gathering instructor and course data and writing these parameters manually to create the GAMS file is time-consuming and prone to error.
The use of services provided on the Web has become more commonplace, but requires some level of technical expertise and hands-on intervention in combining tasks to accomplish an overall goal. By combining the skills of the Software Engineering class to supply a user interface and overall processing control with the expertise of the mathematicians who provided the modeling of the solution, the required technical management skill level for the client is reduced. The software automates the process of gathering faculty teaching preferences, solving the linear program, and presenting results in a suitable format. This application from mathematics presents a project that has sufficient complexity to motivate the necessity of applying traditional software engineering life cycle principles.
In this paper, we first provide a brief background on the pedagogy of the software engineering course, and then discuss the course overview. Next, we discuss the cross-disciplinary approach taken by the two academic departments involved in the project, followed by the project development and implementation, results, and conclusions.
BACKGROUND
The University of Texas-Pan American is a regional Minority Serving Institution with a traditional ACM program in Computer Science. The program has the requirement of a three credit-hour semester course in Software Engineering that covers the theoretical Software Engineering concepts and also includes a group experience in applying those concepts. The course was designed to give students experience in a traditional Life Cycle Model, using a significant group term project. The project can also be implemented using the more recent agile Extreme Programming Model [4].
One of the documented difficulties in developing a software product is the ability to gather good requirements
specifications from a client. Therefore to give students a realistic experience in software development, it is ideal to incorporate a real world client into the process, which may present some difficulties. For example, it may not be possible to have a complete, polished working product in the limited timeframe of a semester. This situation leaves one with delivering an unfinished product at the end of the course, with a commitment to finish it outside the confines of the course, or with the expectation that the client will participate in the project simply as a contribution to the educational experience of future software engineers. Finding clients to agree to participate under these limitations is difficult. However, finding a client from within the university has the advantage that the client understands the problems and challenges of scheduling and managing limited resources in the educational environment. Using a client within the university also provides the opportunity to introduce a cross-disciplinary experience into the course. This collaboration supports a computer science goal of searching for new areas to apply new technologies in computing, such as Web services [5].
COURSE OVERVIEW
In the required Software Engineering course, the concentration for the project is on the development of a full set of requirements using the uniform modeling language (UML), System and Object Design documents, a Test Plan with corresponding Test Cases for the System Integration, and a sampling of test cases for the Object Design [6]. The emphasis is on the elicitation and analysis of requirements and the design phase, leaving some of the implementation details undone. This philosophy for the course allows selecting a project with sufficient complexity to motivate the necessity for the use of a formal process model while having realistic expectations for the amount of work that can be completed in a 15 week course. Students are expected to implement at least a prototype for the user interface and the system design, but may have stubs remaining for some of the functionality. Developing the test plan and test cases for the system design and using those test cases as data for the stubs enables the student to experience all the various aspects of the full life cycle process.
A Software Project Management plan is required to reinforce the concept that Software Engineering incorporates both Product and Process [7]. Pedagogically, the course aims to have students understand that the process is as important as the product that is produced. As part of the plan, students are required to select a life-cycle process model they will use, the organizational structure of their team, the schedule, the work packages that will be created, and the deliverables for the project and the client.
Students are divided into teams of three to five students and are required to at least partially complete all phases of the life cycle model. All teams work on the same project, creating independent solutions, which are presented to the entire class and the client at the end of the course.
CROSS-DISCIPLINARY APPROACH
For this academic year, the Department of Mathematics was involved in the project that was chosen for the software engineering class. The Mathematics department developed an optimization model to assign faculty teaching workload schedules per semester. Models are a vital component of both applied mathematics and software engineering. Mathematical modeling involves the development, study, and mathematical formulation of a problem/system. In computer science the UML has become an acceptable standard for modeling requirements and design of projects.
I. Problem and Project
The Department of Mathematics at UTPA is a large department consisting of about 50 faculty members, graduate teaching assistants, and part time faculty. Each semester, a faculty member, called the Director of Scheduling, administers a form to each faculty member to determine his/her preferences for courses and time periods. Then the director manually assigns a faculty member’s teaching workload and tries to satisfy the faculty, as a whole, by assigning faculty their preferred course and/or assigning a course that satisfies their time preference for teaching. Some of the major problems with these forms are the following: some faculty submit incomplete forms, fail to submit the forms by the required deadline, or identify unrealistic or conflicting preferences. In addition, faculty teaching workload schedules may change prior to the beginning of the semester, and thus the Director of Scheduling returns to the task of reassigning classes.
To reduce the amount of time spent by the Director of Scheduling in creating the teaching workload schedules for more than 50 instructors, the problem was modeled as an optimization problem. Faculty and graduate students in the Department of Mathematics modeled the problem as a linear program with binary variables. The problem is written in the GAMS modeling language and solved numerically through the NEOS server. In creating the GAMS file, information associated with the linear program—such as faculty names, course names, and preferences—requires user interaction and time. As a result, we can automate many of these processes and minimize the amount of input errors and the director’s time for writing information into the GAMS file. This type of problem becomes a good candidate for a software engineering class project. More specifically, the project assigned to the software engineering class involves creating a Web interface where mathematics faculty enter their preferences and priorities for courses and times—eliminating the use of forms. The second phase of the project involves: reading faculty preferences and writing the information into the GAMS file, calling the linear programming solver, and writing the output in table format to view the teaching workload schedule assigned to each faculty member.
II. Mathematics Discipline
The Director of Scheduling assigns an instructor’s teaching workload manually and tries to satisfy the faculty, as a whole,
San Juan, PR July 23 – 28, 2006 by assigning faculty their preferred course and/or assigning a
course that satisfies their time preference. Initially, the director considers the teaching workload for tenure-track faculty, followed by the tenured faculty, lecturers, graduate teaching assistants, and finally any part time instructors. The task of assigning classes through a trial-and-error method can be quite time consuming, especially for a large department and when changes are required.
Therefore, the math department modeled the task of assigning faculty teaching workload schedules as a constrained optimization problem, more specifically as a linear program. The variables are binary and determine if an instructor will teach a particular class. The constraints model the workload of faculty members and the number of graduate courses a faculty member is allowed to teach in a semester, for example. The workload constraint (1) describes the minimum and maximum hours a faculty member is allowed to teach in a semester and is modeled as
where the sum is taken over all courses C and their respective time periods T for a given faculty member F.
The objective function for the linear program describes faculty course and time preferences. Thus the goal is to maximize the number of faculty course and time preferences subject to constraints imposed by a faculty member’s teaching workload, for example.
The linear program is written in the GAMS modeling language, which facilitates writing programs with many constraints and variables. The GAMS file contains parameters, such as faculty names, their preferences, and course and time periods that may change from one semester/year to another. The constraints and the objective function model may vary little from one semester to the next. The GAMS file is uploaded to the NEOS server at Argonne National Laboratory, which contains various software packages for solving optimization problems. Upon user selection of a solver from NEOS, a solution to the linear program is returned. The final results produce the semester teaching workload schedule for all instructors in the Department of Mathematics.
III. Computer Science Software Engineering Class
The process from creating the preference form for a given semester to extracting the NEOS results requires user interaction and can be quite time consuming. Using a web interface allows automation of the teaching workload assignment process from: creating forms, soliciting faculty preferences, creating parameters for the GAMS file, to capturing results and presenting them in a readable format for mathematics administrators. Therefore, one of the outcomes of the software engineering class project was the creation of a user interface that allows the mathematics Director of Scheduling to develop a form for faculty to indicate their course and time preferences. Current forms vary little from previous semesters, and an academic department differs from other departments in terms of some constraints, if any.
The software engineering class was challenged to design the application, considering code reusability. For the students, the temptation was to see the form as a hard-coded application, but care was taken to differentiate between the framework, data, and parameters used to create an instance of a more generalized form that is specialized for a given semester. For example, when a new faculty member or course is added or deleted or an additional informational question is needed, the software should support the use of this type of data to modify the form and should not require reprogramming of the user interface.
This application can also be used to introduce the concept of workflows. A workflow is the automation of a set of interacting tasks that are used to solve a problem. Also, the application requires an implementation for simultaneous multi-users as faculty complete the forms to submit their preferences each semester. Therefore, this application can be modeled and implemented as a workflow that involves multi-users to accomplish the scheduling task using existing human and web resources. The complete workflow process is automated requiring no user interaction to create the GAMS file, to submit it to the NEOS server, or to capture the results.
DEVELOPMENT AND IMPLEMENTATION
The groups involved in the project consisted of students from the software engineering class, who played the role of developers, two mathematics faculty members--the Director of Scheduling and the faculty member associated with the linear program--who were the clients, and the Software Engineering instructor, who played the role of the CEO of the fictitious Software Development Company. The class met with the clients who described the faculty teaching workload problem, the difficulties associated with the manual process of assigning faculty their teaching workload schedules, and the strong user interaction with the GAMS file. To be more specific, inputting the parameters manually into the GAMS file is quite time consuming and also increases the probability of making errors since the parameters are replicated in various parts of the GAMS file.
Using document templates and software engineering concepts available with the text [6], the students created formal software engineering documents. First, the Software Project Management Plan was developed. Then using information gathered from the clients, the teams wrote the Requirements Analysis Document. Functional and non-functional requirements were identified. Then the non-functional requirements were analyzed and presented as Scenarios, Use Cases and Use Case diagrams, using UML constructs. The dynamic models were constructed using State Change and Sequence diagrams. A high level object model was also included. These documents were reviewed by the CEO and revised. A formal technical review involving all the teams was held for the requirements document.
Next, as part of the design phase, the System Design Document, the Object Design Document, and the Test Plan for the System Design with Test Cases were developed. The students were encouraged to design the test cases that could be
(1)
,
126
, _∑
≤
≤
T C T CF
used as data for the stubs of undeveloped subsystems during the implementation phases. This activity allowed for parallel development of the various subsystems.
The implementation phase included the development of the web based user interface illustrated in Figure 1 below, a database, and the integration of pre-existing internet software to solve the linear program. The user interface is accessed by the Director of Scheduling and instructors. The Director of Scheduling identifies the instructors who will teach, the courses, the course time periods, and the number of course sections offered in a given semester. The faculty log in to the Web interface and provide their preferences. After all faculty have completed their preferences, the Director of Scheduling selects the option to create and upload the GAMS file to the NEOS server and waits for the results. After the results are returned, the software formats the results into a report easily read by the Director.
FIGURE 1
WEB-BASED USER INTERFACE
I. GAMS file and Parameters
The GAMS template file contains hard-coded information, such as the objective function model and the constraints. However, information such as instructors’ names and preferences, courses offered in a semester, and course time periods are parameters to insert into the instance of the GAMS file for a given semester. Therefore, the GAMS template file for the linear program is parsed to find the places to insert faculty preferences and course and time period offerings. Table I shows the appropriate locations where the parameters (in boldface) are automatically inserted/written into the GAMS file from the information gathered from the faculty preference section of the web interface software and from the Director of Scheduling. The information gathered from the Web interface is stored in a database that is accessed by the software component that creates the GAMS file, and this information is used to fill in the parameters that are placed between the slashes / / as shown in the sample file.
TABLE I
PARTIAL GAMS FILE
SETS
A Instructors / L1*L16, F1*F16, GTA1*GTA8 / T Time Periods / M1*M8, M10*M12, T1*T8,
M2T1,M2T2, M3T2, M3T3, M4T2, M4T3, M5T3, M5T4 / Course CourseName / EA, IA, PT, C1, C2, …, NPDE /
ct(Course,T) Course and Time combs
/ EA.(M1,M2,M3,M4,M5,M6,M7,T1,T2,T3,T4,T5,T8,M11) IA.(M1,M2,M3,M4,M5,M6,T1,T2,T3,T4,T5,T6,T8,M11) … PrefF(A,Course)
/ F1.(RA,DE,C3,MEE,C1), F2.(DE,C3,LA), F3.(C1,C2,CA), F4.(LA,C2,DE,C3,C1), F5.(DE,C2,C1), F6.(RA,DE,C3,LA),
II. Reporting Results
The third component of the project involves uploading the GAMS file to the NEOS server and reporting results. In this phase, students must develop code to upload the file to the NEOS server and select the specified linear programming solver, as described by the clients. The NEOS server returns the output, which is partially shown in Table II; from left to right the first three columns indicate the instructors’ names, courses, and time periods for a course. The information in Table II, under the column labeled LEVEL containing entry 1.000, describes the classes assigned to a faculty member; for example in Table II, the NEOS output indicates that faculty member F1 has been assigned courses DE and DS, which are taught at time periods M4 and M2, respectively. The dots in the LEVEL column indicate classes not assigned to an instructor. Since an instructor will have more classes not assigned to him/her than those assigned, the NEOS output is actually quite lengthy. Therefore the NEOS output is captured by the software and parsed in order to present it to the clients in a more understandable format --showing only classes assigned to an instructor -- as shown in Table III.
TABLE II
PARTIAL NEOS RESULTS FILE
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m E x e c u t i o n
… VAR F
LOWER LEVEL UPPER
F1 . EA . M1 . . 1.000 F1 . EA . M2 . . 1.000 F1 .C1 .M3T2 . . . F1 .C1 .M4T3 . . . … F1 . DE . M4 . 1.000 1.000 F1 . DS . M2 . 1.000 1.000 F1 . RA . M12 . . . TABLE III
PARTIAL FORMATTED OUTPUT
Instructor F1 teaches DE at time period M4 Instructor F1 teaches DS at time period M2 Instructor F2 teaches LA at time period M3 Instructor F2 teaches A1 at time period T8
San Juan, PR July 23 – 28, 2006 RESULTS
Working prototypes were developed by each team in the Software Engineering class and were demonstrated to the class, the instructor, and the clients. The clients were impressed and delighted at the progress made by the students and with the prototypes that were developed. The Department of Mathematics plans to use the product developed by the Software Engineering class to solicit faculty preferences and to create the Spring 2007 schedule.
The students felt the project was of the proper size and complexity to show the need for a formal software engineering development process. Furthermore, the students found interacting with a real world client both helpful and were enlightened to the difficulties encountered with getting complete and unambiguous requirements. They also gained an appreciation of the fact that clients often change the requirements during the development phase of the project. Additionally, as part of their senior projects, several students plan to expand the working prototypes to a fully functioning software service and will need to work with documents that were not necessarily created by them. This will further give them experience similar to what they will experience in the real world. Other senior projects will extend the product’s capabilities for use by other academic departments on campus. Consequently, this will require the further automatic modification of the GAMS template file to allow the respective department’s Director of Scheduling to identify the constraints that are unique to its department and to automate the development of the objective function. Another area where the product can be enhanced and extended is in scheduling classroom assignments, which are currently assigned via a commercial application. In the planning phase of the project, these last two ideas were identified by the students and the CEO as lying outside the scope of the software engineering project.
CONCLUSIONS
Using an application from a client within the University provides a rich cross-disciplinary project for a one-semester
Software Engineering course. Students experienced a heavy-weight model of the software process and experienced working with a client, without the risk of promising a finished product to an outside client in the limited time allocated. In addition, the students were challenged to access applications available over the Internet from within a workflow model of a program. By concentrating on five aspects of the project, the software project management plan, the requirements and design phases, product testing, and the development of a working prototype, students were able to experience all the phases of a traditional Software Life Cycle Model. The problem presented sufficient complexity to demonstrate the need to employ a formal process model.
ACKNOWLEDGMENT
The authors wish to thank the University of Texas-Pan American Spring 2006 CSCI 3340 Software Engineering class for their participation in the course and for the screen shots of the user interface for ClassMate.
REFERENCES
[1] Basu, K., and Sircar, T., and Villalobos, M.C., “Modeling a Scheduling Problem for a Faculty Teaching Load”, HESTEC Conference, University of Texas-Pan American, September 2005; INFORMS Annual Meeting, November 2005, San Francisco, CA (Paper in Progress)
[2] GAMS Home Page, http://www.gams.com (April 2006)
[3] Dolan, E.D., Fourer, R., Moré, J., and Munson, T.S., “Optimization on the NEOS Server”, SIAM News, Vol. 35, 2002, pp. 5, 8-9.
[4] Collins, C., and Miller, R., “XP Distilled”,
http://www.rolemodelsoftware.com/process/bstOfXp.php (April 2006) [5] WC3 Architecture Domain, http://www.w3.org/2002/ws/ (April 2006) [6] Bruegge, B, and Dutoit A., “Modeling with UML”, Object-Oriented
Software Engineering Using UML, Patterns, and Java, 2nd Edition,, Prentice Hall, 2004, pp 29-71.
[7] Brazier, P., “Process and Product in a Software Engineering Course: Simulating the Real World”, ASEE/IEEE 1998 28th Annual Conference on Frontiers in Education (FIE) Proceedings, 1998, IEEE: Piscataway NJ, pp. 1292-1297.