Lab exercises for a discrete structures course: exploring logic and relational algebra with Alloy

Document Type

Conference Proceeding

Publication Date



Department of Computer Science


Students in computing disciplines need a strong basis in the fundamentals of discrete mathematics, but traditional offline approaches to teaching this material provide limited opportunities for the kind of interactive learning that computing students experience in their programming assignments. We have been using the Alloy language and analyzer to teach concepts in discrete structures (relational algebra, logic, and graphs) in an exploratory, programming-oriented way. Alloy, however, constitutes a new programming paradigm for introductory students, and careful mediation is needed to keep students on track. We use the familiar programming lab format, where students work on small-scope problems co-located with instructors, to provide guidance as students wrestle with the languages of relational algebra and predicate logic through Alloy. We describe selected lab exercises, and report on initial findings based on our experiences with students.

Publication Title

ITiCSE 2018: Proceedings of the 23rd Annual ACM Conference on Innovation and Technology in Computer Science Education