ASU 2013-2015 Course:
Principles of Programming Languages

   :) I am teaching CSE340 again this Summer

School of Computing, Informatics, and Decision Systems Engineering
Arizona State University

Summer 2015, Fall 2014, Summer 2014, Spring 2014, Summer 2013


Course Description

Formal lexical, syntactic and semantic descriptions, compilation and implementation issues, and theoretical foundations for several programming paradigms.

Outline of Topics

  1. Introduction: abstractions; language paradigms; language definition; compilation versus interpretation.
  2. Lexical Analysis: regular expressions; deterministic finite automata.
  3. Syntax: BNF, EBF, syntax and diagrams; parse trees and abstract syntax trees; one-token look-ahead parsing; recursive- descent parsers;
  4. Basic Semantics: data Types and type matching; symbol tables; binding; scope; allocation and storage; variables; pointers.
  5. Intermediate Representation
  6. Programming Paradigms
  7. Object-Oriented Programming
  8. Functional Programming: functional algorithms; tail-recursion; lambda calculus – conversions, Church-Rosser theorem, fixed-points.
  9. Logical Programming: Horn clause logic, resolution and unification.


These are the slides of the course (28 lectures).

01 course presentation 02 introduction 03 lexical analysis 04 lexer (1/2)
05 lexer (2/2) 06 closing lexical analysis 07 syntactic analysis (1/2) 08 syntactic analysis (2/2)
09 grammars (1/2) 10 midterm review 11 parser (1/2) 12 parser (2/2)
13 parsing (1/3) 14 parsing (2/3) 15 parsing (3/3) 16 grammars (3/3)
17 semantic (1/3) 18 semantic (2/3) 18 semantic (3/3) 20 code (1/4)
21 code (2/4) 22 code (3/4) 23 code (4/4)



There are four programming assignments in this course: a Lexical Analyzer, a Parser, a Semantics Analyzer and an Intermediate Code Generator. The four assignments bundled together result in a compiler for a custom programming language. An example the statements supported in the programming language designed in this course is shown in the picture. A GUI is provided to visualize the result of each stage: a token table, a parse tree, a symbol table, and intermediate code; as well as a console (in black background) to display alerts and error messages.

Aditionally, a VM with a GUI is provided to test the intermediate code generated by the compiler.


A compilation of the notes of the course (113-pages) are available on Scribd


ACM Senior Member Award

:) ACM granted me the Senior Member Grade

Association for Computing Machinery (ACM)
August 24, 2014


The Senior Member Grade recognizes those ACM members with at least 10 years of professional experience and 5 years of continuous Professional Membership who have demonstrated performance that sets them apart from their peers.

2014 Award winners:

Eduardo Almeida; Michael Atighetchi; Brian P. Bailey; Punam Bedi; Nikhil Bhargava; Manish Bhide; Frederick J. Bourgeois; Travis D. Breaux; Carlos A. Castillo; Maria Elena Chavez-Echeagaray; Yun Chi; Wei Ding; John P Dougherty; Jane Fedorowicz; James W. Gabberty; G R Gangadharan; James Garnett; Jeffrey Gennari; Christos K. Georgiadis; Don Goelman; Javier Gonzalez-Sanchez; Mihir Gore; Anil Kumar Gupta; Winston H. Hsu; Jun Hu; Matt Huenerfauth; Jhilmil Jain; Mihai Jalobeanu; Natalie Jerger; James Anthony Junco; Hemangee K. Kapoor; Arun Kejariwal; Jong-Kook Kim; Jan H Kroeze; Sebastien Lahaie; John Lee; Jian Li; Li-Pin Liu; Diego R. Llanos; Alessio Malizia; Manoel Gomes Mendonca; Stuart Edward Middleton; Antonija Mitrovic; Mihai Nadin; Juan Arturo Nolazco-Flores; Takeshi Ogasawara; Deepak Padmanabhan; Lynne E Parker; Rajeev R Raje; Rajveer Singh Shekhawat; Heng Tao Shen; Bernhard Suhm; Jian-Tao Sun; Chin Ngai Sze; Thiab Taha; Aakash Taneja; Asser N Tantawi; Carlo Tarantola; Michela Taufer; Basant Tiwari; Balakrushna Tripathy; Jaideep Vaidya; Miroslav N. Velev; Paul J Whitbread; Alec Yasinsac; Dalu Zhang; Gottfried Zimmermann.

