CSC301 Homepage

Fundamentals of Programming Languages

Fall 2009

Official Statement on Illness Due to the H1N1 Flu

The H1N1 Flu Pandemic may impact classes this semester. If any of us develop flu-like symptoms, we are being advised to stay home until the fever has subsided for 24 hours. So, if you exhibit such symptoms, please do not come to class. Notify me using hamel@cs.uri.edu of your status, and we will communicate through the medium we have established for the class. We will work together to ensure that course instruction and work is completed for the semester.

The Centers for Disease Control and Prevention have posted simple methods to avoid transmission of illness. These include: covering your mouth and nose with a tissue when coughing or sneezing; frequently washing your hands to protect from germs; avoiding touching your eyes, nose and mouth; and staying home when you are sick. For more information, please view http://www.cdc.gov/flu/protect/habits. htm . URI information on the H1N1 will be posted on the URI website at http://www.uri.edu/news/H1N1 , with links to the http://www.cdc.gov site.

(End of official statement)

Description:

Language enables thought.  In this course we study a class of formal languages known as programming languages.  Similar to natural languages, these formal languages enable us to to reason about algorithms and procedures to solve computational problems on computers. However, their  formal nature restricts the kind of meanings particular language constructs can assume and therefore makes them amenable for the execution on a computer.

Over the years many different programming language dialects have evolved to address particular technical issues, e.g. object-oriented languages, real-time languages, database query languages, logic languages, etc.  Here we study the major structures of modern programming languages. Understanding not only the syntax of a language but also the semantics and implementation techniques of this language will allow you to design better programs.  Having deeper insights into the design of a programming language will also enable you to learn new programming languages much faster.  Having a thorough understanding of today's languages allows you to design the programming languages of tomorrow.

Objective

Upon completion of this course

Announcements:

[11/20/09] posted H#12
[11/16/09] ** Quiz 3 11/20 ** covering chapters 12 through 22 with an emphasis on what we covered in class.
[11/16/09] posted HW#11
[11/13/09] posted HW#10
[11/6/09] posted HW#9
[10/28/09] ** Midterm 11/2 ** covering chapters 1 through 10. A practice midterm is available here
[10/26/09] Posted HW#8. The source code for the parser class and the lexer class. For the simple calculator you can add the following static main function to the CalcParser class:
public static void main(String[] args) {
	
	CalcParser p = new CalcParser(args[0]);
	
	if (p.getErrorMessage() == null)
		System.out.println(p.getValue());
	else
		System.out.println(p.getErrorMessage());
}
For HW#8 you will have to most likely make non-trivial changes to the CalcParser class in order to support code generation. You will also have to modify the above main function.
[10/21/09] Posted HW#7
[10/16/09] Posted all solutions, all the way to HW#6, this as of this point 4:30 I will no longer accept homework.
[10/16/09] I am embarrassed to say that the algorithm I gave in class today does not work. Here is code that does work:
fun listavg(L:int list) =
     let
        fun count([]) = 0
          | count(x::xs) = 1 + count(xs);

        fun sum([]) = 0
          | sum(x::xs) = x + sum(xs);

     in
        real(sum(L))/real(count(L))
     end
[10/12/09] ** quiz #2 Monday 10/19 ** covering chapters 4 through 8
[10/12/09] Posted assignment #6
[10/6/09] **No Class Friday 10/9**
[10/6/09] Making Eclipse work with SML (thanks Ronald Duarte for the notes):
STEP 1: Find the eclipse.ini file inside the eclipse folder.
STEP 2: Make a copy of the file and place it somewhere in your computer for backup purpose.
STEP 3: Open the file by double clicking on it. It should open in notepad.
STEP 4: Replace everything with these set of instructions and go to step 5, you are not done yet: 

-startup
plugins/org.eclipse.equinox.launcher_1.0.100.v20080509-1800.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.100.v20080509-1800
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
-vm
C:\Program Files\Java\jdk1.6.0_07\bin\javaw.exe
-vmargs
-Xms40m
-Xmx512m
 
NOTE: If you like try to add the red text to your existing file, it might be enough for you.

STEP 5: The -vm (red text) is followed by C:\ Program Files..., Find the path to your jre/jdk, it should be in the in the Program Files\Java\.....\bin\javaw.exe
STEP 6: Modified the above path (red) with yours, keeping -vm in front of it.
STEP 7: Select save as click on the save as type drop down menu and choose all file. You should see the eclipse.ini file select it and click yes to overwrite it.

ECLIPSE SHOULD WORK NOW. 
[10/5/09] Posted HW#5
[9/30/09] Posted HW#4
[9/25/09] Posted solutions to HWs 1,2,3 (see the link below) -- email me for the username and password
[9/22/09] Quiz #1 covering chapters 1 through 4, Monday 9/28
[9/22/09] Posted assignment #3
[9/15/09] ** Starting Wednesday, 9/16, we will meet in Tyler 108 **
[9/15/09] Contrary to what it says on the slides, HW#1 will be due on Friday 9/18
[9/1/09] You should go to the online grade book and sign up for an account, your access code is engrade-csc301fall2009-nnnn where nnnn is your student ID number.
[9/1/09] Welcome!

Documents of Interest:



Assignments:

Email submissions are NOT acceptable for assignments.

For programming assignments you will need to submit your source code and proof that your program runs on sample input, e. g., screen shot or cut and paste the results of the run into a MS Word document. Also, please follow the instructions given in the book for each problem carefully.

Handwritten work will not be accepted as programming assignments.

Instructor:

Dr. Lutz Hamel
Tyler Hall, Room 251
Office Hours: Tu 2:30-3:30pm W 11am-12pm
email: hamel@cs.uri.edu

TA:

Shaun Joseph
Office Hours: M 12-1
email: josephs@cs.uri.edu