9
1.1 CM049 : Industrial Computing Project Dave Harrison Office : D202 Phone : 3224 E-Mail : [email protected] WWW : http://computing.unn.ac.uk/staff/cgdh1

1.1 CM049 : Industrial Computing Project Dave Harrison Office : D202Phone : 3224 E-Mail : [email protected] WWW :

Embed Size (px)

Citation preview

Page 1: 1.1 CM049 : Industrial Computing Project Dave Harrison Office : D202Phone : 3224 E-Mail : D.A.Harrison@unn.ac.uk WWW :

1.11.1

CM049 : Industrial Computing Project

Dave HarrisonOffice : D202 Phone : 3224

E-Mail : [email protected]

WWW : http://computing.unn.ac.uk/staff/cgdh1

Page 2: 1.1 CM049 : Industrial Computing Project Dave Harrison Office : D202Phone : 3224 E-Mail : D.A.Harrison@unn.ac.uk WWW :

1.21.2

CM049 : CompilerWriting For Beginners

Dave HarrisonOffice : D202 Phone : 3224

E-Mail : [email protected]

WWW : http://computing.unn.ac.uk/staff/cgdh1

Page 3: 1.1 CM049 : Industrial Computing Project Dave Harrison Office : D202Phone : 3224 E-Mail : D.A.Harrison@unn.ac.uk WWW :

1.31.3

Unit OverviewUnit Overview

• This unit is about software construction.

• Phases 1 - 3 : writing a (cross-)compiler for a reasonably simple language.

– Host : Jaguar.

– Target : M68Ks in real-time lab.

• Programming language : C++.

– In effect, ANSI C.

• Source language : C--

– A subset of ANSII C.

• Target language : M68K assembly.

Page 4: 1.1 CM049 : Industrial Computing Project Dave Harrison Office : D202Phone : 3224 E-Mail : D.A.Harrison@unn.ac.uk WWW :

1.41.4

Unit Overview IIUnit Overview II

• Phase 4 : writing a parser for a very simple language.

– Host : Jaguar.

– Target : None.

• Programming language : Anything you like.

– Provided that it runs on Jaguar.

• Source language : SCL

– The Simple Calculator Language.

• Target language : None.

Page 5: 1.1 CM049 : Industrial Computing Project Dave Harrison Office : D202Phone : 3224 E-Mail : D.A.Harrison@unn.ac.uk WWW :

1.51.5

Unit StructureUnit Structure

• Formally :

– 12 hours lectures.

– 12 hours directed practical.

• In practice :

– About 8 hours lectures.

– Unlimited (almost) surgery sessions.

– Lots of individual work.

– Lots more individual work.

Page 6: 1.1 CM049 : Industrial Computing Project Dave Harrison Office : D202Phone : 3224 E-Mail : D.A.Harrison@unn.ac.uk WWW :

1.61.6

Unit AssessmentUnit Assessment

• Phases 1 - 3 : C--

– Three 5 minute software demonstrations.

– Phase 1 : lexical analysis (10%)

– Phase 2 : syntax analysis (20%)

– Phase 3 : code generation (10%)

• Phase 4 : SCL

– Code printout.

– Copy of code on floppy.

– 60%

Page 7: 1.1 CM049 : Industrial Computing Project Dave Harrison Office : D202Phone : 3224 E-Mail : D.A.Harrison@unn.ac.uk WWW :

1.71.7

Unit Assessment IIUnit Assessment II

• Marks awarded for

– Functionality.

How much of C-- and SCL that your programs handle.

– Good programming practice.

Comments, layout, variable names etc.

Declaring global variables will get you a 0.

Global constants are OK.

Page 8: 1.1 CM049 : Industrial Computing Project Dave Harrison Office : D202Phone : 3224 E-Mail : D.A.Harrison@unn.ac.uk WWW :

1.81.8

TextbooksTextbooks

• Don’t really need a textbook. I’ll tell you everything that you need to know.

• If you’re really interested this is the classic text :

Compilers : Principles, Techniques and ToolsAho A.V., Sethi R. & Ullman J.D.Addison-Wesley 1986

• Personally, I wouldn’t touch it with a bargepole.

• This is the best book (IMHO) but it’s out of print :

Understanding and Writing CompilersBornat R.MacMillan 1979

Page 9: 1.1 CM049 : Industrial Computing Project Dave Harrison Office : D202Phone : 3224 E-Mail : D.A.Harrison@unn.ac.uk WWW :

1.91.9

Textbooks IITextbooks II

• If you’re going to get a book this one is suitable :

Crafting A Compiler With CFischer C.N. & LeBlanc R.J.Benjamin / Cummings Publishing Company 1991

• This one might be interesting :

Programming Language Processors In JavaWatt D.A. & Brown R.F.Pearson Education 2000

• This is just a good book :

1066 And All ThatSellar W.C. & Yeatman R.J.Mandarin 1991