Spring 2018

Final Monday 14
2-5pm, CLA 1.102

Book Chapters!

Professor Don Batory batory@cs.utexas.edu
office hours Th 3:45-4:45
TA Kartik Sathyanarayanan kartik@cs.utexas.edu
office hours TBD
Room GDC 1.406
Days and Time TTh 2pm-3:30pm
Unique # 51775
Ground Rules UTCS Rules to Live By
Your Grades Canvas
Final Monday May 14, 2-5 CLA 1.102 (see location)

Prerequisites, Overview, and Goals

This course explores leading edge paradigms for automated software design and software modularity from advances in:

A spectacular example of the integration of most of these areas was realized almost fourty years ago: relational query optimization (RQO). A relational query is specified in SQL, a parser maps it to an inefficient relational algebra expression, a query optimizer optimizes the expression automatically, and an efficient query evaluation program is generated from the optimized expression. SQL is a prototypical declarative DSL. Query evaluation programs are specified as compositions of relational algebra operations; relational algebra is a prototype for compositional programming. Query optimizers achieve automatic programming by rewriting an inefficient expression/program to a semantically equivalent but more efficient expression/program. The cost models that drive expression optimization are examples of program analysis. Mapping a relational algebra expression to an efficient program is generative programming and is an elementary example of model driven engineering.

A "holy grail" of Software Engineering is to replicate the success of RQO in other domains. Feature Oriented Software Development is a generalization, and its ideas are at the confluence mainstream research topics in software modularity, program design and program generation: OO design, product-lines, program refactoring, model driven engineering, program evolution, and program transformations.

Prior offerings of this course lead to student publications and research degrees (M.Sc. and Ph.D). Some publications -- not all -- are listed below, the most recent listed last.

 Programming Assignments

All programming assignments will use Java. We will use the following software, all of which is free to UTCS students, and all of which has been installed in the UTCS public labs.  The following is for Windows Platforms.  If you use Apple or Linux machines, well, I will try to help as much as I can, but no promises!

Please note that some Java programs will be released and updated during the Semester.  These programs are NOT installed on the UTCS public labs.  You will have to install these updates yourself.  Their links will be posted on assignments.

Course Prerequisites

Basic familiarity with the following topics are assumed -- all that is needed will be covered, but some prior experience helps greatly:

Lecture Notes and Texts

Lecture notes posted online after the lecture as downloadable PPTX files.  Links to the lectures are given below in the Course Outline. There is a required text for this course:

This text is now available as a Kindle ebook from Amazon.  Hint: I am unimpressed with today’s ebooks.  They are as expensive as hard copies and ebook software sucks.  Your call. As a free alternative -- a progenitor of this text is Pierce's 1988 CMU Tech Report "A taste of category theory for computer scientists", which  I have annotated.

Class Grades, Projects, and Homework

Final grades will be determined approximately by the following scheme:

  1. Your accumulative programming assignment grade will determine the maximum final grade for the course.  Ex: if you get a "B" average across all of your programming projects, your final grade will be no greater than a "B".
  2. Final counts 40%; midterm counts 40%; class (room+piazza) participation 20%,  approximately.

All programming projects are to be submitted through Canvas.  A PDF file must be included on all assignments.

Extenuating Circumstances

If you have difficulty meeting the requirements of this course, fail to hand in an assignment, or miss an exam because of extenuating circumstances, please advise the instructor in writing at the earliest possible date so that your situation can be discussed. If you encounter an unexpected medical or family emergency or a random act of Nature that causes you to miss the due date for homework or miss a quiz or exam, you must present suitable documentation in writing to the instructor before special consideration will be given. A file of all written correspondence will be kept by the instructor and decisions regarding them will be made at the end of the semester.


Numbers in [brackets] indicates the estimated number of lectures on a topic. The number indicated is a lower-bound, as there will be classroom discussions to work on problems and review of homework assignments. Papers that are listed below are required readings and are accessible via its web link.  The order in which topics are presented might be changed as the class progresses.

The syllabus on the first day of class is here (to be posted after the first class), as I do modify this page as the course progresses, like posting new assignments, readings, and lectures.

[# of lectures + days of discussion]



Precourse Survey Results

1. Introduction to Model Driven Engineering  [6] 

  1. UML class diagrams, MDE models and metamodels, T2M transformations
  2. Metamodel Constraints and M2M transformations
  3. Building Domain-Specific Tools with MDE, bootstrapping MDE Tools
  4. Metamodel Equivalence and Metamodel Refactorings
  5. Allegories and Formal Models of UML Class Diagrams
  6. In Class Exercises

H1: Mapping to Tables
Wed, Jan 24, 12noon

H2: MetaModels

Wed, Jan 31, 12noon

Look at OCL Tutorial

H3: Model Equivalence
Wed, Feb 7, 12noon

P1: Constraints, M2M,
and M2T transformations
Fri, Feb 2, 10PM

P2: Generating an Allegory Package

2. Feature Models of Software Product Lines (SPLs) [4] 

  1. Feature models, attribute grammars, propositional formulas, SAT solvers
  2. Feature model analyses, reasoning about edits
  3. Optimizing configurations in SPLs


3. Feature Oriented Software Development (Feature Modularity in SPLs) [3] 

  1. Layered designs, OO virtual machines, collaborations, extensions, mixins, mixin-layers
  2. FOSD, principles of uniformity and scalability, generalized modularity, composition
  3. HelloWorld.zip example in FeatureHouse
  • Readings


Midterm             Thurs March 24              

4. Feature Interactions and Product Lines of Product Lines [1-2]
  1. Feature interactions, quarks,  formal models of interactions
  2. Multi product lines, product lines of rank n>1, qubes 


H4: Feature Interaction Algebras
Mon, Mar 19th, 12noon

P5: Feature House
Due March 26th 10pm

5. Refactorings  [4] 

  1. Review of Classical Refactorings
  2. Review of Classical Design Patterns
  3. Reflective Refactoring - Part 1
  4. Reflective Refactoring - Part 2


P6: SPL Program Development
Due April 10, 10pm

6. Design By Transformation [2] 

Read Sommerville

Chapter on
Algebraic Specs

7. Categories [4]

score card for categories

  1. Domains, instances, arrows and MDE
  2. Pragmatics, inheritance, SPLs, functors, examples, commuting diagrams
  3. Products, product families, products of categories, pushouts
  4. Applications: portlet synthesis, geodesics, lifting, homomorphisms, test generation



Read Pierce
Chapters 1-2

H: Categorical Constructions Solution


Final Review  

Post-Course Exit Survey