100% found this document useful (1 vote)
2K views1,495 pages

Aaby - Introduction To Programming Language

Introduction to Programming Languages is designed to formalize and consolidate the knowledge of programming languages gained in the introductory courses a computer science curriculum and to provide a base for further studies in the semantics and translation of programming languages. This book is intended as an undergraduate text in the theory of programming languages. To gain maximum benefit from the text, the reader should be familiar with discrete mathematics, basic data structures, abstract data types, recursive algorithms, assembly level machine organization and fundamental problem solving concepts. Computer science is not a spectator sport. To gain maximum benefit from the text, the reader should construct programs in each of the paradigms, write semantic specifications; and implement a small programming language.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
2K views1,495 pages

Aaby - Introduction To Programming Language

Introduction to Programming Languages is designed to formalize and consolidate the knowledge of programming languages gained in the introductory courses a computer science curriculum and to provide a base for further studies in the semantics and translation of programming languages. This book is intended as an undergraduate text in the theory of programming languages. To gain maximum benefit from the text, the reader should be familiar with discrete mathematics, basic data structures, abstract data types, recursive algorithms, assembly level machine organization and fundamental problem solving concepts. Computer science is not a spectator sport. To gain maximum benefit from the text, the reader should construct programs in each of the paradigms, write semantic specifications; and implement a small programming language.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1495

Introduction to Programming Languages

Introduction to Programming Languages


Anthony A. Aaby
1996 by Anthony A. Aaby HTML Style Guide | To Do | Miscellenous (possible content) | Figures | Definitions

Short Table of Contents


Preface 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. Introduction Syntax Semantics Translation Pragmatics Abstraction and Generalization Data and Data Structuring Logic Programming Functional Programming Imperative Programming Concurrent Programming Object-Oriented Programming Evaluation

Appendix Stack machine Unified Grammar Logic Bibliography Definitions Index Supplementary Material

http://cs.wwc.edu/~aabyan/221_2/PLBOOK/ (1 de 6) [18/12/2001 10:33:41]

Introduction to Programming Languages

Code Answers

Long Table of Contents


HTML Style Guide | To Do Preface Syntax, translation, semantics and pragmatics 1 Introduction 1.1 Data 1.2 Models of Computation 1.3 Syntax and Semantics 1.4 Pragmatics 1.5 Language Design Principles 1.6 Historical Perspectives and Further Reading 1.7 Exercises 2 Syntax 2.1 Context-free Grammars 2.1.1 Alphabets and Languages 2.1.2 Grammars and Languages 2.1.3 Abstract Syntax 2.1.4 Parsing 2.1.5 Table-driven and recursive descent parsing 2.2 Nondeterministic Pushdown Automata 2.2.1 Equivalence of pda and cfgs 2.3 Regular Expressions 2.4 Deterministic and Non-deterministic Finite State Machines 2.4.1 Equivalence of deterministic and non-deterministic fsa 2.4.2 Equivalence of fsa and regular expressions 2.4.3 Graphical Representation 2.4.4 Tabular Representation 2.4.5 Implementation of FSAs 2.5 Historical Perspectives and Further Reading 2.5.1 Backus-Naur Form 2.5.2 EBNF (extended BNF) 2.5.3 Language Descriptions 2.5.4 Parser (Compiler) Construction Tools 2.5.5 Formal Languages and Automata 2.6 Exercises 3 Semantics
http://cs.wwc.edu/~aabyan/221_2/PLBOOK/ (2 de 6) [18/12/2001 10:33:41]

Introduction to Programming Languages

3.1 Algebraic 3.2 Axiomatic 3.3 Denotational 3.4 Operational 3.5 Translation 3.6 Historical Perspectives and Further Reading 3.7 Exercises 4 Pragmatics 4.1 Syntax 4.2 Semantics 4.3 Bindings and Binding Times 4.4 Procedures and Functions 4.4.1 Parameters and Arguments 4.4.1.1 Eager vs Lazy Evaluation 4.4.1.2 Parameter Passing Mechanisms 4.5 Scope and Blocks 4.5.-- more to come 4.6 Safety 4.7 Historical Perspectives and Further Reading 4.8 Exercises Models of Computation 5 Abstraction and Generalization 5.1 Abstraction 5.1.1 Binding 5.1.2 Encapsulation 5.2 Generalization 5.2.1 Substitution 5.3 Block Structure 5.3.1 Activation Records 5.4 Scope Rules 5.4.1 Dynamic Scope Rules 5.4.2 Static Scope Rules 5.5 Partitions 5.6 Environment 5.7 Modules 5.8 ADTs 5.9 Historical Perspectives and Further Reading 5.10 Exercises 6 Domains and Types

http://cs.wwc.edu/~aabyan/221_2/PLBOOK/ (3 de 6) [18/12/2001 10:33:41]

Introduction to Programming Languages

6.1 Elements of Domain Theory 6.1.1 Product Domain 6.1.2 Sum Domain 6.1.3 Function Domain 6.1.4 Power Domain 6.1.5 Recursively Defined Domain 6.2 Type Systems 6.2.1 Type Checking 6.2.2 Type Equivalence 6.2.2.1 Name Equivalence 6.2.2.2 Structural Equivalence 6.2.2 Type Inference 6.2.3 Type Declarations 6.2.4 Polymorphism 6.3 Type Completeness 6.4 Historical Perspectives and Further Reading 6.5 Exercises 7 Logic Programming Database query languages Relations and the Relational Algebra Datalog Quantifiers Appliation Areas Inference and Unification Syntax Facts, Predicates and Atoms Queries Semantics Operational Semantics A Simple Interpreter for Pure Prolog Declarative Semantics Denotational Semantics Pragmatics Logic Programming and Software Engineering The Logical Variable Incomplete Data Structures Arithmetic Iteration vs Recursion Backtracking Exceptions

http://cs.wwc.edu/~aabyan/221_2/PLBOOK/ (4 de 6) [18/12/2001 10:33:41]

Introduction to Programming Languages

Logic Programming vs Functional Programming Prolog and Logic The Logic of Prolog The Illogic of Prolog Incompleteness Unfairness Unsoundness Negation Control Information Extralogical Features Multidirectionality Rule Order Historical Perspectives and Further Reading Exercises 8 Functional Programming 8.1 The Lambda Calculus 8.1.1 Operational Semantics 8.1.2 Denotational Semantics 8.1.3 Translation Semantics and Combinators 8.2 Scheme 8.3 ML 8.4 Haskell 8.5 Historical Perspectives and Further Reading 8.6 Exercises 9 Imperative Programming 9. Historal Perspectives and Further Reading 9. Exercises Pragmatics 10 Concurrent Programming 10.1 The Concurrent Nature of Systems 10.2 The Nature of Concurrent Systems 10.3 Concurrency in Programming Languages 10.4 The Engineering of Concurrent Programs 10.5 Historical Perspectives and Further Reading 10.6 Exercises 11 Object-Oriented Programming 11.1 Subtypes (subranges) 11.2 Objects

http://cs.wwc.edu/~aabyan/221_2/PLBOOK/ (5 de 6) [18/12/2001 10:33:41]

Introduction to Programming Languages

11.3 Classes 11.4 Inheritance 11.5 Types and Classes 11.6 Examples 11.7 Historical Perspectives and Further Reading 11.8 Exercises 12 Translation 12.1 Attribute Grammars and Static Semantics 12.2 Parsing 12.3 Scanning 12.4 Symbol Table 12.5 Virtual Computers 12.6 Optimization 12.7 Code Generation 12.8 Peephole Optimization 12.9 Historical Perspectives and Further Reading 12.10 Exercises 13 Evaluation 13. Historical Perspectives and Further Reading 13. Exercises Appendix Logic Bibliography Definitions Index Supplementary Material Code Answers
Permission to make digital/hard copy of part or all of this work for personal or classroom use is granted without fee provided that the copies are not made or distributed for profit or commercial advantage, the copyright notice, the title of the publication, and its date appear, and notice is given that copying is by permission of Anthony A. Aaby. To copy otherwise, to republish, to post on servers, or to redistribute to lists, requires prior specific permission and/or fee. 1998 Anthony A. Aaby. Last Modified - . Send comments to [email protected]

http://cs.wwc.edu/~aabyan/221_2/PLBOOK/ (6 de 6) [18/12/2001 10:33:41]

Disclamer and Copyright

Disclamer and Copyright


This information is provided in good faith but no warranty can be made for its accuracy. Opinions expressed are entirely those of myself and cannot be taken to represent views of past, present or future employers. Feel free to quote, but reproduction of this material in any form of storage, paper, etc is forbidden without the express written permission of the author. Intellectual property rights in this material are held by the author. All rights reserved. If you have questions or comments feel free to send mail to me. Anthony A. Aaby

http://cs.wwc.edu/~aabyan/221_2/PLBOOK/Notices.html [18/12/2001 10:33:43]

Anthony Aaby's Homepage

Anthony Aaby
Office: 328 Kretchmar Hall Phone: 1-(509)-527-2067 FAX: 1-(509)-527-2253 email: [email protected] Professor of Computer Science BA Mathematics Loma Linda University MA Mathematics The Pennsylvania State University Ph.D. Computer Science The Pennsylvania State University Course Syllabi CPTR 235 System Software and Programming CPTR 352 Operating Systems CPTR 415 Introduction to Databases CPTR 425 Introduction to Networking CPTR 435 Software Engineering CPTR nn Software Project Management CPTR 460 Parallel and Distributed Programming CPTR 464 Compiler Design CPTR 496,7,8 Seminar INFO 150 Software Application INFO 250 System Software Instructions for students Research Interests Parallel and Distributed Computing Programming Languages Natural Language Processing Theory of Programming Automated Reasoning Systems Research Group

http://cs.wwc.edu/~aabyan/ (1 de 3) [18/12/2001 10:33:53]

Anthony Aaby's Homepage

Work in Progress

C Family of Languages Essays on Ethics Computing Curricula 2001 1991 CS Labs Hardware Logic Programming -- tiger Logic resources The Logic of Fact, Fiction, Fantasy, & Physics Programming Languages
q q q q

Compiler Construction using Flex and Bison (Lecture Notes) Multiparadigm Programming Language Textbook Introduction Programming Languages Tutorials [ Pascal | Prolog | Gdel | Scheme | SML | Haskell | PCN ]

Software Engineering
q q q q

Introduction to Software Engineering (Lecture Notes) Programming Patterns Design Temporal logic for specification

Colloquia Stand alone lectures Old Syllabi

Index Prolog and AI OOP VR & Limits of Computation INFO 105 Personal Computing CPTR 141 Introduction to Programming CPTR 215 Assembly Language Programming CPTR 221-222 Programming Languages CPTR 350 Computer Architecture CPTR 351 Memory and I/O Systems Computing at WWC Software Engineering at WWC BS, BA, AS - CS BS-SE; BS-SE alt BSE-SE vs BS-SE Last Modified - .
Send comments to [email protected]

Local

http://cs.wwc.edu/~aabyan/ (2 de 3) [18/12/2001 10:33:53]

Anthony Aaby's Homepage

http://cs.wwc.edu/~aabyan/ (3 de 3) [18/12/2001 10:33:53]

http://cs.wwc.edu/~aabyan/Long_Haired_Aaby.jpg

http://cs.wwc.edu/~aabyan/Long_Haired_Aaby.jpg [18/12/2001 10:33:58]

CPTR235 System Software & Programming

CPTR235 System Software & Programming - 4


CAUTION: subject to change Description: Introduction to Unix, system adminstration, system software including database managment systems and web severs, and system programming. Prerequisites: CPTR 141 or CIS 130. This course has a significant project componenent that follows a project-based organization rather than the traditional lecture-lab organization. All class members are expected to spend 120 hours (12 hours/week) on this course. Goals: Upon completion of the course students will have a variety of skills in the following areas:
q q q q q q q q q

Unix operating system Standard Unix C libraries Development tools Documentation Data management (database) Scripting languages (e.g., shell, Tcl, Perl) Concurrency and distributed applications GUI programming (e.g., Tk, GTK+, Qt) Web programming

Consistent with peer review practice in academia, the source code for software developed for this course must be available to all class members and if desired may be protected by one of the approved open source licenses unless prior arrangement is made for a more restricted copyright protected by an NDA. Resources Lecture notes and schedule Skill set Projects Forms References (recommended in bold face)
q

Application server r Charles Au Linux Apache Web Server Administration (Linux Library) Sybex 2000

http://cs.wwc.edu/~aabyan/235/ (1 de 3) [18/12/2001 10:34:09]

CPTR235 System Software & Programming

Ben Laurie, Peter Laurie, Robert Denn (Editor) Apache : The Definitive Guide O'Reilly 1999 r Amos Latteier, Michel Pelletier The Zope Book New Riders Publishing 2001. r Martina Brockmann, Katrin Kirchner, Sebastian Luhnsdorf, Mark Pratt Zope Web Application Construction Kit Sams 2001 Database r Stucky, Matthew. MySQL: Building User Interfaces New Riders 2001. GUI r GTK s Harlow, Eric. Developing Linux Applications with GTK+ and GDK (Feb.1999) s Stucky, Matthew. MySQL: Building User Interfaces New Riders 2001. r TCL/TK r Qt s Matthias Kalle Dalheimer Programming With Qt O'Reilly & Associates 1999. Unix (& Linux) Programming r Matthew, et. al Professional Linux Programming Wrox Press Ltd. 2000 r Stones and Matthew Beginning Linux Programming Wrox Press Ltd. 1999 r Chan, Terrence Unix System Programming Using C++ Prentice-Hall PTR 1997 r Haviland, Gray & Salama Unix System Programming Addison-Wesley 1999 r Mitchell, Oldham, Samuel & Oldham Advanced Linux Programming New Riders 2001 r Robbins & Robbins Practical Unix Programming Prentice-Hall PTR 1996 Unix (& Linux) r Sarwar, Koretsky, & Sarwar. Linux: The Textbook Addison-Wesley 2002. r IBM Developer Resource IBM
r

Internet Fortuitous.com's Linux Fundamentals Linux Documentation Project - Rute Users Tutorial and Exposition Aaby's Unix notes WWC CS Department HowTo pages WWC IS Unix FAQ Usenet: Technical Journals: CACM, Computing Surveys, JACM, Evaluation The course grade is determined by the quantity and quality of work completed on laboratory assignments, homework, and tests. The grade expectations document helps to explain the different grades.

http://cs.wwc.edu/~aabyan/235/ (2 de 3) [18/12/2001 10:34:09]

CPTR235 System Software & Programming

GRADING WEIGHTS LETTER GRADES Labs Homework Tests 50% -% 50% As 90 - 100% Bs 80 - 89% Cs 70 - 79% Ds 60 - 69% Study Hints
q q q q

Ask questions in class (you are paying for it). At the first sign of difficulty, talk to your teacher. Form a study group and meet regularly. Construct chapter summaries noting concepts, definitions, & procedures.

Copyright (c) 2000 by Anthony Aaby. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at http://www.opencontent.org). Last Modified - . Comments and content invited [email protected]

http://cs.wwc.edu/~aabyan/235/ (3 de 3) [18/12/2001 10:34:09]

System Software and Programming: Schedule

CPTR 235 System Software and Programming - 4


Lecture notes and schedule

These schedules are subject to change.

Lecture notes and schedule Week Topic 1 Orientation Introduction Text/Resources Assignments

Become familiar with Unix/Linux Fortuitous.com's Linux Fundamentals Linux Documentation Project Rute Users Tutorial and Exposition Aaby's Unix notes WWC CS Department HowTo pages WWC IS Unix FAQ

2 3

More Unix Development tools Bison and Flex (yacc and lex) 1. Modify a compiler 2. Create an e-commerce website.
q q q

The textbook site A book exchange A car pooling site

4 5

Data management

http://cs.wwc.edu/~aabyan/235/Schedule.html (1 de 2) [18/12/2001 10:34:11]

System Software and Programming: Schedule

Concurrency

1. Create a web based user interface which allows the user to obtain the current time from several on and off campus machines. 2. Construct a program which permits multiple users on multiple machines to act as consumers and producers adding and deleting items from a bounded queue. Create user interfaces for your website with GTK+

7 8 9 10

GUI

Web Project Due & Final Exam

Copyright (c) 2001 by Anthony Aaby. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at http://www.opencontent.org). Last Modified - . Comments and content invited [email protected]

http://cs.wwc.edu/~aabyan/235/Schedule.html (2 de 2) [18/12/2001 10:34:11]

System software & programming: skills

CPTR 235 System Software and Programming


Server-side include Imbedded PHP Skills Checklist Name: Date:

BLP PLP Unix/Linux enviornment Introduction to Unix C/C++ Shell programming Files Unix environment Terminals Curses Security Multimedia Diskless systems Beowulf Clusters Device drivers Development tools Software engineering Internationalization make RCS/CVS debugging - gdb Testing Flex & Bison Distribution tar, patches 8 27 8 8 9 2 6 11 10 1 28 21 1 2 3 4 5 6 12 19 22 24 26

Have Demo

http://cs.wwc.edu/~aabyan/235/Skills.html (1 de 3) [18/12/2001 10:34:15]

System software & programming: skills

packages configure autoconf automake Documentation Man pages, troff, info files 8 Command line help TeX, LaTeX DocBook Literate programming Data management Memory, files, & dbm PostgreSQL MySQL LDAP Concurrency and distributed applications Processes & Signals POSIX threads Pipes Semaphores Sockets RPC CORBA User interface Tcl X & Tk Gnome/GTK+ KDE/Qt The Web Perl HTML CGI programming PHP XML Python 18 19 20 15 16 17 10 11 12 13 14 7

27

25 25

3, 4 5 7

18 20, 21

8, 9 13, 14

16 23 15, 17

http://cs.wwc.edu/~aabyan/235/Skills.html (2 de 3) [18/12/2001 10:34:15]

System software & programming: skills

Copyright (c) 2001 by Anthony Aaby. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at http://www.opencontent.org). Last Modified - Wed Oct 27 09:42:00 1999. Comments and content invited [email protected]

http://cs.wwc.edu/~aabyan/235/Skills.html (3 de 3) [18/12/2001 10:34:15]

OS Labs

CPTR 235 System Software and Programming


The Labs

The laboratory exercises are open labs meaning that they are unscheduled but are expected to require 30-40 hours of activity. The programming oriented labs should be done in pairs. More ambitious projects will require a team effort which will provide an opportunity for a variety of roles - excellent resume material. Several projects are available to cater to the goals and/or major of the student. Students are expected to commit to a project early in the quarter. Neither the textbook nor the lectures may cover enough material to complete the project. You are expected to determine what additional materials are needed and obtain them in sufficient time to complete the project. Students who would like to work on a different problem may propose an alternative project at any point in the quarter. The project must be well-defined, approved by the instructor, and involve roughly the same amount of work as the remaining assignments.

Major(s) Project Short Description Grading CIS, CS Database CIS, CS, CpE, SwE CS, CpE, SwE Embeded system Embedded systems projects:
q

Develop a small application for a palm device r Palm OS: Palm, Handspring r Windows: Pocket PC or r Linux: Sharp's Zaurus SL-5000, GMate's Yopy, Tuxia's iPaq r Compaq http://www.compaq.com/. r Sharp http://www.sharp.co.jp/. r Gmate http://www.gmate.co.kr/. r Tuxia http://www.tuxia.com Develop a small application for Sun's Java Card (a smart card)

Other projects
http://cs.wwc.edu/~aabyan/235/Projects.html (1 de 2) [18/12/2001 10:34:17]

OS Labs

q q

Online course evaluation form

Past projects
q

Book exchange

Copyright (c) 2000 by Anthony Aaby. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at http://www.opencontent.org). Last Modified - Wed Oct 27 09:42:00 1999. Comments and content invited [email protected]

http://cs.wwc.edu/~aabyan/235/Projects.html (2 de 2) [18/12/2001 10:34:17]

Forms

Software Process Forms


Meeting Documents
q q

Meeting agenda Meeting minutes

IEEE Project Documents (for details see Software Engineering Standards Committee (SESC) IEEE Standards Software Engineering Vols 1-4 IEEE 1999. - in WWC library) Customer and Terminology Standards IEEE Std. # 610.12-1990 1062 1998 Edition 1233, 1998 Edition 12207.0-1996 I12207.1-1997 12207.2-1997 Title IEEE Standard Glossary of Software Engineering Terminology IEEE Recommended Practice for Software Acquisition IEEE Guide for System Requirements Specifications Software Life Cycle Processes Software Life Cycle Processes--Life cycle date Software Life Cycle Processes--Implementation considerations Process Standards IEEE Std. # Title 828-1998 1042-1987 1058-1998 1074-1997 I490-1998 IEEE Standard for Software Configuration Management Plans IEEE Guide to Software Configuration Management IEEE Standard for Software Project Management Plans (SPMP) IEEE Standard for Developing Life Cycle Processes IEEE Guide - Adoption of PMI Standard - A Guide to Project Management Body of Knowledge

Product Standards
IEEE Std. # Title

Resource and Techniques Standards IEEE Std. # Title 830-1998 1016-1998 IEEE Recommended Practice for Software Requirements Specifications Recommended Practice for Software Design Descriptions

http://cs.wwc.edu/~aabyan/435/Forms/ (1 de 2) [18/12/2001 10:34:20]

Forms

Additional process standards


q q q q q

Problem statement Project Agreement Requirements Analysis Document (RAD) System Design Rationale Document (SDRD) Change Proposal Form (CPF)

Personnel Evaluation
q q q

Time card Performance Reviews (Self and Peer) Short forms r Performance review - performed by the instructor. r Peer review - performed by a peer. Self evaluation

Lifecycle Project initiation Problem statement

Management

Project steady state Requirements Analysis Document (RAD)

Copyright (c) 2000 by Anthony Aaby. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at http://www.opencontent.org). Last Modified - . Comments and content invited [email protected]

http://cs.wwc.edu/~aabyan/435/Forms/ (2 de 2) [18/12/2001 10:34:20]

Introduction to Unix

Introduction to Unix

Topic/Lecture Notes Introduction Text editing (vi, emacs, textedit) The X window system Electronic mail Commands and Filters The csh Shell Shell Scripts File System Managment Networking and Internet Unix and C Programming (dbx) System Programming (system calls) System Programming (pipes and sockets) Program maintenance with make and rcs Document preparation using LaTeX

1996 by A. Aaby

http://cs.wwc.edu/~aabyan/Unix/ [18/12/2001 10:34:24]

Guide to the CS Department Computing Environment

Guide to the CS Department Computing Environment


CS account information
Please review the Policies for Responsible Computing at Walla Walla College and the CS Department Computer User Policies and Procedures. For help, email [email protected]

HOWTO pages for CS and Moonbase


The Basics
q q q q q q q q q q q

HOWTO: Getting Started logging in, dialup, services HOWTO: Use UNIX/Linux HOWTO: Use email HOWTO: Print in UNIX HOWTO: Use floppies and CD's HOWTO: Setup a personal web page HOWTO: Use StarOffice HOWTO: Dialin PPP HOWTO: WWW, Browsers, HTML,etc HOWTO: Use vi. vim and related editors HOWTO: Use emacs and related editors

Applications
q q q q q

HOWTO: Amaya W3C browser/editor HOWTO: Cygwin HOWTO: Haskell HOWTO: Java (man page) HOWTO: JLex

http://cs.wwc.edu/Environment/ (1 de 4) [18/12/2001 10:34:31]

Guide to the CS Department Computing Environment


q q q q q q q

HOWTO: Make HOWTO: Use Make HOWTO: Microsoft Visual C++ HOWTO: MPI - Setup, compile, and run programs HOWTO: LAM - compile, and run programs HOWTO: Prolog HOWTO: Use Oracle

Information
q q q q q q

HOWTO: Install Linux on your own computer using an NFS server. HOWTO: Samba file & print server for MS Windows HOWTO: Dealing with Microsoft Windows NT HOWTO: Install Client32 on Win95/NT HOWTO: XML HOWTO: Our Hardware

Administration
q q q q q q q q q

HOWTO: Install and run stow HOWTO: Install SSH 1&2 HOWTO: Sendmail (CS Specific) HOWTO: Cfengine (CS Specific) HOWTO: PPP-Server (CS Specific) HOWTO: KBackup (CS Specific) HOWTO: Install Apache + PHP + SSL + ndsauth HOWTO: Install BigBrother HOWTO: Install Zope

Help us: Suggest changes, other HOWTOs, create some of your own and share them with us -- use our template. Additional Resources Usenet comp FAQs

Programming Languages
Pascal Perl Tcl/Tk

C Family
http://cs.wwc.edu/Environment/ (2 de 4) [18/12/2001 10:34:31]

Guide to the CS Department Computing Environment

C, C++ Java

Logic Programming
Gdel

Functional Programming
Lisp Scheme SML

Parallel/Distributed Programming
Fortran M Java MPI PCN PVM SR

Assembler
LinuxAssembly.org Neveln, Bob. Linux Assembly Language Programming P-H PTR 2000 MASM Hal x86 SPIM Orion MIPS TASM

Graphics
XLIB Postscript Unix/HPLJ4M

http://cs.wwc.edu/Environment/ (3 de 4) [18/12/2001 10:34:31]

Guide to the CS Department Computing Environment

Last Modified October 18, 2000 2000 Walla Walla College Computer Science Department Send comments to [email protected]

http://cs.wwc.edu/Environment/ (4 de 4) [18/12/2001 10:34:31]

CPTR352 Operating Systems

CPTR352 Operating Systems - 4


Description
History, evolution, and philosophies; tasking and processes; process coordination and synchronization; scheduling and dispatch; physical and virtual memory organization; device management; file systems and naming; security and protection; communications and networking; distributed operating systems and real-time concerns. Laboratory work required. Prerequisite: CPTR 215 Assembly Language Programming. Course contents cover subtopics OS1-8 of the topic OS Operating Systems of the The Computer Science Body of Knowledge described in the Computing Curricula 2001. Please read: Integrity, Computing, & Disability Polices

Goals
Satisfactory completion of this course requires demonstration of the following skills:
q q q q q q q q

Overview of operating systems (2) Operating system principles (2) Concurrency Scheduling and dispatch (3) Memory management (5) Device management Security and protection File systems

These skills may be structured into the following:


q q q q

be familiar with how operating systems manage processes be familiar with how operating systems manage storage be familiar with how operating systems provide protection and security be familiar with the basic concepts of distributed systems.

Evaluation
The course grade is determined by the quantity and quality of work completed on laboratory

http://cs.wwc.edu/~aabyan/352/ (1 de 3) [18/12/2001 10:34:37]

CPTR352 Operating Systems

assignments, homework, and tests. The grade expectations document helps to explain the different grades. Attach a completed work summary sheet with your work. WEIGHT, %, & GRADES Labs 40% 90 - 100% As Homework 20% Paper/report 10% Tests 30% 80 - 89% Bs 70 - 79% Cs 60 - 69% Ds

You need good C, C++, or Java programming skills and can expect to put in 9-12 hours per week for the class (including lectures) and an additional 3-4 hours per week for the lab/project.

Resources
Lecture notes and schedule Operating System Labs: Several projects are available to cater to the goals and/or major of the student. Textbook (in bold face): Bacon, Jean, Concurrent Systems Addison-Wesley 1998 Crowley, Charles, Operating Systems: A Design-oriented Approach Irwin 1997 Nutt, Gary. Operating Systems: A Modern Perspective, Lab Update 2e Addison-Wesley 2002 ISBN 0-201-74196-2 Nutt, Gary. Kernel Projects for Linux Addison-Wesley 2000 ISBN 0-201-61243-7 Stallings, William, Operating Systems: Internals and Design Principles 3rd ed. Prentice-Hall 1998 Tanenbaum, Operating Systems: Design and Implementation 2nd ed. Prentice-Hall 1997 Tanenbaum, Modern Operating Systems 2nd ed. Prentice-Hall 2001 ISBN 0-13-031358-0 Silberschatz & Galvin, Operating System Concepts 5th ed. John Wiley 1998 Other Books: Linux Kernel Hacker's Guide Bar, Moshe. Linux Internals McGraw-Hill 2000. Bovet & Cesati Understanding the Linux Kernel O'Reilly & Co. 2000 Mitchell, Oldham, Samuel & Oldham Advanced Linux Programming New Riders 2001 Robbins & Robbins Practical Unix Programming Prentice-Hall PTR 1996 Stones & Matthew Beginning Linux Programming WROX Press Vahalia, Uresh Unix Internals Prentice-Hall 1996 Other References Buhr et al., 1995. Monitor Classification. ACM Computing Surveys 27, 1 (March) 63-108. Halfhill, T. R., 1996. Unix vs NT. Byte, Vol 21 No 5 (May 1996) 42-52. Usenet: comp.os.*, comp.sources.unix, comp.unix.*, comp.windows.x Technical Journals: CACM, Computing Surveys, JACM, TOCS, SigOPS
http://cs.wwc.edu/~aabyan/352/ (2 de 3) [18/12/2001 10:34:37]

CPTR352 Operating Systems

Miscellaneous Items SimOS NachOS OSP

Study Hints
q q q q

Ask questions in class (you are paying for it). At the first sign of difficulty, talk to your teacher. Form a study group and meet regularly. Construct chapter summaries noting concepts, definitions, & procedures.

95.6.5 a.aaby

http://cs.wwc.edu/~aabyan/352/ (3 de 3) [18/12/2001 10:34:37]

OS Labs

CPTR 352 Operating System Design


The Labs

The OS laboratory exercises are open labs meaning that they are unscheduled but are expected to require 30-40 hours of activity. The programming oriented labs should be done in pairs. More ambitious projects will require a team effort which will provide an opportunity for a variety of roles excellent resume material. Several projects are available to cater to the goals and/or major of the student. Students are expected to commit to a project early in the quarter. Neither the textbook nor the lectures may cover enough material to complete the project. You are expected to determine what additional materials are needed and obtain them in sufficient time to complete the project. Students who would like to work on a different problem may propose an alternative project at any point in the quarter. The project must be well-defined, approved by the instructor, and involve roughly the same amount of work as the remaining assignments.

Major(s) CIS, CS

Project Operating system administration

Short Description Grading Setup and administer a Linux, Solaris, and/or Grade sheet MS-Windows2000 Server
q

Kaplenk, Joe Unix System Administrator's Interactive Workbook Prentice-Hall PTR 1999 Helmick, Jason Preparing for MCSE Certification (Windows 2000 Server) DDC Publishing 2000

http://cs.wwc.edu/~aabyan/352/Labs.html (1 de 4) [18/12/2001 10:34:39]

OS Labs

CIS, CS, CpE, SwE

OS programming interface (API)

Gain experience in systems programming using the OS API


q

Chan, Terrence Unix System Programming Using C++ PrenticeHall PTR 1997 Haviland, Gray & Salama Unix System Programming AddisonWesley 1999 Nutt, Gary Operating System Projects for Windows NT Addison Wesley 2000 Stones and Matthew Beginning Linux Programming Wrox Press Ltd. 1999 Grade sheet

CS, CpE, SwE

OS internals

Gain experience with OS internals Linux source code browser or Linux Kernel Cross Ref
q q

Textbook projects or OS internals

CS, CpE, SwE

OS Simulation

Simulators: SimOS, NachOS, OSP, Crowley's sossim, jsos Prolog Code from CC1991
q

Tasking and Processes - Design and implementation of a simple context switcher and multiple tasks, using a timer to cause context switch. Done either in a high-level language or on available simulator or machine. Student gains understanding of process context and the idea of context switch. Process Coordination and Synchronization - Using a simulator or an actual system, explore the consequences of shared access under different timings. Develop mechanisms to synchronize access

http://cs.wwc.edu/~aabyan/352/Labs.html (2 de 4) [18/12/2001 10:34:39]

OS Labs

q q

and prove lack of conflict. Observe a deadlock and decide how to prevent it from happening. Students gain an appreciation of problems of synchronization and race conditions. Scheduling and Dispatch - Run various job mixes in a simulator or actual system under various kinds of scheduling, and then analyze the results. Students learn how to analyze a scheduling policy, and the effects of different scheduling policies. Physical and Virtual Memory Organization - Analysis of access times, delays, I/O operations to manage various job mixes under various algorithms, largely with a simulator. Adjustment of page size, page-ahead, victim policies, penalties, etc. to observe behavior of system Students gain an understanding of memory management schemes. Device Management File Systems and Naming Experiments (possibly with a simulator) on the effect of file size and transfer latencies, to gain an impression of how file systems behave. By examining the amount of disk space used and the number of accesses, students learn to retrieve and evaluate performance data that occurs out of various possible organizations of files and directories.

Copyright (c) 2000 by Anthony Aaby. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at http://www.opencontent.org).

http://cs.wwc.edu/~aabyan/352/Labs.html (3 de 4) [18/12/2001 10:34:39]

OS Labs

Last Modified - Wed Oct 27 09:42:00 1999. Comments and content invited [email protected]

http://cs.wwc.edu/~aabyan/352/Labs.html (4 de 4) [18/12/2001 10:34:39]

Policies

ACADEMIC, COMPUTING, & DISABILITY POLICIES


Academic Integrity
An integral part of the mission of Walla Walla College is to prepare its students to be responsible individuals with Christian values. The College expects all members of its community to have integrity, including a steadfast adherence to honesty. Faculty have a responsibility to foster integrity by example and instruction. Students have a responsibility to learn, respect, and practice integrity. All acts of dishonesty are unacceptable, including cheating, plagiarism, forgery, misrepresentation, falsification, prohibited collaboration, and prohibited use of files. Departments or schools may have specific criteria for behavior and skills suitable to their disciplines which will be communicated to students, typically in course syllabi. Computer Science Department Addendum All submitted work should be the student's own work. Where there is a deviation from this ideal, the source of ideas and assistance must be properly credited including fellow students, teachers, and reference material. Academic dishonesty may result in course failure and notice will be given to the Academic Administration of the college.

Responsible Computing
Computer users
q q q q q

may log in only to their own computer accounts. must insure that their work does not interfere with others. may not examine, copy, modify, or delete files belonging to others without their consent. must not waste computer resources. must not use WWC computer facilities to gain unauthorized access to remote networks or systems or violate the use policies of any remote system. Computer Science Department Addendum Use of the Computer Science Department computing environment is governed by the CS Department Computer User Policies and Procedures

See also the Policies for Responsible Computing at Walla Walla College

http://cs.wwc.edu/Policy.html (1 de 2) [18/12/2001 10:34:43]

Policies

Software Engineering Code of Ethics


q q

Browsable HTML format Printable PDF format

Disabilities
If you have a physical and/or learning disability and require accommodations, please contact your instructor or the Disabilities Support Services office (basement of Village Hall; 527-2366). Syllabi are available in alternative print formats upon request. Please ask your instructor.

Final Exam
All students are expected to take the final exam as scheduled. Special administrations are arranged by petition to the Associate Vice President for Academic Administration three weeks prior to the close of the quarter. See the Walla Walla College class schedulue for date and time.

Study Hints
q q q q q

Ask questions in class (you are paying for it). At the first sign of difficulty, talk to your teacher. Form a study group and meet regularly. Construct chapter summaries noting concepts, definitions, & algorithms. Keep a course/project/lab journal dating and summarizing all ideas, all design decisions, all code modifications, and all problems encountered and the solutions found. The journal should be complete enough to allow someone else to reproduce your sequence of activities.

Copyright 1997 Walla Walla College -- All rights reserved Maintained by WWC CS Department

Last Modified
Send comments to [email protected]

http://cs.wwc.edu/Policy.html (2 de 2) [18/12/2001 10:34:43]

http://cs.wwc.edu/~aabyan/352/WorkSummary.html

Operating systems: Work Summary


Name: Grade:

Instructions: Enter data from each area (as a percent) into the table below, multiply by the factor placing the result in the last column. Sum the last column, the result is the total. Include this sheet with your work.

Score x factor = Labs Homework Paper/report Tests .4 .2 .1 .3 Total

http://cs.wwc.edu/~aabyan/352/WorkSummary.html [18/12/2001 10:34:47]

Operating System Design

CPTR 352 Operating System Design - 4


Lecture notes and schedule

These schedules are subject to change. OS internals lab schedule.

Lecture notes and schedule Week Topic OPERATING SYSTEM PRINCIPLES OS1. Operating system principles 1 (core -- 2 hours) Nutt Assignments 1-4 p. 50; 4, 5, 6, 7 p. 105; TBA Lab 1: Shell program Lab 2: Kernel timers 6 - 10 Lab 3: Observing OS behavior Lab 4: Bounded Buffer Problem Lab 5: Refining the Shell

2, 3

PROCESS MANGEMENT OS2. Concurrency (core -- 6 hours)

OS3. Scheduling and dispatch (core -3 hours) Test (Process Management) MEMORY MANAGEMENT OS4. Virtual memory (core -- 3 hours) DEVICE MANAGEMENT OS5. Device Managment (core -- 2 hours) 11, 12

5 Lab 6: A floppy disk driver

FILE SYSTEM MANAGEMENT 13 OS7. File systems and naming (core -3 hours) Test (Memory & File System Management)

Lab 7: A simple file manager

http://cs.wwc.edu/~aabyan/352/Schedule.html (1 de 2) [18/12/2001 10:34:49]

Operating System Design

OS6. Security and protection (core -14 3 hours) OS8. Real-time systems

9, 10 DISTRIBUTED SYSTEMS Network Structures Distributed-System Structures Distributed-File Systems Distributed Coordination Test (Protection and Security, Distributed Systems) Design notes

15 17 16 17

Lab 8: Using TCP/IP

Copyright (c) 2000 by Anthony Aaby. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at http://www.opencontent.org). Last Modified - . Comments and content invited [email protected]

http://cs.wwc.edu/~aabyan/352/Schedule.html (2 de 2) [18/12/2001 10:34:49]

OS Paper & Report

Operating System Paper & Report

Write a report (term paper 3-5 pages) and make a presentation in class on one of the following topics:
q q q

q q

q q q q

Multimedia operating systems Multiple processor systems Case study of r Unix and Linux r Windows 2000/XP r Be OS r ... Embedded & real-time systems Distributed systems r Operating System Directions for the Next Millennium: http://research.microsoft.com/research/sn/Millennium/mgoals.html Networks Client-server Any course topic in greater depth OS design principles (see Tanenbaum and Crowley's texts)

Copyright (c) 2000 by Anthony Aaby. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at http://www.opencontent.org). Last Modified - . Comments and content invited [email protected]

http://cs.wwc.edu/~aabyan/352/Reports.html [18/12/2001 10:34:51]

http://cs.wwc.edu/~aabyan/352/Tests.html

CPTR 352 Operating System Design Exams


q q q q

Process managment Memory and file system management Protection and security Comprehensive Final Exam

http://cs.wwc.edu/~aabyan/352/Tests.html [18/12/2001 10:34:53]

Introduction to Databases

CPTR 415 Introduction to Databases - 4


Description Introduction to the design, use, and programming of database systems, and database management system implementation. Prerequisite: CPTR 143 Data structures and algorithms, MATH 250 Discrete mathematics. You can expect to put in 9-12 hours per week for the class (including lectures) and an additional 3-4 hours per week for the lab/project. Goals Course contents cover subtopics IM1-IM6 of the topic IM. Information Management of the The Computer Science Body of Knowledge described by the Computing Curricula 2001. Satisfactory completion of this course requires demonstration of the following skills:
q

The relational model r Be able to construct a simple relational database. r Be able to formulate simple queries using the relational algebra. Database Query Languages r SQL s Be able to use the data definition language (DDL). s Be able to use the data manipulation language (DML). Database Design (The resulting database design must contain at least 15 relations.) r Modeling s Be able to construct either an E/R diagram or an UML diagram for a database. s Be able to use a tool for drawing a diagram. r Mapping s Be able to map a conceptual model (diagram) to a relational schema. r Functional Dependency s Be able to determine all functional dependencies of a relation. s Be able to determine all candidate keys. r Normalization s Be able to achieve the desirable state of 3NF by progressing through the intermediate states of 1NF and 2NF if needed. s Be able to normalize to the BCNF. s Be aware of the 4NF and the 5NF. Database Implementation

http://cs.wwc.edu/~aabyan/415/ (1 de 3) [18/12/2001 10:35:00]

Introduction to Databases
r r r

Create a database using DDL. Identify different classes of users and create appropriate views of the database. Create a web interface to the database for each class of user utilizing a programming language interface (e.g. Perl, PHP, Java, C/C++) to the DBMS.

Evaluation The course grade is determined by the quantity and quality of work completed on homework assignments, the project, and the tests. The grade expectations document helps to explain the different grades. Attach a completed work summary sheet with your work.

WEIGHT % & GRADES Project 50% 90 - 100% As Bs Cs Ds Homework 10% 80 - 89% Paper/report 10% 70 - 79% Tests Resources Lecture notes and schedule Database Labs: Several different projects are available to cater to the goals and/or major of the student. Software Tools E/R or UML Diagramming tool: Alloy, Argo/UML, Dia, Rose, Visio DBMS: Oracle or PostgreSQL Web page description: HTML; Netscape Composer Webserver: Apache Operating System: Unix (Linux) Scripting language: PHP or Perl Programming language: C/C++ or Java Textbook: Elmasri & Navathe Fundamentals of Database Systems 3 ed Addison Wesley 2000 ISBN 08053-1755-4 Ullman & Windom A First course in Database Systems Prentice-Hall 1997 (ISBN 0-13861337-0) Text resources Yarger, Reese, & King MySQL & mSQL O'Reilly 1999 (ISBN 1-56592-434-7) Laurie & Laurie Apache The Definitive Guide 2nd ed. O'Reilly 1999 (ISBN 1-56592-528-9) Gundavaram, Shishir CGI Programming on the World Wide Web O'Reilly 1996 (ISBN 156592-168-2) WWW: Usenet News Groups: Technical Journals: CORBA
http://cs.wwc.edu/~aabyan/415/ (2 de 3) [18/12/2001 10:35:00]

30% 60 - 69%

Introduction to Databases

Copyright (c) 1999 by Anthony Aaby. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at http://www.opencontent.org). Comments and content invited [email protected]

http://cs.wwc.edu/~aabyan/415/ (3 de 3) [18/12/2001 10:35:00]

Grade Expectations

Grade Expectations
The "A" Students -- Outstanding Students Attendance Virtually perfect attendance. Their commitment to the class resembles that of the teacher. Preparation Always prepared for class. They always read the assignment. Their attention to detail is such that they occasionally catch the teacher in a mistake. Curiosity Show an interest in the class and in the subject. They look up or dig out what they don't understand. They often ask interesting questions or make thoughtful comments. Retention Have retentive minds. They are able to connect past learning with the present. They bring a background with them to the class. Attitude Have a winning attitude. They have both the determination and the self-discipline necessary for success. They show initiative. They do things they have not been told to do. Talent Have something special. It may be exceptional intelligence and insight. It may be unusual creativity, organizational skills, commitment -- or a combination thereof. These gifts are evident to the teacher and usually to the other students as well. Results Make high grades on tests -- usually the highest in the class. Their work is a pleasure to grade. The "C" Students -- Average or Typical Students Attendance Miss class frequently. They put other priorities ahead of academic work. In some cases, their health or constant fatigue renders them physically unable to keep up with the demands of highlevel performance. Preparation Prepare their assignments consistently but in a perfunctory manner. Their work may be sloppy or careless. At times, it is incomplete or late. Attitude Not visibly committed to the class. They participate without enthusiasm. Their body language often expresses boredom. Talent They vary enormously in talent. Some have exceptional ability but show undeniable signs of poor self-management or bad attitudes. Others are diligent but simply average in academic
http://cs.wwc.edu/~aabyan/Grades.html (1 de 2) [18/12/2001 10:35:02]

Grade Expectations

ability. Results Obtain mediocre or inconsistent results on tests. They have some concept of what is going on but clearly have not mastered the material.

From Clarifying Grade Expectations by John H. Williams in The Teaching Professor

http://cs.wwc.edu/~aabyan/Grades.html (2 de 2) [18/12/2001 10:35:02]

Introduction to Databases

CPTR 415 Introduction to Databases


The Labs

The database laboratory exercises are open labs meaning that they are unscheduled but are expected to require 80-90 hours of activity. The programming oriented labs should be done in pairs. More ambitious projects will require a team effort which will provide an opportunity for a variety of roles excellent resume material. Several projects are available to cater to the goals and/or major of the student. Students are expected to commit to a project and a specific RDBMS early in the quarter. Neither the textbook nor the lectures may cover enough material to complete the project. You are expected to determine what additional materials are needed and obtain them in sufficient time to complete the project. You may need to obtain 1. DBMS specific guides, 2. GUI interface programming guides, and 3. other materials. Students who would like to work on a different problem may propose an alternative project at any point in the quarter. The project must be well-defined, approved by the instructor, and involve roughly the same amount of work as the remaining assignments. Major(s) CIS, CS Project Database adminstration Short Description Setup and administer a DBMS such as Oracle or MS-SQLServer

CIS, CS, CpE, SE DB design & implementation Design and implement a database using a RDB. Suggested database projects include: Grade form q Airport q Art gallery/museum RDBMS: Oracle or q Congressional voting PostgreSQL q CS Department Students and Alumni DB Language: C or Java q E-commerce web site (a group project?) q Embedded database q Human resources q Inventory: auto parts, department store, super market q Library
http://cs.wwc.edu/~aabyan/415/Labs.html (1 de 3) [18/12/2001 10:35:05]

Introduction to Databases
q q q q q q q

Medical practice Multimedia database Music Store Pharmacy Reservation system - airline, hotel, etc Sports teams University (WWCs?)

Your solution must include


q q q

A problem statement Requirements analysis A conceptual design (using either UML or ER diagrams prepared using a tool such as Visio or Dia) A logical design (for a RDBMS or an ODBMS) A refined schema (elimination of redundencies) A physical implementation (using ORACLE or PosgreSQL) with installation scripts. A user interface using VB, Java, browser, etc.

See the Music Store project description for a sample project description. Submit your entire project in a tar file with installation instructions and scripts. CS, CpE, SE DBMS implementation Implement and/or modify a DBMS such as MySQL, PostgreSQL, InterBase or other opensource RDBMS or OODBMS.

Copyright (c) 2000 by Anthony Aaby. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at http://www.opencontent.org). Last Modified - Wed Oct 27 09:42:00 1999. Comments and content invited [email protected]

http://cs.wwc.edu/~aabyan/415/Labs.html (2 de 3) [18/12/2001 10:35:05]

Introduction to Databases

http://cs.wwc.edu/~aabyan/415/Labs.html (3 de 3) [18/12/2001 10:35:05]

http://cs.wwc.edu/~aabyan/415/Schedule.html

CPTR 415 Introduction to Databases -- 4


IM. Information Management (10 core hours) Information Management (IM) plays a critical role in almost all areas where computers are used. This area includes the capture, digitization, representation, organization, transformation, and presentation of information; algorithms for efficient and effective access and updating of stored information, data modeling and abstraction, and physical file storage techniques. It also encompasses information security, privacy, integrity, and protection in a shared environment. The student needs to be able to develop conceptual and physical data models, determine what IM methods and techniques are appropriate for a given problem, and be able to select and implement an appropriate IM solution that reflects all suitable constraints, including scalability and usability.

Week Topic 1 IM1. Information models and systems (core 3 hours) 2 IM2. Database systems (core -- 3 hours) Database design & programming 3 Database LifeCycle IM3. Data modeling (core -- 4 hours) Classroom activity: Conceptual design Classroom activity: Logical design 4-6 IM4. Relational Databases (8 hours) 7-8 Mid-term Test - Conceptual/logical design IM5. Database query languages (5 hours)

Text Assignments 1 Lab: requirements 2 Software tools

3, Lab: conceptual design 4, Modeling tools 16.1, Lab: logical design 16.2 7 8 9, 10, 14, 15 Lab: refined schema Lab: physical implementation Lab: User interface implementation

8-10 IM6. Relational database design (5 hours) Programming with SQL

11 Final Test Advanced topics IM7. Transaction processing Transactions Failure and Recovery Concurrency Control IM8. Distributed databases IM9. Physical database design

http://cs.wwc.edu/~aabyan/415/Schedule.html (1 de 2) [18/12/2001 10:35:08]

http://cs.wwc.edu/~aabyan/415/Schedule.html

IM10. Data mining IM11. Information storage and retrieval IM12. Hypertext and hypermedia IM13. Multimedia information and systems IM14. Digital libraries

Copyright (c) 2000 by Anthony Aaby. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at http://www.opencontent.org). Last Modified - . Comments and content invited [email protected]

http://cs.wwc.edu/~aabyan/415/Schedule.html (2 de 2) [18/12/2001 10:35:08]

OS Paper & Report

Database Paper & Report

Write a report (term paper ~5 pages) and make a presentation in class on one of the following topics:
q q q q q q q

Record storage, file organization and index structures. Object-oriented database technology Transaction processing Concurrency control Deductive databases Data warehousing and data mining Emerging database technologies r Active database concepts r Temporal database concepts r Spatial and multimedia databases r Distributed databases r Geographic information systems

Copyright (c) 2000 by Anthony Aaby. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at http://www.opencontent.org). Last Modified - . Comments and content invited [email protected]

http://cs.wwc.edu/~aabyan/415/Reports.html [18/12/2001 10:35:10]

http://cs.wwc.edu/~aabyan/415/Tests.html

CPTR 415 Introduction to Database


Sample exams; Topics
q q q

Exam1 Exam2 Comprehensive Final Exam

http://cs.wwc.edu/~aabyan/415/Tests.html [18/12/2001 10:35:11]

CPTR425 Introduction to Networking

CPTR425 Introduction to Networking - 4


Description
A study of networking algorithms, network architecture, network elements, data link, switching and routing, end-to-end protocols, data security, and programming. Prerequisite: CPTR 352 Operating System Design. You can expect to put in 9-12 hours per week for the class (including lectures) and an additional 3-4 hours per week for the labs. Course contents cover subtopics AR 9, NC1-4 of the topic NC Net-Centric Computing of the The Computer Science Body of Knowledge described in the Computing Curricula 2001. Please read: Integrity, Computing, & Disability Polices

Goals
Upon completion of the course you will be familiar with
q q q q

the OSI network architecture, TCP/IP network architecture, the basic algorithms for computer networks, and how to program network applications. AR9 Architecture for networks and distributed systems

NC. Net-Centric Computing (15 core hours) NC1. Introduction to net-centric computing (2) NC2. Communication and networking (7) NC3. Network security (3) NC4. The web as an example of client-server computing (3) NC5. Building web applications NC6. Network management NC7. Compression and decompression NC8. Multimedia data technologies NC9. Wireless and mobile computing

http://cs.wwc.edu/~aabyan/425/ (1 de 3) [18/12/2001 10:35:18]

CPTR425 Introduction to Networking

Evaluation
The course grade is determined by the quantity and quality of work completed on laboratory assignments, homework, and tests. The grade expectations document helps to explain the different grades. WEIGHT % & GRADES Labs 40% 90 - 100% As Homework 20% 80 - 89% Paper/report 10% 70 - 79% Tests 30% 60 - 69% Bs Cs Ds

You need good C, C++, or Java programming skills and can expect to put in 9-12 hours per week for the class (including lectures) and an additional 3-4 hours per week for the lab/project.

Resources
Lecture notes and schedule Networking Labs Books (Textbook in bold face): Comer, Douglas E. Internetworking with TCP/IP Vol.1: Principles, Protocols, and Architecture, 4/e PrenticeHall 2000. ISBN 0-13-018380-6 Peterson & Davie Computer Networks 2nd ed. Morgan Kaufman 2000 Mann, Scott Linux TCP/IP Network Administration Prentice Hall PTR 2000 Kurose & Ross Computer Networking Addison-Wesley 2001 Stallings, William Data & Computer Communications 6th ed. Prentice-Hall 2000 Tanenbaum, Andrew Computer Networks 3rd ed. Prentice-Hall 1996 Stevens, W. Richard TCP/IP Illustrated, Volume 1 The Protocols Addison-Wesley 1994 Wright & Stevens TCP/IP Illustrated, Volume 2 The Implementation Addison-Wesley 1995 Donahoo & Calvert The Pocket Guide to TCP/IP Sockets C version Morgan Kaufman 2001 Information theory Other References r Iren, Amer, & Conrad. (1999) The Transport Layer: Tutorial and Survey in ACM Computing Surveys Vol 31 # 4 Dec 1999 pp. 360-405. Usenet: Internet Engineering Taskforce (for RFCs) Technical Journals: CACM, Computing Surveys, JACM, TOCS, SigOPS, ACM SIGCOMM
http://cs.wwc.edu/~aabyan/425/ (2 de 3) [18/12/2001 10:35:18]

CPTR425 Introduction to Networking

Study Hints
q q q q

Ask questions in class (you are paying for it). At the first sign of difficulty, talk to your teacher. Form a study group and meet regularly. Construct chapter summaries noting concepts, definitions, & procedures.

Copyright (c) 2000 by Anthony Aaby. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at http://www.opencontent.org). Last Modified - . Comments and content invited [email protected]

http://cs.wwc.edu/~aabyan/425/ (3 de 3) [18/12/2001 10:35:18]

Introduction to Networking

CPTR 425 Introduction Networking - 4


The Networking Laboratories

The networking laboratory exercises are open labs meaning that they are unscheduled but are expected to require 30-40 hours of activity. The programming oriented labs should be done in pairs. More ambitious projects will require a team effort which will provide an opportunity for a variety of roles - excellent resume material. Several projects are available to cater to the goals and/or major of the student. Students are expected to commit to a project early in the quarter. Neither the textbook nor the lectures may cover enough material to complete the project. You are expected to determine what additional materials are needed and obtain them in sufficient time to complete the project. Students who would like to work on a different problem may propose an alternative project at any point in the quarter. The project must be well-defined, approved by the instructor, and involve roughly the same amount of work as the remaining assignments.

Major(s)

Project SPECIAL PROJECT SPRING 2001

Short Description Work with the compiler design class on the implmentation of Tel, a language for writing networking protocols. Gain experience in networking technologies Gain experience in network administration Gain exerience in programming with various networking APIs.

Grading

CS, CpE, SwE

CIS, Technology Network design & implementation CIS, CS CS, CpE, SwE Unix Network administration Microsoft Network administration Networking APIs
q q q q

Sockets TCP/IP API Java Networking API Perl Networking API

http://cs.wwc.edu/~aabyan/425/Labs.html (1 de 2) [18/12/2001 10:35:20]

Introduction to Networking

CS, CpE, SwE

Networking internals Simulation tools


q q

Design and implementation of networking protocals.

cnet network simulator The Network Simulator - ns-2

Copyright 1999 Anthony A. Aaby -- All rights reserved

Last Modified
Send comments to [email protected]

http://cs.wwc.edu/~aabyan/425/Labs.html (2 de 2) [18/12/2001 10:35:20]

Introduction to Networking

CPTR 425 Introduction Networking - 4


Schedule and lecture notes

Week Lecture Notes 1 Preliminaries Foundation

Reading Chapter 1

Assignment
p. 60

1. 2. 3. 4.

5, 6 11-13 15-21 28-30

Sockets programming

Direct Link Networks (physical layer)


Frohne - Information theory Thompson - error detection & correction

p. 156 Chapter 2 except 2.2, 2.9


q q q q

1 of #s 1-3 1 of #s 4-8 2 of #s 9-32 2 of #s 33-45

Alternate assignment: provide complete documentation for one of the Linux ethernet drivers

3 4 5

Packet Switching (data link layer) Internetworking IP (network layer)


Anderson - Internet telephony

Chapter 3 except 3.4 Chapter 4 except 4.4 Chapter 5

switching p. 235 # 1, 2, 3, 4, 12, 13 router p. 354 # 12, 13, UDP TCP RPC p. 433 # 49

End-to-end protocols (transport layer)

6 7

Congestion control and resource allocation End-to-end data (presentation layer)


7.1 Presentation formatting

Chapter 6 optional Chapter 7

http://cs.wwc.edu/~aabyan/425/Schedule.html (1 de 2) [18/12/2001 10:35:24]

Introduction to Networking

Network security
8.4 Firewalls

Chapter 8

p. 619 #s 22-26 alternate assignment OpenSSH attacks monitoring firewall DNS SMTP MIME HTTP SNMP RTP

Applications (application layer)

Chapter 9

Copyright 1999 Anthony A. Aaby -- All rights reserved

Last Modified
Send comments to [email protected]

http://cs.wwc.edu/~aabyan/425/Schedule.html (2 de 2) [18/12/2001 10:35:24]

CPTR435 Software Engineering

CPTR435 Software Engineering - 4


Invitation to submit projects

Bulletin Description: Study of the issues involved in building large software systems. Topics include the methods, languages, and tools used in contemporary software development, including software process models, project management, software metrics, software analysis and design, verification and validation, object-oriented concepts, professionalism and ethics. Prerequisites: CPTR 143, 221. This course follows a project-based organization rather than the traditional lecture-lab organization. It is immersion style in that students learn software engineering concepts by participating in all phases of a software engineering project and are assigned a variety of roles. All class members are expected to spend 120 hours (12 hours/week) on this course. Goals:
q

The primary goal of the course is to experience the types of written communication that are found in large software engineering projects. The secondary goal is that upon completion of the course students will r have been exposed to important issues in software engineering by s solving real problems s described by real clients s with real tools s under real constraints; r have clocked 120 hours (12 hours/week) on the project.

Consistent with peer review practice in academia, the source code for software developed for this course must be available to all class members and if desired may be protected by one of the approved open source licenses unless prior arrangement is made for a more restricted copyright protected by an NDA.

Resources
Lecture notes and schedule Projects Books: (Textbook in bold face): Bruegge & Dutoit, Object-Oriented Software Engineering Prentice-Hall 2000 Beck, Kent Extreme Programming Explained: Embrace Change Addison Wesley Longman 2000
http://cs.wwc.edu/~aabyan/435/ (1 de 3) [18/12/2001 10:35:34]

CPTR435 Software Engineering

Beck & Fowler Planning Extreme Programming Addison-Wesley 2000 Moore, James W. Software Engineering Standards: A User's Road Map IEEE Computer Society Press 1997 Software Engineering Standards Committee (SESC) IEEE Standards Software Engineering Vols 1-4 IEEE 1999 Jefferies, Anderson, & Hendrickson Extreme Programming Installed Addison-Wesley 2000 Hunt, Thomas, Cunningham The Pragmatic Programmer: From Journeyman to Master Addison-Wesley 1999 Page-Jones, Meilir Fundamentals of object-oriented design in UML Addison-Wesley Longman Pub Co 2000 Sandred, Jan. (2001) Managing Open Source Projects: A Wiley Tech Brief Wiley 2001. Sommerville, Ian Software Engineering 6e Addison-Wesley 2000 Schach, Stephen, R. Classical and Object-Oriented Software Engineering McGraw-Hill 1999 Humphrey, Watts Introduction to the Personal Software Process Addison-Wesley 1997.) PSP Scripts and forms are available. Humphrey, Watts Introduction to the Team Software Process Addison-Wesley 2000.) see Supplements. TSP Scripts and forms are available. Forms Internet r UML Zone r Rational r SWEBOK r Extreme Programming and The Agile Alliance r Aspect Oriented Software Development Articles r Louridas & Loucopoulos (2000) A Generic Model for Reflective Design ACM Transactions on Software Engineering and Methodology Vol 9 # 2 April 2000 pp. 199-237. Usenet: comp.se Technical Journals: CACM, Computing Surveys, JACM,

Evaluation
Each student is expected to construct a portfolio containing r his/her resume r copies of all weekly time cards and activity logs r copies of all performance reviews r copies of a software and documentation r a self review The course grade is determined by the quantity and quality of work completed on assigned deliverables, complete time card (with date, time, and activity), and performance reviews.

http://cs.wwc.edu/~aabyan/435/ (2 de 3) [18/12/2001 10:35:34]

CPTR435 Software Engineering

GRADING WEIGHTS Time cards Deliverables

LETTER GRADES

10% As 90 - 100% 50% Cs 70 - 79% Ds 60 - 69% F Fired

Performance Reviews 40% Bs 80 - 89%

Study Hints r Ask questions in class (you are paying for it). r At the first sign of difficulty, talk to your teacher. r Form a study group and meet regularly. r Construct chapter summaries noting concepts, definitions, & procedures.

Copyright (c) 2001 by Anthony Aaby. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at http://www.opencontent.org). Last Modified - . Comments and content invited [email protected]

http://cs.wwc.edu/~aabyan/435/ (3 de 3) [18/12/2001 10:35:34]

Software Engineering - Student Projects

Software Engineering - Student Projects


Students undertake team projects at various points in the course of their studies. Clients for these projects come from a variety of external and internal sources. The team must identify the requirements and write the specification for the software, design and code the solution for the system, test and install it, and provide all relevant documentation. You can find out more information about having your project taken on by our students. You must complete a project proposal form.

http://cs.wwc.edu/Projects/ [18/12/2001 10:35:38]

Software Engineering

CPTR435 Software Engineering - 4


Lecture notes and schedule

This schedule is subject to change.

Week Milestones 1 Course Orientation

Assignments Course initiation Initial Assignment Textbook Project Management Requirements Engineering Realtime SE Course steady state

Training SE Overview Software Life Cycle Knowledge Areas Project Management

Requirements Elicitation Project Communication CASE Tools Collaboration Env System Design Modeling & UML

The Project Alternative Projects Software Configuration Management

4 5 6 7 8 9 10 11 Report: Report: Report: Course termination Collection of student portfolios Course evaluation discussion Object Design Rationale Management Testing

http://cs.wwc.edu/~aabyan/435/Schedule.html (1 de 2) [18/12/2001 10:35:40]

Software Engineering

Copyright (c) 2000, 2001 by Anthony Aaby. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at http://www.opencontent.org). Last Modified - . Comments and content invited [email protected]

http://cs.wwc.edu/~aabyan/435/Schedule.html (2 de 2) [18/12/2001 10:35:40]

Projects

Group Projects
Projects are designed to give students some experience of group work. Ideally groups should have a mix of personalities, abilities, and sexes. Students may be assigned to groups rather than being left to choose their own groups. Groups will have to find time for group meetings and collaborative work. One goal of group projects is to illustrate the problems of group working and, sometimes, personality clashes arise. Depending on the individuals involved, the instructor may step in and resolve outstanding issues or may simply leave the group to sort out its own problems. An aspect of software engineering which students find unsettling is the fact that system users and procurers usually have a vague and potentially contradictory set of requirements. The approach adopted by this instructor is to act as a user and deliberately be vague, contradictory and present impossible requirements. Individual assessment is more difficult for group projects. Students should realize that education is more important than assessment. Individuals within groups will be assessed independently of the group project and assessment may include input from group members. The final individual grade will be based both on individual assessment and the project grade.

Project deliverables
Design projects
Design projects are very general projects which are not implementable in the time and with the resources available. They may be large applications, require access to special hardware, or may require detailed domain knowledge to complete the implementation. It is intended that students construct high-level specifications and designs of such systems. The aim of the work is to illustrate the problems of writing specifications and designs. It may be possible to prototype parts of the system. The documents which might be produced are:
q q q q

A requirements definition and (partial) specification. An outline architectural design. A project plan and schedule. A prototype of part of the system user interface.

Term projects
http://cs.wwc.edu/~aabyan/435/Projects.html (1 de 3) [18/12/2001 10:35:44]

Projects

Term projects are smaller scale projects that a student or group might take through from initial specification to implementation. The documents which might be produced are:
q q q q q q q q q q q

A requirements specification which expands the outline below in more detail. A formal specification for part of the project. An outline architectural design. A detailed design specification. A test specification. A user manual and associated help frames. A project plan and schedule setting out milestones, resource usage and estimated costs. A quality plan setting out quality assurance procedures An implementation. A source tree to support iterative development. A baseline release package with configuration files, data files, an installation program and complete documentation.

So that students in later years can understand the standard of work that is expected of them, each group must produce 1. a poster presentation describing their work, 2. a web site which describes and contains their work and, time permitting, 3. a downloadable package of the product and an installation guide. The department will display the posters and host the web site.

Design Projects Term Projects


q q q

q q q

E-commerce web site. Web based voting system for the WWC governance system.(Winter 2001) Collaboration Portal/ASP (Winter 2000) r Distance learning r SE project Development Environment for WWC WWC student records database Test item banking/generation/scoring/analysis with support for multiple teachers and classes. Suggestion, modify the web based voting system for the WWC governance system. Should include: r support for graphics and mathML

http://cs.wwc.edu/~aabyan/435/Projects.html (2 de 3) [18/12/2001 10:35:44]

Projects

q q q q

online testing and scoring Browser based email tool Pattern database, catalogue & browser web based network monitor - performance, conectivity, etc. Report on an article in IEEE Transactions on Software Engineering.
r

Project suggestions
q q q q q q q q q

Compiler design Database Operating systems Application for a mobile computing platform Networking Software engineering System software and programming Senior seminar See also Sommerville's Instructor's Guide

Copyright (c) 2000 by Anthony Aaby. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at http://www.opencontent.org). Last Modified - . Comments and content invited [email protected]

http://cs.wwc.edu/~aabyan/435/Projects.html (3 de 3) [18/12/2001 10:35:44]

Personal Software Process

Personal Software Process (PSP)


Personal Software Processes (for details see Humphrey, Watts Introduction to the Personal Software Process Addison-Wesley 1997.)

Forms Time Management Time Recording Log Weekly Activity Summary Job Number Log Software Quality Management

Instructions & Scripts

Job Number Log Instructions PSP Process Script

PSP Project Plan Summary

PSP Project Plan Instructions Code Review Script

C++ Code Review Guidelines and Checklist C++ Coding Standard Defect Type Standard Defect Recording Log Defect Recording Log Instructions

Copyright (c) 2000 by Anthony Aaby. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at http://www.opencontent.org). Last Modified - . Comments and content invited [email protected]

http://cs.wwc.edu/~aabyan/435/PSP/ [18/12/2001 10:35:49]

Software Development Script

Software Development Script


Purpose Entry Criteria To guide a team though developing a software product.
q q q

A needs statement Materials, facilities, and resources for team support. A development team

General Step Acitivities Launch 0 Strategy


q

Description
q

Assign teams and roles. Produce the conceptual design, establish the development strategy, make size estimates, and assess risk. Produce the team and engineer plans. Define and inspect the requirements. Produce the system test plan and support materials. Produce and inspect the high-level design. Produce the integration test plan and support materials Produce the unit test plan and support materials. Implement and inspect the code. Build, integrate, and system test. Produce user documentation Conduct a postmortem and write final report. Produce role and team evaluations Completed product or product element and user documentation Completed and updated project note book. Documented team evaluations and cycle reports.

Planning

Requirements

Design

Implement

Test

Postmortem

Exit criteria

q q

http://cs.wwc.edu/~aabyan/435/TSP/ [18/12/2001 10:35:54]

Software Engineering Tracks

CAUTION: an internal study document, is not intended to represent future plans.

Software engineering tracks & a new course in project management


Document status: internal planning Last Modified - . Comments and content invited [email protected]

This is a study of the possibility of an introductory course in software engineering to meet the needs of CIS, SE, & CpE majors. It is based on selected chapters Sommerville, Ian. Software Engineering 6th ed. (text currently in use for CPTR 435 and one of the leading software engineering texts) and the IS '97 curricular guidelines. The course would include projects tailored to the needs of the different majors. Note: the Sommerville text is designed to support a variety of courses including a year long sequence. SE Tracks Overview Introduction Computer-based system engineering Software processes Project management Requirements Software requirements System models Software prototyping Formal specification Design Architectural design Distributed systems architectures a x x x x a x x
6.4

SE Project CIS SE CpE Management a a a x x x x x x x

Requirements engineering processes a, d

http://cs.wwc.edu/~aabyan/435/tracks.html (1 de 3) [18/12/2001 10:36:01]

Software Engineering Tracks

Object-oriented system design Real-time software design Design with reuse User interface design Critical systems Dependability Critical systems specification Critical systems development Verification and validation Verification and validation Software testing Critical systems validation Management Managing people Software cost estimation Quality management Process improvement Evolution Legacy systems Software change Software re-engineering Configuration management Project Implementation The CIS track
q

x x x x x x x x x x x x

d d d d

x x x x x x x

x x x

q q

IS '97 calls for a four course sequence 1. IS '97.7 Analysis and Logical Design (prerequisite IS '97.3 Information Systems Theory and Practice) 2. IS '97.8 Physical Design and Implementation with DBMS (prerequisite IS '97.7) 3. IS '97.9 Physical Design and Implementation with Programming Environments (prerequisite IS '97.8 and IS '97.5 Programming, Data and Object Structures) 4. IS '97.10 Project Management and Practice (prerequiste IS '97.7, corequisites IS '97.8, IS '97.9) a - designates topics for IS '97.7 d - designates topics for IS '97.10

http://cs.wwc.edu/~aabyan/435/tracks.html (2 de 3) [18/12/2001 10:36:01]

Software Engineering Tracks

Observations
q

Sommerville text, with supplementation with a DBMS text, could cover the IS '97.7-10 sequence. CPTR 235 System Software and Programming covers much of the same technical material as IS '97.7, IS '97.8 and IS '97.9 but includes much additional material assumed to be of little interest to CIS majors. After six courses, (end of sophomore year) CS majors have a broad range of entry level programming skills. CPTR 415 Introduction to Databases covers the DBMS material of IS '97.7, IS '97.8 and IS '97.9 at a greater depth and would be an appropriate course for CIS majors wanting additional theoretical background or for MBA students with an undergraduate CIS concentration. CPTR 435 Software Engineering covers much the same management and human factors material as IS '97.7, IS '97.8 and IS '97.9 however, it lacks the business and DBMS focus of the IS sequence. For CE and CpE majors, it provides a systematic description of the discipline of software engineering. IS '97.10 Project Management, is not available at WWC.

Conclusions
q

The proposed BS-SE major could include the IS sequence as an option. However, a common software engineering course does not seem practical for CIS, SE, & CpE majors for the following reasons. r The IS sequence is best suited to meeting the needs of CIS majors. r The IS sequence has too specific a focus for SE and CpE majors. r Conversely, the CPTR courses may be too general for the typical CIS major. A project management course should be made available to CIS and SE majors. However, a common course for CIS and SE majors does not seem possible given that the IS sequence is tightly integrated. Scheduling a common course may be difficult. A project management course for SE majors that would not require additional instructional resources could be developed as follows: r It would be offered at the same time as CPTR 435 with the same instructor. r Its students would be required to manage the CPTR 435 project. r It should have limited enrollment (projects should have fewer managers than developers). r It should require a term paper. r Concurrent enrollment with CPTR 435 should be permitted only if it is possible to prevent conflict between the roles of developer and project manager i.e. there should be at least two projects to permit separation of roles.

http://cs.wwc.edu/~aabyan/435/tracks.html (3 de 3) [18/12/2001 10:36:01]

Software Engineering

DRAFT - Last update:

BS - Software Engineering
A curriculum proposal based on the IEEE-CS/ACM Education Task Force Accreditation Guidelines STATUS Added an internship requirement 5/5/2000 Circulated for comment to EE, CS, BUS, Tech 4/21/2000 Dropped internship requirement Elaborated math and science requirements 11/30/2000 Reviewed math-science requirements 1/23/2001 Approved by CS faculty Approved by EE faculty -

Mission Statement The mission of the software engineering program is to produce graduates which know, understand, and can use the theories, methods and tools which are needed to develop high quality, large and complex software in a cost effective way on a predictable schedule and are prepared to participate in the development of a broad range of software products. Proposed curriculum Senior students are required to take the MFAT exam in Computer Science.

SE major - BS degree 192 hours Computer Science & Engineering - 37 hours Introduction to Programming CPTR 141 CPTR 142, 143 Data Structures and Algorithms Assembly Language Programming CPTR 215 Programming Paradigms CPTR 316 Design and Analysis of Algorithms CPTR 352 CPTR 425 Introduction to Networking CPTR 454 Operating System Design ENGR 121-123 Introduction to Engineering Software engineering - 34 hours
http://cs.wwc.edu/Academic/SE.html (1 de 4) [18/12/2001 10:36:04]

CrHr 4 4,4 3 4 4 4 4 6

Software Engineering

CPTR 235 CPTR 245 CPTR 415 CPTR 435

System Software & Programming Object-Oriented System Design Introduction to Databases Software Engineering Software engineering electives Engineering Economy ENGR 326 Contracts and Specifications ENGR 345 Seminar ENGR 396 ENGR 496-498 Seminar Colloquium ENGR 495 Applications and Advanced materials - 36 hours Math & science electives Zero or more hours CPTR, ENGR, INFO electives

4 4 4 4 10 3 2 0 3 0 8 0-12

One or more area (of 12+ hours each ) 12-24 For example: Computer science (beyond requirement) Engineering (beyond requirement) Mathematics (beyond requirement) Science (beyond requirement) COMM 275 Communication Theory 2 PSYC 425 Cognitive Psychology 4 Supporting Areas - 39 hours ENGL 121-2 College Writing 6 ENGL 323 Writing for Engineers 3 SPCH 101 Fund. of Speech Communications 4 SPCH 207 Small Group Communications 3 MATH 206 Applied Statistics 4 MATH 250 Discrete Mathematics 4 MATH 181 Analytic Geom & Calc I, II 8 MATH 289 Linear Algebra and Applications 3 PHIL 206 Intro to Logic 4 General studies - 50 hours H&PE electives 2 PSYC 130 History electives 8 General Psychology 4 Humanities electives 8 PHYS Religion electives 16 General or Prin of Physics 12 192 Courses may not be used to satisfy multiple requirements.
http://cs.wwc.edu/Academic/SE.html (2 de 4) [18/12/2001 10:36:04]

Software Engineering

Electives and application areas


Students in consultation with their advisors will select 10 hours of software engineering electives, 8 hours of math and science electives and 12-24 hours of application area electives. The details remain to be worked out but some obvious choices include numerical applications in science and engineering, embedded systems (especially the exploding market for wireless devices), and computing infrastructure (compilers, computer networks, operating systems and other system software). All of the electives and application area courses will be selected from current courses, internships (coop credit) and team projects.

Math-science requirement
ABET requires one year of mathematics and science i.e., 48 quarter hours. The proposed implementation is as follows: Area
(23 hours) Science (16 hours) Electives (8 hours)

Classes
Calculus I, II, Linear Algebra, Logic 12 hours of General or Principles of Physics 4 hours of General Psychology Science electives: Astronomy, Biology, Chemistry, Physics, Psychology Math electives: any college level mathematics course

Rationale
ABET Curricular support Traditional bias To support HCI

Mathematics Discrete, Applied Statistics

ABET

Differences with current programs


1. BS-SE, BS-CIS differences r BS-SE requires a maximum of 24 hours of non CIS business courses and permits upto another 12 hours for a total of 36 hours while BS-CIS requires 59 hours. Note that event the BA-BA requires 59 hours of non CIS business courses. r BS-SE requires at least 64 hours of computing course work while BS-CIS requires 48 hours. r BS-SE degree requires 48 hours of math and science while the BS-CIS requires 20 hours. r Informal data collected over nine years suggests that students migrate from the BS-CS (software option) toward CIS and not vice versa. 2. BS-SE, BS-CS differences r BS-SE has no free electives. BS-CS has 33 hours of free electives and there is more elective choice in general studies. 3. BS-SE, BSE-CpE differences r BS-SE requires 55 hours of general studies hours of general studies while the BSE-CpE
http://cs.wwc.edu/Academic/SE.html (3 de 4) [18/12/2001 10:36:04]

Software Engineering

r r

requires 44. BSE-CpE requires 29 hours of engineering courses not required in the BS-SE. BS-SE requires 48 hours of math and science while the BSE-CpE requires 55.

Send comments to [email protected]

http://cs.wwc.edu/Academic/SE.html (4 de 4) [18/12/2001 10:36:04]

Parallel and Distributed Computation

CPTR 460 Parallel and Distributed Computation -- 4


Check back frequently, this page is under construction.

Syllabus Topics
Week 1 Topic/Lecture Notes PART I Introduction Hardware Performance Andrews Message Passing Introduction to MPI Debugging Your Program Independent parallelism Partioning & Divide&Conquer Strategies Pipelined computations Synchronous computations Load balancing & termination detection Reading Assignment Due 1/14

PP 1 p. 36 1.1-1.5, 1.7, 1.12, 1.13 PL: CP

p. 80 2,2 or 2.3, 2.4-2.7 PP 2 PL: CP any one p. 102 3.1-3.5, 3.7-3.10, 3.12, 3.14 2, one integration, one n-body p. 133 4.8-4.21, 4.23 any one p. 158 5.1-5.6, 5.8-5.10, 5.12, 5.13 any one p. 191 6.13-6.20, 6.22, 6.23

1/21

3 4 5 6 7

PP 3 PP 4 PP 5 PP 6 PP 7

1/28

2/11 2/18

http://cs.wwc.edu/~aabyan/460/ (1 de 3) [18/12/2001 10:36:09]

Parallel and Distributed Computation

Hand in fully functioning hard copies of


q q

2/21

q q

1 problem from 3 2 problems from 4: one integration, one n-body 1 problem from 5 1 problem from 6

with full documentation and full attribution of source and assistance. Be prepared to explain each line of code and alternative designs. Final Shared memory PART II 8-10 Project

PP 8-12 Choose any three chapters and convince us that you understand and can apply the content.

Communication Patterns Grouping Data Communicators and Topologies I/O Design and Coding Appendix Parallel Patterns Obsolete Principles of Concurrency Axioms of Flow-correctness Additional concepts
q q q

FOPP 2 FOPP 3

Protocols Fundamental Algorithms Fault Tolerance

Resources
q q q

UNCC Web pages MPI Forum, MPI at ANL HPF - need to find a free version

http://cs.wwc.edu/~aabyan/460/ (2 de 3) [18/12/2001 10:36:09]

Parallel and Distributed Computation


q q q q

BLAS - need to find a source LAPACK - need to find a source NAG PETSc

Outdated resources
q q

PCN (Parallel composition notation) SR (Synchronizing resources)

Copyright 1998 Anthony A. Aaby -- All rights reserved

Last Modified
Send comments to [email protected]

http://cs.wwc.edu/~aabyan/460/ (3 de 3) [18/12/2001 10:36:09]

Parallel and Distributed Computation

CPTR 460 Parallel and Distributed Computation 4


Description
Concurrency and synchronization; architectural support; programming language constructs for parallel computing; parallel algorithms and computability; messages vs. remote procedure calls vs. shared memory models, structural alternatives (e.g., master-slave, client-server, fully distributed, cooperating objects); coupling (tight vs. loose); naming and winding; verification, validation, and maintenance issues; fault tolerance and reliability; replication and avoidability; security; standards and protocol; temporal concerns (persistence, serializability); data coherence; load balancing and scheduling; appropriate applications. Prerequisites: CPTR 143, MATH 289. Offered odd years only. The course will be conducted in a study group setting with group discussion of the reading assignment and presentations of solutions to the design problems posed by the assigned problems. The laboratories explore the implementation of parallel algorithms using MPI

Goals
The goals for this course include:
q q q q q

understanding the various models of parallelism knowing how to design parallel algorithms being able to analyze the performance of parallel algorithms be proficient in parallel programming in at least one environment. ...

Resources
Textbooks: Wilkinson & Allen (1999) Parallel Programming Prentice-Hall Additional material Thomas L. Sterling, John Salmon, Donald J. Becker, Savarese, Daniel F. Savarese. How to Build a Beowulf: A Guide to the Implementation and Application of PC Clusters MITPress Gregory R. Andrews (2000) Foundations of Multithreaded, Parallel, and Distributed Programming Addison-Wesley Pacheco, Peter (1996) Parallel Programming with MPI Morgan Kaufmann

http://cs.wwc.edu/~aabyan/460/Syllabus.html (1 de 2) [18/12/2001 10:36:11]

Parallel and Distributed Computation

Pfister, Gregory F (1998) In Search of Clusters Prentice-Hall PTR Other Books: r Akl, S. G. (1989) The Design and Analysis of Parallel Algorithms Prentice-Hall -- Focus is on algorithms r Ben-Ari, M., (1990) Principles of Concurrent and Distributed Programming Prentice-Hall r Chandy, K.M. & Taylor, S., (1992) An Introduction to Parallel Programming with PCN Jones and Bartlett -- Design methodology r Cosnard, M. & Trystram, D., (1995) Parallel Algorithms and Architectures International Thomson Computer Press r East, Ian, (1995) Parallel Processing with Communicating Process Architecture UCL Press r Hartly, S.J., (1995) Operating Systems Programming Oxford Univ. Press r Lester, B.P. (1993) The Art of Parallel Programming Prentice-Hall r Lewis, T.G. & El-Rewini, H. (1992) Introduction to Parallel Computing Prentice-Hall r Quinn (1994) Parallel Computing: Theory and Practice McGraw-Hill, New York, New York r Foster, Ian (1995) Designing and Building Parallel Programs Addison-Wesley Language Manual: Foster & Tuecke Parallel Programming with PCN Andrews, G.R. & Olsson, R.A., (1993) The SR Programming Language Benjamin Cummings Reading List: Languages HPF: High performance Fortran MPI: the Message-Passing Interface standard WWW: http://remarque.berkeley.edu/~muir/free-compilers/ Usenet News Groups: comp.parallel, comp.parallel.pvm, comp.lang.hermes Technical Journals: ACM: TOCS, TOMACS, TOMS, TOPLAS, TOSEAM, Computing Surveys, Communications of the ACM, Journal of the ACM Reading List
q

Kormicki et al (1997) Parallel Logic Simulation on a Network of Workstations Using a Parallel Virtual Machine ACM DAES 2, 2 (April 1997), 123-134.

Grading

Copyright 1998 Anthony A. Aaby -- All rights reserved

Last Modified
Send comments to [email protected]

http://cs.wwc.edu/~aabyan/460/Syllabus.html (2 de 2) [18/12/2001 10:36:11]

Introduction

Introduction/Motivation
Black type indicates current course content. Red type indicates optional material.

Motivational Examples
q

q q

Grand challenge problems r Global weather forecasting r Modeling DNA structures r Astrophysical N-body simulation Idea: With n computers a problem could be computed in 1/n th the time. Fox's Wall -- How fast can we build a brick wall?

What is a parallel computer? A parallel computer is either a single computer with multiple internal processors or multiple interconnected computers. What is parallel programming? A parallel program is a program written to take advantage of a parallel computer. In execution a paralle program is a collection of processes connected to one another through either message-passing or access to shared data.
q q q

Trivially parallel: processes operate independently. Control-flow: more than one thread of control (different operations in parallel) Data-parallel -- (Example: brick laying)

Why study parallel programming?


q q q q

Computer architecture: pipelining (multiple steps), super-scalar (multiple instructions) Compiler design Parallelism is natural and sequential programming is artificial. Quest for speed

How can we build parallel programs?


q q

"Genius compiler" but can it replace a sequential binary search with a parallel linear search? Rewrite all code from scratch

http://cs.wwc.edu/~aabyan/460/Introduction.html (1 de 4) [18/12/2001 10:36:14]

Introduction
q

Write new code.

At what levels can we study parallel and distributed programming?


q q q

Design of parallel programs (fundamental concepts). Analysis of parallel algorithms (analytic measures of performance). Implementation of parallel constructs (hardware).

What is this course is about? The design and construction of parallel programs. 1. Fundamental constructs for the expression of parallelism. 2. Analytical measures of performance. 3. Machine independence (because hardware is so variable). N processors and an interconnection network. 4. Language independence (because language design has not stabilized). 5. Concepts: r fine (statement level) and large (procedure level) grained parallelism r data distribution r synchronization r tasking r allocation of tasks to processors r trade-off between communication and computation How do we do parallel problem solving? 1. Understand Parallel Hardware 1. Hardware: interconnect processors and memory modules 2. System Software: design and implement system software 2. Problem Solving 1. Problem: Design algorithms and data structures 2. Partition the algorithms and data structures into subproblems 3. Identify the communication requirements 4. Assign subproblems to processors and memory modules.

Distributed Systems
A distributed system is an interconnected collection of autonomous computers, processes, or processors. The computers, processes, or processors are referred to as the nodes of the distributed system. The characteristics of a distributed system include

http://cs.wwc.edu/~aabyan/460/Introduction.html (2 de 4) [18/12/2001 10:36:14]

Introduction
q q q q q

Resource sharing Information exchange Increased reliability through replication Increased performance through parallelization Simplification of design through specialization

Computer Networks Differences between wide-area and local-area networks


q q q q

Reliability parameters (low, high) Communication time (slow, fast) Homogeneity (low, high) Mutual trust (low, high)

Wide-area networks (point to point): Algorithmical issues


q q q q q

Reliability of point-to-point data exchange Selection of communication paths (routing) Congestion control Deadlock prevention Security

Local-area networks: Algorithmical issues


q q q q q q q

Broadcasting and synchronization Election Termination detection Resource allocation Mutual exclusion Deadlock detection and resolution Distributed file maintenance

Multiprocessor computers: Algorithmical issues


q q q q

Implementation of a message-passing system Implementation of a virtual shared memory Load balancing Robustness against undetectable failures

Cooperating Processes (shared memory)


q q q

Atomicity of memory operations The producer-consumer problem Garbage collection

http://cs.wwc.edu/~aabyan/460/Introduction.html (3 de 4) [18/12/2001 10:36:14]

Introduction

Primitives for shared memory system


q q q q

Semaphores Monitors Pipes Message passing

Software Architecture Distributed Algorithms


Differences between distributed and centralized algorithms
q q q

Lack of knowledge of global state Lack of global time-frame Non-determinism

Copyright 1998 Anthony A. Aaby -- All rights reserved

Last Modified
Send comments to [email protected]

http://cs.wwc.edu/~aabyan/460/Introduction.html (4 de 4) [18/12/2001 10:36:14]

Hardware

Parallel Computers
A parallel computer is either a single computer with multiple internal processors or multiple interconnected computers. Black type indicates current course content. Red type indicates optional material. Fox's Wall
q q q

Sequential Pipeline ...

Processes
q q q

Process: single flow of control through a set of instructions Processor: hardware device for executing Parallel computer: two or more processors connected through an interconnection network.

Flynn's Taxonomy System classification by number of instruction and data streams.


q

q q

q q

SISD: classical sequential von Neumann machine. Inherently sequential. Parallelism may be simulated by interleaving instructions & multiprogramming. Pipelining and vector architectures SIMD: synchronous since there is a single instruction stream, each processor has its own data stream. Matrix operations are a good example. Thinking Machines - CM, Maspar Computer Corp -- MP (single sequencing units) MISD: does not seem to be useful MIMD/SPMD: asynchronous processes but with occasional pauses to synchronize; Intel iPSC, nCUBE, Sequent Symmetry, SGI Onyx, SUN MP system r shared-memory (sometimes called multiprocessors) locking and protection mechanism r distributed-memory (sometimes called multicomputers) message passing SPMD - single program multiple data - the program may be partitioned so that some parts are executed by certain computers and not others.

Shared Memory Multiprocessor System (MIMD) Shared memory multiprocessor systems have multiple processors but memory is a single address
http://cs.wwc.edu/~aabyan/460/Hardware.html (1 de 4) [18/12/2001 10:36:16]

Hardware

space.
q q q q q

SMP - symmetric multiprocessing Bus-based architectures Cache coherence -- for bus based systems use the snoopy protocol Switch-based architectures, crossbar switch NUMA - nonuniform memory access

Distributed-Memory (MIMD) - message passing Key issues in network design


q q q q q

bandwidth - bits/second latency - total time to send a message cost diameter - minimum number of links between the two farthest nodes in the network bisection width - number of links (or wires) that must be cut to divide the network in two halves. Used to determine minimum number of messages that must be transmitted.

Connection schemes - often related to the structure of an algorithm


q

q q q

Static interconnection networks - direct physical links between computers. r completely connected - impractical for engineering and economic reasons when n is large. r array s linear array, ring - pipelined computations s 2D, torus & 3D mesh - scientific and engineering problems with a natural mesh structure r hypercube - diameter is log n 2 r bus r embedding - a mapping of node of one network onto another network. Dynamic interconnection networks Clusters NOW - networks of workstations

Communication and routing


q

q q

message transmission r circuit switching - establish a path and maintain the links until the communication is complete r packet switching - break message into packets and packets flow through the network r wormhole routing livelock - message circulates without reaching destination deadlock - cycle of waiting packets

http://cs.wwc.edu/~aabyan/460/Hardware.html (2 de 4) [18/12/2001 10:36:16]

Hardware

I/O Network of Workstations (NOWs) and Clusters of Workstations (COWs) 1. Very high performance at low cost 2. Easy to upgrade 3. Based on existing software Interconnection
q q q q

Performance issues Ethernet bus - thick net, thin net, hubs Switched ethernet Multiple ethernets

Software Issues
q q

q q q

process creation -- static, dynamic Programming paradigms r Shared-memory programming s critical section s mutual exclusion s binary semaphore s barrier r Message passing s send, receive s synchronous s asynchronous, buffered s blocking and nonblocking communication Data parallelism RPC, client-server Data mapping and load balancing r block mapping r cyclic mapping r block-cyclic mapping

Resources MPI Complete Reference Using MPI Designing and Building Parallel Programs PETSc
http://cs.wwc.edu/~aabyan/460/Hardware.html (3 de 4) [18/12/2001 10:36:16]

Hardware

ScaLAPACK Algorithms Parallel - centralized control Distributed - distributed control/intelligence termination detection Computational Environment MPI - compiler & references HPF - compiler & references Algorithms Parallel Distributed Programming/Software Engineering Libraries Courses Fault Tolerant, Client-server, Network, sockets
Copyright 1998 Anthony A. Aaby -- All rights reserved

Last Modified
Send comments to [email protected]

http://cs.wwc.edu/~aabyan/460/Hardware.html (4 de 4) [18/12/2001 10:36:16]

Performance AnalysisPerformance AnalysisPerformance AnalysisPerformance AnalysisPerformance AnalysisPerformance Analysis

Performance Analysis (Complexity)


Background
The running time of this program is T(n) units if the input has size n. Problems 1. 2. 3. 4. 5. Clock time -- OS load dependent Execution time -- hardware dependent Number of statements -- language and compiler dependent Size of input -- may be order dependent (sorting) Communication -- I/O is orders of magnitude slower

Asymptotic analysis (order statistics - input has size n)


q q q q q q

average-case worst-case f(n) is an upper bound on running time T(n) is O(f(n)) iff for c and n0, T(n) <= cf(n) whenever n >= n0. g(n) is a lower bound on running time: T(n) is Omega(g(n)) iff there exists a constant c such that T(n) >= cg(n) infinitely often.

Common functions Name Running Time Function Order Example: n=256 (instructions) 1 microsec/instruction 1x10-6 sec/instruction

Constant time Log N time Linear time N Log N time Quadratic time

c a log n + b an + b a n log n + b n + c a n2 + b n + c

O(1) O(log log n) 0.000003 sec O(log n) O(n) O(n log n) O(n2) O(nk) 0.000008 sec 0.0025 sec 0.002 sec 0.065 sec 17 sec (k=3)

Log Log N time a log log n + b

Polynomial time a nk + ...

http://cs.wwc.edu/~aabyan/460/Performance.html (1 de 5) [18/12/2001 10:36:19]

Performance AnalysisPerformance AnalysisPerformance AnalysisPerformance AnalysisPerformance AnalysisPerformance Analysis

Exponential

a kn + ...

O(kn)

3.67x1061 centuries (k=2)

Processes
Granularity
q q q

= the size of a process (lines of code, number of instructions), = the size of the computation time between commmunications/synchronizations large granularity minimizes process startup time and communication times and reduces paralellism

A granularity metric : Computation/Communication ratio = Computation time / communication time = tcomp / tcomm Maximize ratio while maintaining an acceptable amount of parallelism.

Speedup Factor - S(n)


The measure of relative performance between multiprocessor system and a single processor system. t1 = time on one processor tn = time on n processors S(n) = speedup S(n) = Time on one processor / Time on n-processors; (S(n) = t1/tn ) S(n) = Time on one processor / Time on n-processor parallel system: (S(n) = t1/tp) S(n) = runtime of fastest serial algorithm / runtime of parallel algorithm on n-processors S(n) = O(sequential algorithm) / O(parallel algorithm) Linear speedup: S(n) = t1/(t1/n) = n is the maximum speedup. Superlinear speedup: S(n) > O(n) occurs where
q q q

serial algorithm is not optimal or there is a special feature of the multiprocessor system and can occur in search algorithms.

Overhead
1. Processor idle time 2. Extra computations appearing in parallel version, duplicate computations 3. Communication time

http://cs.wwc.edu/~aabyan/460/Performance.html (2 de 5) [18/12/2001 10:36:19]

Performance AnalysisPerformance AnalysisPerformance AnalysisPerformance AnalysisPerformance AnalysisPerformance Analysis

Amdahl's Law of Speedup


- constant problem size scaling
q q q q q

fs fraction of program that is inherently serial fp = 1-fs fraction of program that is inherently parallel ts = time of serial fraction tp = time of parallel fraction on n processors Time to run on n processors = serial time + parallel time i.e., r t = t + t n s p r t = f t + t f /n n s1 1 p Speedup r S(n) = t /t 1 n r S(n) = t /(f t + f t /n) 1 s1 p1 r S(n) = t /(f t + (1-f )t /n) 1 s1 s 1 r S(n) = n/(1 + (n-1)f ) s Maximum speedup S(n)n->inf = 1/fs r for f = 1/2, speedup is 2 s r for f = 5%, speedup is 20 s

Therefore we should work on providing fast single processor machines.

Efficiency
q

Efficiency = t1/ntn = 100xS(n) / n r if E = 1 then linear speedup r if E = 1/N then slowdown

Cost
q q q

Cost = (execution time)x(total number of processors used) Cost of sequential execution = t1 Cost of parallel execution = nt1/S(n) = t1/E

Scalability
Scalable algorithm: Speedup = O(n)

Gustafson-Barsis' Law
http://cs.wwc.edu/~aabyan/460/Performance.html (3 de 5) [18/12/2001 10:36:19]

Performance AnalysisPerformance AnalysisPerformance AnalysisPerformance AnalysisPerformance AnalysisPerformance Analysis

- time constrained scaling


q q

Amdahl's law does not model scalable algorithms since Speedup = O(1). Gustafson-Barsis r Recall f + f = 1 s p r S (n) = (f + nf )/(f + f ) = f + nf = n + (1 - n)f s s p s p s p s s for f = 50% and 20 processors, speedup is 10.5 s s for f = 5% and 20 processors, speedup is 19.05 s r Normalize T_N to 1; B as before T_1 = BT_N + N(1-B)T_N = B + (1-B)N -- serial + parallel times Speed-up = N - (N - 1)B -- substitution and rearrangement For B = 1/2, speedup is (N + 1)/2

q q q

Gustafson-Barsis' law models scalable algorithms since Speed-up = O(N)

Evaluating Parallel Programs


q

Parallel execution time r t parallel time = tcomputation + tcommunication r t startup = time to send a message without data r t data = time to send one data word r t communication = tstartup + n tdata Time complexity r Upper bound O(g(x)): f(x) = O(g(x)) iff there exists c > 0 & x > 0, such that 0 <= f(x) 0 <= cg(x) for all x >= x0 r Theta(g(x)) --- f(x) = O(g(x)) iff there exists c > 0, c > 0 & x > 0, such that 0 <= 0 1 0 c0g(x) <= f(x) <= c1g(x) for all x >= x0 r Lower bound Omega(g(x)): f(x) = O(g(x)) iff there exists c > 0 & x > 0, such that 0 <= 0 cg(x) <= f(x) for all x >= x0 Cost-optimal algorithms r n = number of processors r cost = nt parallel algorithm = ktsequential algorithm r Cost optimal if nt parallel algorithm = O(tsequential algorithm) Time complexity of broadcast/gather r Hypercube r Tree r Mesh r Workstation cluster - ethernet bus

http://cs.wwc.edu/~aabyan/460/Performance.html (4 de 5) [18/12/2001 10:36:19]

Performance AnalysisPerformance AnalysisPerformance AnalysisPerformance AnalysisPerformance AnalysisPerformance Analysis

Empirical methods
q q

Elapsed time Communication time measurement r time(x) send(... recv(... time(y) et = (y-x)/2 Profiling - histogram showing time spent on different parts of the program and is used to identify "hot spots" Optimizations

Definitions
q

Linear speedup: Speedup = O(N) (N is number of processors); isoefficiency -- E = O(1)) Overhead W(N) r Amdahl's law: Speedup = N/(BN + (1-B) + W(N)) = O(1/W(N)) r Gustafson-Barsis' law: Speedup = [N - (N - 1)B]/W(N) = O(N/W(N)) Scalable: Speedup >= O(N) Parallel-computable: Speedup = O(N) Quasi-scalable: Speedup >= 1 Amdahl Law Gustafson-Barsis Law Scalable W(N) <= O(1/N) W(N)<= O(1) Parallel-computable W(N) = O(1/N) W(N) = O(1) Quasi-scalable W(N) <= O(1) W(N) <=O(N)

q q q

Copyright 1998 Anthony A. Aaby -- All rights reserved

Last Modified
Send comments to [email protected]

http://cs.wwc.edu/~aabyan/460/Performance.html (5 de 5) [18/12/2001 10:36:19]

andrews

Threads, Distributed Systems, and Parallelism


Concurrency is the
q q

interleaved execution of atomic actions on a single processor or the parallel execution of atomic actions on multiple processors.

Concurrency is a property of execution. Communication is the exchange of information using


q q

shared variables and/or message passing.

Synchronization is the coordination of activity using


q q

mutual exclusion (& critical sections), and/or conditional synchronization.

Paradigms of concurrency
q

Multithreaded systems - shared memory with more processes than processors r Pthreads r Java r OpenMP r Cilk Distributed systems - distributed memory and processors r MPI r Java r Orca Parallel systems - data parallel applications where speedup is the primary goal

http://cs.wwc.edu/~aabyan/460/andrews.html (1 de 3) [18/12/2001 10:36:21]

andrews
r

HPF

Concurrency in Programming Languages: Recall: a program is a specification of a computation. A programming language is a notation for specifying computations.
q

Imperative languages require explicit constructs to specify concurrency, communication, and synchronization. Declarative languages provide implicit concurrency, communication, and synchronization so concurrency is a property of execution not of notation.

Programming patterns/paradigms for concurrency


q

General patterns of concurrency 1. data parallel (same task, different data) 2. task parallel (different tasks, same or different data) Application patterns 1. Iterative parallelism; e.g. matrix multiplication 2. Recursive parallelism; e.g. adaptive quadrature Note: the difference between iterative and recursive parallelism is one of style. 3. Producers and consumers (pipeline); e.g. unix pipes Note: sequential programs are producers and consumers whose stream consists of a single element. 4. Clients and servers; e.g. file systems 5. Interacting peers; e.g. distributed matrix multiplication Data Parallel Task Parallel Iterative Parallelism Recursive Parallelism Producers & Consumers Clients and servers Interacting peers x x x x x x

Multithreaded, distributed, and parallel models System Hardware Application

data parallel iterative parallelism Multithreaded shared memory; # processes > # processors recursive parallelism task parallel

http://cs.wwc.edu/~aabyan/460/andrews.html (2 de 3) [18/12/2001 10:36:21]

andrews

Distributed

distributed memory and processors

producer-consumer client-server interacting peers task parallel data parallel iterative parallelism recursive parallelism

Parallel Questions

multiprocessor with shared memory

1. Classify each application pattern in the appropriate general pattern.

http://cs.wwc.edu/~aabyan/460/andrews.html (3 de 3) [18/12/2001 10:36:21]

The Concurrent Programming

Concurrent Programming
The root of all successful human organization is co-operation not competition. Concurrent programming is characterized by programming with more than one process. Keywords and phrases Pipelines, parallel processes, message passing, monitors, concurrent programming, safety, liveness, deadlock, live-lock, fairness, communication, synchronization producer-consumer, dining philosophers.

There are several reasons for a programmer to be interested in concurrency: 1. To better understand computer architecture (it has a great deal of concurrency with pipelining (multiple steps) and superscalar (multiple instructions)) and 2. compiler design, 3. some problems are most naturally solved by using a set of co-operating processes, 4. A sequential solution constitutes over specification, and 5. to reduce the execution time. At the machine level, operations are sequential, if they occur one after the other, ordered in time. Operations are concurrent, if they overlap in time. In Figure 1, sequential operations are connected by a single thread of control while concurrent operations have multiple threads of control.

Figure 1: Sequential and Concurrent Operations Sequential operations: --O-O-O-O--> -O-OConcurrent operations: --| -O-O|--> -: thread

O: operation

Operations in the source text of a program are concurrent if they could be, but need not be, executed in parallel. Thus concurrency occurs in a programming language when two or more operations could be but need not be executed in parallel. In Figure 2a the second assignment depends on the outcome of the first assignment while in Figure 2b neither assignment depends on the other and may be executed concurrently.

Figure 2: Sequential and Concurrent Code a. not concurrent b. concurrent X := 5; Y := 3*X + 4 X := A*B + C; Y := 3*A + 7;

Concurrent programming involves the notations for expressing potential parallelism so that operations may be executed in parallel
http://cs.wwc.edu/~aabyan/221_2/PLBOOK/Concurrent.html (1 de 16) [18/12/2001 10:36:27]

The Concurrent Programming

and the techniques for solving the resulting synchronization and communication problems. Notations for explicit concurrency are a program structuring technique while parallelism is mode of execution provided by the underlying hardware. Thus we can have parallel execution without explicit concurrency in the language. We can have concurrency in a language without parallel execution. This is the case when a program (with or without explicit concurrent sections) is executed on a single processor. In this case, the program is executed by interleaving executions of the concurrent operations in the source text. Aside. The terms, concurrent, distributed and parallel have a been used at various times to describe various types of concurrent programming. Multiple processors and disjoint or shared store are implementation concepts and are not important from the programming language point of view. What matters is the notation used to indicate concurrent execution, communication and synchronization. Functional and logic programming languages do not necessarily need explicit specification of concurrency and, with a parallelizing compiler, may be executed on parallel hardware. It is important to note that the notion of processes is orthogonal to that of inference, functions and assignments. The two fundamental concepts in concurrent programming are processes and resources. A process corresponds to a sequential computation with its own thread of control. Concurrent programs are distinguished from sequential programs in that, unlike sequential programs, concurrent programs permit multiple processes. Processes may share resources. Shared resources include program resources -- data structures and hardware resources -- CPU, memory, & I/O devices. Aside. Processes which share an address space are called threads or light-weight processes. For some programming languages (C, C++) there are threads packages to permit concurrent programming. In other cases, the operating system (Microsoft Windows NT, Sun Solaris) provides system calls for threads. Processes which do not share an address space are called heavy-weight processes. The Unix family of operating systems provide a system call to allow programmers to create heavy-weight processes.

The Concurrent Nature of Systems


Co-operation
The Bakery. busy waiting, fairness, liveness The Secretary. scheduling, priority, co-operative multitasking, interrupts, competitive multitasking, pre-emptive multitasking The Secretarial Pool parallel tasking Geoffrey Fox's wall. the construction of a brick wall by a number of workers. Questions:
q q q q q q

How do we break down the task to extract maximum parallelism? Wow do we get the task done in the shortest possible time with a given number of workers. What is the minimum amount of supervision needed? Can all workers be kept equally busy? Does the task demand specialized workers? Can we maintain efficiency as either the size of the problem or the number of workers grows?

The Nature of Concurrent Systems


Abstraction Performance Communication

http://cs.wwc.edu/~aabyan/221_2/PLBOOK/Concurrent.html (2 de 16) [18/12/2001 10:36:28]

The Concurrent Programming

In the previous solution, it was assumed that the processes shared the address space and that synchronization was achieved by the use of monitor and condition queues. If the address spaces are disjoint, then both communication and synchronization must be achieved through message passing. There are two choices, message passing can be synchronous or asynchronous. When message passing is asynchronous, synchronization can be obtained by requiring a reply to a synchronizing message. In the examples that follow, synchronized message passing is assumed.

Behavior Synchronization and Communication


Two processes are said to communicate if an action of one process must entirely precede an action of a second process. Synchronization is related to communication. Live-lock may result if there are more than one waiting process and when the signal is received access is not granted fairly. Starvation: (live-lock) multiple processes waiting for access but access is not provided in a fair manner Coroutines. Real-time Programming language issues When message passing is asynchronous, synchronization can be obtained by requiring a reply to a synchronizing message. In the examples that follow, synchronized message passing is assumed. Communication commands in the guards. Most communication based programming languages permit input commands in the guards but not output commands. The asymmetry is due to the resulting complexity required to implement output commands in the guards. process Q; const qsize = 10; var head, tail : integer; queue : array[0..qsize-1] of integer; begin head,tail := 0,0; *[ head != tail, C?X --> C!queue[head]; head := (head + 1) mod qsize [] head != (tail+1) mod qsize, P?X --> queue[tail],tail := X, (tail + 1) mod qsize] end; process P; begin *[ true --> produce(X); Q!X] end; process C; begin *[ true --> Q!X, Q?X; consume(X)] end; begin [ P || C || Q ] end.

Nondeterminism
A program is deterministic if its evaluations on the same input it always produce the same output. The evaluation strategy might not always be unique.
http://cs.wwc.edu/~aabyan/221_2/PLBOOK/Concurrent.html (3 de 16) [18/12/2001 10:36:28]

The Concurrent Programming

A program is nondeterministic if it has more than one allowable evaluation strategy and different evaluation strategies lead to different results. A concept related to nondeterminism is parallel evaluation Parallel evaluation that does not involve interaction on the part of its subparts is called noninterfering parallelism. Processes which have disjoint address spaces cannot interfere with each other and thus can operate without fear of corrupting each other. For example, the two processes in [|| i:=1, j:=2] do not share an address space therefore, the assignments may take place in parallel. Another example of non-interfering processes is found in matrix multiplication. When two matrices are multiplied, each entry in the product matrix is the result of multiplying a row times a column and summing the products. This is called an inner product. Each inner produce can be computed independently of the others. Figure~\ref{cp:mm}

Figure M.N: Matrix Multiplication # multiply n by n matrices a and b in parallel # place result in matrix c # all matrices are global to multiply process multiply( i := 1 to n, := 1 to n) var inner_prod := 0 fa k := 1 to n -> inner_prod := inner_prod + a[i,k]*b[k,j] af c[i,j] := inner_prod end

is an example of a matrix multiplication routine written in the SR programming language. This particular example also illustrated dynamic process creation in that {\tt n$^2$} processes are created to perform the multiplication. In interfering parallelism, there is interaction and the relative speeds of the subparts can affect the final result. Processes that access a common address space may interfere with each other. In this program, [i:=1 || i:=2] the resulting value of $i$ could be either 1 or 2 depending on which process executed last and in this program, [i:=0;i:=i+1 || i:=2] the resulting value of $i$ could be either 1, 2 or 3. A language is concurrent if it uses interfering parallelism. Sequential programs are nearly always deterministic. A deterministic program follows a sequence of step that can be predicted in advance. Its behavior is reproducible and thus, deterministic programs are testable. Concurrent programs are likely to be nondeterministic because the order and speed of execution of the processes is unpredictable. This makes testing of concurrent programs a difficult task. The requirement for disjoint address space may be too severe a requirement. What is required is that shared resources may need to be protected so that only one process is permitted access to the resourse at a time. This permits processes to cooperate, sharing the resource but maintaining the integrity of the resource.

Mutual Exclusion

http://cs.wwc.edu/~aabyan/221_2/PLBOOK/Concurrent.html (4 de 16) [18/12/2001 10:36:28]

The Concurrent Programming

Often a process must have exclusive access to a resource. For example, when a process is updating a data structure, no other process should have access to the same data structure otherwise the accuracy of the data may be in doubt. The necessity to restrict access is termed mutual exclusion and involves the following:
q q q q q

At most one process has access If there are multiple requests for a resource, it must be granted to one of the processes in finite time. When a process has exclusive access to a shared resource it release it in finite time. When a process requests a resource it must obtain the resource in finite time. A process should not consume processing time while waiting for a resource.

There are several solutions to the mutual exclusion problem. Among the solutions are semaphores, critical regions and monitors.

Deadlock
Deadlock is a liveness problem; it is a situation in which a set of processes are prevented from making any further progress by their mutually incompatible demands for additional resources. For example, in the dining philosophers problem, deadlock occurs if each philosopher picks up his/her left fork. No philosopher can make further progress. Deadlock can occur in a system of processes and resources if, and only if, the following conditions all hold together.
q q q q

Mutual exclusion: processes have exclusive access to the resources. Wait and hold: processes continue to hold a resource while waiting for a new resource request to be granted. No preemption: resources cannot be removed from a process. Circular wait: there is a cycle of processes, each is awaiting a resource held by the next process in the cycle.

There are several approaches to the problem of deadlock. A common approach is to ignore deadlock and hope that it will not happen. If deadlock occurs, (much as when a program enters an infinite loop) the system's operators abort the program. This is not an adequate solution in highly concurrent systems where reliability is required. A second approach is to allow deadlocks to occur but detect and recover automatically. Once deadlock is detected, processes are selectively aborted or one or more processes are rolled back to an earlier state and temporarily suspended until the danger point is passed. This might not an acceptable solution in real-time systems. A third approach is to prevent deadlock by weakening one or more of the conditions. The wait-and-hold condition may be modified to require a process to request all needed resources at one time. The circular-wait condition may be modified by imposing a total ordering on resources and insisting that they be requested in that order. Another example of a liveness problem is live-lock (or lockout or starvation). Live-lock occurs when a process is prevented from making progress (other processes are running). This is an issue of fairness.

Scheduling
When there are active requests for a resource there must be a mechanism for granting the requests. Often a solution is to grant access on a first-come, first-served basis. This may not always be desirable since there may be processes whose progress is more important. Such processes may be given a higher priority and their requests are processed first. When processes are prioritized, some processes may be prevented from making progress (such a process is live-locked). A fair scheduler insures that all processes eventually make progress thus preventing live-lock.

Semantics
Parallel processes must be... \begin{enumerate} q Synchronization-coordination of tasks which are not completely independent. q Communication-exchange of information q Scheduling-priority, q Nondeterminism-arbitrary selection of execution path \end{enumerate} Explicit Parallelism (message passing, semaphores, monitors) Languages which have been designed for concurrent execution include Concurrent Pascal, Ada and Occam. Application areas are typically operating systems and distributed processing. Ensemble activity
http://cs.wwc.edu/~aabyan/221_2/PLBOOK/Concurrent.html (5 de 16) [18/12/2001 10:36:28]

The Concurrent Programming

Concurrency in Programming Languages


Threads/Communication/Metaphor From the programmer's point of view, concurrent programming notations allow programs to be structured as a set of possibly interactive processes. Such an organization is particularly useful for operating systems, real-time control systems, simulation studies, and combinatorial search applications. To permit the effective use of multiple processes, concurrent programming languages must provide notations for: 1. Concurrent execution: A notation that denotes operations that could be, but need not be, executed in parallel. PCN [|| P1, P2, ..., Pn] Occam PAR P1 ... Pn

2. Communication: A notation that permits processes to exchange information either through shared variables (visible to each process) or a message passing mechanism. Shared Memory Assignment: X := E Message Passing Synchronous Pi!E, Pj?X Asynchronous Pi!E, Pj?X Remote procedure call 3. Synchronization: A notation to require a process to wait for a signal from another process. In general processes are not independent. Often a process depends on data produced by another process. If the data is not available the process must wait until the data is available. wait(Pi), signal(Pj) A process can change its state to Blocked (waiting for some condition to change) and can signal Blocked processes so that they can continue. In this case, the OS must provide the system calls BLOCK and WAKEUP. cking version of a semaphore type semaphore = record value : integer; L : list of processes; // or queue blocked waiting for end; // the signal down(S): S.value := S.value - 1; // wait if S.value < 0 then add this process to S.L; block; end; up(S): S.value := S.value + 1; // signal if S.value <= 0 then remove a process P from S.L; wakeup(P); end;

http://cs.wwc.edu/~aabyan/221_2/PLBOOK/Concurrent.html (6 de 16) [18/12/2001 10:36:28]

The Concurrent Programming

Implementation r Single processor: The normal way is to implement the semaphore operations (up and down) as system calls with the OS disabling the interrupts while executing the code. r Multiprocessor: Each semaphore should be protected by a lock variable, with the TSL instruction used to be sure that only one CPU at a time examines the semaphore. Using the TSL instruction to prevent several CPUs from accessing the semaphore at the same time is different from busy waiting. In many applications it is necessary to order the actions of a set of processes as well as interleave their access to shared resources. common address space, critical section protected by a monitor, synchronization provided through wait and signal. Some alternative synchronization primitives are Semaphores Critical Regions r Monitors r Synchronized Message Passing 4. Mutual exclusion: A notation to synchronize access to shared resources. semaphores Monitors: One approach is to protect the critical section by a monitor. The monitor approach requires that only one process at a time may execute in the monitor.
r r

monitor Queue_ADT const qsize = 10; var head, tail : integer; queue : array[0..qsize-1] of integer; notempty, notfull : condition; procedure enqueue (x : integer); begin [ head=(tail+1) mod qsize --> wait(notfull) [] head!=(tail+1) mod qsize --> skip]; queue[tail],tail := x, (tail + 1) mod qsize signal(notempty) end; procedure dequeue (var x : integer); begin [ head=tail --> wait(notempty) [] head!=tail --> skip]; x,head := queue[head],(head + 1) mod qsize; signal(notfull) end; begin head,tail := 0,0; end; begin [ produce(x); enqueue(x) || dequeue(y); consume(y) || dequeue(y); consume(y)] end.
q q q q

Correctness (safety and liveness) Performance Architecture Implementation

Aside. concurrency: Fork (P) & Join (P) combined notation for communication and synchronization C, Scheme, Ada, PVM, PCN, SR, Java and Occam are just some of the programming languages that provide for processes. Producer-Consumer

http://cs.wwc.edu/~aabyan/221_2/PLBOOK/Concurrent.html (7 de 16) [18/12/2001 10:36:28]

The Concurrent Programming

In the following program there is a producer and a consumer process. The producer process adds items to the queue and the consumer process removes items from the queue. The safety condition that must be satisfied is that the head and tail of the queue must not over run each other. The liveness condition that must be satisfied is that when the queue contains an item, the consumer process must be able to access the queue and when the queue contains space for another item, the producer process must be able to access the queue. const qsize = 10; var count:integer; queue : array[0..qsize-1] of integer; procedure enqueue (x : integer); begin *[ head=(tail+1) mod qsize --> skip]; queue[tail],tail := x, (tail + 1) mod qsize end; procedure dequeue (var x : integer); begin *[ head=tail --> skip]; x,head := queue[head],(head + 1) mod qsize end; begin head,tail := 0,0; [ *[produce(x); enqueue(x)] || *[dequeue(y); consume(y)]] end. Since the processes access different portions of the queue and test for the presence or absence of items in the queue before accessing the queue, the desired safety properties are satisfied. Note however, that busy waiting is involved. Shared Memory Model Process Creation
q q

Static Dynamic

Process Identification
q q

Named Anonymous

Synchronization
q q

Semaphore Monitor

In many applications it is necessary to order the actions of a set of processes as well as interleave their access to shared resources. common address space, critical section protected by a monitor, synchronization provided through wait and signal. Some alternative synchronization primitives are
q q q q

Semaphores Critical Regions Monitors Synchronized Message Passing

If in the previous example another process where to be added, either a producer or a consumer process, an unsafe condition could result. Two processes could compete for access to the same item in the queue. The solution is to permit only one process at a time to access the enqueue or dequeue routines. One approach is to protect the critical section by a monitor. The monitor approach requires that only one process at a time may execute in the monitor. The following monitor solution is incorrect.
http://cs.wwc.edu/~aabyan/221_2/PLBOOK/Concurrent.html (8 de 16) [18/12/2001 10:36:28]

The Concurrent Programming

monitor Queue_ADT const qsize = 10; var count:integer; queue : array[0..qsize-1] of integer; procedure enqueue (x : integer); begin *[ head=(tail+1) mod qsize -> skip]; queue[tail],tail := x, (tail + 1) mod qsize end; procedure dequeue (var x : integer); beg\=in *[ head=tail -> skip]; x,head := queue[head],(head + 1) mod qsize end; begin head,tail := 0,0; end; begin [ produce(x); enqueue(x) $\parallel$ dequeue(y); consume(y) $\parallel$ dequeue(y); consume(y)] end. Note that busy waiting is still involved and further once a process is in the monitor and is waiting, no other process can get in and the program is {\it deadlocked}. Message Passing Model Process Creation
q q

Static Dynamic

Process Identification
q q

Named Anonymous

Message Passing
q q

Synchronous Asynchronous

Data Flow
q q

Unidirectional Bidirectional

MPI

Hardware
Processes
q q q

Process: single flow of control through a set of instructions Processor: hardware device for executing Parallel computer: two or more processors connected through an interconnection network.

http://cs.wwc.edu/~aabyan/221_2/PLBOOK/Concurrent.html (9 de 16) [18/12/2001 10:36:28]

The Concurrent Programming

Flynn's Taxonomy System classification by number of instruction and data streams.


q

q q

q q

SISD: classical sequential von Neumann machine. Inherently sequential. Parallelism may be simulated by interleaving instructions & multiprogramming. Pipelining and vector architectures SIMD: synchronous since there is a single instruction stream, each processor has its own data stream. Matrix operations are a good example. Thinking Machines - CM, Maspar Computer Corp -- MP (single sequencing units) MISD: does not seem to be useful MIMD/SPMD: asynchronous processes but with occasional pauses to synchronize; Intel iPSC, nCUBE, Sequent Symmetry, SGI Onyx, SUN MP system r shared-memory (sometimes called multiprocessors) locking and protection mechanism r distributed-memory (sometimes called multicomputers) message passing

Shared-Memory MIMD
q q q q

Bus-based architectures Cache coherence -- for bus based systems use the snoopy protocol Switch-based architectures, crossbar switch NUMA - nonuniform memory access

Distributed-Memory MIMD
q q

Dynamic interconnection networks Static interconnection networks r linear array, 2D mesh, 3D mesh r ring, torus r hypercube r bus

Communication and routing


q q

routing store-and-forward cut-through

The Engineering of Concurrent Programs


A parallel programming environment must support the following three phases of system behavior specification.
q q q

Programming Behavior of processes and their interconnection Network description Processors and their interconnection Configuration Mapping of software onto hardware

Programming
The way to design parallel software is to begin with the most parallel algorithm possible and then gradually render it more sequential ... until it suits the machine on which it is to run. East (1995) Chandy and Taylor (1992) define an elegant parallel programming language PCN (Program Composition Notation) based on:
q q

Shared definition variables (single assignment) -- X=Exp, Parallel composition -- [||P0,...,Pn],

http://cs.wwc.edu/~aabyan/221_2/PLBOOK/Concurrent.html (10 de 16) [18/12/2001 10:36:28]

The Concurrent Programming


q q q

Choice composition -- [? G0 -> P0,..., Gn -> Pn], Sequential composition -- [; S0,...,Sn], and Recursion -- name(parameters) composition expression

The definition variable eliminates the indeterminacy problems. Communication is through shared variables which may be streams. Synchronization is achieved by requiring a process that references an undefined variable to wait until it is defined by some other process before continuing. Recursion with parallel composition permits dynamic process creation. If a program that uses only parallel and choice composition and definition variables does not have adequate efficiency, ... We use the following steps in the introduction of mutables and sequencing into a parallel block. 1. We order the statements in a parallel block so that all variables that appear on the right-hand sides of definition statements reduce to ground values or tuples, and all guards reduce to the ground values true or false, give only the definitions established by statements earlier in the ordering. In other words, we order statements in the direction of data flow; statements that write a variable appear earlier than statements that read that variable. Then we convert the parallel block into a sequential block by replacing "||" by ";" retaining the data-flow order of statements. 2. Next, we introduce mutables, add assignment statements to our program, and show that the mutable m has the same value as the definition variable x it is to replace, at every point in the program in which x is read - i.e., where x appears on the right-hand side of a definition statement or assignment or guard. 3. Finally, we remove the definition variables that are replaced by mutables, secure in the knowledge that the mutables have the same value as the definition variables in the statements in which they are read. We must, of course, be sure that mutables shared by constituent blocks of a parallel block are not modified within the parallel block. Chandy and Taylor (1992) Decomposition Function decomposition Break down the task so that each worker performs a distinct function. Advantages Disadvantages
q q

Fewer tasks than workers Some tasks are easier than others

Domain decomposition Divide the domain by the number of workers available.


q q

Horizontal domain decomposition: group is responsible for the entire project. Vertical domain decomposition: Assembly line, pipelining

Communication and Synchronization Co-operation requires communication. Communication requires a protocol. Alternation and Competition Allocate time to multiple tasks.
q q

Scheduling Co-operative multitasking: multi-person game, using the copy machine

http://cs.wwc.edu/~aabyan/221_2/PLBOOK/Concurrent.html (11 de 16) [18/12/2001 10:36:28]

The Concurrent Programming


q q q q q

Priority: telephone vs email Competitive multitasking: time slice Client-server: bakery Busy waiting Fairness

Correctness Partial correctness, Total correctness, satisfaction of specifications... Chandy & Taylor (1992) require 1. Shared mutable variables remain constant during parallel composition. 2. Mutable variables to copied when used in definitions. 3. When defined, definition variables act as constants in assignment. Lewis (1993) develops a theory of program correctness called flow-correctness. Lewis requires for each shared variable: 1. it must be defined before it is referenced, 2. it must be referenced before it is updated, and 3. only one process at a time may (re)define it. These rules apply only to the dependencies among variables and do not include either total correctness (termination) or logical correctness (satisfaction of specifications). Correctness issues in the design of concurrent programs fall in one of two categories: safety and liveness.
q

Safety: nothing bad will happen. For example, access to a shared resource like a printer requires that the user process have exclusive access to the resource. So there must be a mechanism to provide mutual exclusion. Liveness: something good will happen. On the other hand, no process should prevent other processes from eventual access to the printer. Thus any process which wants the printer must eventually have access to the printer.

Safety is related to the concept of a loop invariant. A program should produce the ``right'' answer. Liveness is related to the concept of a loop variant. A program is expected to make progress. Termination is an example of a liveness property when a program is expected to terminate.

Network description Configuration

Implementation
Sequential Program single process/thread multiple threads Concurrent Program multiple processes

http://cs.wwc.edu/~aabyan/221_2/PLBOOK/Concurrent.html (12 de 16) [18/12/2001 10:36:28]

The Concurrent Programming

Thread

Name space

Thread 1 PC -> Data -> Heap -> Stack1 -> . . . Thread n PC -> Data -> Heap -> Stackn ->

Shared Space Code Global data Heap Individual Stacks Stack1 . . . . . . . . Stackn

Processi

Name spacei

PC

->

Code Global data Heap Stack

PC

->

Code Global data Heap Stack

Data -> Heap -> Stack ->

Data -> Heap -> Stack ->

Historical Perspectives and Further Reading


Related issues: Lazy evaluation vs Parallel execution; Backtracking vs Parallel execution Concurrency occurs in hardware when two or more operations overlap in time. Concurrency in hardware dates back to the 1950s when special-purpose processors were developed for controlling input/output devices. This permitted the overlapping of CPU instructions with I/O actions. For example, the execution of an I/O instruction no longer delayed the execution of the next instruction. The programmer was insulated from this concurrency by the operating system. The problems presented to the operating systems by this concurrency and the resulting solutions form the basis for constructs supporting concurrency in programming languages. Hardware signals called interrupts provided the synchronization between the CPU and the I/O devices. Other advances in hardware have lead to the the development of alternative architectures. Pipeline processors which fetch the next instruction while the first instruction is being decoded. Super scalar processors combine multiple pipelines to provide an even greater level of concurrency. Array processors provide a large number of identical processors that operate simultaneously on different parts of the same data structure. Data flow computers aim at extracting maximum concurrency from a computation by performing as much of the computation in parallel as possible. Connectionism based hardware models provide concurrency by modeling computation after the neural networks found in the brain. Interrupts together with a hardware clock made it possible to implement multiprogramming systems which are designed to maximize the utilization of the the computer systems resources (CPU, store, I/O devices) by running two or more jobs concurrently. When one job was performing I/O another job could be executing using the CPU. Interrupts and the hardware clock also made possible the development of interactive systems where multiple users have simultaneous access to the system resources. Such a system must provide for a large number of jobs whose combined demands on the system may exceed the system resources. Various techniques of swapping and paging meet this need by moving jobs in and out of the store to the larger capacity of backing store devices. With the increase of jobs comes the need to increase the capacity of the CPU. The solution was to develop multiprocessor systems in which several CPUs are available and simultaneously operate on separate jobs in the shared store. An alternate solution is to develop distributed systems consisting of several complete computers (each containing both CPU and an associated store) that can operate independently but also communicate efficiently. Such systems of local area networks permit the efficient use of shared resources (such as printers and large backing store via file servers) and increase the computational throughput of the system.
http://cs.wwc.edu/~aabyan/221_2/PLBOOK/Concurrent.html (13 de 16) [18/12/2001 10:36:28]

The Concurrent Programming

Andrews, Gregory R. and Olsson, Ronald A. (1993) The SR Programming Language, Benjamin/Cummings, Redwood City, CA. Ben-Ari, M. (1990) Principles of Concurrent and Distributed Programming, Prentice Hall International, Hemel Hempstead, Hertfordshire. Chandy, K. Mani and Taylor, Stephen (1992) An Introduction to Parallel Programming Jones and Bartlett, Boston. East, Ian. (1995) Parallel Processing with Communicating Process Architecture, UCL Press, London, England. Foster, I. (1996) Compositional Parallel Programming Languages TOPLAS Vol 18 No. 4 (July 1996): pp. 454-476. Hehner, Eric C. R. (1993) A Practical Theory of Programming Springer-Verlag, New York. Lewis, Ted G. (1993) Foundations of Parallel Programming: A Machine Independent Approach IEEE Computer Society Press, Los Alamitos, CA. Pacheco, Peter S. (1997) Parallel Programming with MPI Morgan Kaufmann Publishers Inc., San Francisco, CA. Watt, David A. (1990) Programming Language Concepts and Paradigms, Prentice-Hall International, Hemel Hempstead, Hertfordshire.

Exercises
For each of the following problems identify the potential for concurrent execution and the synchronization and communication requirements. Define appropriate safety and liveness invariants. Construct solutions using ...
q

Producer-Consumer/Bounded Buffer (Models race conditions) Producers create data elements which are placed in a buffer. The consumers remove data elements from the buffer and perform some internal computation. The problem is to keep the producer from overwriting full buffers and the consumer from rereading empty buffers. Readers and Writers (Models access to a database) A data object is shared among several concurrent processes. Some of which only want to read the content of the shared object, whereas others want to update (read and write) the shared object. The problem is insure that only one writer at a time has access to the object. Readers are processes which are not required to exclude one another. Writers are required to exclude every other process, readers and writers alike. The Dining Philosophers. (Models exclusive access to limited resources) N philosophers spend their lives seated around a circular table thinking and eating. Each philosopher has a plate of spaghetti and, on each side, shares a fork his/her neighbor. To eat, a philosopher must first acquire the forks to its immediate left and right. After eating, a philosopher places the forks back on the table. The problem is to write a program that lets each philosopher eat and think. The philosophers correspond to processes and the forks correspond to resources. A safety property for this problem is that a fork is held by one and only one philosopher at a time. A desireable liveness property is that whenever a philosopher wants to eat, eventually the philosopher will get to eat. Solve the dining philosophers problem using a central fork manager (centralized). Solve the dining philosophers problem where there is a manager for each fork(distributed). Solve the dining philosophers problem where the philosophers handle their own forks (decentralized). Solve the dining philosophers problem if the philosophers must acquire all the forks in order to eat (distributed mutual exclusion). Sleeping Barber The barber shop has one barber, a barber chair, and n chairs for waiting customers. The problem is to construct an appropriate simulation. Searching 1. Find the largest element in an unordered list Sorting 1. Merge sort: Your program should break the list into two halves and sort each half concurrently. While sorting, the two halves should be concurrently merged. 2. Parallel merge of sorted lists -- if X[i] should just precede Y[j], then X[i] should appear at Z[i+j-1]. 3. Rank sort: X[i] has rank k if X has exactly k items less than X[i] i.e., X[i] should be placed in position k. 4. Insertion sort: value is placed into its place in the sorted list. 5. Exchange/Bubble sort: small values flow left and large values flow right. 1. 2. 3. 4.

http://cs.wwc.edu/~aabyan/221_2/PLBOOK/Concurrent.html (14 de 16) [18/12/2001 10:36:28]

The Concurrent Programming

q q

q q q

6. Quicksort 7. Bitonic sort The N-body problem. The N-body problem is used in astrophysics to calculate the dynamics of the solar system and galaxies. Each mass in this problem experiences a gravitational attraction by every other mass, in proportion to the inverse square of the distance between the objects. The sieve of Eratosthenes. The sieve of Eratosthenes is a method of generating prime numbers by deleting composite numbers. This is done by the following beginning with two as the first prime: 1. Delete all multiples of the prime number other than the prime number. 2. Iterate with the next remaining number which is prime. Polynomial Multiplication -- initialize, form cross-product, sort by power, combine like powers The quadrature problem. The quadrature problem is to approximate the area under a curve, i.e., to approximate the integral of a function. Given a continuous, non-negative function f(x) and two endpoints l and r, the problem is to compute the area of the region bounded by f(x) the x axis, and the vertical lines through l and r. The typical way to solve the problem is to subdivide the regions into a number of smaller ones, using something like a trapezoid to approximate the area of each smaller region, and them sum the areas of the smaller regions. Matrix Operations. 1. Multiplication: AB = C where A is a p \times q matrix, B a q \times r matrix, C a p \times r matrix and C[i,j] = \sum_{k=1}^m A[i,k]B[k,j] 2. Triangularization: Triangularization is a method for reducing a real matrix to upper-triangular form. It involves iterating across the columns and zeroing out the elements in the column below the diagonal element. This is done by performing the following step for each column. 1. For each row r below the diagonal row d, subtract a multiple of row d from row r. The multiple is m[r,d]/m[d,d]; subtracting this multiple of row d has the effect of setting m[r,d] to zero. 3. Backsubstitution: 4. Gaussian elimination: Gaussian elimination with partial pivoting is a method for reducing a real matrix to uppertriangular form. It involves iterating across the columns and zeroing out the elements in the column below the diagonal element. This is done by performing the following three steps for each column. 1. Select a pivot element, which is the element in column d having the largest absolute value. 2. Swap row d and the row containing the pivot element. 3. For each row r below the new diagonal row, subtract a multiple of row d from row r. The multiple is m[r,d]/m[d,d]; subtracting this multiple of row d has the effect of setting m[r,d] to zero. Assume the matrix is non-singular (the divisor is non-zero). Shortest Path between two vertices of a graph (edges are weighted). Traveling salesman problem. Find the shortest tour that visits each city exactly once. Dutch national flag. A collection of colored balls is distributed among N processes. There are at most N different colors of balls. The goal is for the processes to exchange balls so that eventually, for all i, process i holds all balls of color i. The number of balls in the collection is unknown to the processes. Distributed Synchronization 1. Write a program that polls N processes for yes or no votes and terminates when at least N/2 responses have been received. Assume N is even. 2. Repeat the previous exercise, but terminate when a majority of identical responses have been received. Assume N is even. 3. Random election of a leader amongst n processes. Create n processes. %Let each process flip a coin to decide whether the process wants to %contest the "elections". %Broadcast this to all other processes. Now, each process generates a random number to decide its "vote", and sends the "vote" to the process it is voting for. Each process counts its votes, and broadcasts the results to all other processes. Now everyone knows the leader. (May have to think of starting the process over again in case of a tie, or simply deciding that the process with the larger Id is the leader, or some such thing.) This is a rather silly problem, but it will help your to learn about broadcasts and synchronizing processes, both of which are extremely important for any kind of parallel programming. The eight-queens problem. The eight-queens problem is concerned with placing eight queens on a chess board in such a way that none can attack another. One queen can attack another if they are in the same row or column or are on the same diagonal. Miscellaneous 1. Sum a set of numbers 2. (Conway) Read 80-character records, write 125 character records. Add an extra blank after each input record. Replace every pair of asterisks (**) with an exclamation point (!). 3. (Manna and Pnueli) Compute (n k) = n(n-1)...(n-k+1)/k! 4. (Roussel) Compare the structure of two binary trees 5. (Dijkstra) Let S and T be two disjoint sets of numbers with s and t the number of elements respectively. Modify S and T so that S contains the s smallest members of S union T and t the t largest members of S union T.

http://cs.wwc.edu/~aabyan/221_2/PLBOOK/Concurrent.html (15 de 16) [18/12/2001 10:36:28]

The Concurrent Programming

6. 7. 8. 9.

(Conway) The game of life (Hoare) Write a disk server that minimizes amount of seek time Show that Lewis' flow-correctness rules are safety or liveness rules. PCN is a single assignment language (in a single assignment language, the assignment of a value to a variable may occur just once within a program). In addition, when a program must reference an undefined variable, it waits until the variable becomes defined. Show that PCN programs satisfy Lewis' flow-correctness rules.

1996 by A. Aaby

http://cs.wwc.edu/~aabyan/221_2/PLBOOK/Concurrent.html (16 de 16) [18/12/2001 10:36:28]

Message PassingMessage Passing

Message Passing
The Basics
Programming options include
q q q

Designing a special parallel programming language - Occam Extending the syntax/reserved words of an existing language - CC+, FortranM Provide a library of message passing procedures for use with an existing language - PVM, MPI 1. A method of creating processes on different computers 2. A method of sending and receiving messages

Process 1. a program in execution 2. a partition (of a program) designated for parallel execution Process creation
q

static - all processes are specified before execution and the system executes a fixed number of processes - Occam, MPI dynamic - processes can be created and their execution started during the execution of other processes - PVM

Message passing routines


q

q q

send-receive library calls r send( parameterList ) r recv( parameterList ) synchronous message passing ( rendezvous, blocking message passing ) r procedures return when message transfer is completed r no buffer is required asynchronous message passing ( nonblocking message passing ) r sending procedures returns whether or not the message has been received r receiving procedures block until a message is available r buffer to hold unread messages is required message selection broadcast, gather, scatter

http://cs.wwc.edu/~aabyan/460/MessagePassing.html (1 de 2) [18/12/2001 10:36:30]

Message PassingMessage Passing

NOW - network of workstations


MPI
q q q

process creation and execution using the SPMD computation model message-passing routines

Evaluating Parallel Programs


performance issues

Copyright 1998 Walla Walla College -- All rights reserved

Maintained by WWC CS Department Send comments to [email protected]

http://cs.wwc.edu/~aabyan/460/MessagePassing.html (2 de 2) [18/12/2001 10:36:30]

http://cs.wwc.edu/KU/PR/MPI.html

MPI Tutorial

Overview
MPI is a library of functions and macros that can be used in C programs. SPMD model: Programs written in the single-program multiple-data model may have multiple processess. Each process runs the same executable program however, the processes execute different statements by taking different branches in the program. The branches are determined by the process rank.
q q q

MPI identifiers begin with MPI_ Most MPI constants are all capital letters Each MPI function begins with a capital letter and the subsequent characters are lowercase.

The MPI Programming Model


q q q q q

Communicator: a collection of processes that can send messages to each other. Each process has a unique number called its rank. The processes share a common program. Each process executes those statements that correspond to its rank. Each communication includes a send which includes r The message, its length and datatype r The rank of the receiver process r A tag to indicate the class of the message r The identity of the communicator. Each communication includes a receive which includes r The message, its length and datatype r The rank of the source r The tag which indicates the class of the message r The identity of the communicator The message status

Syntax
A typical MPI program has the following layout.
http://cs.wwc.edu/KU/PR/MPI.html (1 de 3) [18/12/2001 10:36:32]

http://cs.wwc.edu/KU/PR/MPI.html

#include <stdio.h> #include <string.h> #include "mpi.h" main(int argc, char* argv[]) { ... int my_rank; /* rank of process */ int p; /* number of processes */ int source; /* rank of sender */ int dest; /* rank of receiver */ int tag = 0; /* tag for messages */ char message[100]; /* storage for message */ MPI_Status status; /* return status for */ /* receive */ ... /* Start up MPI -- no MPI functions called before this */ MPI_Init(&argc, &argv); /* Find out my process rank */ MPI_Comm_rank(MPI_COMM_WORLD, &my_rank); /* Find out number of processes */ MPI_Comm_size(MPI_COMM_WORLD, &p); if (my_rank != 0) { /* Create message */ sprintf(message, "Greetings from process %d!", my_rank); dest = 0; /* Use strlen+1 so that '\0' gets transmitted */ MPI_Send(message, strlen(message)+1, MPI_CHAR, dest, tag, MPI_COMM_WORLD); } else { /* my_rank == 0 */ for (source = 1; source < p; source++) { MPI_Recv(message, 100, MPI_CHAR, source, tag, MPI_COMM_WORLD, &status); printf("%s\n", message); } } ...

http://cs.wwc.edu/KU/PR/MPI.html (2 de 3) [18/12/2001 10:36:32]

http://cs.wwc.edu/KU/PR/MPI.html

/* Shut down MPI -- no MPI functions called after this */ MPI_Finalize(); ... } /* main */

Examples
sum.c rand_data.txt

References
Pacheco, Peter S. Parallel Programming with MPI Morgan Kaufmann Publishers Inc. 1997

Copyright 1998 Walla Walla College -- All rights reserved Maintained by WWC CS Department

Last Modified
Send comments to [email protected]

http://cs.wwc.edu/KU/PR/MPI.html (3 de 3) [18/12/2001 10:36:32]

Debugging

Debugging
We should design mathematically correct programs and, as a consequence, we should never need to do any debugging. -- Anonymous

Serial Debugging
Syntax errors: Edit-Compile Loop (to produce an executable program) Repeat 1. Edit the program 2. Compile the program Until there are no more syntactic errors Semantic errors: Test-Debug Loop (to produce a working program) Repeat 1. Run the program 2. If there are errors, do one or more of the following s Examine the source code s Instrument your program by adding debugging output statements to the program -print out the values of the variables of interest s Add assertions to the program s Use a symbolic debugger Until there are no more bugs A Debugger A debugger is a program that acts as an intermediary between the programmer, the system and the program. As stated in the man page for the GNU debugger gdb, debuggers usually provide the following:
q q q q

Start your program, specifying anything that might affect its behavior. Make you program stop on specified conditions. Examine what has happened, when your program has stopped. Change things in your program, so you can experiment with correcting the effects of one bug and go on to learn about another.

Typical bugs

http://cs.wwc.edu/KU/SEBOOK/Debugging.html (1 de 3) [18/12/2001 10:36:34]

Debugging
q q q

Infinite loops Divide by zero Undefined variables

Catalog of debugging techniques Common programming errors


q q q

Infinite loops Divide by zero Undefined variables

Tentative diagnoses of common failures

Parallel Debugging
In addition to the problems found in serial programs, parallel programs may be subject to race conditions. A race condition occurs when the behavior of a program is dependent on the order or timing of execution or communication. A race condition is an example of nondeterminism. A well designed parallel program should be correct regardless of nondeterminism. The standard techniques for debugging sequential programs are not a productive when used for parallel programs. Intructions inserted to instrument a program can change the timing charactoristics and traditional debuggers for sequential program are not helpful in identifying race conditions. Error checking code is particularly important in parallel programs to ensure that faulty conditions can be handled and not cause deadlock. Typical bugs
q q

Trying to receive data when there has been no send Incorrect parameters

Debugging Strategies (Geist) 1. If possible, run the program as a single process and debug as a normal sequential program. 2. Execute the program using two to four multitasked processes on a single computer and check that messages are bing sent to the correct places. 3. Execute the program using two to four processes across several computers. This helps to find problems caused by network delays.

Permission to make digital/hard copy of part or all of this work for personal or classroom use is granted without fee provided that the copies are not made or distributed for profit or commercial advantage, the copyright notice, the title of the publication, and its date appear, and notice is given that copying is by permission of Anthony A. Aaby. To copy
http://cs.wwc.edu/KU/SEBOOK/Debugging.html (2 de 3) [18/12/2001 10:36:34]

Debugging

otherwise, to republish, to post on servers, or to redistribute to lists, requires prior specific permission and/or fee. 1998 Anthony A. Aaby. Last Modified - . Send comments to [email protected]

http://cs.wwc.edu/KU/SEBOOK/Debugging.html (3 de 3) [18/12/2001 10:36:34]

Independent Parallelism

Independent Parallelism
a computation that can be divided into a number of completely indepencent parts, each of which can be executed simultaneously.

Ideal Parallel Computation


q q

Disconnected computational graph Manager-worker with minimal communcation

Examples
q

q q q

Geometrical transformation of images r shifting r scaling r rotation r clipping Mandelbrot set Monte Carlo Methods Parallel random number methods

Content licensed under OPL

Author: Anthony A. Aaby Last Modified - . Comments and content invited [email protected]

http://cs.wwc.edu/~aabyan/460/Independent.html [18/12/2001 10:36:38]

Partitioning

Partitioning and Divide and Conquer Strategies


Functional decomposition: f(x) = g(fn(x), fn-1(x), ... f1(x), f0(x)) Domain decomposition:

f(x:xs) = g(x):f(xs) f([]) = [] Divide and conquer

f(x) = if terminal(x) then g(x) else h(f(x0), ... f(xn)) where <x0, ... , xn> = divide(x)

Partioning
q

JaJa partitioning if main task is dividing the problem (quicksort) r divide and conquer if main task is combining the results (mergesort) Partitioning strategies r functional decomposition r data partitioning or domain decomposition Divide and conquer r tree (binary) structured computation r m-ary divide and conquer
r

Examples
q

Bucket sort r many sequential sorts are based on the idea of compare and exchange r bucket sort is based on the idea of partitioning a range (0, a) into m regions or buckets

http://cs.wwc.edu/~aabyan/460/partitioning.html (1 de 2) [18/12/2001 10:36:40]

Partitioning

and placing each of the n items into the appropriate bucket, then either sequentially sorting each bucket or recursively applying bucket sort. r partioning schemes s one bucket/process s a/m size region/process; m buckets/process; processes exchange small buckets Numerical integration r Quadrature - fixed number of intervals s rectangles s trapezoid rule s Simpson's rule r Adaptive quadrature - changing number of intervals N-body problem - determine the effect of forces between n-bodies r Barnes-Hut algorithm s octtree s orthogonal recursive bisection

Copyright (c) 1999 by Anthony Aaby. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v0.4 or later (the latest version is presently available at http://www.opencontent.org). Distribution of substantially modified versions of this document is prohibited without the explicit permission of the copyright holder. Distribution of this work or any derivative works in whole or in part in standard (paper) book form for commercial purposes is prohibited unless prior permission is obtained from the copyright holder. Last Modified - . Comments and content invited [email protected]

http://cs.wwc.edu/~aabyan/460/partitioning.html (2 de 2) [18/12/2001 10:36:40]

Pipelined Computation

Pipelined Computation
-- the problem is divided into a series of tasks that have to be completed one after the other where
q q q

more than one instance is required for the complete program to be executed, or a series of data items must be processed, each requiring multiple operations, or information to start the next process can be passed forward before the process has completed all its internal operations.

Fox's wall
q

Functional decomposition r bricklayer r mortar mixer r morter/brick carrier Data parallel r pipeline - one bricklayer/row r multiple bricklayers/row -- m-bricks/n-bricklayers

The Pipeline Technique


The pipeline technique is a form of functional decomposition where the input data is broken up and each piece is processed independently. f([]) = [] f(x:xs) = fn(fn-1(...f1(f0(x))...)):f(xs) where fi(x:xs) = gi(x):fi(xs) fi([]) = [] Pipelined solutions are appropriate for 1. Computing more than one instance of a complete problem. 2. A series of data items must be processed, each requiring multiple operations. 3. When information to start the next process can be passed forward before the process has completed all its internal processes.

http://cs.wwc.edu/~aabyan/460/pipelined.html (1 de 2) [18/12/2001 10:36:42]

Pipelined Computation

Computing Platform
->P0->P1->...->Pn->

Examples
1. Adding numbers - each process receives a partial sum, adds its number to the sum and passes the new partial sum to the next process. 2. Sorting numbers - parallel insertion sort (pass on smaller numbers) 3. Prime number generation (sieve of Erathosthenes) - pass on indivisible numbers 4. System of linear equations (back substitution) - upper triangular form

Copyright (c) 1999 by Anthony Aaby. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v0.4 or later (the latest version is presently available at http://www.opencontent.org). Distribution of substantially modified versions of this document is prohibited without the explicit permission of the copyright holder. Distribution of this work or any derivative works in whole or in part in standard (paper) book form for commercial purposes is prohibited unless prior permission is obtained from the copyright holder. Last Modified - . Comments and content invited [email protected]

http://cs.wwc.edu/~aabyan/460/pipelined.html (2 de 2) [18/12/2001 10:36:42]

Synchronous ComputationsSynchronous Computations

Synchronous Computations
- processes that must at times wait for each other before preceding, thereby becoming synchronized.

Synchronization
The mechanism that prevents any process from continuing past a specified point until all processes are ready.
q

Message passing - explicit barrier Scalar * Vector i = myrank; a[i] = k*a[i]; barrier(mygroup); Shared memory (SIMD) - implicit barrier Scalar * Vector forall (i = 0; i<n; i++) a[i] = k*a[i]; Matrix + Matrix forall (i = 0; i<m; i++) forall (j = 0; j<n; j++) c[i,j] = a[i,j]+ b[i,j]; MPI_Barrier(communicator)

Implementation
q q q

Counter Tree Butterfly

Local Synchronization Deadlock MPI_Sendrecv()MPI_Sendrecv_replace()

Synchronized Computation
Data Parallel Computations (SIMD)

http://cs.wwc.edu/~aabyan/460/synchronous.html (1 de 4) [18/12/2001 10:36:44]

Synchronous ComputationsSynchronous Computations

Synchronous Iteration - each iteration is composed of several processes that start together at the beginning of each iteration and the next iteration cannot begin until all processes have finished the previous iteration.

SIMD SPMD for (j=0; j<n; j++) for (j=0; j<n; j++){ forall(i=0; i<N; i++) i= myrank; body(i); body(i); barrier(mygroup) }

Synchronous Iteration Examples


q

Solving a system of linear equations r Gauss-Seidel - chapter 10 r Jacobi iteration s solve i-th equation for the i-th variable; x = ... i s initialize x = b i i s iterate in parallel until converged to a solution s convergence is guaranteed if Sum(|a |) i,j i!=j < |xi,i| Simulated annealing - heat distribution problem r given the temperatures at points on the edge of a sheet of metal, find the temperatures of the interior points. s the temperature of a point is the average of the temperatures of the four neighboring points s iterate s a fixed number of times or s until temperatures stabilize r Other applications s pressure and voltage s solving a system of linear equations s finite difference method s Laplace's equation Cellular automata r Game of life s Each cell can hold one "organism" s n = number of neighboring cells (maximum of 8 - 2D) containing an organism s Occupied cell s Survival: n in {2,3} s Death: n not in {2,3} s Empty cell s Birth: n = 3 r Sharks and fishes

http://cs.wwc.edu/~aabyan/460/synchronous.html (2 de 4) [18/12/2001 10:36:44]

Synchronous ComputationsSynchronous Computations

r r

Each cell can hold "one fish or one shark" (but not both) s Fish move by the following rules s n = number of unoccupied neighboring cells (maximum of 8 - 2D) s n = 0: stay s n > 1: choose unoccupied cell at random and move to it. s Birth: if of breeding age, leave baby fish behind when moving s Death: die after x generations s Sharks move by the following rules s f = number of fish in neighboring cells (maximum of 8 - 2D) s n = number of unoccupied neighboring cells (maximum of 8 - 2D) s f = 0: choose unoccupied cell at random and move to it. s f > 0: choose a fish occupied cell at random and move to it eating the fish. s Birth: if of breeding age, leave baby fish behind when moving s Death: die if has not eaten for y generations Foxes and rabbits - 6.20 Replacement for differential equations in fluid/gas dynamics s movement of fluids and gases around objects (e.g. air flow over a wing) s gas diffusion s biological growth s Erosion of sand dunes at a beach when affected by the waves. s Erosion of the banks of a river due to the water.
s

Mesh partitioning
q q q

one point per process square blocks rectangular strips (rows or columns)

Communication

Copyright (c) 1999 by Anthony Aaby. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v0.4 or later (the latest version is presently available at http://www.opencontent.org). Distribution of substantially modified versions of this document is prohibited without the explicit permission of the copyright holder. Distribution of this work or any derivative works in whole or in part in standard (paper) book form for commercial purposes is prohibited unless prior permission is obtained from the copyright holder. Last Modified - . Comments and content invited [email protected]
http://cs.wwc.edu/~aabyan/460/synchronous.html (3 de 4) [18/12/2001 10:36:44]

Synchronous ComputationsSynchronous Computations

http://cs.wwc.edu/~aabyan/460/synchronous.html (4 de 4) [18/12/2001 10:36:44]

Load Balancing and Termination

Load Balancing and Termination


Static load balancing
q q q q q

round robin randomized algorithms recursive bisection simulated annealing genetic algorithm

Dynamic load balancing


q q

centralized decentralized

Centralized dynamic load balancing


Manager-worker or replicated worker or processor farm
q q q

manager workpool worker

Termination. When tasks are taken from a task queue, computation terminates when 1. the task queue is empty and 2. every process has made a request to every other process without any new tasks being generated (If worker processes do not generate new tasks, computation terminates when task queue is empty and each worker process has terminated.) Other termination situations:
q q

some worker detects termination condition, informs manager who terminates all workers all workers reach local termination conditions and inform manager

http://cs.wwc.edu/~aabyan/460/balancing.html (1 de 2) [18/12/2001 10:36:46]

Load Balancing and Termination

Decentralized dynamic load balancing


Processes have and generate tasks 1. receiver-initiated 2. sender-initiated ...

Distributed termination detection algorithms


q q q q q

termination conditions using acknowledgement messages ring termination algorithms tree algorithm fixed energy distributed termination algorithm

http://cs.wwc.edu/~aabyan/460/balancing.html (2 de 2) [18/12/2001 10:36:46]

Student Responsibilities

CPTR 460 Grade Worksheet Name:


Instructions: Hand in hard copies of fully functioning programs
q q q q q

Grade:

1 problem from 3 2 problems from 4: one integration, one n-body 1 problem from 5 1 problem from 6 3 problems from distinct chapters 9-12

with full documentation and full attribution of source and assistance. Be prepared to explain each line of code and alternative designs. Alternatively, place all programs in a public directory and email me with its location.

Program Summary

Chapter any problem from 3 integration from 4 n-body from 4 any problem from 5 any problem from 6 1st from 9-12 2nd from 9-12 3rd from 9-12

Description

Grade

Total
Final grade is computed by dividing the total by 8 and using the following table to obtain the letter grade.

Letter Grade Points/Percent A B C D F 90-100 80-90 60-80 50-60 0-50

http://cs.wwc.edu/~aabyan/460/final.html (1 de 2) [18/12/2001 10:36:48]

Student Responsibilities

Resources
q q

program heading program grading criteria

http://cs.wwc.edu/~aabyan/460/final.html (2 de 2) [18/12/2001 10:36:48]

Communication Patterns

LN: P&DC -- Communication Patterns


q

One to one r MPI_Send(message,count,dataype,dest, tag,comm) r MPI_Recv(message,count,datatype,source,tag,comm,status) Serial distribution & collection -- O(n) r one process sends data sequentially to other processes r one process receives data sequentially from other processes Tree structured (processes are logically structructred as a tree) -- O(log n) r data is distributed from the root to the leaves r data is passed from the leaves to the root

Collective Communication: All processes in a communicator are involved.


q

Broadcast - single process sends the same data to all other processes r MPI_Bcast(message,count,datatype,root,comm) s Sends message from root to each process in the communicator and by the other processes to receive the message. s It must be called by all processes in the communicator with the same arguments for root. s Example: trapezoid rule Reduction - each process contains an operand which are combined using a binary operator with the result avaliable to the root process. r MPI_Reduce(operand,result,count,datatype,operator,root,comm) s It must be called by all processes in the communicator, and count, datatype, operator, and root must be the same on each process. s All, except the root, contribute data that is combined using a binary operation. s The root process gets the result. s Examples: s trapezoid rule sum s dot product r MPI_Allreduce(operand,result,count,datatype,operator,comm) s exactly the same as MPI_Reduce except the result is returned to all processes Aside. r Note the use of in, out, and in-out on parameter specifications. r The syntax is the same for both senders and receivers to simplify the language. r Aliasing is not permitted on out or in/out arguments on MPI functions. Gather - distributed data structure is collected by process rank order onto a root process r MPI_Gather(sentdata,count,datatype,recData,recCount,recType,root,comm) r MPI_Allgather(sentdata,count,datatype,recData,recCount,recType,comm)

http://cs.wwc.edu/~aabyan/460/Communication.html (1 de 2) [18/12/2001 10:36:50]

Communication Patterns
q

Scatter - a data structure is distributed across processes r MPI_Scatter(senddata,count,datatype,recData,recCount,recType,root,comm)

Copyright 1998 Anthony A. Aaby -- All rights reserved

Last Modified
Send comments to [email protected]

http://cs.wwc.edu/~aabyan/460/Communication.html (2 de 2) [18/12/2001 10:36:50]

Compound Messages

LN: P&DC -- Compound Messages


MPI provides three methods for sending complex data. 1. Arrays with the count parameter 2. build a derived data type 3. use the MPI functions MPI_Pack and MPI_Unpack The Count Parameter
q q q

Suitable for passing contiguous homogeneous elements (arrays) Sender: MPI_Send(vector+50, 50, ...); Receiver: MPI_Receive(vector+50,50,...)

Derived Types and MPI_Type_struct Only constants and variables may be passed as parameters -- types may not be passed as parameters. So from data types chapter

Product Descriptor Values Descriptor1 value1 ... ... Descriptorn valuen

MPI_Type_struc(count,blockLengths,displacements,typelist,newTypeName)
q q q q q

count is the number of domains blockLengths is the number of items in a domain displacements is the displacements of the fields typelist is the list of types (domains) newTypeName is the name of the type to be used in refering to message

Pack/Unpack

http://cs.wwc.edu/~aabyan/460/Grouping.html (1 de 2) [18/12/2001 10:36:52]

Compound Messages

q q

Used to send heterogeneous data only once Sender position=0; MPI_Pack(x_1,count,datatype,buffer,size,position,comm); ... MPI_Pack(x_n,count,datatype,buffer,size,position,comm); MPI_Bcast(buffer,size,MPI_PACKED,root,comm);

Receiver MPI_Bcast(buffer,size,MPI_PACKED,root,comm); position=0; MPI_Unpack(buffer,size,position,x_1,count,datatype,comm); ... MPI_Unpack(buffer,size,position,x_n,count,datatype,comm);

Copyright 1998 Anthony A. Aaby -- All rights reserved

Last Modified
Send comments to [email protected]

http://cs.wwc.edu/~aabyan/460/Grouping.html (2 de 2) [18/12/2001 10:36:52]

Communicators and Topology

LN: P&DC - Communcators and Topology


q q q q

Standard matrix multiplication: cij = Sum aikbkj k=0..n Fox's Algorithm: cij = Sum ai,i+kbi+k,j ; k=0.. n-1; addition modulo n Block variation: Cij = Sum Ai,i+kBi+k,j ; k=0.. n-1; addition modulo n, A, B, C submatrices Communicators r intra-communicators r inter-communicators r group - an ordered collection of processes r rank - a unique number (0,...) assigned to a process in a group r context - system defined communicator identifier Groups, Contexts & Communicators r MPI_Comm_group r MPI_Group_incl r MPI_Comm_create Topologies - a mechanism for associating different addressing schemes with processes in a group r Cartesian or grid topology s The number of dimensions in the grid s The size of each dimension s The periodicy of each dimension (whether the last entry is adjacent to the first entry s Opiimize mapping of virtual topology to the physical processes s MPI_Cart_create MPI_Comm_rank MPI_Cart_coords s Partition grid MPI_Cart_sub r Graph topology

Copyright 1998 Anthony A. Aaby -- All rights reserved

Last Modified
Send comments to [email protected]

http://cs.wwc.edu/~aabyan/460/Topology.html [18/12/2001 10:36:54]

I/O

LN: P&DC -- I/O


q q q

I/O in parallel programs: problems with nondeterminism Process rank 0 - the I/O process Collective Operations -- I/O r Read/Print by I/O process r Broadcast to and received from other processes Communicator - collection of processes that can send messages r Each process has a unique rank in the communicator r Each communicator has a unique context which identifies the communicator r Each communicator has a collection of attributes, each identified by a unique key r Attributes and attribute keys are process local -- each process may cache different attributes with the same communicator r Callback functions - allocate and free memory Identifying the I/O process r MPI_IO s MPI_PROC_NULL s MPI_ANY_SOURCE s == myRank (I can do I/O) s note: no provision has been made to identify processes that can do input r MPI_IO does not necessarily identify a unique process r How to agree on a unique I/O process

Permission to make digital/hard copy of part or all of this work for personal or classroom use is granted without fee provided that the copies are not made or distributed for profit or commercial advantage, the copyright notice, the title of the publication, and its date appear, and notice is given that copying is by permission of Anthony A. Aaby. To copy otherwise, to republish, to post on servers, or to redistribute to lists, requires prior specific permission and/or fee. 1998 Anthony A. Aaby. Last Modified - . Send comments to [email protected]

http://cs.wwc.edu/~aabyan/460/IO.html [18/12/2001 10:36:56]

Principles of Parallel Systems and Software Engineering

Principles of Parallel Systems and Software Engineering


Motivational examples
q

q q q

The construction site -- Building a wall: mixing mortar, carring bricks, laying mortar, laying bricks Production line -Supermarket -Matrix multiplication --

Introduction
From Foster 96: Most programming problems have several parallel solutions. The best solution may differ from that suggested by existing sequential algorithms. The design methodology that we describe is intended to foster an exploratory approach to design in which machine independent issues such as concurrency are considered early and machine specific aspects of design are delayed until late in the design process. This methodology structures the design process as four distinct stages: partitioning, communication, agglomeration, and mapping. (The acronym PCAM may serve as a useful reminder of this structure.) In the first two stages, we focus on concurrency and scaleability and seek to discover algorithms with these qualities. In the third and fourth stages, attention shifts to locality and other performance related issues. The four stages which are summarized as follows: 1. Partitioning. The computation that is to be performed and the data operated on by this computation are decomposed into small tasks. Practical issues such as the number of processors in the target computer are ignored, and attention is focused on recognizing opportunities for parallel execution. 2. Communication. The communication required to coordinate task execution is determined, and appropriate communication structures and algorithms are defined. 3. Agglomeration. The task and communication structures defined in the first two stages of a design are evaluated with respect to performance requirements and implementation costs. If necessary, tasks are combined into larger tasks to improve performance or to reduce development costs. 4. Mapping. Each task is assigned to a processor in a manner that attempts to satisfy the competing goals of maximizing processor utilization and minimizing communication costs. Mapping can be specified statically or determined at runtime by load-balancing algorithms. Algorithm design is presented here as a sequential activity. In practice, however, it is a highly parallel process, with many concerns being considered simultaneously. Also, although we seek to avoid
http://cs.wwc.edu/KU/SEBOOK/Parallel.html (1 de 6) [18/12/2001 10:36:58]

Principles of Parallel Systems and Software Engineering

backtracking, evaluation of a partial or complete design may require changes to design decisions made in previous steps.

Partitioning
The computation that is to be performed and the data operated on by this computation are decomposed into small tasks. Practical issues such as the number of processors in the target computer are ignored, and attention is focused on recognizing opportunities for parallel execution.

Function decomposition (control-parallel)


In this approach, the tasks are partitioned among the processes and each process executes a different set of commands. Opportunities for parallel execution arise when the input is structured and may be operated on by multiple functions. In functional notation fn( fn-1(... f1( f0( Input ))...)) = Output; or F( f0(I0), ..., fm(In)) = Output Its principle advantages are
q q

some functions may be able to make effective use of specialized resources and the allocation of tasks to workers may be done just once with little or no management overhead.

Its principle disadvantages are


q q

the number of distinct functions is limited the functions are different.

Thus it is difficult to utilize additional resources and to have a load-balanced solution i.e., function decomposition fails to offer scaleability of performance with size of either domain or processors.

Domain decomposition (data-parallel)


In this approach, data is partitioned among the processes and each process executes the same set of commands on the data The scale of the domain is the grain size or granularity. Its principle advantages are
q q

it is scalable with respect to number of processes and domain size, and load balancing is trivial with little or no management overhead.

Its principle disadvantages are


q q

the structure of the domain must be regular and the work uniform.

http://cs.wwc.edu/KU/SEBOOK/Parallel.html (2 de 6) [18/12/2001 10:36:58]

Principles of Parallel Systems and Software Engineering

Manager-Worker
Manager-worker is a problem solving method where the data is non-uniform and the work required is non-uniform. It is required whenever any of the following applies:
q q q q

Domain structure is irregular and does not match the workforce. Work required is distributed non-uniformly across domain. Work capability is distributed non-uniformly across workforce. No distribution of skills exists to match an efficient decomposition of function with static allocation.

Its principle advantages are


q q

it is scalable with respect to workers or domain size and load balancing is trivial with little or no management overhead.

Its principle disadvantages are


q q

the requirement for a broadly skilled workforce and the management overhead.

Communication
The communication required to coordinate task execution is determined, and appropriate communication structures and algorithms are defined.

Synchronization
A protocol a set of rules for communication. interleaved synchronization signal channel of communication message lockstep pipeline latency communication architecture systolic

Alternation
alternate context switch interruption fair

Agglomeration
The task and communication structures defined in the first two stages of a design are evaluated with respect to performance requirements and implementation costs. If necessary, tasks are combined into
http://cs.wwc.edu/KU/SEBOOK/Parallel.html (3 de 6) [18/12/2001 10:36:58]

Principles of Parallel Systems and Software Engineering

larger tasks to improve performance or to reduce development costs.

Mapping
Each task is assigned to a processor in a manner that attempts to satisfy the competing goals of maximizing processor utilization and minimizing communication costs. Mapping can be specified statically or determined at runtime by load-balancing algorithms.

Competition
Time management
scheduling algorithm co-operative multi-tasking priority competitive multi-tasking

Service provision
shared resources client-server queue busy waiting

References
Foster, Ian (1996) Designing and Building Parallel Programs Addison Wesley Chandy, K. Mani and Taylor, Stephen (1992) An Introduction to Parallel Programming Jones and Bartlett, Boston, MA. Foster, Ian and Tuecke, Steven (1993) Parallel Programming with PCN Argonne National Laboratory, Chicago, IL.

Program design issues.


Partitioning a program into concurrent components. Domain Decomposition. Divide up the data of a program and operate on the parts concurrently. Functional Decomposition. Divide up the function of the problem and operate on the parts concurrently. 1. Jacobi relaxation algorithm for solving Laplace's equation. 2. Red-black relaxation 3. N-body problem -- solved on a ring
http://cs.wwc.edu/KU/SEBOOK/Parallel.html (4 de 6) [18/12/2001 10:36:58]

Principles of Parallel Systems and Software Engineering

Irregular problems. Mapping components to computers. Indexing. Hashing. Simulated Annealing. Load Balancing: (primarily for irregular problems) Bin Packing. Place a partition at the computer with the least data. Randomization. Place partitions at a random computer. Pressure Models. Move partitions to more lightly loaded neighboring computers. Manager-Worker. The manager partitions the problem into components placing them in a central pool of tasks. There is a large number of worker processes that retrieve tasks from the pool, carry out the required computation, and possibly add new tasks to the pool. Communication and Synchronization Unbounded Communication: 1. One-to-One (producer/consumer) 2. Broadcasting (producer/consumers) 3. Many-to-One (mergers) 4. One-to-Many (distributors) 5. Two-way Communication Bounded Communication Blackboards Lester Relaxed Algorithm(2) Each process computes in a self-sufficient manner with no synchronization or communication between processes. Synchronous Iteration(6) Each processor performs the same iterative computation on a different portion of data. Replicated Workers (10,11) Pipelined Computation.(4,8) The processes are arranged in some regular structure such as a ring or two-dimensional mesh. The data flows through the entire process structure with each process performing a certain phase of the computation. 1. Back substitution 2. Numerical Integration: 3. Linear Equations: iterative method % 4. Back substitution 5. Assembler 6. Compiler
http://cs.wwc.edu/KU/SEBOOK/Parallel.html (5 de 6) [18/12/2001 10:36:58]

Principles of Parallel Systems and Software Engineering

Permission to make digital/hard copy of part or all of this work for personal or classroom use is granted without fee provided that the copies are not made or distributed for profit or commercial advantage, the copyright notice, the title of the publication, and its date appear, and notice is given that copying is by permission of Anthony A. Aaby. To copy otherwise, to republish, to post on servers, or to redistribute to lists, requires prior specific permission and/or fee. 1998 Anthony A. Aaby. Last Modified - . Send comments to [email protected]

http://cs.wwc.edu/KU/SEBOOK/Parallel.html (6 de 6) [18/12/2001 10:36:58]

Patterns

Parallel Patterns
Process Creation
q q

Static process creation Dynamic process creation

Message-Passing Computing 1. Special language 2. Language extensions 3. Library routines


r

r r r r

Basic routines s send(...) s receive(...) Synchronous message passing Asynchronous message passing Blocking & nonblocking message passing Broadcast, gather, scatter
s

Functional Style Imperative Style Independent parallelism w/static and dynamic process creation

Functional Style f(x) = gather(f0(x0), ... , fn(xn)) where <x0, ... , xn> = scatter(x)

Imperative Style

f([]) = [] f(x:xs) = g(x):f(xs) Functional decomposition

http://cs.wwc.edu/~aabyan/460/patterns.html (1 de 3) [18/12/2001 10:37:01]

Patterns

Functional Style Pipeline Functional Style f([ ]) = [ ] f(xs) = fn(fn-1(...f1(f0(xs))...)) where fi(x:xs) = gi(x):fi(xs) fi([]) = [].

Imperative Style

f(x) = g(fn(x), fn-1(x), ... f1(x), f0(x)) {|| f0(x), ..., fn(x)}

Imperative Style

Domain (data) decomposition

Functional Style

Imperative Style

f([]) = [] f(x:xs) = g(x):f(xs) forall x in xs do g(x);

Divide and conquer

Functional Style f(xs) = if stoppingCondition(xs) then baseCase(xs) else gather(f0(x0), ... , fm(xm)) where <x0, ... , xm> = mWayScatter(xs)

Imperative Style

Synchronous Computations

Copyright (c) 1999 by Anthony Aaby. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v0.4 or later (the latest version is presently available at http://www.opencontent.org). Distribution of substantially modified versions of this document is prohibited without the explicit
http://cs.wwc.edu/~aabyan/460/patterns.html (2 de 3) [18/12/2001 10:37:01]

Patterns

permission of the copyright holder. Distribution of this work or any derivative works in whole or in part in standard (paper) book form for commercial purposes is prohibited unless prior permission is obtained from the copyright holder. Last Modified - . Comments and content invited [email protected]

http://cs.wwc.edu/~aabyan/460/patterns.html (3 de 3) [18/12/2001 10:37:01]

http://cs.wwc.edu/~aabyan/460/C2.html

Principles of Concurrency
Synchronization: locks and messages separation of policy and implementation

q q

Processes
q

q q q q q q

Process: locus of control; program counter as it moves through code; path of a token through a Petri network. Quanta: time interval Concurrent processes: only one process executing in a time quanta Parallel processes: more than one process executing in a time quanta Preemptive multitasking: concurrent tasks in an operating system Critical sections: section of a program that accesses shared data Definitions Large-grained process execution time > message passing time Fine-grained process execution time < message passing time Lightweight process process whose setup and runtime overhead is small. Heavyweight process process whose setup and runtime overhead is large. threads, tasks, processes

Properties of Flow-Correct Processes


q q q

Safety: nothing bad happens. Liveness: something good will happen. Fairness: no process is starved.

Timing Diagrams
Active: high; inactive: low

Interleave Matrix Analysis


q q

Axes are labeled with the states of the processes (one process per axes) Each square corresponds to a combined state.

http://cs.wwc.edu/~aabyan/460/C2.html (1 de 2) [18/12/2001 10:37:03]

http://cs.wwc.edu/~aabyan/460/C2.html
q q

Squares surrounding the combined critical section states are called the safety zone. Paths correspond to execution behavior Test-and-Set Spin-lock Queue with wait and Blocking

q q q

Bounded Buffers Path Expressions


q

A path is a regular expression that describes a finite state machine for specifying the order of activation of asynchronous processes. r AB -- A and B are executed in parallel r A+B -- A and B are executed in sequence either A then B or B then A r A^n -- n As in parallel r [A] -- execution of A is optional r (A) -- grouping of processes as in 2(A) meaning A+A r * -- 0 or more as in A^* Given a path expression and a sequence of requests, the requests are processed according to the path expression.

http://cs.wwc.edu/~aabyan/460/C2.html (2 de 2) [18/12/2001 10:37:03]

http://cs.wwc.edu/~aabyan/460/C3.html

Axioms of flow-correctness
Flow-correctness in parallel constructs
q

data flow temporal predicates r UNDEF(x,t) iff x is undefined at time t r USE(x,t) iff x is referenced at time t r DEF(x,t) iff x is assigned a value at time t

Axioms of data dependencies


q

Race conditions r variable is referenced before being defined r variable is updated by two or more processes in an unpredictable order r variable is updated between references when the intention is to update after all references Dependencies r Output dependency: unpredictable ordering of updates OUT(x,t) :- (E dt>0 | DEF(x,t-dt)), DEF(x,t) r Flow dependency: update(define) then reference FLOW(x,t) :- (E dt>0 | DEF(x,t-dt)), USE(x,t) r Antidependency: reference then update ANTI(x,t) :- (E dt>0 | USE(x,t-dt)), DEF(x,t)

Iteration space
When a loop body is unrolled, if flow dependencies exist, they are called loop-carried dependencies. If a flow dependency exists, then it is called a forward dependency. If an antidependency exists, then it is called a backward dependency.

http://cs.wwc.edu/~aabyan/460/C3.html [18/12/2001 10:37:04]

Introduction

Protocols
Communication Protocols
Protocols for the reliable exchange of data between two nodes. Common errors include: lost, duplicate, reordered, and garbled messages.

Balanced Sliding-window Protocol


Designed for the exchange of messages between nodes with a direct connection. Messages may not be
q q q

lost, duplicated, or reordered (fifo delivery)

but may be garbled.

Timer-based Protocol

Routing Algorithms
Destination-based routing All-pairs Shortest-path The Netchange algorithm Routing with Compact Routing Tables Hierarchical Routing

Deadlock-free Packet Switching

http://cs.wwc.edu/~aabyan/460/Protocols.htm (1 de 2) [18/12/2001 10:37:06]

Introduction

Copyright 1998 Anthony A. Aaby -- All rights reserved

Last Modified
Send comments to [email protected]

http://cs.wwc.edu/~aabyan/460/Protocols.htm (2 de 2) [18/12/2001 10:37:06]

Introduction

Fundamental Algorithms
Wave and Traversal Algorithms
General Algorithms
q q q q q q

Ring algorithm Tree algorithm Echo algorithm Polling algorithm Phase algorithm Finn's algorithm

Traversal Algorithms
q q q q

Sequential polling Torus Hypercube Tarry

Depth-first Search Algorithms


q q q q

Classing Awerbuch Cidon Cidon with neighbor knowledge

Election Algorithms
Definition: An election algorithm is an algorithm that satisfies the following properities 1. Each process has the same local algorithm. 2. The algorithm is decentralized, i.e. compation can be initialized by an arbitrary non-empty subset of the processes. 3. The algorithm reaches a terminal configuration in each computation, and in each reachable terminal configuration there is exactly one process in the state leader and all other processes
http://cs.wwc.edu/~aabyan/460/FundAlgorithms.htm (1 de 2) [18/12/2001 10:37:08]

Introduction

are in the state lost. Ring algorithms Arbitrary networks

Termination Detection

Anonymous Networks

Snapshots Synchrony in Networks


Copyright 1998 Anthony A. Aaby -- All rights reserved

Last Modified
Send comments to [email protected]

http://cs.wwc.edu/~aabyan/460/FundAlgorithms.htm (2 de 2) [18/12/2001 10:37:08]

Introduction

Fault Tolerance
Robust Algorithms
Robust algorithms are designed to guarentee the continuous correct behaviour of correctly operating processes in spite of failures occuring in other processes during their execution. Failure models
q q

Initially-dead processes. Does not execute a single step of its local algorithm. Crash model. Excecutes its local algorithm correctly up to some moment, and does not execute any step thereafter. Byzantine behavior. Executes steps that are arbitrary and, not in accordance with its local algorithm. In particular, a Byzantine process sends messages with an arbitrary content.

Stablizing Algorithms
A stabilizing algorithm can be started in any systems configuration, and eventually reaches an allowed state, and behaves according to its specification from then on.

Asynchronous Systems Synchronous Systems Stabilization


Copyright 1998 Anthony A. Aaby -- All rights reserved

Last Modified
Send comments to [email protected]

http://cs.wwc.edu/~aabyan/460/FaultTolerance.htm [18/12/2001 10:37:10]

http://cs.wwc.edu/~aabyan/460/PCN.html

link the resulting file program1.pam creating the executable program myprogram, and then execute the program myprogram pcncomp -c program1.pcn pcncomp program1.pam -o myprogram -mm program1 -mp main myprogram The option -mm indicates the module which contains the procedure which will be called to start the execution of the program. The option -mp is the name of the procedure. The default values are main in both cases. A file with execute privileges containing these commands may be used to compile, link, and execute the program. Such a file is called a shell script.

http://cs.wwc.edu/~aabyan/460/PCN.html [18/12/2001 10:37:12]

SR Lab

Getting Started with SR


The documentation is in the directory {\tt /home/castor/local/sr/doc}. The directory contains an overview (old but useful) and a report on SR (very useful). Both documents are available in PostScipt form and may be viewed using pageview or gs. Some examples of SR programs are found in the directory {\tt /home/castor/local/sr/examples}. Compiling and Running SR programs An SR program is contained in one or more file.sr source files. Globals and resources are stored in one or more source files that have an `.sr' suffix. They are compiled by invoking the compiler with the source file names. The compiler is sr. See the manual page on sr for more information. Simple Programs An SR program is contained in one or more file.sr source files. The compiler, sr, translates the SR source code into a C program, then calls the C compiler to create a .o file for each resource. Source files must be compiled in the correct order to make exports occur before imports. Linking is directed by srl, which acts as a front end to the Unix linker, ld (1). The main resource in the program is specified at this time. One or more .o files of resources are combined with the SR and C runtime libraries to produce an executable program. Compilation and linking takes place in the context of an Interfaces directory, which is used by the compiler and linker for storing and exchanging interface information. A linked SR program that does not use virtual machines is completely self-contained, relying on only those files explicitly referenced by the SR program. Virtual Machines An SR program using virtual machines runs in cooperation with an execution-time manager, srx. Srx starts automatically when the SR program first creates an instance of the predefined {\tt vm} resource, or when it calls the predefined {\tt locate} operation. The srx program is not contained within the SR program; it is loaded from a predetermined location (which can be overridden by the environment variable SRXPATH). If a new version of the SR system is installed, existing programs may need to be rebuilt to be compatible with the new srx An incompatible version of srx aborts with an error message. Distributed Programs A program is truly distributed if it runs on more than one physical computer. From SR's standpoint, any program using {\tt create vm() on n} is treated as a distributed program, even if {\tt n} does not
http://cs.wwc.edu/~aabyan/460/SR.html (1 de 3) [18/12/2001 10:37:14]

SR Lab

specify a different machine. The actual interpretation of {\tt n} is discussed later. Srx uses the rsh (1) command to run remote portions of a distributed program. Only those networked hosts that you can access via rsh are usable by SR. Your login name must be the same on these hosts. It is possible under some circumstances, and with some trickery, to run a distributed program over machines with dissimilar architectures. This is discussed further in Sec. 6 below. In general, though, SR programs should only be distributed over machines with compatible CPU types, such as Vaxes or Suns but not both. (Note: Sun-3 systems can run Sun-2 programs, but not the reverse.) Physical Machine Numbers Integers are used to specify the physical machines upon which new virtual machines are created. Initially, 0 specifies the machine upon which execution commenced, and other integers have default meanings depending on the local network configuration. Every machine with a network usable by SR has a four-byte Internet-style address, usually given in a form something like {\tt 123.45.67.89}. If a physical machine number {\tt n} is between 1 and 255, it specifies the machine whose network address is the same as the current host but with {\tt n} replacing the last byte. To a host with address {\tt 123.45.67.89}, physical machine {\tt 47} is the machine whose address is {\tt 123.45.67.47}. Physical machine numbers above 255, represented in two or more bytes, replace the corresponding number of bytes of the original host's address. The host numbers at your site can be obtained from your network administrator. Some machines have multiple addresses because they are on multiple networks; the first address returned by gethostbyname(3N) is used. Default interpretations of physical machine numbers can be altered by calling {\tt locate}. This allows, indirectly, the specification of remote machines by name. The call {\tt locate(n,hostame)} associates the specified machine with the integer {\tt n}. The second argument, {\tt hostname}, is the symbolic name of some host machine; this is of course installation dependent. This association between {\tt n} and {\tt hostname} affects the subsequent meaning of machine {\tt n} on all virtual machines. In most cases it is advisable to set up explicit associations using {\tt locate} rather than depending on the default mappings. Remote Execution When srx initiates a new virtual machine using rsh, it must execute the SR program on the remote host. Specifying the program's location from the remote host's viewpoint is a difficult problem. An automatic solution is available on systems that support remote disk access (e.g., NFS) with a systematic naming scheme. The SR installer configures an srmap file containing rules for locating and
http://cs.wwc.edu/~aabyan/460/SR.html (2 de 3) [18/12/2001 10:37:14]

SR Lab

naming files. The srmap file is read from a known location by srx; an alternate file can be substituted by defining the environment variable SRMAP. The automatic scheme can be overridden by using a third parameter on a {\tt locate} call: {\tt locate(n,hostame,pathname)} sets {\tt pathname} as the file to be executed by rsh when a virtual machine is created on host {\tt n}. On systems without remote disks, some sort of manual action is usually needed to copy the executable SR program to remote machines. Rcp(1) or rdist(1) can be used for this. The remote location will depend on the srmap file; typically this would be the same location relative to the login directory on both machines, e.g., \verb+~mike/test/a.out+ on both machines. Be sure to recopy the file each time it is rebuilt; mixing old and new versions can lead to disaster. If the automatically generated filename is unsuitable, again an explicit path in a {\tt locate} call can be used to override it. Heterogeneous Execution Distributed SR programs are intended to execute in a homogeneous environment. However, under certain circumstances, dissimilar but related systems can be used. It is usually necessary to compile the identical programs separately under all the different environments and to arrange (calling {\tt locate} if necessary) to execute the correct versions. We offer some guidelines here, but experimentation may also be required. Programs built on Sun-2 systems can distributed to Sun-3 systems without recompilation; however, the reverse is not true. Separately built Sun-2 and Sun-3 programs can also be used. SR programs have been successfully distributed between Sun-3 and Hewlett-Packard 200 systems, which have similar architectures. The identical program was compiled separately on both systems. SR programs have also been successfully run on Vax machines running a mixture a 4.3 BSD and Ultrix systems. Again, the identical program was first compiled twice under the two different environments. Additional SR Tools Although only sr and srl are needed to run SR programs, other tools assist with related tasks. srm creates a make(1) description file for building complex SR programs. srtex and srgrind format SR programs for typesetting.

http://cs.wwc.edu/~aabyan/460/SR.html (3 de 3) [18/12/2001 10:37:14]

CPTR 464 Compiler Design

CPTR 464 Compiler Design - 4 cr. hr.


Description Study of the techniques for translating conventional programming language source into executable machine codes. Topics include: lexical analysis, syntactic analysis and parsing, static and runtime storage management, and code generation. Prerequisite: CPTR 143. This is a project oriented course. You can expect to put in 9-12 hours per week for the class (including lectures) and an additional 3-4 hours per week for the lab/project. Goals Upon completion of the course you will
q q

q q

understand syntax directed programs, be able to construct a lexical analyzer(scanner) using regular expressions and a scanner generator tool, be able to construct a parser from a context-free grammar and a parser generator tool, be able to construct and use a symbol table to support the parsing of context sensitive constructs, and be able to generate machine code equivalents of the basic data types and control structures as the output of a parser. be able to use make and makefiles in project development

Evaluation The course grade is determined by the quantity and quality of work completed on homework assignments, the project, and the tests. The grade expectations document helps to explain the different grades. WEIGHT % & GRADES Project 90% 90 - 100% As Homework 10% 80 - 89% Paper/report 0% 70 - 79% Test Resources
http://cs.wwc.edu/~aabyan/464/ (1 de 3) [18/12/2001 10:37:18]

Bs Cs Ds

0% 60 - 69%

CPTR 464 Compiler Design

Lecture notes and schedule The project Compiler Construction Script Textbook: Watt, David and Brown, Deryck Programming Language Processors in Java Prentice Hall 2000 (ISBN 0-130-25786-9) Reading List: r Appel, Andrew W. Modern Compiler Construction in Java Cambridge University Press 1998 (ISBN 0-521-58388-8) r Fraser and Hanson A Retargetable C Compiler: Design and Implementation Benjamin Cummings 1995 r Aho, Sethi, Ullman Compilers: Principles, Techniques and Tools -- (encyclopedic, the `dragon book') r Holub Compiler Construction in C -- (BU, tools, C) r Fischer & LeBlanc Crafting a Compiler -- (TD, BU, tools, Ada) r Waite & Goos Compiler Construction -- (TD,BU,Pascal) r Proebsting, T. A., 1995. BURS Automata Generation. ACM TOPLAS 17, 3 461-186. r Bacon et.al. 1994. Compiler Transformations for High-Performance Computing. ACM Computing Surveys 26, 4 r Aaby, A. Compiler Design with Flex and Bison r Holmes, Jim Object-Oriented Compiler Construction Prentice-Hall 1995 r Holmes, Jim Building Your Own Compiler with C++ Prentice-Hall 1995 Tools: r Cool: portable project for compiler construction r Lex(Flex), YACC(Bison) r Eli Compiler Construction System r PCCTS(Purdue Compiler-Construction Tool Set) r Prolog Parser Tools (Aaby) r JavaCC - Java Compiler Compiler WWW: http://www.idiom.com/free-compilers Usenet News Groups: comp.compilers, comp.compilers.tools.pccts Technical Journals: JACM, TOPLAS, SigPlan Outdated stuff labs

http://cs.wwc.edu/~aabyan/464/ (2 de 3) [18/12/2001 10:37:18]

CPTR 464 Compiler Design

Copyright (c) 2001 by Anthony Aaby. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at http://www.opencontent.org). Last Modified - . Comments and content invited [email protected]

http://cs.wwc.edu/~aabyan/464/ (3 de 3) [18/12/2001 10:37:18]

Compiler Design Project

Compiler Design Project


The compiler design and implementation project is expected to require 80-90 hours of out of class activity and is likely to be the largest project you have attempted as an undergraduate. The project should be done in teams of at least two. You may want to experiment with the Extreme Programming method and do pairs programming. A more ambitious project than detailed here will require a larger team effort and strong software engineering skills and may involve the use of software tools to assist in the construction of the compiler. Such tools are necessary for table driven methods and are optional for the method of recursive descent. Students who would like to work on a different problem may propose an alternative project at any point in the quarter. The project must be well-defined, approved by the instructor, and involve roughly the same amount of work as the remaining assignments. Your project should be one of the following: 1. Given a partial implementation, complete the implementation. Project grade will be based on the fully impletemented feature set beyond those fully implemented features in the partial implementation. r Recommended for Spring 2001: Extend the mini-Triangle compiler implementation from the textbook Watt & Brown, Programming Language Processors in Java PrenticeHall 2000. r Implement the Tiger programming language from Appel Modern Compiler Construction in Java Cambridge University Press1998 2. Design and implement a programming language or a subset of an existing language. 3. Special projects. These should not be attempted unless there is a reasonable chance of success. r Compiler construction tools. r Heap manager. r Register allocation module.

Copyright (c) 2001 by Anthony Aaby. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at http://www.opencontent.org).

http://cs.wwc.edu/~aabyan/464/Project/ (1 de 2) [18/12/2001 10:37:26]

Compiler Design Project

Last Modified - . Comments and content invited [email protected]

http://cs.wwc.edu/~aabyan/464/Project/ (2 de 2) [18/12/2001 10:37:26]

Compiler Design

CPTR 464 Compiler Design 4


Schedule (subject to change without notice)
Lecture Notes Introduction - Script Old - Introduction to Compilers Text 1 App B Assignments 1. Read Chapter 1 2. Insure that you have available a Java environment
q

Due

From java.sun.com, obtain and install r the Java 2 SDK r Forte for Java (IDE) r Java 2 Runtime Environment Insure that you have available the Triangle compiler and interpreter From www.dcs.gla.ac.uk/~daw/books/PLPJ obtain and install r the Triangle compiler and TAM interpreter Insure that the Java environment, the Triangle compiler, and TAM interpreter work and you can use them by create a small Triangle program, compile and execute it. Write up a HOWTO installation and user's guide for the Triangle environment. Optional: obtain and install JLex CUP SPIM (optional)

q q

q q q

Language Processors Compilation Syntactic Analysis Grammars Syntactical specification

2 3 App D 4 Construct a compiler front end (parser, scanner, & generate an AST) for a subset of Simple Context-free grammar for Simple
program ::= LET definitions IN command_sequence END

from www.cs.princeton.edu/~appel/modern/java Read chapter 2; no lectures

End of 3rd week

Top Down Parsing LL(1) Grammar RD Parser Script Bottom Up Parsing notes on:

definitions ::= e | INTEGER id_seq IDENTIFIER . id_seq ::= e | id_seq IDENTIFIER , command_sequence ::= e | command_sequence command ; command := | | | | | SKIP READ IDENTIFIER WRITE exp IDENTIFIER := exp IF exp THEN command_sequence ELSE command_sequence FI WHILE bool_exp DO command_sequence END

http://cs.wwc.edu/~aabyan/464/Schedule.html (1 de 3) [18/12/2001 10:37:30]

Compiler Design

CUP yacc (bison); Yacc/Bison Lexical Analysis Scanner script JLex lex - (flex) Lex/Flex with yacc/bison Abstract Syntax

exp ::= exp + term | exp - term | term term :: term * factor | term / factor | factor factor ::= factor^primary | primary primary ::= NUMBER | IDENT | ( exp ) bool_exp ::= exp = exp | exp < exp | exp > exp

End of 5 5th week End 6 Run-time Organization of App By this point, you should have finished making the necessary changes to the contextual analyzer. Run-Time Organization 6th C week Code Generation 7 Instruction Selection App Stack Machine C Code Generation (1.5) End of Interpretation 8 By this point you should have finished making the necessary changes to the code generator. 8th week Optimization 9 Final Exam 11 Project presentation and/or written exam postscript html Contextual Analysis Contextual Analysis Symbol Tables By this point, you should have finished adding the syntactical extensions to your project (modifications to both parser and scanner).

Example
A complete compiler using flex and bison

Not covered:
1. RE to NFA 2. NFA to DFA conversion 3. Bottom up parser generation Previous Projects Object-Oriented Methods Analysis & Design

Copyright (c) 2001 by Anthony Aaby. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at http://www.opencontent.org).

http://cs.wwc.edu/~aabyan/464/Schedule.html (2 de 3) [18/12/2001 10:37:30]

Compiler Design

Last Modified - . Comments and content invited [email protected]

http://cs.wwc.edu/~aabyan/464/Schedule.html (3 de 3) [18/12/2001 10:37:30]

OS Paper & Report

Compiler Design Paper & Report

Write a report (term paper ~10 pages) and make a presentation in class on one of the following topics:
q

None for Spring 2001

Copyright (c) 2000 by Anthony Aaby. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at http://www.opencontent.org). Last Modified - . Comments and content invited [email protected]

http://cs.wwc.edu/~aabyan/464/Reports.html [18/12/2001 10:37:32]

http://cs.wwc.edu/~aabyan/464/Final.html

CPTR 464 Compiler Design Comprehensive Final Exam


Name:

Problem Max. Score Score 1 2 3 4 5 6 7 8 9 Total Self evaluation: Letter grade you feel you deserve for this test: Letter grade you feel you deserve for the course: Instructions: Comprehensive and complete answers are not expected however, your grade depends on whether your answer makes it clear that you understand the concept and are capable of producing a high quality implementation. Each answer is expected to be confined to a single sheet of paper. 20 20 20 20 20 20 20 20 20 180

1. (20 points) Describe the phases of a compiler. 2. (20 points) Compare and contrast the structure of single pass and multipass compilers. 3. (20 points) Explain what regular expessions are and how to use them to describe the tokens of a programming language. 4. (20 points) Explain and illustrate how to implement a hand written scanner from regular expression descriptions of tokens. 5. (20 points) Explain what a context-free grammar is and how to use one to describe the syntax of a programming language.
http://cs.wwc.edu/~aabyan/464/Final.html (1 de 2) [18/12/2001 10:37:34]

http://cs.wwc.edu/~aabyan/464/Final.html

6. (20 points) Explain and illustrate how to construct a recursive descent parser from a contextfree grammar. 7. (20 points) Explain contextual analysis and illustrate how it is done. Include a disscussion on symbol tables. 8. (20 points) Describe the required run time support for nested blocks and recursion. 9. (20 points) Describe and illustrate the key code generation issues for a stack machine.

http://cs.wwc.edu/~aabyan/464/Final.html (2 de 2) [18/12/2001 10:37:34]

Programming language design & implementation

Language design and implementation


The Programming Language Life Cycle Purpose Entry Criteria To guide a team though developing a programming language and compiler.
q q q

A programming language needs statement Materials, facilities, and resources for team support. A development team

General Phases Acitivities 1 Design

The following phases are not sequential but proceed in parallel and are interative with feed back from one phase to another. Description Produce a language design to meet the need/requirement. The overriding criterion for a language's syntax is that programs should be readable and should facilitate semantic understanding of the program. Therefore, the syntactic forms and the semantic concepts should be (more or less) in one-to-one correspondence.

Specification

q q

Formalize the design with a formal or informal specification (syntax and semantics) to facilitate communication of the design to other people. Use the BNF, EBNF or syntax diagrams To encourage sematic simplicity and regularity produce a formal semantic specification.

Implementation

1. Produce a prototype implementation (interpreter, an interpretive compiler, ...) to assist in refining the design and specification. 2. Produce an industrial-strength compiler when the language design has stabilized with compile and run time error reporting and recovery and optimization features.
q

Manuals and training guides

q q

Language specification Programmer's guide Tutorial Industrial-strength compiler Manuals and Training guides

Exit criteria

http://cs.wwc.edu/~aabyan/464/Project/Script.html (1 de 2) [18/12/2001 10:37:36]

Programming language design & implementation

Copyright (c) 2001 by Anthony Aaby. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at http://www.opencontent.org). Last Modified - . Comments and content invited [email protected]

http://cs.wwc.edu/~aabyan/464/Project/Script.html (2 de 2) [18/12/2001 10:37:36]

Compiler Design

Compiler Construction using Flex and Bison


Anthony Aaby

Contents
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. Introduction The Parser The Scanner Context Optimization Virtual Machines StackMachine Code Generation Peep hole optimization Exercises Flex Bison

Book in .dvi format Book in .ps.gz format

1996 by A. Aaby

http://cs.wwc.edu/~aabyan/464/Book/ [18/12/2001 10:37:39]

Parser Tools in Prolog

Parser Tools in Prolog


This document describes some tools for processing context-free grammars into LL(1) form. The following tools are available
q q q q q

Description of context-free grammar Removal of left recursion Left factoring Computation of first and follow sets Parse tables and table-driven parser

Context-Free Grammar
The specification of the contex-free grammar for a language consists of four items, the specification of the terminal symbols of the language, the specification of the nonterminals, the productions or derivation rules, and the start symbol of the grammar. As an example of a context-free grammar, here is a specification of the context-free grammar for arithmetic expression. terminal('+'). terminal('*'). terminal('('). terminal(')'). terminal(id). nonterminal(e). nonterminal(t). nonterminal(f). start(e). p(e,[t]). p(e,[e,'+',t]). p(t,[f]). p(t,[t,'*',f]). p(f,[id]). p(f,['(',e,')']). % expression % term % factor

Removal of Left-Recursion
Note that the second production for expression in the grammar of the previous section is left recursive. The use of such a production in the design of a recursive descent parser would result in an infinite loop. Sometimes left recursion may be eliminated. terminal('+'). terminal('*'). terminal(id). terminal('('). terminal(')'). nonterminal(e). nonterminal(e0). nonterminal(t).
http://cs.wwc.edu/~aabyan/464/ParserTools.html (1 de 8) [18/12/2001 10:37:43]

Parser Tools in Prolog

nonterminal(t0). nonterminal(f). start(e). p(e,[t,e0]). p(e0,['+',t,e0]). p(e0,[epsilon]). p(t,[f,t0]). p(t0,['*',f,t0]). p(t0,[epsilon]) . p(f,['(',e,')']). p(f,[id]). Here is a Prolog program which removes left recursion if possible. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Removal of Left Recursion % Waite and Goos: p. 126 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% :- dynamic p/2 . :- dynamic nonterminal/1 . remove_left_recursion :- setof(N,nonterminal(N),Ns), rm_left_rec([],Ns). rm_left_rec(Xjs,[]). rm_left_rec(Xjs,[Xi|R]) :- step2(Xjs,Xi), step3(Xi,Xip,Xjs), append(R,Xip,Rs), append(Xjs,[Xi],NXjs), rm_left_rec(NXjs,Rs). step2([],Xi). step2([Xj|Xs],Xi) :- e_bagof(W,p(Xi,[Xj|W]),Ws), Ws \= [], Ws \= [[]], e_bagof(XXj,p(Xj,XXj),XXs), retractall(p(Xi,[Xj|Wx])), replace_each0(Xi,Xj,Ws,XXs), step2(Xs,Xi). step2([Xj|Xs],Xi) :- step2(Xs,Xi). replace_each0(Xi,Xj,[],_). replace_each0(Xi,Xj,[W|Ws],XXs) :- replace_each00(Xi,Xj,W,XXs), replace_each0(Xi,Xj,Ws,XXs). replace_each00(Xi,Xj,[],XXs). replace_each00(Xi,Xj,W,[]). replace_each00(Xi,Xj,W,[XXj|XXs]) :- append(XXj,W,XXjW), assert(p(Xi,XXjW)), replace_each00(Xi,Xj,W,XXs). step3(Xi,[Xip],Xjs) :- e_bagof(W,p(Xi,[Xi|W]),Ws), Ws \= [], Ws \= [[]], e_bagof([K|X],(p(Xi,[K|X]),K\=Xi),Xs), retractall(p(Xi,Rhs)), newN(Xi,Bi), assert(nonterminal(Bi)), assert(p(Bi,[epsilon])),

http://cs.wwc.edu/~aabyan/464/ParserTools.html (2 de 8) [18/12/2001 10:37:43]

Parser Tools in Prolog

replace_each1(Xi,Bi,Ws,Xjs), replace_each2(Xi,Bi,Xs). step3(Xi,[],Done). newN(Xi,Xip) :- atomtolist(Xi,L), int(N), atomtolist(N,Ln), append(L,Ln,Lp), atomtolist(Xip,Lp), \+ nonterminal(Xip). int(0). int(N) :- int(M), N is M+1. replace_each1(Xi,Bi,[],Xjs). replace_each1(Xi,Bi,[W|Ws],Xjs) :- append(W,[Bi],WBi), assert(p(Bi,WBi)), replace_each1(Xi,Bi,Ws,Xjs). replace_each2(Xi,Bi,[]). replace_each2(Xi,Bi,[XX|XXs]) :- append(XX,[Bi],XXBi), assert(p(Xi,XXBi)), replace_each2(Xi,Bi,XXs).

Left-Factoring
Another common problem is when two productions for the same nonterminal share a common prefix on the right-hand side of the productions. The common prefix makes it impossible to choose (with a fixed amount of look-ahead) the proper production in top-down parsing. This elimination of the common prefix is called left-factoring. Here is a grammar for the if-then-else construct. terminal(a). terminal(b). terminal(e). terminal(i). terminal(t). nonterminal(ss). nonterminal(cc). start(ss). p(ss,[i,cc,t,ss,e,ss]). p(ss,[i,cc,t,ss]). p(ss,[a]). p(cc,[b]). Left factoring the grammar produces the following result. terminal(a). terminal(b). terminal(e). terminal(i). terminal(t). nonterminal(ss). nonterminal(cc). nonterminal(ss0). start(ss).

http://cs.wwc.edu/~aabyan/464/ParserTools.html (3 de 8) [18/12/2001 10:37:43]

Parser Tools in Prolog

p(ss,[i,cc,t,ss,ss0]). p(ss,[a]). p(ss0,[e,ss]). p(ss0,[epsilon]). p(cc,[b]). The following code left-factors the given grammar. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Left Factoring %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% do_left_factoring :- setof(N,nonterminal(N),Ns), do_lf(Ns). do_lf([]). do_lf([A|Ns]) :- p(A,R1), p(A,R2), R1 \= R2, maxcommon(R1,R2,C,R1p,R2p), C \= [], newN(A,Ap), assert(nonterminal(Ap)), restofcommon(A,C,Ap), append(C,[Ap],Rhs), assert(p(A,Rhs)), do_lf([A|Ns]). do_lf([A|Ns]) :- do_lf(Ns). restofcommon(A,C,Ap) :- p(A,Rhs), append(C,R,Rhs), retract(p(A,Rhs)), \+ p(Ap,R), ((R =[], \+ p(Ap,[epsilon]), assert(p(Ap,[epsilon]))); (R\=[], \+ p(Ap,R), assert(p(Ap,R)))), restofcommon(A,C,Ap). restofcommon(A,C,Ap). maxcommon([X|R1],[X|R2],[X|C],R1p,R2p) :- maxcommon(R1,R2,C,R1p,R2p). maxcommon(R1,R2,[],R1,R2).

First and Follow Sets


Even if left-recursion can be eliminated and the productions have been left-factored, we may not a have a grammar which is suitable for top-down parsing with one symbol of look-ahead. For example, in the following grammar it is not possible to choose between the productions for the nonterminal aa because x is also derivable from the nonterminal bb. terminal(x). terminal(z). nonterminal(aa). nonterminal(bb). nonterminal(cc). start(aa). p(aa,[bb,z]). p(aa,[x,z]). p(bb,[cc]). p(bb,[cc,bb]). p(cc,[x]).
http://cs.wwc.edu/~aabyan/464/ParserTools.html (4 de 8) [18/12/2001 10:37:43]

Parser Tools in Prolog

The set of initial terminals derivable from the right-hand side rhs of a production is called first(rhs). For this grammar, the first sets are: first([bb,z],[x]) first([x,z],[x]) first([cc],[x]) first([cc,bb],[x]) first([x],[x]) The set of first sets are computed by the following program. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % First Sets %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % First(A) = Fs where % x in Fs iff A =>* xB % epsilon in Fs iff A =>* epsilon %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% :- dynamic first/2 . firstsets :- setof(Rhs,N^p(N,Rhs),Rhss), mk_firsts(Rhss). mk_firsts([]). mk_firsts([Rhs|Rhss]) :- first_set(Rhs,Fs), assert(first(Rhs,Fs)), mk_firsts(Rhss). first_set(L,Fs) :- e_setof(X,a_first(L,[],X),Fs). a_first([],V,epsilon). a_first([epsilon],V,epsilon) :- !. a_first([epsilon|L],V,X) :- a_first(L,V,X). a_first([X|L],V,X) :- terminal(X). a_first([N|L],V,X) :- nonterminal(N), \+ in(N,V), p(N,LN), append(LN,L,NL), a_first(NL,[N|V],X).

When the production p(x,[epsilon]) is included in the set of productions, selection must also be based on the set of terminals which can follow a given non-terminal. We can summarize the previous discussion as follows. A grammar is LL(1) ( suitable for top-down parsing with one symbol of look ahead ) iff it satisfies the following two rules. 1. The sets of initial symbols of all sentences that can be generated from the right-hand sides of a given non-terminal must be disjoint. 2. The set of initial symbols of each non-terminal which generates the empty string must be disjoint from the set of symbols which can follow it. The code which constructs the set of initial terminals which can follow a non-terminal follows. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Follow Sets %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Follow(A) = Fs where % x in Fs iff S =>* aAxb
http://cs.wwc.edu/~aabyan/464/ParserTools.html (5 de 8) [18/12/2001 10:37:43]

Parser Tools in Prolog

% epsilon in Fs iff S =>* aA %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% :- dynamic follow/2 . followsets :- setof(N,(nonterminal(N),start(S),N \= S),Ns), mk_mt_follows(Ns,MT), mk_follows([(S,[eof])|MT],FS), assertFS(FS). mk_mt_follows([],[]). mk_mt_follows([N|Ns],[(N,[])|MT]) :- mk_mt_follows(Ns,MT). mk_follows(CFS,AFS) :- p(A,L), append(Alpha,[B|Beta],L), nonterminal(B), Beta \= [], first_set(Beta,FirstBeta), delete(epsilon,FirstBeta,FB), append(Fp,[(B,FSB)|RFs],CFS), union(FB,FSB,NFSB), \+ samesets(FSB,NFSB), append(Fp,[(B,NFSB)|RFs],NCFS), mk_follows(NCFS,AFS). mk_follows(CFS,AFS) :- p(A,L), append(Alpha,[B],L), nonterminal(B), append(Fp,[(B,FSB)|RFs],CFS), in((A,FSA),CFS), union(FSA,FSB,NFSB), \+ samesets(FSB,NFSB), append(Fp,[(B,NFSB)|RFs],NCFS), mk_follows(NCFS,AFS). mk_follows(CFS,AFS) :- p(A,L), append(Alpha,[B|Beta],L), nonterminal(B), Beta \= [], first_set(Beta,FirstBeta), in(epsilon,FirstBeta), append(Fp,[(B,FSB)|RFs],CFS), in((A,FSA),CFS), union(FSA,FSB,NFSB), \+ samesets(FSB,NFSB), append(Fp,[(B,NFSB)|RFs],NCFS), mk_follows(NCFS,AFS). mk_follows(FS,FS). assertFS([]). assertFS([(N,Fs)|FS]) :- assert(follow(N,Fs)), assertFS(FS).

Parsing Table and an LL(1) Parser


The set of first and follow sets may be used to construct a table which can be used to guide the parser of an language which has an LL(1) grammar. The table is indexed by a non-terminal and the current input symbol. The following code constructs such a table. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Construction of Parsing Tables %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% do :- firstsets, followsets, make_LL1_table. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Construction of Predictive Parsing Table % Aho & Ullman: Algorithm 5.4 p.190
http://cs.wwc.edu/~aabyan/464/ParserTools.html (6 de 8) [18/12/2001 10:37:43]

Parser Tools in Prolog

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% :- dynamic table/3 . make_LL1_table :- setof((N,Rhs),p(N,Rhs),Productions), make_entries(Productions). make_entries([(N,Rhs)|Productions]) :- make_an_entry((N,Rhs)), make_entries(Productions). make_an_entry((N,Rhs)) :- first(Rhs,First), each_entry((N,Rhs),First). each_entry((N,Rhs),[]). each_entry((N,Rhs),[eof]). % 2. each_entry((N,Rhs),First) :- in(T,First), terminal(T), delete(T,First,Rfirst), table(N,T,(N,Rhs)),!, each_entry((N,Rhs),Rfirst). each_entry((N,Rhs),First) :- in(T,First), terminal(T), delete(T,First,Rfirst), assert(table(N,T,(N,Rhs))), each_entry((N,Rhs),Rfirst). % 3. each_entry((N,Rhs),First) :- in(epsilon,First), follow(A,Follow), each_terminal((N,Rhs),Follow), eof_part((N,Rhs),Follow), table(N,T,(N,Rhs)), delete(epsilon,First,Rfirst), each_entry((N,Rhs),Rfirst). eof_part((N,Rhs),Follow) :- in(eof,Follow), table(N,eof,(N,Rhs)),!. eof_part((N,Rhs),Follow) :- in(eof,Follow), assert(table(N,eof,(N,Rhs))). eof_part((N,Rhs),Follow). each_terminal((N,Rhs),[]). each_terminal((N,Rhs),[T|Follow]) :- table(N,T,(N,Rhs)),!, each_terminal((N,Rhs),Follow). each_terminal((N,Rhs),[T|Follow]) :- assert(table(N,T,(N,Rhs))), each_terminal((N,Rhs),Follow). each_terminal((N,Rhs),[epsilon|Follow]) :- each_terminal((N,Rhs),Follow). each_terminal((N,Rhs),[ eof|Follow]) :- each_terminal((N,Rhs),Follow). A parser uses the table generated by the previous program as follows. Initially the start symbol of the grammar is placed on a stack. Then the next two rules are followed until the input is empty or a situation arises for which there is no entry in the table. 1. If the current input symbol and the stack top symbol are the same, then pop the stack and consume the input symbol. 2. If the stack top symbol is a non-terminal then consult the table, pop the stack and push the table entry onto the stack. Here is the code for an LL(1) parser. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

http://cs.wwc.edu/~aabyan/464/ParserTools.html (7 de 8) [18/12/2001 10:37:43]

Parser Tools in Prolog

% LL(1) Parser Program % Aho & Ullman: p.184,186 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ll_1_parser :- start(S), input(Input), ll_1_parser([S,eof],Input). ll_1_parser([],[]). ll_1_parser([T|Stack],[T|Input]) :- ll_1_parser(Stack,Input). ll_1_parser([N|Stack],[X|Input]) :- table(N,X,(N,Rhs)), append(Rhs,Stack,NStack), ll_1_parser(NStack,[X|Input]). ll_1_parser(Stack,Input) :- error_recovery_routine(Stack,Input).

Here are some miscellaneous predicates required by the previous code. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Miscellaneous Predicates %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% append([],L,L). append([X|A],B,[X|L]) :- append(A,B,L). in(X,[X|L]). in(X,[Y|L]) :- in(X,L). union([],B,B). union(A,[],A). union([X|A],B,C) :- in(X,B), union(A,B,C). union([X|A],B,[X|C]) :- \+ in(X,B), union(A,B,C). subset([],B). subset([X|A],B) :- in(X,B), subset(A,B). samesets(A,B) :- subset(A,B), subset(B,A). delete(X,[],[]). delete(X,[X|R],R). delete(X,[Y|R],[Y|L]) :- X \= Y, delete(X,R,L). e_bagof(A,B,C) :- bagof(A,B,C),!. e_bagof(A,B,[]). e_setof(A,B,C) :- setof(A,B,C),!. e_setof(A,B,[]). sort(List,Sorted) :- sort(List,[],Sorted). sort([],Sorted,Sorted). sort([X|List],PSort,Sorted) :- insert(X,PSort,Psort), sort(List,Psort,Sorted). insert(X,[],[X]). insert(X,[Y|List],[X,Y|List]) :- X @=< Y. insert(X,[Y|List],[Y|ListP]) :- X @> Y, insert(X,List,ListP).

1996 by A. Aaby

http://cs.wwc.edu/~aabyan/464/ParserTools.html (8 de 8) [18/12/2001 10:37:43]

CPTR 464 Compiler Design Laboratories

Compiler Design: Labs


Preliminaries
Each student must maintain a Lab Journal. The journal is a written record of the activities and changes made to the original Minipas compiler which led to the completed project. The journal entries must be dated and summarize
q q q q

all ideas, all design decisions, all code modifications, and all problems encountered and the solutions found.

The journal should be complete enough to allow someone else to reproduce the sequence of activities which led to the completed project.

The Labs
1. Introduction to the Minipas Compiler r ftp /pub/compiler.tar from gboro.rowan.edu r tar xvf compiler.tar r change cc to gcc in mk and makefile files r change mk to execute rights r run mk r test resulting system 2. Lexical Analysis: Lex & Flex r ~aabyan/Pub/Lex r Construct a lex program to count characters, words and lines r Construct a lex program to convert lower case to upper case r Construct a lex program to convert English to Morse Code r Construct a lex program to print out the following token class numbers for Pascal source input. 1. Identifier 2. Numeric constant 3. := 4. Comparison Operator 5. Arithmetic Operator 6. String Constant 7. Keyword
http://cs.wwc.edu/~aabyan/464/464Labs.html (1 de 2) [18/12/2001 10:37:47]

CPTR 464 Compiler Design Laboratories

3.

4.

5.

6.

7.

8.

8. Comments r Extend the Minipas compiler to recognize ... Syntax Analysis: YACC & Bison r ~aabyan/Pub/Yacc r Construct a Yacc program to implement a post-fix notation calculator r Construct a Yacc program to implement an infix notation calculator r Construct a Yacc program to implement a multifunction algebraic notation calculator r Construct a Yacc program to generate stack machine code for arithmetic expressions. r Extend the Minipas compiler to recognize ... Contextual Analysis: The Symbol Table r Attributes: Stack information r Context requirements r Symbol Table ADT: Functions, contents (name and attibutes) r Symbol Table Implementation: list, tree, hash table; Blocks & Scope r Translation grammars Run-time Support r Monolithic Program: Data Segment, Code Segment r Expressions: expression stack r Subroutines: non-recursive, recursive r Nested environments r Symbol table extensions Intermediate Code r Abstract Syntax Trees r Quads (three address code -- op, arg1, arg2, result) The Interpreter r Accumulator machine r Stack machine r Register machine Code Generation

http://cs.wwc.edu/~aabyan/464/464Labs.html (2 de 2) [18/12/2001 10:37:47]

CPTR496,7,8 Seminar

CPTR496, 497, & 498 Seminar

Description Presentation and discussion of current topics of interest with computer science. Each student is required to conduct an approved design project from conception to final oral and written reports. Prerequisite: Senior standing in computer science. Each class session each you will be expected to report on your progress and plans for the next week. Over the course of the year, the project will consume at least 120 hours. Evaluation The course grade is determined by the quantity and quality of work completed on the project. The oral report on the project must be presented to the computer science faculty and students in the spring quarter. The written report must follow the style of articles in professional journals but must also include a title page and a table of contents. The use of LaTeX is encouraged. Course Goal Upon completion of this course you will have completed a project that is the capstone of your academic work. It showcases your strengths, skills and interests in Computer Science. Resources Ian Parberry How to present a paper in theoretical computer science SIGACT News19, 2 (1988), pp. 43-47 Available online. McGeoch & Moret How to present a paper on experimental work with algorithms SIGACT News 30, 4 (1999) pp. 85-90 Basse, Sara A Gift of Fire: Social, Legal, and Ethical Issues in Computing Prentice Hall 1997
http://cs.wwc.edu/496/ (1 de 2) [18/12/2001 10:37:53]

CPTR496,7,8 Seminar

Oz, Effy, Ethics for the Information Age B&E Tech 1994. Huff & Finholt Social Issues in Computing McGraw-Hill 1994. Perrolle, Judith A., Computers and Social Change Wadsworth 1987. Usenet depends on project domain but the following are recommeded for software engineering issues: comp.software-eng, comp.software.licensing, comp.software.testing, comp.specification, comp.specification.z . Previous Projects

http://cs.wwc.edu/496/ (2 de 2) [18/12/2001 10:37:53]

Senior Projects

Senior Projects
The senior project is to be the capstone of your academic work here at WWC. It is intended to showcase your strengths, skills and interests in computer science to the Computer Science faculty, prospective employers and/or graduate schools. Projects may range from concerns central to computer science, computer engineering, and computer information science to computer applications in other domains. Suitable projects may involve the design and implementation of software or hardware or may be theoretical or experimental in nature. The following pages describe some possible projects. Software projects are expected to conform to good software engineering practices and must be complete with a specification document, a design document, well documented code and a user's manual. Theoretical projects are expected to be summarized in a technical report. It should conform in style to typical published papers in Computer Science. Assignments and grade sheet

Topics
Algorithms and data structures
q q q q

Develop an algorithm to ... Find a better algorithm to ... Develop a parallel algorithm for... ...

Architecture
q

q q q

Construct a simulator for an alternative architectures (Aaby) r P-machine r SECD-machine r Lambda machine r Logic Machine VLSI -- implement a lambda calculus machine (Aaby, Aamodt) Construct a universal assembly language and assembler. (Aamodt, Aaby) ...

http://cs.wwc.edu/496/Project.html (1 de 4) [18/12/2001 10:37:55]

Senior Projects

Artificial Intelligence
q q q q q

An expert system for ... (Aaby) A neural net to ... (Aamodt) A natural language ... (Aaby,Klein) An automated reasoning ... (Aaby) A game ...

Database
q

Do a performance analysis for Oracle on NT and Linux

Human Computer Interaction


q q q q q q q q q q q q

GUI Use XML to describe a windowing environment. Speech Synthesis Speech Recognition Handicapped Access Develop an editor ... Develop a user interface ... Utilize computer graphics to ... Perform image processing to ... Produce a computer animation of ...WEB... ...

Numerical and Symbolic Computation Operating Systems


q q q q q q q

Design and implement an OS or portions an OS. Add/Modify features of an OS or Network Do something with Unix(NetBSD, Linux, etc.), Mach, Ameoba, OS2, Windows NT Collect, modify, develop tools for monitoring, analyzing and/or simulating a network. Develop sys admin materials for the NT environment Develop sys admin materials for networking ...

Programming Languages
q

Design a multiparadigm programming language

http://cs.wwc.edu/496/Project.html (2 de 4) [18/12/2001 10:37:55]

Senior Projects
q q

Design and implement a programming language Compare language based memory managers (including garbage collectors) to OS memory managers. Compilers etc. r Construct a universal assembly language and assembler. (Aamodt, Aaby) r Use ELI to construct a compiler r Construct a compiler for ??? r Develop a hardware (VLSI) lambda calculus interpreter r Complete the development of Prolog based compiler writing tools. r Port Aaby's Prolog based compiler example to PCN. r Construct/assemble supporting routines for a compiler. r Translate Lucent Technologies Limbo to Java r Construct a compiler to translator SPECS to C++ (Wether & Conway (1996) "A Modest Proposal: C++ Resyntaxed" ACM SIGPLAN 31:11 Nov 1995 p 74.) Runtime Environment r SECD-machine (Lispkit) r Lambda machine: a lambda calculus interpreter (parallel) r Prolog machine (Prologkit)

Software Engineering
q q

Specify, design, implement and formally verify the correctness of ... ...

Social and Professional Issues Miscellaneous


Projects may span more than one area of Computer Science. For example, a project could involve the development of a distributed algorithm thus combining algorithms, operating systems and software engineering.
q q q

q q q

Construct a program to model ... Configure a Linux workstation for scientific work (Chemistry, Engineering) Construct a project management systems r web based r enter project assignments r review progress r adjust assignments Construct a simulation of a network Construct a program to simulate ... Develop a web based grade book which provides restricted access for students and full access for the instructor & grader. Use Java. Provide interface to administrative database to facilitate access to class lists and grade submission. Hint modify Ken Wiggins' grade program.

http://cs.wwc.edu/496/Project.html (3 de 4) [18/12/2001 10:37:55]

Senior Projects
q

Develop an electronic form to submit contract teacher information should include authentication. Develop an automated environment for managing the routine work of the WWC Curriculum Committee. The environment should provide for r Electronic form submission -- must provide source authentication r Electronic signature submission -- originating department and other required signatures. r Public browsing of submissions. r Record of committee action r Generate the committee Minutes r Generate a report to Faculty Senate r Allow for additional agenda items

Last update: Send comments to: [email protected]

http://cs.wwc.edu/496/Project.html (4 de 4) [18/12/2001 10:37:55]

Senior Projects

Senior Projects
2000-2001
Graham, Todd Halvorsen, Chad Mueller, Brett Rodriguez, Sam Shrock, Court Van Dolson, Ray Woehler, Aaron

1999-2000
Bowman, Cliff Wesslen, Todd

1998-1999
Beeson, Eric Buchheim, Hans

1997-1998
Fortiner, Samuel Hanson, Eric Reinhardt, Martin Vliet, John

1996-1997
Driesen, Erwin Parallel Programming with MPI Francis, Karl

http://cs.wwc.edu/496/Projects/ (1 de 2) [18/12/2001 10:37:58]

Senior Projects

Power PC 604 Simulator and Assembler

1995-1996
Downs, Warren. 1. Survey of Minimal OSs Engelman, John. 1. Survey of Network Analysis Tools 2. Network Analysis Tool Design Proposal 3. Network Sniffer Implementation Foster, Mark. 1. Multimedia Applications on the WWW s Example HTLM document: Maintaining a Todo and Done lists s A syllabus for WEB based Multimedia for secondary teachers. s Design and implementation of a web server. McNeil, James. 1. Computer Assisted Learning s Graphical user interface for rote memorization of arithmetic tables 2. Project Design Proposal Russell, Timothy. 1. Computer Based Language Instruction Tools

1994-1995
Shannon Dobbins, Paul Ford, & Roger Santo Electronic Implementation of Curriculum Committee Forms

Last update:

http://cs.wwc.edu/496/Projects/ (2 de 2) [18/12/2001 10:37:58]

INFO250 System Software

INFO 150 Software Application 1


Bulletin Description Study of application software from a user perspective. Topics vary and may be repeated for credit when topics vary. Prerequisites vary depending on the software package and level. Does not apply toward a major or minor in Computer Science. Additional Information These are practical (non-theoretical) courses dealing with application software packages requiring about 30 clock hours of work. Some of the course materials are interactive workbooks meaning that the student is expected to have an appropriate computing environment available or in some cases, a web based interface may be available. These courses are appropriate for highly motivated students, who are resourceful, capable of independent work, and are seeking to learn a specific skill. Students are expected to obtain their own textbooks. Evaluation Course grades may be determined by an exam, term paper, or term project and may include computer demonstrations and/or presentation by the student. The final grade is subjective. Distance students may be required to make arrangements through a proctor who must submit a notarized statement of identity. Many of the courses use the work report form to keep track of your work. For a topic in programming languages use the programming language work report form. Topics

Excel for scientists and engineers MathCad Matlab Maple Suggested textbooks - Textbook publishers
q q q

www.coriolis.com www.course.com www.ddcpub.com

http://cs.wwc.edu/~aabyan/INFO150/ (1 de 2) [18/12/2001 10:38:03]

INFO250 System Software


q q q q q q q q

www.fortuitous.com www.idgbooks.com www.manning.com www.mcp.com www.oreilly.com www.osborne.com www.phptr.com www.wrox.com

Last Modified - . Send comments to [email protected]

http://cs.wwc.edu/~aabyan/INFO150/ (2 de 2) [18/12/2001 10:38:03]

INFO250 System Software

INFO 250 System Software 1


Bulletin Description Study of system software from a user and/or administrative perspective. Topics vary and may be repeated for credit when topics vary. Prerequisite: Permission of the instructor. Does not count toward either the BA or BS degree in Computer Science. Additional Information These are practical (non-theoretical) courses dealing with systems software and programming requiring about 30 clock hours of work. Some of the course materials are interactive workbooks meaning that the student is expected to have an appropriate computing environment available or in some cases, a web based interface may be available. These courses are appropriate for highly motivated students, who are resourceful, capable of independent work, and are seeking to learn a specific skill. Students are expected to obtain their own textbooks. Evaluation Course grades may be determined by an exam, term paper, or term project and may include computer demonstrations and/or presentation by the student. The final grade is subjective. Distance students may be required to make arrangements through a proctor who must submit a notarized statement of identity. Many of the courses use the work report form to keep track of your work. For a topic in programming languages use the programming language work report form. Topics

OS & System & Network Administration Software engineering & CASE tools INFO250A Syst Software: Introduction to Unix 1.0 Development with CVS, Bugzilla & Make Lex & Yacc (Flex & Bison) INFO250B Syst Software: Advanced Unix 1.0 Standard Template Library (STL) INFO250C Syst Software: Unix Shell Prog 1.0 INFO250D Syst Software: Unix System Admin 1.0 OO-Design and UML INFO250E Syst Software: Unix Network Admin 1.0 Design Patterns INFO250F Syst Software: Web Server Admin 1.0 Database Webmaster Curriculum (WOW)

http://cs.wwc.edu/~aabyan/INFO250/ (1 de 3) [18/12/2001 10:38:16]

INFO250 System Software

INFO250G Syst Software: SQL Programming 1.0 INFO250H Syst Software: Oracle Appl Prog 1.0 Oracel DBA Oracle SQL Oracel Forms Oracle PL/SQL

Introduction to HTML Introductory Webserver Administration Webserver Security & Maintenance Web Marketing Project Management Web Interface Design Advanced Web Server Administration e-Commerce & Internet Law Documentation DocBook, TeX, LaTeX

GUI Programming INFO250I Syst Software: Visual C++ MFC 1.0 GUI Design GUI Programming Programming Languages INFO250J Syst Software: Perl Programming 1.0 INFO250K Syst Software: Python 1.0 INFO250L Syst Software: PHP 1.0 Awk and Sed Programming Java2 Programming Java Script Suggested textbooks - Textbook publishers
q q q q q q q q q q q q q

www.coriolis.com www.course.com www.ddcpub.com www.fortuitous.com www.idgbooks.com www.manning.com www.mcp.com www.newriders.com www.oreilly.com www.osborne.com www.phptr.com www.wrox.com www.westnetinc.com

Other Topics Software Engineering


q

Development with CVS & Bugzilla

http://cs.wwc.edu/~aabyan/INFO250/ (2 de 3) [18/12/2001 10:38:16]

INFO250 System Software

Karl Fogel Open Source Development with CVS Coriolis 1999 Standard Template Library (STL) r Text: Murray & Pappas Visual C++ Templates Prentice Hall PTR 1999
r

System Administration
q

MS Windows2000 server Unix System Administration

XML
q

IDG Books

Web Programming
q

Jones & Batchelor Open Source Linux Web Programming IDGBooks 1999

Last Modified - . Send comments to [email protected]

http://cs.wwc.edu/~aabyan/INFO250/ (3 de 3) [18/12/2001 10:38:16]

INFO 250 Work Report Form

INFO 250 Work Report Form


Generic Name: Date: Grade:

Instructions: Since the topics and content of INFO 250 are highly variable, evaluation is also variable and course expectations are dependent on the topic. Complete this form and hand it in with your work as described in the next section. Place a completed copy of this form and all work in a public directory and email its location. Or. place a completed copy of this form and all programs in a directory, tar and compress the work, and email the tar file. Textbook: Description of required work (completed in consultation with the instructor:

Reading Workbook Programs Other Exam Oral: Written: None:

Workbooks should be completed. Programs should be fully functioning with full documentation, unit and functional tests, and full attribution of source and assistance. Student should be prepared to explain each line of code and alternative designs.

Instructor's Signature: Weekly Activity Summary

Date Activity

Time spent

http://cs.wwc.edu/~aabyan/INFO250/workReportForm.html (1 de 2) [18/12/2001 10:38:20]

INFO 250 Work Report Form

Total
Depending on the material one of the following columns will be used to determine your grade.

Hours Percent Letter Grade 27 24 21 15 90 80 70 50


A B C D F

http://cs.wwc.edu/~aabyan/INFO250/workReportForm.html (2 de 2) [18/12/2001 10:38:20]

Programming Language

INFO 250 Work Report Form


For topic in a programming language

Name: Instructions: Complete the following to receive credit for your work. Textbook: Language features checklist:

Date: Grade:

Language Feature Declarations


q q q q q q q

Reading Exercises and (pages & time) or program

Literals Identifiers Constants Variables Types Procedures, exceptions Blocks, scope, & vsibility

Expressions
q q

Standard Functions & parameters

Commands
q q

Statements Procedure & parameters

http://cs.wwc.edu/~aabyan/INFO250/Language.html (1 de 2) [18/12/2001 10:38:22]

Programming Language

Data types
q q

Basic Structured

Objects Exceptions Threads Interfaces & modules Generics Idioms Case Study Other:
Depending on the material one of the following columns will be used to determine your grade.

Hours Percent Letter Grade 27 24 21 15 90 80 70 50


A B C D F

Course Evaluation/Comments:

http://cs.wwc.edu/~aabyan/INFO250/Language.html (2 de 2) [18/12/2001 10:38:22]

INFO250wkbk

INFO 250A-F,J Sys. Software


Instructions
q

q q

Obtain a copy of the textbook The book store does not stock the textbook. You need to order a copy for yourself. Each chapter consists of reading, labs and projects. Do what is necessary to be comfortable with the material. Take the online quizzes and have the results e-mailed directly to me. Keep track of your progress using the progress check sheet below. The time includes reading the text, doing the exercises, projects, and quizzes. Upon completion of the course, hand in your workbook and a copy of your progress check sheet. The final exam is at the discretion of the instructor and may be a written exam, an oral exam, or a practical exam.

Progress Check sheet Week Comments/Description/Accomplishments/Progress 1 2 3 4 5 6 7 8 9 10 Total Suggested Textbooks Time

http://cs.wwc.edu/~aabyan/INFO250/INFO250wkbk.html [18/12/2001 10:38:24]

INFO 250 Work Report Form

INFO 250 System Software: Lex & Yacc


Use the notes on Lex and Yacc, modify the sample compiler and keep track of your progress using the work report form.

http://cs.wwc.edu/~aabyan/INFO250/LexYacc.html [18/12/2001 10:38:26]

INFO 250 Work Report Form

INFO 250 System Software: OO-Design & UML


Use one or more of the texts listed below and keep track of your progress using the work report form. Texts Fowler & Scott UML Distilled, Second Edition: A Brief Guide to the Standard Object Modeling Language Addison-Wesley 1999 Kulak & Guiney Use Cases: Requirements in Context Addison-Wesley 2000 Page-Jones, Meilir Fundamentals of object-oriented design in UML Addison-Wesley Longman Pub Co 2000

http://cs.wwc.edu/~aabyan/INFO250/UML.html [18/12/2001 10:38:28]

INFO 250 Work Report Form

INFO 250 System Software: Patterns


Use one or more of the texts listed below and keep track of your progress using the work report form. Texts Cooper, James Java design patterns: a tutorial Addison-Wesley 2000 Gamma et. al Design patterns: elements of reusable object-oriented software Addison-Wesley 1995 Buschmann et. al Pattern-Oriented Software Architecture: A System of Patterns Wiley1996 Martin Fowler Refactoring: Improving the Design of Existing Code Addison-Wesley 1999 Thomas Khne A Functional Pattern System for Object-Oriented Design Verlag Dr. Kovac 1999

http://cs.wwc.edu/~aabyan/INFO250/Patterns.html [18/12/2001 10:38:30]

Technical Documentation

INFO 250 Technical Documents


Assignments

Currently underdevelopment. Use the following texts:


q q

Math Majors - TeX & LaTeX CS Majors - Walsh & Muellner DocBook: The Definitive Guide O'Reilly & Associates, Inc. See also www.oasis-open.org/docbook LyX - advanced document processor which produces LaTeX.

These exercises should take approximately 30 hourse to complete. Topics and activities Topic 1 Ccoding style & standards 2 Man page 3 Info file 4 Command line help 5 DocBook 6 Tex/LaTeX Text Assignments Time

Copyright (c) 2001 by Anthony Aaby. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at http://www.opencontent.org). Last Modified - . Comments and content invited [email protected]

http://cs.wwc.edu/~aabyan/INFO250/Documentation.html [18/12/2001 10:38:35]

INFO250 Textbooks

INFO 250 System Software


Textbooks

q q

INFO250A MacMullan, John Unix Users Interactive Workbook Prentice-Hall PTR 1999 INFO250B MacMullan, John Advanced Unix Users Interactive Workbook Prentice-Hall PTR 2000 INFO250C Vickery, Chris Unix Shell Programmer's Interactive Workbook Prentice-Hall PTR 1999 INFO250D Kaplenk, Joe Unix System Administrator's Interactive Workbook Prentice-Hall PTR 1999 INFO250E Kaplenk, Joe Linux Network Administrator's Interactive Workbook Prentice-Hall PTR 2000 INFO250F Mohr, Jim Unix Web Server Administrator's Interactive Workbook Prentice-Hall PTR 1998 INFO250J Lowe, Vincent D. Perl Programmer's Interactive Workbook Prentice-Hall PTR 2000 For courses available on request r Analyzing E-Commerce and Internet Law Interactive Workbook by Brinson et al. - Learn how to align Web sites with your organizational and e-commerce strategy and the current state of Internet law issues. Oracle DBA Interactive Workbook by Melanie Caffrey and Douglas Scherer - Intended for beginners in the world of Oracle database administration, this hands-on guide takes you from creating a database to fine tuning performance. Also available as part of Oracle Database Administration: The Complete Video Course. Oracle SQL Interactive Workbook by Alex Morrison and Alice Rischert - Uses the proven-successful format of the interactive workbook to teach SQL programming on an Oracle database. Oracle Forms Interactive Workbook by Baman Motivala - The fastest way to master Oracle Forms with coverage of every key Oracle Forms technique. Also available as part of Oracle Forms Developer: The Complete Video Course. Oracle PL/SQL Interactive Workbook by Benjamin Rosenzweig and Elena Silvestrova - Master Oracle PL/SQL fast with this complete book-and-Web hands-on course. Also available as part of Oracle PL/SQL: The Complete Video Course. HTML User's Interactive Workbook by Alayna Cohn and John Potter

http://cs.wwc.edu/~aabyan/INFO250/Textbooks.html (1 de 3) [18/12/2001 10:38:39]

INFO250 Textbooks

- Master HTML and start creating Web pages now! Understanding Web Development Interactive Workbook by Arlyn Hubbell - Start your Web career off right. Administrating Web Servers, Security, and Maintenance Interactive Workbook by Eric Larson and Brain Stephens The nuts and bolts of building, configuring, and maintaining Web sites, including how to maintain security. Exploring Web Marketing and Project Management Interactive Workbook by Donald Emerick and Kim Round, with Susan Joyce - Develop a sound Internet strategy, build an effective Web team, and understand the legal and marketing issues of your growing e-business. Java 2 Programmer's Interactive Workbook by Kevin Chu and Eric Brower - Master the Java programming language now, with this easy, hands-on introduction-the perfect course for absolute beginners. Linux Network Administrator's Interactive Workbook by Joe Kaplenk - Learn all the Linux networking skills you need with this integrated book-and-Web learning solution. A+ Certification Interactive Workbook by Emmett Dulaney and Robert Bogue - Master every skill covered in both A+ certification exams through a series of real-life labs. Includes coverage of PC components, peripherals, networking, and more! Advanced UNIX User's Interactive Workbook by John McMullen - Become a UNIX Power User now! Control your environment, including scripts, startup files, X configuration, and email, networking, and file management skills. Perl Programmer's Interactive Workbook by Vincent D. Lowe - Master Perl programming now! UNIX System Administration Interactive Workbook by Joe Kaplenk - Master the technical and "thinking" skills you need to administer any UNIX system. UNIX Web Server Administrator's Interactive Workbook by Jim Mohr - Master the world's #1 Web server, Apache! UNIX User's Interactive Workbook by John McMullen - This hands-on workbook starts with basics of login and logout and brings you up to power-user status quickly. UNIX Awk and Sed Programmer's Interactive Workbook by Peter Patsis - A quick, friendly, hands-on tutorial on UNIX programming with awk, sed, and grep.

http://cs.wwc.edu/~aabyan/INFO250/Textbooks.html (2 de 3) [18/12/2001 10:38:39]

INFO250 Textbooks
r

UNIX Shell Programmer's Interactive Workbook by Chris Vickery - Whatever your experience, UNIX Shell Programmer's Interactive Workbook will transform you into a power shell programmer, fast! Designing Web Interfaces, Hypertext, and Multimedia by Reese, White, and White Supporting Web Servers, Networking, Programming, and Emerging Technologies by White, Dara-Abrams, and Aleem

r r

http://cs.wwc.edu/~aabyan/INFO250/Textbooks.html (3 de 3) [18/12/2001 10:38:39]

INFO352 Basic UNIX System Administration

INFO250 UNIX System Administration - 1


Description: Introduction to UNIX system administration basics including startup, shutdown, user accounts, the file system, system backup and restore procedures, device installation, simple network management, print service, process management and system security. Prerequisite: Previous user level experience with Unix. Textbook: Kaplenk, Joe Unix System Administrator's interactive workbook Prentice-Hall PTR 1999

Instructions:
q

For each chapter do the following: 1. Complete all assigned Labs in the workbook. As an alternative, construct an electronic document containing your answers. 2. Complete all lab Self Reviews placing your answers in your book or in an electronic document 3. Answer each assigned chapter's Test Your Thinking questions placing your answers in an electronic document. Be sure to check your answers at the publisher's web site. 4. Take the Practice Questions exam at the publisher's web site and have your score emailed to [email protected]. You should take one exam per week. Failure to do so may result in a lower grade for the course. You may work with other students on the Labs but not on the Test Your Thinking questions or the Practice Questions exam. You are honor bound to follow this requirement. The final exam is an oral and/or practical exam. During during dead week, schedule the final oral exam to take place during test week.

Grading: Grades are subjective but are based on 1. your completed workbook or electronic documents containing your work, 2. your electronic documents containing your answers to the Test Your Thinking questions, 3. the emailed results of your Practice Questions exam, and
http://cs.wwc.edu/~aabyan/SysAdm/ (1 de 4) [18/12/2001 10:38:44]

INFO352 Basic UNIX System Administration

4. the final oral/practical exam. Progress: Use the following form to record your progress. Note both the date completed and the score received. Chapter Topic Labs Date/Score Self Review Test your thinking Date & Score Practice Questions Date & Score

System Security 1.1 1.2 1.3 The Bourne Shell User The Korn Shell User 2.1 2.2 3.1 3.2

2 3 4

The C Shell User 4.1 4.2 4.3

5 6 7 8 9 10

Goal
Upon completion of this course you will be able to perform the following system administration tasks for a UNIX environment and have the skills of a Junior Systems Administrator.
q q q q q q q q q

Perform System Startup and Shutdown Manage User Accounts Manage the File System Backup and Restore Files Install serial communication devices: Terminals and Modems Manage a UNIX Network: workstations Manage the UNIX Print Service Perform Job scheduling (task automation) with cron be familiar with security, system accounting, system monitoring and performance issues.

Assignments
http://cs.wwc.edu/~aabyan/SysAdm/ (2 de 4) [18/12/2001 10:38:44]

INFO352 Basic UNIX System Administration

Resources
Textbook: Kaplenk, Joe Unix System Administrator's interactive workbook Prentice-Hall PTR 1999 Komarinski & C. Linux System Adminstration Handbook Prentice-Hall PTR 1998. Nemeth, et al. UNIX System Administration Handbook 2/e, Prentice-Hall 1995. Wang, Paul. An Introduction to Unix with X and the Internet, PWS Publishing Company. Pearce, Eric. An Overview of Windows NT & UNIX Integration from a Unix Perspective, O'Reilly 1998 Henriksen, Gene. Windows NT and UNIX Integration, Macmillan Technical Publishing 1998 Video: An Introduction to UNIX System Administration by Ray Swartz References: r For an excellent source of systems adminstration references see: http://www.oreilly.com USENET News Groups: comp.unix.admin, comp.unix.shell, comp.os.linux.*, comp.os.bsd.* WWW: r Online courses OSU Basic Unix Guide OSU SysAdmin course UW SysAdmin course Unix System Administration Independent Learning (USAIL) r Berkeley r Unix Guru or Unix Guru r Jumbo SysAdm Site r Stokely Consulting q Usenix and SAGE q Uniforum q SunWorld Online q Unix System Administration Magazine Students interested in pursuing a career in systems administration should become members of USENIX and SAGE.

Lab Notebook
Each student is required to keep a laboratory notebook containing an activity log. It may be kept in either paper form (bound or unbound) or electronically. Typical entries will include
q q q

Job/Problem Description Date/Time (completed,time spent) Who (performed the activity)

http://cs.wwc.edu/~aabyan/SysAdm/ (3 de 4) [18/12/2001 10:38:44]

INFO352 Basic UNIX System Administration


q q q

Solution, Method & System Modifications (required to solve the problem) Difficulties (encountered in performing the activity) Parameters & System Dependencies (required to solve the problem)

You will be required to submit either your notebook or copies of your entries.

Project
q

q q

Learn a scripting language: eg. shell programming, perl. Provide an introductory guide to the language and sample programs (minimum 5 pages). Software installation: eg. programming language, server (www). Provide documentation and summary of experience (minimum 2 pages). System service: eg. webpages. Provide documentation and summary of experience (minimum 2 pages). Readings: Summarized in a short paper (minimum 4 pages) Future Topics: develop lecture notes and exercises in html format for one of the future topics listed.

Evaluation
The lab grade is based upon completion of the lab manual exercises and the completeness of the lab notebook. The lab exercises and appropriate pages from the lab notebook are due one week after the lab. Oral EXAM - Final grade is subjective. Grade form

Permission to make digital/hard copy of part or all of this work for personal or classroom use is granted without fee provided that the copies are not made or distributed for profit or commercial advantage, the copyright notice, the title of the publication, and its date appear, and notice is given that copying is by permission of Anthony A. Aaby. To copy otherwise, to republish, to post on servers, or to redistribute to lists, requires prior specific permission and/or fee. 1998 Anthony A. Aaby. Last Modified - . Send comments to [email protected]

http://cs.wwc.edu/~aabyan/SysAdm/ (4 de 4) [18/12/2001 10:38:44]

Student Responsibilities

Grading Information
Integrity, Computing, & Disability Policies Grades
q q

What does your grade mean? Description of "A" and "C" students Your preparation for or likely hood of success in industry. r Skills: foundational, business, & technical r Top 10 signs you are a stellar software developer Letter grade/percent conversion Letter Points/ Grade Percent A B C D F 90-100 80-90 60-80 50-60 0-50

Grading worksheets r Programming assignments: programs must be well documented and use the standard program heading. s program heading s program grading criteria r CPTR 141 Intro to Programming r CPTR 352 OS worksheet r CPTR 415 DB worksheet r CPTR 425 Networking worksheet r CPTR 435 SE worksheet r CPTR 460 Parallel worksheet r CPTR 464 Compiler worksheet

Article/Book Review -- you have several options


q q q q

write a summary write a reaction write a "What I have learned" write a "What I will be able to do from what I have read"

http://cs.wwc.edu/~aabyan/Grading/ (1 de 2) [18/12/2001 10:38:49]

Student Responsibilities

Grades - grading is an inherently subjective process. I reserve the right to exercise my best judgment. The material in this section is for illustration purposes only.
q

Letter grades and percentages GRADING WEIGHTS LETTER GRADES depends on the class but often Labs & homework Tests 50% As 90 - 100% 50% Bs 80 - 89% Cs 70 - 79% Ds 60 - 69%

Projects and project courses - group activities require additional documentation beyond the deliverables. A project time card must be maintained. A self-evaluation must be completed and at least two peer reviews are required for each evaluation period.
q q q

q q

Time card - Due the first class of each week. Performance review - performed by the instructor each review period. Peer review - two required per review period, peers submit their evaluation directly to the instructor. Self evaluation - one required per review period. Performance level guidelines and categories

Course Evaluation
q

Course evalutation

Copyright 1998 Anthony A. Aaby -- All rights reserved

Last Modified
Send comments to [email protected]

http://cs.wwc.edu/~aabyan/Grading/ (2 de 2) [18/12/2001 10:38:49]

Grade Expectations

Grade Expectations
The "A" Students -- Outstanding Students Attendance Virtually perfect attendance. Their commitment to the class resembles that of the teacher. Preparation Always prepared for class. They always read the assignment. Their attention to detail is such that they occasionally catch the teacher in a mistake. Curiosity Show an interest in the class and in the subject. They look up or dig out what they don't understand. They often ask interesting questions or make thoughtful comments. Retention Have retentive minds. They are able to connect past learning with the present. They bring a background with them to the class. Attitude Have a winning attitude. They have both the determination and the self-discipline necessary for success. They show initiative. They do things they have not been told to do. Talent Have something special. It may be exceptional intelligence and insight. It may be unusual creativity, organizational skills, commitment -- or a combination thereof. These gifts are evident to the teacher and usually to the other students as well. Results Make high grades on tests -- usually the highest in the class. Their work is a pleasure to grade. The "C" Students -- Average or Typical Students Attendance Miss class frequently. They put other priorities ahead of academic work. In some cases, their health or constant fatigue renders them physically unable to keep up with the demands of highlevel performance. Preparation Prepare their assignments consistently but in a perfunctory manner. Their work may be sloppy or careless. At times, it is incomplete or late. Attitude Not visibly committed to the class. They participate without enthusiasm. Their body language often expresses boredom. Talent They vary enormously in talent. Some have exceptional ability but show undeniable signs of poor self-management or bad attitudes. Others are diligent but simply average in academic ability.
http://cs.wwc.edu/~aabyan/Grading/Grades.html (1 de 2) [18/12/2001 10:38:52]

Grade Expectations

Results Obtain mediocre or inconsistent results on tests. They have some concept of what is going on but clearly have not mastered the material.

From Clarifying Grade Expectations by John H. Williams in The Teaching Professor

http://cs.wwc.edu/~aabyan/Grading/Grades.html (2 de 2) [18/12/2001 10:38:52]

Course Selection Guide

Building blocks of a successful IT career

Foundation Skills Ability to learn new skills Analytic capabilities and problem-solving skills Communication skills (verbal and written) Flexible Self-motivated Collaboration/teamwork Broad education and global perspective Technical Skills Current technologies Programming languages

Business Skills General management Project management Leadership Conflict resolution Understanding of business operation

References are asked about the following traits Strengths and weaknesses Work ethic Personality Relationship with supervisors Customer service skills Ability to work under stress Communication & organizational skills

Reference misplaced.

Factors that contribute to innovation, broader application of technology, and valued by employers.
q q q q q q

Intellectual accomplishment in other disciplines. Leadership Motivation Communication skills Breadth of ability and experience Social commitment

From American Society for Engineering Education. (1994) Engineering Education for a Changing World. Joint project report of the Engineering Deans Council and the Corporate Roundtable of the ASEE, http://www.asee.org/publications/reports/green.cfm. Dahir, M. (1993) "Educating engineers for the real world," Technology Review,
http://cs.wwc.edu/Academic/ITcareers.html (1 de 2) [18/12/2001 10:38:54]

Course Selection Guide

August/September, pp. 14-16.

Questions asked of references by prospective employers.


q

System Administrator position (2000.01.31) 1. What is the length and nature of your relationship to ....? 2. Please describe and rate (excellent, good, fair, poor) his Customer Service skills. 3. What would you say are his strengths? 4. What would you say are his weaknesses?

Copyright 1998 Walla Walla College -- All rights reserved Maintained by WWC CS Department

Last Modified
Send comments to [email protected]

http://cs.wwc.edu/Academic/ITcareers.html (2 de 2) [18/12/2001 10:38:54]

Course Selection Guide

Top 10 signs you are stellar software developer


Maggie Biggs in INFOWORLD Electric No. 10 Superlative technical skills: A great developer is highly skilled in analysis, software design, good coding practices, and debugging. No. 9 Strength in business skills: A great developer understands the business impact of the application providing a powerful competitive advantage for the organization. No. 8 Speak English as well as "tech-ese": Software developers communicate across larger sections of the organization. No. 7 Paradigm openness: A great developer uses the paradigm which makes the most sense for the project and the environment at hand. No. 6 No tool or platform marriages: A great developer views his or her skills outside the scope of tools and platforms, and applies the best solutions. No. 5 Leaning as an ongoing process: A great developer does not stand still in knowledge attainment. Great developers continually challenge them to learn new skills. No. 4 Code reuse: A great developer always maintains common code for later reuse and will share code with other developers as an expanded means of reuse. No. 3 Collaboration skills: A great developer utilizes other developer skills to ask questions, provide help on a particular issue, or to discuss best development practices. No. 2 Teach others: A great developer gives back to the software community by means of presentations and helping other developers. No. 1 A sense of humor: A great developer with heavy project schedules and the demands of solving ever-complex business and technical issues finds balance in having a good sense of humor .

Maintained by WWC CS Department

http://cs.wwc.edu/~aabyan/Grading/developer.html (1 de 2) [18/12/2001 10:38:56]

Course Selection Guide

Last Modified Tue Feb 23 09:37:46 1999


Send comments to [email protected]

http://cs.wwc.edu/~aabyan/Grading/developer.html (2 de 2) [18/12/2001 10:38:56]

http://cs.wwc.edu/Heading.txt

/****************************************************************************** Program file name: Class: Assignment: Language: Operating System: Compiler: Programmer: Date Written: Revisions: Description: Inputs: Outputs: Special requirements: Criteria Grades (0 to 5 points each): Program Design: Program Execution: Specification Satisfaction: Coding Style: Comments: Creativity: Late Submission Penalty: Overall Program Grade: Program's Point Value = _____ Program's Score = _____ Comments: ******************************************************************************/

_____ _____ _____ _____ _____ _____

_____ _____ _____ _____ _____ _____ _____ Total % = _____

x x x x x x

5% 4% 4% 3% 2% 2%

= = = = = =

http://cs.wwc.edu/Heading.txt [18/12/2001 10:38:58]

Program grading criteria

Program Grading Criteria


Program execution (20%) Programs should compile and run cleanly, and produce correct results: proper values, formatting, and completeness. r 5 -- Program runs correctly. r 3 -- Program produces correct output half of the time. r 1 -- Program runs, but mostly incorrect. r 0 -- Program does not compile or run at all. Specification satisfaction (20%) Programs should satisfy their specifications: required language constructs, modules, proper i/o formats. r 5 -- Program satisfies specifications completely and correctly. r 3 -- Many parts of the specification not implemented. r 1 -- Program does not satisfy specifications. Program design (25%) Programs should be well designed: program structure, modularity, algorithm and data structure selection. r 5 -- Solution well thought out. r 3 -- Solution partly planned. r 1 -- ad hoc solution; program "designed at the keyboard". Coding style (15%) The program should be designed for readability: variable and subprogram names, language constructs and capabilities, and white space. r 5 -- Well-formatted, understandable code; appropriate use of language capabilities; good variable and subprogram names. r 3 -- Code hard to follow in one reading; poor use of language capabilities. r 1 -- Incomprehensible code, appropriate language capabilities unused. Comments (10%) The program should be well commented for administrative purposes and to enhance understanding of the code: administrative information, pre- and post-conditions for each subprogram, brief description of each logical paragraph of code. r 5 -- Concise, meaningful, well-formatted comments. r 3 -- Partial, poorly written or poorly formatted comments. r 1 -- Wordy, unnecessary, incorrect, or badly formatted comments. r 0 -- No comments at all. Creativity (10%) A program is deserving of an `A' when it provides more than expected: an interesting solution, more robust than required, particularly user friendly interface, code that is a pleasure to read. r 0 to 5 points to programs that usefully extend the requirements, that use the capabilities of the language particularly well, that use a particularly good algorithm, or that are particularly well-written.

adapted from On Criteria for Grading Student Programs by James W. Howatt in SIGSCSE BULLETIN vol 26 No 3 Sept 1994 p 3
http://cs.wwc.edu/Grading.html (1 de 2) [18/12/2001 10:39:00]

Program grading criteria

Last update: Send comments to: [email protected]

http://cs.wwc.edu/Grading.html (2 de 2) [18/12/2001 10:39:00]

Intro to Programming Grade Worksheet

CPTR 141 Grade Worksheet


Name:
Instructions: Hand in hard copies of fully functioning programs

Grade:

Program Summary

Homework Score Factor Score (%) Lab 1 Lab 2 Lab 3 Lab 5 Lab 6 Lab 8 Tests Midterm Final x 0.25 x 0.25 Total
The total should be a number between 0 and 100. The following table may be used to obtain the letter grade.

x 0.083 x 0.083 x 0.083 x 0.083 x 0.083 x 0.083

Letter Grade Points/Percent A B C D F 90-100 80-90 60-80 50-60 0-50

Resources
q

program heading

http://cs.wwc.edu/~aabyan/Grading/IntroWorksheet.html (1 de 2) [18/12/2001 10:39:02]

Intro to Programming Grade Worksheet


q

program grading criteria

http://cs.wwc.edu/~aabyan/Grading/IntroWorksheet.html (2 de 2) [18/12/2001 10:39:02]

Grade Worksheet

SE Grade Worksheet
NAME: Grade Calculation Use the following table to determine your points for the course. GRADE:

Percent Documents Evaluation 40% 30% Estimated percent Average Score Total hours Score

Estimate/score *2/5= *5= /12 = *2/3= Total

Points

Time Cards 10% Participation 20%

Enter your course letter grade at the top of the worksheet based on the following table.

Letter Grade Points/Percent A B C D F Documents 40% Documents are the course deliverables and include software, documentation, and for this course, the course environment. Perform a rough estimate of the percent of your direct contribution to the course deliverables. Points are calculated by multiplying your estimate by two and dividing by five. 90-100 80-90 60-80 50-60 0-50

http://cs.wwc.edu/~aabyan/Grading/SEworksheet.html (1 de 2) [18/12/2001 10:39:04]

Grade Worksheet

Evaluation 30% Evaluation refers to the self evaluation and peer review documents. Compute the average of your evaluation levels on your self evaluation and peer evaluations. Points are calculated by multiplying the average by five. Time Cards 10% Total your documented hours for the course. Your points are calculated by dividing your total hours by twelve. Participation 20% Participation refers to verbal participation in class discussion. Key elements include leadership, suggestion of alternatives, evaluation of alternatives, frequency, quality, and influence on the final outcome. Points may be determined by reference to the following table.

Category

Evaluation Comments (circle one) Leadership 1 2 3 4 5 6 Frequency 1 2 3 4 5 6 Suggestions 1 2 3 4 5 6 Quality 123456 Influence 1 2 3 4 5 6 Total

Points are calculated by summing the circled values and multiplying by 2/3. Level 6 - Exceptional participation with consistently high enthusiasm, quality, quantity, and influence on the final outcome. Level 5 - Excellent participation with consistent enthusiasm, quality, quantity, and influence on the final outcome. Level 4 - Above average participation with frequent contributions of a high quality. Level 3 - Average participation, satisfactory and acceptable. Level 2 - Minimally/marginally acceptable participation. Level 1 - Rarely participates. Exhibits little interest in the proceedings.

http://cs.wwc.edu/~aabyan/Grading/SEworksheet.html (2 de 2) [18/12/2001 10:39:04]

Self Evaluation

Time Card
Name: Week ending: Class: Instructor:

Date Activity Start Stop Time

Total Instructions: Record activity, date, and time and total the time spent.

http://cs.wwc.edu/~aabyan/Grading/timeCard.html [18/12/2001 10:39:08]

Performance Review

Performance Review

Name: Course: Instructor: Date: Evaluation period From: To: Definitions for the performance categories and performance level guidelines.

Performance Category Quality of Work Quantity of Work Initiative Planning Adaptability Communications Cooperation & Teamwork Job Knowledge Leadership Average:

Evaluation Comments (circle one) 123456 123456 123456 123456 123456 123456 123456 123456 123456

Ability to Work With Others 1 2 3 4 5 6

Overall Evaluation of Employee Performance Comments:

Level: 1 2 3 4 5 6

Attendance ___ Problem ___ No Problem Comments: What are this student's strengths?
http://cs.wwc.edu/~aabyan/Grading/pr.html (1 de 2) [18/12/2001 10:39:10]

Performance Review

Please provide specific examples of this students's major achievements during the review period.

How can this student improve his/her performance?

What training or learning experience would help this student improve his/her performance?

What goals should this student reach between now and the end of the next review period?

II. Employee Comments (Optional)

__ No Comments General comment about the evaluation of your performance:

Read and acknowledged by: Student__________________________________Date____________________ (Employee signature only indicates receipt of appraisal and is not necessarily in agreement.)

http://cs.wwc.edu/~aabyan/Grading/pr.html (2 de 2) [18/12/2001 10:39:10]

Peer Review

Peer Review
This is a confidential review.

Peer review for Name: Reviewer Name: Course: Instructor: Date: Evaluation period From: To: Definitions for the performance categories and performance level guidelines.

Performance Category Quality of Work Quantity of Work Initiative Planning Adaptability Communications Cooperation & Teamwork Job Knowledge Leadership Average:

Evaluation Comments (circle one) 123456 123456 123456 123456 123456 123456 123456 123456 123456

Ability to Work With Others 1 2 3 4 5 6

Overall Evaluation of Employee Performance Comments:

Level: 1 2 3 4 5 6

http://cs.wwc.edu/~aabyan/Grading/peerR.html (1 de 2) [18/12/2001 10:39:12]

Peer Review

Attendance ___ Problem ___ No Problem Comments:

What are this student's strengths?

Please provide specific examples of this student's major achievements during the review period.

How can this student improve his/her performance?

Signatures

Reviewer: Instructor:

Date Date

http://cs.wwc.edu/~aabyan/Grading/peerR.html (2 de 2) [18/12/2001 10:39:12]

Self Evaluation

Self Evaluation

Name: Course: Instructor: Date: Evaluation period From: To: Definitions for the performance categories and performance level guidelines.

Performance Category Quality of Work Quantity of Work Initiative Planning Adaptability Communications Cooperation & Teamwork Job Knowledge Leadership Average:

Evaluation Comments (circle one) 123456 123456 123456 123456 123456 123456 123456 123456 123456

Ability to Work With Others 1 2 3 4 5 6

Overall Evaluation of Performance Comments:

Level: 1 2 3 4 5 6

Attendance ___ Problem ___ No Problem Comments:


http://cs.wwc.edu/~aabyan/Grading/selfE.html (1 de 2) [18/12/2001 10:39:14]

Self Evaluation

Please provide specific examples of your major achievements during the review period.

How can you improve your performance?

What goals should you reach between now and the end of the next review period?

Signatures

Student: Instructor:

Date Date

http://cs.wwc.edu/~aabyan/Grading/selfE.html (2 de 2) [18/12/2001 10:39:14]

Performance level guidelines & categories

Performance Level Guidelines


Level 6 - Far Exceeds Job Requirements Performance at this level far exceeds the maximum requirements of this position. Duties and responsibilities are exceptionally met and consistently exceeded. Level 5 - Consistently Exceeds Job Requirements Performance at this level is at the maximum and always beyond acceptable requirements for the position. Duties and responsibilities are not only excellently met, but consistently exceeded. Level 4 - Meets and Usually Exceeds Job Requirements Performance at this level is above average in acceptable requirements for the position. Duties and responsibilities are well met and usually exceeded. Level 3 - Consistently Meets Job Requirements Performance at this level is at the average of acceptable requirements for the position. Duties and responsibilities are met consistently and in a satisfactory and acceptable manner. Level 2 - Inconsistent in Meeting Job Requirements Performance at this level is at the minimum of acceptable requirements for the position. Duties and responsibilities are marginally met. Level 1 - Does Note Meet Job Requirements Performance at this level is below the minimum of acceptable requirements for the position. Duties and responsibilities are not met in an acceptable manner.

Performance Categories

http://cs.wwc.edu/~aabyan/Grading/guidelines.html (1 de 2) [18/12/2001 10:39:16]

Performance level guidelines & categories

Quantity of Work - Volume of work regularly produced. Speed and consistently of output. Quality of Work - Extent to which employee can be counted upon to carry out assignments to completion. Initiative - Extent to which employee is a self starter in attaining objectives of the job. Planning - Extent to which employee is able to sequence activites to maximize production and/or anticipate change. ? Job Cooperation - Amount of interest and enthusiasm shown in work. Ability to Work With Others - Extent to which employee effectively interacts with others in the performance of his/her job. Adaptability - Extent to which employee is able to perform a variety of assignments within the scope of his/her job duties. Communications - Extent to which employee ... Cooperation & Teamwork - Extent to which emloyee ... Job Knowledge - Extent of job information and understanding possessed by employee. Leadership - Extent to which employee exhibits ability to direct others in the their work. ?

http://cs.wwc.edu/~aabyan/Grading/guidelines.html (2 de 2) [18/12/2001 10:39:16]

evaluation

CPTR 435 SE - Course Evaluation


Winter 2000 Instructor: Anthony Aaby

Instructions: For each, circle the number that best reflects your preference - 1 is least agree, 6 is most agree.

Course content/Textbook
The textbook helps to define the subject area of a course. Category The textbook corresponds with my view of S.E. Will keep the textbook for future reference. The textbook is too hard. The textbook is poorly organized. There is too great a leap from small programs in previous courses to the large project concept in this course. Previous courses have prepared me for this material. CASE tools should be introduced prior to this course. CASE tools should have been selected prior to this course and used from the beginning. Evaluation Comments (circle one) 123456 123456 123456 123456 123456 123456 123456 123456 123456

Course Organization
Category The course should have a traditional lecture organization. The course should be two quarters in length. First quarter a traditional lecture course. Second quarter a project. There was too much emphasis on the project. The project was too big. Evaluation Comments (circle one) 123456 123456 123456 123456

http://cs.wwc.edu/~aabyan/Grading/course.html (1 de 2) [18/12/2001 10:39:18]

evaluation

The project should have been better defined with key documents provided so that the work could have focused on design and implementation. I disliked this course.

123456 123456 123456

The Project
A project provides opportunity to practice the concepts. Category Evaluation Comments (circle one) The project was too big. 123456 The project was not in my area of interest. 123456 A quarter is too short to have a project. 123456 The project should be small and well defined. 123456 Students should be able to pick their own project. 123456 The project should be complex and mult-year in length. 1 2 3 4 5 6 I really wanted to spend most of my time coding. 123456 I disliked this project. 123456 123456

In the space available, suggest additional projects that you feel would give you marketable skills.

Instructor
Category Evaluation Comments (circle one) The instructor should be a software engineer. 1 2 3 4 5 6 123456

http://cs.wwc.edu/~aabyan/Grading/course.html (2 de 2) [18/12/2001 10:39:18]

Natural Language Processor

A Natural Language Processor


Author: Anthony Aaby Document status: unfinished History: Current document initiated April 1999, Initial coding c. 1990.

Abstract: A program for demonstrating natural language processing. The program accepts grammatical sentences in a subset of English and constructs a database. Questions posed in English result in queries against the database. The replies are in logical form. The program does not formulate natural language replies.

Introduction
Among the welter of varied linguistic features, two important grammatical relations seem to be held in common by all known languages: 1. some kind of actor-action-goal relation; 2. some kind of relation between names of objects and modifying qualities. There are a variety of nonobligatory grammatical relations. Number: singular, dual, or plural - actor-action agreement Defniniteness: determiners that preceed a noun. definite: the, this (these), that (those) - may be preceeded by all indefinite: a, an, any, each, either, neither, every, no one, somewhat, whatever, which, whichever, many a , such a, what a - may not be preceeded by all. Representation in logic - determiner noun Existential determiners - exists (x , noun(x) ): singular - a, an, this, the; some Universal determiners - all (x, noun(x) ): singular - any, each, every; plural - all, the Tense: when the action took place (past, present, future). Mood ( or mode ): how the speaker reguards the action; expressed with verbal auxiliaries Aspect: finshed or proceeding in the past; expressed with verbal auxiliaries Comparison: First degree: ... is as valuable as ...; Comparative degree: ... is more valuable than ...;
http://cs.wwc.edu/~aabyan/LogicPgmg/CODE/DCG/doc/doc.html (1 de 4) [18/12/2001 10:39:20]

Natural Language Processor

Superlative degree: ... is the most valuable of all ...; Gender: masculine, feminine, and neuter. Voice: active, passive Active Passive acts acted upon

Dynamic performs the action for itself Reflexive turns the action upon itself Case: expressed by prepositions the relationship between a noun and a pronoun and some other noun or pronoun in the same clause or phrase. Person: singular plural first person I, me we, us second person you you, you third person he, she, it they, them him, her, it In English, these relations are expressed through three devices actor (subject), action (predicate), action-goal (object); modifiers noun. Relation words prepositions express case; verbal auxiliaries express mood and aspect; conjunctions express relationships between phrases. Changing the word form express number, gender, tense, or comparison; pronouns express relationships between continguous sentences or parts of sentences. Many other languages express the relations through inflections (suffixes attached to words). The essential grammar of modern English applies to word groups rather than to the word as such. Thus, the grammar is described as analytical or a primarily syntactical, language. Fixed word order

Logical form
The actor-action-goal may be expressed in first-order logic as action (actor, goal ) eg John loves Mary is represented as loves(John, Mary). Sometimes the goal is not present as in John runs. The logical representation is runs(John). A man loves a woman is represented as exists(x,man(x)) and
http://cs.wwc.edu/~aabyan/LogicPgmg/CODE/DCG/doc/doc.html (2 de 4) [18/12/2001 10:39:20]

Natural Language Processor

exists(y woman) and loves(x,y).

Definite Clause Grammar


A definite clause grammars are an syntactical variant of Prolog. They are attribute grammars. In their simplest form they resemble context-free grammars. nonterminal --> comma separated list, possibly empty, of terminals and non-terminals. Terminals are enclosed with brackets. [ comma separated list, possibly empty, of terminals ] The non-terminals may be parameterized with both inherited and synthesized attributes. Prolog predicates may be included among the list of terminals and non-terminals on the righthand side of a rule and must be separated by commas and inclosed between braces. nonterminal --> ..., {write("hello mom"), nl},... The non-terminals are implicitly parameterized with the input. The input is matched against the terminals. The terminal is removed from the input and the remaining input is passed to the next term. Any remaining input is passed back through a second parameter. The queries must include the two parameters which follow any other parameters. For example, the start symbol of the grammar must include parameters for attributes and the input parameters. start(attributes, Input, RemainingInput) Example:

program declaration. declaration statement ...

--> declaration, body. --> type, variable, declaration. --> variable [:,=] expression.

Talk (user interface, grammar, dictionary) A Subset of English Grammar

http://cs.wwc.edu/~aabyan/LogicPgmg/CODE/DCG/doc/doc.html (3 de 4) [18/12/2001 10:39:20]

Natural Language Processor

The Dictionary The Scanner - read_sentence(Sentence, []) Clausifier (FOL to Clause Logic) - tranlate(FOL, CL) Conclusions
Further work
q q

Extend the dictionary to include a basic English vocabulary. The program should be able to expand its vocabulary and retain the new vocabulary between sessions.. In particular, the dbpredicate should be easy to extend to allow for new predicates. Generate natural language sentences from logical statements permitting natural language replys. The program should be able to expand its grammar. Save and restore the database. Add tense handling, past, present, and future eventually, full blown temporal logic. Add a truth maintenance subsystem.

q q q q

References
Pereira, Fernando C. N Prolog and natural-language analysis 1987.

http://cs.wwc.edu/~aabyan/LogicPgmg/CODE/DCG/doc/doc.html (4 de 4) [18/12/2001 10:39:20]

Talk: The User Interface

Talk (user interface, grammar, dictionary)


Author: Anthony Aaby Document status: unfinished History: Current document initiated April 1999, Initial coding c. 1990. Once the program is loaded, it is started by entering the query ?- dm. /****************************************************************************** TALK Program: A Natural Language Interface for a Data Base COMMENTS: 1. The program should accept grammatically correct sentences. 2. The program should translate grammatically correct sentences to their correct logical form. 3. The program should reject grammatically incorrect sentences. 4. The program should ask for clarification of grammatically incorect sentences. 5. The program should be able to expand its vocabulary. 6. The program should be able to expand its grammar. 7. The expanding program should maintain the correctness of the previous levels. ******************************************************************************/ /*============================================================================ Operator Declarations ============================================================================*/ :::::op( op( op( op( op( 30, 100, 100, 150, 150, fx, ~). xfy, #). xfy, &). xfy, =>). xfy, <=>).

Dialog Manager
The dialog manager dm :- dialog_manager. dialog_manager :- write('>> '), read_sentence(Sentence, []),!, talk(Sentence, Reply),
http://cs.wwc.edu/~aabyan/LogicPgmg/CODE/DCG/doc/ui.html (1 de 4) [18/12/2001 10:39:23]

% Dialog prompt % Read user input % Process the input

Talk: The User Interface

print_reply(Reply), continue(Reply). continue(quit). continue(_) :- dialog_manager. input %%%========================= %%% talk( Sentence, Reply ) %%% %%% ==> Sentence %%% <== Reply %%%=========================

% Generate the reply

% continue with more

talk(Sentence,Reply) :- parse(Sentence, LogicalForm, Type), translate(LogicalForm, Clauses), !, reply(Type, Clauses, Reply). talk(Sentence,Reply) :- Reply = error('I am unable to understand your sentence. Please restate.'). %%%======================================== %%% reply( Type, FreeVars, Clause, Reply ) %%%======================================== reply( quit, _, quit ) :- !.

reply( query, ([cl([answer(Answer)],C)]), Reply ) :free_vars(C,FreeVars), makebody(C,Condition), (setof( Answer, FreeVars^Condition, Answers ) -> Reply = answer(Answers) ; (Answer = yes -> Reply = answer([no]) ; Reply = answer([none]))),!. reply( assertion, Assertions, asserted(Assertions) ) :assertclauses(Assertions),!. reply( Type, %%% Free Variables free_vars(C,FreeVars) :- free_vars(C,[],FreeVars). free_vars( [], FVs, FVs ). free_vars( [C0|Cs], Fvs, FVs ) :- c_free_vars( C0, Fvs, Ifvs ), Clause, error('Unknown type') ).

http://cs.wwc.edu/~aabyan/LogicPgmg/CODE/DCG/doc/ui.html (2 de 4) [18/12/2001 10:39:23]

Talk: The User Interface

free_vars( Cs, Ifvs, FVs ).

c_free_vars( C, Fvs, FVs ) :functor(C,F,N), c_free_vars( C,Fvs,N,FVs). c_free_vars( C, FVs, 0, FVs ). c_free_vars( C, Fvs, N, FVs ) :N > 0, arg(N,C,A), var(A), putin(A,Fvs,Fvs0), N1 is N - 1, c_free_vars(C,Fvs0,N1,FVs). c_free_vars( C, Fvs, N, FVs ) :- N > 0, arg(N,C,A), nonvar(A), free_vars([A],Fvs,Fvs0), N1 is N - 1, c_free_vars(C,Fvs0,N1,FVs).

Assert Clauses
assertclauses([]). assertclauses([cl([Head],[])|Clauses]) :- assert(Head),!, assertclauses(Clauses). assertclauses([cl([Head],B)|Clauses]) :- makebody(BC,Body), assert((Head :- Body)), assertclauses(Clauses). % empty or multiple heads assertclauses([cl(H,B)|Clauses]) :- assert(cl(H,B)), assertclauses(Clauses). makebody([C],C). makebody([C|Cs],(C,Csp)) :- makebody(Cs,Csp). %%%====================== %%% print_reply( Reply ) %%% %%% ==> Reply %%%====================== print_reply(quit) :- write('Ok. '), write('Its been a pleasure serving you. bye!'),nl.

Good-

print_reply(error(ErrorType)) :- write('Error: "'), write(ErrorType), write('"'), nl. print_reply(asserted(Assertion)) :- write('Asserted "'), write(Assertion), write('"'), nl.

http://cs.wwc.edu/~aabyan/LogicPgmg/CODE/DCG/doc/ui.html (3 de 4) [18/12/2001 10:39:23]

Talk: The User Interface

print_reply(answer(Answers)) :- print_answers(Answers). %%%========================== %%% print_answers( Answers ) %%% %%% ==> Answers %%%========================== print_answers([Answer]) :- write(Answer), write('.'), nl. print_answers([Answer|Answers]) :- write(Answer), write(','), print_reply(answer(Answers)).

http://cs.wwc.edu/~aabyan/LogicPgmg/CODE/DCG/doc/ui.html (4 de 4) [18/12/2001 10:39:23]

An English Grammar

A Grammar for a Subset of English


Notation
Regular Expressions Alternatives Optional Zero or more Grouping Terminals A|B [A] {A} (A) bold | italic - reserved words & symbols only appear on the right-hand side - of grammar rules italic font - appear on either side of grammar rules non-terminal ::= regular expression non-terminal ::= regular expression

Non-terminal Grammar Rule Not implemented Implemented

English Grammar
The essential grammar of modern English applies to word groups rather than to the word as such. Thus, the grammar is described as analytical or a primarily syntactical, language.

Sentence
Sentence ::= | | ::= | | | declaritiveSentence . interrogatorySentence ? imperativeSentence ! simpleSentence compundSentence complexSentence compound-complex

declarativeSentence

http://cs.wwc.edu/~aabyan/LogicPgmg/CODE/DCG/doc/grammar.html (1 de 12) [18/12/2001 10:39:27]

An English Grammar

imperativeSentence ::= [ You ] verbPhrase interrogatorySentence ::= interrogatoryPronoun verbPhrase | [ interrogatoryPronoun ] aux nounPhrase verbPhrase | Is / Are nounPhrase nounPhrase simpleSentence ::= independentClause compoundSentence ::= independentClause { coordinateConjunction independentClause } complexSentence ::= { dependentClause } independentClause { dependentClause } - independent clause and one or more dependent clauses compound-complex ::= independentClause but, though dependentClause , independentClause

Clauses and Phrases


Clause -- by type independentClause dependentClause -- by function clause -- contains a subject-verb combination ::= nounPhrase verbPhrase ::= subordinateConjunction independentClause

::= nounClause -No one could read what he wrote. | adjectivalClause -The man who lives next door is ill. | adverbialClause -Before he started eating, he washed his hands. -- does not contain a subject-verb combination and Phrase functions as a single part of speech phrase ::= prepositionalPhrase -- by introductory word | participialPhrase | gerundPhrase | infinitivePhrase ::= preposition nounPhrase prepositionalPhrase ::= participle ... participialPhrase ::= gerund ... gerundPhrase ::= ... absolutePhrase phrase ::= verbPhrase -- by function | nounPhrase | adjectivePhrase | adverbPhrase absolutePhrase nounPhrase ::= properNoun | determiner { adjective } noun [ relativeClause ]

Bill The big dog

http://cs.wwc.edu/~aabyan/LogicPgmg/CODE/DCG/doc/grammar.html (2 de 12) [18/12/2001 10:39:27]

An English Grammar

verbPhrase

::= | | | |

intransitiveVerb transitiveVerb nounPhrase aux verbPhrase rov nounPhrase verbPhrase is/are nounPhrase

Sentences: parse( Sentence, LogicalForm, Type )


Three sentence forms are recognized,
q q q

quit (single word requests to terminate the session), queries (questions which are querys to the database), and assertions (statements which contain information to be asserted to the database).

The parse predicate takes a sentence and returns its logical form, and type. parse( Sentence, LogicalForm, Type ) :sentence(Type, LogicalForm, Sentence, []). sentence( Type, LogicalForm ) --> imperative( Type, LogicalForm ). sentence( query, LogicalForm ) --> interrogatory( LogicalForm ). sentence( assertion, LogicalForm ) --> declarative( LogicalForm ).

Type: quit (session termination)


imperative(Type, LF) --> quit(Type), [!]. The session termination requests are determined by the following: quit(quit) quit(quit) quit(quit) quit(quit) quit(quit) quit(quit) quit(quit) quit(quit) --> --> --> --> --> --> --> --> [bye]. [done]. [exit]. [finished]. [halt]. [quit]. [terminate]. [stop].

Type: query (the database)


http://cs.wwc.edu/~aabyan/LogicPgmg/CODE/DCG/doc/grammar.html (3 de 12) [18/12/2001 10:39:27]

An English Grammar

interrogatory( LogicalForm )--> query( LogicalForm ), [?]. interrogatory( LogicalForm )--> inv_sentence( LogicalForm, _ ), [?]. While queries may be recognized as sentences ending with a question mark, questions come in several forms. The second rule determines if the input is a question and formulates query for the database. Questions.
q q q q

who paints? who does the dog like? does the dog like the cat who paints? is ---?

Wh_pronoun is determiner [ binaryPredicate of Y | unaryPredicate ] ? query( S => answer(X) ) --> wh_pronoun, db( S, X ). Wh_pronoun verbPharase ? -- e.g. Who bought the picture? query( S => answer(X) ) --> wh_pronoun, verb_phrase( Number, finite, X^S, nogap ). Wh_pronoun aux nounPhrase verbPhrase ? -- Who did the dog bite? query( S => answer(X) ) --> wh_pronoun, inv_sentence( S, gap(np, X) ). Aux nounPhrase verbPhrase ? -- Did the dog bite John? query( S => answer(yes) ) --> inv_sentence( S, nogap ). Is/Are nounPhrase nounPhrase? -- e.g., Is the dog a brown dog? query( S => answer(yes) ) --> (([is], {Number=singular}); ([are],{Number=plural })),!, noun_phrase( Number, (X^S0)^S, nogap ), noun_phrase( Number, (X^true)^exists(X,S0&true), nogap ). Inverted Sentences: eg. does john like mary? or Did the dog bite the mailman ? inv_sentence( S, GapInfo ) --> aux( finite/Form, VP1^VP2 ), noun_phrase( Number, VP2^S, nogap ), verb_phrase( Number, Form, VP1, GapInfo ).

Type: assertions (data to be added to the database)


The third rule determines if the input is a declarative sentence which then is added to the database. Sentence types:

http://cs.wwc.edu/~aabyan/LogicPgmg/CODE/DCG/doc/grammar.html (4 de 12) [18/12/2001 10:39:27]

An English Grammar

1. Declarative: the dog likes the cat who paints Grammar: 1. 2. 3. 4. 5. Third person/singular and plural/present tense Number agreement between noun phrase and verb phrase Transitive and intransitive verbs The determiners 'a' and 'every'. Relative clauses

Declarative Sentences Two sentence forms recognized by the db predicate: X is the _ of Y X is a _ Where the blanks are binary and unary predicates respectively. The standard declarative sentence has the form, noun phrase followed by a verb phrase. declarative(LF, nogap) --> proper_noun(PN), db(LF, PN), [.]. declarative(LF, GapInfo ) --> noun_phrase(Number, VP^LF, nogap), verb_phrase(Number, finite, VP, GapInfo), [.].

Unimplemented declarative(LF,_) --> [if], indepClause, [then], indepClause. declarative(LF,_) --> indepClause, [if], indepClause. declarative(LF,_) --> indepClause, moreIndepClauses. moreIndepClauses --> corConj, indepClause, moreIndepClauses. moreIndepClauses.

Phrases
Noun Phrases -- Mary noun_phrase( singular, NP, nogap ) --> proper_noun(NP). -- the dog that bit the mailman noun_phrase( Number, NP, nogap ) --> determiner( Number, N2^NP ),
http://cs.wwc.edu/~aabyan/LogicPgmg/CODE/DCG/doc/grammar.html (5 de 12) [18/12/2001 10:39:27]

An English Grammar

%adjective( X, Adj ), noun( Number, N1 ), rel_clause( Number1, N1^N2 ). noun_phrase( Number, (X^S)^S, gap(np, X) ) --> []. Verb Phrases verb_phrase( Number, Form, Subject^LF, GapInfo ) --> tv( Number, Form, Subject^Object^VSO ), noun_phrase( Number1, Object^VSO^LF, GapInfo ). verb_phrase( Number, Form, VP, nogap ) --> iv( Number, Form, VP ). verb_phrase( Number, Form1, VP2, GapInfo ) --> aux( Form1/Form2, VP1^VP2 ), verb_phrase( Number, Form2, VP1, GapInfo ). verb_phrase( Number, Form1, VP2, GapInfo ) --> rov( Form1/Form2, NP^VP1^VP2 ), noun_phrase( Number, NP, GapInfo ), verb_phrase( Number, Form2, VP1, nogap ). verb_phrase( Number, Form1, VP2, GapInfo ) --> rov( Form1/Form2, NP^VP1^VP2 ), noun_phrase( Number, NP, nogap ), verb_phrase( Number, Form1, VP1, GapInfo ). verb_phrase( Number, finite, X^S, GapInfo ) --> (([is],{Number=singular});([are],{Number=plural})), noun_phrase( Number, (X^P)^exists(X,S&P), GapInfo ). X is determiner binaryPredicate of Y db( LF, X ) --> [is], determiner( _,_ ), [BinaryPredicate, of, Y], { binary_predicate(BinaryPredicate), LF =..[BinaryPredicate,X,Y]}. X is determiner unaryPredicate db( LF, X ) --> [is], determiner( _,_ ), [UnaryPredicate], { unary_predicate(UnaryPredicate), LF =..[UnaryPredicate,X]}.

Clauses
Relative Clauses
http://cs.wwc.edu/~aabyan/LogicPgmg/CODE/DCG/doc/grammar.html (6 de 12) [18/12/2001 10:39:27]

An English Grammar

rel_clause( Number, (X^S1)^(X^(S1&S2)) ) --> rel_pronoun, verb_phrase( Number, finite, X^S2, nogap ). rel_clause( Number, (X^S1)^(X^(S1&S2)) ) --> rel_pronoun, sentence( S2, gap(np, X) ). rel_clause( Number, N^N ) --> [].

Terminals
conjunction coordinateConjunction -- connects grammatically same correlativeConjuction ::= coordinateConjunction | subordinateConjunction ::= and but or for nor so yet | correlativeConjuction ::= both A and B either A or B neither A nor B whether A or B not only A B A but also B subordinateConjunction -- connects a dependent clause to a main clause. ::= after although as as if as long as as though because before even though how if in order that since so than than that though unless until when whenever where wherever while

http://cs.wwc.edu/~aabyan/LogicPgmg/CODE/DCG/doc/grammar.html (7 de 12) [18/12/2001 10:39:27]

An English Grammar

preposition -- connects noun or nounphrase to the part...

::= about above according to across after against among around at because of before behind below between

by down due to during for from in in front of in regard to into like near of off

on on account of out out of since through to toward under until up with without with respect to

noun -- name of someone or something

pronoun -- substitute for a noun or noun phrase

indefinitePronoun

::= properNoun -nounPhrase -- e.g.. baseball stadium possessiveNoun gerundPhrase ::= personalPronoun | possessiveNoun | demonstrativePronoun | indefinitePronoun | relativePronoun | interrogativePronoun ::= all everybody none another any anyone both either enough everything many more most neither nobody nothing one, two etc. other several some something Object Possessive

personalPronoun

::= Singular

Subject

First person I me my, mine Second person you you your, yours Third person he, she, it him, her, it his, her, hers, its Plural First person we Second person you Third person they us you them our, ours your, yours their, theirs

http://cs.wwc.edu/~aabyan/LogicPgmg/CODE/DCG/doc/grammar.html (8 de 12) [18/12/2001 10:39:27]

An English Grammar

demonstrativePronoun ::= this that these those - refer to particular people or things relativePronoun - introduce relative clauses interrogativePronoun - relative pronoun appearing at the beginning of a sentence. verb -- links subject to noun, pronoun or adjective adjective -- modifies noun or pronoun adverb -- modifies verb, adjective, or adverb relativeAdverb conjunctiveAdverb ::= who whose whom that which what ::= who whose whom which what

::= transitiveVerb | intransitiveVerb | participle ::= ::= relativeAdverb | conjunctiveAdverb ::= how when where why whenever wherever ::= therefore accordingly besides furthermore instead meanwhile nevertheless

NOUNS pronouns nouns proper nouns person: first---singular, plural I, we second--singular, plural you, you third---singular, plural he, they VERBS transitive intransitive inflextional forms: nonfinite: infinitive, present pariticiple, past participle to take, taking taken finite: person--first or third, number-singular or plural tense--present or past finite(pers3,singular,pres) -s or -es finite(_, _, pres) infinitive form finite(_, _, past) tense: past, present, future, mood: voice: active, passive RELATIVE CLAUSES

Determiners
The determiners correspond to quantifiers. Existential quantification requires a conjunction - exists(X, P(X) & Q(X)). Universal quantification requires implication - all(X, P(X) => Q(X)). determiner( Number, LF ) --> [D], { det( D, Number, Type ), detLF( Type, LF ) }. detLF(exists, (X^S1)^(X^S2)^exists(X, S1 & S2 )). detLF(all, (X^S1)^(X^S2)^all( X, S1 => S2 )).

Nouns
noun( singular, X^LF ) --> [Noun], { noun( Noun, _ ),

http://cs.wwc.edu/~aabyan/LogicPgmg/CODE/DCG/doc/grammar.html (9 de 12) [18/12/2001 10:39:27]

An English Grammar

LF =..[Noun,X] }. noun( plural, X^LF ) --> [Plural], { noun( Noun, Plural ), LF =..[Noun,X] }.

Proper Nouns
proper_noun( (PN^S)^S ) --> [PN], { proper_noun( PN ) }.

Pronouns: Relative & Interrogatory


rel_pronoun --> [RelPronoun], wh_pronoun --> [WhPronoun], { rel_pronoun( RelPronoun )}. { wh_pronoun( WhPronoun ) }.

Conjunctions
Coordinating conjunctions connect phrases or clauses that are grammatically the same. WARNING: Not implemented coorConj --> [CC], { coordinateConjunction(CC, LOp) }.

Transitive Verbs
tv( Number, Form, S^O^v(S,O)). tv( plural, Form, LF ) --> [TV], { tv(TV,_,_,_,_,Form), tvLF(Form,LF) }. tv( singular, Form, LF ) --> [TV], { tv(_,TV,_,_,_,Form), tvLF(Form,LF) }. tv( N, nonfinite, LF ) --> [TV], { tv(TV,_,_,_,_,Form), tvLF(Form,LF) }. tv( N, finite, LF ) --> [TV], { tv(_,TV,_,_,_,Form), tvLF(Form,LF) }. tv( N, finite, LF ) --> [TV], { tv(_,_,TV,_,_,Form), tvLF(Form,LF) }. tv( N, past_part, LF ) --> [TV], { tv(_,_,_,TV,_,Form), tvLF(Form,LF) }. tv( N, pres_part, LF ) --> [TV], { tv(_,_,_,_,TV,Form), tvLF(Form,LF) }. tvLF( Verb, Subject^Object^VSO ) :VSO =..[Verb,Subject,Object].

Adjectives

http://cs.wwc.edu/~aabyan/LogicPgmg/CODE/DCG/doc/grammar.html (10 de 12) [18/12/2001 10:39:27]

An English Grammar

adjective( X, LF ) --> [A], { adjective( A ), adjLF( A, LF ) }. adjLF(A,X,LF) :- LF =..[A,X].

Auxillaries
aux( Form, LF ) --> [Aux], { aux(Aux, Form, LF ) }.

Intransitive Verbs
iv( Number, Form, VP ). iv( plural, Form, LF ) --> [IV], { iv(IV,_,_,_,_,Form), ivLF(Form,LF) }. iv( singular, Form, LF ) --> [IV], { iv(_,IV,_,_,_,Form), ivLF(Form,LF) }. iv( N, nonfinite, ivLF(Form,LF) }. iv( N, finite, ivLF(Form,LF) }. iv( N, finite, ivLF(Form,LF) }. iv( N, past_part, ivLF(Form,LF) }. iv( N, pres_part, ivLF(Form,LF) }. LF ) --> [IV], { iv(IV,_,_,_,_,Form), LF ) --> [IV], { iv(_,IV,_,_,_,Form), LF ) --> [IV], { iv(_,_,IV,_,_,Form), LF ) --> [IV], { iv(_,_,_,IV,_,Form), LF ) --> [IV], { iv(_,_,_,_,IV,Form),

ivLF( F, X^LF ) :- LF =..[F,X]. rov( nonfinite/Requires, LF ) --> [ROV], { rov(ROV,_,_,_,_,Form,Requires),rovLF( rov( finite/Requires, LF ) --> [ROV], { rov(_,ROV,_,_,_,Form,Requires), rovLF( rov( finite/Requires, LF ) --> [ROV], { rov(_,_,ROV,_,_,Form,Requires), rovLF( rov( past_part/Requires, LF ) --> [ROV], { rov(_,_,_,ROV,_,Form,Requires), rovLF( rov( pres_part/Requires, LF ) --> [ROV], { rov(_,_,_,_,ROV,Form,Requires), rovLF(

Form, LF ) }. Form, LF ) }. Form, LF ) }. Form, LF ) }. Form, LF ) }.

rovLF( Form, ((X^LF)^S)^(X^Comp)^Y^S ) :- LF =..[Form,Y,X,Comp].

Jottings
http://cs.wwc.edu/~aabyan/LogicPgmg/CODE/DCG/doc/grammar.html (11 de 12) [18/12/2001 10:39:27]

An English Grammar

John loves Mary. The clock runs. The dog chased the cat. The big red dog chased the small cat. if John loves Mary, then Need to be able to handle tense.

loves(John, Mary) exists(X, clock(X) /\ run(X)) exists(d, dog(d) /\ exists(c, cat(c) /\ chase(dog,cat))) exists(d, big(d) /\ red(d) /\ dog(d) /\ exists(c, small(c) /\ cat(c) /\ chase(dog,cat))

http://cs.wwc.edu/~aabyan/LogicPgmg/CODE/DCG/doc/grammar.html (12 de 12) [18/12/2001 10:39:28]

Natural Language Processor

Dictionary
Author: Anthony Aaby Document status: unfinished History: Current document initiated April 1999, Initial coding c. 1990.

Dictionary Interface
Determiners
determiner( Number, LF ) --> [D], { det( D, Number, Type ), detLF( Type, LF ) }. detLF(exists, (X^S1)^(X^S2)^exists(X, S1 & S2 )). detLF(all , (X^S1)^(X^S2)^ all(X, S1 => S2 )).

Adjectives
adjective( X, LF ) --> [A], { adjective( A ), adjLF( A, LF ) }. adjLF(A,X,LF) :- LF =..[A,X].

Nouns
noun( singular, X^LF ) --> [Noun], { noun( Noun, _ ), LF =..[Noun,X] }. noun( plural, X^LF ) --> [Noun], { noun( Noun, Plural ), LF =..[Noun,X] }.

Proper Nouns
proper_noun( (PN^S)^S ) --> [PN], { proper_noun( PN ) }.

Pronouns: Relative & Interrogatory


rel_pronoun --> [RelPronoun], wh_pronoun --> [WhPronoun], { rel_pronoun( RelPronoun )}. { wh_pronoun( WhPronoun ) }.

http://cs.wwc.edu/~aabyan/LogicPgmg/CODE/DCG/doc/dictionary.html (1 de 8) [18/12/2001 10:39:30]

Natural Language Processor

Auxillaries
aux( Form, LF ) --> [Aux], { aux(Aux, Form, LF ) }.

Transitive Verbs
tv( Number, Form, VP ). tv( plural, Form, LF ) --> [TV], { tv(TV,_,_,_,_,Form), tvLF(Form,LF) }. tv( singular, Form, LF ) --> [TV], { tv(_,TV,_,_,_,Form), tvLF(Form,LF) }. tv( N, nonfinite, tvLF(Form,LF) }. tv( N, finite, tvLF(Form,LF) }. tv( N, finite, tvLF(Form,LF) }. tv( N, past_part, tvLF(Form,LF) }. tv( N, pres_part, tvLF(Form,LF) }. LF ) --> [TV], { tv(TV,_,_,_,_,Form), LF ) --> [TV], { tv(_,TV,_,_,_,Form), LF ) --> [TV], { tv(_,_,TV,_,_,Form), LF ) --> [TV], { tv(_,_,_,TV,_,Form), LF ) --> [TV], { tv(_,_,_,_,TV,Form),

tvLF( Form, X^Y^LF ) :- LF =..[Form,X,Y].

Intransitive Verbs
iv( Number, Form, VP ). iv( plural, Form, LF ) --> [IV], { iv(IV,_,_,_,_,Form), ivLF(Form,LF) }. iv( singular, Form, LF ) --> [IV], { iv(_,IV,_,_,_,Form), ivLF(Form,LF) }. iv( N, nonfinite, ivLF(Form,LF) }. iv( N, finite, ivLF(Form,LF) }. iv( N, finite, ivLF(Form,LF) }. iv( N, past_part, ivLF(Form,LF) }. iv( N, pres_part, ivLF(Form,LF) }. LF ) --> [IV], { iv(IV,_,_,_,_,Form), LF ) --> [IV], { iv(_,IV,_,_,_,Form), LF ) --> [IV], { iv(_,_,IV,_,_,Form), LF ) --> [IV], { iv(_,_,_,IV,_,Form), LF ) --> [IV], { iv(_,_,_,_,IV,Form),

http://cs.wwc.edu/~aabyan/LogicPgmg/CODE/DCG/doc/dictionary.html (2 de 8) [18/12/2001 10:39:30]

Natural Language Processor

ivLF( F, X^LF ) :- LF =..[F,X]. rov( nonfinite/Requires, LF ) --> [ROV], { rov(ROV,_,_,_,_,Form,Requires), rov( Form, LF ) }. rov( finite/Requires, LF ) --> [ROV], { rov(_,ROV,_,_,_,Form,Requires), rov( Form, LF ) }. rov( finite/Requires, LF ) --> [ROV], { rov(_,_,ROV,_,_,Form,Requires), rov( Form, LF ) }. rov( past_part/Requires, LF ) --> [ROV], { rov(_,_,_,ROV,_,Form,Requires), rov( Form, LF ) }. rov( pres_part/Requires, LF ) --> [ROV], { rov(_,_,_,_,ROV,Form,Requires), rov( Form, LF ) }. rov( Form, ((X^LF)^S)^(X^Comp)^Y^S ) :- LF =..[Form,Y,X,Comp].

Conjuctions
Coordinating conjunctions connect grammatically same WARNING: Not implemented coorConj --> [CC], { coordinateConjunction(CC, LOp) }.

Dictionary
A noun is a name for someone or something, can be particular or general and is often proceeded by a determiner. Pronouns are substitutes for nouns or noun phrases.

Determiners
Determiners proceed nouns and appear in both singular and plural forms and correspond to the logical quantifiers. The following predicates classify the determiners. det ( word, number, quantifier ). det( a, singular, exists). det( an, singular, exists). det( this, singular, exists). det( the, singular, exists).

http://cs.wwc.edu/~aabyan/LogicPgmg/CODE/DCG/doc/dictionary.html (3 de 8) [18/12/2001 10:39:30]

Natural Language Processor

det( some, Number, exists). det( all, plural, all ). det( any, singular, all ). det( the, plural, all ). det( each, singular, all ). det( every, singular, all ). The preceeding does not distinguish between definite ( the ) and indefinite ( a/an ) articles as in the following sentence. One day, a child met a dog and the child immediately trusted the dog and went up to it. Definite articles: the, this (these), that (those) - may be preceeded by all Indefinite articles: a, an, any, each, either, neither, every, no one, somewhat, whatever, which, whichever, many a , such a, what a - may not be preceeded by all.

Pronouns
The relative pronouns introduce relative phrases rel_pronoun( rel_pronoun( rel_pronoun( rel_pronoun( rel_pronoun( rel_pronoun( that what who whom whose which ). ). ). ). ). ).

An important subclass of relative pronouns, the wh_pronouns, are used at the beginning of an interrogatory sentence. wh_pronoun( wh_pronoun( wh_pronoun( wh_pronoun( wh_pronoun( what ). who ). whom ). whose ). which ).

Proper Nouns
The proper nouns are proper_noun( john ). proper_noun( annie ). proper_noun( monet ).

Nouns
http://cs.wwc.edu/~aabyan/LogicPgmg/CODE/DCG/doc/dictionary.html (4 de 8) [18/12/2001 10:39:30]

Natural Language Processor

noun ( singular, plural ) noun( baby, babies ). noun( boy, boys ). noun( cat, cats ). noun( father, fathers ). noun( family, families). noun( female, females ). noun( girl, girls ). noun( man, men ). noun( male, males ). noun( mouse, mice ). noun( woman, women ).

Predicates/Adjectives
unary_predicate(male). unary_predicate(female). binary_predicate(father). binary_predicate(mother). adjective ( word ) adjective( big ). adjective( small ). adjective( red ).

Verbs
Verb are action words in a sentence. They may link the subject to a noun, pronoun or adjective. They are classified as transitive or intransitive. Transitive verbs take an object while intransitive verbs do not. % person/number/tense % Inflectional forms: % V Vs Ved Ven Ving % infinitive finite finite, past part, pres part, LF % 3rd pers 3rd pers % plural singular % present present inflectional forms

Nonfinite verbs infinitive present participle past participle example to take taking taken

http://cs.wwc.edu/~aabyan/LogicPgmg/CODE/DCG/doc/dictionary.html (5 de 8) [18/12/2001 10:39:30]

Natural Language Processor

Finite verbs voice

Person Number Tense singular past plural present future

active first passive third In the following, the verb entries correspond to: 1. 2. 3. 4. 5. 6.

The nonfinite form of the verb (the infinitive -- to verb) The third person singular form: He/She verb The past tense: He/She verb-past The past participle: He/She has verb The present participle: He/She is verb The logical form used in the database: usually third person singular

Intransitive verbs iv ( infinitive, thirdPersonSingular, PastTense, PastParticiple, PresentParticiple, LogicalForm ). iv( come, comes, came, come, comming, comes ). iv( dance, dances, danced, danced, dancing, dances ). iv( go, goes, went, gone, going, goes ). iv( halt, halts, halted, halted, halting, halts ). iv( paint, paints, painted, painted, painting, paints ). iv( sleep, sleeps, slept, slept, sleeping, sleeps ). iv( walk, walks, walked, walked, walking, walks ). iv( rest, rests, rested, rested, resting, rests ). Transitive verbs tv ( infinitive, thirdPersonSingular, PastTense, PastParticiple, PresentParticiple, LogicalForm ). tv( adimire, admires, admired, admired, admiring, admires ). tv( are, is, was, was, are, isa ). tv( buy, buys, bought, bought, buying, buys ). tv( concern, concerns, concerned, concerned, concerning, concerns ).
http://cs.wwc.edu/~aabyan/LogicPgmg/CODE/DCG/doc/dictionary.html (6 de 8) [18/12/2001 10:39:30]

Natural Language Processor

tv( ). tv( ). tv( ). tv( ). tv( ). tv( ). tv( ). tv( ). tv( ). % % % tv( ).

eat, hate, have, give, like, meet, run, scare, see, show take tell write,

eats, hates, has, gives, likes, meets, runs, scares, sees,

ate, hated, had, gave, liked, met, ran, scared, seen,

ate, hated, had, gave, liked, met, run, scared, seen,

eating, hating, having, giving, liking, meeting, running, scaring, seeing,

eats hates has gives likes meets runs scares sees

writes,

wrote,

written,

writing,

writes

rov( want, wants, infinitive ). Auxiliary verbs

wanted,

wanted,

wanting,

wants,

Those commented out have not been verified. aux( form, a/b, VP^VP) aux( be, nonfinite aux( been, past_part %aux( can, finite aux( could, finite %aux( is, finite aux( did, finite aux( does, finite aux( has, finite aux( have, finite %aux( may, finite %aux( might, finite %aux( shall, finite %aux( should, finite

/ pres_part, VP^VP ). / pres_part, VP^VP ). / nonfinite, VP^VP ). / nonfinite, VP^VP ). / nonfinite, VP^VP ). / nonfinite, VP^VP ). / nonfinite, VP^VP ). / past_part, VP^VP ). / past_part, VP^VP ). / past_part, VP^VP ). / past_part, VP^VP ). / past_part, VP^VP ). / past_part, VP^VP ).

http://cs.wwc.edu/~aabyan/LogicPgmg/CODE/DCG/doc/dictionary.html (7 de 8) [18/12/2001 10:39:30]

Natural Language Processor

aux( to, infinitive / nonfinite, VP^VP ). %aux( would, finite / past_part, VP^VP ). Conjunctions coordinateConjunction ( conjunction, logicalOperator ) coordinateConjunction(and, and). coordinateConjunction(but, and). coordinateConjunction(or, or) %coordinateConjunction(for, X). %coordinateConjunction(nor, X). coordinateConjunction(so, and). coordinateConjunction(yet, and).

http://cs.wwc.edu/~aabyan/LogicPgmg/CODE/DCG/doc/dictionary.html (8 de 8) [18/12/2001 10:39:30]

Scanner for English Sentences

A Scanner for English Sentences


Author: Anthony Aaby Document status: unfinished History: Current document initiated April 1999, Initial coding c. 1990.

read_sentence(Sentence, []) - (scanner)


Sentences are sequences of words terminated with either a period, exclamation point, or a question mark. Punctuation symbols are considered words. The following code is based on standard scanner design. read_sentence --> {get0(C)}, word(C,W,C1), rest_sent(C1,W). Given the next character and the previous word, read the rest of the sentence rest_sent(C,W) --> {lastword(W)}. % empty rest_sent(C,_) --> word(C,W,C1), rest_sent(C1,W). word( LookAheadChar, Word, NextLookAheadChar ) word(C,W,C1) --> {single_character(C),!,name(W,[C]), get0(C1)}, [W]. % !,.:;? word(C,W,C2) --> {in_word(C,Cp), get0(C1), rest_word(C1,Cs,C2), name(W,[Cp|Cs])},[W]. word(C,W,C2) --> {get0(C1)}, word(C1,W,C2). % consumes blanks These words terminate a sentence. lastword( Char ) lastword('.'). lastword('!'). lastword('?'). This reads the rest of the word plus the next character. rest_word( LookAheadChar, Chars, Following Char ) rest_word(C,[Cp|Cs],C2) :- in_word(C,Cp), get0(C1), rest_word(C1,Cs,C2). rest_word(C,[],C).
http://cs.wwc.edu/~aabyan/LogicPgmg/CODE/DCG/doc/scanner.html (1 de 2) [18/12/2001 10:39:33]

Scanner for English Sentences

single_character( Char ) single_character(33). single_character(44). single_character(46). single_character(58). single_character(59). single_character(63).

% % % % % %

! , . : ; ?

case( UpperCase, LowerCase ) case(C,C) :- C > 96, C < 123. case(C,L) :- C > 64, C < 91, L is C + 32. case(C,C) :- C > 47, C < 58. case(39,39). case(45,45).

% % % % %

a,b,...,z A,B,...,Z 0,1,...,9 ' -

http://cs.wwc.edu/~aabyan/LogicPgmg/CODE/DCG/doc/scanner.html (2 de 2) [18/12/2001 10:39:33]

Clausifier (FOL to Clause Logic)

The Clausifier (FOL to Clause Logic) translate( FOL, CL)


Operator Declarations
The logical operators listed in binding strength (highest to lowest). :::::% % op( 30, fx, ~). op( 100, xfy, #). op( 100, xfy, &). op( 150, xfy, =>). op( 150, xfy, <=>). all(X, P) exixts(X, P) % % % % % Not Or And If Iff Universal Quantification Existential Quantification

Translate(FOL-formula, Clausal-formula)
1. 2. 3. 4. 5. 6. Replace conditional and biconditionals with equivalent formulas Negation normal form: negations are moved inwards. Remove existential quantifiers and replace existential variables with Skolem functions. Remove universal quantifers as the universal variables are unique. Rearrange formula into conjunctive normal form. Translate CNF to clauses.

translate( F, Clauses ) :- impl_out( F, F1 ), neg_in( F1, F2 ), skolem( F2, F3, [] ), univ_out( F3, F4 ), conjnf( F4, F5 ), write( F5), nl, clausify( F5, Clauses, []). Rules for Removing Conditional and Biconditional operators. Replace implications (A => B) with (~A # B) and biconditionals (A<=>B) with (A&B)#(~A&~B). impl_out(Formula, ImplicationFreeFormula) impl_out( (P => Q), (~ P1 # Q1) ) :- !, impl_out( P, P1 ), impl_out(
http://cs.wwc.edu/~aabyan/LogicPgmg/CODE/DCG/doc/clausifier.html (1 de 4) [18/12/2001 10:39:36]

Clausifier (FOL to Clause Logic)

Q, Q1 ). impl_out( (P <=> Q), ((P1 & Q1) # (~P1 & ~Q1)) ):- !, impl_out( P, P1 ), impl_out( Q, Q1 ). impl_out( ~P, ~P1 ) :- !, impl_out( P, P1 ). impl_out( all(X,P), all(X,P1) ) :- !, impl_out( P, P1 ). impl_out( exists(X,P), exists(X,P1) ) :- !, impl_out( P, P1 ). impl_out( (P & Q), (P1 & Q1) ) :- !, impl_out( P, P1 ), impl_out( Q, Q1 ). impl_out( (P # Q), (P1 # Q1) ) :- !, impl_out( P, P1 ), impl_out( Q, Q1 ). impl_out( P, P ). Rules For Negation Normal Form: neg_in( Formula, NegationNormalForm ) In negation normal form, negations only appear just before atomic formulas. neg_in( ~~P, P1 ):- !, neg_in( ~all(X,P), exists(X,P1) ):- !, neg_in( ~exists(X,P), all(X,P1) ):- !, neg_in( ~(P & Q), (P1 # Q1) ):- !, neg_in( neg_in( neg_in( neg_in( neg_in( neg_in( ~(P # Q), (P1 & Q1) ):neg_in( P, P1 neg_in( ~P, P1 neg_in( ~P, P1 neg_in( ~P, P1 neg_in( ~Q, Q1 !, neg_in( ~P, P1 neg_in( ~Q, Q1 !, neg_in( P, P1 !, neg_in( P, P1 !, neg_in( P, P1 neg_in( Q, Q1 !, neg_in( P, P1 neg_in( Q, Q1 Literal formula ). ). ). ), ). ), ). ). ). ), ). ), ).

all(X,P), all(X,P1) ):exists(X,P), exists(X,P1) ):(P & Q), (P1 & Q1) ):(P # Q), P, (P1 # Q1) ):P ).%

Replace Existential Variables with Skolem Functions Skolem functions are unique functions of the free variables in a formula. skolem( all(X,P), all(X,P1), Vars ) :- !, skolem( P, P1, [X|Vars] ). skolem( exists(X,P), P2, Vars ) :- !, gensym( f, F ), Sk =..[F|Vars], subst( X, Sk, P, P1 ), skolem( P1, P2, Vars ). skolem( (P & Q), (P1 & Q1), Vars ) :- !, skolem( P, P1, Vars ), skolem( Q, Q1, Vars ). skolem( (P # Q), (P1 # Q1), Vars ) :- !, skolem( P, P1, Vars ),

http://cs.wwc.edu/~aabyan/LogicPgmg/CODE/DCG/doc/clausifier.html (2 de 4) [18/12/2001 10:39:36]

Clausifier (FOL to Clause Logic)

skolem( Q, Q1, Vars ). skolem( P, P, Vars ).

subst( X, Sk, all(Y,P), all(Y,P1) ) :- !, subst( X, Sk, P, P1 ). subst( X, Sk, exists(Y,P), exists(Y,P1) ) :- !, subst( X, Sk, P, P1 ). subst( X, Sk, (P & Q), (P1 & Q1) ) :- !, subst( X, Sk, P, P1 ), subst( X, Sk, Q, Q1 ). subst( X, Sk, (P # Q), (P1 # Q1) ) :- !, subst( X, Sk, P, P1 ), subst( X, Sk, Q, Q1 ). subst( X, Sk, P, P1 ) :- functor(P,F,N), subst1( X, Sk, P, N, P1 ). subst1( X, Sk, P, 0, P ). subst1( X, Sk, P, N, P1 ) :- N > 0, P =..[F|Args], subst2( X, Sk, Args, ArgS ), P1 =..[F|ArgS]. subst2( subst2( AS). subst2( AS). subst2( X, Sk, [], [] ). X, Sk, [A|As], [Sk|AS] ) :- X == A, !, subst2( X, Sk, As, X, Sk, [A|As], [A|AS] ) :- var(A), !, subst2( X, Sk, As,

X, Sk, [A|As], [Ap|AS] ) :- subst( X, Sk, A, Ap ), subst2( X, Sk, As, AS).

Remove Universal Quantifiers Universal quantifiers may be removed as there are no existential quantifiers and universally quantified variables are unique. univ_out( all(X,P), P1 univ_out( (P & Q), (P1 & Q1) Q, Q1 ). univ_out( (P # Q), (P1 # Q1) Q, Q1 ). univ_out( P, P Conjunctive Normal Form (CNF)
http://cs.wwc.edu/~aabyan/LogicPgmg/CODE/DCG/doc/clausifier.html (3 de 4) [18/12/2001 10:39:36]

) :- !, univ_out( P, P1 ). ) :- !, univ_out( P, P1 ), univ_out( ) :- !, univ_out( P, P1 ), univ_out( ).

Clausifier (FOL to Clause Logic)

In conjunctive normal form (CNF), conjunctions are the outermost connective. conjnf( (P # Q), R ) :- !, conjnf( P, P1 ), conjnf( Q, Q1 ), conjnf1( (P1 # Q1), R ). conjnf( (P & Q), (P1 & Q1) ) :- !, conjnf( P, P1 ), conjnf( Q, Q1 ). conjnf( P, P ). conjnf1( ((P & Q) # R), conjnf1( (P # (Q & R)), conjnf1( P, (P1 & Q1) ) :- !, conjnf1( conjnf1( (P1 & Q1) ) :- !, conjnf1( conjnf1( P ). (P (Q (P (P # # # # R), R), Q), R), P1), Q1 ). P1), Q1 ).

Clausify - converts CNF to clauses clausify( (P & Q), C1, C2 ) :- !, clausify( P, C1, C3 ), clausify( Q, C3, C2 ). clausify( P, [cl(A,B)|Cs], Cs ) :- inclause( P, A, [], B, [] ), !. clausify( _, C, C ). inclause( (P # Q), A, A1, B, B1 ) :- !, inclause( P, A2, A1, B2, B1 ), inclause( Q, A, A2, B, B2 ). inclause( ~P, A, A, B1, B ) :- !, notin( P, A ), putin( P, B, B1 ). inclause( P, A1, A, B, B ) :- !, notin( P, B ), putin( P, A, A1 ). notin(X,[Y|_]) :- X==Y, !, fail. notin(X,[_|Y]) :- !,notin(X,Y). notin(X,[]). putin(X,[], [X] ) :- !. putin(X,[Y|L],[Y|L] ) :- X == Y,!. putin(X,[Y|L],[Y|L1]) :- putin(X,L,L1).

http://cs.wwc.edu/~aabyan/LogicPgmg/CODE/DCG/doc/clausifier.html (4 de 4) [18/12/2001 10:39:36]

Automated Reasoning

Automated Reasoning
q q q q q

Available Systems (anl) Results Analytic Tableaux Research opportunities Logic r First order logic Resources r LeanTaP r ileanTAP: an intuitionistic theorem prover r ModLeanTAP: Propositional Modal Logics Implementations r Logics r Code Peano

http://cs.wwc.edu/~aabyan/AR/ [18/12/2001 10:39:40]

The Logical Foundations of Computer Science and Mathematics

The Logical Foundations of Computer Science and Mathematics


Document status: under development.

1. 2. 3. 4. 5. 6. 7. 8.

Overview Classical logic Modal logics Multivalued logics Constructive logic Nonmonotonic logic Algorithmic logic The Lambda Calculus

Appropriate for static systems Belief, knowledge, temporal progression Uncertainty, fuzzy membership systems Logic of constructive systems

The logic of functional programming

Tar file of this material: logic.tgz (may not be upto date) Supplementary material
q q q q q q q q q q q q q q q q q q

General setting for incompleteness Analytic proof style Analytic tableaux Axiomatic method Free variables Hilbert style proofs Horn clause logic Modal logic - tableau rules Natural Deduction Normal forms and Skolem functions Prolog technology for theorem proving Resolution Semantics Sequent (Gentzen) systems Substitution Syntax Temporal logic Truth tables

http://cs.wwc.edu/~aabyan/Logic/ (1 de 2) [18/12/2001 10:39:48]

The Logical Foundations of Computer Science and Mathematics


q q

Unification References r Peter Suber's A Bibliography of Non-Standard Logics

Copyright (c) 1999 by Anthony Aaby. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v0.4 or later (the latest version is presently available at http://www.opencontent.org). Distribution of substantially modified versions of this document is prohibited without the explicit permission of the copyright holder. Distribution of this work or any derivative works in whole or in part in standard (paper) book form for commercial purposes is prohibited unless prior permission is obtained from the copyright holder. Last Modified - . Comments and content invited [email protected]

http://cs.wwc.edu/~aabyan/Logic/ (2 de 2) [18/12/2001 10:39:48]

No title

Automated Reasoning
Paper Code

http://cs.wwc.edu/~aabyan/AR/Peano/index.html [18/12/2001 10:40:17]

Systems Research Group

Systems Research Group


The Systems Research Group (SRG) ... Announcement

Computer Systems and System Software


System simulation environment
q q q q q q

Assembly language, assemblers, linkers, and loaders: Universal assembler Architecture: Universal interpreter Architecture & networking Compilers Operating Systems and Networking Database

Architecture
q

Construct a simulator for an alternative architectures P-machine r SECD-machine r Lambda machine r Logic Machine VLSI -- implement a lambda calculus machine (Aaby, Aamodt)
r

Data Base Human Computer Interation


q

Construct a Web based interface to a computer, scanner, printer, modem to produce a copier and fax machine.

Operating Systems
http://cs.wwc.edu/~aabyan/SRG/ (1 de 2) [18/12/2001 10:40:19]

Systems Research Group

q q q q q q q q q

SimOS (Stanford University) OS tool kit (University of Utah) CC++ Design and implement an OS or portions an OS. Add/Modify features of an OS or Network Do something with Unix(NetBSD, Linux, etc), Mach, Ameoba, OS2, Windows NT Collect, modify, develop tools for monitoring, analyzing and/or simulating a network. Develop sys admin materials for the NT environment Develop sys admin materials for networking

Programming Languages
q q q

Design a multiparadigm programming language Design and implement a programming language Compare language based memory managers (including garbage collectors) to OS memory managers. Compilers etc r Construct a universal assembly language and assembler. (Aamodt, Aaby) r Use ELI to construct a compiler r Construct a compiler for ??? r Develop a hardware (VLSI) lambda calculus interpreter r Complete the development of Prolog based compiler writing tools. r Port Aaby's Prolog based compiler example to PCN. r Construct/assemble supporting routines for a compiler. r Translate Lucent Technologies Limbo to Java r Construct a compiler to translator SPECS to C++ (Wether & Conway (1996) "A Modest Proposal: C++ Resyntaxed" ACM SIGPLAN 31:11 Nov 1995 p 74.) Runtime Environment r SECD-machine (Lispkit) r Lambda machine: a lambda calculus interpreter (parallel) r Prolog machine (Prologkit) Develop a logic programming language using infinite valued logic.

http://cs.wwc.edu/~aabyan/SRG/ (2 de 2) [18/12/2001 10:40:19]

http://cs.wwc.edu/~aabyan/SRG/Announce.html

Systems Research Group


announce the formation of the systems

http://cs.wwc.edu/~aabyan/SRG/Announce.html [18/12/2001 10:40:20]

http://cs.wwc.edu/~aabyan/SRG/ASM/

Universal Assembler
q q q

Report Release notes Programmer's Guide

http://cs.wwc.edu/~aabyan/SRG/ASM/ [18/12/2001 10:40:21]

http://cs.wwc.edu/~aabyan/SRG/VM/

Universal Interpreter
Abstract: The univeral is an interpreter for object/binary code which uses user supplied machine definition and table lookup to simulate machine execution.

Object Code
Object code file format: line of space separated integers. Each integer represents a field in an instruction format. See Universal Assembler Files simulators Machine Descriptions

http://cs.wwc.edu/~aabyan/SRG/VM/ [18/12/2001 10:40:28]

http://cs.wwc.edu/~aabyan/LABS/AR/

Architecture
1. 2. 3. 4. 5. 6. CPU Project 0 register (Stack Machine) 1 register (Accumulator Machine) n registers (Register Machine) The IAS Computer SPARC

http://cs.wwc.edu/~aabyan/LABS/AR/ [18/12/2001 10:40:31]

Unified Paradigm Grammar

Unified Paradigm Grammar


The goal of this work is
q

to design an abstract grammar for those elements that programming languages have in common in particular, for abstraction, generalization, and modules and to integrate the grammar with abstract grammars for a variety of programming paradigms.

This work is supports ideas developing in Introduction to Programming Languages where abstraction, generalization and computational models are used as unifying concepts for understanding programming languages.

Notation
Figure M.N: Notation Symbols N ::= RHS A|B (A) [ ... ] [ ... ]* [ ... ]+ itemsubscript Meaning Font Meaning

grammar rule Standard grammar symbols alternatives Bold literal terminal grouping Italic nonterminal optional zero or more one or more subscripts are used to distiguish instances

The Grammar
Figure N.M: Unified Paradigm Grammar Module: module environment ::= name [ library | adt | class ] [implementation | definition ] module [ extends name ] environment

::= declaration+

http://cs.wwc.edu/KU/PR/unified.html (1 de 7) [18/12/2001 10:40:35]

Unified Paradigm Grammar

::= [ export | private | protected | initial | final ] abstraction | import name Block: (the abstract is limited to commands and expressions) block ::= let environment in abstract tel Abstraction & invocation abstraction ::= name is abstract . abstract ::= name | generic | module | expression | command | [ a ] type invocation ::= name | abstract | application | query | specialization | name[( arguments )] signature ::= [name : ]type [--> type] Generalization & specialization generic specializtion arguments param ::= \ param[, param]+ . abstract ::= ( generic arguments ) ::= value [, value ]* ::= name is a abstract | [type] identifier [ , identifier ]* | var identifier [ , identifier ]* of type

declaration

STUFF application ::= ( generic | name ) [expression]* reference ::= assignable ::= Functional Programming: reduction of an exression to a normal form. expression ::= constant | variable | name | ( expression expression ) | \ param [, param ]+ . expression Logic Programming: deduction that either fails or returns a list of bindings logic_program theory clause predicate term ::= theory query ::= clause+ ::= predicate . | predicate :- predicate [ , predicate ]* . ::= atom | atom( term [ , term ]* ) ::= numeral | atom[( term [, term ]* )] | variable

http://cs.wwc.edu/KU/PR/unified.html (2 de 7) [18/12/2001 10:40:35]

Unified Paradigm Grammar

query ::= ?- predicate [ , predicate ]* . Imperative Programming: a sequence of bindings. command ::= skip | event | identifer0 ,..., identifiern := expression0 ,..., expressionn | {; command [ , command ]* } | {? guard --> command [ , guard --> command ]* [ , elsif boolean_expression --> command ]*[ , else --> command ]} | {* guard --> command [ , guard --> command ] } | {|| command [ , command ]* } | invocation guard ::= (event | boolean_expression)[ , boolean_expression) ]* boolean_expression ::= value ?= pattern pattern ::= list | tuple Communication and Event Primitives event ::= send | receive send ::= send message to process_identifier | p!e | output expression receive ::= receive message from process_identifier | p?x | input variable message ::= <info, a, b> Values constant ::= atomic | structured atomic ::= null | * | boolean | character | string | number structured ::= range | tuple[.name] | function | name[arguments] Exceptions Threads Types type prmitive type_def enumeration range product ::= primitive | type_def ::= Boolean | Character | String | Number ::= enumeration | range | sum | product | function ::= [ item [ , itemn ]* ] ::= [ i .. j ] | [ i, j .. k ] ::= (* [field_name:]type [ , [field_name:]type ]* )

http://cs.wwc.edu/KU/PR/unified.html (3 de 7) [18/12/2001 10:40:35]

Unified Paradigm Grammar

sum function Class class

::= (+ [tag_name:]type [ , [tag_name:]type ]* ) ::= [mutable] type --> type ::= class [implementation | definition ] module environment [ initial abstraction ][ final abstraction ]

Names i.e. Identifiers


Reserved words, keywords, and user defined names are identifiers which are sequences of alphabetic charactors and digits. The first charactor must be an alphabetic character. Case does (does not) matter.

Functional Programming
A functional program is an expression. The expressions include
q q q q

constants variables function application and function abstraction

Constants
Constants include numbers, the boolean values, nil, the arithmetic and relational operators, and other predefined function symbols.

Variables
Variable are identifiers. If the variable is the name of an abstract, then its value is the abstract otherwise its value is undefined.

Function Application
Function application takes the form ( expression1 expression2 ) The result is the reduction of the application to normal form. Reduction to normal form is function

http://cs.wwc.edu/KU/PR/unified.html (4 de 7) [18/12/2001 10:40:35]

Unified Paradigm Grammar

evaluation which if expression1 is a generic then the quantifier is removed from the expression and expression2 is substituted, in the body of expression1, for the quantified variable. If the resulting expression is reduceable, then it is reduced.

Function Abstraction
A function abstraction is in normal form and stands for its self.

Logic Programming Imperative Programming


An imperative program is a command. The commands include
q q q q q q q q q

Skip Command Application Command Assignment Command Parallel Command Sequential Command Choice Command Iterative Command Abstraction Invocation

Skip Command
The skip command has the form skip It does nothing.

Application Command
The application command has the form name( actual parameters ) The action performed by an application command is determined by its definition.

http://cs.wwc.edu/KU/PR/unified.html (5 de 7) [18/12/2001 10:40:35]

Unified Paradigm Grammar

Assignment Command
The assignment command has the form: identifer0,..., identifiern := expression0,..., expressionn For n>=0. The effect is as if the expressions are evaluated and assigned in parallel with the ith identifieri assigned the value of the ith expressioni. The identifier and expression must be type compatible (matching types).

Parallel Command
The parallel command is of the form: {|| command0,..., commandn } The programmer may make no assumptions about the degree of parallelism with which the commands execute.

Sequential Command
The sequential command is of the form: {; command0,..., commandn } The programmer may assume that the commands execute in sequence from left to right with each command terminating before the next begins.

Choice Command
The choice command is nondeterministic and is of the form: {? guard0 --> command0, ..., guardn --> commandn } The programmer may assume that if no guard evaluates to true, that the command terminates and that if some guard is true, that exactly one of the commands corresponding to a guard that evaluates to true is executed.

http://cs.wwc.edu/KU/PR/unified.html (6 de 7) [18/12/2001 10:40:35]

Unified Paradigm Grammar

Iterative Command
The iterative command is nondeterministic and is of the form: {* guard0 --> command0, ..., guardn --> commandn } The programmer may assume that while some guard is true, exactly one of the commands corresponding to a guard that evaluates to true is executed and that if no guard evaluates to true, that the command terminates. The guards are reevaluated after the execution of a command.

Abstraction
Inline abstractions are restricted to

Invocation
Invocations are restricted to direct recursion within an abstraction,

Implementation
The implementation iwill be in Java.

References
Chandy, M. K. & Taylor Stephen An Introduction to Parallel Programming Jones and Bartlett 1992. Modula-3 Java

Permission to make digital/hard copy of part or all of this work for personal or classroom use is granted without fee provided that the copies are not made or distributed for profit or commercial advantage, the copyright notice, the title of the publication, and its date appear, and notice is given that copying is by permission of Anthony A. Aaby. To copy otherwise, to republish, to post on servers, or to redistribute to lists, requires prior specific permission and/or fee. 1998 Anthony A. Aaby. Last Modified - . Send comments to [email protected]

http://cs.wwc.edu/KU/PR/unified.html (7 de 7) [18/12/2001 10:40:35]

Compiler Construction Tools in Prolog

Compiler Construction Tools in Prolog


Project Leader: A. Aaby

Scanning Context-free grammars


q q q q q q q

Introduction Context-free grammar representation EBNF to Prolog representation Left-factoring Left-recursion First sets Follow sets

Recursive descent parsing


q q q q q

Left-factoring Left-recursion First sets Follow sets Parser construction

Table driven parsing


q q

Top-down Bottom-up

Miscellaneous
q q

The user interface A scanner written in Prolog

http://cs.wwc.edu/~aabyan/SRG/Compiler/PrologTools/ (1 de 2) [18/12/2001 10:40:37]

Compiler Construction Tools in Prolog

1996 by A. Aaby Last update: Send comments to: [email protected]

http://cs.wwc.edu/~aabyan/SRG/Compiler/PrologTools/ (2 de 2) [18/12/2001 10:40:37]

http://cs.wwc.edu/~cs_dept/Environment/The_C_Family.html

The C Family
This document is under development. Completion anticipated before

q q

Introduction Lexical Structure


q q q q

Character Set, Comments, and Expressions Reserved Words Operators and Expressions Scope Rules

q q q q q

Types and Literals Conversions Names and Variables Program Structure Blocks and Statements
q

q q q q q

Declaration Statements and Definitions r Variables and Pointers r Arrays, Records, and Unions r Functions r Classes and Objects Expression Statements Control Flow Statements Input/Output Exception Handling Multithreading

q q

Libraries and Packages Tools

Introduction
The C family of languages are expression oriented imperative programming languages. C was designed for systems programming. C++ was designed for simulation and to support object-oriented programming(OOP) thus it includes support for the definition and encapsulation of objects and for
http://cs.wwc.edu/~cs_dept/Environment/The_C_Family.html (1 de 15) [18/12/2001 10:40:46]

http://cs.wwc.edu/~cs_dept/Environment/The_C_Family.html

inheritance. Java was designed for embedded systems programming and has evolved into a general purpose programming language. Notation In what follows, fixed width font is used for the symbols and reserved wors of the languages. Plurals Occuring in the description of syntax refer to a comma separated list. C A general pupose programmming language originally developed for systems programming.

/* Hello C Users */ #include <stdio.h> main() { printf("Hello C Users!\n"); }


C++ A superset of C that provides object-oriented programming (OOP) capabilities.

// Sample Hello C++ Users #nclude <iostream.h> main() { cout << "Hello C++ Userss!\n"; }
Java
q q q

Object-Oriented Multi-threading Automatic garbage collection

NO
q q q q q

structs typedefs #defines pointers explicit memory deallocation

http://cs.wwc.edu/~cs_dept/Environment/The_C_Family.html (2 de 15) [18/12/2001 10:40:46]

http://cs.wwc.edu/~cs_dept/Environment/The_C_Family.html

Sample Java program

// Hello Java Users import java.io.* class HelloJavaUsers { public static void main(String[] args) { } }
Applet Example

// Hello Java Users import java.applet.Applet; import java.awt.Graphics; public class HellloJavaUsers extends java.applet.Applet { public void paint (Graphics g) { g.drawString ("Hello Java Users!", 25 25); } } Keyfeatures
C
q

C++ Procedural language O-O superset of C classes and object inheritance polymorphism
q q

Java
q

fully O-O/C++ like

weakly typed

strongly typed

strongly typed compiler rejects references to undefined variables and absence of exception handling

Multiline comments

Single line comments

HTML documentation via javadoc extracts /**...*/


comments

http://cs.wwc.edu/~cs_dept/Environment/The_C_Family.html (3 de 15) [18/12/2001 10:40:46]

http://cs.wwc.edu/~cs_dept/Environment/The_C_Family.html
q

separate compilation declarations before code macros

class libraries and interfaces


q

declatation anywhere in code


q

q q

typedef
Preprocessor

function prototypes Preprocessor


q

No preprocessor

#include #define #if #else #endif


Makefiles and library linking
q q q

#include #define #if #else #endif


Makefiles and library linking
q q q q

No makefiles or library llinking No direct memory access Automatic storage management

Direct memory access

Direct memory access

q q

Programmer managed storage

Improved programmer managed storage new TypeName and

delete Name
q

Pointer arithmetic

q q

Pointer arithmetic Operator overloading Multiple inheritance

q q

No pointer arithmetic

No operator overloading No multiple inheritance Platform independent code Network ready Dynamic loading and linking Multi-threaded Exception handling

Platform independent language


q

Platform independent language


q

q q q q

Exception handling

inline functions

enum, struct, union create new types


reference patameters stream i/o
q q

q q q

Support for native methods declarations anywhere in code

constant variables with const Type Name = Value;

http://cs.wwc.edu/~cs_dept/Environment/The_C_Family.html (4 de 15) [18/12/2001 10:40:46]

http://cs.wwc.edu/~cs_dept/Environment/The_C_Family.html
q

Graphics & multimedia

Lexical Structure Character set, Comments and Identifiers Key features


C Character Set ASCII ASCII C++ Java Unicode \uddd - d is a hexadecimal digit /** . . . */ for HTML documentation letters and digits; the first must be a letter White space is required to separate tokens that would otherwise constitute a single token

Comments

/* . . . */ may not be nested letters, digits, and underscores; does not begin with a digit

// . . . terminates at the end of line letters, digits, and underscores; does not begin with a digit

Identifiers

Separators

Reserved Words
C auto char default else float if register signed struct break const do enum for int return sizeof switch case continue double extern goto long short static typedef C++ adds the following asm catch delete friend new operator protected public this throw virtual Java adds the following abstract boolean class cast catch inline private final finally template generic implements try inner instanceof native null package rest synchronized throws volatile byte extends future import interface outer super transient

http://cs.wwc.edu/~cs_dept/Environment/The_C_Family.html (5 de 15) [18/12/2001 10:40:46]

http://cs.wwc.edu/~cs_dept/Environment/The_C_Family.html

union unsigned void volatile while

but drops the following from C auto register struct unsigned enum signed typedef extern sizeof union

and drops the fuollowing from C++ asm inline delete template friend virtual

Separators Scope Rules Operators


C/C++/Java Arithmetic Unary + Binary + - * / % Name = Expr Name BinaryOp=Expr Assignment Name ++ Name -unary ~ binary & | ^ Name<< n, Name>> n Name>>> n && || ! Semantics positive, negative add, subtract, multiply, divide, remainder Name = Name BinaryOp Expr Name = Name+ 1 Name = Name- 1 negation and, or, xor shift left, shift right n bits right shift fill with zeros (Java) and, or, not

Bitwise

Boolean

Conditional BoolExp ? Exp1 : Exp2 conditional expression Decrement --Name, Name-Increment Relational ++Name, Name++ == != > < >= <= pre and post decrement pre and post increment equality, not equals, greater than, less than, greater or equal, less than or equal

http://cs.wwc.edu/~cs_dept/Environment/The_C_Family.html (6 de 15) [18/12/2001 10:40:46]

http://cs.wwc.edu/~cs_dept/Environment/The_C_Family.html

String

string concatenation

Types and Literals

C/C++
Void Boolean Boolean literals Character

Java
void
NA

void
NA NA

false true char


'Character' "Characters"

char unsigned
'Character' "Characters"

Character literals String Literals Integer

short int, short unsigned short int, unsigned short int unsigned int, unsigned long int, long unsigned long int, unsigned long
D+

byte 8-bit short 16-bit int 32-bit long 64-bit


(signed two's complement)

Integer literals

0D+ - octal 0xD+ - hexadecimal 0xD+ - hexadecimal D+[l] - decimal (long) D+[L] - decimal (long)

http://cs.wwc.edu/~cs_dept/Environment/The_C_Family.html (7 de 15) [18/12/2001 10:40:46]

http://cs.wwc.edu/~cs_dept/Environment/The_C_Family.html

Floating point

float double long double


D+[.D+[e[+|-]D+]] D+[.D+[E[+|-]D+]] D+[.D+[d[+|-]D+]] D+[.D+[D[+|-]D+]]

float 32-bit double 64-bit

Floatiing point literals

D+[.D+[e[+|-]D+]] D+[.D+[E[+|-]D+]] D+[.D+[d[+|-]D+]] D+[.D+[D[+|-]D+]]

Reference Reference literals

null

Conversions Names and Variables Names


A name is an identifier that has been given meaning in a program declaration and denotes either a package, a type, a field, a group of methods, a formal patameter, alocal variable, or a label. Avariable is a typed storage location

Program Structure
C C++ Java A program consists of declarations in possibly A program is organized into packages different files. The files may be separately that have hierarchical names. Each comiled. Function declarations may not be package consists of a number of nested. compilation units. The fundamental unit of programming is the Drops functions class. function. Class libraries are imported The function main() is used as the starting point for execution of the program. External libraries provide input/output. The Adds information the program needs to use these Classes No preprocessor libraries resides in the files iostrem.h, stream.h, and stdio.h.

http://cs.wwc.edu/~cs_dept/Environment/The_C_Family.html (8 de 15) [18/12/2001 10:40:46]

http://cs.wwc.edu/~cs_dept/Environment/The_C_Family.html

A preprocessor to handles a set of directives, such as the include directive, to convert the program from its preprocessing form to the pure syntax. These directives are introduced by the symbol #. Preprocessor directives Definitions and Declarations Import statements Class definition

Blocks and Statements


Except as described, statements are exeuted in sequence. Statements are executed for their effect, and do not have values. A block is a sequence of statements inclosed between braces ({}). Jave requires that variables be clearly initialized befor use.

Declaration Statements
A declaration has the form: Modifiers Type ListOfIdentifiers; and may appear at any point in the code. In the following, the Modifiers is implicit.

Variables and Pointers


C Modifiers C++ Java

const static #define


Value

public private public private protected protected static static synchronized final
Name const Type Name = Value; Type * Names; Type * Name; *Ptr - value at Ptr &Name - address of Name static final Type Name = Value; Type * Names; none

Constants

Variables Type * Names; Pointers Type * Name; *Ptr - value at Ptr &Name - address of Name

http://cs.wwc.edu/~cs_dept/Environment/The_C_Family.html (9 de 15) [18/12/2001 10:40:46]

http://cs.wwc.edu/~cs_dept/Environment/The_C_Family.html

Arrays, Records, and Unions


C/C++ Array Declaration Type Name [n1][n2]. . . [nj] ; size must be specified Java Type [ ][ ] . . . [ ] Name;

Reference
Record Type Definition

Name [i1] . . . [in]

Name [i1] . . . [in] NA

struct StructType { fields };


fields are variable definitions

Record Declaration Field access

StructType StructVariable ; StructVariable

NA NA

. FieldName PtrToStruct -> FieldName

Union Type Definition

union UnionType { members} ; alternatives are variable declarations

NA

Union Declaration Member Access

UnionType UnionVariable ; UnionVariable . Member

NA NA

Subscripts lie in the range of 0 to nj - 1. An array name by itself is an address, or pointer value, and pointers and arrays are almost identical in terms of how they are used to access memory. A pointer is a variable that takes an address as its value. An array name is a particular fixed address that can be thought of as a constant pointer. Thus pointer arithmetic provides an alternative to array indexing. // a is an array of 100 integers values and p is an address of an integer int a[100], *p ... p = a; p = &a[0]; // these are equivalent assignments as are p= a + 1; p = &a[1];

Functions
http://cs.wwc.edu/~cs_dept/Environment/The_C_Family.html (10 de 15) [18/12/2001 10:40:46]

http://cs.wwc.edu/~cs_dept/Environment/The_C_Family.html

C Function protoype Formals Functions type is void for procedures Formals Parameters are Call-byFormals reference parameter Type Name ( Formals ) The formals are a list of types Type Name ( Formals ) Block list of declarations value List of Type Name Type *Name Actuals reference parameters List of Expr &Name

C++ Type Name ( Formals ) The formals are a list of types Type Name ( Formals ) Block list of declarations value List of Type Name Type &Name List of Expr Name

Java NA NA NA NA NA NA

NA

Classes and Objects


C Class Definition Object declaration Fields - State Methods Formals reference parameter Actuals reference parameter C++ class ClassName { fields and methods } ; Java class ClassName { fields and methods } ClassName Name = new ClassName() ; Modifiers Type ListOfIdentifiers ; Modifiers Ype Name ( Formals ) Block value list of Type Name

NA NA
NA NA

Parameters are Call-by- NA value NA list of Type Name Type &Name NA list of Expr Name

list of Expr

Names are a comma separated list.

http://cs.wwc.edu/~cs_dept/Environment/The_C_Family.html (11 de 15) [18/12/2001 10:40:46]

http://cs.wwc.edu/~cs_dept/Environment/The_C_Family.html

If a main method is present, it is executed when the class is run as an application. It can create objects, evaluate expressions, invoke other method, and do anything else needed to define an object's behavior.

Expression Statements
C/C++/Java Assignment Name = Expression; Name Op = Expression; ++Name; --Name; Name++; Name--; Name ( Formals )

Calls

Control Flow Statements


C/C++/Java Empty statements Labeled Statements (case and default only appear in switch statements) Selection Statements ; Label: Statement case ConstatExpression : Statement

default : Statement if ( BooleanExpr ) Statement if ( BooleanExpr ) Statement1 else Statement2 switch ( IntegerExpr ) Block while ( BooleanExpr ) Statement do Statement while ( BooleanExpr ) for ( InitExpr; BooleanExpr; IncrExpr )
Statement

Iteration Statements

Jump Statements

break LabelOpt ; continue LabelOpt ; return ExpressionOpt ;


{ sequence of statements }

Block/Compound

Input/Output

http://cs.wwc.edu/~cs_dept/Environment/The_C_Family.html (12 de 15) [18/12/2001 10:40:46]

http://cs.wwc.edu/~cs_dept/Environment/The_C_Family.html

C++

Java

#include <stdio.h> scanf(); printf(); Exception handling


C Exception handling is

#include <iostream.h> cin >> Name; cout << Expression;

import java.io.* System.in System.out

C++

Java required

NA optional

define an exception

NA

public class Exception extends ExeptionClass { public Exception ( Formals


) Block }

Declare an exception NA NA Generate an exception NA

throws
Exception () ;

Exception ;

throw

throw

Exception ( Actuals ) ;

try Block catch (Exception Exception)


Detect and handle exceptions NA Block0 ...

try Block catch (Exception Exception)


Block0 ...

catch (Exception exception)


Blockn-1 Done whether an exception occurs on not NA NA

catch (Exception exception)


Blockn-1

finally Blockn catch (Exception e)


Block

Catch any exception NA NA

Multithreading
Java

http://cs.wwc.edu/~cs_dept/Environment/The_C_Family.html (13 de 15) [18/12/2001 10:40:46]

http://cs.wwc.edu/~cs_dept/Environment/The_C_Family.html

Standard Libraries and Packages


C C++ Java

assert.h the C libraries plus ctype.h iostream.h errno.h float.h and commercial class libraries limits.h local.h math.h setjump.h signal.h stdarg.h stddef.h stdio.h stdlib.h string.h time.h

java.applet java.awt java.awt.image java.awt.peer java.io java.lang -automatically imported java.net java.util
Enterprise API - JDBC, IDL, RMI Server API Security API Commerce API Management API Media API - 2D, Framework, Share, Animation, Telephony, 3D Beans API Embedded API

Tools
Program editor Compiler Interpreter Linker & Loader Preprocessor Cross references Source-level debugger Debugging aids System builder Version manager Design editor Code generator Testing aids Documentation management Unix vi, emacs Wintel C gcc C++ g++ Java javac java

gdb gdb

jdb javap (dissassembler) appletviewer javah - C header files javadoc

make rcs

http://cs.wwc.edu/~cs_dept/Environment/The_C_Family.html (14 de 15) [18/12/2001 10:40:46]

http://cs.wwc.edu/~cs_dept/Environment/The_C_Family.html

by Anthony A. Aaby Last update: Send comments to: [email protected]

http://cs.wwc.edu/~cs_dept/Environment/The_C_Family.html (15 de 15) [18/12/2001 10:40:46]

Notes on ethics

Notes on Ethics
Anthony Aaby Walla Walla College [email protected] Last Modified: . Comments and content invited: [email protected]

q q q q q q q q q q

Computational ethics Is ethics resource management? Can ethics contribute to system design? An Ethical Universe Is ethics interesting? How many minds? Bibliography Survey of ethics Common ethical principles Miscellaneous notes

Copyright (c) 2000 by Anthony Aaby. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at http://www.opencontent.org).

http://cs.wwc.edu/~aabyan/Ethics/ [18/12/2001 10:40:50]

ethics

Theoretical Ethics

Computational Ethics
A rough sketch Anthony Aaby Walla Walla College [email protected] Status: work in progress - rough draft Started: November 2000 Last Modified: . Comments and content invited: [email protected]

ABSTRACT: Competition for and consumption of resources is at the core of ethical issues. Solutions to these problems have been at the core of both operating system design and internet algorithms. The solutions are traditionally integrated into the software. However, the emergence of intelligent autonomous agents such a bots and spiders which compete with human users for resources on the internet have introduced unpredictable and uncontrollable elements into the environment. Theoretical studies in evolutionary ethics and experiments with artificial life suggest ways in which ethical behavior may emerge in autonomous agents. In this paper, a rough sketch of how ethics may be given a computational formulation that will assist in the emergence of ethical autonomous agents. This is a rough sketch of an ethical theory based on metaphysics where ethics can be viewed as a formal system, an abstraction of reality, much as the various geometries are abstractions of reality. The result is a teleological computational ethical theory which provides justification for altruism and reciprocity.

1 Introduction
Human and non-human users share the Internet - the WWW. Non-human agents are both autonomous and social just as are human users. They send and receive messages, communicating with both humans and machines. Some autonomous agents carry out jobs, such as searching the WWW,
http://cs.wwc.edu/~aabyan/Ethics/ethics.html (1 de 10) [18/12/2001 10:40:54]

ethics

arranging meetings or compiling music recommendations, more or less anonymously and act on behalf of a single user or an organization. Non-human agents as well as more hostile viruses and worms compete with humans for bandwidth, cpu cycles, and storage space. Autonomous agents possessing the capacities to do things that are useful to humans also have the capacity to do things that are harmful to humans and other entities [Helmers et al]. Ethics provide behavioral guidelines in the competition for and consumption of resources. As artificial intelligence has moved closer to the goal of producing fully autonomous software agents, ethical issues in the interaction between and among humans and their autonomous agents increase in importantance. Just as human beings differ in their skills and ethical capabilities, so autonomous software agents differ in their skills and ethical1 capabilities. And we have no reason to expect autonomous agents to be any more uniform in their decisions then an arbitrary collection of humans. Further, there is no reason to believe that even if moral perfection in machines were computationally attainable2 [Moore, Allen et al] that all autonomous agents would be constructed with perfect ethical capabilities. The existence of a wide variety of autonomous software agents and anti virus software which provides in effect, private security guards is evidence enough that we are far past having the luxury of theorizing about what ethical values autonomous agents should have as Asimov has done with his Three Laws of Robot Ethics3 [Asimov]. We now have, on the internet, a heterogeneous mix of human and non-human agents with a wide variety of ethical standards and abilities. The issue interest is not the reasoning power of computers but the evolution of proactive and reactive ethical behavior in autonomous agents. Martijn Koster created Guidelines for Robot Writers and A Standard for Robot Exclusion. The latter describes the mechanisms for WWW servers to indicate to robots which parts of their server should not be accessed and the former are suggestions for the design and management of software agents which involve voluntary compliance with the robot exclusion mechanisms. How should ethical components be constructed for such agents? Computationally, the call by John Stuart Mill and Jeremy Bentham for the greatest good for the greatest number, seems to be a natural starting point. Just as Horn clause logic and the unification algorithm has provided a computational approach to reasoning suitable for use by a machine, so we must devise a computational approach to ethical behavior suitable for autonomous agents. Koster's approach is a beginning. The language of ethics structures the values of the real world just as the language of geometry structures the spatial aspect of the real world. However, ethics differs from geometry in two significant ways. The the concepts of ethical language can slip and slide and sometimes one ethical principle will conflict with or override another [Maurice Stanley]. These differences suggest that a nontraditional logic be used (such as a multivalued default logic or a fuzzy logic). In this paper I confine myself to the language and leave a discussion of the logic for a later paper. There are several alternate approaches. One is to use genetic algorithms and the methods of evolutionary programming to create an artificial life community with emergent ethical behaviors. Another is that of evolutionary ethics and sociobiology.

http://cs.wwc.edu/~aabyan/Ethics/ethics.html (2 de 10) [18/12/2001 10:40:54]

ethics

Ethics must be grounded in metaphysics [Miculan]. The ethics developed here recognizes the nature of reality rather than attempts to prescribe morality. Since the ethical code is derived from fundamental metaphysical principles, it will be suitable for any natural or artificial community of interacting entities. The code is developed as far as the principle of reciprocity. The remainder of this paper is structured as follows. Section 2 is an overview of artificial societies including cooperating and competing processes in operating systems, the internet, and social simulations. Section 3 is the core of the paper and it presents the metaphysical foundations and the emergent ethics. Section 4 presents the conclusions.

2 Artificial societies
In a operating system environment programs form a community of cooperating and competing processes which compete for access to a variety of scarce resources some of which can be shared, others to which a process must have exclusive access. Processes
q q

execute at a non-zero speed but no assumption can be made regarding relative speeds, and request resources at unpredictable times and in unpredictable amounts.

In the environment the utilization of the resources must include:


q q q q

Efficiency - Resources should be used as much as possible. Fairness - Processes should get the resources they need. Absence of deadlock or starvation - No process should wait forever for a resource. Protection - No process should be able to access a resource with out permission.

Efficiency, fairness, absence of deadlock or starvation and protection are designed into the operating system. As an example of difficulties that arise with multiple processes, consider two individuals attempting to cross a stream from opposite sides where the set of stepping stones will support only one person at a time. It is easy to imagine a situation where the two become deadlocked. The necessary conditions for deadlock are:
q q q

Mutual exclusion: once a process obtains a particular resource, it has exclusive resource. Hold and wait: a process may hold a resource at the same time it requests another one. Circular waiting: each process holds a resource while waiting for a resource held by another process. No preemption: resources can be released only by action of the resource holding the process.

The usual solution is to implement a resource manager (the operating system) from which processes request resources. While it is possible to construct an environment where deadlock cannot occur, the
http://cs.wwc.edu/~aabyan/Ethics/ethics.html (3 de 10) [18/12/2001 10:40:54]

ethics

resulting solution is not considered efficient enough to be practical. Instead the operating system implements several techniques to reduce the likely hood of deadlock by insuring that one or more of the necessary conditions for deadlock cannot be met. Figure 1 summarizes methods for preventing and avoiding deadlock. Figure 1: Methods for prevention and avoidance of deadlock Deadlock prevention - prevent one of the necessary conditions for deadlock from holding.
q

Mutual exclusion r Create virtual resources. Hold and wait r Require a process to request all of its resources at once or r to release all currently held resources prior to requesting any new resources. Circular wait r Establish a total order on all resources in the system and allow processes to acquire a resource only if it's index is greater than all the indices of the resources it already has. Preemption r Implement round robin sharing.

Deadlock avoidance: Use the Banker's algorithm to allocate resources. A computer network consists of a community of a large number of nodes (computers) in an environment where the network changes in topology, in the underlying technologies upon which they are based, and in the demands placed on them by application programs. The network must provide general, cost-effective, fair, robust, and high-performance connectivity among the nodes in the network. The individual nodes and application programs may engage in hostile, uncooperative behavior. However, key nodes in the network utilize algorithms to minimize the negative effects of hostile behavior. A network environment differs from an operating system environment in that there is no centralized control or management. A significant amount of research has gone into the study of artificial societies and the simulation of social environments. Perhaps the most well known is the research of Robert Axelrod who has studied the Iterated Prisoner's Dilemma problem. In most cases the result has been the emergence of a cooperative society based on some variant of the Tit-for-Tat strategy suggested by Anatol Rapoport. In addition research into artificial life with evolutionary programming techniques and genetic algorithms paves the way for improved understanding of evolution and social behavior.

3 Computational ethics
Miculan has proposed to ground ethics in Whitehead's metaphysics. Her approach is sumarized in Figure 2.
http://cs.wwc.edu/~aabyan/Ethics/ethics.html (4 de 10) [18/12/2001 10:40:54]

ethics

Figure 2: from Alison Roberts Miculan's Ethics and Reality Metaphysical principles Principle of interrelation Principle of novelty The universe is completely interrelated. Creativity allows disjunctive elements to form a conjunctive new entity.

Ethical principles Ethical Principle of Value All existents have value. Ontological ethical principle Goodness Goodness is that which maintains and enhances existence. Evil Evil is that which destroys, degrades or undermines existence. While the end results are similar, I use a different formulation. I begin with entities and actions. Terms: The metaphysical universe consists of entities which engage in actions which change the state of the universe. The terms entity, actions, and state are left undefined and undifferentiated so that the theory may include both animate and inanimate entities and be applicable to both. The relationships between the entities in the universe are described by two axioms - the axioms of dependence and independence. They apply to both to animate and inanimate entities, to entities with and without free will. The first axiom, independence, describes what range of actions are available to an entity. Axiom of independence: Every entity has the right to do whatever it wants (Smullyan 1977). The relevant phrase is "the right to do whatever it wants". The behavior of entities is determined by the laws of nature which define its behavior. In addition, the behavior of entities with free will, is determined by both the laws of nature and the free will choice of the entity. The mechanism that determines the behavior is immaterial. It is only the behavior that is of interest. As Miculan says, Ethical actions must take place in a context in which many (at least two) possible actions could occur. That is to say, actions which could not have been made otherwise are not ethical decisions (in fact, they are not decisions at all). Different entities may have rights to do incompatible acts. The consequence of an action is as described in Axiom of dependence: Every action of an entity affects all other entities.
http://cs.wwc.edu/~aabyan/Ethics/ethics.html (5 de 10) [18/12/2001 10:40:54]

ethics

Some alternate formulations of the axiom of dependence include


q q

The universe is completely interrelated (Whitehead 1974 & 1978) and Entities are interdependent.

However, an entity's "right to do whatever it wants" does not necessarily prevent another entity's right to interfere with the rights of the other as Smullyan (1977) points out, If the people want laws, they have a perfect right to pass them. The criminal has a perfect right to break them, the police have a perfect right to arrest him, the judge has a perfect right to sentence him to jail, and so on.

Emerging computational ethics


Normative ethical systems (both religious and legal) as well as organizations of all types exist to guide individuals through the choices between the incompatible rights of distinctive entities. In order to compare possible actions with the intent of determining the preferred ethical course we need an axiom that provides a mechanism for assigning a value to an action. I find this in the nature of entities themselves. The axiom of integrity describes the goal of each entity which is necessary to provide both motivation and value for actions. Axiom of integrity: Every entity wants to maintain its integrity. Some alternative axioms include
q q

Axiom of identity: Every entity wants to maintain its identity. Axiom of existence: All existents have value [Miculan].

While I would not want to argue that integrity, identity, and existence are synonyms, they are close enough in this context. Where an entity has a choice of behaviors, ethical systems suggest that some behaviors are preferred over others labeling some a "good" or "right" others as "bad" or "wrong". I use the following definitions of goodness and evil [adapted from Miculan]. Definition: Goodness is that which maintains and enhances integrity. Definition: Evil is that which destroys, degrades or undermines integrity. Using these definitions, actions may be identified as good or evil and by extension, entities which engage in good or evil actions may by association be identified as good or evil. The computation of the goodness value of an action A will depend on all future actions that result from action A. Since there are no doubt many alternative actions that could result the situation is much like a predicting the
http://cs.wwc.edu/~aabyan/Ethics/ethics.html (6 de 10) [18/12/2001 10:40:54]

ethics

outcome of a chess game and in principle is the same. These definitions place this theory among the teleological theories as they essentially say that an action is morally right if the consequences of that action are more favorable than unfavorable. In this development I differ with Miculan. I focus on integrity while Miculan focuses on existence. For example, Miculan's Ontological Ethical Principle states that as a fact of our very existence, we have value. The following table summarizes Miculan's formalization.

Figure 3: Computational ethics Definition The metaphysical universe consists of entities which engage in actions which change the state of the universe. Axioms The universe is completely interrelated. Every entity has the right to do whatever it wants. Every entity wants to maintain its integrity. Definitions Incompatible actions are actions by two entities which result in a state in which either entity is unable to maintain its integrity. Goodness is that which maintains and enhances integrity. Evil is that which destroys, degrades or undermines integrity. mutually assured destruction Proposition If two entities have incompatible wants, they may interfere with each other. Two entities of equal strength and incompatible wants, can survive only through the fear of mutually assured destruction. The principle of rights is necessary for an objective code of morality.

4 Conclusions
Patricia Williams would argue that while the weak interpretation (love self, kin, and friend) of the Love Command is likely to be computable, the strong interpretation (love of neighbor as oneself) is not likely to be computable.

Acknowledgments Notes
http://cs.wwc.edu/~aabyan/Ethics/ethics.html (7 de 10) [18/12/2001 10:40:54]

ethics

1 ... possible behavior ... I use ethic, ethics, and ethical instead of the more accurate social laws or socially acceptable behavior because they are shorter. 2 I find discussion of the possible incompleteness of ethical systems and whether a computer program could pass the Turing test and be perceived as ethical irrelevant for two reasons. First, a system is only interesting if it is incomplete i.e., ethics is interesting because of the existence of ethical dilemmas. And second, whether or not computer programs can be made perfectly ethical is not relevant because humans are not uniformly ethical and are unlikely to be perfectly ethical with the result that ethically imperfect (hostile) programs have and will continue to be constructed. I believe that the most fruitful approach is to recognize the reality of this environment. If robots can and do evolve beyond the capabilities of humans, I hope that they will be gentle on us, the lower species. If they cannot, then I hope that we should have a class of gentle robots that help enrich our lives. For those who disagree, tell me how the human mind works and then we can decide whether machines can think. 3 Asimov has proposed three laws for robots which impose ethical behavior on robots which illustrate both the Ethical Principle of Value and the definitions of Goodness and Evil.

Isaac Asimov's Three Laws of Robot Ethics 1. A robot may not injure a human being, or, through inaction, allow a human being to come to harm. 2. A Robot must obey the orders given it by human beings except where such orders would conflict with the First Law. 3. A robot must protect its own existence as long as such protection does not conflict with the First or Second Law.

His laws conform to the ethical principle of value in protecting human life and robot existence. The laws are asymmetric with respect to humans and robots making robots second class citizens with respect to humans. Of course an unscrupulous manufacturer of robots is likely to ignore these laws. 4 Ethical rules have been proposed for information gathering robots (bots) loosed on the internet. The rules are based on the traditional rules of Netiquette [Koster, Helmers et al]:

http://cs.wwc.edu/~aabyan/Ethics/ethics.html (8 de 10) [18/12/2001 10:40:54]

ethics

Traditional rules of Netiquette 1. Never disturb the flow of information! 2. Help yourself, this is an expression of decentralized organization. 3. Every user has the right to say anything and to ignore anything.

References
Allen, Varner, and Zinser Prolegomena to any future artificial moral agent Journal of Experimental & Theoretical Artificial Intelligence Volume: 12 Number: 3 Page: 251 -- 261 Asimov, I. (1968). The rest of robots. London: Granada 1968. Gorniak-Kocicowska, Krystyna The Computer Revolution and the Problem of Global Ethics The Research Center on Computing & Society at Southern Connecticut State University 2000. Helmers, Hoffmann, and Stamos-Kaschke (How) Can Software Agents Become Good Net Citizens? CMC Magazine, Vol. 3, No. 2, Feb. 1997 Hoffmann, Robert (2000) Twenty Years on: The Evolution of Cooperation Revisited Journal of artificial Societies and Social Simulations vol. 3 no. 2, Koster, Martijn (1993) Guidelines for Robot Writers URL: info.webcrawler.com/mak/projects/robots/robots.html Miculan, Alison R. Ethics and Reality 20th World Philosophical Congress Moor, James. Is Ethics Computable? Metaphilosophy 26, nos. 1-2 (January-April): 1-21. Sandip Sen, `` Reciprocity: a foundational principle for promoting cooperative behavior among selfinterested agents"'' , in Proc. of the Second International Conference on Multiagent Systems, pages 322--329, AAAI Press, Menlo Park, CA, 1996. Shoham, Yoav and Tennenholtz, Moshe. "On social laws for artificial agent societies" Artificial Intelligence vol 73. Smullyan, Raymond (1977). The Tao is silent. Harper & Row 1977. Smullyan, Raymond (1983). 5000 B. C. and other Philosophical Fantasies St. Martins Press 1983. Stanley, Maurice F. The Geometry of Ethics 20th World Philosophical Congress Whitehead, A. N. Process and Reality Macmillan 1978. Whitehead, A. N. Religion in the Making New American Library 1974. Williams, Patricia A. Christianity and Evolutionary Ethics: Sketch Toward a Reconciliation Zygon, vol. 31, no. 2 (June 1996)

Copyright (c) 2000 by Anthony Aaby. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at http://www.opencontent.org).

http://cs.wwc.edu/~aabyan/Ethics/ethics.html (9 de 10) [18/12/2001 10:40:54]

ethics

Last Modified - . Comments and content invited [email protected]

http://cs.wwc.edu/~aabyan/Ethics/ethics.html (10 de 10) [18/12/2001 10:40:54]

ethics

Is ethics resource management?


Anthony Aaby Walla Walla College [email protected] Last Modified: . Comments and content invited: [email protected]

ABSTRACT: Competition for and consumption of resources is at the core of ethical issues. Solutions to these problems have been at the core of both operating system design and internet algorithms. The solutions are traditionally integrated into the software. However, the emergence of intelligent autonomous agents such a bots and spiders which compete with human users for resources on the internet have introduced unpredictable and uncontrollable elements into the environment. Wonder if in the emerging complexity of ... Hope that ethicists will recognize elements of their own discipline and perhaps find a new language in which to cast their problems. Ethical theories can be put to use in OS/Networking design.

resource management, improve the predictability of our environment, ...

Introduction
Applied ethics ... ethics in human resource management ... ethics of natural resource management (environmental ethics) ... ethical rules are in essence, rules for resource management ... Consider six principles that the vast majority of ethicists and moral agents generally would accept.

Figure 1: Ethical domains and resources Ethical domain Honesty and Promise-Keeping rule for managing Truth and information

http://cs.wwc.edu/~aabyan/Ethics/def.html (1 de 7) [18/12/2001 10:40:58]

ethics

Nonmaleficence and Beneficence Life Autonomy Justice Individuality Order

1. Principle of Autonomy: Generally, people have the right to live their lives as they see fit so long as doing so does not interfere with the correlative rights of others. 2. Principle of Equality (Justice): Generally, people should be treated in a manner that accords to each an equality of respect. Look at resource management from the perspective of operating system design and computer network design to provide terminology and to survey some of what computer scientists know about resource management. Examine some ethical rules from the perspective of resource management. Suggest directions for further research into the idea of ethics as resource management.

Operating Systems
An operating system is a collection of processes and resources. The processes form a community of cooperating and competing processes which compete for access to a variety of resources some of which can be shared, others to which a process must have exclusive access.

The metaphysical world


Resources consumable shareable
q q

simultaneously serially

Processes A process is a program in execution. Processes have a life cycle which begins with its creation. It then aternates between running and waiting for a resource. Its final state is when it is finished or is "killed" and exits. During its life cycle it consumes, shares, and creates resources. Its use of resources may be cooperative and competitive. independent, hostile

http://cs.wwc.edu/~aabyan/Ethics/def.html (2 de 7) [18/12/2001 10:40:58]

ethics

In a operating system environment processes form a community of cooperating and competing processes which compete for access to a variety of scarce resources some of which can be shared, others to which a process must have exclusive access. Processes
q q

execute at a non-zero speed but no assumption can be made regarding relative speeds, and request resources at unpredictable times and in unpredictable amounts.

Design considerations: Independent: process cannot affect or be affected by the other processes Dependent: processes can affect or be affected by the other processes. Possible to deadlock or starve. There are several subcategories cooperating -- shared task and possibly shared resources competing -- may starve opponent hostile -- attempt to destroy another's resources Laws which describe possible actions prevent ... guarantee the successful coexistence of multiple agents Processes interact with each other through shared resources.

Bad things
Race conditions Starvation Deadlock Safety property: nothing bad will happen (negative duties). Safety properties can always be satisfied by processes that do nothing.

Good things
Liveness property: something good will happen (positive duties). Liveness properties specify things that must be done. In the environment the utilization of the resources must include:

http://cs.wwc.edu/~aabyan/Ethics/def.html (3 de 7) [18/12/2001 10:40:58]

ethics

q q q q

Efficiency - Resources should be used as much as possible. Fairness - Processes should get the resources they need. Absence of deadlock or starvation - No process should wait forever for a resource. Protection - No process should be able to access a resource without permission.

Operating system designers try to guarentee that the resulting operating satisfies these design goals. Traditionally, efficiency, fairness, absence of deadlock or starvation and protection are designed into the operating system. As an example of difficulties that arise with multiple processes, consider two individuals attempting to cross a stream from opposite sides where the set of stepping stones will support only one person at a time. It is easy to imagine a situation where the two become deadlocked. The necessary conditions for deadlock are:
q q q

Mutual exclusion: once a process obtains a particular resource, it has exclusive resource. Hold and wait: a process may hold a resource at the same time it requests another one. Circular waiting: each process holds a resource while waiting for a resource held by another process. No preemption: resources can be released only by action of the resource holding the process.

Scheduling Criteria (Goals)


q q q q q q

Fairness: each process gets its fair share Efficiency: CPU utilization Throughput: number of processes/time unit Turnaround: time it takes to execute a process from start to finish Waiting time: total time spent in the ready queue Response time: amount of time it takes to start responding (average, variance)

It is desireable
q q q

to ensure that all processes get the CPU time they need and to maximize CPU utilization and throughput, and minimize turnaround time, waiting time, and response time.

And may want to


q q

optimize the minimum or maximum (minimize maximum response time) minimize variance in response time (i.e. predictable response time)

Managers
In order to solve the coordination problems, operating systems are designed around a variety of
http://cs.wwc.edu/~aabyan/Ethics/def.html (4 de 7) [18/12/2001 10:40:58]

ethics

managers. There are managers for devices, file systems, the memory system, the central processor, and the processes. The core or kernel of the operating system provides protection services ... Device drivers File system manager Memory manager Process manager/scheduler life cycle create death - kill

Design Principles
The usual solution is to implement a resource manager (the operating system) from which processes request resources. While it is possible to construct an environment where deadlock cannot occur, the resulting solution is not considered efficient enough to be practical. Instead the operating system implements several techniques to reduce the likely hood of deadlock by insuring that one or more of the necessary conditions for deadlock cannot be met. Figure 2 summarizes methods for preventing and avoiding deadlock. Figure 2: Methods for prevention and avoidance of deadlock Deadlock prevention - prevent one of the necessary conditions for deadlock from holding.
q

Mutual exclusion r Create virtual resources so that each process appears to own the resource. Typically done for printers. Hold and wait r Require a process to request all of its resources at once or r to release all currently held resources prior to requesting any new resources. Circular wait r Establish a total order on all resources in the system and allow processes to acquire a resource only if it's index is greater than all the indices of the resources it already has. Preemption r Implement round robin sharing.

Deadlock avoidance: Use the Banker's algorithm to allocate resources.

Computer Networks
http://cs.wwc.edu/~aabyan/Ethics/def.html (5 de 7) [18/12/2001 10:40:58]

ethics

A computer network consists of a community of a large number of nodes (computers) in an environment where the network changes in topology, in the underlying technologies upon which they are based, and in the demands placed on them by application programs. The network must provide general, cost-effective, fair, robust, and high-performance connectivity among the nodes in the network. The individual nodes and application programs may engage in hostile, uncooperative behavior. However, key nodes in the network utilize algorithms to minimize the negative effects of hostile behavior. A network environment differs from an operating system environment in that there is no centralized control or management.

Ethical Rules as Resource Management Rules


If every entity gets whatever resources it wants/needs, there are no ethical issues of importance. Consider a static universe where nothing ever changes. Such a universe can have no need of ethics. Consider a second universe where there is only one active entity and everything else is static. If ethics exists in this second universe, they are completely determined by the single active entity. Ethics is unnecessary
q q q

Zero entities One entity n+2 entities r independent r dependent

Internal state
q q

wants vs needs beyond capabilities - sunlight, sky color, grass color

Ethics becomes an issue only when entities are capable of conflict over resources.

Conclusions
further research, open questions

References
Operating systems texts

http://cs.wwc.edu/~aabyan/Ethics/def.html (6 de 7) [18/12/2001 10:40:58]

ethics

Copyright (c) 2000 by Anthony Aaby. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at http://www.opencontent.org).

http://cs.wwc.edu/~aabyan/Ethics/def.html (7 de 7) [18/12/2001 10:40:58]

Can ethics contribute to system design?

Can ethics contribute to system design?


Anthony Aaby Walla Walla College [email protected] Document purpose: This paper is the result of attempting to answer the questions "Is the language of ethics a specialized language of a limited domain or is it a language that can be adapted to meet the needs of areas such as resource management, decision theory, and system requirements, verification, and validation? And if so, what is the potential for cross-fertilization between the areas?". Document status: rough, working draft Document use: no warranty is expressed or implied for the use of this material. Last Modified: . Comments and content invited: [email protected]

Abstract: This paper explores the possibility that the vocabulary of ethics can provide a useful vocabulary for system life cycle processes especially in the areas of structuring requirements and in the interaction between requirements and the activities of verification and validation.

Introduction
This paper is the result of attempting to answer the question "Is the language of ethics a specialized language of a limited domain or is it a language that can be adapted to meet the needs of software engineering specifically, system requirements, verification, and validation?". The remainder of this paper is structured as follows. Section two is a short review of ethics. Section three is a short review of the system life cycle processes. Section four is an examination of operating system design from the view of ethical theories. Section five is a summary and conclusion.

A short review of ethics


http://cs.wwc.edu/~aabyan/Ethics/adapt.html (1 de 11) [18/12/2001 10:41:07]

Can ethics contribute to system design?

The field of ethics involves systematizing, defending, and recommending concepts of right and wrong behavior. Ethics is divided into three general areas, metaethics, normative ethics, and applied ethics. Metaethics investigates the source and meaning of ethical principles. Normative ethics describe the ethical standards that regulate right and wrong. Applied ethics resolve specific ethical controversies using the tools of metaethics and normative ethics. The next two subsections review metaethics and normative ethics.

Metaethics
The task of metaethics is to determine the set of entities and behaviors of interest and to determine the source of ethical values. Traditional sources of ethical values identified in metaethical argument may be divided into objective or subjective sources. Objective sources include divine commands and part of the fundamental nature of the universe. Subjective sources include the individual and culture. ... duties and right vs consequences and good ...

Normative ethics
Normative ethics involves arriving at the ethical standards that regulate conduct. The key assumption is that there is only one ultimate criterion of ethical conduct whether it is a single rule or set of principles. It is common to classify ethical theories into several categories: 1. 2. 3. 4. virtue theory, deontological theories, consequentialist theories, and relativistic theories.

In addition to determining ethical behavior, an ethical theory should prescribe a method for resolving ethical conflicts should any arise in an application of the theory. Virtue theory suggests that ethic behavior is the result of good habits of character or virtues. Suggested virtues include: wisdom, courage, temperance, justice, fortitude, generosity, self-respect, good temper, and sincerity. Vices or negative virtues include cowardice, insensibility, injustice, and vanity. Deontological theories variously identify duties, rights, obligations, and categorical imperatives. Duties and obligations have been classified under several categories including
q q q

duties to God, duties to oneself, and duties to others which include r duties to family, r social duties, and r political duties.

http://cs.wwc.edu/~aabyan/Ethics/adapt.html (2 de 11) [18/12/2001 10:41:07]

Can ethics contribute to system design?

The basic rights include life, liberty and the pursuit of happiness and are natural, universal, equal, and inalienable (following John Locke and Thomas Jefferson). A basic formulation of the categorical imperative is: actions toward another entity should reflect the value of that entity (Kant). The focus is on moral duties or obligations rather than on moral value or goodness. Intentions play a significant role in determining whether an act is ethical. Consequentialist (teleological) theories determine ethical behavior by weighing the consequences of an action. The good and bad consequences of an action are tallied and if the total good consequences outweigh the total bad actions, then the action is ethically proper. Thus an action is ethical if the consequences of that action are more favorable than unfavorable with respect to some criteria. Criteria include affected groups and the dimension of time. Three criteria with respect to agents have been suggested
q q

Ethical egoism: only consequences to the entity performing the action are considered. Ethical altruism: only consequences to everyone except the agent performing the action are considered. Utilitarianism: the consequences to everyone of an act or rule are considered (Bentham, Mills).

In the dimension of time, the influence of action may extend beyond the immediate consequences of the act. The focus on consequences is problematic since consequences are, in almost all cases, outside the agent's immediate and direct control. The focus is on moral value or goodness rather than on moral duties or obligations. An action's consequences (what is good) are more important than on moral obligations (what is right). Human nature and experience determine what the good is. The following table contrasts the features of deontological and teleological theories.

DEONTOLOGICAL THEORIES 1. The focus is on moral duties (what is right) rather than on an action's consequences (what is good). 2. Considerations about moral duties are more important than considerations about moral value. 3. Since the focus is on moral duties, the individual's intentions have a substantial role in a situation's moral evaluation and consequences that arise through the individual's actions have no relevance.
http://cs.wwc.edu/~aabyan/Ethics/adapt.html (3 de 11) [18/12/2001 10:41:07]

TELEOLOGICAL THEORIES 1. The focus is on an action's consequences (what is good) rather than on moral duties (what is right). 2. Considerations about moral value are more important than considerations about moral duties. 3. Since the focus is on moral value, the consequences that an individual's actions produce have a substantial role in a situation's moral evaluation and the individual's intentions have no

Can ethics contribute to system design?

4. There is no one specifiable relation between good and right. 5. Concepts about moral value (i.e., what is good) are definable in reference to concepts about moral duties (i.e., what is right). 6. The right is prior to the good. 7. An action's goodness (or value) depends upon the action's rightness. 8. It is the individual's moral status that is important. 9. The statement 'x is a moral individual' means 'x did what was right with the right intention'. 10. Deontological ethics stresses that reason, intuition or moral sense reveals what is right. 11. There are some acts that are moral or immoral in themselves. 12. Moral duties have a negative formulation. 13. Other's personal interests or happiness have no relevance in one's moral considerations or evaluations, one's own moral duties have precedence over all other considerations. 14. To do what is moral (i.e., right) requires that one observe one's moral duties, possess the right intentions and avoid those actions that are immoral in themselves.

4. 5.

6. 7. 8. 9.

10.

11. 12. 13.

14.

relevance. There is a specifiable relation between good and right. Concepts about moral duties (i.e., what is right) are definable in reference to concepts about moral value (i.e., what is good). The good is prior to the right. An action's rightness depends upon the action's goodness (or value). It is the action's moral status that is important. The statement 'x is a moral action' means 'x produces at least as good consequences as all other possible actions'. Teleological theories argue that experience, rather than reason, reveals what is good. There are no actions that are moral or immoral in themselves. Moral duties have a positive formulation. One must give equal and impartial consideration to other's interests and happiness, as well as one's own, in all moral considerations and evaluations. To do what is moral (i.e., good) requires that one acts so as to maximize the happiness that one's action produce.

Relativistic theories reject any ethical rule as universal or absolute. Ethical beliefs and practices vary from culture to culture. There is no objective way to assess the validity of ethical principles. Comment: Each category of ethical theories has something to contribute, an approach to ethical decision making. They are not necessarily mutually exclusive theories. The collection of theories is a resource, a collection of tools, to be used as needed and when appropriate. The designer of an artificial society is free to select any ethical system for the society. In societies with a mix of human and autonomous agents, ...

System life cycle processes


The system life cycle processes

http://cs.wwc.edu/~aabyan/Ethics/adapt.html (4 de 11) [18/12/2001 10:41:07]

Can ethics contribute to system design?

q q

q q

Problem statement (needs purpose) Requirements - define right (or is it good?), in addition to constituting a contract between the client and the programmer. r specification Design - how the requirements will be met Implementation r verification - checking that the implementation meets the specification (Are we building the product right?) r validation - checking that the implementation meets the expectations of the customer is suitable for its intended purpose. (Are we building the right product?) Retirement

Software engineering
Pre and post conditions In the design of functions the contract between the user and the function is given by the pre and post conditions. Pre and post conditions are also the specification of the function.
q

pre-condition: The conditions the user must meet in order to receive the service provided by the function. post-condition: The service the function guarantees to provides.

In deontological terms, the pre-condition describes the duty of the user and the post-condition describes the duty (obligation) of the function (or we may say the rights of the user provided the user fulfills its obligation). So for example, the contract between a user and an implementation of the factorial function guarantees to provide the user with the value n! provided the user supplies a natural number n between 0 and a inclusive, where a is some implementation defined limit, i. e., f(n) : if n=0 then 1 else n*f(n-1) where
q

pre-condition: n must be a natural number greater than or equal to 0 and less then a (the implementation defined limit), post-condition: the value returned is n!.

The term used in software design is correctness which corresponds to the ethical terms of right or good. Software verification and validation Verification, checking that the implementation meets the specification (Are we building the product right?), corresponds to the approach of deontological ethics. Validation, checking that the implementation meets the expectations of the customer (Are we building
http://cs.wwc.edu/~aabyan/Ethics/adapt.html (5 de 11) [18/12/2001 10:41:07]

Can ethics contribute to system design?

the right product?), corresponds to the approach of consequentialist ethics. Safety and liveness properties ... two classes of behavioral properties: safety and liveness properties. Safety properties assert what the entity (or system) is allowed to do, or equivalently, what it may not do. Liveness properties assert what the entity (or system) must do. For example, asserting that an entity may not tell falsehoods is a safety property. Asserting that an entity must eventually tell the truth or that a system must be fair are examples of liveness properties. In the specification of systems of concurrent entities, safety and liveness properties are specified separately. ... positive and negative duties ... ... invariant ... variant ... Safety property: nothing bad will happen (negative duties). Safety properties can always be satisfied by processes that do nothing. []p Liveness property: something good will happen (positive duties). Liveness properties specify things that must be done. Liveness properties ... termination, fairness ... <>p All properties of concurrent systems are describable as a conjunction of safety and liveness properties. Safe liveness []<>p Positive Duties - duties to do something. Negative Duties - duties to refrain from doing something. Fairness is a liveness property. weak fairness Weak fairness on A asserts that if A eventually becomes enabled forever, than infinitely many A steps must occur. Strong fairness Strong fairness on A asserts that if A is infinitely often enabled, than infinitely many A steps must occur.
http://cs.wwc.edu/~aabyan/Ethics/adapt.html (6 de 11) [18/12/2001 10:41:07]

Can ethics contribute to system design?

Weak fairness: <>[] (enabled A) => []<>A Strong fairness: []<> (enabled A) => []<>A

Artificial societies
Artificial societies consist of a collection of resources and autonomous agents. Agents have a life cycle which begins with its creation. It then alternates between doing internal computation, waiting for a resource, and engaging in communication. Its final state is when it is finished or is "killed" and exits. During its life cycle it consumes, shares, and creates resources. Its use of resources may be cooperative or competitive. Agents may be independent, cooperative, or competitive (even hostile) toward other agents. For the purposes of this paper, operating systems with their mix of processes and resources and computer networks with their nodes, connections, and packets flowing through the network are considered as examples of artificial societies. Agents which by design are intended to work independently of other agents may, inadvertently, through their use or need for a resource cause inconvenience or even fatal damage to another agent. Readers familiar with personal computer systems should be familiar with system crashes. When a system crashes or hangs, it is an indication that an agent has interfered with another process. A system's integrity can be compromised by even well intentioned agents. There are two primary concerns in the design of an artificial society. Safety is the property that nothing bad happens. Liveness is the property that something good will happen. The customers and designers of systems for artificial societies are in the position of determining the ethics of the society. They determine what behaviors are good and bad and put into place mechanisms for insuring that generally good behavior occurs and bad behavior is minimized. The system goals (requirements, specifications) are the standard by which the behavior in and of the system is evaluated. In this context then, system designers are applied ethicists.

Operating system design and Thomas Hobbes (1588-1679)


Operating systems are designed as a Hobbesian society with an absolute monarch. ... social contract theory ... Processes can make requests which if granted would violate any of the management goals. The requirements are incompatible. Thus the OS is the absolute monarch of Hobbes.

A computer system ... simplified view of a computer ...


http://cs.wwc.edu/~aabyan/Ethics/adapt.html (7 de 11) [18/12/2001 10:41:07]

Can ethics contribute to system design?

A computer system consists of resources and processes. Resources The major hardware components of a computer are the central processing unit (CPU), a memory hierarchy (RAM, hard drives, tape backup), and various input/output (I/O) devices. The components run at different speeds. The speed differential between the CPU the memory hierarchy and between each level of the memory hierarchy can be several orders of magnitude. Bare hardware is unusable without significant software support. For example, software support is necessary to provide a file system on secondary storage. These hardware resources are heterogeneous differing in type, speed, number, and availability (simultaneously or serially), and are usually scarce relative to demand.

Hardware resources
q q q

Computer resources are heterogeneous differing in


q q q q q

CPU Memory hierarchy I/O devices

type, speed, number, and availability (simultaneously or serially), and are usually scarce relative to demand.

Figure n:Hardware components Processes A process is a program in execution. It consists of the executable code (the program), data, contents of various registers in the CPU, and files on secondary storage. Processes are independent in the sense that most are, by design, noncooperative, lacking in awareness of the existence of other programs. Processes differ in their resource requirements, and r dependence on other processes, have unpredictable resource requirements may not be tolerant of hardware failures A process may cause another process to fail to satisfy its postcondition, or one or more of its safety or liveness conditions. Natural behavior of processes - request and release resources without predictable limits. Use of resources is undecideable. Termination is not a decideable property of programs. require unpredictable amounts of resources. For example, termination (use of the CPU) is not a decideable property of programs.
r

q q q

q q q

Processes are amoral. Any system morality is the result of operating system action.
http://cs.wwc.edu/~aabyan/Ethics/adapt.html (8 de 11) [18/12/2001 10:41:07]

Can ethics contribute to system design?

Program behavior may be described by a combination of formulas of the form:


q

{Precondition} P {Postcondition} which means that if a program P is started in a state satisfying the precondition and the process terminates, then it terminates in a state satisfying the postcondition, [] S, which describe the safety properties satisfied by the program (nothing bad happens), and <>L, which describe the liveness properties satisfied by the program (something good happens). Figure n:Program specification

In early computers, each process had exclusive access to the computer (the computer was shared sequentially). Each program had to include the necessary supporting software. Soon libraries of supporting software appeared, quickly followed by a rudimentary operating system where the supporting software stayed resident on the computer. Both with the shared libraries and the operating system, it became necessary to agree on the starting location of the program in memory. Even in such simple systems problems bad behavior occurs. Poorly designed programs often overwrote portions of the operating system with the result that the system crashed necessitating the reloading of the operating system. With the high cost of computers, the large speed differential between the CPU and the file system, and larger memories, it became possible to load multiple programs into memory and switch execution between processes whenever a process needed file access. The fundamental features of computer systems are:
q

q q q

The environment consists of r a heterogeneous collection of processes and r a heterogeneous collection of resources provided by the hardware. Processes need resources to complete their tasks. Processes interfere with each other in their use of resources. Resources are scarce with respect relative to the demand by the number of processes.

These fundamental features lead to the following require an operating system to manage system resources with
q q q

efficiency (resources should be used as much as possible), fairness (processes should get the resources they need), absence of deadlock or starvation (no process should wait forever for a resource), and protection (no process should be able to access a resource with out permission).

http://cs.wwc.edu/~aabyan/Ethics/adapt.html (9 de 11) [18/12/2001 10:41:07]

Can ethics contribute to system design?

An operating system must manage system resources with


q q q q

efficiency (resources should be used as much as possible), fairness (processes should get the resources they need), absence of deadlock or starvation (no process should wait forever for a resource), and protection (no process should be able to access a resource with out permission). Figure n:OS Requirements

The resource management tasks of the operating system are


q q

q q

Allocation - assign resources to processes needing the resource Accounting - keep track of resources - knows which are free and which process the others are allocated to. Scheduling - decide which process should get the resource next. Protection - make sure that a process can only access a resource when it is allowed Hardware component software component

CPU interrupt handler System clock and interrupts process scheduler Memory hierarchy I/O devices memory manager file system manager device drivers

Figure n:Operating System components The operating system itself is structured and a collection of processes. ... OS environment includes
q

processes whose intent is determined by its code, designer, and user. None of which may be accessible to the OS or other processes. Only process behavior or process history. OS is responsible for system performance which is affected by the consequences of process actions.

References
q q q

Hobbes, Thomas. Leviathan 1651 Locke, John. The Second Treatise of Government 1764

Levels

http://cs.wwc.edu/~aabyan/Ethics/adapt.html (10 de 11) [18/12/2001 10:41:07]

Can ethics contribute to system design?

q q q

OS designer & users OS evolution OS & processes - an ethical model r prescriptive ethics: ethics to os r descriptive ethics: os to ethics

Computer Networks
Requirements: A computer network must provide general, cost-effective, fair, robust, and highperformance connectivity among a large number of computers in an environment where the network changes in topology, in the underlying technologies upon which they are based, and in the demands placed on them by application programs. Just as in operating systems where each processes computation is broken in a sequence of small quanta to maximize efficient use of the CPU, so in networks, in order to provide high-performance, communication is broken into a stream of packets. However, the network does not guarantee packet delivery - the packets may be lost, duplicated, corrupted, or delivered out of order.

Discussion

Take One! Copyright (c) 2000 by Anthony Aaby. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at http://www.opencontent.org).

http://cs.wwc.edu/~aabyan/Ethics/adapt.html (11 de 11) [18/12/2001 10:41:07]

Ethical Universe

The Ethical Universe


Document status: Underdevelopment Author: Anthony Aaby Date: Febuary 2001

Introduction
Metaethical discussion focuses on the source of ethics ... Ethical rules are similar to the rules used to describe the properties of concurrent systems. Concurrent systems are described in terms of safety and liveness properties. A safety property asserts that nothing bad will happen and a liveness property asserts that something good will happen. These properties correspond to negative and positive duties. ... This paper proposes to recast metaethical discussion in terms of resource management. I leave a number of terms undefined and require a temporal logic to produce a formal treatment ...

Temporal logic
Temporal logic is ordinary logic extended with temporal operators [] (read henceforth) and <> (read eventually). The formula []P asserts that P is true now and at all future times, and the formula <>P asserts that P is true now or at some future time. Since P is eventually true if and only if it is not always false, <>P is equivalent to ~[]~P. Temporal logic, as it has been defined here, cannot formally specify things like average response time and probability of failure. However, it is useful for the specification of safety and liveness properties. Safety properties assert what the system is allowed to do, or equivalently, what it may not do. Safety properties are satisfied by a system which does nothing. Restriction to only producing correct answers is an example of a safety property. Liveness properties assert what the system must do. Termination is an example of a liveness property. As an example of temporal specifications and safety and liveness specifications in particular, we provide a specification of the The Dining Philosophers Problem. Five philosophers spend their lives seated around a circular table thinking and eating. Each philosoper has a plate of spaghetti and, on each side, shares a fork his/her neighbor. To eat, the philosopher must aquire two forks. The problem is to prevent deadlock or starvation i. e. insure that each philosopher gets to eat.

Figure 1: Safety and Liveness Specifications: Philosopher P(i) Safety Properties [](eating(i) \/ thinking(i)) Philosophers either eating or think

http://cs.wwc.edu/~aabyan/Ethics/universe.html (1 de 5) [18/12/2001 10:41:13]

Ethical Universe

[]~(eating(i) \/ eating(i+1)) Adjacent philosophers cannot eat simultaneously Liveness Properties [](thinking(i) -> <>eating(i)) Philosophers alternate between eating and [](eating(i) -> <>thinking(i)) thinking Fairness is a desirable property of a concurrent system and is definable as a liveness property.

Generalized weak fairness

<>[]P => []<>A

Generalized strong fairness []<>P => []<>A Formally, an action system consists of an initial state predicate Init and a set of predicates Ai on pairs of states. The Ai are called system actions. An action system expresses the safety propery consisting of every behavior <s0, s1, ... > whose initial state s0 satisfies Init and whose every pair <si, si+1> of successive states satisfies some system action.

The nature of an ethical universe


The ethical universe is composed of a dynamic set of
q

entities, E = {e0, e1, ... }.

The set of entities is composed of a set of


q q

processes, P = {p0, p1, ... ), and a set of resources, R = {r0, r1, ... },

i.e., PuR = E. However, the intersection is not necesarily empty PnR != {}. Principle of interaction A process may wait for, acquire, consume, and produce a resource. As a resource, a process may itself be waited for, acquired by, consumed by, and produced by another process. The set of predicates for these actions are found in the following table. Predicates for an ethical universe Predicates T(ei), ei : T of type T

http://cs.wwc.edu/~aabyan/Ethics/universe.html (2 de 5) [18/12/2001 10:41:13]

Ethical Universe

E(ei) exists, is available W(ei, ej) waiting for ej A(ei, ej) acquired (held) P(ei, ej) produced, released C(ei, ej) consumed The language of the ethical universe contains, entity, process, and resource constants, and the predicates of type, existence, waiting, acquisition, production, and consumption. The formulas are those of first-order temporal logic. In addition to the logical axioms and rules of inference the nonlogical axioms of the ethical universe are:

The Axioms Formula /\ei, ej[](P(ei, ej) -> E(ej)) /\ei, ej[](A(ei, ej) -> ~E(ej)) Meaning Once a resource is produced or released, it gains existence. Once acquired, a resource is not available.

/\ei, ej[](C(ei, ej) -> []~E(ej)) Once a resource is consumed, it ceases to exist. The principle of interaction tells us that entities emerge, change, and disappear over time. Principle of ethical reality Each entity has the right to do whatever it wants. Without some freedom of choice, questions of ethics becomes uninteresting. "Wants", of course, is nebulous. My intention is to include both animate and inanimate entities in this discussion because the border between animate and inanimate is not distinct. ... Thus, a better statement is Principle of integrity Each entity wants to maintain its integrity which consists of behaving in a manner consistent with its attributes and properties. Thus I don't expect stones to discuss ethics or monkeys to assemble themselves into a mountain. Entities are not all simple, most are composite, composed of other entities. And as a consequence, composite entities have properties that are emergent - properties that are not predictable from the properties of the constituent parts. The principle of connection applies both to compound entities and the entire ethical universe. Principle of interference Every entity is connected to every other entity which both constrains and enhances its ability to do whatever it wants.

http://cs.wwc.edu/~aabyan/Ethics/universe.html (3 de 5) [18/12/2001 10:41:13]

Ethical Universe

Ethics in an ideally ethical universe


The characteristics of an ideal ethical world include:
q q q q

Efficiency - resources should be used as much as possible. Fairness - entities should get the resources they need. Absence of deadlock or starvation - no entity should wait forever for a resource. Protection - no entity should be able to access a resource without permission.

The corresponding formalization of these charactoristics is given in the following table. Axioms for an ideal ethical world Formula Property

[]\/ei\/ej{(W(ei, ej)/\E(ej)) -> <>A(ei, ej)} Efficiency \/ei\/ej{[](W(ei, ej)/\E(ej)) -> <>A(ei, ej)} Fairness /\ei, ej~[]{W(ei, ej)/\~E(ej)} /\ei, ej, ej[](A(ei, ej)->~A(ek, ej)) Liveness Protection

The principle of connection implies that the actions of one entity may interfere with the rights of another. Hydrogen atoms remain hydrogen atoms unless disassembled and reassembled into atoms of iron by some force external to the atoms. This situation leads to the fundamental problem of ethics. The fundamental problem of ethics What constraints on individual behavior are necessary to preserve the nature of universe. How to maximize the freedom of the individual to do whatever it wants while minimizing the negative consequences. More formally, what ethical axioms imply the world described by the axioms for an ideal ethical world. The solution to the fundamental problem of ethics requires a determination ... The goal of individual ethics Individual ethics is concerned with access to resources and freedom to do whatever it wants. The goal of universal ethics The fair distribution of resources and the protection of individuals from each other. Deontological Consequentialism Kant's categorical imperative. Ethical beings are entities which engage in universal ethical behavior without coercion.

http://cs.wwc.edu/~aabyan/Ethics/universe.html (4 de 5) [18/12/2001 10:41:13]

Ethical Universe

Principle of ethical optimism Ethical behavior can be learned, practiced, and habituated. There are two approaches to producing a ethical world. A centralized approach manages all entities and a distributed approach which requires each entity to exchange messages with other entities to come to agreement. Intermediate solutions are possible as well. Traditional ethical principles, family, communities, government, and religion are attempts to provide distributed solutions to the ethical problem. Byzantine consensus protocols may be used in a heterogeneous environment to coordinate the behavior of a group.

Copyright (c) 2001 by Anthony Aaby. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at http://www.opencontent.org). Last Modified - . Comments and content invited [email protected]

http://cs.wwc.edu/~aabyan/Ethics/universe.html (5 de 5) [18/12/2001 10:41:13]

ethics

When is ethics interesting?


Anthony Aaby Walla Walla College [email protected] Document status: under development; a very rough draft Last Modified: . Comments and content invited: [email protected]

'Fascinating' is a word I use for the unexpected. In this case, I should think 'interesting' would suffice. -- Mr. Spock in The Squire of Gothos Many an ethical system has fallen to pathological cases -- cases that push the system to the extreme, to the boundary conditions. The focus of this paper is to identify pathological cases based on the size or complexity of the universe. In some of these situations no ethical system can exist, in others, any possible ethical system is trivial, and in others the ethical system presents little intellectual challenge.

0 <= n < 2
The first such universe is an empty universe. In an empty universe there are no entities. There is no behavior in this universe. With no behavior of interest there can be no ethics. The second universe is a universe with one and only one entity. As behavior is perceptible only by reference to other entities, there can be no behavior in this universe and therefore no ethics. It may be argued that an entity may be able to perceive its own behavior. This is to suggest that it is aware of its parts which implies that it is composed of multiple entities - a situation ruled out by the definition of this universe.

2 <= n
The third universe is a universe with n+2 entities. There are several cases.

Independent behavior
Suppose the behavior of each entity is fully independent of each other entity, then this degenerates to

http://cs.wwc.edu/~aabyan/Ethics/interesting.html (1 de 3) [18/12/2001 10:41:15]

ethics

the universe with only one entity and again there are no ethical issues.

Dependent behavior
Deterministic Suppose the behavior of some entities is dependent on other entities but the universe is completely deterministic, then as the entities have no choice there are no ethical issues. Nondeterministic Suppose the behavior of some entities is dependent on other entities but the universe contains some nondeterminism, then there are two possibilities.
Randomness

If the nondeterministic behavior is the result of innate randomness, then there are no ethical issues.
Choice and computational complexity

If the nondeterministic behavior is the result of choice then the question of interest changes from whether the universe can have an ethical system to what makes an ethical system interesting. I suggest that the answer depends on whether the ethical system is decideable.
Decideable

Suppose the ethical system is so simple as to be completely decideable. This means that any ethical question posed to the system can be answered by the system. In such a system there can be no ethical dilemmas. Whether such an ethical system is interesting depends on the computational complexity of the decision process. Boolean algebra is an example of a decideable theory that is no longer of interest to mathematicians but continues to be of interest (because of applications) to engineers in the form of digital logic. Computer scientists consider an algorithm that runs in polynomial time as a practical algorithm. So, if the computational complexity of the ethical system is in polynomial time, then entities can be expected to figure out the answer to any ethical question. If, on the other hand, it requires, say, exponential time, then it is considered to be impractical for all but the smallest data sets. In such instances, heuristics which run in an acceptable amount of time are developed which give acceptable approximations to the correct result. Entities would not be expected to be able to figure out answers to some ethical questions and ethical dilemmas could exist. Where the decision algorithm is an exponetial algorithm, computer scientists use heuristics to find an approximate or "good enough" algorithm. The search for such algorithms maintains interest in this case. This is the case with propostional temporal logic. Proof construction is decideable in exponential
http://cs.wwc.edu/~aabyan/Ethics/interesting.html (2 de 3) [18/12/2001 10:41:15]

ethics

time but because of its applicability to the specification of reactive systems, work continues to find ways of minimizing the inevitable state explosion of temporal logic proofs.
Undecideable

Suppose the ethical system is undecideable in the sense that first order arithmetic is undecideable (incomplete). There are several interesting parts to this sort of ethical system.
q q q

What questions can be answered with the ethical system? Are there useful decideable fragments of the ethical system? And of course, the standard questions in which theoretical ethicists would be interested.

So, when is ethics interesting?


I would expect that Mr. Spock would have found all of the these scenarios interesting but none fascinating.

Copyright (c) 2000 by Anthony Aaby. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at http://www.opencontent.org).

http://cs.wwc.edu/~aabyan/Ethics/interesting.html (3 de 3) [18/12/2001 10:41:15]

ethics

How many minds?


Anthony Aaby Walla Walla College [email protected] Last Modified: . Comments and content invited: [email protected]

Love is composed of a single soul inhabiting two bodies. Aristotle Principle of reciprocity: Love your neighbor as yourself. Discussion: Entities are separated into equivalent classes by a variety of equivalence relations. Membership in an equivalence is dependent on the behaviors of the entities. For example, an entity that engages in criminal behavior may be placed in the criminal equivalence class. Many ethical systems are include some form of the principle of reciprocity which grants to members of the same equivalence class the same rights and privileges. For example, in Christianity, it is expressed as "Love your neighbor as yourself". The choice of equivalence class is the problem as indicated in the Biblical question "Who is my neighbor?" Biologically, the answer seems to be the immediate family and first cousins. Biblically, the answer seems to be anyone in need. Animal rights activists extend it to include all animal species. Ecological activists extend it to include all animate nature. In the future it might be extended to include robotic entities. Several possibilities 1. 2. 3. 4. I am my only neighbor. Members of some group are my neighbors. My neighbor is myself. My neighbor is my past, present, and future self.

If minds are distinct from entities, then the possible relationships between the set of entities and set of minds include: 1. Each entity is successively inhabited by each mind, i.e., the minds rotate through entities. 2. Each entity has is own unique mind. 3. There is one mind which inhabits each entity successively, i.e., the mind rapidly rotates through the entities giving the appearance of multiple intelligent entities. This is the case in the typical operating system.

http://cs.wwc.edu/~aabyan/Ethics/minds.html (1 de 2) [18/12/2001 10:41:17]

ethics

Copyright (c) 2000 by Anthony Aaby. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at http://www.opencontent.org).

http://cs.wwc.edu/~aabyan/Ethics/minds.html (2 de 2) [18/12/2001 10:41:17]

ethics

References
Allen, Varner, and Zinser Prolegomena to any future artificial moral agent Journal of Experimental & Theoretical Artificial Intelligence Volume: 12 Number: 3 Page: 251 -- 261 Asimov, I. (1968). The rest of robots. London: Granada 1968. Gorniak-Kocicowska, Krystyna The Computer Revolution and the Problem of Global Ethics The Research Center on Computing & Society at Southern Connecticut State University 2000. Helmers, Hoffmann, and Stamos-Kaschke (How) Can Software Agents Become Good Net Citizens? CMC Magazine, Vol. 3, No. 2, Feb. 1997 Hoffmann, Robert (2000) Twenty Years on: The Evolution of Cooperation Revisited Journal of artificial Societies and Social Simulations vol. 3 no. 2, Koster, Martijn (1993) Guidelines for Robot Writers URL: info.webcrawler.com/mak/projects/robots/robots.html Miculan, Alison R. Ethics and Reality 20th World Philosophical Congress Moor, James. Is Ethics Computable? Metaphilosophy 26, nos. 1-2 (January-April): 1-21. Sandip Sen, `` Reciprocity: a foundational principle for promoting cooperative behavior among selfinterested agents"'' , in Proc. of the Second International Conference on Multiagent Systems, pages 322--329, AAAI Press, Menlo Park, CA, 1996. Shoham, Yoav and Tennenholtz, Moshe. "On social laws for artificial agent societies" Artificial Intelligence vol 73. Smullyan, Raymond (1977). The Tao is silent. Harper & Row 1977. Smullyan, Raymond (1983). 5000 B. C. and other Philosophical Fantasies St. Martins Press 1983. Stanley, Maurice F. The Geometry of Ethics 20th World Philosophical Congress Whitehead, A. N. Process and Reality Macmillan 1978. Whitehead, A. N. Religion in the Making New American Library 1974. Williams, Patricia A. Christianity and Evolutionary Ethics: Sketch Toward a Reconciliation Zygon, vol. 31, no. 2 (June 1996)

Copyright (c) 2000 by Anthony Aaby. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at http://www.opencontent.org).

Last Modified - . Comments and content invited [email protected]

http://cs.wwc.edu/~aabyan/Ethics/biblio.html [18/12/2001 10:41:19]

Survey of ethics

summary - ethics vs mathematics

Ethics: survey and observations


Anthony Aaby Walla Walla College [email protected] Document status: working notes Distribution: private Last Modified: . Comments and content invited: [email protected]

0 Introduction
The purpose of this document is to provide a personalized summary of ethical theory in order to form a base for answering the question "What does ethical theory have to contribute to software design and vice versa?". In software engineering terms, this summary focuses on an "architectural view" rather than an "implementation view" of ethics. The remainder of this paper is structured as follows. Section 1 is a short review of ethics with short descriptions of metaethics and the prominent categories of normative ethics. Section 2 is a short review of the fundamental principles of theories. Section 3 contains some observations on ethical theories from the perspective of mathematical logic. Section 4 outlines some ideas on how to construct ethical systems for artificial societies. An Appendix follows with a variety of short notes supplying additional information on a variety of ethical theories.

1 A short review of ethics


The field of ethics involves systematizing, defending, and recommending concepts of right and wrong behavior. Ethics is divided into three general areas, metaethics, normative ethics, and applied ethics. Metaethics investigates the source and meaning of ethical principles. Normative ethics describe the ethical standards that regulate right and wrong. Applied ethics resolve specific ethical controversies using the tools of metaethics and normative ethics. The next two subsections review metaethics and normative ethics.

Metaethics
http://cs.wwc.edu/~aabyan/Ethics/survey.html (1 de 14) [18/12/2001 10:41:24]

Survey of ethics

The task of metaethics is to determine the set of entities and behaviors of interest and to determine the source of ethical values. Traditional sources of ethical values identified in metaethical argument may be divided into objective or subjective sources. Objective sources include divine commands and part of the fundamental nature of the universe. Subjective sources include the individual and culture. The fundamental problem of metaethics is to provide a complete explanation of both ethical and unethical behavior and the historical and contemporary variations in ethical values and practice. The fundamental problem of metaethics The fundamental problem of metaethics is to provide a complete explanation of both ethical and unethical behavior and the historical and contemporary variations in ethical values and practice.

Normative ethics
Normative ethics involves arriving at the ethical standards that regulate conduct. The key assumption is that there is only one ultimate criterion of ethical conduct whether it is a single rule or set of principles. It is common to classify ethical theories into several categories: 1. axiological (virtue) theories, 2. deontological theories, and 3. consequentialist theories. In addition to determining ethical behavior, an ethical theory should prescribe a method for resolving ethical conflicts/dilemmas should any arise in an application of the theory. Virtue theory suggests that ethical behavior is the result of virtues or good habits of character. Commonly suggested virtues include: wisdom, courage, temperance, justice, fortitude, generosity, selfrespect, good temper, and sincerity. Vices or negative virtues include cowardice, insensibility, injustice, and vanity. Deontological theories identify various duties and rights. Duties and obligations have been classified under several categories including
q q q

duties to God, duties to oneself, and duties to others which include r duties to family, r social duties, and r political duties.

The basic rights include life, liberty and the pursuit of happiness and are considered to be natural, universal, equal, and inalienable. The focus of deontological theories is on moral duties or obligations rather than on moral value or goodness. Intentions play a significant role in determining whether an act is ethical.
http://cs.wwc.edu/~aabyan/Ethics/survey.html (2 de 14) [18/12/2001 10:41:24]

Survey of ethics

Categorical imperative: Kant formulated the notion of a categorical imperative which requires that actions toward another entity should reflect the value of that entity. There are three forms of the categorical imperative. 1. Categorical Imperative: Act only on that maxim whereby you can at the same time will that it would become a universal law. 2. Principle of ends: Act so that you treat humanity never as a mere means to an end, but always as an end in themselves. 3. Principle of Autonomy: Every rational being is able to regard itself as a maker of universal law and everyone who is ideally rational will legislate exactly the same universal principles. Consequentialist (teleological) theories determine ethical behavior by weighing the consequences of an action. The good and bad consequences of an action are tallied and if the total good consequences outweigh the total bad consequences, then the action is ethically proper. Thus an action is ethical if the consequences of that action are more favorable than unfavorable with respect to some criteria. Criteria include affected groups and the dimension of time. Three criteria with respect to agents have been suggested.
q q

Ethical egoism: only consequences to the entity performing the action are considered. Ethical altruism: only consequences to everyone except the agent performing the action are considered. Utilitarianism: the consequences to everyone of an act or rule are considered.

In the dimension of time, the influence of action may extend beyond the immediate consequences of the act. The focus on consequences is problematic since consequences are, in almost all cases, outside the agent's immediate and direct control and may be unanticipated due to lack of omniscience. The focus is on moral value or goodness rather than on moral duties or obligations. An action's consequences (what is good) are more important than on moral obligations (what is right). Human nature and experience determine what the good is. Social contract theory is a consequentialist theory in which morality is defined by a set of rules accepted by rational people for their mutual benefit.

2 Fundamental principles of theories


... understanding ... organization ... consensus ... impartial ... consistent ... ... through careful use of generalization and atraction ... ... distinguish between particular cases and universal ... ... careful exploration of boundary conditions and exceptional situations ... ... conclusions are reproduceable since they are rationally derived from a commonly accepted base ... ... meaning ... a mapping between syntactic statements and a semantic structure. A theory provides systematic body of knowledge that otherwise exists as a disorganized collection of

http://cs.wwc.edu/~aabyan/Ethics/survey.html (3 de 14) [18/12/2001 10:41:24]

Survey of ethics

rules and an objective rather than subjective system where rational agents will arrive at the same conclusions. Each theory consists of a language suitable for the domain of interest, a logic with rules of inference, and a collection of domain assumptions (axioms). Questions to ask about any theory.
q q q

Is the set of axioms independent (each axiom is necessary)? Are the inference rules sound (if a results from an inference, then a is in fact true)? Is the theory r consistent (cannot conclude both a and ~a) and r complete (for any formula a, ether a or ~a holds)? What is the complexity of the theory? r Is it decidable? What does the theory mean? i.e. what is the correspondence between the theory and some world?

Principles that are prerequisite to any theory. 1. 2. 3. 4. 5. Principle of rationality: all conclusions must be supported by generally accepted reasons. Principle of soundness: Principle of consistency: theory should be consistent - don't conclude both a and ~a. Principle of least harm: choose the lesser of two evils Principle of impartiality: theory should provide equal treatment for equal situations - if a and a' are equivalent and P(a) holds, then so does P(a'). 6. Principle of substitution: if a and a' are equivalent and P(a) holds, then so does P(a').

3 Observations
General observations
Ethical theories have not reached the level of formalism present in mathematical theories. This lack of formalization makes it difficult to assess the applicability of an ethical theory in novel situations and increases the difficulty in identifying the similarity and differences with other (non ethical) theories.

Virtue theory
Virtue theory bears some resemblance to high level attributes of well-engineered software. The attributes of well engineered software include: maintainability, dependability, efficiency, and usability.

Deontological theory

http://cs.wwc.edu/~aabyan/Ethics/survey.html (4 de 14) [18/12/2001 10:41:24]

Survey of ethics

Deontological theories with lists of rights and duties bear some resemblance to safety and liveness specifications. Kant's categorical imperative seems to be of little use in software design as often the design consists of heterogeneous processes with little behavior in common.

Teleological theory
Consequentalist theories bear some resemblance to the software engineering practice of data collection and testing to determine an acceptable solution. Social contract theory bears a strong resemblance to the requirements and specification documents produced in the software engineering process.

Other observations
Normative ethics are
q q q

rules for resource mangement rules to maximize predictability rules to define a society or group

... Christian ethics ...

4 Ethical systems for artificial societies


Comment: Ideal ethical systems are assumed to be universal and eternal rather than local and evolving. Comment: System requirements and specifications roughly correspond to an ethical theory. Comment: Virtue theory lacks prescriptive value for software design i.e., its not clear how virtues translate to behaviors in computer systems.. Some commonly accepted virtues for software include:
q q q q q

correctness, efficiency, modularity robust (fault tolerant) ... Completeness and correctness of solution Static type safety, dynamic type safety Multithreaded safety, liveness Fault tolerance, transactionality Security, robustness

Correctness

http://cs.wwc.edu/~aabyan/Ethics/survey.html (5 de 14) [18/12/2001 10:41:24]

Survey of ethics

Resources

Efficiency: performance, time complexity, number of messages sent, bandwidth requirements Space utilization: number of memory cells, objects, threads, processes, communication channels, processors, ... Incrementalness (on-demand-ness) Policy dynamics: Fairness, equilibrium, stability Modularity, encapsulation, coupling, independence Extensibility: subclassibility, tunability, evolvability, maintainability Reusability, openness, composibility, portability, embeddability Context dependence Interoperability ... other ``ilities'' and ``quality factors'' Understandability, minimality, simplicity, elegance. Error-proneness of implementation Coexistence with other software Maintainability Impact on/of development process Impact on/of development team structure and dynamics Impact on/of user participation Impact on/of productivity, scheduling, cost Ethics of use Human factors: learnability, undoability, ... Adaptability to a changing world Aesthetics Medical and environmental impact Social, economic and political impact ... other impact on human existence

Structure

Construction

Usage

Comment: For a deontological theory to be useful for software design, an appropriate list of duties rights and obligations include:
q q q

acceptance of the decisions of the OS, faithful to specification, and non interference with other processes.

Comment: Teleological (consequentialist) theories are used in operating system design for determining a scheduling policy.
q

efficiency r maximize throughput r minimize waiting time

http://cs.wwc.edu/~aabyan/Ethics/survey.html (6 de 14) [18/12/2001 10:41:24]

Survey of ethics

Comment: The values approach is used in user interface design - user friendly ... Comment: None of the ethical theories is as compelling with respect to truth and universality as mathematics. Each category of ethical theories has something to contribute to ethical decision making. They are not necessarily mutually exclusive theories. The collection of theories is a resource, a collection of tools, to be used as needed and when appropriate. The designer of an artificial society is free to select any ethical system for the society. In societies with a mix of human and autonomous agents, ... From virtue theories we learn to have an even broader perspective than behavior. From consequentialist theories we learn to consider the consequences of an action. From deontological theories we learn to consider rights, duties, and obligations. From relativistic theories we learn how to construct purpose built ethical systems. From deontological ethics, the language of "rights" and "obligations" in the context of the process of the design of a cooperative society seems to capture ... From teleological ethics, the language of "consequences" ... formal specifications and proofs of correctness deterministic behavior of agents ability to collect information from carefully designed experiments and simulations ameliorates the lack of omniscience. For the purposes of this section, general purpose operating systems and computer networks are taken to be examples of primitive artificial societies.

Metaethics
The task of metaethics is to determine the set of entities and behaviors of interest and to determine the source of ethical values. For software systems, the customer and software engineer determine the entities and behaviors of interest thus are the source of ethical values. The high rate of evolution of software systems requires the system to be flexible

Normative ethics
Formally, an ethical system is a mapping between V: FxS-> {bad, good} or {wrong, right} Rights and liabilities Rights, liberties, powers, and immunities are all kinds of "rights." Any right implies certain duties, liabilities, or disabilities in others. Each kind of right implies a certain kind of liability in others, and each kind of right also has its opposite form of liability.
http://cs.wwc.edu/~aabyan/Ethics/survey.html (7 de 14) [18/12/2001 10:41:24]

Survey of ethics

Right: to goods and services. Liberty: a right to act without restraint. Power: the ability to change the status of something or force a compliance in another. Immunity: is an exemption from being subject to someone else's powers. Duty: an obligation to act No rights: Liability: must recognize or comply with the power exercised upon them. Disability: without a power to affect the immune person. The opposite of a "duty" is a liberty, which means that there are no rights of others that need be observed in a particular case. A "power" is the ability to change the legal status of something or force a legal compliance in another. A power thus implies a liability in another, that they must recognize or comply with the power exercised upon them. The opposite of a "liability" is an immunity, which is an exemption from being subject to someone else's powers. An "immunity" implies a disability in another, that they are without a power to affect the immune person in that case.

Rights Right Liberty (may do) (may do) Power (can force) Immunity (can resist)

Duty No right Liability Disability (must do) (may not do) (can not resist) (cannot force) Liabilities Negative Rights ? Positive liberty

Duties disability (must not do) liability (must do)

Rights Right Duty Liberty No right

Rights Power Immunity Disability Liability (cannot do) Liabilities

Liabilities

DUTIES - Rights are often discussed in terms of being entailed by duties. So that for every right, there is usually either a positive duty or a negative duty (or both) that comes with having the right. For instance, the right to life might be said to have the negative duty to refrain from taking other people's lives, or maybe even the positive duty to help protect people's lives.
q

Positive Duties - duties to do something.

http://cs.wwc.edu/~aabyan/Ethics/survey.html (8 de 14) [18/12/2001 10:41:24]

Survey of ethics
q

Negative Duties - duties to refrain from doing something.

Appendix - miscellaneous notes


Moral dilemma
A moral dilemma involves a situation in which the agent has only two courses of action available, and each requires performing a morally impermissible action. Situation S requires action A \/ B but neither is morally permissible i.e. E |- ~A and E |- ~B

Communitarianism
The dominant themes of communitarianism are that individual rights need to be balanced with social responsibilities, and that autonomous selves do not exist in isolation, but are shaped by the values and culture of communities.

Deontological vs teleological theories


The following table contrasts the features of deontological and teleological theories. DEONTOLOGICAL THEORIES 1. The focus is on moral duties (what is right). 2. Moral duties are more important. 3. The individual's intentions have a substantial role in a situation's moral evaluation and consequences that arise through the individual's actions have no relevance. 4. There is no one specifiable relation between good and right. 5. Concepts about moral value (i.e., what is good) are definable in reference to concepts about moral duties (i.e., what is right). 6. The right is prior to the good. 7. An action's goodness (or value) depends upon the action's rightness. 8. It is the individual's moral status that is important. 9. The statement 'x is a moral individual' means 'x did what was right with the right
http://cs.wwc.edu/~aabyan/Ethics/survey.html (9 de 14) [18/12/2001 10:41:24]

TELEOLOGICAL THEORIES 1. The focus is on an action's consequences (what is good). 2. Moral values are more important. 3. The consequences that an individual's actions produce have a substantial role in a situation's moral evaluation and the individual's intentions have no relevance. 4. There is a specifiable relation between good and right. 5. Concepts about moral duties (i.e., what is right) are definable in reference to concepts about moral value (i.e., what is good). 6. The good is prior to the right. 7. An action's rightness depends upon the action's goodness (or value). 8. It is the action's moral status that is important.

Survey of ethics

10. 11. 12. 13. 14.

intention'. Reason, intuition or moral sense reveals what is right. There are some acts that are moral or immoral in themselves. Moral duties have a negative formulation. One's own moral duties have precedence over all other considerations. To do what is moral (i.e., right) requires that one observe one's moral duties, possess the right intentions and avoid those actions that are immoral in themselves.

9. The statement 'x is a moral action' means 'x produces at least as good consequences as all other possible actions'. 10. Experience reveals what is good. 11. There are no actions that are moral or immoral in themselves. 12. Moral duties have a positive formulation. 13. One must give equal and impartial consideration to other's interests and happiness, as well as one's own, in all moral considerations and evaluations. 14. To do what is moral (i.e., good) requires that one acts so as to maximize the happiness that one's action produce.

Adapted from a lost source.

Evolutionary ethics
Evolutionary ethics seeks to ground ethical behavior in evolutionary theory. For example, sociobiology finds evolutionary evidence for altruism toward kin and reciprocity toward non kin.

Relativism
The most famous statement of relativism in general is by the ancient Greek sophist Protagoras (480411 BCE.): "A human being is the measure of all things - of things that are, that they are, and of things that are not that they are not." This reflects the view of many of the sophists that social convention has a status above nature. Although Protagoras's claim applies to any proposed standard of knowledge, moral values are at least part of his position. Most philosophers have assumed that there is some standpoint--for example, that of God--in relation to which our judgments are definitively true or false. Relativism is sometimes identified (usually by its critics) as the thesis that all points of view are equally valid. In ethics, this amounts to saying that all moralities are equally good; in epistemology it implies that all beliefs, or belief systems, are equally true. Relativistic ethical theories overlap the previous three categories of ethical theories. They reject any ethical rule as universal or absolute, assert that ethical standards are grounded only in social custom, and that there is no objective way to assess the validity of ethical principles. In particular, 1. ethical value are relative to some particular framework or standpoint (e.g. the individual subject, a culture, an era, a language, or a conceptual scheme), and 2. no standpoint is uniquely privileged over all others.

http://cs.wwc.edu/~aabyan/Ethics/survey.html (10 de 14) [18/12/2001 10:41:24]

Survey of ethics

Relativism and its critics Relativism The key features of relativism are Its critics.

There is some standpoint -- for example, that of God or science -- in relation to 1. Something (e.g. moral values, beauty, knowledge, which our judgments are definitively true or false. taste, or meaning) is relative to some particular framework or standpoint (e.g. the individual subject, a culture, an era, a language, or a conceptual scheme). 2. No standpoint is uniquely privileged over all others.

Relativism is sometimes identified (usually by its critics) as the thesis that all points of view are equally valid. It seems to me that while the first point is worthwhile, the second is too strong. It seems that it should be possible through comparative ethical studies to show some sort of ordering among systems is possible and that one system is perhaps better for some purpose than another. Counter argument: While relativism may indeed be false from certain perspectives, these are not perspectives that consistent relativists will be committed to. In fact, of those who accept the major paradigm shifts that have characterized philosophy over the last two centuries, relativists can claim to be the most consistent, since they alone accept the full implications of these shifts for our notions of truth and rationality. Objection: Relativism is incoherent and self-refuting. It is pernicious since it undermines the enterprise of trying to improve our ways of thinking.
q

The relativist (from a relativist argument) must concede that from some points of view relativism will appear false. Moreover, since no standpoint is uniquely privileged, these standpoints, and the views they encompass or imply, are equally worthy of our respect. The relativist must therefore hold that relativism is both true and false.

The problem with the objection seems to stem from the use of two valued logic. An infinite valued logic permits statements to have intermediate truth values. Counter argument: Relativists do not have to commit themselves to any non-relativistic notion of truth. It is possible to advance a claim and hold it to be true relative to a given set of norms, without committing oneself to the view that it is true, or that the norms in question are valid, in some further, non-relativistic sense.
http://cs.wwc.edu/~aabyan/Ethics/survey.html (11 de 14) [18/12/2001 10:41:24]

Objection: If all judgments are only true relative to some non-privileged standpoint, then relativism is true in some non-relativistic sense.

Survey of ethics

Moral relativism: morality is grounded in social custom rather than some prescriptive ideal.

Objection: There is a core set of values that is common to all societies and is in fact necessary for any society to exist. 1. Primacy of De Facto Values - morality should be These values are that based on how people actually behave. 1. we should care for children, 2. Cultural variation - main moral values vary from 2. we should tell the truth, and culture to culture 3. we should not murder. If moral relativism is true, we cannot argue that customs such as slavery are morally inferior. (James Rachels)

It seems to me that the proper starting point is to describe the range of behaviors available to an entity in a society and the necessary and sufficient conditions for the society to exist. When societies come in contact with each other, ... conflict Cognitive relativism: truth is relativized is usually understood to be a conceptual scheme. No one set of epistemic norms is metaphysically privileged over any other. Objection: The epistemic norms such as employed by modern science enjoy special status and can serve as objective, universally valid, criteria of truth and rationality.

Counter argument: prove the superiority of the preferred Counter counter argument: The success of modern science is sufficient proof. epistemic norm. It seems that it should be possible through comparative studies to show some sort of ordering among systems is possible and to demonstrate that one system is perhaps better for some purpose than another. In fact, there are contemporary and historical variations within the scientific community. Adapted from the Internet Encyclopedia of Philosophy

Social contract/Contractarian theory principles


Fundamental principle: Ethics is founded solely on uniform social agreements that serve the best interests of those who make the agreement. Initial state:

Hobbes

Locke

Rousseau

Rawls

http://cs.wwc.edu/~aabyan/Ethics/survey.html (12 de 14) [18/12/2001 10:41:24]

Survey of ethics

constant war pre-political, moral, bound by individual freedom & natural law with creativity inalienable rights - life, liberty, & property Nature of mankind

Hobbes motivated by selfish interest Resources Contract constructed by

Locke Rousseau social person

Rawls rational and impartial

Hobbes the rational and selfmotivated Purpose of contract (good is ...)

Locke Rousseau

Rawls

the social persons the rational and impartial

Hobbes

Locke

Rousseau

Rawls mutual benefit

to preserve peace security in life, regulate social liberty & property interactions Type of government

Hobbes absolute monarchy

Locke democracy

Rousseau absolute democracy

Rawls

Copyright (c) 2000 by Anthony Aaby. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at
http://cs.wwc.edu/~aabyan/Ethics/survey.html (13 de 14) [18/12/2001 10:41:25]

Survey of ethics

http://www.opencontent.org). Last Modified - . Comments and content invited [email protected]

http://cs.wwc.edu/~aabyan/Ethics/survey.html (14 de 14) [18/12/2001 10:41:25]

Ethical principles

Some ethical principles


Anthony Aaby Walla Walla College [email protected] Document status: working notes Distribution: private Last Modified: . Comments and content invited: [email protected]

1. Principle of Autonomy: freedom of choice and action. 2. Principle of Beneficence: obligation to do good for others. 3. Principle of the Categorical Imperative: Kant; There are three forms of the categorical imperative. 1. Categorical Imperative: Act only on that maxim whereby you can at the same time will that it would become a universal law. 2. Principle of ends: Act so that you treat humanity never as a mere means to an end, but always as an end in themselves. 3. Principle of Autonomy: Every rational being is able to regard itself as a maker of universal law and everyone who is ideally rational will legislate exactly the same universal principles. 4. Principle of Equality (Justice): accord to each an equality of respect/treatment. 5. Principle of Fidelity: obligation to keep promises. 6. Principle of Honesty: obligation to tell the truth. 7. Principle of Justice: John Rawls; Fair distribution of benefits and burdens. r Principle of Equal Liberty: r Principle of Difference: There will be inequalities, but we are morally obligated to improve the worst off unless it would make everyone worse off. r Principle of Fair Equality of Opportunity: Requires that job qualifications be related to the job. 8. Principle of Least Harm: choose the lesser of two evils. 9. Principle of Nonmaleficence: obligation to do no harm. 10. Principle of Rights: Immanuel Kant; Right to free and equal treatment. 11. Principle of Social Contract: morality consists in a set of rules, that rational people will agree to accept, for their mutual benefit, on the condition that others follow those rules as well and that these rules benefit the least advantaged in society. 1. Principle of liberty: equal right to the most extensive scheme of liberties compatible with a similar scheme of liberties for all.
http://cs.wwc.edu/~aabyan/Ethics/principles.html (1 de 2) [18/12/2001 10:41:26]

Ethical principles

2. Principle of opportunity: there must be equality of opportunity for individuals in compostion for those positions in society that bring greater rewards. 3. Principle of distributive justice: basic goods are distributed so that the least advantaged members of society benefit as much as possible. 4. Principle of justice: each possesses an inviolability founded on justice that society cannot override. 5. Principle of need: each is guaranteed the primary goods that are necessary assuming that there are sufficient resources to maintain the guaranteed minimum. 12. Principle of Utility: John Stuart Mill; the value of an act depends on whether it increases or decreases the amount of happyiness/good/pleasure of the party whose interest is in question. r Act-utilitiarianism: An act is right iff it results in as much good as any viable alternative. r Rule-utilitarianism: An act is right iff it is required by a rule that itself is a member of a set of rules, the acceptance of which would lead to greater good for society than any available alternative. r Principle of non-interference: Society is justified in coercing the behavior of an individual in order to prevent her/him from injuring others; it is not justified in coercing her/him simply because the behavior is immoral or harmful to herself/himself. r Principles of Consequences: In assessing consequences, the only thing that matters is the amount of happiness/good or unhappiness/bad that is caused. The right actions are those that produce the greatest amount of good over bad. Commonly expressed unethical rules
q q q

Principle of Ends: The end justifies the means. Principle of Might: Might makes right. Principle of Rights: Everyone has the right to do whatever s/he wants.

Copyright (c) 2000 by Anthony Aaby. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at http://www.opencontent.org). Last Modified - . Comments and content invited [email protected]

http://cs.wwc.edu/~aabyan/Ethics/principles.html (2 de 2) [18/12/2001 10:41:26]

Miscellaneous notes

Miscellaneous notes
Anthony Aaby Walla Walla College [email protected] Document status: working notes Distribution: private Last Modified: . Comments and content invited: [email protected]

Distinguish between:
q q q

What we can do. What we desire to do. What we ought to do.

Autonomous software agents


Design considerations:
q q

Independent: process cannot affect or be affected by the other processes Dependent: processes can affect or be affected by the other processes. Possible to deadlock or starve. There are several subcategories r cooperating -- shared task and possibly shared resources r competing -- may starve opponent r hostile -- attempt to destroy an other's resources

Laws which
q q q

describe possible actions prevent ... guarantee the successful coexistence of multiple agents

Proposition 1: If two entities have incompatible wants, they may interfere with each other.

http://cs.wwc.edu/~aabyan/Ethics/notes.html (1 de 3) [18/12/2001 10:41:28]

Miscellaneous notes

Proof: Proposition 2: Two entities of equal strength and incompatible wants, can survive only through the fear of mutually assured destruction. Proof: ...what is good for the individual and for society... Proposition 3: The principle of rights is necessary for an objective code of morality. Proof: Suppose there is an entity which does not have the right to do whatever it wants. I argue that the previous sentence is a contradiction. As has been pointed out in the discussion of the principle of rights, an entity's behavior may be constrained by other entities but cannot be the case here. It must refer to a behavior that it wants to do and is capable of but cannot do independently of constraints that might be imposed on it by other entities. That is, its behavior is self constrained. It both wants to do something and does not want to do the same thing. A contradiction. Discussion: It might be argued that both wanting and not wanting to do something is not a contradiction it is just the natural aspect of exercising choice between mutually exclusive alternatives. If so, then we must adopt a multivalued logic to describe behavior rather than the traditional two valued logic. It also might be argued that contradiction is necessary for the existence of free will. And therefore both good and evil must coexist. Some religious traditions recognize this and argue that either the coexistence of good and evil is the natural state of the universe or that at some future point, all evil will be eliminated and with it, all free choice. It might be argued that the proof is bogus because it permits only external constraints to constrain an entity from certain behaviors that is, an entity wants to do something but chooses not to do it. I argue that its choice demonstrates what it wants.

Copyright (c) 2000 by Anthony Aaby. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at http://www.opencontent.org). Last Modified - . Comments and content invited [email protected]

http://cs.wwc.edu/~aabyan/Ethics/notes.html (2 de 3) [18/12/2001 10:41:28]

Miscellaneous notes

http://cs.wwc.edu/~aabyan/Ethics/notes.html (3 de 3) [18/12/2001 10:41:28]

Appendix A. CS Body of Knowledge

CS Body of Knowledge
from: Computing Curricula 2001

Computer science body of knowledge with core topics underlined and minimum number of lecture hours in parentheses. Select Details links to see content.

DS. Discrete Structures (43 core hours) DS1. Functions, relations, and sets (6) DS2. Basic logic (10) DS3. Proof techniques (12) DS4. Basics of counting (5) DS5. Graphs and trees (4) DS6. Discrete probability (6) PF. Programming Fundamentals (38 core hours) PF1. Fundamental programming constructs (9) PF2. Algorithms and problem-solving (6) PF3. Fundamental data structures (14) PF4. Recursion (5) PF5. Event-driven programming (4) AL. Algorithms and Complexity (31 core hours) AL1. Basic algorithmic analysis (4) AL2. Algorithmic strategies (6) AL3. Fundamental computing algorithms (12) AL4. Distributed algorithms (3) AL5. Basic computability (6) AL6. The complexity classes P and NP AL7. Automata theory AL8. Advanced algorithmic analysis AL9. Cryptographic algorithms AL10. Geometric algorithms AL11. Parallel algorithms AR. Architecture and Organization (36 core hours) AR1. Digital logic and digital systems (6) AR2. Machine level representation of data (3) AR3. Assembly level machine organization (9) AR4. Memory system organization and architecture (5) AR5. Interfacing and communication (3) AR6. Functional organization (7)
http://cs.wwc.edu/~aabyan/CC2001/ (1 de 3) [18/12/2001 10:41:32]

HC. Human-Computer Interaction (8 core hours) HC1. Foundations of human-computer interaction (6) HC2. Building a simple graphical user interface (2) HC3. Human-centered software evaluation HC4. Human-centered software development HC5. Graphical user-interface design HC6. Graphical user-interface programming HC7. HCI aspects of multimedia systems HC8. HCI aspects of collaboration and communication GV. Graphics and Visual Computing (3 core hours) GV1. Fundamental techniques in graphics (2) GV2. Graphic systems (1) GV3. Graphic communication GV4. Geometric modeling GV5. Basic rendering GV6. Advanced rendering GV7. Advanced techniques GV8. Computer animation GV9. Visualization GV10. Virtual reality GV11. Computer vision IS. Intelligent Systems (10 core hours) IS1. Fundamental issues in intelligent systems (1) IS2. Search and constraint satisfaction (5) IS3. Knowledge representation and reasoning (4) IS4. Advanced search IS5. Advanced knowledge representation and reasoning IS6. Agents IS7. Natural language processing

Appendix A. CS Body of Knowledge

AR7. Multiprocessing and alternative architectures (3) AR8. Performance enhancements AR9. Architecture for networks and distributed systems OS. Operating Systems (18 core hours) OS1. Overview of operating systems (2) OS2. Operating system principles (2) OS3. Concurrency (6) OS4. Scheduling and dispatch (3) OS5. Memory management (5) OS6. Device management OS7. Security and protection OS8. File systems OS9. Real-time and embedded systems OS10. Fault tolerance OS11. System performance evaluation OS12. Scripting NC. Net-Centric Computing (15 core hours) NC1. Introduction to net-centric computing (2) NC2. Communication and networking (7) NC3. Network security (3) NC4. The web as an example of client-server computing (3) NC5. Building web applications NC6. Network management NC7. Compression and decompression NC8. Multimedia data technologies NC9. Wireless and mobile computing PL. Programming Languages (21 core hours) PL1. Overview of programming languages (2) PL2. Virtual machines (1) PL3. Introduction to language translation (2) PL4. Declarations and types (3) PL5. Abstraction mechanisms (3) PL6. Object-oriented programming (10) PL7. Functional programming PL8. Language translation systems PL9. Type systems PL10. Programming language semantics PL11. Programming language design

IS8. Machine learning and neural networks IS9. AI planning systems IS10. Robotics IM. Information Management (10 core hours) IM1. Information models and systems (3) IM2. Database systems (3) IM3. Data modeling (4) IM4. Relational databases IM5. Database query languages IM6. Relational database design IM7. Transaction processing IM8. Distributed databases IM9. Physical database design IM10. Data mining IM11. Information storage and retrieval IM12. Hypertext and hypermedia IM13. Multimedia information and systems IM14. Digital libraries SP. Social and Professional Issues (16 core hours) SP1. History of computing (1) SP2. Social context of computing (3) SP3. Methods and tools of analysis (2) SP4. Professional and ethical responsibilities (3) SP5. Risks and liabilities of computer-based systems (2) SP6. Intellectual property (3) SP7. Privacy and civil liberties (2) SP8. Computer crime SP9. Economic issues in computing SP10. Philosophical frameworks SE. Software Engineering (31 core hours) SE1. Software design (8) SE2. Using APIs (5) SE3. Software tools and environments (3) SE4. Software processes (2) SE5. Software requirements and specifications (4) SE6. Software validation (3) SE7. Software evolution (3) SE8. Software project management (3) SE9. Component-based computing SE10. Formal methods SE11. Software reliability

http://cs.wwc.edu/~aabyan/CC2001/ (2 de 3) [18/12/2001 10:41:32]

Appendix A. CS Body of Knowledge

SE12. Specialized systems development CN. Computational Science and Numerical Methods (no core hours) CN1. Numerical analysis CN2. Operations research CN3. Modeling and simulation CN4. High-performance computing

http://cs.wwc.edu/~aabyan/CC2001/ (3 de 3) [18/12/2001 10:41:32]

http://cs.wwc.edu/~aabyan/CC2001/DS.html

Discrete Structures (DS)


DS1. Functions, relations, and sets [core] DS2. Basic logic [core] DS3. Proof techniques [core] DS4. Basics of counting [core] DS5. Graphs and trees [core] DS6. Discrete probability [core] Discrete structures is foundational material for computer science. By foundational we mean that relatively few computer scientists will be working primarily on discrete structures, but that many other areas of computer science require the ability to work with concepts from discrete structures. Discrete structures includes important material from such areas as set theory, logic, graph theory, and combinatorics. The material in discrete structures is pervasive in the areas of data structures and algorithms but appears elsewhere in computer science as well. For example, an ability to create and understand a formal proof is essential in formal specification, in verification, and in cryptography. Graph theory concepts are used in networks, operating systems, and compilers. Set theory concepts are used in software engineering and in databases. As the field of computer science matures, more and more sophisticated analysis techniques are being brought to bear on practical problems. To understand the computational techniques of the future, today's students will need a strong background in discrete structures. Finally, we note that while areas often have somewhat fuzzy boundaries, this is especially true for discrete structures. We have gathered together here a body of material of a mathematical nature that computer science education must include, and that computer science educators know well enough to specify in great detail. However, the decision about where to draw the line between this area and the Algorithms and Complexity area (AL) on the one hand, and topics left only as supporting mathematics on the other hand, was inevitably somewhat arbitrary. We remind readers that there are vital topics from those two areas that some schools will include in courses with titles like discrete structures. DS1. Functions, relations, and sets [core] Minimum core coverage time: 6 hours Topics:
q q q q

Functions (surjections, injections, inverses, composition) Relations (reflexivity, symmetry, transitivity, equivalence relations) Sets (Venn diagrams, complements, Cartesian products, power sets) Pigeonhole principle

http://cs.wwc.edu/~aabyan/CC2001/DS.html (1 de 4) [18/12/2001 10:41:37]

http://cs.wwc.edu/~aabyan/CC2001/DS.html
q

Cardinality and countability

Learning objectives: 1. Explain with examples the basic terminology of functions, relations, and sets. 2. Perform the operations associated with sets, functions, and relations. 3. Relate practical examples to the appropriate set, function, or relation model, and interpret the associated operations and terminology in context. 4. Demonstrate basic counting principles, including uses of diagonalization and the pigeonhole principle. DS2. Basic logic [core] Minimum core coverage time: 10 hours Topics:
q q q q q q q q q

Propositional logic Logical connectives Truth tables Normal forms (conjunctive and disjunctive) Validity Predicate logic Universal and existential quantification Modus ponens and modus tollens Limitations of predicate logic

Learning objectives: 1. Apply formal methods of symbolic propositional and predicate logic. 2. Describe how formal tools of symbolic logic are used to model algorithms and real-life situations. 3. Use formal logic proofs and logical reasoning to solve problems such as puzzles. 4. Describe the importance and limitations of predicate logic. DS3. Proof techniques [core] Minimum core coverage time: 12 hours Topics:
q q q q

Notions of implication, converse, inverse, contrapositive, negation, and contradiction The structure of formal proofs Direct proofs Proof by counterexample

http://cs.wwc.edu/~aabyan/CC2001/DS.html (2 de 4) [18/12/2001 10:41:37]

http://cs.wwc.edu/~aabyan/CC2001/DS.html
q q q q q q

Proof by contraposition Proof by contradiction Mathematical induction Strong induction Recursive mathematical definitions Well orderings

Learning objectives: 1. 2. 3. 4. Outline the basic structure of and give examples of each proof technique described in this unit. Discuss which type of proof is best for a given problem. Relate the ideas of mathematical induction to recursion and recursively defined structures. Identify the difference between mathematical and strong induction and give examples of the appropriate use of each.

DS4. Basics of counting [core] Minimum core coverage time: 5 hours Topics:
q

q q

Counting arguments r Sum and product rule r Inclusion-exclusion principle r Arithmetic and geometric progressions r Fibonacci numbers The pigeonhole principle Permutations and combinations r Basic definitions r Pascal's identity r The binomial theorem Solving recurrence relations r Common examples r The Master theorem

Learning objectives: 1. Compute permutations and combinations of a set, and interpret the meaning in the context of the particular application. 2. State the definition of the Master theorem. 3. Solve a variety of basic recurrence equations. 4. Analyze a problem to create relevant recurrence equations or to identify important counting questions. DS5. Graphs and trees [core]
http://cs.wwc.edu/~aabyan/CC2001/DS.html (3 de 4) [18/12/2001 10:41:37]

http://cs.wwc.edu/~aabyan/CC2001/DS.html

Minimum core coverage time: 4 hours Topics:


q q q q q

Trees Undirected graphs Directed graphs Spanning trees Traversal strategies

Learning objectives: 1. Illustrate by example the basic terminology of graph theory, and some of the properties and special cases of each. 2. Demonstrate different traversal methods for trees and graphs. 3. Model problems in computer science using graphs and trees. 4. Relate graphs and trees to data structures, algorithms, and counting. DS6. Discrete probability [core] Minimum core coverage time: 6 hours Topics:
q q q

Finite probability space, probability measure, events Conditional probability, independence, Bayes' theorem Integer random variables, expectation

Learning objectives: 1. Calculate probabilities of events and expectations of random variables for elementary problems such as games of chance. 2. Differentiate between dependent and independent events. 3. Apply the binomial theorem to independent events and Bayes theorem to dependent events. 4. Apply the tools of probability to solve problems such as the Monte Carlo method, the average case analysis of algorithms, and hashing.

CC2001 Report December 15, 2001

http://cs.wwc.edu/~aabyan/CC2001/DS.html (4 de 4) [18/12/2001 10:41:37]

http://cs.wwc.edu/~aabyan/CC2001/PF.html

Programming Fundamentals (PF)


PF1. Fundamental programming constructs [core] PF2. Algorithms and problem-solving [core] PF3. Fundamental data structures [core] PF4. Recursion [core] PF5. Event-driven programming [core] Fluency in a programming language is prerequisite to the study of most of computer science. In the CC1991 report, knowledge of a programming language -- while identified as essential -- was given little emphasis in the curriculum. The "Introduction to a Programming Language" area in CC1991 represents only 12 hours of class time and is identified as optional, under the optimistic assumption that "increasing numbers of students . . . gain such experience in secondary school." We believe that undergraduate computer science programs must teach students how to use at least one programming language well; furthermore, we recommend that computer science programs should teach students to become competent in languages that make use of at least two programming paradigms. Accomplishing this goal requires considerably more than 12 hours. This knowledge area consists of those skills and concepts that are essential to programming practice independent of the underlying paradigm. As a result, this area includes units on fundamental programming concepts, basic data structures, and algorithmic processes. These units, however, by no means cover the full range of programming knowledge that a computer science undergraduate must know. Many of the other areas -- most notably Programming Languages (PL) and Software Engineering (SE) -- also contain programming-related units that are part of the undergraduate core. In most cases, these units could equally well have been assigned to either Programming Fundamentals or the more advanced area. PF1. Fundamental programming constructs [core] Minimum core coverage time: 9 hours Topics:
q q q q q q

Basic syntax and semantics of a higher-level language Variables, types, expressions, and assignment Simple I/O Conditional and iterative control structures Functions and parameter passing Structured decomposition

Learning objectives: 1. Analyze and explain the behavior of simple programs involving the fundamental programming constructs covered by this unit.
http://cs.wwc.edu/~aabyan/CC2001/PF.html (1 de 4) [18/12/2001 10:41:40]

http://cs.wwc.edu/~aabyan/CC2001/PF.html

2. Modify and expand short programs that use standard conditional and iterative control structures and functions. 3. Design, implement, test, and debug a program that uses each of the following fundamental programming constructs: basic computation, simple I/O, standard conditional and iterative structures, and the definition of functions. 4. Choose appropriate conditional and iteration constructs for a given programming task. 5. Apply the techniques of structured (functional) decomposition to break a program into smaller pieces. 6. Describe the mechanics of parameter passing. PF2. Algorithms and problem-solving [core] Minimum core coverage time: 6 hours Topics:
q q q q q

Problem-solving strategies The role of algorithms in the problem-solving process Implementation strategies for algorithms Debugging strategies The concept and properties of algorithms

Learning objectives: 1. 2. 3. 4. Discuss the importance of algorithms in the problem-solving process. Identify the necessary properties of good algorithms. Create algorithms for solving simple problems. Use pseudocode or a programming language to implement, test, and debug algorithms for solving simple problems. 5. Describe strategies that are useful in debugging. PF3. Fundamental data structures [core] Minimum core coverage time: 14 hours Topics:
q q q q q q q q

Primitive types Arrays Records Strings and string processing Data representation in memory Static, stack, and heap allocation Runtime storage management Pointers and references

http://cs.wwc.edu/~aabyan/CC2001/PF.html (2 de 4) [18/12/2001 10:41:40]

http://cs.wwc.edu/~aabyan/CC2001/PF.html
q q q q

Linked structures Implementation strategies for stacks, queues, and hash tables Implementation strategies for graphs and trees Strategies for choosing the right data structure

Learning objectives: 1. 2. 3. 4. 5. 6. Discuss the representation and use of primitive data types and built-in data structures. Describe how the data structures in the topic list are allocated and used in memory. Describe common applications for each data structure in the topic list. Implement the user-defined data structures in a high-level language. Compare alternative implementations of data structures with respect to performance. Write programs that use each of the following data structures: arrays, records, strings, linked lists, stacks, queues, and hash tables. 7. Compare and contrast the costs and benefits of dynamic and static data structure implementations. 8. Choose the appropriate data structure for modeling a given problem. PF4. Recursion [core] Minimum core coverage time: 5 hours Topics:
q q q q q q

The concept of recursion Recursive mathematical functions Simple recursive procedures Divide-and-conquer strategies Recursive backtracking Implementation of recursion

Learning objectives: 1. 2. 3. 4. 5. 6. 7. 8. Describe the concept of recursion and give examples of its use. Identify the base case and the general case of a recursively defined problem. Compare iterative and recursive solutions for elementary problems such as factorial. Describe the divide-and-conquer approach. Implement, test, and debug simple recursive functions and procedures. Describe how recursion can be implemented using a stack. Discuss problems for which backtracking is an appropriate solution. Determine when a recursive solution is appropriate for a problem.

PF5. Event-driven programming [core] Minimum core coverage time: 4 hours


http://cs.wwc.edu/~aabyan/CC2001/PF.html (3 de 4) [18/12/2001 10:41:40]

http://cs.wwc.edu/~aabyan/CC2001/PF.html

Topics:
q q q

Event-handling methods Event propagation Exception handling

Learning objectives: 1. Explain the difference between event-driven programming and command-line programming. 2. Design, code, test, and debug simple event-driven programs that respond to user events. 3. Develop code that responds to exception conditions raised during execution.

CC2001 Report December 15, 2001

http://cs.wwc.edu/~aabyan/CC2001/PF.html (4 de 4) [18/12/2001 10:41:40]

http://cs.wwc.edu/~aabyan/CC2001/AL.html

Algorithms and Complexity (AL)


AL1. Basic algorithmic analysis [core] AL2. Algorithmic strategies [core] AL3. Fundamental computing algorithms [core] AL4. Distributed algorithms [core] AL5. Basic computability [core] AL6. The complexity classes P and NP [elective] AL7. Automata theory [elective] AL8. Advanced algorithmic analysis [elective] AL9. Cryptographic algorithms [elective] AL10. Geometric algorithms [elective] AL11. Parallel algorithms [elective] Algorithms are fundamental to computer science and software engineering. The real-world performance of any software system depends on only two things: (1) the algorithms chosen and (2) the suitability and efficiency of the various layers of implementation. Good algorithm design is therefore crucial for the performance of all software systems. Moreover, the study of algorithms provides insight into the intrinsic nature of the problem as well as possible solution techniques independent of programming language, programming paradigm, computer hardware, or any other implementation aspect. An important part of computing is the ability to select algorithms appropriate to particular purposes and to apply them, recognizing the possibility that no suitable algorithm may exist. This facility relies on understanding the range of algorithms that address an important set of well-defined problems, recognizing their strengths and weaknesses, and their suitability in particular contexts. Efficiency is a pervasive theme throughout this area. AL1. Basic algorithmic analysis [core] Minimum core coverage time: 4 hours Topics:
q q q q q q q

Asymptotic analysis of upper and average complexity bounds Identifying differences among best, average, and worst case behaviors Big O, little o, omega, and theta notation Standard complexity classes Empirical measurements of performance Time and space tradeoffs in algorithms Using recurrence relations to analyze recursive algorithms

Learning objectives:

http://cs.wwc.edu/~aabyan/CC2001/AL.html (1 de 7) [18/12/2001 10:41:45]

http://cs.wwc.edu/~aabyan/CC2001/AL.html

1. Explain the use of big O, omega, and theta notation to describe the amount of work done by an algorithm. 2. Use big O, omega, and theta notation to give asymptotic upper, lower, and tight bounds on time and space complexity of algorithms. 3. Determine the time and space complexity of simple algorithms. 4. Deduce recurrence relations that describe the time complexity of recursively defined algorithms. 5. Solve elementary recurrence relations. AL2. Algorithmic strategies [core] Minimum core coverage time: 6 hours Topics:
q q q q q q q q

Brute-force algorithms Greedy algorithms Divide-and-conquer Backtracking Branch-and-bound Heuristics Pattern matching and string/text algorithms Numerical approximation algorithms

Learning objectives: 1. Describe the shortcoming of brute-force algorithms. 2. For each of several kinds of algorithm (brute force, greedy, divide-and-conquer, backtracking, branch-and-bound, and heuristic), identify an example of everyday human behavior that exemplifies the basic concept. 3. Implement a greedy algorithm to solve an appropriate problem. 4. Implement a divide-and-conquer algorithm to solve an appropriate problem. 5. Use backtracking to solve a problem such as navigating a maze. 6. Describe various heuristic problem-solving methods. 7. Use pattern matching to analyze substrings. 8. Use numerical approximation to solve mathematical problems, such as finding the roots of a polynomial. AL3. Fundamental computing algorithms [core] Minimum core coverage time: 12 hours Topics:

http://cs.wwc.edu/~aabyan/CC2001/AL.html (2 de 7) [18/12/2001 10:41:45]

http://cs.wwc.edu/~aabyan/CC2001/AL.html
q q q q q q q q q q q q

Simple numerical algorithms Sequential and binary search algorithms Quadratic sorting algorithms (selection, insertion) O(N log N) sorting algorithms (Quicksort, heapsort, mergesort) Hash tables, including collision-avoidance strategies Binary search trees Representations of graphs (adjacency list, adjacency matrix) Depth- and breadth-first traversals Shortest-path algorithms (Dijkstra's and Floyd's algorithms) Transitive closure (Floyd's algorithm) Minimum spanning tree (Prim's and Kruskal's algorithms) Topological sort

Learning objectives: 1. 2. 3. 4. Implement the most common quadratic and O(NlogN) sorting algorithms. Design and implement an appropriate hashing function for an application. Design and implement a collision-resolution algorithm for a hash table. Discuss the computational efficiency of the principal algorithms for sorting, searching, and hashing. 5. Discuss factors other than computational efficiency that influence the choice of algorithms, such as programming time, maintainability, and the use of application-specific patterns in the input data. 6. Solve problems using the fundamental graph algorithms, including depth-first and breadth-first search, single-source and all-pairs shortest paths, transitive closure, topological sort, and at least one minimum spanning tree algorithm. 7. Demonstrate the following capabilities: to evaluate algorithms, to select from a range of possible options, to provide justification for that selection, and to implement the algorithm in programming context. AL4. Distributed algorithms [core] Minimum core coverage time: 3 hours Topics:
q q q q

Consensus and election Termination detection Fault tolerance Stabilization

Learning objectives: 1. Explain the distributed paradigm. 2. Explain one simple distributed algorithm.
http://cs.wwc.edu/~aabyan/CC2001/AL.html (3 de 7) [18/12/2001 10:41:45]

http://cs.wwc.edu/~aabyan/CC2001/AL.html

3. Determine when to use consensus or election algorithms. 4. Distinguish between logical and physical clocks. 5. Describe the relative ordering of events in a distributed algorithm. AL5. Basic computability [core] Minimum core coverage time: 6 hours Topics:
q q q q q q

Finite-state machines Context-free grammars Tractable and intractable problems Uncomputable functions The halting problem Implications of uncomputability

Learning objectives: 1. 2. 3. 4. 5. Discuss the concept of finite state machines. Explain context-free grammars. Design a deterministic finite-state machine to accept a specified language. Explain how some problems have no algorithmic solution. Provide examples that illustrate the concept of uncomputability.

AL6. The complexity classes P and NP [elective] Topics:


q q q q

Definition of the classes P and NP NP-completeness (Cook's theorem) Standard NP-complete problems Reduction techniques

Learning objectives: 1. Define the classes P and NP. 2. Explain the significance of NP-completeness. 3. Prove that a problem is NP-complete by reducing a classic known NP-complete problem to it. AL7. Automata theory [elective] Topics:

http://cs.wwc.edu/~aabyan/CC2001/AL.html (4 de 7) [18/12/2001 10:41:45]

http://cs.wwc.edu/~aabyan/CC2001/AL.html
q q q q q q q q q q q q q

Deterministic finite automata (DFAs) Nondeterministic finite automata (NFAs) Equivalence of DFAs and NFAs Regular expressions The pumping lemma for regular expressions Push-down automata (PDAs) Relationship of PDAs and context-free grammars Properties of context-free grammars Turing machines Nondeterministic Turing machines Sets and languages Chomsky hierarchy The Church-Turing thesis

Learning objectives: 1. Determine a language's location in the Chomsky hierarchy (regular sets, context-free, contextsensitive, and recursively enumerable languages). 2. Prove that a language is in a specified class and that it is not in the next lower class. 3. Convert among equivalently powerful notations for a language, including among DFAs, NFAs, and regular expressions, and between PDAs and CFGs. 4. Explain at least one algorithm for both top-down and bottom-up parsing. 5. Explain the Church-Turing thesis and its significance. AL8. Advanced algorithmic analysis [elective] Topics:
q q q q q

Amortized analysis Online and offline algorithms Randomized algorithms Dynamic programming Combinatorial optimization

Learning objectives: 1. Use the potential method to provide an amortized analysis of previously unseen data structure, given the potential function. 2. Explain why competitive analysis is an appropriate measure for online algorithms. 3. Explain the use of randomization in the design of an algorithm for a problem where a deterministic algorithm is unknown or much more difficult. 4. Design and implement a dynamic programming solution to a problem. AL9. Cryptographic algorithms [elective]

http://cs.wwc.edu/~aabyan/CC2001/AL.html (5 de 7) [18/12/2001 10:41:45]

http://cs.wwc.edu/~aabyan/CC2001/AL.html

Topics:
q q q q q q

Historical overview of cryptography Private-key cryptography and the key-exchange problem Public-key cryptography Digital signatures Security protocols Applications (zero-knowledge proofs, authentication, and so on)

Learning objectives: 1. Describe efficient basic number-theoretic algorithms, including greatest common divisor, multiplicative inverse mod n, and raising to powers mod n. 2. Describe at least one public-key cryptosystem, including a necessary complexity-theoretic assumption for its security. 3. Create simple extensions of cryptographic protocols, using known protocols and cryptographic primitives. AL10. Geometric algorithms [elective] Topics:
q q

Line segments: properties, intersections Convex hull finding algorithms

Learning objectives: 1. Describe and give time analysis of at least two algorithms for finding a convex hull. 2. Justify the Omega(N log N) lower bound on finding the convex hull. 3. Describe at least one additional efficient computational geometry algorithm, such as finding the closest pair of points, convex layers, or maximal layers. AL11. Parallel algorithms [elective] Topics:
q q q q

PRAM model Exclusive versus concurrent reads and writes Pointer jumping Brent's theorem and work efficiency

Learning objectives: 1. Describe implementation of linked lists on a PRAM.

http://cs.wwc.edu/~aabyan/CC2001/AL.html (6 de 7) [18/12/2001 10:41:45]

http://cs.wwc.edu/~aabyan/CC2001/AL.html

2. Use parallel-prefix operation to perform simple computations efficiently in parallel. 3. Explain Brent's theorem and its relevance.

CC2001 Report December 15, 2001

http://cs.wwc.edu/~aabyan/CC2001/AL.html (7 de 7) [18/12/2001 10:41:45]

http://cs.wwc.edu/~aabyan/CC2001/AR.html

Architecture and Organization (AR)


AR1. Digital logic and digital systems [core] AR2. Machine level representation of data [core] AR3. Assembly level machine organization [core] AR4. Memory system organization and architecture [core] AR5. Interfacing and communication [core] AR6. Functional organization [core] AR7. Multiprocessing and alternative architectures [core] AR8. Performance enhancements [elective] AR9. Architecture for networks and distributed systems [elective] The computer lies at the heart of computing. Without it most of the computing disciplines today would be a branch of theoretical mathematics. To be a professional in any field of computing today, one should not regard the computer as just a black box that executes programs by magic. All students of computing should acquire some understanding and appreciation of a computer system's functional components, their characteristics, their performance, and their interactions. There are practical implications as well. Students need to understand computer architecture in order to structure a program so that it runs more efficiently on a real machine. In selecting a system to use, they should to able to understand the tradeoff among various components, such as CPU clock speed vs. memory size. The learning outcomes specified for these topics correspond primarily to the core and are intended to support programs that elect to require only the minimum 36 hours of computer architecture of their students. For programs that want to teach more than the minimum, the same topics (AR1-AR7) can be treated at a more advanced level by implementing a two-course sequence. For programs that want to cover the elective topics, those topics can be introduced within a two-course sequence and/or be treated in a more comprehesive way in a third course. AR1. Digital logic and digital systems [core] Minimum core coverage time: 6 hours Topics:
q q q q q

Overview and history of computer architecture Fundamental building blocks (logic gates, flip-flops, counters, registers, PLA) Logic expressions, minimization, sum of product forms Register transfer notation Physical considerations (gate delays, fan-in, fan-out)

Learning objectives: 1. Describe the progression of computer architecture from vacuum tubes to VLSI. 2. Demonstrate an understanding of the basic building blocks and their role in the historical
http://cs.wwc.edu/~aabyan/CC2001/AR.html (1 de 6) [18/12/2001 10:41:47]

http://cs.wwc.edu/~aabyan/CC2001/AR.html

development of computer architecture. 3. Use mathematical expressions to describe the functions of simple combinational and sequential circuits. 4. Design a simple circuit using the fundamental building blocks. AR2. Machine level representation of data [core] Minimum core coverage time: 3 hours Topics:
q q q q q q

Bits, bytes, and words Numeric data representation and number bases Fixed- and floating-point systems Signed and twos-complement representations Representation of nonnumeric data (character codes, graphical data) Representation of records and arrays

Learning objectives: 1. Explain the reasons for using different formats to represent numerical data. 2. Explain how negative integers are stored in sign-magnitude and twos-complement representation. 3. Convert numerical data from one format to another. 4. Discuss how fixed-length number representations affect accuracy and precision. 5. Describe the internal representation of nonnumeric data. 6. Describe the internal representation of characters, strings, records, and arrays. AR3. Assembly level machine organization [core] Minimum core coverage time: 9 hours Topics:
q q q q q q q q

Basic organization of the von Neumann machine Control unit; instruction fetch, decode, and execution Instruction sets and types (data manipulation, control, I/O) Assembly/machine language programming Instruction formats Addressing modes Subroutine call and return mechanisms I/O and interrupts

Learning objectives:

http://cs.wwc.edu/~aabyan/CC2001/AR.html (2 de 6) [18/12/2001 10:41:47]

http://cs.wwc.edu/~aabyan/CC2001/AR.html

1. Explain the organization of the classical von Neumann machine and its major functional units. 2. Explain how an instruction is executed in a classical von Neumann machine. 3. Summarize how instructions are represented at both the machine level and in the context of a symbolic assembler. 4. Explain different instruction formats, such as addresses per instruction and variable length vs. fixed length formats. 5. Write simple assembly language program segments. 6. Demonstrate how fundamental high-level programming constructs are implemented at the machine-language level. 7. Explain how subroutine calls are handled at the assembly level. 8. Explain the basic concepts of interrupts and I/O operations. AR4. Memory system organization and architecture [core] Minimum core coverage time: 5 hours Topics:
q q q q q q q q

Storage systems and their technology Coding, data compression, and data integrity Memory hierarchy Main memory organization and operations Latency, cycle time, bandwidth, and interleaving Cache memories (address mapping, block size, replacement and store policy) Virtual memory (page table, TLB) Fault handling and reliability

Learning objectives: 1. 2. 3. 4. 5. 6. Identify the main types of memory technology. Explain the effect of memory latency on running time. Explain the use of memory hierarchy to reduce the effective memory latency. Describe the principles of memory management. Describe the role of cache and virtual memory. Explain the workings of a system with virtual memory management.

AR5. Interfacing and communication [core] Minimum core coverage time: 3 hours Topics:
q q q

I/O fundamentals: handshaking, buffering, programmed I/O, interrupt-driven I/O Interrupt structures: vectored and prioritized, interrupt acknowledgment External storage, physical organization, and drives

http://cs.wwc.edu/~aabyan/CC2001/AR.html (3 de 6) [18/12/2001 10:41:47]

http://cs.wwc.edu/~aabyan/CC2001/AR.html
q q q q

Buses: bus protocols, arbitration, direct-memory access (DMA) Introduction to networks Multimedia support RAID architectures

Learning objectives: 1. 2. 3. 4. 5. 6. Explain how interrupts are used to implement I/O control and data transfers. Identify various types of buses in a computer system. Describe data access from a magnetic disk drive. Compare the common network configurations. Identify interfaces needed for multimedia support. Describe the advantages and limitations of RAID architectures.

AR6. Functional organization [core] Minimum core coverage time: 7 hours Topics:
q q q q

Implementation of simple datapaths Control unit: hardwired realization vs. microprogrammed realization Instruction pipelining Introduction to instruction-level parallelism (ILP)

Learning objectives: 1. Compare alternative implementation of datapaths. 2. Discuss the concept of control points and the generation of control signals using hardwired or microprogrammed implementations. 3. Explain basic instruction level parallelism using pipelining and the major hazards that may occur. AR7. Multiprocessing and alternative architectures [core] Minimum core coverage time: 3 hours Topics:
q q q q q

Introduction to SIMD, MIMD, VLIW, EPIC Systolic architecture Interconnection networks (hypercube, shuffle-exchange, mesh, crossbar) Shared memory systems Cache coherence

http://cs.wwc.edu/~aabyan/CC2001/AR.html (4 de 6) [18/12/2001 10:41:47]

http://cs.wwc.edu/~aabyan/CC2001/AR.html
q

Memory models and memory consistency

Learning objectives: 1. 2. 3. 4. Discuss the concept of parallel processing beyond the classical von Neumann model. Describe alternative architectures such as SIMD, MIMD, and VLIW. Explain the concept of interconnection networks and characterize different approaches. Discuss the special concerns that multiprocessing systems present with respect to memory management and describe how these are addressed.

AR8. Performance enhancements [elective] Topics:


q q q q q q

Superscalar architecture Branch prediction Prefetching Speculative execution Multithreading Scalability

Learning objectives: 1. 2. 3. 4. 5. Describe superscalar architectures and their advantages. Explain the concept of branch prediction and its utility. Characterize the costs and benefits of prefetching. Explain speculative execution and identify the conditions that justify it. Discuss the performance advantages that multithreading can offer in an architecture along with the factors that make it difficult to derive maximum benefits from this approach. 6. Describe the relevance of scalability to performance. AR9. Architecture for networks and distributed systems [elective] Topics:
q q q q q

Introduction to LANs and WANs Layered protocol design, ISO/OSI, IEEE 802 Impact of architectural issues on distributed algorithms Network computing Distributed multimedia

Learning objectives: 1. Explain the basic components of network systems and distinguish between LANs and WANs. 2. Discuss the architectural issues involved in the design of a layered network protocol.
http://cs.wwc.edu/~aabyan/CC2001/AR.html (5 de 6) [18/12/2001 10:41:47]

http://cs.wwc.edu/~aabyan/CC2001/AR.html

3. Explain how architectures differ in network and distributed systems. 4. Discuss architectural issues related to network computing and distributed multimedia.

CC2001 Report December 15, 2001

http://cs.wwc.edu/~aabyan/CC2001/AR.html (6 de 6) [18/12/2001 10:41:47]

http://cs.wwc.edu/~aabyan/CC2001/HC.html

Human-Computer Interaction (HC)


HC1. Foundations of human-computer interaction [core] HC2. Building a simple graphical user interface [core] HC3. Human-centered software evaluation [elective] HC4. Human-centered software development [elective] HC5. Graphical user-interface design [elective] HC6. Graphical user-interface programming [elective] HC7. HCI aspects of multimedia systems [elective] HC8. HCI aspects of collaboration and communication [elective] This list of topics is intended as an introduction to human-computer interaction for computer science majors. Emphasis will be placed on understanding human behavior with interactive objects, knowing how to develop and evaluate interactive software using a human-centered approach, and general knowledge of HCI design issues with multiple types of interactive software. Units HC1 (Foundations of Human-Computer Interaction) and HC2 (Building a simple graphical user interface) will be required for all majors, possibly as modules in the introductory courses. The remaining units will most likely be integrated into one or two elective courses at the junior or senior level. HC1. Foundations of human-computer interaction [core] Minimum core coverage time: 6 hours Topics:
q q q q q q q q

Motivation: Why care about people? Contexts for HCI (tools, web hypermedia, communication) Human-centered development and evaluation Human performance models: perception, movement, and cognition Human performance models: culture, communication, and organizations Accommodating human diversity Principles of good design and good designers; engineering tradeoffs Introduction to usability testing

Learning objectives: 1. 2. 3. 4. Discuss the reasons for human-centered software development. Summarize the basic science of psychological and social interaction. Differentiate between the role of hypotheses and experimental results vs. correlations. Develop a conceptual vocabulary for analyzing human interaction with software: affordance, conceptual model, feedback, and so forth. 5. Distinguish between the different interpretations that a given icon, symbol, word, or color can have in (a) two different human cultures and (b) in a culture and one of its subcultures. 6. In what ways might the design of a computer system or application succeed or fail in terms of
http://cs.wwc.edu/~aabyan/CC2001/HC.html (1 de 5) [18/12/2001 10:41:50]

http://cs.wwc.edu/~aabyan/CC2001/HC.html

respecting human diversity. 7. Create and conduct a simple usability test for an existing software application. HC2. Building a simple graphical user interface [core] Minimum core coverage time: 2 hours Topics:
q q

Principles of graphical user interfaces (GUIs) GUI toolkits

Learning objectives: 1. Identify several fundamental principles for effective GUI design. 2. Use a GUI toolkit to create a simple application that supports a graphical user interface. 3. Illustrate the effect of fundamental design principles on the structure of a graphical user interface. 4. Conduct a simple usability test for each instance and compare the results. HC3. Human-centered software evaluation [elective] Topics:
q q q

Setting goals for evaluation Evaluation without users: walkthroughs, KLM, guidelines, and standards Evaluation with users: usability testing, interview, survey, experiment

Learning objectives: 1. 2. 3. 4. 5. 6. Discuss evaluation criteria: learning, task time and completion, acceptability. Conduct a walkthrough and a Keystroke Level Model (KLM) analysis. Summarize the major guidelines and standards. Conduct a usability test, an interview, and a survey. Compare a usability test to a controlled experiment. Evaluate an existing interactive system with human-centered criteria and a usability test.

HC4. Human-centered software development [elective] Topics:


q q q

Approaches, characteristics, and overview of process Functionality and usability: task analysis, interviews, surveys Specifying interaction and presentation

http://cs.wwc.edu/~aabyan/CC2001/HC.html (2 de 5) [18/12/2001 10:41:50]

http://cs.wwc.edu/~aabyan/CC2001/HC.html
q

Prototyping techniques and tools r Paper storyboards r Inheritance and dynamic dispatch r Prototyping languages and GUI builders

Learning objectives: 1. 2. 3. 4. 5. Explain the basic types and features of human-centered development. Compare human-centered development to traditional software engineering methods. State three functional requirements and three usability requirements. Specify an interactive object with transition networks, OO design, or scenario descriptions. Discuss the pros and cons of development with paper and software prototypes.

HC5. Graphical user-interface design [elective] Topics:


q q q q q q q

Choosing interaction styles and interaction techniques HCI aspects of common widgets HCI aspects of screen design: layout, color, fonts, labeling Handling human failure Beyond simple screen design: visualization, representation, metaphor Multi-modal interaction: graphics, sound, and haptics 3D interaction and virtual reality

Learning objectives: 1. Summarize common interaction styles. 2. Explain good design principles of each of the following: common widgets; sequenced screen presentations; simple error-trap dialog; a user manual. 3. Design, prototype, and evaluate a simple 2D GUI illustrating knowledge of the concepts taught in HC3 and HC4. 4. Discuss the challenges that exist in moving from 2D to 3D interaction. HC6. Graphical user-interface programming [elective] Topics:
q q q q q q

UIMS, dialogue independence and levels of analysis, Seeheim model Widget classes Event management and user interaction Geometry management GUI builders and UI programming environments Cross-platform design

http://cs.wwc.edu/~aabyan/CC2001/HC.html (3 de 5) [18/12/2001 10:41:50]

http://cs.wwc.edu/~aabyan/CC2001/HC.html

Learning objectives: 1. 2. 3. 4. 5. 6. 7. Differentiate between the responsibilities of the UIMS and the application. Differentiate between kernel-based and client-server models for the UI. Compare the event-driven paradigm with more traditional procedural control for the UI. Describe aggregation of widgets and constraint-based geometry management. Explain callbacks and their role in GUI builders. Identify at least three differences common in cross-platform UI design. Identify as many commonalities as you can that are found in UIs across different platforms.

HC7. HCI aspects of multimedia systems [elective] Topics:


q q

q q q

Categorization and architectures of information: hierarchies, hypermedia Information retrieval and human performance r Web search r Usability of database query languages r Graphics r Sound HCI design of multimedia information systems Speech recognition and natural language processing Information appliances and mobile computing

Learning objectives: 1. 2. 3. 4. Discuss how information retrieval differs from transaction processing. Explain how the organization of information supports retrieval. Describe the major usability problems with database query languages. Explain the current state of speech recognition technology in particular and natural language processing in general. 5. Design, prototype, and evaluate a simple Multimedia Information System illustrating knowledge of the concepts taught in HC4, HC5, and HC7. HC8. HCI aspects of collaboration and communication [elective] Topics:
q q q q q

Groupware to support specialized tasks: document preparation, multi-player games Asynchronous group communication: e-mail, bulletin boards Synchronous group communication: chat rooms, conferencing Online communities: MUDs/MOOs Software characters and intelligent agents

Learning objectives:
http://cs.wwc.edu/~aabyan/CC2001/HC.html (4 de 5) [18/12/2001 10:41:50]

http://cs.wwc.edu/~aabyan/CC2001/HC.html

1. 2. 3. 4. 5.

Compare the HCI issues in individual interaction with group interaction. Discuss several issues of social concern raised by collaborative software. Discuss the HCI issues in software that embodies human intention. Describe the difference between synchronous and asynchronous communication. Design, prototype, and evaluate a simple groupware or group communication application illustrating knowledge of the concepts taught in HC4, HC5, and HC8. 6. Participate in a team project for which some interaction is face-to-face and other interaction occurs via a mediating software environment. 7. Describe the similarities and differences between face-to-face and software-mediated collaboration.

CC2001 Report December 15, 2001

http://cs.wwc.edu/~aabyan/CC2001/HC.html (5 de 5) [18/12/2001 10:41:50]

http://cs.wwc.edu/~aabyan/CC2001/GV.html

Graphics and Visual Computing (GV)


GV1. Fundamental techniques in graphics [core] GV2. Graphic systems [core] GV3. Graphic communication [elective] GV4. Geometric modeling [elective] GV5. Basic rendering [elective] GV6. Advanced rendering [elective] GV7. Advanced techniques [elective] GV8. Computer animation [elective] GV9. Visualization [elective] GV10. Virtual reality [elective] GV11. Computer vision [elective] The area encompassed by Graphics and Visual Computing (GV) is divided into four interrelated fields:
q

Computer graphics. Computer graphics is the art and science of communicating information using images that are generated and presented through computation. This requires (a) the design and construction of models that represent information in ways that support the creation and viewing of images, (b) the design of devices and techniques through which the person may interact with the model or the view, (c) the creation of techniques for rendering the model, and (d) the design of ways the images may be preserved The goal of computer graphics is to engage the person's visual centers alongside other cognitive centers in understanding. Visualization. The field of visualization seeks to determine and present underlying correlated structures and relationships in both scientific (computational and medical sciences) and more abstract datasets. The prime objective of the presentation should be to communicate the information in a dataset so as to enhance understanding. Although current techniques of visualization exploit visual abilities of humans, other sensory modalities, including sound and haptics (touch), are also being considered to aid the discovery process of information. Virtual reality. Virtual reality (VR) enables users to experience a three-dimensional environment generated using computer graphics, and perhaps other sensory modalities, to provide an environment for enhanced interaction between a human user and a computercreated world. Computer vision. The goal of computer vision (CV) is to deduce the properties and structure of the three-dimensional world from one or more two-dimensional images. The understanding and practice of computer vision depends upon core concepts in computing, but also relates strongly to the disciplines of physics, mathematics, and psychology.

GV1. Fundamental techniques in graphics [core] Minimum core coverage time: 2 hours Topics:
http://cs.wwc.edu/~aabyan/CC2001/GV.html (1 de 7) [18/12/2001 10:41:55]

http://cs.wwc.edu/~aabyan/CC2001/GV.html

q q q q q q q

Hierarchy of graphics software Using a graphics API Simple color models (RGB, HSB, CMYK) Homogeneous coordinates Affine transformations (scaling, rotation, translation) Viewing transformation Clipping

Learning objectives: 1. Distinguish the capabilities of different levels of graphics software and describe the appropriateness of each. 2. Create images using a standard graphics API. 3. Use the facilities provided by a standard API to express basic transformations such as scaling, rotation, and translation. 4. Implement simple procedures that perform transformation and clipping operations on a simple 2-dimensional image. 5. Discuss the 3-dimensional coordinate system and the changes required to extend 2D transformation operations to handle transformations in 3D GV2. Graphic systems [core] Minimum core coverage time: 1 hour Topics:
q q q q

Raster and vector graphics systems Video display devices Physical and logical input devices Issues facing the developer of graphical systems

Learning objectives: 1. 2. 3. 4. 5. Describe the appropriateness of graphics architectures for given applications. Explain the function of various input devices. Compare and contrast the techniques of raster graphics and vector graphics. Use current hardware and software for creating and displaying graphics. Discuss the expanded capabilities of emerging hardware and software for creating and displaying graphics.

GV3. Graphic communication [elective] Topics:

http://cs.wwc.edu/~aabyan/CC2001/GV.html (2 de 7) [18/12/2001 10:41:55]

http://cs.wwc.edu/~aabyan/CC2001/GV.html
q q q q q q q q q

Psychodynamics of color and interactions among colors Modifications of color for vision deficiency Cultural meaning of different colors Use of effective pseudo-color palettes for images for specific audiences Structuring a view for effective understanding Image modifications for effective video and hardcopy Use of legends to key information to color or other visual data Use of text in images to present context and background information Visual user feedback on graphical operations

Learning objectives: 1. 2. 3. 4. Explain the value of using colors and pseudo-colors. Demonstrate the ability to create effective video and hardcopy images. Identify effective and ineffective examples of communication using graphics. Create effective examples of graphic communication, making appropriate use of color, legends, text, and/or video. 5. Create two effective examples that communicate the same content: one designed for hardcopy presentation and the other designed for online presentation. 6. Discuss the differences in design criteria for hardcopy and online presentations. GV4. Geometric modeling [elective] Topics:
q q q q q q q q q q

Polygonal representation of 3D objects Parametric polynomial curves and surfaces Constructive Solid Geometry (CSG) representation Implicit representation of curves and surfaces Spatial subdivision techniques Procedural models Deformable models Subdivision surfaces Multiresolution modeling Reconstruction

Learning objectives: 1. 2. 3. 4. 5. Create simple polyhedral models by surface tessellation. Construct CSG models from simple primitives, such as cubes and quadric surfaces. Generate a mesh representation from an implicit surface. Generate a fractal model or terrain using a procedural method. Generate a mesh from data points acquired with a laser scanner.

GV5. Basic rendering [elective]


http://cs.wwc.edu/~aabyan/CC2001/GV.html (3 de 7) [18/12/2001 10:41:55]

http://cs.wwc.edu/~aabyan/CC2001/GV.html

Topics:
q q q q q q q q q

Line generation algorithms (Bresenham) Font generation: outline vs. bitmap Light-source and material properties Ambient, diffuse, and specular reflections Phong reflection model Rendering of a polygonal surface; flat, Gouraud, and Phong shading Texture mapping, bump texture, environment map Introduction to ray tracing Image synthesis, sampling techniques, and anti-aliasing

Learning objectives: 1. 2. 3. 4. Explain the operation of the Bresenham algorithm for rendering a line on a pixel-based display. Explain the concept and applications of each of these techniques. Demonstrate each of these techniques by creating an image using a standard API. Describe how a graphic image has been created.

GV6. Advanced rendering [elective] Topics:


q q q q q q q q q

Transport equations Ray tracing algorithms Photon tracing Radiosity for global illumination computation, form factors Efficient approaches to global illumination Monte Carlo methods for global illumination Image-based rendering, panorama viewing, plenoptic function modeling Rendering of complex natural phenomenon Non-photorealistic rendering

Learning objectives: 1. Describe several transport equations in detail, noting all comprehensive effects. 2. Describe efficient algorithms to compute radiosity and explain the tradeoffs of accuracy and algorithmic performance. 3. Describe the impact of meshing schemes. 4. Explain image-based rendering techniques, light fields, and associated topics. GV7. Advanced techniques [elective] Topics:
http://cs.wwc.edu/~aabyan/CC2001/GV.html (4 de 7) [18/12/2001 10:41:55]

http://cs.wwc.edu/~aabyan/CC2001/GV.html

q q q q q q

Color quantization Scan conversion of 2D primitive, forward differencing Tessellation of curved surfaces Hidden surface removal methods Z-buffer and frame buffer, color channels (a channel for opacity) Advanced geometric modeling techniques

Learning objectives: 1. Describe the techniques identified in this section. 2. Explain how to recognize the graphics techniques used to create a particular image. 3. Implement any of the specified graphics techniques using a primitive graphics system at the individual pixel level. 4. Use common animation software to construct simple organic forms using metaball and skeleton. GV8. Computer animation [elective] Topics:
q q q q q q q

Key-frame animation Camera animation Scripting system Animation of articulated structures: inverse kinematics Motion capture Procedural animation Deformation

Learning objectives: 1. Explain the spline interpolation method for producing in-between positions and orientations. 2. Compare and contrast several technologies for motion capture. 3. Use the particle function in common animation software to generate a simple animation, such as fireworks. 4. Use free-form deformation techniques to create various deformations. GV9. Visualization [elective] Topics:
q q q q

Basic viewing and interrogation functions for visualization Visualization of vector fields, tensors, and flow data Visualization of scalar field or height field: isosurface by the marching cube method Direct volume data rendering: ray-casting, transfer functions, segmentation, hardware

http://cs.wwc.edu/~aabyan/CC2001/GV.html (5 de 7) [18/12/2001 10:41:55]

http://cs.wwc.edu/~aabyan/CC2001/GV.html
q

Information visualization: projection and parallel-coordinates methods

Learning objectives: 1. Describe the basic algorithms behind scalar and vector visualization. 2. Describe the tradeoffs of the algorithms in terms of accuracy and performance. 3. Employ suitable theory from signal processing and numerical analysis to explain the effects of visualization operations. 4. Describe the impact of presentation and user interaction on exploration. GV10. Virtual reality [elective] Topics:
q q q q q q q q q q q

Stereoscopic display Force feedback simulation, haptic devices Viewer tracking Collision detection Visibility computation Time-critical rendering, multiple levels of details (LOD) Image-base VR system Distributed VR, collaboration over computer network Interactive modeling User interface issues Applications in medicine, simulation, and training

Learning objectives: 1. Describe the optical model realized by a computer graphics system to synthesize stereoscopic view. 2. Describe the principles of different viewer tracking technologies. 3. Explain the principles of efficient collision detection algorithms for convex polyhedra. 4. Describe the differences between geometry- and image-based virtual reality. 5. Describe the issues of user action synchronization and data consistency in a networked environment. 6. Determine the basic requirements on interface, hardware, and software configurations of a VR system for a specified application. GV11. Computer vision [elective] Topics:
q q q

Image acquisition The digital image and its properties Image preprocessing

http://cs.wwc.edu/~aabyan/CC2001/GV.html (6 de 7) [18/12/2001 10:41:55]

http://cs.wwc.edu/~aabyan/CC2001/GV.html
q q q q

Segmentation (thresholding, edge- and region-based segmentation) Shape representation and object recognition Motion analysis Case studies (object recognition, object tracking)

Learning objectives: 1. Explain the image formation process. 2. Explain the advantages of two and more cameras, stereo vision. 3. Explain various segmentation approaches, along with their characteristics, differences, strengths, and weaknesses. 4. Describe object recognition based on contour- and region-based shape representations. 5. Explain differential motion analysis methods. 6. Describe the differences in object tracking methods.

CC2001 Report December 15, 2001

http://cs.wwc.edu/~aabyan/CC2001/GV.html (7 de 7) [18/12/2001 10:41:55]

http://cs.wwc.edu/~aabyan/CC2001/IS.html

Intelligent Systems (IS)


IS1. Fundamental issues in intelligent systems [core] IS2. Search and constraint satisfaction [core] IS3. Knowledge representation and reasoning [core] IS4. Advanced search [elective] IS5. Advanced knowledge representation and reasoning [elective] IS6. Agents [elective] IS7. Natural language processing [elective] IS8. Machine learning and neural networks [elective] IS9. AI planning systems [elective] IS10. Robotics [elective] The field of artificial intelligence (AI) is concerned with the design and analysis of autonomous agents. These are software systems and/or physical machines, with sensors and actuators, embodied for example within a robot or an autonomous spacecraft. An intelligent system has to perceive its environment, to act rationally towards its assigned tasks, to interact with other agents and with human beings. These capabilities are covered by topics such as computer vision, planning and acting, robotics, multiagents systems, speech recognition, and natural language understanding. They rely on a broad set of general and specialized knowledge representations and reasoning mechanisms, on problem solving and search algorithms, and on machine learning techniques. Furthermore, artificial intelligence provides a set of tools for solving problems that are difficult or impractical to solve with other methods. These include heuristic search and planning algorithms, formalisms for knowledge representation and reasoning, machine learning techniques, and methods applicable to sensing and action problems such as speech and language understanding, computer vision, and robotics, among others. The student needs to be able to determine when an AI approach is appropriate for a given problem, and to be able to select and implement a suitable AI method. IS1. Fundamental issues in intelligent systems [core] Minimum core coverage time: 1 hour Topics:
q q

History of artificial intelligence Philosophical questions r The Turing test r Searle's "Chinese Room" thought experiment r Ethical issues in AI Fundamental definitions r Optimal vs. human-like reasoning

http://cs.wwc.edu/~aabyan/CC2001/IS.html (1 de 7) [18/12/2001 10:41:58]

http://cs.wwc.edu/~aabyan/CC2001/IS.html

q q q

Optimal vs. human-like behavior Philosophical questions Modeling the world The role of heuristics
r

Learning objectives: 1. 2. 3. 4. 5. Describe the Turing test and the "Chinese Room" thought experiment. Differentiate the concepts of optimal reasoning and human-like reasoning. Differentiate the concepts of optimal behavior and human-like behavior. List examples of intelligent systems that depend on models of the world. Describe the role of heuristics and the need for tradeoffs between optimality and efficiency.

IS2. Search and constraint satisfaction [core] Minimum core coverage time: 5 hours Topics:
q q q q q

Problem spaces Brute-force search (breadth-first, depth-first, depth-first with iterative deepening) Best-first search (generic best-first, Dijkstra's algorithm, A*, admissibility of A*) Two-player games (minimax search, alpha-beta pruning) Constraint satisfaction (backtracking and local search methods)

Learning objectives: 1. Formulate an efficient problem space for a problem expressed in English by expressing that problem space in terms of states, operators, an initial state, and a description of a goal state. 2. Describe the problem of combinatorial explosion and its consequences. 3. Select an appropriate brute-force search algorithm for a problem, implement it, and characterize its time and space complexities. 4. Select an appropriate heuristic search algorithm for a problem and implement it by designing the necessary heuristic evaluation function. 5. Describe under what conditions heuristic algorithms guarantee optimal solution. 6. Implement minimax search with alpha-beta pruning for some two-player game. 7. Formulate a problem specified in English as a constraint-satisfaction problem and implement it using a chronological backtracking algorithm. IS3. Knowledge representation and reasoning [core] Minimum core coverage time: 4 hours Topics:

http://cs.wwc.edu/~aabyan/CC2001/IS.html (2 de 7) [18/12/2001 10:41:58]

http://cs.wwc.edu/~aabyan/CC2001/IS.html

q q q q q

Review of propositional and predicate logic Resolution and theorem proving Nonmonotonic inference Probabilistic reasoning Bayes theorem

Learning objectives: 1. 2. 3. 4. Explain the operation of the resolution technique for theorem proving. Explain the distinction between monotonic and nonmonotonic inference. Discuss the advantages and shortcomings of probabilistic reasoning. Apply Bayes theorem to determine conditional probabilities.

IS4. Advanced search [elective] Topics:


q q q

Genetic algorithms Simulated annealing Local search

Learning objectives: 1. Explain what genetic algorithms are and constrast their effectiveness with the classic problemsolving and search techniques. 2. Explain how simulated annealing can be used to reduce search complexity and contrast its operation with classic search techniques. 3. Apply local search techniques to a classic domain. IS5. Advanced knowledge representation and reasoning [elective] Topics:
q

Structured representation r Frames and objects r Description logics r Inheritance systems Nonmonotonic reasoning r Nonclassical logics r Default reasoning r Belief revision r Preference logics r Integration of knowledge sources r Aggregation of conflicting belief Reasoning on action and change

http://cs.wwc.edu/~aabyan/CC2001/IS.html (3 de 7) [18/12/2001 10:41:58]

http://cs.wwc.edu/~aabyan/CC2001/IS.html

q q

Situation calculus r Event calculus r Ramification problems Temporal and spatial reasoning Uncertainty r Probabilistic reasoning r Bayesian nets r Fuzzy sets and possibility theory r Decision theory Knowledge representation for diagnosis, qualitative representation
r

Learning objectives: 1. Compare and contrast the most common models used for structured knowledge representation, highlighting their strengths and weaknesses. 2. Characterize the components of nonmonotonic reasoning and its usefulness as a representational mechanisms for belief systems. 3. Apply situation and event calculus to problems of action and change. 4. Articulate the distinction between temporal and spatial reasoning, explaining how they interrelate. 5. Describe and contrast the basic techniques for representing uncertainty. 6. Describe and contrast the basic techniques for diagnosis and qualitative representation. IS6. Agents [elective] Topics:
q q q

q q q

Definition of agents Successful applications and state-of-the-art agent-based systems Agent architectures r Simple reactive agents r Reactive planners r Layered architectures r Example architectures and applications Agent theory r Commitments r Intentions r Decision-theoretic agents r Markov decision processes (MDP) Software agents, personal assistants, and information access r Collaborative agents r Information-gathering agents Believable agents (synthetic characters, modeling emotions in agents) Learning agents Multi-agent systems

http://cs.wwc.edu/~aabyan/CC2001/IS.html (4 de 7) [18/12/2001 10:41:58]

http://cs.wwc.edu/~aabyan/CC2001/IS.html

q q

Economically inspired multi-agent systems r Collaborating agents r Agent teams r Agent modeling r Multi-agent learning Introduction to robotic agents Mobile agents
r

Learning objectives: 1. Explain how an agent differs from other categories of intelligent systems. 2. Characterize and contrast the standard agent architectures. 3. Describe the applications of agent theory, to domains such as software agents, personal assistants, and believable agents. 4. Describe the distinction between agents that learn and those that don't. 5. Demonstrate using appropriate examples how multi-agent systems support agent interaction. 6. Describe and contrast robotic and mobile agents. IS7. Natural language processing [elective] Topics:
q q q q q q

Deterministic and stochastic grammars Parsing algorithms Corpus-based methods Information retrieval Language translation Speech recognition

Learning objectives: 1. Define and contrast deterministic and stochastic grammars, providing examples to show the adequacy of each. 2. Identify the classic parsing algorithms for parsing natural language. 3. Defend the need for an established corpus. 4. Give examples of catalog and look up procedures in a corpus-based approach. 5. Articulate the distinction between techniques for information retrieval, language translation, and speech recognition. IS8. Machine learning and neural networks [elective] Topics:
q q

Definition and examples of machine learning Supervised learning

http://cs.wwc.edu/~aabyan/CC2001/IS.html (5 de 7) [18/12/2001 10:41:58]

http://cs.wwc.edu/~aabyan/CC2001/IS.html
q q q q q q q q

Learning decision trees Learning neural networks Learning belief networks The nearest neighbor algorithm Learning theory The problem of overfitting Unsupervised learning Reinforcement learning

Learning objectives: 1. Explain the differences among the three main styles of learning: supervised, reinforcement, and unsupervised. 2. Implement simple algorithms for supervised learning, reinforcement learning, and unsupervised learning. 3. Determine which of the three learning styles is appropriate to a particular problem domain. 4. Compare and contrast each of the following techniques, providing examples of when each strategy is superior: decision trees, neural networks, and belief networks.. 5. Implement a simple learning system using decision trees, neural networks and/or belief networks, as appropriate. 6. Characterize the state of the art in learning theory, including its achievements and its shortcomings. 7. Explain the nearest neighbor algorithm and its place within learning theory. 8. Explain the problem of overfitting, along with techniques for detecting and managing the problem. IS9. AI planning systems [elective] Topics:
q q q q q q q q

Definition and examples of planning systems Planning as search Operator-based planning Propositional planning Extending planning systems (case-based, learning, and probabilistic systems) Static world planning systems Planning and execution Planning and robotics

Learning objectives: 1. Define the concept of a planning system. 2. Explain how planning systems differ from classical search techniques. 3. Articulate the differences between planning as search, operator-based planning, and propositional planning, providing examples of domains where each is most applicable.
http://cs.wwc.edu/~aabyan/CC2001/IS.html (6 de 7) [18/12/2001 10:41:58]

http://cs.wwc.edu/~aabyan/CC2001/IS.html

4. Define and provide examples for each of the following techniques: case-based, learning, and probablistic planning. 5. Compare and contrast static world planning systems with those need dynamic execution. 6. Explain the impact of dynamic planning on robotics. IS10. Robotics [elective] Topics:
q

q q q q q

Overview r State-of-the-art robot systems r Planning vs. reactive control r Uncertainty in control r Sensing r World models Configuration space Planning Sensing Robot programming Navigation and control

Learning objectives: 1. 2. 3. 4. 5. 6. Outline the potential and limitations of today's state-of-the-art robot systems. Implement configuration space algorithms for a 2D robot and complex polygons. Implement simple motion planning algorithms. Explain the uncertainties associated with sensors and how to deal with those uncertainties. Design a simple control architecture. Describe various strategies for navigation in unknown environments, including the strengths and shortcomings of each. 7. Describe various strategies for navigation with the aid of landmarks, including the strengths and shortcomings of each.

CC2001 Report December 15, 2001

http://cs.wwc.edu/~aabyan/CC2001/IS.html (7 de 7) [18/12/2001 10:41:58]

http://cs.wwc.edu/~aabyan/CC2001/OS.html

Operating Systems (OS)


OS1. Overview of operating systems [core] OS2. Operating system principles [core] OS3. Concurrency [core] OS4. Scheduling and dispatch [core] OS5. Memory management [core] OS6. Device management [elective] OS7. Security and protection [elective] OS8. File systems [elective] OS9. Real-time and embedded systems [elective] OS10. Fault tolerance [elective] OS11. System performance evaluation [elective] OS12. Scripting [elective] An operating system defines an abstraction of hardware behavior with which programmers can control the hardware. It also manages resource sharing among the computer's users. The topics in this area explain the issues that influence the design of contemporary operating systems. Courses that cover this area will typically include a laboratory component to enable students to experiment with operating systems. Over the years, operating systems and their abstractions have become complex relative to typical application software. It is necessary to ensure that the student understands the extent of the use of an operating system prior to a detailed study of internal implementation algorithms and data structures. Therefore these topics address both the use of operating systems (externals) and their design and implementation (internals). Many of the ideas involved in operating system use have wider applicability across the field of computer science, such as concurrent programming. Studying internal design has relevance in such diverse areas as dependable programming, algorithm design and implementation, modern device development, building virtual environments, caching material across the web, building secure and safe systems, network management, and many others. OS1. Overview of operating systems [core] Minimum core coverage time: 2 hours Topics:
q q q q q q

Role and purpose of the operating system History of operating system development Functionality of a typical operating system Mechanisms to support client-server models, hand-held devices Design issues (efficiency, robustness, flexibility, portability, security, compatibility) Influences of security, networking, multimedia, windows

http://cs.wwc.edu/~aabyan/CC2001/OS.html (1 de 7) [18/12/2001 10:42:01]

http://cs.wwc.edu/~aabyan/CC2001/OS.html

Learning objectives: 1. Explain the objectives and functions of modern operating systems. 2. Describe how operating systems have evolved over time from primitive batch systems to sophisticated multiuser systems. 3. Analyze the tradeoffs inherent in operating system design. 4. Describe the functions of a contemporary operating system with respect to convenience, efficiency, and the ability to evolve. 5. Discuss networked, client-server, distributed operating systems and how they differ from single user operating systems. 6. Identify potential threats to operating systems and the security features design to guard against them. 7. Describe how issues such as open source software and the increased use of the Internet are influencing operating system design. OS2. Operating system principles [core] Minimum core coverage time: 2 hours Topics:
q q q q q q q

Structuring methods (monolithic, layered, modular, micro-kernel models) Abstractions, processes, and resources Concepts of application program interfaces (APIs) Application needs and the evolution of hardware/software techniques Device organization Interrupts: methods and implementations Concept of user/system state and protection, transition to kernel mode

Learning objectives: 1. 2. 3. 4. 5. 6. 7. 8. Explain the concept of a logical layer. Explain the benefits of building abstract layers in hierarchical fashion. Defend the need for APIs and middleware. Describe how computing resources are used by application software and managed by system software. Contrast kernel and user mode in an operating system. Discuss the advantages and disadvantages of using interrupt processing. Compare and contrast the various ways of structuring an operating system such as objectoriented, modular, micro-kernel, and layered. Explain the use of a device list and driver I/O queue.

OS3. Concurrency [core] Minimum core coverage time: 6 hours


http://cs.wwc.edu/~aabyan/CC2001/OS.html (2 de 7) [18/12/2001 10:42:01]

http://cs.wwc.edu/~aabyan/CC2001/OS.html

Topics:
q q q q q q q q q q

States and state diagrams Structures (ready list, process control blocks, and so forth) Dispatching and context switching The role of interrupts Concurrent execution: advantages and disadvantages The "mutual exclusion" problem and some solutions Deadlock: causes, conditions, prevention Models and mechanisms (semaphores, monitors, condition variables, rendezvous) Producer-consumer problems and synchronization Multiprocessor issues (spin-locks, reentrancy)

Learning objectives: 1. Describe the need for concurrency within the framework of an operating system. 2. Demonstrate the potential run-time problems arising from the concurrent operation of many separate tasks. 3. Summarize the range of mechanisms that can be employed at the operating system level to realize concurrent systems and describe the benefits of each. 4. Explain the different states that a task may pass through and the data structures needed to support the management of many tasks. 5. Summarize the various approaches to solving the problem of mutual exclusion in an operating system. 6. Describe reasons for using interrupts, dispatching, and context switching to support concurrency in an operating system. 7. Create state and transition diagrams for simple problem domains. 8. Discuss the utility of data structures, such as stacks and queues, in managing concurrency. 9. Explain conditions that lead to deadlock. OS4. Scheduling and dispatch [core] Minimum core coverage time: 3 hours Topics:
q q q q

Preemptive and nonpreemptive scheduling Schedulers and policies Processes and threads Deadlines and real-time issues

Learning objectives: 1. Compare and contrast the common algorithms used for both preemptive and non-preemptive
http://cs.wwc.edu/~aabyan/CC2001/OS.html (3 de 7) [18/12/2001 10:42:01]

http://cs.wwc.edu/~aabyan/CC2001/OS.html

2. 3. 4. 5. 6. 7.

scheduling of tasks in operating systems, such as priority, performance comparison, and fairshare schemes. Describe relationships between scheduling algorithms and application domains. Discuss the types of processor scheduling such as short-term, medium-term, long-term, and I/O. Describe the difference between processes and threads. Compare and contrast static and dynamic approaches to real-time scheduling. Discuss the need for preemption and deadline scheduling. Identify ways that the logic embodied in scheduling algorithms are applicable to other domains, such as disk I/O, network scheduling, project scheduling, and other problems unrelated to computing.

OS5. Memory management [core] Minimum core coverage time: 5 hours Topics:
q q q q q q

Review of physical memory and memory management hardware Overlays, swapping, and partitions Paging and segmentation Placement and replacement policies Working sets and thrashing Caching

Learning objectives: 1. 2. 3. 4. 5. 6. 7. 8. 9. Explain memory hierarchy and cost-performance tradeoffs. Explain the concept of virtual memory and how it is realized in hardware and software. Summarize the principles of virtual memory as applied to caching, paging, and segmentation. Evaluate the tradeoffs in terms of memory size (main memory, cache memory, auxiliary memory) and processor speed. Defend the different ways of allocating memory to tasks, citing the relative merits of each. Describe the reason for and use of cache memory. Compare and contrast paging and segmentation techniques. Discuss the concept of thrashing, both in terms of the reasons it occurs and the techniques used to recognize and manage the problem. Analyze the various memory portioning techniques including overlays, swapping, and placement and replacement policies.

OS6. Device management [elective] Topics:


q

Characteristics of serial and parallel devices

http://cs.wwc.edu/~aabyan/CC2001/OS.html (4 de 7) [18/12/2001 10:42:01]

http://cs.wwc.edu/~aabyan/CC2001/OS.html
q q q q

Abstracting device differences Buffering strategies Direct memory access Recovery from failures

Learning objectives: 1. Explain the key difference between serial and parallel devices and identify the conditions in which each is appropriate. 2. Identify the relationship between the physical hardware and the virtual devices maintained by the operating system. 3. Explain buffering and describe strategies for implementing it. 4. Differentiate the mechanisms used in interfacing a range of devices (including hand-held devices, networks, multimedia) to a computer and explain the implications of these for the design of an operating system. 5. Describe the advantages and disadvantages of direct memory access and discuss the circumstances in which its use is warranted. 6. Identify the requirements for failure recovery. 7. Implement a simple device driver for a range of possible devices. OS7. Security and protection [elective] Topics:
q q q q q q q q

Overview of system security Policy/mechanism separation Security methods and devices Protection, access, and authentication Models of protection Memory protection Encryption Recovery management

Learning objectives: 1. Defend the need for protection and security, and the role of ethical considerations in computer use. 2. Summarize the features and limitations of an operating system used to provide protection and security. 3. Compare and contrast current methods for implementing security. 4. Compare and contrast the strengths and weaknesses of two or more currently popular operating systems with respect to security. 5. Compare and contrast the security strengths and weaknesses of two or more currently popular operating systems with respect to recovery management.

http://cs.wwc.edu/~aabyan/CC2001/OS.html (5 de 7) [18/12/2001 10:42:01]

http://cs.wwc.edu/~aabyan/CC2001/OS.html

OS8. File systems [elective] Topics:


q q q q q q q

Files: data, metadata, operations, organization, buffering, sequential, nonsequential Directories: contents and structure File systems: partitioning, mount/unmount, virtual file systems Standard implementation techniques Memory-mapped files Special-purpose file systems Naming, searching, access, backups

Learning objectives: 1. Summarize the full range of considerations that support file systems. 2. Compare and contrast different approaches to file organization, recognizing the strengths and weaknesses of each. 3. Summarize how hardware developments have lead to changes in our priorities for the design and the management of file systems. OS9. Real-time and embedded systems [elective] Topics:
q q q q

Process and task scheduling Memory/disk management requirements in a real-time environment Failures, risks, and recovery Special concerns in real-time systems

Learning objectives: 1. Describe what makes a system a real-time system. 2. Explain the presence of and describe the characteristics of latency in real-time systems. 3. Summarize special concerns that real-time systems present and how these concerns are addressed. OS10. Fault tolerance [elective] Topics:
q q q q

Fundamental concepts: reliable and available systems Spatial and temporal redundancy Methods used to implement fault tolerance Examples of reliable systems

http://cs.wwc.edu/~aabyan/CC2001/OS.html (6 de 7) [18/12/2001 10:42:01]

http://cs.wwc.edu/~aabyan/CC2001/OS.html

Learning objectives: 1. Explain the relevance of the terms fault tolerance, reliability, and availability. 2. Outline the range of methods for implementing fault tolerance in an operating system. 3. Explain how an operating system can continue functioning after a fault occurs. OS11. System performance evaluation [elective] Topics:
q q q q q

Why system performance needs to be evaluated What is to be evaluated Policies for caching, paging, scheduling, memory management, security, and so forth Evaluation models: deterministic, analytic, simulation, or implementation-specific How to collect evaluation data (profiling and tracing mechanisms)

Learning objectives: 1. Describe the performance metrics used to determine how a system performs. 2. Explain the main evaluation models used to evaluate a system. OS12. Scripting [elective] Topics:
q q q q q

Scripting and the role of scripting languages Basic system commands Creating scripts, parameter passing Executing a script Influences of scripting on programming

Learning objectives: 1. Summarize a typical set of system commands provided by an operating system. 2. Demonstrate the typical functionality of a scripting language, and interpret the implications for programming. 3. Demonstrate the mechanisms for implementing scripts and the role of scripts on system implementation and integration. 4. Implement a simple script that exhibits parameter passing.

CC2001 Report December 15, 2001

http://cs.wwc.edu/~aabyan/CC2001/OS.html (7 de 7) [18/12/2001 10:42:01]

http://cs.wwc.edu/~aabyan/CC2001/NC.html

Net-Centric Computing (NC)


NC1. Introduction to net-centric computing [core] NC2. Communication and networking [core] NC3. Network security [core] NC4. The web as an example of client-server computing [core] NC5. Building web applications [elective] NC6. Network management [elective] NC7. Compression and decompression [elective] NC8. Multimedia data technologies [elective] NC9. Wireless and mobile computing [elective] Recent advances in computer and telecommunications networking, particularly those based on TCP/IP, have increased the importance of networking technologies in the computing discipline. Netcentric computing covers a range of sub-specialties including: computer communication network concepts and protocols, multimedia systems, Web standards and technologies, network security, wireless and mobile computing, and distributed systems. Mastery of this subject area involves both theory and practice. Learning experiences that involve hands-on experimentation and analysis are strongly recommended as they reinforce student understanding of concepts and their application to real-world problems. Laboratory experiments should involve data collection and synthesis, empirical modeling, protocol analysis at the source code level, network packet monitoring, software construction, and evaluation of alternative design models. All of these are important concepts that can best understood by laboratory experimentation. NC1. Introduction to net-centric computing [core] Minimum core coverage time: 2 hours Topics:
q q q

Background and history of networking and the Internet Network architectures The range of specializations within net-centric computing r Networks and protocols r Networked multimedia systems r Distributed computing r Mobile and wireless computing

Learning objectives: 1. Discuss the evolution of early networks and the Internet. 2. Demonstrate the ability to use effectively a range of common networked applications including e-mail, telnet, FTP, newsgroups, and web browsers, online web courses, and instant
http://cs.wwc.edu/~aabyan/CC2001/NC.html (1 de 6) [18/12/2001 10:42:03]

http://cs.wwc.edu/~aabyan/CC2001/NC.html

messaging. 3. Explain the hierarchical, layered structure of a typical network architecture. 4. Describe emerging technologies in the net-centric computing area and assess their current capabilities, limitations, and near-term potential. NC2. Communication and networking [core] Minimum core coverage time: 7 hours Topics:
q q q q q q q q

Network standards and standardization bodies The ISO 7-layer reference model in general and its instantiation in TCP/IP Circuit switching and packet switching Streams and datagrams Physical layer networking concepts (theoretical basis, transmission media, standards) Data link layer concepts (framing, error control, flow control, protocols) Internetworking and routing (routing algorithms, internetworking, congestion control) Transport layer services (connection establishment, performance issues)

Learning objectives: 1. Discuss important network standards in their historical context. 2. Describe the responsibilities of the first four layers of the ISO reference model. 3. Discuss the differences between circuit switching and packet switching along with the advantages and disadvantages of each. 4. Explain how a network can detect and correct transmission errors. 5. Illustrate how a packet is routed over the Internet. 6. Install a simple network with two clients and a single server using standard host-configuration software tools such as DHCP. NC3. Network security [core] Minimum core coverage time: 3 hours Topics:
q q q q q q

Fundamentals of cryptography Secret-key algorithms Public-key algorithms Authentication protocols Digital signatures Examples

Learning objectives:
http://cs.wwc.edu/~aabyan/CC2001/NC.html (2 de 6) [18/12/2001 10:42:03]

http://cs.wwc.edu/~aabyan/CC2001/NC.html

1. 2. 3. 4. 5.

Discuss the fundamental ideas of public-key cryptography. Describe how public-key cryptography works. Distinguish between the use of private- and public-key algorithms. Summarize common authentication protocols. Generate and distribute a PGP key pair and use the PGP package to send an encrypted e-mail message. 6. Summarize the capabilities and limitations of the means of cryptography that are conveniently available to the general public. NC4. The web as an example of client-server computing [core] Minimum core coverage time: 3 hours Topics:
q

q q q q q q

Web technologies r Server-side programs r Common gateway interface (CGI) programs r Client-side scripts r The applet concept Characteristics of web servers r Handling permissions r File management r Capabilities of common server architectures Role of client computers Nature of the client-server relationship Web protocols Support tools for web site creation and web management Developing Internet information servers Publishing information and applications

Learning objectives: 1. Explain the different roles and responsibilities of clients and servers for a range of possible applications. 2. Select a range of tools that will ensure an efficient approach to implementing various clientserver possibilities. 3. Design and build a simple interactive web-based application (e.g., a simple web form that collects information from the client and stores it in a file on the server). NC5. Building web applications [elective] Topics:

http://cs.wwc.edu/~aabyan/CC2001/NC.html (3 de 6) [18/12/2001 10:42:03]

http://cs.wwc.edu/~aabyan/CC2001/NC.html
q q q q q q q q q

Protocols at the application layer Principles of web engineering Database-driven web sites Remote procedure calls (RPC) Lightweight distributed objects The role of middleware Support tools Security issues in distributed object systems Enterprise-wide web-based applications

Learning objectives: 1. Illustrate how interactive client-server web applications of medium size can be built using different types of Web technologies. 2. Demonstrate how to implement a database-driven web site, explaining the relevant technologies involved in each tier of the architecture and the accompanying performance tradeoffs. 3. Implement a distributed system using any two distributed object frameworks and compare them with regard to performance and security issues. 4. Discuss security issues and strategies in an enterprise-wide web-based application. NC6. Network management [elective] Topics:
q q q q q q

Overview of the issues of network management Use of passwords and access control mechanisms Domain names and name services Issues for Internet service providers (ISPs) Security issues and firewalls Quality of service issues: performance, failure recovery

Learning objectives: 1. Explain the issues for network management arising from a range of security threats, including viruses, worms, Trojan horses, and denial-of-service attacks 2. Summarize the strengths and weaknesses associated with different approaches to security. 3. Develop a strategy for ensuring appropriate levels of security in a system designed for a particular purpose. 4. Implement a network firewall. NC7. Compression and decompression [elective] Topics:

http://cs.wwc.edu/~aabyan/CC2001/NC.html (4 de 6) [18/12/2001 10:42:03]

http://cs.wwc.edu/~aabyan/CC2001/NC.html
q q q q q q q q

Analog and digital representations Encoding and decoding algorithms Lossless and lossy compression Data compression: Huffman coding and the Ziv-Lempel algorithm Audio compression and decompression Image compression and decompression Video compression and decompression Performance issues: timing, compression factor, suitability for real-time use

Learning objectives: 1. Summarize the basic characteristics of sampling and quantization for digital representation. 2. Select, giving reasons that are sensitive to the specific application and particular circumstances, the most appropriate compression techniques for text, audio, image, and video information. 3. Explain the asymmetric property of compression and decompression algorithms. 4. Illustrate the concept of run-length encoding. 5. Illustrate how a program like the UNIX compress utility, which uses Huffman coding and the Ziv-Lempel algorithm, would compress a typical text file. NC8. Multimedia data technologies [elective] Topics:
q q q q q q q q

Sound and audio, image and graphics, animation and video Multimedia standards (audio, music, graphics, image, telephony, video, TV) Capacity planning and performance issues Input and output devices (scanners, digital camera, touch-screens, voice-activated) MIDI keyboards, synthesizers Storage standards (Magneto Optical disk, CD-ROM, DVD) Multimedia servers and file systems Tools to support multimedia development

Learning objectives: 1. For each of several media or multimedia standards, describe in non-technical language what the standard calls for, and explain how aspects of human perception might be sensitive to the limitations of that standard. 2. Evaluate the potential of a computer system to host one of a range of possible multimedia applications, including an assessment of the requirements of multimedia systems on the underlying networking technology. 3. Describe the characteristics of a computer system (including identification of support tools and appropriate standards) that has to host the implementation of one of a range of possible multimedia applications. 4. Implement a multimedia application of modest size.
http://cs.wwc.edu/~aabyan/CC2001/NC.html (5 de 6) [18/12/2001 10:42:03]

http://cs.wwc.edu/~aabyan/CC2001/NC.html

NC9. Wireless and mobile computing [elective] Topics:


q q q q q q q q q q q q

Overview of the history, evolution, and compatibility of wireless standards The special problems of wireless and mobile computing Wireless local area networks and satellite-based networks Wireless local loops Mobile Internet protocol Mobile aware adaption Extending the client-server model to accommodate mobility Mobile data access: server data dissemination and client cache management Software package support for mobile and wireless computing The role of middleware and support tools Performance issues Emerging technologies

Learning objectives: 1. Describe the main characteristics of mobile IP and explain how differs from IP with regard to mobility management and location management as well as performance. 2. Illustrate (with home agents and foreign agents) how e-mail and other traffic is routed using mobile IP. 3. Implement a simple application that relies on mobile and wireless data communications. 4. Describe areas of current and emerging interest in wireless and mobile computing, and assess the current capabilities, limitations, and near-term potential of each.

CC2001 Report December 15, 2001

http://cs.wwc.edu/~aabyan/CC2001/NC.html (6 de 6) [18/12/2001 10:42:03]

http://cs.wwc.edu/~aabyan/CC2001/PL.html

Programming Languages (PL)


PL1. Overview of programming languages [core] PL2. Virtual machines [core] PL3. Introduction to language translation [core] PL4. Declarations and types [core] PL5. Abstraction mechanisms [core] PL6. Object-oriented programming [core] PL7. Functional programming [elective] PL8. Language translation systems [elective] PL9. Type systems [elective] PL10. Programming language semantics [elective] PL11. Programming language design [elective] A programming language is a programmer's principal interface with the computer. More than just knowing how to program in a single language, programmers need to understand the different styles of programming promoted by different languages. In their professional life, they will be working with many different languages and styles at once, and will encounter many different languages over the course of their careers. Understanding the variety of programming languages and the design tradeoffs between the different programming paradigms makes it much easier to master new languages quickly. Understanding the pragmatic aspects of programming languages also requires a basic knowledge of programming language translation and runtime features such as storage allocation. PL1. Overview of programming languages [core] Minimum core coverage time: 2 hours Topics:
q q

History of programming languages Brief survey of programming paradigms r Procedural languages r Object-oriented languages r Functional languages r Declarative, non-algorithmic languages r Scripting languages The effects of scale on programming methodology

Learning objectives: 1. Summarize the evolution of programming languages illustrating how this history has led to the paradigms available today. 2. Identify at least one distinguishing characteristic for each of the programming paradigms

http://cs.wwc.edu/~aabyan/CC2001/PL.html (1 de 7) [18/12/2001 10:42:06]

http://cs.wwc.edu/~aabyan/CC2001/PL.html

covered in this unit. 3. Evaluate the tradeoffs between the different paradigms, considering such issues as space efficiency, time efficiency (of both the computer and the programmer), safety, and power of expression. 4. Distinguish between programming-in-the-small and programming-in-the-large. PL2. Virtual machines [core] Minimum core coverage time: 1 hour Topics:
q q q q

The concept of a virtual machine Hierarchy of virtual machines Intermediate languages Security issues arising from running code on an alien machine

Learning objectives: 1. 2. 3. 4. Describe the importance and power of abstraction in the context of virtual machines. Explain the benefits of intermediate languages in the compilation process. Evaluate the tradeoffs in performance vs. portability. Explain how executable programs can breach computer system security by accessing disk files and memory.

PL3. Introduction to language translation [core] Minimum core coverage time: 2 hours Topics:
q q q

Comparison of interpreters and compilers Language translation phases (lexical analysis, parsing, code generation, optimization) Machine-dependent and machine-independent aspects of translation

Learning objectives: 1. Compare and contrast compiled and interpreted execution models, outlining the relative merits of each.. 2. Describe the phases of program translation from source code to executable code and the files produced by these phases. 3. Explain the differences between machine-dependent and machine-independent translation and where these differences are evident in the translation process.

http://cs.wwc.edu/~aabyan/CC2001/PL.html (2 de 7) [18/12/2001 10:42:06]

http://cs.wwc.edu/~aabyan/CC2001/PL.html

PL4. Declarations and types [core] Minimum core coverage time: 3 hours Topics:
q q q q

The conception of types as a set of values with together with a set of operations Declaration models (binding, visibility, scope, and lifetime) Overview of type-checking Garbage collection

Learning objectives: 1. Explain the value of declaration models, especially with respect to programming-in-the-large. 2. Identify and describe the properties of a variable such as its associated address, value, scope, persistence, and size. 3. Discuss type incompatibility. 4. Demonstrate different forms of binding, visibility, scoping, and lifetime management. 5. Defend the importance of types and type-checking in providing abstraction and safety. 6. Evaluate tradeoffs in lifetime management (reference counting vs. garbage collection). PL5. Abstraction mechanisms [core] Minimum core coverage time: 3 hours Topics:
q q q q q

Procedures, functions, and iterators as abstraction mechanisms Parameterization mechanisms (reference vs. value) Activation records and storage management Type parameters and parameterized types Modules in programming languages

Learning objectives: 1. 2. 3. 4. Explain how abstraction mechanisms support the creation of reusable software components. Demonstrate the difference between call-by-value and call-by-reference parameter passing. Defend the importance of abstractions, especially with respect to programming-in-the-large. Describe how the computer system uses activation records to manage program modules and their data.

PL6. Object-oriented programming [core] Minimum core coverage time: 10 hours

http://cs.wwc.edu/~aabyan/CC2001/PL.html (3 de 7) [18/12/2001 10:42:06]

http://cs.wwc.edu/~aabyan/CC2001/PL.html

Topics:
q q q q q q q q q

Object-oriented design Encapsulation and information-hiding Separation of behavior and implementation Classes and subclasses Inheritance (overriding, dynamic dispatch) Polymorphism (subtype polymorphism vs. inheritance) Class hierarchies Collection classes and iteration protocols Internal representations of objects and method tables

Learning objectives: 1. Justify the philosophy of object-oriented design and the concepts of encapsulation, abstraction, inheritance, and polymorphism. 2. Design, implement, test, and debug simple programs in an object-oriented programming language. 3. Describe how the class mechanism supports encapsulation and information hiding. 4. Design, implement, and test the implementation of "is-a" relationships among objects using a class hierarchy and inheritance. 5. Compare and contrast the notions of overloading and overriding methods in an object-oriented language. 6. Explain the relationship between the static structure of the class and the dynamic structure of the instances of the class. 7. Describe how iterators access the elements of a container. PL7. Functional programming [elective] Topics:
q q q q q

Overview and motivation of functional languages Recursion over lists, natural numbers, trees, and other recursively-defined data Pragmatics (debugging by divide and conquer; persistency of data structures) Amortized efficiency for functional data structures Closures and uses of functions as data (infinite sets, streams)

Learning objectives: 1. Outline the strengths and weaknesses of the functional programming paradigm. 2. Design, code, test, and debug programs using the functional paradigm. 3. Explain the use of functions as data, including the concept of closures. PL8. Language translation systems [elective]

http://cs.wwc.edu/~aabyan/CC2001/PL.html (4 de 7) [18/12/2001 10:42:06]

http://cs.wwc.edu/~aabyan/CC2001/PL.html

Topics:
q q q q q q q q q q

Application of regular expressions in lexical scanners Parsing (concrete and abstract syntax, abstract syntax trees) Application of context-free grammars in table-driven and recursive-descent parsing Symbol table management Code generation by tree walking Architecture-specific operations: instruction selection and register allocation Optimization techniques The use of tools in support of the translation process and the advantages thereof Program libraries and separate compilation Building syntax-directed tools

Learning objectives: 1. Describe the steps and algorithms used by language translators. 2. Recognize the underlying formal models such as finite state automata, push-down automata and their connection to language definition through regular expressions and grammars. 3. Discuss the effectiveness of optimization. 4. Explain the impact of a separate compilation facility and the existence of program libraries on the compilation process. PL9. Type systems [elective] Topics:
q q

q q

q q q

Data type as set of values with set of operations Data types r Elementary types r Product and coproduct types r Algebraic types r Recursive types r Arrow (function) types r Parameterized types Type-checking models Semantic models of user-defined types r Type abbreviations r Abstract data types r Type equality Parametric polymorphism Subtype polymorphism Type-checking algorithms

Learning objectives:

http://cs.wwc.edu/~aabyan/CC2001/PL.html (5 de 7) [18/12/2001 10:42:06]

http://cs.wwc.edu/~aabyan/CC2001/PL.html

1. 2. 3. 4. 5. 6. 7.

Formalize the notion of typing. Describe each of the elementary data types. Explain the concept of an abstract data type. Recognize the importance of typing for abstraction and safety. Differentiate between static and dynamic typing. Differentiate between type declarations and type inference. Evaluate languages with regard to typing.

PL10. Programming language semantics [elective] Topics:


q q q q q

Informal semantics Overview of formal semantics Denotational semantics Axiomatic semantics Operational semantics

Learning objectives: 1. 2. 3. 4. Explain the importance of formal semantics. Differentiate between formal and informal semantics. Describe the different approaches to formal semantics. Evaluate the different approaches to formal semantics.

PL11. Programming language design [elective] Topics:


q q q q q q

General principles of language design Design goals Typing regimes Data structure models Control structure models Abstraction mechanisms

Learning objectives: 1. Evaluate the impact of different typing regimes on language design, language usage, and the translation process. 2. Explain the role of different abstraction mechanisms in the creation of user-defined facilities.

http://cs.wwc.edu/~aabyan/CC2001/PL.html (6 de 7) [18/12/2001 10:42:06]

http://cs.wwc.edu/~aabyan/CC2001/PL.html

CC2001 Report December 15, 2001

http://cs.wwc.edu/~aabyan/CC2001/PL.html (7 de 7) [18/12/2001 10:42:06]

http://cs.wwc.edu/~aabyan/CC2001/IM.html

Information Management (IM)


IM1. Information models and systems [core] IM2. Database systems [core] IM3. Data modeling [core] IM4. Relational databases [elective] IM5. Database query languages [elective] IM6. Relational database design [elective] IM7. Transaction processing [elective] IM8. Distributed databases [elective] IM9. Physical database design [elective] IM10. Data mining [elective] IM11. Information storage and retrieval [elective] IM12. Hypertext and hypermedia [elective] IM13. Multimedia information and systems [elective] IM14. Digital libraries [elective] Information Management (IM) plays a critical role in almost all areas where computers are used. This area includes the capture, digitization, representation, organization, transformation, and presentation of information; algorithms for efficient and effective access and updating of stored information, data modeling and abstraction, and physical file storage techniques. It also encompasses information security, privacy, integrity, and protection in a shared environment. The student needs to be able to develop conceptual and physical data models, determine what IM methods and techniques are appropriate for a given problem, and be able to select and implement an appropriate IM solution that reflects all suitable constraints, including scalability and usability. IM1. Information models and systems [core] Minimum core coverage time: 3 hours Topics:
q q q q q q q q

History and motivation for information systems Information storage and retrieval (IS&R) Information management applications Information capture and representation Analysis and indexing Search, retrieval, linking, navigation Information privacy, integrity, security, and preservation Scalability, efficiency, and effectiveness

Learning objectives:

http://cs.wwc.edu/~aabyan/CC2001/IM.html (1 de 9) [18/12/2001 10:42:08]

http://cs.wwc.edu/~aabyan/CC2001/IM.html

1. Compare and contrast information with data and knowledge. 2. Summarize the evolution of information systems from early visions up through modern offerings, distinguishing their respective capabilities and future potential. 3. Critique/defend a small- to medium-size information application with regard to its satisfying real user information needs. 4. Describe several technical solutions to the problems related to information privacy, integrity, security, and preservation. 5. Explain measures of efficiency (throughput, response time) and effectiveness (recall, precision). 6. Describe approaches to ensure that information systems can scale from the individual to the global. IM2. Database systems [core] Minimum core coverage time: 3 hours Topics:
q q q q q

History and motivation for database systems Components of database systems DBMS functions Database architecture and data independence Use of a database query language

Learning objectives: 1. Explain the characteristics that distinguish the database approach from the traditional approach of programming with data files. 2. Cite the basic goals, functions, models, components, applications, and social impact of database systems. 3. Describe the components of a database system and give examples of their use. 4. Identify major DBMS functions and describe their role in a database system. 5. Explain the concept of data independence and its importance in a database system. 6. Use a query language to elicit information from a database. IM3. Data modeling [core] Minimum core coverage time: 4 hours Topics:
q q q q

Data modeling Conceptual models (including entity-relationship and UML) Object-oriented model Relational data model

http://cs.wwc.edu/~aabyan/CC2001/IM.html (2 de 9) [18/12/2001 10:42:08]

http://cs.wwc.edu/~aabyan/CC2001/IM.html

Learning objectives: 1. Categorize data models based on the types of concepts that they provide to describe the database structure -- that is, conceptual data model, physical data model, and representational data model. 2. Describe the modeling concepts and notation of the entity-relationship model and UML, including their use in data modeling. 3. Describe the main concepts of the OO model such as object identity, type constructors, encapsulation, inheritance, polymorphism, and versioning. 4. Define the fundamental terminology used in the relational data model . 5. Describe the basic principles of the relational data model. 6. Illustrate the modeling concepts and notation of the relational data model. IM4. Relational databases [elective] Topics:
q q q

Mapping conceptual schema to a relational schema Entity and referential integrity Relational algebra and relational calculus

Learning objectives: 1. Prepare a relational schema from a conceptual model developed using the entity-relationship model 2. Explain and demonstrate the concepts of entity integrity constraint and referential integrity constraint (including definition of the concept of a foreign key). 3. Demonstrate use of the relational algebra operations from mathematical set theory (union, intersection, difference, and cartesian product) and the relational algebra operations developed specifically for relational databases (select, product, join, and division). 4. Demonstrate queries in the relational algebra. 5. Demonstrate queries in the tuple relational calculus. IM5. Database query languages [elective] Topics:
q q q q q q

Overview of database languages SQL (data definition, query formulation, update sublanguage, constraints, integrity) Query optimization QBE and 4th-generation environments Embedding non-procedural queries in a procedural language Introduction to Object Query Language

http://cs.wwc.edu/~aabyan/CC2001/IM.html (3 de 9) [18/12/2001 10:42:08]

http://cs.wwc.edu/~aabyan/CC2001/IM.html

Learning objectives: 1. Create a relational database schema in SQL that incorporates key, entity integrity, and referential integrity constraints. 2. Demonstrate data definition in SQL and retrieving information from a database using the SQL SELECT statement. 3. Evaluate a set of query processing strategies and select the optimal strategy. 4. Create a non-procedural query by filling in templates of relations to construct an example of the desired query result. 5. Embed object-oriented queries into a stand-alone language such as C++ or Java (e.g., SELECT Col.Method() FROM Object). IM6. Relational database design [elective] Topics:
q q q q q q

Database design Functional dependency Normal forms (1NF, 2NF, 3NF, BCNF) Multivalued dependency (4NF) Join dependency (PJNF, 5NF) Representation theory

Learning objectives: 1. Determine the functional dependency between two or more attributes that are a subset of a relation. 2. Describe what is meant by 1NF, 2NF, 3NF, and BCNF. 3. Identify whether a relation is in 1NF, 2NF, 3NF, or BCNF. 4. Normalize a 1NF relation into a set of 3NF (or BCNF) relations and denormalize a relational schema. 5. Explain the impact of normalization on the efficiency of database operations, especially query optimization. 6. Describe what is a multivalued dependency and what type of constraints it specifies. 7. Explain why 4NF is useful in schema design. IM7. Transaction processing [elective] Topics:
q q q

Transactions Failure and recovery Concurrency control

Learning objectives:
http://cs.wwc.edu/~aabyan/CC2001/IM.html (4 de 9) [18/12/2001 10:42:08]

http://cs.wwc.edu/~aabyan/CC2001/IM.html

1. 2. 3. 4. 5. 6.

Create a transaction by embedding SQL into an application program. Explain the concept of implicit commits. Describe the issues specific to efficient transaction execution. Explain when and why rollback is needed and how logging assures proper rollback. Explain the effect of different isolation levels on the concurrency control mechanisms. Choose the proper isolation level for implementing a specified transaction protocol.

IM8. Distributed databases [elective] Topics:


q q q q q q

Distributed data storage Distributed query processing Distributed transaction model Concurrency control Homogeneous and heterogeneous solutions Client-server

Learning objectives: 1. Explain the techniques used for data fragmentation, replication, and allocation during the distributed database design process. 2. Evaluate simple strategies for executing a distributed query to select the strategy that minimizes the amount of data transfer. 3. Explain how the two-phase commit protocol is used to deal with committing a transaction that accesses databases stored on multiple nodes. 4. Describe distributed concurrency control based on the distinguished copy techniques and the voting method. 5. Describe the three levels of software in the client-server model. IM9. Physical database design [elective] Topics:
q q q q q q q q

Storage and file structure Indexed files Hashed files Signature files B-trees Files with dense index Files with variable length records Database efficiency and tuning

Learning objectives:
http://cs.wwc.edu/~aabyan/CC2001/IM.html (5 de 9) [18/12/2001 10:42:08]

http://cs.wwc.edu/~aabyan/CC2001/IM.html

1. Explain the concepts of records, record types, and files, as well as the different techniques for placing file records on disk. 2. Give examples of the application of primary, secondary, and clustering indexes. 3. Distinguish between a nondense index and a dense index. 4. Implement dynamic multilevel indexes using B-trees. 5. Explain the theory and application of internal and external hashing techniques. 6. Use hashing to facilitate dynamic file expansion. 7. Describe the relationships among hashing, compression, and efficient database searches. 8. Evaluate costs and benefits of various hashing schemes. 9. Explain how physical database design affects database transaction efficiency. IM10. Data mining [elective] Topics:
q q q q q q

The usefulness of data mining Associative and sequential patterns Data clustering Market basket analysis Data cleaning Data visualization

Learning objectives: 1. Compare and contrast different conceptions of data mining as evidenced in both research and application. 2. Explain the role of finding associations in commercial market basket data. 3. Characterize the kinds of patterns that can be discovered by association rule mining. 4. Describe how to extend a relational system to find patterns using association rules. 5. Evaluate methodological issues underlying the effective application of data mining. 6. Identify and characterize sources of noise, redundancy, and outliers in presented data. 7. Identify mechanisms (on-line aggregation, anytime behavior, interactive visualization) to close the loop in the data mining process. 8. Describe why the various close-the-loop processes improve the effectiveness of data mining. IM11. Information storage and retrieval [elective] Topics:
q q q q q

Characters, strings, coding, text Documents, electronic publishing, markup, and markup languages Tries, inverted files, PAT trees, signature files, indexing Morphological analysis, stemming, phrases, stop lists Term frequency distributions, uncertainty, fuzziness, weighting

http://cs.wwc.edu/~aabyan/CC2001/IM.html (6 de 9) [18/12/2001 10:42:08]

http://cs.wwc.edu/~aabyan/CC2001/IM.html
q q q q q q q q q

Vector space, probabilistic, logical, and advanced models Information needs, relevance, evaluation, effectiveness Thesauri, ontologies, classification and categorization, metadata Bibliographic information, bibliometrics, citations Routing and (community) filtering Search and search strategy, information seeking behavior, user modeling, feedback Information summarization and visualization Integration of citation, keyword, classification scheme, and other terms Protocols and systems (including Z39.50, OPACs, WWW engines, research systems)

Learning objectives: 1. Explain basic information storage and retrieval concepts. 2. Describe what issues are specific to efficient information retrieval. 3. Give applications of alternative search strategies and explain why the particular search strategy is appropriate for the application. 4. Perform Internet-based research. 5. Design and implement a small to medium size information storage and retrieval system. IM12. Hypertext and hypermedia [elective] Topics:
q q q q q q q q q

Hypertext models (early history, web, Dexter, Amsterdam, HyTime) Link services, engines, and (distributed) hypertext architectures Nodes, composites, and anchors Dimensions, units, locations, spans Browsing, navigation, views, zooming Automatic link generation Presentation, transformations, synchronization Authoring, reading, and annotation Protocols and systems (including web, HTTP)

Learning objectives: 1. Summarize the evolution of hypertext and hypermedia models from early versions up through current offerings, distinguishing their respective capabilities and limitations. 2. Explain basic hypertext and hypermedia concepts. 3. Demonstrate a fundamental understanding of information presentation, transformation, and synchronization. 4. Compare and contrast hypermedia delivery based on protocols and systems used. 5. Design and implement web-enabled information retrieval applications using appropriate authoring tools. IM13. Multimedia information and systems [elective]
http://cs.wwc.edu/~aabyan/CC2001/IM.html (7 de 9) [18/12/2001 10:42:08]

http://cs.wwc.edu/~aabyan/CC2001/IM.html

Topics:
q q q q q q

Devices, device drivers, control signals and protocols, DSPs Applications, media editors, authoring systems, and authoring Streams/structures, capture/represent/transform, spaces/domains, compression/coding Content-based analysis, indexing, and retrieval of audio, images, and video Presentation, rendering, synchronization, multi-modal integration/interfaces Real-time delivery, quality of service, audio/video conferencing, video-on-demand

Learning objectives: 1. Describe the media and supporting devices commonly associated with multimedia information and systems. 2. Explain basic multimedia presentation concepts. 3. Demonstrate the use of content-based information analysis in a multimedia information system. 4. Critique multimedia presentations in terms of their appropriate use of audio, video, graphics, color, and other information presentation concepts. 5. Implement a multimedia application using a commercial authoring system. IM14. Digital libraries [elective] Topics:
q q q q q q q q q

Digitization, storage, and interchange Digital objects, composites, and packages Metadata, cataloging, author submission Naming, repositories, archives Spaces (conceptual, geographical, 2/3D, VR) Architectures (agents, buses, wrappers/mediators), interoperability Services (searching, linking, browsing, and so forth) Intellectual property rights management, privacy, protection (watermarking) Archiving and preservation, integrity

Learning objectives: 1. Explain the underlying technical concepts in building a digital library. 2. Describe the basic service requirements for searching, linking, and browsing. 3. Critique scenarios involving appropriate and inappropriate use of a digital library, and determine the social, legal, and economic consequences for each scenario. 4. Describe some of the technical solutions to the problems related to archiving and preserving information in a digital library. 5. Design and implement a small digital library.

http://cs.wwc.edu/~aabyan/CC2001/IM.html (8 de 9) [18/12/2001 10:42:08]

http://cs.wwc.edu/~aabyan/CC2001/IM.html

CC2001 Report December 15, 2001

http://cs.wwc.edu/~aabyan/CC2001/IM.html (9 de 9) [18/12/2001 10:42:08]

http://cs.wwc.edu/~aabyan/CC2001/SP.html

Social and Professional Issues (SP)


SP1. History of computing [core] SP2. Social context of computing [core] SP3. Methods and tools of analysis [core] SP4. Professional and ethical responsibilities [core] SP5. Risks and liabilities of computer-based systems [core] SP6. Intellectual property [core] SP7. Privacy and civil liberties [core] SP8. Computer crime [elective] SP9. Economic issues in computing [elective] SP10. Philosophical frameworks [elective] Although technical issues are obviously central to any computing curriculum, they do not by themselves constitute a complete educational program in the field. Students must also develop an understanding of the social and professional context in which computing is done. This need to incorporate the study of social issues into the curriculum was recognized in the following excerpt from Computing Curricula 1991 [Tucker91]: Undergraduates also need to understand the basic cultural, social, legal, and ethical issues inherent in the discipline of computing. They should understand where the discipline has been, where it is, and where it is heading. They should also understand their individual roles in this process, as well as appreciate the philosophical questions, technical problems, and aesthetic values that play an important part in the development of the discipline. Students also need to develop the ability to ask serious questions about the social impact of computing and to evaluate proposed answers to those questions. Future practitioners must be able to anticipate the impact of introducing a given product into a given environment. Will that product enhance or degrade the quality of life? What will the impact be upon individuals, groups, and institutions? Finally, students need to be aware of the basic legal rights of software and hardware vendors and users, and they also need to appreciate the ethical values that are the basis for those rights. Future practitioners must understand the responsibility that they will bear, and the possible consequences of failure. They must understand their own limitations as well as the limitations of their tools. All practitioners must make a longterm commitment to remaining current in their chosen specialties and in the discipline of computing as a whole. The material in this knowledge area is best covered through a combination of one required course along with short modules in other courses. On the one hand, some units listed as core -- in particular, SP2, SP3, SP4, and SP6 -- do not readily lend themselves to being covered in other traditional
http://cs.wwc.edu/~aabyan/CC2001/SP.html (1 de 7) [18/12/2001 10:42:11]

http://cs.wwc.edu/~aabyan/CC2001/SP.html

courses. Without a standalone course, it is difficult to cover these topics appropriately. On the other hand, if ethical considerations are covered only in the standalone course and not "in context," it will reinforce the false notion that technical processes are void of ethical issues. Thus it is important that several traditional courses include modules that analyze ethical considerations in the context of the technical subject matter of the course. Courses in areas such as software engineering, databases, computer networks, and introduction to computing provide obvious context for analysis of ethical issues. However, an ethics-related module could be developed for almost any course in the curriculum. It would be explicitly against the spirit of the recommendations to have only a standalone course. Running through all of the issues in this area is the need to speak to the computer practitioner's responsibility to proactively address these issues by both moral and technical actions. The ethical issues discussed in any class should be directly related to and arise naturally from the subject matter of that class. Examples include a discussion in the database course of data aggregation or data mining, or a discussion in the software engineering course of the potential conflicts between obligations to the customer and obligations to the user and others affected by their work. Programming assignments built around applications such as controlling the movement of a laser during eye surgery can help to address the professional, ethical and social impacts of computing. There is an unresolved pedagogical conflict between having the core course at the lower (freshmansophomore) level versus the upper (junior-senior) level. Having the course at the lower level 1. Allows for coverage of methods and tools of analysis (SP3) prior to analyzing ethical issues in the context of different technical areas 2. Assures that students who drop out early to enter the workforce will still be introduced to some professional and ethical issues. On the other hand, placing the course too early may lead to the following problems: 1. Lower-level students may not have the technical knowledge and intellectual maturity to support in-depth ethical analysis. Without basic understanding of technical alternatives, it is difficult to consider their ethical implications. 2. Students need a certain level of maturity and sophistication to appreciate the background and issues involved. For that reason, students should have completed at least the discrete mathematics course and the second computer science course. Also, if students take a technical writing course, it should be a prerequisite or corequisite for the required course in the SP area. 3. Some programs may wish to use the course as a "capstone" experience for seniors. Although items SP2 and SP3 are listed with a number of hours associated, they are fundamental to all the other topics. Thus, when covering the other areas, instructors should continually be aware of the social context issues and the ethical analysis skills. In practice, this means that the topics in SP2 and SP3 will be continually reinforced as the material in the other areas is covered. SP1. History of computing [core] Minimum core coverage time: 1 hour
http://cs.wwc.edu/~aabyan/CC2001/SP.html (2 de 7) [18/12/2001 10:42:11]

http://cs.wwc.edu/~aabyan/CC2001/SP.html

Topics:
q q q

Prehistory -- the world before 1946 History of computer hardware, software, networking Pioneers of computing

Learning objectives: 1. List the contributions of several pioneers in the computing field. 2. Compare daily life before and after the advent of personal computers and the Internet. 3. Identify significant continuing trends in the history of the computing field. SP2. Social context of computing [core] Minimum core coverage time: 3 hours Topics:
q q q q q

Introduction to the social implications of computing Social implications of networked communication Growth of, control of, and access to the Internet Gender-related issues International issues

Learning objectives: 1. 2. 3. 4. Interpret the social context of a particular implementation. Identify assumptions and values embedded in a particular design. Evaluate a particular implementation through the use of empirical data. Describe positive and negative ways in which computing alters the modes of interaction between people. 5. Explain why computing/network access is restricted in some countries. SP3. Methods and tools of analysis [core] Minimum core coverage time: 2 hours Topics:
q q q q

Making and evaluating ethical arguments Identifying and evaluating ethical choices Understanding the social context of design Identifying assumptions and values

http://cs.wwc.edu/~aabyan/CC2001/SP.html (3 de 7) [18/12/2001 10:42:11]

http://cs.wwc.edu/~aabyan/CC2001/SP.html

Learning objectives: 1. 2. 3. 4. 5. Analyze an argument to identify premises and conclusion. Illustrate the use of example, analogy, and counter-analogy in ethical argument. Detect use of basic logical fallacies in an argument. Identify stakeholders in an issue and our obligations to them. Articulate the ethical tradeoffs in a technical decision.

SP4. Professional and ethical responsibilities [core] Minimum core coverage time: 3 hours Topics:
q q q q q q q q q

Community values and the laws by which we live The nature of professionalism Various forms of professional credentialing and the advantages and disadvantages The role of the professional in public policy Maintaining awareness of consequences Ethical dissent and whistle-blowing Codes of ethics, conduct, and practice (IEEE, ACM, SE, AITP, and so forth) Dealing with harassment and discrimination "Acceptable use" policies for computing in the workplace

Learning objectives: 1. Identify progressive stages in a whistle-blowing incident. 2. Specify the strengths and weaknesses of relevant professional codes as expressions of professionalism and guides to decision-making. 3. Identify ethical issues that arise in software development and determine how to address them technically and ethically. 4. Develop a computer use policy with enforcement measures. 5. Analyze a global computing issue, observing the role of professionals and government officials in managing the problem. 6. Evaluate the professional codes of ethics from the ACM, the IEEE Computer Society, and other organizations. SP5. Risks and liabilities of computer-based systems [core] Minimum core coverage time: 2 hours Topics:
q

Historical examples of software risks (such as the Therac-25 case)

http://cs.wwc.edu/~aabyan/CC2001/SP.html (4 de 7) [18/12/2001 10:42:11]

http://cs.wwc.edu/~aabyan/CC2001/SP.html
q q

Implications of software complexity Risk assessment and management

Learning objectives: 1. 2. 3. 4. Explain the limitations of testing as a means to ensure correctness. Describe the differences between correctness, reliability, and safety. Discuss the potential for hidden problems in reuse of existing components. Describe current approaches to managing risk, and characterize the strengths and shortcomings of each.

SP6. Intellectual property [core] Minimum core coverage time: 3 hours Topics:
q q q q q

Foundations of intellectual property Copyrights, patents, and trade secrets Software piracy Software patents Transnational issues concerning intellectual property

Learning objectives: 1. 2. 3. 4. 5. Distinguish among patent, copyright, and trade secret protection. Discuss the legal background of copyright in national and international law. Explain how patent and copyright laws may vary internationally. Outline the historical development of software patents. Discuss the consequences of software piracy on software developers and the role of relevant enforcement organizations.

SP7. Privacy and civil liberties [core] Minimum core coverage time: 2 hours Topics:
q q q q q

Ethical and legal basis for privacy protection Privacy implications of massive database systems Technological strategies for privacy protection Freedom of expression in cyberspace International and intercultural implications

http://cs.wwc.edu/~aabyan/CC2001/SP.html (5 de 7) [18/12/2001 10:42:11]

http://cs.wwc.edu/~aabyan/CC2001/SP.html

Learning objectives: 1. Summarize the legal bases for the right to privacy and freedom of expression in one's own nation and how those concepts vary from country to country. 2. Describe current computer-based threats to privacy. 3. Explain how the Internet may change the historical balance in protecting freedom of expression. 4. Explain both the disadvantages and advantages of free expression in cyberspace. 5. Describe trends in privacy protection as exemplified in technology. SP8. Computer crime [elective] Topics:
q q q q

History and examples of computer crime "Cracking" ("hacking") and its effects Viruses, worms, and Trojan horses Crime prevention strategies

Learning objectives: 1. 2. 3. 4. Outline the technical basis of viruses and denial-of-service attacks. Enumerate techniques to combat "cracker" attacks. Discuss several different "cracker" approaches and motivations. Identify the professional's role in security and the tradeoffs involved.

SP9. Economic issues in computing [elective] Topics:


q q q q

Monopolies and their economic implications Effect of skilled labor supply and demand on the quality of computing products Pricing strategies in the computing domain Differences in access to computing resources and the possible effects thereof

Learning objectives: 1. Summarize the rationale for antimonopoly efforts. 2. Describe several ways in which the information technology industry is affected by shortages in the labor supply. 3. Suggest and defend ways to address limitations on access to computing. 4. Outline the evolution of pricing strategies for computing goods and services. SP10. Philosophical frameworks [elective]

http://cs.wwc.edu/~aabyan/CC2001/SP.html (6 de 7) [18/12/2001 10:42:11]

http://cs.wwc.edu/~aabyan/CC2001/SP.html

Topics:
q q q q

Philosophical frameworks, particularly utilitarianism and deontological theories Problems of ethical relativism Scientific ethics in historical perspective Differences in scientific and philosophical approaches

Learning objectives: 1. Summarize the basic concepts of relativism, utilitarianism, and deontological theories. 2. Recognize the distinction between ethical theory and professional ethics. 3. Identify the weaknesses of the "hired agent" approach, strict legalism, nave egoism, and nave relativism as ethical frameworks.

CC2001 Report December 15, 2001

http://cs.wwc.edu/~aabyan/CC2001/SP.html (7 de 7) [18/12/2001 10:42:11]

http://cs.wwc.edu/~aabyan/CC2001/SE.html

Software Engineering (SE)


SE1. Software design [core] SE2. Using APIs [core] SE3. Software tools and environments [core] SE4. Software processes [core] SE5. Software requirements and specifications [core] SE6. Software validation [core] SE7. Software evolution [core] SE8. Software project management [core] SE9. Component-based computing [elective] SE10. Formal methods [elective] SE11. Software reliability [elective] SE12. Specialized systems development [elective] Software engineering is the discipline concerned with the application of theory, knowledge, and practice for effectively and efficiently building software systems that satisfy the requirements of users and customers. Software engineering is applicable to small, medium, and large-scale systems. It encompasses all phases of the life cycle of a software system. The life cycle includes requirement analysis and specification, design, construction, testing, and operation and maintenance. Software engineering employs engineering methods, processes, techniques, and measurement. It benefits from the use of tools for managing software development; analyzing and modeling software artifacts; assessing and controlling quality; and for ensuring a disciplined, controlled approach to software evolution and reuse. Software development, which can involve an individual developer or a team of developers, requires choosing the tools, methods, and approaches that are most applicable for a given development environment. The elements of software engineering are applicable to the development of software in any computing application domain where professionalism, quality, schedule, and cost are important in producing a software system. SE1. Software design [core] Minimum core coverage time: 8 hours Topics:
q q q q q

Fundamental design concepts and principles Design patterns Software architecture Structured design Object-oriented analysis and design

http://cs.wwc.edu/~aabyan/CC2001/SE.html (1 de 8) [18/12/2001 10:42:14]

http://cs.wwc.edu/~aabyan/CC2001/SE.html
q q

Component-level design Design for reuse

Learning objectives: 1. 2. 3. 4. 5. Discuss the properties of good software design. Compare and contrast object-oriented analysis and design with structured analysis and design. Evaluate the quality of multiple software designs based on key design principles and concepts. Select and apply appropriate design patterns in the construction of a software application. Create and specify the software design for a medium-size software product using a software requirement specification, an accepted program design methodology (e.g., structured or objectoriented), and appropriate design notation. 6. Conduct a software design review using appropriate guidelines. 7. Evaluate a software design at the component level. 8. Evaluate a software design from the perspective of reuse. SE2. Using APIs [core] Minimum core coverage time: 5 hours Topics:
q q q q q

API programming Class browsers and related tools Programming by example Debugging in the API environment Introduction to component-based computing

Learning objectives: 1. Explain the value of application programming interfaces (APIs) in software development. 2. Use class browsers and related tools during the development of applications using APIs. 3. Design, implement, test, and debug programs that use large-scale API packages. SE3. Software tools and environments [core] Minimum core coverage time: 3 hours Topics:
q q q q q

Programming environments Requirements analysis and design modeling tools Testing tools Configuration management tools Tool integration mechanisms

http://cs.wwc.edu/~aabyan/CC2001/SE.html (2 de 8) [18/12/2001 10:42:14]

http://cs.wwc.edu/~aabyan/CC2001/SE.html

Learning objectives: 1. Select, with justification, an appropriate set of tools to support the development of a range of software products. 2. Analyze and evaluate a set of tools in a given area of software development (e.g., management, modeling, or testing). 3. Demonstrate the capability to use a range of software tools in support of the development of a software product of medium size. SE4. Software processes [core] Minimum core coverage time: 2 hours Topics:
q q q

Software life-cycle and process models Process assessment models Software process metrics

Learning objectives: 1. Explain the software life cycle and its phases including the deliverables that are produced. 2. Select, with justification the software development models most appropriate for the development and maintenance of a diverse range of software products. 3. Explain the role of process maturity models. 4. Compare the traditional waterfall model to the incremental model, the object-oriented model, and other apropriate models. 5. For each of various software project scenarios, describe the project's place in the software life cycle, identify the particular tasks that should be performed next, and identify metrics appropriate to those tasks. SE5. Software requirements and specifications [core] Minimum core coverage time: 4 hours Topics:
q q q q q

Requirements elicitation Requirements analysis modeling techniques Functional and nonfunctional requirements Prototyping Basic concepts of formal specification techniques

http://cs.wwc.edu/~aabyan/CC2001/SE.html (3 de 8) [18/12/2001 10:42:14]

http://cs.wwc.edu/~aabyan/CC2001/SE.html

Learning objectives: 1. Apply key elements and common methods for elicitation and analysis to produce a set of software requirements for a medium-sized software system. 2. Discuss the challenges of maintaining legacy software. 3. Use a common, non-formal method to model and specify (in the form of a requirements specification document) the requirements for a medium-size software system. 4. Conduct a review of a software requirements document using best practices to determine the quality of the document. 5. Translate into natural language a software requirements specification written in a commonly used formal specification language. SE6. Software validation [core] Minimum core coverage time: 3 hours Topics:
q q q q q q

Validation planning Testing fundamentals, including test plan creation and test case generation Black-box and white-box testing techniques Unit, integration, validation, and system testing Object-oriented testing Inspections

Learning objectives: 1. Distinguish between program validation and verification. 2. Describe the role that tools can play in the validation of software. 3. Distinguish between the different types and levels of testing (unit, integration, systems, and acceptance) for medium-size software products. 4. Create, evaluate, and implement a test plan for a medium-size code segment. 5. Undertake, as part of a team activity, an inspection of a medium-size code segment. 6. Discuss the issues involving the testing of object-oriented software. SE7. Software evolution [core] Minimum core coverage time: 3 hours Topics:
q q q q

Software maintenance Characteristics of maintainable software Reengineering Legacy systems

http://cs.wwc.edu/~aabyan/CC2001/SE.html (4 de 8) [18/12/2001 10:42:14]

http://cs.wwc.edu/~aabyan/CC2001/SE.html
q

Software reuse

Learning objectives: 1. Identify the principal issues associated with software evolution and explain their impact on the software life cycle. 2. Discuss the challenges of maintaining legacy systems and the need for reverse engineering. 3. Outline the process of regression testing and its role in release management. 4. Estimate the impact of a change request to an existing product of medium size. 5. Develop a plan for re-engineering a medium-sized product in response to a change request. 6. Discuss the advantages and disadvantages of software reuse. 7. Exploit opportunities for software reuse in a given context. SE8. Software project management [core] Minimum core coverage time: 3 hours Topics:
q

q q q q q q

Team management r Team processes r Team organization and decision-making r Roles and responsibilities in a software team r Role identification and assignment r Project tracking r Team problem resolution Project scheduling Software measurement and estimation techniques Risk analysis Software quality assurance Software configuration management Project management tools

Learning objectives: 1. Demonstrate through involvement in a team project the central elements of team building and team management. 2. Prepare a project plan for a software project that includes estimates of size and effort, a schedule, resource allocation, configuration control, change management, and project risk identification and management. 3. Compare and contrast the different methods and techniques used to assure the quality of a software product. SE9. Component-based computing [elective]

http://cs.wwc.edu/~aabyan/CC2001/SE.html (5 de 8) [18/12/2001 10:42:14]

http://cs.wwc.edu/~aabyan/CC2001/SE.html

Topics:
q

q q q q q

Fundamentals r The definition and nature of components r Components and interfaces r Interfaces as contracts r The benefits of components Basic techniques r Component design and assembly r Relationship with the client-server model and with patterns r Use of objects and object lifecycle services r Use of object brokers r Marshalling Applications (including the use of mobile components) Architecture of component-based systems Component-oriented design Event handling: detection, notification, and response Middleware r The object-oriented paradigm within middleware r Object request brokers r Transaction processing monitors r Workflow systems r State-of-the-art tools

Learning objectives: 1. 2. 3. 4. 5. Explain and apply recognized principles to the building of high-quality software components. Discuss and select an architecture for a component-based system suitable for a given scenario. Identify the kind of event handling implemented in one or more given APIs. Explain the role of objects in middleware systems and the relationship with components. Apply component-oriented approaches to the design of a range of software including those required for concurrency and transactions, reliable communication services, database interaction including services for remote query and database management, secure communication and access.

SE10. Formal methods [elective] Topics:


q q q q q

Formal methods concepts Formal specification languages Executable and non-executable specifications Pre and post assertions Formal verification

http://cs.wwc.edu/~aabyan/CC2001/SE.html (6 de 8) [18/12/2001 10:42:14]

http://cs.wwc.edu/~aabyan/CC2001/SE.html

Learning objectives: 1. Apply formal verification techniques to software segments with low complexity. 2. Discuss the role of formal verification techniques in the context of software validation and testing. 3. Explain the potential benefits and drawbacks of using formal specification languages. 4. Create and evaluate pre- and post-assertions for a variety of situations ranging from simple through complex. 5. Using a common formal specification language, formulate the specification of a simple software system and demonstrate the benefits from a quality perspective. SE11. Software reliability [elective] Topics:
q q q q

Software reliability models Redundancy and fault tolerance Defect classification Probabilistic methods of analysis

Learning objectives: 1. Demonstrate the ability to apply multiple methods to develop reliability estimates for a software system. 2. Identify and apply redundancy and fault tolerance for a medium-sized application. 3. Explain the problems that exist in achieving very high levels of reliability. 4. Identify methods that will lead to the realization of a software architecture that achieves a specified reliability level. SE12. Specialized systems development [elective] Topics:
q q q q q q

Real-time systems Client-server systems Distributed systems Parallel systems Web-based systems High-integrity systems

Learning objectives: 1. Identify and discuss different specialized systems. 2. Discuss life cycle and software process issues in the context of software systems designed for a specialized context.
http://cs.wwc.edu/~aabyan/CC2001/SE.html (7 de 8) [18/12/2001 10:42:14]

http://cs.wwc.edu/~aabyan/CC2001/SE.html

3. Select, with appropriate justification, approaches that will result in the efficient and effective development and maintenance of specialized software systems. 4. Given a specific context and a set of related professional issues, discuss how a software engineer involved in the development of specialized systems should respond to those issues. 5. Outline the central technical issues associated with the implementation of specialized systems development.

CC2001 Report December 15, 2001

http://cs.wwc.edu/~aabyan/CC2001/SE.html (8 de 8) [18/12/2001 10:42:14]

http://cs.wwc.edu/~aabyan/CC2001/CN.html

Computational Science and Numerical Methods (CN)


CN1. Numerical analysis [elective] CN2. Operations research [elective] CN3. Modeling and simulation [elective] CN4. High-performance computing [elective] From the earliest days of the discipline, numerical methods and the techniques of scientific computing have constituted a major area of computer science research. As computers increase in their problemsolving power, this area -- like much of the discipline -- has grown in both breadth and importance. At the end of the millennium, scientific computing stands as an intellectual discipline in its own right, closely related to but nonetheless distinct from computer science. Although courses in numerical methods and scientific computing are extremely valuable components of an undergraduate program in computer science, the CC2001 Task Force believes that none of the topics in this area represent core knowledge. From our surveys of curricula and interaction with the computer science education community, we are convinced no consensus exists that this material is essential for all CS undergraduates. It remains a vital part of the discipline, but need not be a part of every program. For those who choose to pursue it, this area offers exposure to many valuable ideas and techniques, including precision of numerical representation, error analysis, numerical techniques, parallel architectures and algorithms, modeling and simulation, and scientific visualization. At the same time, students who take courses in this area have an opportunity to apply these techniques in a wide range of application areas, such as the following:
q q q q q q q q q q

Molecular dynamics Fluid dynamics Celestial mechanics Economic forecasting Optimization problems Structural analysis of materials Bioinformatics Computational biology Geologic modeling Computerized tomography

Each of the units in this area corresponds to a full-semester course at most institutions. The level of specification of the topic descriptions and the learning objectives is therefore different from that used in other areas in which the individual units typically require smaller blocks of time. CN1. Numerical analysis [elective] Topics:
http://cs.wwc.edu/~aabyan/CC2001/CN.html (1 de 4) [18/12/2001 10:42:16]

http://cs.wwc.edu/~aabyan/CC2001/CN.html

q q q q q q q q q q

Floating-point arithmetic Error, stability, convergence Taylor's series Iterative solutions for finding roots (Newton's Method) Curve fitting; function approximation Numerical differentiation and integration (Simpson's Rule) Explicit and implicit methods Differential equations (Euler's Method) Linear algebra Finite differences

Learning objectives: 1. Compare and contrast the numerical analysis techniques presented in this unit. 2. Define error, stability, machine precision concepts. and the inexactness of computational approximations. 3. Identify the sources of inexactness in computational approximations. 4. Design, code, test, and debug programs that implement numerical methods. CN2. Operations research [elective] Topics:
q

q q

q q q

q q q

Linear programming r Integer programming r The Simplex method Probablistic modeling Queueing theory r Petri nets r Markov models and chains Optimization Network analysis and routing algorithms Prediction and estimation r Decision analysis r Forecasting r Risk management r Econometrics, microeconomics r Sensitivity analysis Dynamic programming Sample applications Software tools

Learning objectives: 1. Apply the fundamental techniques of operations research.


http://cs.wwc.edu/~aabyan/CC2001/CN.html (2 de 4) [18/12/2001 10:42:16]

http://cs.wwc.edu/~aabyan/CC2001/CN.html

2. Describe several established techniques for prediction and estimation. 3. Design, code, test, and debug application programs to solve problems in the domain of operations research. CN3. Modeling and simulation [elective] Topics:
q

q q

Random numbers r Pseudorandom number generation and testing r Monte Carlo methods r Introduction to distribution functions Simulation modeling r Discrete-event simulation r Continuous simulation Verification and validation of simulation models r Input analysis r Output analysis Queueing theory models Sample applications

Learning objectives: 1. 2. 3. 4. Discuss the fundamental concepts of computer simulation. Evaluate models for computer simulation. Compare and contrast methods for random number generation. Design, code, test, and debug simulation programs.

CN4. High-performance computing [elective] Topics:


q

Introduction to high-performance computing r History and importance of computational science r Overview of application areas r Review of required skills High-performance computing r Processor architectures r Memory systems for high performance r Input/output devices r Pipelining r Parallel languages and architectures Scientific visualization r Presentation of results r Data formats

http://cs.wwc.edu/~aabyan/CC2001/CN.html (3 de 4) [18/12/2001 10:42:16]

http://cs.wwc.edu/~aabyan/CC2001/CN.html

Visualization tools and packages Sample problems r Ocean and atmosphere models r Seismic wave propagation r N-body systems (the Barnes-Hut algorithm) r Chemical reactions r Phase transitions r Fluid flow
r

Learning objectives: 1. Recognize problem areas where computational modeling enhances current research methods. 2. Compare and contrast architectures for scientific and parallel computing, recognizing the strengths and weaknesses of each. 3. Implement simple performance measurements for high-performance systems. 4. Design, code, test, and debug programs using techniques of numerical analysis, computer simulation, and scientific visualization.

CC2001 Report December 15, 2001

http://cs.wwc.edu/~aabyan/CC2001/CN.html (4 de 4) [18/12/2001 10:42:16]

KU-Book

Knowledge Units for Computer Science


Computing Curricula 1991 see Computing Curricula 2001

Contents
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. Algorithms Architecture Artificial Intelligence Database Human Computer Interaction Numerical and Symbolic Computing Operating Systems Programming Languages Software Engineering Social and Professional Issues Programming Language

Cognates
1. Mathematics 2. Science 3. Logic

Advanced Topics

Last update: Send comments to: [email protected]

http://cs.wwc.edu/~aabyan/KU/ [18/12/2001 10:42:18]

http://cs.wwc.edu/~aabyan/KU/AL.html

AL: Algorithms and Data Structures


There are approximately 47 hours of lectures recommended for this set of knowledge units. The knowledge units in the common requirements for the subject area of Algorithms and Data Structures emphasize the following topics: basic data structures, abstract data types, recursive algorithms, complexity analysis, sorting and searching, computability and undecidability, problemsolving strategies, and parallel and distributed algorithms. 1. 2. 3. 4. 5. 6. 7. 8. 9. AL1: Basic Data Structures AL2: Abstract Data Types AL3: Recursive Algorithms AL4: Complexity Analysis AL5: Complexity Classes AL6: Sorting and Searching AL7: Computability and Undecidability AL8: Problem-Solving Strategies AL9: Parallel and Distributed Algorithms

\input{AL/Handouts/ADTs}

Last update: Send comments to: [email protected]

http://cs.wwc.edu/~aabyan/KU/AL.html [18/12/2001 10:42:19]

http://cs.wwc.edu/~aabyan/KU/AR.html

AR: Architecture
There are approximately 59 hours of lectures recommended for this set of knowledge units The knowledge units in the common requirements for the subject area of Architecture emphasize the following topics: digital logic, digital systems, machine level representation of data, assembly level machine organization, memory system organization and architecture, interfacing and communication, and alternative architectures

Sections
1. 2. 3. 4. 5. 6. 7. AR1 AR2 AR3 AR4 AR5 AR6 AR7

Last update: Send comments to: [email protected]

http://cs.wwc.edu/~aabyan/KU/AR.html [18/12/2001 10:42:20]

http://cs.wwc.edu/~aabyan/KU/AI.html

AI: Artificial Intelligence and Robotics


There are approximately nine hours of lectures recommended for this set of knowledge units. The knowledge units in the common requirements for the subject area of Artificial Intelligence and Robotics emphasize the following topics history and applications of artificial intelligence; problems, state spaces and search strategies. While this coverage is minimal, it does provide a sufficient introduction to artificial intelligence that will allow students to decide whether or not to pursue further studies in this area. 1. AI1: History and Applications of AI 2. AI2: Problems, State Spaces, and Search Strategies AI1 Lecture Notes

Last update: Send comments to: [email protected]

http://cs.wwc.edu/~aabyan/KU/AI.html [18/12/2001 10:42:21]

http://cs.wwc.edu/~aabyan/KU/DB.html

DB: Database and Information Retrieval


There are approximately nine hours of lectures recommended for this set of knowledge units. The knowledge units in the common requirements for the subject area of Database and Information Retrieval emphasize the following topics overview and applications of database systems, conceptual modeling, and the relational data model. 1. DB1: Overview, Models, and Applications of Database Systems 2. DB2: The Relational Data Model

Lecture notes

Last update: Send comments to: [email protected]

http://cs.wwc.edu/~aabyan/KU/DB.html [18/12/2001 10:42:23]

http://cs.wwc.edu/~aabyan/KU/HU.html

HU: Human-Computer Communication


There are approximately eight hours of lectures recommended for this set of knowledge units. The knowledge units in the common requirement for the subject area of Human Computer Communication are directed toward providing the student with knowledge of user interfaces and fundamentals of computer graphics. The following topics are emphasized: input/output devices, use and construction of interfaces, and basic graphics concepts. Since students will gain significant experience with a variety of computing systems and their user interfaces throughout their education, HU knowledge units do not cover this subject area extensively. 1. HU1 2. HU2

Last update: Send comments to: [email protected]

http://cs.wwc.edu/~aabyan/KU/HU.html [18/12/2001 10:42:24]

http://cs.wwc.edu/~aabyan/KU/NU.html

NU: Numerical and Symbolic Computing


There are approximately seven hours of lectures recommended for this set of knowledge units. The knowledge units in the common requirements for the subject area of Numerical and Symbolic Computation emphasize the following topics: number representation errors, portability, and iterative approximation methods. While this coverage is surely minimal, many additional topics in the Numerical and Symbolic Computation subject area will naturally occur in other parts of the curriculum, especially in mathematics. 1. NU1 2. NU2

Last update: Send comments to: [email protected]

http://cs.wwc.edu/~aabyan/KU/NU.html [18/12/2001 10:42:25]

http://cs.wwc.edu/~aabyan/KU/OS.html

OS: Operating Systems


There are approximately 31 hours of lectures recommended for this set of knowledge units. The knowledge units in the common requirements for the subject area of Operating Systems emphasize the following topics history, evolution, and philosophies; tasking and processes; process coordination and synchronization; scheduling and dispatch; physical and virtual memory organization; device management; file systems and naming; security and protection; communications and networking; distributed operating systems; and real-time concerns. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. OS1: History, Evolution, and Philosophy OS2: Tasking and Processes OS3: Process Coordination and Synchronization OS4: Scheduling and Dispatch OS5: Physical and Virtual Memory Organization OS6: Device Management OS7: File Systems and Naming OS8: Security and Protection OS9: Communications and Networking OS10: Distributed and Real-time Systems

Last update: Send comments to: [email protected]

http://cs.wwc.edu/~aabyan/KU/OS.html [18/12/2001 10:42:26]

http://cs.wwc.edu/~aabyan/KU/PL.html

Programming Languages
There are approximately, 46 hours of lectures recommended for this set of knowledge units. The knowledge units in the common requirements for the subject area of Programming Languages emphasize the following topics: history; virtual machines; representation of data types; sequence control; data control, sharing, and type checking; run-time storage management; finite state automata and regular expressions; context-free grammars and pushdown automata; language translation systems; semantics; programming paradigms; and distributed and parallel programming constructs. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. PL1: History and Overview PL2: Virtual Machines PL3: Representation of Data Types PL4: Sequence Control PL5: Data Control, Sharing, and Type Checking PL6: Run-time Storage Management PL7: Finite State Automata and Regular Expressions PL8: Context-free Grammars and Pushdown Automata PL9: Language Translation Systems PL10: Programming Language Semantics PL11: Programming Paradigms PL12: Distributed and Parallel Programming Constructs

Last update: Send comments to: [email protected]

http://cs.wwc.edu/~aabyan/KU/PL.html [18/12/2001 10:42:28]

http://cs.wwc.edu/~aabyan/KU/SE.html

SE: Software Methodology and Engineering


There are approximately 44 hours of lectures recommended for this set of knowledge units. The knowledge units in the common requirements for the subject area of Software Methodology and Engineering emphasize the following topics: fundamental problem solving concepts, the software development process, Software specifications, software design and implementation, verification, and validation. 1. 2. 3. 4. 5. SE1: Fundamental Problem-Solving Concepts SE2: The Software Development Process SE3: Software Requirements and Specifications SE4: Software Design and Implementation SE5: Verification and Validation

Last update: Send comments to: [email protected]

http://cs.wwc.edu/~aabyan/KU/SE.html [18/12/2001 10:42:29]

Socal and Professional Issues

SP: Social, Ethical, and Professional Issues


There are approximately 11 hours of lectures recommended for this set of knowledge units. The knowledge units in the common requirements for the subject area of Social and Ethical Issues emphasize the following topics: historical and social context, professional responsibilities, risks and liabilities, and intellectual property. Note: While there are no laboratories listed for knowledge units SP1-SP4, the following kinds of activities should accompany their coverage in a course of instruction: 1. Write a short expository paper, with references, that demonstrates understanding of the historical or social context of some specific aspect of computing (e.g., computers in medicine, computerization and work, information access and privacy, public interest in computer records, the societal role of research). 2. Write a short paper, with references, that discusses an incidence of misuse of computers or information technology 3. Discuss particular aspects of professionalism in a seminar setting. Draw conclusions about ethical and societal dimensions of the profession. 4. Write or discuss a short paper discussing methods of risk assessment and reduction, and their role in the design process. 5. Present a case study in copyright or patent violation as a seminar discussion, with an accompanying writing assignment that demonstrates student understanding of the principles.

Sections
1. 2. 3. 4. SP1 SP2 SP3 SP4

Resources 1. SPA's Competition Principles 2. SP/ICCPE

Last update: Send comments to: [email protected]

http://cs.wwc.edu/~aabyan/KU/SP.html [18/12/2001 10:42:30]

http://cs.wwc.edu/~aabyan/KU/PR.html

PR: Introduction to a Programming Language


An introduction to the syntactic and execution characteristics of a modern programming language, along with its use in the construction and execution of complete programs that solve simple algorithmic problems. Recurring Concepts: conceptual and formal models, efficiency, evolution, reuse, trade-offs and consequences. Lecture Topics: (12 hours minimum) 1. 2. 3. 4. 5. 6. 7. Basic type declarations (e.g., integer, real, boolean, char, string) Arithmetic operators and assignment Conditional statements Loops and recursion Procedures, functions, and parameters Array; and records Overall program structure

Suggested Laboratories: (open or closed) Students should develop and run three or four programs that solve elementary algorithmic problems. Experience with compiling, finding and correcting syntax errors, and executing programs will be gained. Connections:
q q q

Related to: SE1 Prerequisites: Requisite for: Generic Language Description Fortran Godel Haskell Pascal Prolog Scheme SML

q q q q q q q q

Last update: Send comments to: [email protected]


http://cs.wwc.edu/~aabyan/KU/PR.html [18/12/2001 10:42:32]

Mathematics for CS Majors

Mathematics
The following documents use MathML Amaya is an appropriate bowser. Notation Define:y = 3x+4 Identical:A=B Congruent: different names Similar:

Discrete Mathematics
q

Functions, Relations and Sets r Functions (surjections, injections, inverses, composition) r Relations (reflexivity, symmetry, transitivity, equivalence relations) r Sets (Venn diagrams, complements, Cartesian products, power sets) r Pigeonhole principle r Cardinality and countability Basic logic r Propositional logic r Logical connectives r Truth tables r Normal forms (conjunctive and disjunctive) r Validity r Predicate logic r Universal and existential quantification r Modus ponens and modus tollens r Limitations of predicate logic Proof techniques r Notions of implication, converse, inverse, contrapositive, negation, and contradiction r The structure of formal proofs r Direct proofs r Proof by counterexample r Proof by contraposition r Proof by contradiction r Mathematical induction r Strong induction r Recursive mathematical definitions r Well orderings Basics of counting

http://cs.wwc.edu/~aabyan/KU/Math/ (1 de 3) [18/12/2001 10:42:39]

Mathematics for CS Majors

Counting arguments r The pigeonhole principle r Permutations and combinations r Solving recurrence relations (common examples, the Master Theorem) Graphs and Trees r Undirected graphs r Directed graphs r Trees r Spanning trees r Traversal strategies Discrete Probability r Finite probability space, probability measure, events r Conditional probability, independence, Bayes' rule r Integer random variables, expectation
r

Additional material
q

q q

Mathematical logic -- propositional and predicate logic possibly modal & non-monotonic logics r Proof theory (syntax) s Operators: not, and, or, if, iff, All x, Exists x. s Normal forms: conjunctive, disjunctive, prenex s Inference rules s Consistency, soundness, completeness s Analytic tableau r Model theory (semantics) s truth tables s Herbrand semantics r Proof/disproof Techniques s Proof by induction s basis, induction step, inductive assumption s induction on number of elements, length of formulae... s Proof by contradiction s Counter example Algebra (Many sorted) -- used for the specification of ADTs r Domains r Semantic functions r Semantic equations/axioms Elementary combinatorics including graph theory and counting arguments Elementary discrete mathematics including number theory, discrete probability, recurrence relations

Probability and Statistics


q

Discrete Probability

http://cs.wwc.edu/~aabyan/KU/Math/ (2 de 3) [18/12/2001 10:42:39]

Mathematics for CS Majors


q

Statistics

Additional Mathematics
q q q q

Calculus Linear Algebra Number theory Symbolic Logic

Computational Science and Numerical Methods (CN)


q

q q q

CN1. Numerical analysis r Floating-point arithmetic r Error, stability, convergence r Taylor's series r Iterative solutions for finding roots (Newton's Method) r Curve fitting; function approximation r Numerical differentiation and integration (Simpson's Rule) r Explicit and implicit methods r Differential equations (Euler's Method) r Linear algebra r Finite differences r Note: Old stuff to be integrated s Computer arithmetic, including number representations, roundoff, overflow and underflow s Classical numerical algorithms s Iterative approximation methods Operations Research Modeling and simulation High-performance computing

Copyright 1998 Walla Walla College -- All rights reserved

Maintained by WWC CS Department

Last Modified
Send comments to [email protected]

http://cs.wwc.edu/~aabyan/KU/Math/ (3 de 3) [18/12/2001 10:42:39]

http://cs.wwc.edu/~aabyan/KU/Science.html

Science
Physics The scientific method
Research loop
q q q

observe (data collection and analysis) theorize (synthesis) test (experiment/validate)

Copyright 1997 Walla Walla College -- All rights reserved Maintained by WWC CS Department

Last Modified
Send comments to [email protected]

http://cs.wwc.edu/~aabyan/KU/Science.html [18/12/2001 10:42:40]

http://cs.wwc.edu/~aabyan/KU/AdvTopics.html

Details of the Advanced Supplemental Material


The following descriptions are intended to give detailed guidance for the design of advanced and supplemental courses in certain topic areas of the discipline. Each one contains a topic summary, an overview of laboratory work (if appropriate), and the prerequisites from the common requirements and other subjects that should precede advanced/supplemental study of the topic. (Recall from section 8 that these descriptions cover only 11 of the 28 advanced and supplemental topics that were listed there. Advanced and supplemental courses for the remaining topic areas in that list can also be offered in undergraduate programs.)

Advanced Operating Systems -- 4 Advanced Software Engineering -- 4


Topic Summary: This topic area is devoted to methods and tools that increase the quality and decrease the cost of developing and maintaining complex software systems. It includes activities that cover the whole spectrum of the software development life cycle. Subtopics include process and life-cycle models; specification methods notations, and tools; Validation and Verification; debugging and program understanding; quality assurance; testing paradigms (i.e., unit, regression); testing strategies (e.g., white box, functional); metrics; tools (CASE); prototyping; Version control; configuration Management; end-user considerations; standards and international issues; documentation; maintenance; reuse; safety; reliability; portability; and project organization (e.g., cost estimates schedules, economic models. Suggested Laboratories: A software design and implementation project, preferably done as a group project, is an effective laboratory component of this topic area. Possible projects might include analysis specification and high-level design; modifying and updating an existing piece of software; testing and integrating separate components; or doing a full design and implementation task. Students should also see and use a variety of contemporary software design tools Prerequisites: AL1, AL2, NU1, PL1-PL6, PL11, SE (all), SP2-SP4, Discrete Mathematics

Analysis of Algorithms -- 4 Artificial Intelligence -- 4


Topic Summary: A selective survey of key concepts and applications of artificial intelligence and an in-depth experience with a language commonly used for building AI systems (e.g. Lisp or Prolog). Subtopics include knowledge representation, state space/searching, heuristic search, expert systems, expert system shells, natural language processing, propositional logic, learning and cognitive models, and vision.
http://cs.wwc.edu/~aabyan/KU/AdvTopics.html (1 de 7) [18/12/2001 10:42:46]

http://cs.wwc.edu/~aabyan/KU/AdvTopics.html

Suggested Laboratories: Students will implement, modify, or enhance several AI systems using an AI language and associated tool (e.g., expert system shells, knowledge acquisition tools). Prerequisite: AL1-AL3, AI1, AI2, PL11, SE1, SE2, Discrete Mathematics.

Combinatorial and Graph Algorithms -- 4 Computational Complexity -- 4 Computer Communication Networks -- 4


Topic Summary: This topic gives students a foundation in the study of computer networks. Current methods and practices in the use of computer networks to enable communication are covered. Also covered are the physical and architectural elements and information layers of a communication network, along with diagnostic, design, operational, and performance measurement tools that are used to implement, operate, and tune such a network. Different network architectures are contrasted, and compared with traditional mainframe and time-shared computer models Important subtopics include network architecture and communication protocols, network elements, data link, switching and routing, end-to-end protocols, LANs, and data security. Suggested Laboratories: Case studies of existing network architectures and protocols (e.g., Ethernet, Wangnet, and FDDI) provide valuable laboratory work. Hardware communication devices and performance measurement tools should also be used in directed laboratory exercises. Prerequisite: Significant coverage of the common requirements in the AR area (i.e., AR5-AR7), the OS area (i.e., OS3, OS4, OS7-OS11), and the PL area (i.e., PL5, PL6, PL12).

Computer Graphics -- 4
Topic Summary: An overview of the principles and methodologies of computer graphics, including the representation, manipulation, and display of two- and three-dimensional objects. Subtopics include characteristics of display devices (e.g., raster, vector); representing primitive objects (lines, curves, surfaces) and composite objects; two- and three-dimensional transformations (translation, rotations, scaling); hidden lines and surfaces; shading and coloring; interactive graphics and the user interface; animation techniques. Suggested Laboratories: Students Should have access to a suite of graphics software tools and a high quality color display. Exercises will provide experience with the design, implementation, and evaluation of programs that manipulate and display graphic objects.

http://cs.wwc.edu/~aabyan/KU/AdvTopics.html (2 de 7) [18/12/2001 10:42:46]

http://cs.wwc.edu/~aabyan/KU/AdvTopics.html

Prerequisites: HU2, SE1, SE2, Calculus, Linear Algebra, Discrete Mathematics.

Computer Human Interface -- 4 Computer Security -- 4


Topic Summary: This area addresses the problem of how to secure computer systems, networks, and data from unauthorized or accidental access, modification, and denial of service. Courses designed for this area will draw material from the following subtopics: formal definitions of security, privacy, and integrity; risk assessment and management; information theory; information flow and covert channels; coding and cryptography. Additional subtopics Include: authentication methods; capabilities, access lists, and protection demoralize; standards; malicious software (e.g., viruses, logic bombs); audit and control methods; legal factory; database and inference control; security kernals; and verification methods. Suggested Laboratories: None specifically recommended; however, this area it especially well-suited to the use of case studies to reinforce various principles covered above. Prerequisites: AL4, AL5, AL7, DB (all), OS (all), SE5, SP3, Calculus, Linear Algebra.

Database and Information Retrieval -- 4


Topic Summary: This topic in includes the material normally found in a first course in database systems, as well as several advanced subtopics. Basic coverage includes data models (E-R, relational, and object-oriented); query languages (relational algebra, relational calculus); the data dictionary, implementation of a relational database kernel; and case studies of commercial database languages and systems. Additional subtopics Include: query optimization; theory of normal form and database design; transaction processing, concurrency control, and recovery from failure; security and integrity; distributed database systems; language paradigms and database languages; user interfaces and graphical query languages; advanced study of physical database organization; emerging database technologies (e.g., hypertext and knowledge-based systems); and logic as a data model. Suggested Laboratories: Open and closed laboratories can be assigned for students to gain experience with relational database kernel implementation using an imperative language (e.g. C++ or Ada), and with implementing parts of a particular database management system. Other similar labs can be designed to cover various other subtopics listed above. Prerequisites: DB1-DB2, HU1, OS7-OS10, SE1, SE2, Discrete Mathematics.

Digital Design Automation -- 4


http://cs.wwc.edu/~aabyan/KU/AdvTopics.html (3 de 7) [18/12/2001 10:42:46]

http://cs.wwc.edu/~aabyan/KU/AdvTopics.html

Fault-tolerant computing -- 4 Information Theory -- 4 Modeling and Simulation -- 4 Numerical Computation -- 4 Parallel and Distributed Computing -- 4
Topic Summary: This topic involves the design, structure, and use of systems having interacting processors. It includes concepts from most of the nine subject areas of the discipline of computing. Concepts from AL, PL, AR, OS, and SE are important for the basic support of parallel and distributed systems, while concepts from NU, DB, Al, and HU are important in many applications. Subtopics include concurrency and synchronization; architectural support; programming language constructs for parallel computing; parallel algorithms and computability; messages vs. remote procedure calls vs. shared memory models, structural alternatives (e.g., master-slave, client-server, fully distributed, cooperating objects); coupling (tight vs. loose); naming and winding; verification, validation, and maintenance issues; fault tolerance and reliability; replication and avoidability; security; standards and protocol; temporal concerns (persistence, serializability); data coherence; load balancing and scheduling; appropriate applications. Suggested Laboratories: Programming assignments should ideally be developed on a multiprocessor or simulated parallel processing architecture. Prerequisites: AL9, AR6, AR7, OS (all), PL11, PL12, SE3, SE5.

Performance Prediction and Analysis -- 4 Principles of Computer Architecture -- 4 Principles of Programming Languages -- 4 Programming Language Translation -- 4
Topic Summary: This topic is an in depth study of the principles and design aspects of programming language translation. The major components of a compiler are discussed; lexical analysis, syntactic analysis, type checking, code generation, and optimization. Alternative parsing strategies (e.g., topdown, LR, recursive descent) are presented and compared with respect to space and time tradeoffs.

http://cs.wwc.edu/~aabyan/KU/AdvTopics.html (4 de 7) [18/12/2001 10:42:46]

http://cs.wwc.edu/~aabyan/KU/AdvTopics.html

Subtopics include ambiguity, data representation, recovery, symbol table design, binding, compiler generation tools (e.g., LEX and YACC), syntax directed editors, linkers, loaders, incremental compiling, and interpreters. Suggested Laboratories: Laboratory exercises will assist students in reinforcing concepts by designing and implementing components of a compiler for a small but representative language. Alternative parsing strategies will be implemented and their performance compared. Laboratory work for this course is well suited to team projects. Prerequisites: AR3, AR4, PL2-PL10, SE2. \section{Attribute Grammars and Static Semantics} Context-free grammars are not able to completely specify the structure of programming languages. For example, declaration of names before reference, number and type of parameters in procedures and functions, the correspondence between formal and actual parameters, name or structural equivalence, scope rules, and the distinction between identifiers and reserved words are all structural aspects of programming languages which cannot be specified using context-free grammars. These {\em context-sensitive} aspects of the grammar are often called the {\em static semantics} of the language. The term {\em dynamic semantics} is used to refer to semantics proper, that is, the relationship between the syntax and the computational model. Even in a simple language like Simp, context-free grammars are unable to specify that variables appearing in expressions must have an assigned value. Context-free descriptions of syntax are supplemented with natural language descriptions of the static semantics or are extended to become attribute grammars. Attribute grammars are an extension of context-free grammars which permit the specification of context-sensitive properties of programming languages. Attribute grammars are actually much more powerful and are fully capable of specifying the semantics of programming languages as well. For an example, the following partial syntax of an imperative programming language requires the declaration of variables before reference to the variables. \begin{center}\parbox{4.5in}{ \begin{tabbing} P ::= D B \\ D ::= V... \\ B ::= C ... \\ C ::= V := E $|$ ... \end{tabbing}} \end{center} However, this contextfree syntax does not indicate this restriction. The declarations define an environment in which the body of the program executes. Attribute grammars permit the explicit description of the environment and its interaction with the body of the program. Since there is no generally accepted notation for attribute grammars, attribute grammars will be represented as context-free grammars which permit the parameterization of non-terminals and the addition of where statements which provide further restrictions on the parameters. Figure~\ref{ag:decl} is an attribute grammar for declarations. \begin{lfig} \label{ag:decl} \begin{tabbing} 123456789012\=123456\=789012345678901234567890\=1234567890\kill P ::= D(Env$\uparrow$) B(Env$\downarrow$)\\ D(Env$\uparrow$) ::= ...V$_i$(Env$_{i1}\downarrow$,Env$_i\uparrow$)...\\ \>where Env$_0 = \emptyset$, Env = Env$_n$ and \\ \>\> Env$_i$ = Env$_{i-1} \cup \{{\rm V}_i\}$\\ B(Env$\downarrow$) ::= C(Env$\downarrow$)... \\ C(Env$\downarrow$) ::= V := E(Env$\downarrow$) $|$ ... \\ \> where V $\in$ Env \end{tabbing} \caption{An attribute grammar for declarations} \end{lfig} The parameters marked with $\downarrow$ are called inherited attributes and denote attributes which are passed down the parse tree while the parameters marked with $\uparrow$ are called synthesized attributes and denote attributes which are passed up the parse tree. Attribute grammars have considerable expressive power beyond there use to specify context sensitive portions of the syntax and may be used to specify: \begin{itemize} \item context sensitive rules \item evaluation of expressions \item translation
http://cs.wwc.edu/~aabyan/KU/AdvTopics.html (5 de 7) [18/12/2001 10:42:46]

http://cs.wwc.edu/~aabyan/KU/AdvTopics.html

\end{itemize} \section{Further Reading} The original paper on attribute grammars was by Knuth\cite{Knuth68}. For a more recent source and their use in compiler construction and compiler generators see \cite{DJL88,PittPet92}

Real-time Systems -- 4 Robotics and Machine Intelligence -- 4 Semantics and Verification -- 4 Societal Impact of Computing -- 4 Symbolic Computation -- 4
Topic Summary: This topic provides coverage of the foundations and uses of algebraic systems, as well as insights into current methods for effectively using computers to do symbolic computation. Students should be able to understand basic symbolic computations and their underlying data structures and algorithms. Using a currently available system, students will be able to solve mathematical problems symbolically. The role of symbolic computation in the discipline of computing and related disciplines, as will as its strengths and limitations should also be taught. Subtopics include computer algebraic systems; data representations; fundamental algorithms (e.g., matrix calculation, Taylor series, differentiation); polynomial simplification; advanced algorithms (e.g. modular methods for GCD, matrix inversion, polynomial factorization); formal integration. Suggested Laboratories: Exercises should be given so that students can use a contemporary symbol manipulation system (e.g. MACSYMA, REDUCE, Mathematica) to solve problems. Prerequisites: AL1, AL4, AL8, AR3, AI2, NU1, NU2, PL3, PL4, SE1, Discrete Mathematics, Calculus, Linear Algebra.

Theory of Computation -- 4
Topic Summary: Continuation of the study of formal models of computation, including finite automata, pushdown automata, Linear-bounded automata, and Turing machines (deterministic and nondeterministic). From the formal language perspective, regular, context-free, context-sensitive, and unrestricted grammars will be studied and shown to be equivalent to the corresponding machine models. Church's thesis will be discussed and the equivalence of various models of computation (e.g., Turing machines, random access machines, lambda calculus, and recursive functions) is also included. These models provide a basis for the study of computability, including effectively enunerable and undecidable problems.

http://cs.wwc.edu/~aabyan/KU/AdvTopics.html (6 de 7) [18/12/2001 10:42:46]

http://cs.wwc.edu/~aabyan/KU/AdvTopics.html

Suggested Laboratories: Optionally, students will design and implement simple Turing machines or automata using a simulator (e.g., Turing's world. Prerequisites: Discrete Mathematics, AL5, AL7, PL7, PL8, SE5.

VLSI System Design -- 4


Topic Summary: This material is intended to provide students with an understanding of the design and implementation of VLSI logic devices. This included issues of casting digital system architecture into silicon devices and the associated design alternatives. Examples of practical design methodologies (e.g., CAD tools) and the attributes of available technologies are compared. Following an introduction to VLSI design, this topic covers integrated circuit technologies, design methodologies for VLSI, semicustom and custom MOS circuit design, and support technologies. Further subtopics include high-speed VLSI and application specific systems, systolic arrays, and wafer scale integration. Suggested Laboratories: A current equipped laboratory for the design and simulation of VLSI logic devices should be available. This will enable students to develop a working knowledge of the tools and experiment with different organizations. A significant VLSI design should be the capstone experience for this topic. (Fabrication and testing of the design are not necessary.) Prerequisites: All of the AR common requirements are a prerequisite for this topic. It is also recommended that the OS and SE common requirements be covered before studying this topic.

Last update: Send comments to: [email protected]

http://cs.wwc.edu/~aabyan/KU/AdvTopics.html (7 de 7) [18/12/2001 10:42:46]

CS Lab Exercises

Laboratory Exercises for Computer Science


1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. System Architecture System Administration Compiler Construction Database Functional Programming Logic Programming Concurrent Programmming Preface CS 1 Automata Miscellaneous Imperative Programming Cog Sci

Copyright 1995 Anthony A. Aaby Last update: Send comments to: [email protected]

http://cs.wwc.edu/~aabyan/LABS/ [18/12/2001 10:42:59]

http://cs.wwc.edu/~aabyan/LABS/CompilerConstruction/

Compiler Construction
1. Simple recursive descent compiler

http://cs.wwc.edu/~aabyan/LABS/CompilerConstruction/ [18/12/2001 10:43:01]

Database

Database Management System (DBMS)


Develop a simple DBMS for the relational data model.

Develop and Entity-relationship diagram Choose an organization you are most familiar with: college or university, public library, hospital, fast-food restaurant, department store, sports team. Determine the entities of interest and the relationships that exist between these entities. Draw the E-R diagram for the organization. Construct a tabular representation of the entities and relationships. Database create files for the tabular representation. Data Definition Compiler do not implement. Data Dictionary create a special file containing the discription of the structure of the data in the database. Query Processor design and implement a query processor for the relational algebra. The query processor, given a query and the data dictionary, translates the query into a series of requests to the data manager and returns the result of the query. Data Manager use the unix file system facilities r File Manager r Disk Manager r Data Files Telecommunication System not to be implemented. Relational algebra Implement the operations of:

Exercises
The solution of the first exercise is used in the following exercises 1. Define a file format for a the relational database model. 2. Write a sort routine that can be used to sort on any column. 3. Write a file update routine. Assume that you have two files, a master file and a transaction file. A third file is to be produced which is the result of updating the master file from information contained in the transaction file. The update is based on using matching keys is designated columns. 4. Relational Algebra: Using the file format developed in the first exercise, a. Implement the operations of union, intersection and difference
http://cs.wwc.edu/~aabyan/LABS/DB/DBMS.html (1 de 2) [18/12/2001 10:43:03]

Database

b. Implement the operations of product, selection, and projection c. Implement the natural join

Last update: a.aaby Send comments to: [email protected]

http://cs.wwc.edu/~aabyan/LABS/DB/DBMS.html (2 de 2) [18/12/2001 10:43:03]

http://cs.wwc.edu/~aabyan/LABS/FunctionalProgramming/CHAPTER.html

Functional Programming
The Lambda calculus
This laboratory is an introduction to the theory of functional programming. It may be used as a paper and pencil exercise or in conjunction with the software (provided in Pascal and Prolog). The Pascal program evaluates lambda expressions while the Prolog version provides for evaluation of lambda expressions, transformation of lambda expressions to SKI combinators, and evaluation of SKI expressions. % Note that the Prolog code uses the following syntax for lambda expressions. The lambda calculus is a formalization of the notion computability with fuctions. Its syntax is: Abstract Syntax: L in Lambda Expressions x in Variables c in Constants L ::= c | x | (L_1 L_2) | (lambdax.L_3) where (L_1 L_2) is function application, and (lambda x.L_3) is a lambda abstraction which defines a function with argument x and body L_3. Lambda expressions are reduced (simplified) using the Beta-rule: ((lambda x.B) y) => B[x:e] which says that the occurrences of x in B can be replaced with e. All bound identifiers in B are renamed so as not to clash with the free identifiers in e. The program lambda.p is a program (the code is written in Pascal) which reduces lambda expressions to their normal form and lambda.pro is essentially the same program written in Prolog. Lambda expressions are transformed into SKI expressions with the following rules: C[CV] -> C[(E_1 E_2)] -> C[lambda x.E] -> A[(x,x)] A[(x,c)] A[(x,(E_1 E_2))] CV (C[ E_1] C[ E_2 ]) A[(x,C[E] )] -> I -> (K c) -> ((S A[(x,E_1)]) A[(x,E_2)] )

Where CV is a constant or a variable. The reduction rules for the SKI calculus are as follows:
q q

S f g x -> f x (g x) K c x -> c

http://cs.wwc.edu/~aabyan/LABS/FunctionalProgramming/CHAPTER.html (1 de 4) [18/12/2001 10:43:05]

http://cs.wwc.edu/~aabyan/LABS/FunctionalProgramming/CHAPTER.html
q q q q

I x -> x Y e -> e (Y e) (A B) -> A B (A B C)-> A B C

The reduction rules require that reductions be performed left to right. If no S, K, I, or Y reduction applies, then brackets are removed and reductions continue. The program {\bf ski.pro } is a Prolog program which provides a compiler from the lambda calculus to combinatorial logic, a combinatorial logic reduction machine, and makes provision to compile and then execute programs written in the lambda calculus. input{FunctionalProgramming/Scheme} input{FunctionalProgramming/Haskell}

Submission of Programs
Programs should be submitted by doing something along the following lines (example uses Scheme). % script Script started, file is typescript % cat {\it source code files} ... {\it the source code listing} % haskell T 3.1 (14) SPARC/UNIX Copyright (C) 1989 Yale University Haskell Y1.2 (Oct 91) Command Interface. Type :? for help Main> ... {\it show program execution} Main> :quit Do you really want to quit Haskell [no] y % exit {\it to exit script} % Script done, file is typescript % lpr -p typescript {\it to print script file}

Arithmetic and lists


This laboratory provides practice in producing user defined functions for arithemetic and list processing.

Functionals
Functional programming languages provide ``meta'' or ``higher-order'' capabilities by permitting functions to be passed as parameters and returned as results. Functional programming languages provide a number of useful built in functionals. Here is a list of functionals: filter applied to a predicate and a list, returns a list containing only those elements that satisfy the predicate. Example

http://cs.wwc.edu/~aabyan/LABS/FunctionalProgramming/CHAPTER.html (2 de 4) [18/12/2001 10:43:05]

http://cs.wwc.edu/~aabyan/LABS/FunctionalProgramming/CHAPTER.html

filter (>5) [3,7,2,8,1,17] has value [7,8,17] partition applied to a predicate and a list returns a pair of lists, those elements of the list that do and do not satisfy the predicate, respectively. foldl folds up a list, using a given binary operator and a given start value, in a left associative way. Example: foldl op r [a,b,c] = (((r op a) op b) op c) But note that in order to run in constant space, foldl forces `op' to evaluate its first parameter. foldl1 folds left over non-empty lists. foldr folds up a list, using a given binary operator and a given start value, in a right associative way. Example: foldr op r [a,b,c] = a op (b op (c op r)) foldr1 folds right over non-empty lists. scanl op r applies `foldl op r' to every initial segment of a list. For example `scanl (+) 0 x' computes running sums. scanl1 is similar to scanl but without the starting element. scanr is similar to scanl but from the right. scanr1 is similar to scanr but without the starting element. map applied to a function and a list returns a copy of the list in which the given function has been applied to every element. map2 is similar to `map', but takes a function of two arguments, and maps it along two argument lists. We could also define `map3', `map4' etc., but they are much less often needed. takewhile applied to a predicate and a list, takes elements from the front of the list while the predicate is satisfied. Example: takewhile digit "123gone" has value "123" dropwhile applied to a predicate and a list, removes elements from the front of the list while the predicate is satisfied. Example:
http://cs.wwc.edu/~aabyan/LABS/FunctionalProgramming/CHAPTER.html (3 de 4) [18/12/2001 10:43:05]

http://cs.wwc.edu/~aabyan/LABS/FunctionalProgramming/CHAPTER.html

dropwhile digit "123gone" has value "gone" See also `takewhile'. until applied to a predicate, a function and a value, returns the result of applying the function to the value the smallest number of times necessary to satisfy the predicate. Example until (>1000) (2*) 1 = 1024 iterate - iterate f x returns the infinite list [x, f x, f(f x), ... ] Example, iterate (2*) 1 yields a list of the powers of 2. Here are two examples to illustrate the usefulness of functionals. The first computes the sum of the elements of a list i.e., \sum_{i=1}^n x_i and the second the sum of the squares of the elements of a list i.e., \sum_{i=1}^n x_i^2 sumx = foldr (+) 0 sumsqrs x = foldr (+) 0 (map (^2) x)

Lazy evaluation and infinite data structures


This laboratory provides practice in lazy evaluation and infinite data structures. 1. 2. 3. 4. lambda calculus arithmetic and lists functionals lazy evaluation

Last update: Send comments to: [email protected]

http://cs.wwc.edu/~aabyan/LABS/FunctionalProgramming/CHAPTER.html (4 de 4) [18/12/2001 10:43:05]

Logic Programming Exercises

Logic Programming
Labs
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. Database theory Arithmetic and Lists Tailrecursion Pattern matching basic incomplete extra_logical 2ndorder meta_logical dcg kbs oop ski parser

Last update: Send comments to: [email protected]

http://cs.wwc.edu/~aabyan/LABS/LogicProgramming/ [18/12/2001 10:43:11]

http://cs.wwc.edu/~aabyan/Hardware/

Hardware
q

RAID

http://cs.wwc.edu/~aabyan/Hardware/ [18/12/2001 10:43:12]

http://cs.wwc.edu/~aabyan/Hardware/raid.html

RAID
Older RAID levels Level Description Comments/Advantages RAID 0 files striped across high read & write performance multiple drives RAID 1 files are mirrored on data redundancy second drive faster read performance RAID 2 RAID 1 with error- not generally used since SCSI dirives have correction code ECC built in (ECC) RAID 3 files are striped at the hardware based data redundancy byte level across multiple drives; parity faster read and write performance value stored on a dedicated drive RAID 4 RAID 3 except fiiles less expensive than RAID 3 are striped at block data redundancy level faster read and write performance RAID 5 RAID 4 except parity data redundancy faster reads information is distributed across all drives Some vendors provide combinations of RAID levels. New RAID levels Term Description FRDS (failure-resistant disk system) system protects against data loss due to failure of a singe part of the system FRDS + hot swapping & the ability to recover from cache and FRDS plus power failures FTDS (failure-tolerant disk system) FRDS + reasonable protection against other failures FTDS plus FTDS + protection against bus failures DTDS (disaster-tolerant disk system) two or more zones with cooperation to prevent data loss in case of complete failure of one machine or array Disadvantages no redundancy double disk space slower write performance

extra disk required I/O can be a bottleneck expensive

I/O can be a bottleneck

writes can be slow

http://cs.wwc.edu/~aabyan/Hardware/raid.html (1 de 2) [18/12/2001 10:43:14]

http://cs.wwc.edu/~aabyan/Hardware/raid.html

DTDS plus

DTDS + recovery in case of al. manner of disasters -- flood, fire, ...

http://cs.wwc.edu/~aabyan/Hardware/raid.html (2 de 2) [18/12/2001 10:43:14]

Logic Programming

Logic Programming
q q q q

Prolog Tutorial Program schemata Software Engineering Examples

Permission to make digital/hard copy of part or all of this work for personal or classroom use is granted without fee provided that the copies are not made or distributed for profit or commercial advantage, the copyright notice, the title of the publication, and its date appear, and notice is given that copying is by permission of Anthony A. Aaby. To copy otherwise, to republish, to post on servers, or to redistribute to lists, requires prior specific permission and/or fee. 1998 Anthony A. Aaby. Last Modified - . Send comments to [email protected]

http://cs.wwc.edu/~aabyan/LogicPgmg/ [18/12/2001 10:43:16]

Prolog Tutorial

Prolog Tutorial
J. A. Robinson: A program is a theory (in some logic) and computation is deduction from the theory. N. Wirth: Program = data structure + algorithm R. Kowalski: Algorithm = logic + control

Introduction to Prolog Introduction The Structure of Prolog Program Syntax Types Simple Composite Expressions Unification and Pattern Matchine Functions Lists Iteration Iterators, Generators and Backtracking Tuples Extra-Logical Predicates Input/Output Style and Layout Applications & Advanced Programming Techniques Negation and Cuts Definite Clause Grammars Incomplete Data Structures Meta Level Programming Second-Order Programming Database Expert Systems Object-Oriented Programming Appendix References

Introduction
Prolog, which stands for PROgramming in LOGic, is the most widely available language in the logic programming paradigm. Logic and therefore Prolog is based the mathematical notions of relations and logical inference. Prolog is a declarative language meaning that rather than describing how to compute a solution, a program consists of a data base of facts and logical relationships (rules) which describe the relationships which hold for the given application. Rather then running a program to obtain a solution, the user asks a question. When asked a question, the run time system searches through the data base of facts and rules to determine (by logical deduction) the answer. Among the features of Prolog are `logical variables' meaning that they behave like mathematical variables, a powerful patternmatching facility (unification), a backtracking strategy to search for proofs, uniform data structures, and input and output are interchangeable.

http://cs.wwc.edu/KU/PR/Prolog.html (1 de 34) [18/12/2001 10:43:26]

Prolog Tutorial

Often there will be more than one way to deduce the answer or there will be more than one solution, in such cases the run time system may be asked find other solutions. backtracking to generate alternative solutions. Prolog is a weakly typed language with dynamic type checking and static scope rules. Prolog is used in artificial intelligence applications such as natural language interfaces, automated reasoning systems and expert systems. Expert systems usually consist of a data base of facts and rules and an inference engine, the run time system of Prolog provides much of the services of an inference engine.

The Structure of Prolog Programs


q

A Prolog program consists of a database of facts and rules, and queries (questions). r Fact: ... . r Rule: ... :- ... . r Query: ?- ... . r Variables: must begin with an upper case letter. r Constants: numbers, begin with lowercase letter, or enclosed in single quotes. Inductive definitions: base and inductive cases r Towers of Hanoi: move N disks from pin a to pin b using pin c. hanoi(N) :- hanoi(N, a, b, c). hanoi(0,_,_,_). hanoi(N,FromPin,ToPin,UsingPin) :- M is N-1, hanoi(M,FromPin,UsingPin,ToPin), move(FromPin,ToPin), hanoi(M,UsingPin,ToPin,FromPin). move(From,To) :- write([move, disk from, pin, From, to, pin, ToPin]), nl. r Lists: append, member list([]). list([X|L]) :- [list(L). [X1|[...[Xn|[]...] = [X1,...Xn] Abbrev: append([],L,L). append([X|L1],L2,[X|L12]) :- append(L1,L2,L12). member(X,L) :- concat(_,[X|_],L). Ancestor ancestor(A,D) :- parent(A,B). ancestor(A,D) :- parent(A,C),ancestor(C,D). but not ancestor(A,D) :- ancestor(A,P), parent(P,D). since infinite recursion may result.

Depth-first search: Maze/Graph traversal A database of arcs (we will assume they are directed arcs) of the form: a(node_i,node_j). Rules for searching the graph: go(From,To,Trail). go(From,To,Trail) :- a(From,In), not visited(In,Trail), go(In,To,[In|Trail]).

http://cs.wwc.edu/KU/PR/Prolog.html (2 de 34) [18/12/2001 10:43:26]

Prolog Tutorial

visited(A,T) :- member(A,T). I/O: terms, characters, files, lexical analyzer/scanner r read(T), write(T), nl. r get0(N), put(N): ascii value of character r name(Name,Ascii_list). r see(F), seeing(F), seen, tell(F), telling(F), told. Natural language processing: Context-free grammars may be represented as Prolog rules. For example, the rule sentence ::= noun_clause verb_clause can be implemented in Prolog as sentence(S) :- append(NC,VC,S), noun_clause(NC), verb_clause(VC). or in DCG as: sentence -> noun_clause, verb_clause. ?- sentence(S,[]). Note that two arguments appear in the query. Both are lists and the first is the sentence to be parsed, the second the remaining elements of the list which in this case is empty.

A Prolog program consists of a data base of facts and rules. There is no structure imposed on a Prolog program, there is no main procedure, and there is no nesting of definitions. All facts and rules are global in scope and the scope of a variable is the fact or rule in which it appears. The readability of a Prolog program is left up to the programmer. A Prolog program is executed by asking a question. The question is called a query. Facts, rules, and queries are called clauses.

Syntax
Facts
A fact is just what it appears to be --- a fact. A fact in everyday language is often a proposition like ``It is sunny.'' or ``It is summer.'' In Prolog such facts could be represented as follows: 'It is sunny'. 'It is summer'.

Queries
A query in Prolog is the action of asking the program about information contained within its data base. Thus, queries usually occur in the interactive mode. After a program is loaded, you will receive the query prompt, ?at which time you can ask the run time system about information in the data base. Using the simple data base above, you can ask the program a question such as ?- 'It is sunny'. and it will respond with the answer Yes ?-

http://cs.wwc.edu/KU/PR/Prolog.html (3 de 34) [18/12/2001 10:43:26]

Prolog Tutorial

A yes means that the information in the data base is consistent with the subject of the query. Another way to express this is that the program is capable of proving the query true with the available information in the data base. If a fact is not deducible from the data base the system replys with a no, which indicates that based on the information available (the closed world assumption) the fact is not deducible. If the data base does not contain sufficient information to answer a query, then it answers the query with a no. ?- 'It is cold'. no ?-

Rules
Rules extend the capabilities of a logic program. They are what give Prolog the ability to pursue its decision-making process. The following program contains two rules for temperature. The first rule is read as follows: ``It is hot if it is summer and it is sunny.'' The second rule is read as follows: ``It is cold if it is winter and it is snowing.'' 'It 'It 'It 'It The query, ?- 'It is hot'. Yes ?is answered in the affirmative since both 'It is summer' and 'It is sunny' are in the data base while a query ``?- 'It is cold.' '' will produce a negative response. The previous program is an example of propositional logic. Facts and rules may be parameterized to produce programs in predicate logic. The parameters may be variables, atoms, numbers, or terms. Parameterization permits the definition of more complex relationships. The following program contains a number of predicates that describe a family's genelogical relationships. female(amy). female(johnette). male(anthony). male(bruce). male(ogden). parentof(amy,johnette). parentof(amy,anthony). parentof(amy,bruce). parentof(ogden,johnette). parentof(ogden,anthony). parentof(ogden,bruce). is is is is sunny'. summer'. hot' :- 'It is summer', 'It is sunny'. cold' :- 'It is winter', 'It is snowing'.

The above program contains the three simple predicates: female; male; and parentof. They are parameterized with what are called `atoms.' There are other family relationships which could also be written as facts, but this is a tedious process. Assuming traditional marriage and child-bearing practices, we could write a few rules which would relieve the tedium of identifying and listing all the possible family relations. For example, say you wanted to know if johnette had any siblings, the first question you must ask is ``what does it mean to be a sibling?'' To be someone's sibling you must have the same parent.
http://cs.wwc.edu/KU/PR/Prolog.html (4 de 34) [18/12/2001 10:43:26]

Prolog Tutorial

This last sentence can be written in Prolog as siblingof(X,Y) :parentof(Z,X), parentof(Z,Y). A translation of the above Prolog rule into English would be ``X is the sibling of Y provided that Z is a parent of X, and Z is a parent of Y.'' X, Y, and Z are variables. This rule however, also defines a child to be its own sibling. To correct this we must add that X and Y are not the same. The corrected version is: siblingof(X,Y) :parentof(Z,X), parentof(Z,Y), X Y. The relation brotherof is similar but adds the condition that X must be a male. brotherof(X,Y) :parentof(Z,X), male(X), parentof(Z,Y), X Y. From these examples we see how to construct facts, rules and queries and that strings are enclosed in single quotes, variables begin with a capital letter, constants are either enclosed in single quotes or begin with a small letter.

Types
Prolog provides for numbers, atoms, lists, tuples, and patterns. The types of objects that can be passed as arguments are defined in this section.

Simple Types
Simple types are implementation dependent in Prolog however, most implementations provide the simple types summarized in the following table. TYPE VALUES boolean true, fail integer integers real floating point numbers variable variables atom character sequences The boolean constants are not usually passed as parameters but are propositions. The constant fail is useful in forcing the generation of all solutions. Variables are character strings beginning with a capital letter. Atoms are either quoted character strings or unquoted strings beginning with a small letter.

Composite Types
In Prolog the distinction between programs and data are blurred. Facts and rules are used as data and data is often passed in the arguments to the predicates. Lists are the most common data structure in Prolog. They are much like the array in that they are a sequential list of elements, and much like the stack in that you can only access the list of elements sequentially, that is, from

http://cs.wwc.edu/KU/PR/Prolog.html (5 de 34) [18/12/2001 10:43:26]

Prolog Tutorial

one end only and not in random order. In addition to lists Prolog permits arbitrary patterns as data. The patterns can be used to represent tuples. Prolog does not provide an array type. But arrays may be represented as a list and multidimensional arrays as a list(s) of lists. An alternate representation is to represent an array as a set of facts in a the data base.

TYPE REPRESENTATION [ comma separated sequence of items ] sequence of items list pattern A list is designated in Prolog by square brackets ([ ]+). An example of a list is [dog,cat,mouse] This says that the list contains the elements dog, {\tt cat, and mouse, in that order. Elements in a Prolog list are ordered, even though there are no indexes. Records or tuples are represented as patterns. Here is an example. book(author(aaby,anthony),title(labmanual),data(1991)) The elements of a tuple are accessed by pattern matching. book(Title,Author,Publisher,Date). author(LastName,FirstName,MI). publisher(Company,City). book(T,A,publisher(C,rome),Date)

Type Predicates
Since Prolog is a weakly typed language, it is important for the user to be able to determine the type of a parameter. The following built in predicates are used to determine the type of a parameter. PREDICATE CHECKS IF var(V) V is a variable nonvar(NV) NV is not a variable atom(A) A is an atom integer(I) I is an integer real(R) R is a floating point number number(N) N is an integer or real atomic(A) A is an atom or a number functor(T,F,A) T is a term with functor F and arity A T =..L T is a term, L is a list (see example below). clause(H,T) H :- T is a rule in the program The last three are useful in program manipulation (metalogical or meta-programming) and require additional explanation. clause(H,T) is used to check the contents of the data base. functor(T,F,A) and T=..L are used to manipulate terms. The predicate, functor is used as follows. functor(T,F,A) T is a term, F is its functor, and A is its arity. For example,

http://cs.wwc.edu/KU/PR/Prolog.html (6 de 34) [18/12/2001 10:43:26]

Prolog Tutorial

?- functor(t(a,b,c),F,A). F = t A = 3 yes t is the functor of the term t(a,b,c), and 3 is the arity (number of arguments) of the term. The predicate =.. (univ) is used to compose and decompose terms. For example: ?- t(a,b,c) =..L. L = [t,a,b,c] yes ?- T =..[t,a,b,c]. T = t(a,b,c) yes

Expressions
Arithmetic expressions are evaluated with the built in predicate is which is used as an infix operator in the following form. variable is expression For example, ?- X is 3*4. X = 12 yes

Arithmetic Operators
Prolog provides the standard arithmetic operations as summarized in the following table. SYMBOL OPERATION + addition subtraction * multiplication / real division // integer division mod modulus ** power

Boolean Predicates
Besides the usual boolean predicates, Prolog provides more general comparison operators which compare terms and predicates to test for unifiability and whether terms are identical. SYMBOL OPERATION A ?= B unifiable A=B unify A \+= B not unifiable A == B identical ACTION A and B are unifiable but does not unify A and B unifys A and B if possible does not unify A and B

http://cs.wwc.edu/KU/PR/Prolog.html (7 de 34) [18/12/2001 10:43:26]

Prolog Tutorial

A \+== B A =:= B A =\+= B A<B A =< B A>B A >= B A @< B A @=< B A @> B A @>= B

not identical equal (value) evaluates A and B to not equal (value) less than (numeric) less or equal (numeric) greater than (numeric) greater or equal (numeric) less than (terms) less or equal (terms) greater than (terms) greater or equal (terms)

determine if equal

For example, the following are all true. 3 @< 4 3 @< a a @< abc6 abc6 @< t(c,d) t(c,d) @< t(c,d,X) Logic programming definition of natural number. % natural_number(N) <- N is a natural number. natural_number(0). natural_number(s(N)) :- natural_number(N). Prolog definition of natural number. natural_number(N) :- integer(N), N >= 0. Logic programming definition of inequalities % less_than(M,N) <- M is less than M less_than(0,s(M)) :- natural_number(M). less_than(s(M),s(N)) :- less_than(M,N). % less_than_or_equal(M,N) <- M is less than or equal to M less_than_or_equal(0,N) :- natural_number(N). less_than_or_equal(s(M),s(N)) :- less_than_or_equal(M,N). Prolog definition of inequality. M =< N. Logic programming definition of addition/substraction % plus(X,Y,Z) <- Z is X + Y plus(0,N,N) :- natural_number(N). plus(s(M),N,s(Z)) :- plus(M,N,Z).

http://cs.wwc.edu/KU/PR/Prolog.html (8 de 34) [18/12/2001 10:43:26]

Prolog Tutorial

Prolog definition of addition plus(M,N,Sum) :- Sum is M+N. This does not define substration. Logic programming definition of multiplication/division % times(X,Y,Z) <- Z is X*Y times(0,N,0) :- natural_number(N). times(s(M),N,Z) :- times(M,N,W), plus(W,N,Z). Prolog definition of multiplication. times(M,N,Product) :- Product is M*N. This does not define substration. Logic programming definition of Exponentiation % exp(N,X,Z) <- Z is X**N exp(s(M),0,0) :- natural_number(M). exp(0,s(M),s(0)) :- natural_number(M). exp(s(N),X,Z) :- exp(N,X,Y), times(X,Y,Z). Prolog definition of exponentiation is implementation dependent.

Logical Operators
Predicates are functions which return a boolean value. Thus the logical operators are built in to the language. The comma on the right hand side of a rule is logical conjunction. The symbol :- is logical implication. In addition Prolog provides negation and disjunction operators. The logical operators are used in the definition of rules. Thus, a :- b. % a if b a :- b,c. % a if b and c. a :- b;c. % a if b or c. a :- \++ b. % a if b is not provable a :- not b. % a if b fails a :- b -> c;d. % a if (if b then c else d) This table summarizes the logical operators. SYMBOL OPERATION not negation \+ not provable , logical conjunction ; logical disjunction :logical implication -> if-then-else

Unification and Pattern Matching


The arguments in a query are matched (or unified in Prolog terminology) to select the appropriate rule. Here is an example
http://cs.wwc.edu/KU/PR/Prolog.html (9 de 34) [18/12/2001 10:43:26]

Prolog Tutorial

which makes extensive use of pattern matching. The rules for computing the derivatives of polynomial expressions can be written as Prolog rules. A given polynomial expression is matched against the first argument of the rule and the corresponding derivative is returned. % deriv(Polynomial, variable, derivative) % dc/dx = 0 deriv(C,X,0) :- number(C). % dx/dx} = 1 deriv(X,X,1). % d(cv)/dx = c(dv/dx) deriv(C*U,X,C*DU) :- number(C), deriv(U,X,DU). % d(u v)/dx = u(dv/dx) + v(du/dx) deriv(U*V,X,U*DV + V*DU) :- deriv(U,X,DU), deriv(V,X,DV). % d(u v)/dx = du/dx dv/dx deriv(U+V,X,DU+DV) :- deriv(U,X,DU), deriv(V,X,DV). deriv(U-V,X,DU-DV) :- deriv(U,X,DU), deriv(V,X,DV). % du^n/dx = nu^{n-1}(du/dx) deriv(U^+N,X,N*U^+N1*DU) :- N1 is N-1, deriv(U,X,DU). Prolog code is often bidirectional. In bidirectional code, the arguments may be use either for input or output. For example, this code may be used for both differentiation and integration with queries of the form: ?- deriv(Integral,X,Derivative). where either Integral or Derivative may be instantiated to a formula.

Functions
Prolog does not provide for a function type therefore, functions must be defined as relations. That is, both the arguments to the function and the result of the function must be parameters to the relation. This means that composition of two functions cannot be constructed. As an example, here is the factorial function defined as relation in Prolog. Note that the definition requires two rules, one for the base case and one for the inductive case. fac(0,1). fac(N,F) :- N > 0, M is N - 1, fac(M,Fm), F is N * Fm. The second rule states that if N > 0, M = N - 1, Fm is (N-1)!, and F = N * Fm, then F is N!. Notice how `is' is used. In this example it resembles an assignment operator however, it may not be used to reassign a variable to a new value. I the logical sense, the order of the clauses in the body of a rule are irrelevant however, the order may matter in a practical sense. M must not be a variable in the recursive call otherwise an infinite loop will result. Much of the clumsiness of this definition comes from the fact that fac is defined as a relation and thus it cannot be used in an expression. Relations are commonly defined using multiple rules and the order of the rules may determine the result. In this case the rule order is irrelevant since, for each value of N only one rule is applicable. Here are the Prolog equivalent of the definitions of the gcd function, Fibonacci function and ackerman's function. gcd(A,B,GCD) :- A = B, GCD = A. gcd(A,B,GCD) :- A < B, NB is B - A, gcd(A,NB,GCD). gcd(A,B,GCD) :- A > B, NA is A - B, gcd(NA,B,GCD). fib(0,1). fib(1,1). fib(N,F) :- N > 1, N1 is N - 1, N2 is N - 2, fib(N1,F1), fib(N2,F2), F is F1 + F2.

http://cs.wwc.edu/KU/PR/Prolog.html (10 de 34) [18/12/2001 10:43:26]

Prolog Tutorial

ack(0,N,A) :- A is N + 1. ack(M1,0,A) :- M > 0, M is M - 1, ack(M,1,A). ack(M1,N1,A) :- M1 > 0, N1 > 0, M is M - 1, N is N - 1, ack(M1,N,A1), ack(M,A1,A). Notice that the definition of ackerman's function is clumsier than the corresponding functional definition since the functional composition is not available. Logic programming definition of the factorial function. % factorial(N,F) <- F is N! factorial(0,s(0)). factorial(s(N),F) :- factorial(N,F1), times(s(N),F1,F). Prolog definition of factorial function. factorial(0,1). factorial(N,F) :- N1 is N-1, factorial(N1,F1), F is N*F1. Logic programming definition of the minimum. % minimum(M,N,Min) <- Min is the minimum of {M, N} minimum(M,N,M) :- less_than_or_equal(M,N). minimum(M,N,N) :- less_than_or_equal(N,M). Prolog programming definition of the minimum. minimum(M,N,M) :- M =< N. minimum(M,N,N) :- N =< M. Logic programming definition of the modulus. % mod(M,N,Mod) <- Mod is the remainder of the integer division of M by N. mod(X,Y,Z) :- less_than(Z,Y), times(Y,Q,W), plus(W,Z,X). % or mod(X,Y,X) :- less_than(X,Y). mod(X,Y,X) :- plus(X1,Y,X), mod(X1,Y,Z). Logic programming definition of Ackermann's function. ack(0,N,s(N)). ack(s(M),0,Val) :- ack(M,s(0),Val). ack(s(M),s(N),Val) :- ack(s(M),N,Val1), ack(M,Val1,Val). Prolog definition of Ackermann's function. ack(0,N,Val) :- Val is N + 1. ack(M,0,Val) :- M > 0, M1 is M-1, ack(M1,1,Val). ack(M,N,Val) :- M > 0, N > 0, M1 is M-1, N1 is N-1, ack(M,N1,Val1), ack(M1,Val1,Val). Logic programming definition of the Euclidian algorithm. gcd(X,0,X) :- X > 0.
http://cs.wwc.edu/KU/PR/Prolog.html (11 de 34) [18/12/2001 10:43:26]

Prolog Tutorial

gcd(X,Y,Gcd) :- mod(X,Y,Z), gcd(Y,Z,Gcd). Logic programming definition of the Euclidian algorithm. gcd(X,0,X) :- X > 0. gcd(X,Y,Gcd) :- mod(X,Y,Z), gcd(Y,Z,Gcd).

Lists
Objective Outline r Lists r Composition of Recursive Programs r Iteration Lists are the basic data structure used in logic (and functional) programming. Lists are a recursive data structure so recursion occurs naturally in the definitions of various list operations. When defining operations on recursive data structures, the definition most often naturally follows the recursive definition of the data structure. In the case of lists, the empty list is the base case. So operations on lists must consider the empty list as a case. The other cases involve a list which is composed of an element and a list. Here is a recursive definition of the list data structure as found in Prolog. List --> [ ] List --> [Element|List] Here are some examples of list representation, the first is the empty list. Pair Syntax [ ] [a|[ ]] [a|b|[ ]] [a|X] [a|b|X] Element Syntax [ ] [a] [a,b] [a|X] [a,b|X]

Predicates on lists are often written using multiple rules. One rule for the empty list (the base case) and a second rule for non empty lists. For example, here is the definition of the predicate for the length of a list. % length(List,Number) <- Number is lenght of List length([],0). length([H|T],N) :- length(T,M), N is M+1. Element of a list. % member(Element,List) <- Element is an element of the list List member(X,[X|List). member(X,[Element|List]) :- member(X,List). Prefix of a list. % prefix(Prefix,List) <- Prefix is a prefix of list List prefix([],List).
http://cs.wwc.edu/KU/PR/Prolog.html (12 de 34) [18/12/2001 10:43:26]

Prolog Tutorial

prefix([X|Prefix],[X|List]) :- prefix(Prefix,List). Suffix of a list. % suffix(Suffix,List) <- Suffix is a suffix of list List suffix(Suffix,Suffix). prefix(Suffix,[X|List]) :- suffix(Suffix,List). Append (concatenate) two lists. % append(List1,List2,List1List2) <% List1List2 is the result of concatenating List1 and List2. append([],List,List). append([Element|List1],List2,[Element|List1List2]) :append(List1,List2,List1List2). Compare this code with the code for plus. sublist -- define using
q q q q q

Suffix of a prefix Prefix of a suffix Recursive definition of sublist using prefix Suffix of a prefix using append Prefix of a suffix using append

member, prefix and suffix -- defined using append reverse, delete, select, sort, permutation, ordered, insert, quicksort.

Iteration
Iterative version of Length % length(List,Number) <- Number is lenght of List % Iterative version. length(List,LenghtofList) :- length(List,0,LengthofList). % length(SufixList,LengthofPrefix,LengthofList) <% LengthofList is LengthofPrefix + length of SufixList length([],LenghtofPrefix,LengthofPrefix). length([Element|List],LengthofPrefix,LengthofList) :PrefixPlus1 is LengthofPrefix + 1, length(List,PrefixPlus1,LengthofList). Iterative version of Reverse % reverse(List,ReversedList) <- ReversedList is List reversed. % Iterative version. reverse(List,RList) :- reverse(List,[],RList). % length(SufixList,LengthofPrefix,LengthofList) <% LengthofList is LengthofPrefix + length of SufixList reverse([],RL,RL). reverse([Element|List],RevPrefix,RL) :http://cs.wwc.edu/KU/PR/Prolog.html (13 de 34) [18/12/2001 10:43:26]

Prolog Tutorial

reverse(List,[Element|RevPrefix],RL). Here are some simple examples of common list operations defined by pattern matching. The first sums the elements of a list and the second forms the product of the elements of a list. sum([ ],0). sum([X|L],Sum) :- sum(L,SL), Sum is X + SL. product([ ],1). product([X|L],Prod) :- product(L,PL), Prod is X * PL. Another example common list operation is that of appending or the concatenation of two lists to form a third list. Append may be described as the relation between three lists, L1, L2, L3, where L1 = [x1,...,xm], L2 = [y1,...,yn] and L3 = [x1,...,xm,y1,...,yn]. In Prolog, an inductive style definition is required. append([ ],L,L). append([X1|L1],L2, [X1|L3]) :- append(L1,L2,L3). The first rule is the base case. The second rule is the inductive case. In effect the second rule says that if L1 = [x2,...,xm], L2 = [y1,...,yn] and L3 = [x2,...,xm,y1,...,yn], then [x1,x2,...,xm,y1,...,yn], is the result of appending [x1,x2,...,xm] and L2. The append relation is quite flexible. It can be used to determine if an object is an element of a list, if a list is a prefix of a list and if a list is a suffix of a list. member(X,L) :- append(_,[X|_],L). prefix(Pre,L) :- append(Prefix,_,L). suffix(L,Suf) :- append(_,Suf,L). The underscore (_+) in the definitions denotes an anonymous variable (or don`t care) whose value in immaterial to the definition. The member relation can be used to derive other useful relations. vowel(X) :- member(X,[a,e,i,o,u]). digit(D) :- member(D,['0','1','2','3','4','5','6','7','8','9']). A predicate defining a list and its reversal can be defined using pattern matching and the append relation as follows. reverse([ ],[ ]). reverse([X|L],Rev) :- reverse(L,RL), append(RL,[X],Rev). Here is a more efficient (iterative/tail recursive) version. reverse([ ],[ ]). reverse(L,RL) :- reverse(L,[ ],RL). reverse([ ],RL,RL). reverse([X|L],PRL,RL) :- reverse(L,[X|PRL],RL). To conclude this section, here is a definition of insertion sort.

http://cs.wwc.edu/KU/PR/Prolog.html (14 de 34) [18/12/2001 10:43:26]

Prolog Tutorial

isort([ ],[ ]). isort([X|UnSorted],AllSorted) :- isort(UnSorted,Sorted), insert(X,Sorted,AllSorted). insert(X,[ ],[X]). insert(X,[Y|L],[X,Y|L]) :- X =< Y. insert(X,[Y|L],[Y|IL]) :- X > Y, insert(X,L,IL).

Iteration
Recursion is the only iterative method available in Prolog. However, tail recursion can often be implemented as iteration. The following definition of the factorial function is an `iterative' definition because it is `tail recursive.' It corresponds to an implementation using a while-loop in an imperative programming language. fac(0,1). fac(N,F) :- N > 0, fac(N,1,F). fac(1,F,F). fac(N,PP,F) :- N > 1, NPp is N*PP, M is N-1, fac(M,NPp,F). Note that the second argument functions as an accumulator. The accumulator is used to store the partial product much as might be done is a procedural language. For example, in Pascal an iterative factorial function might be written as follows. function fac(N:integer) : integer; var i : integer; begin if N >= 0 then begin fac := 1 for I := 1 to N do fac := fac * I end end; In the Pascal solution fac acts as an accumulator to store the partial product. The Prolog solution also illustrates the fact that Prolog permits different relations to be defined by the same name provided the number of arguments is different. In this example the relations are fac/2 and fac/3 where fac is the ``functor" and the number refers to the arity of the predicate. As an additional example of the use of accumulators, here is an iterative (tail recursive version) of the Fibonacci function. fib(0,1). fib(1,1). fib(N,F) :- N > 1, fib(N,1,1,F) fib(2,F1,F2,F) :- F is F1 + F2. fib(N,F1,F2,F) :- N > 2, N1 is N - 1, NF1 is F1 + F2, fib(N1,NF1,F1,F).

Iterators, Generators and Backtracking


The following fact and rule can be used to generate the natural numbers. % Natural Numbers nat(0). nat(N) :- nat(M), N is M + 1. The successive numbers are generated by backtracking. For example, when the following query is executed successive natural
http://cs.wwc.edu/KU/PR/Prolog.html (15 de 34) [18/12/2001 10:43:26]

Prolog Tutorial

numbers are printed. ?- nat(N), write(N), nl, fail. The first natural number is generated and printed, then fail forces backtracking to occur and the second rule is used to generate the successive natural numbers. The following code generates successive prefixes of an infinite list beginning with N. natlist(N,[N]). natlist(N,[N|L]) :- N1 is N+1, natlist(N1,L). As a final example, here is the code for generating successive prefixes of the list of prime numbers. primes(PL) :- natlist(2,L2), sieve(L2,PL). sieve([ ],[ ]). sieve([P|L],[P|IDL]) :- sieveP(P,L,PL), sieve(PL,IDL). sieveP(P,[ ],[ ]). sieveP(P,[N|L],[N|IDL]) :- N mod P > 0, sieveP(P,L,IDL). sieveP(P,[N|L], IDL) :- N mod P =:= 0, sieveP(P,L,IDL). Occasionally, backtracking and multiple answers are annoying. Prolog provides the cut symbol (!) to control backtracking. The following code defines a predicate where the third argument is the maximum of the first two. max(A,B,M) :- A < B, M = B. max(A,B,M) :- A >= B, M = A. The code may be simplified by dropping the conditions on the second rule. max(A,B,B) :- A < max(A,B,A). B.

However, in the presence of backtracking, incorrect answers can result as is shown here. ?- max(3,4,M). M = 4; M = 3 To prevent backtracking to the second rule the cut symbol is inserted into the first rule. max(A,B,B) :- A < B.!. max(A,B,A). Now the erroneous answer will not be generated. A word of caution: cuts are similar to gotos in that they tend to increase the complexity of the code rather than to simplify it. In general the use of cuts should be avoided.

Tup