ISWC 2014 Demo:
Including Affect-Driven Adaptation to the Pac-Man Video Game

   :) Our students get a demo accepted to ISWC2014 !

The 18th International Symposium on Wearable Computers
Sponsored by ACM’s special interest groups on computer-human interaction (SIGCHI) and mobility (SIGMOBILE)
Seattle, WA, US. September 2014



Building affect-driven adaptive environments is a task geared towards creating environments able to change based on the affective state of a target user. In our project, the environment is the well-known game, Pac-Man. To provide affect-driven adaptive capabilities, diverse sensors are utilized to gather user’s physiological states and an emotion recognition framework is used to fuse the sensed data and infer the user’s affective state. The game change driven by those affective states aiming to improve the user experience increasing engagement


Harris, A., Hoch, A., Kral, R., Teposte, M., Villa, A., Chavez-Echeagaray, M.E., Gonzalez-Sanchez, J., and Atkinson, R. (2014). Including Affect-driven Adaptation to the Pac-Man Video Game. In Extended Abstracts Proceedings of the 18th International Symposium on Wearable Computers (ISCW). Seattle, WA, USA. September 2014. ACM. ISBN: 978-1-4503-3048-0 doi: 10.1145/2641248.2641360.

ITS 2014 Paper:
A System Architecture for Affective Meta Intelligent Tutoring Systems

   :) A paper accepted to ITS2014 !

12th International Conference on Intelligent Tutoring Systems
Hosted by the University of Hawaii at Manoa
Honolulu, Hawaii, US. Jun 2014



Intelligent Tutoring Systems (ITSs) constitute an alternative to expert human tutors, providing direct customized instruction and feedback to students. ITSs could positively impact education if adopted on a large scale, but doing that requires tools to enable their mass production. This circumstance is the key motivation for this work. We present a component-based approach for a system architecture for ITSs equipped with meta-tutoring and affective capabilities. We elicited the requirements that those systems might address and created a system architecture that models their structure and behavior to drive development efforts. Our experience applying the architecture in the incremental implementation of a four-year project is discussed.


These are the slides of the paper presentation, comments are more than welcome.


Gonzalez-Sanchez, J., Chavez-Echeagaray, M.E., VanLehn, K., Burleson, W., Girard, S., Hidalgo-Pontet, Y., and Zhang, L. (2014). A System Architecture for Affective Meta Intelligent Tutoring Systems. In Proceedings of the 12th International Conference on Intelligent Tutoring Systems (ITS). Honolulu, HI, US. 5-9 June. Pp. 529–534. Springer. LNCS 8474, pp. 529–534. doi:10.1007/978-3-319-07221-0_67


ITS 2014 Paper:
The Affective Meta-Tutoring Project: Lessons Learned

   :) A paper accepted to ITS2014 !

12th International Conference on Intelligent Tutoring Systems
Hosted by the University of Hawaii at Manoa
Honolulu, Hawaii, US. Jun 2014



The Affective Meta-Tutoring system is comprised of (1) a tutor that teaches system dynamics modeling, (2) a meta-tutor that teaches good strategies for learning how to model from the tutor, and (3) an affective learning companion that encourages students to use the learning strategy that the meta-tutor teaches. The affective learning companion’s messages are selected by using physiological sensors and log data to determine the student’s affective state. Evaluations compared the learning gains of three conditions: the tutor alone, the tutor plus meta-tutor and the tutor, meta-tutor and affective learning companion.


VanLehn, K., Burleson, W., Girard, S., Chavez-Echeagaray, M.E., Gonzalez-Sanchez, J., Hidalgo-Pontet, Y., and Zhang, L. (2014). The Affective Meta-Tutoring project: Lessons Learned. In Proceedings of the 12th International Conference on Intelligent Tutoring Systems (ITS). Honolulu, HI, US. 5-9 June. Springer. LNCS 8474, pp. 84–93. doi:10.1007/978-3-319-07221-0_11