Week 12 Software Engineering Tools Announcements Unix Programming

Total Page:16

File Type:pdf, Size:1020Kb

Week 12 Software Engineering Tools Announcements Unix Programming Announcements Week 12 Part 4 Paul Chew’s Office Hour for today (W 4:30 – 5:30) is z Will be due on last day of Software Engineering Tools cancelled due to special classes (Friday, May 7) computer graphics talk z Today’s talk 4:30pm, Call Auditorium Marc Levoy (Stanford) The Digital Michelangelo No Sections today (or next Paul Chew Project week) CS 212 – Spring 2004 z Tomorrow’s talk 4:15pm, Call Auditorium George Joblove (Sony Picture Imageworks) and Douglas Kay (Mondo Media) Digital Imagery in Entertainment 2 Unix Programming Languages Original version by Ken Philosophy Some of the languages used Some other languages (from a Thompson (Bell Labs) in 1969 z Almost everything is a text file in CS Dept Yahoo list) ABC, ActiveX, Ada, AMOS, APL, z Little programs (utilities) to do z C, C++, C# An interactive, multi-user little tasks AppleScript, Assembly, awk, BASIC, Many of the upper level operating system (not the first BETA, C and C++, C#, Cecil, Cilk, z Connect programs with pipes courses (networks, CLU, COBOL, ColdC, cT, Curl, such system, but an early one) & redirection distributed computing) Delphi, Dylan, Dynace, Eiffel, Forth, % who | sort | lpr Fortran, Guile, Haskell, Icon, IDL, z Java Unix is closely tied to the Print an alphabetical list of Infer, Intercal, J, Java, JavaScript, 100, 211, 212 development of C who is active on the system JCL, JOVIAL, Limbo, Lisp, Logo, M - z Matlab MUMPS, Magma, ML, Modula-2, z Unix was originally written in Linux is an open software version Modula-3, Oberon, Obliq, Occam, PDP-7 Assembly Language of Unix 100M, numerical analysis OpenGL, Pascal, Perl, PL/I, Pop, courses z Then in B z Since 1991 PostScript, Prograph, Prolog, Python, Linus Torvalds (the kernel) z ML Rexx, Ruby, SAS, Sather, Scheme, z Then in C ScriptEase, SDL, Self, SETL, Richard Stallman (GNU) z B and C were basically functional programming Smalltalk, SQL, Tcl/Tk, TOM, Verilog, created to write Unix z Widely used for high- 312, logic-related courses VHDL, VRML, Visual, Visual Basic, Z performance computing z … 3 4 Scripting Languages Regular Expressions A script is a sequence of Example scripting languages: Common goal: Some of the rules for regular common commands made Unix shell, Python, Perl, search/match/do stuff with expressions into a single program Tcl (Tool command language) strings z A regular character matches itself z Unix uses shell scripts z A . matches any character z The shell is the interactive Some Python code: Idea: use special strings to interface to Unix match other strings z * implies 0 or more occurrences (of preceding class Stack (object): z You can combine z Some characters are item) commands from the Unix def __init__ (self): meta-characters self.stack = [ ] z + implies 1 or more shell to create programs def put (self, item): occurrences self.stack.append(item) Regular expressions are z \ implies following character is def get (self): treated as a regular character A scripting language is return self.stack.pop() closely related to finite state z [ … ] matches any one z Usually easy to learn def isEmpty (self): automata (CS 381/481) return len(self.stack) == 0 character from within the z Interpreted instead of brackets; - can be used to compiled indicate a range ( [0-9]+\. | \. [0-9] ) [0-9]* 5 6 1 Makefiles Version Control Used when Once you have a makefile Allows you to keep track of CVS (Concurrent Version compiling/recompiling a large z You recompile whatever is changes for a large project System) system (several necessary by typing make z Can back up to old version z Open source interdependent files) if changes create z Widely used tool for z Checks which files have problems To create a makefile version control changed and only z Multiple contributors can z Usual strategy is to find z Maintains a history of all recompiles those that are work on the system changes made necessary some examples and modify them z Supports branching, z Because of dependencies, z There are automated tools allowing several lines of more than just the development changed files can need to for building makefiles be recompiled z Provides mechanisms for merging branches back z Of course, can always together when desired recompile everything, but this can be too expensive 7 8 UML Profiling UML The goal is to make a program run faster z = Unified Modeling Language z Rule of thumb: 80% of the time is spent in 20% of the code z No use improving the code that isn’t executed often z Design tool for object oriented programming z How do you determine where your program is spending its time? z System for showing the interaction of objects People are notoriously bad at predicting the most computationally expensive parts of a program Part of the data produced by a profiler (Python) 2649853 function calls (2319029 primitive calls) in 53.502 CPU seconds Ordered by: standard name ncalls tottime percall cumtime percall filename:lineno(function) 2521 0.227 0.000 1.734 0.001 Drawing.py:102(update) 7333 0.355 0.000 0.983 0.000 Drawing.py:244(transform) 4347 0.324 0.000 4.176 0.001 Drawing.py:64(draw) 3649 0.212 0.000 1.570 0.000 Geometry.py:106(angles) 56 0.001 0.000 0.001 0.000 Geometry.py:16(__init__) 343160/34316 9.818 0.000 12.759 0.000 Geometry.py:162(_determinant) 8579 0.816 0.000 13.928 0.002 Geometry.py:171(cross) 4279 0.132 0.000 0.447 0.000 Geometry.py:184(transpose) 9 10 Bali for Part 4 New Bali Syntax Adds classes (and fields and int main ( ) class -> class name [ ( name ) ] { fieldDeclaration* } methods) with single {int n; Stack s;} { n = 0; { constructor* } inheritance while n < 10 do { { method* } Does not remove functions s.put(n); n = n + 1; } n = 0; fieldDeclaration -> modifier variableDeclaration z There is still a main- while n < 10 do { function, executed when print s.get(); constructor -> modifier name ( [ parameters ] ) functionBody program is run n = n + 1; } method -> modifier function class Stack } { private Node top; } {} modifier -> public | private { public void put (int i) {} class Node { top = Node(i, top); { public int data; public Node link; } return; } { public Node (data, line) {} public int get () { this.data = data; { Node n; } this.link = link; { n = top; } top = top.link; }{} return n.data; } } 11 12 2.
Recommended publications
  • Language-Level Support for Exploratory Programming of Distributed Virtual Environments
    In Proc ACM UIST ‘96 (Symp. on User Interface Software and Technology), Seattle, WA, November 6–8, 1996, pp. 83–94. Language-Level Support for Exploratory Programming of Distributed Virtual Environments Blair MacIntyre and Steven Feiner Department of Computer Science, Columbia University, New York, NY, 10027 {bm,feiner}@cs.columbia.edu http://www.cs.columbia.edu/~{bm,feiner} Abstract resulted in an unmanageable welter of client-server relation- ships, with each of a dozen or more processes needing to We describe COTERIE, a toolkit that provides language- create and maintain explicit connections to each other and to level support for building distributed virtual environments. handle inevitable crashes. COTERIE is based on the distributed data-object paradigm for distributed shared memory. Any data object in COTE- We spent a sufficiently large portion of our time reengineer- RIE can be declared to be a Shared Object that is replicated ing client-server code that it became clear to us that our fully in any process that is interested in it. These Shared implementation of the client-server model was unsuitable Objects support asynchronous data propagation with atomic for exploratory programming of distributed research proto- serializable updates, and asynchronous notification of types. The heart of the problem, as we saw it, was a lack of updates. COTERIE is built in Modula-3 and uses existing support for data sharing that was both efficient and easy for Modula-3 packages that support an integrated interpreted programmers to use in the face of frequent and unantici- language, multithreading, and 3D animation. Unlike other pated changes.
    [Show full text]
  • Obliq, a Language with Distributed Scope
    Obliq A Language with Distributed Scope Luca Cardelli June 3, 1994 © Digital Equipment Corporation 1994 This work may not be copied or reproduced in whole or in part for any commercial purpose. Permis- sion to copy in whole or in part without payment of fee is granted for nonprofit educational and re- search purposes provided that all such whole or partial copies include the following: a notice that such copying is by permission of the Systems Research Center of Digital Equipment Corporation in Palo Alto, California; an acknowledgment of the authors and individual contributors to the work; and all applicable portions of the copyright notice. Copying, reproducing, or republishing for any other pur- pose shall require a license with payment of fee to the Systems Research Center. All rights reserved. Abstract Obliq is a lexically-scoped untyped interpreted language that supports distributed object-oriented computation. An Obliq computation may involve multiple threads of control within an address space, multiple address spaces on a machine, heterogeneous machines over a local network, and multiple net- works over the Internet. Obliq objects have state and are local to a site. Obliq computations can roam over the network, while maintaining network connections. Contents 1. Introduction ................................................................................................................................. 1 1.1 Language Overview ............................................................................................................
    [Show full text]
  • A Visual Programming Language for Data Flow Systems
    Rochester Institute of Technology RIT Scholar Works Theses 10-14-1988 A Visual Programming Language for Data Flow Systems Timothy J. Wilson Follow this and additional works at: https://scholarworks.rit.edu/theses Recommended Citation Wilson, Timothy J., "A Visual Programming Language for Data Flow Systems" (1988). Thesis. Rochester Institute of Technology. Accessed from This Thesis is brought to you for free and open access by RIT Scholar Works. It has been accepted for inclusion in Theses by an authorized administrator of RIT Scholar Works. For more information, please contact [email protected]. Rochester Institute of Technology School of Computer Science and Technology A Visual Programming Language for Data Flow Systems by Timothy J. Wilson A thesis submitted to The Faculty of the School of Computer Science and Technology in partial fulfillment of the requirements for the degree of Master of Science in Computer Science. Approved by: Dr. Peter Lutz 10-18-88 Dr. Andrew Kitchen 10-18-88 Dr. Peter Anderson 10-18-88 October 14, 1988 Abstract The concept ofvisual programming languages is described and some necessary terms are defined. The value of visual languages is presented and a number of different visual languages are described. Various issues, such as user interface design, are discussed. As an example of a visual programming language, a graphical data flow programming environment is developed for the Macintosh workstation which functions as a preprocessor to a data flow simulator developed at RIT. Examples are presented demonstrating the use of the language environment. Issues related to the devel opment of the programming environment are described and conclusions regarding the development ofvisual programming languages in general are presented.
    [Show full text]
  • Improving the Aircraft Design Process Using Web-Based Modeling and Simulation
    Reed. J.;I.. Fdiet7, G. .j. unci AJjeh. ‘-1. ,-I Improving the Aircraft Design Process Using Web-based Modeling and Simulation John A. Reed?, Gregory J. Follenz, and Abdollah A. Afjeht tThe University of Toledo 2801 West Bancroft Street Toledo, Ohio 43606 :NASA John H. Glenn Research Center 2 1000 Brookpark Road Cleveland, Ohio 44135 Keywords: Web-based simulation, aircraft design, distributed simulation, JavaTM,object-oriented ~~ ~ ~ ~~ Supported by the High Performance Computing and Communication Project (HPCCP) at the NASA Glenn Research Center. Page 1 of35 Abstract Designing and developing new aircraft systems is time-consuming and expensive. Computational simulation is a promising means for reducing design cycle times, but requires a flexible software environment capable of integrating advanced multidisciplinary and muitifidelity analysis methods, dynamically managing data across heterogeneous computing platforms, and distributing computationally complex tasks. Web-based simulation, with its emphasis on collaborative composition of simulation models, distributed heterogeneous execution, and dynamic multimedia documentation, has the potential to meet these requirements. This paper outlines the current aircraft design process, highlighting its problems and complexities, and presents our vision of an aircraft design process using Web-based modeling and simulation. Page 2 of 35 1 Introduction Intensive competition in the commercial aviation industry is placing increasing pressure on aircraft manufacturers to reduce the time, cost and risk of product development. To compete effectively in today’s global marketplace, innovative approaches to reducing aircraft design-cycle times are needed. Computational simulation, such as computational fluid dynamics (CFD) and finite element analysis (FEA), has the potential to compress design-cycle times due to the flexibility it provides for rapid and relatively inexpensive evaluation of alternative designs and because it can be used to integrate multidisciplinary analysis earlier in the design process [ 171.
    [Show full text]
  • Introduction to the Literature on Programming Language Design Gary T
    Computer Science Technical Reports Computer Science 7-1999 Introduction to the Literature On Programming Language Design Gary T. Leavens Iowa State University Follow this and additional works at: http://lib.dr.iastate.edu/cs_techreports Part of the Programming Languages and Compilers Commons Recommended Citation Leavens, Gary T., "Introduction to the Literature On Programming Language Design" (1999). Computer Science Technical Reports. 59. http://lib.dr.iastate.edu/cs_techreports/59 This Article is brought to you for free and open access by the Computer Science at Iowa State University Digital Repository. It has been accepted for inclusion in Computer Science Technical Reports by an authorized administrator of Iowa State University Digital Repository. For more information, please contact [email protected]. Introduction to the Literature On Programming Language Design Abstract This is an introduction to the literature on programming language design and related topics. It is intended to cite the most important work, and to provide a place for students to start a literature search. Keywords programming languages, semantics, type systems, polymorphism, type theory, data abstraction, functional programming, object-oriented programming, logic programming, declarative programming, parallel and distributed programming languages Disciplines Programming Languages and Compilers This article is available at Iowa State University Digital Repository: http://lib.dr.iastate.edu/cs_techreports/59 Intro duction to the Literature On Programming Language Design Gary T. Leavens TR 93-01c Jan. 1993, revised Jan. 1994, Feb. 1996, and July 1999 Keywords: programming languages, semantics, typ e systems, p olymorphism, typ e theory, data abstrac- tion, functional programming, ob ject-oriented programming, logic programming, declarative programming, parallel and distributed programming languages.
    [Show full text]
  • Automatic Data Visualization for Novice Pascal Programmers
    Automatic Data Visualization for Novice Pascal Programmers Brad A. Myers Ravinder Chandhok Atul Sareen Computer Science Department Camegie Mellon University Pittsburgh, PA 15213-3890 (412) 268-2565 [email protected] ABSTRACT were designed to explain important concepts, such as which dimension of a multi-dimensioned array comes first, and Previous work has demonstrated that presenting the data which types are assignment compatible. In addition, a structures from programs in a graphical manner can graphic artist participated in the design so the pictures will be significantly help programmers understand and debug their visually appealing. programs. In most previous systems, however, the graphical displays, called data visualizations, had to be laboriously Graphical presentations for data structures are important for a hand created. The Amethyst system, which runs on Apple number of reasons. Human information processing is clearly Macintosh computers, provides attractive and appropriate optimized for pictorial information, and pictures make the default displays for data structures. The default displays data easier to understand for the programmer. This will make include the appropriate forms for literals of the simple types program debugging and program comprehension easier, inside type-specific shapes, and stacked boxes for records because the pictures provide a higher level of abstraction that and arrays. In the near future, we plan to develop rules for removes a number of irrelevant details. In particular, some layout of simple dynamic data structures (like linked lists and of the programming concepts that students have particular binary trees), and simple mechanisms for creating difficulty with can be much better explained with pictures. customized displays.
    [Show full text]
  • Taxonomies of Visual Programming and Program Visualization
    Taxonomies of Visual Programming and Program Visualization Brad A. Myers September 20, 1989 School of Computer Science Carnegie Mellon University Pittsburgh, PA 15213-3890 [email protected] (412) 268-5150 The research described in this paper was partially funded by the National Science and Engineering Research Council (NSERC) of Canada while I was at the Computer Systems Research Institute, Univer- sity of Toronto, and partially by the Defense Advanced Research Projects Agency (DOD), ARPA Order No. 4976 under contract F33615-87-C-1499 and monitored by the Avionics Laboratory, Air Force Wright Aeronautical Laboratories, Aeronautical Systems Division (AFSC), Wright-Patterson AFB, OH 45433-6543. The views and conclusions contained in this document are those of the author and should not be interpreted as representing the of®cial policies, either expressed or implied, of the Defense Advanced Research Projects Agency of the US Government. This paper is an updated version of [4] and [5]. Part of the work for this article was performed while the author was at the University of Toronto in Toronto, Ontario, Canada. Taxonomies of Visual Programming and Program Visualization Brad A. Myers ABSTRACT There has been a great interest recently in systems that use graphics to aid in the programming, debugging, and understanding of computer systems. The terms ``Visual Programming'' and ``Program Visualization'' have been applied to these systems. This paper attempts to provide more meaning to these terms by giving precise de®nitions, and then surveys a number of sys- tems that can be classi®ed as providing Visual Programming or Program Visualization. These systems are organized by classifying them into three different taxonomies.
    [Show full text]
  • Comparative Programming Languages CM20253
    We have briefly covered many aspects of language design And there are many more factors we could talk about in making choices of language The End There are many languages out there, both general purpose and specialist And there are many more factors we could talk about in making choices of language The End There are many languages out there, both general purpose and specialist We have briefly covered many aspects of language design The End There are many languages out there, both general purpose and specialist We have briefly covered many aspects of language design And there are many more factors we could talk about in making choices of language Often a single project can use several languages, each suited to its part of the project And then the interopability of languages becomes important For example, can you easily join together code written in Java and C? The End Or languages And then the interopability of languages becomes important For example, can you easily join together code written in Java and C? The End Or languages Often a single project can use several languages, each suited to its part of the project For example, can you easily join together code written in Java and C? The End Or languages Often a single project can use several languages, each suited to its part of the project And then the interopability of languages becomes important The End Or languages Often a single project can use several languages, each suited to its part of the project And then the interopability of languages becomes important For example, can you easily
    [Show full text]
  • Developing Visualisations for Spreadsheet Formulae: Towards
    Developing visualisations for spreadsheet formulae: towards increasing the accessibility of science, technology, engineering and maths subjects LEITÃO, Roxanne and ROAST, Chris <http://orcid.org/0000-0002-6931-6252> Available from Sheffield Hallam University Research Archive (SHURA) at: http://shura.shu.ac.uk/8168/ This document is the author deposited version. You are advised to consult the publisher's version if you wish to cite from it. Published version LEITÃO, Roxanne and ROAST, Chris (2014). Developing visualisations for spreadsheet formulae: towards increasing the accessibility of science, technology, engineering and maths subjects. In: 9th Workshop on Mathematical User Interfaces, Coimbra, Portugal, 10 July 2014. Copyright and re-use policy See http://shura.shu.ac.uk/information.html Sheffield Hallam University Research Archive http://shura.shu.ac.uk Developing visualisations for spreadsheet formulae: towards increasing the accessibility of science, technology, engineering and maths subjects Roxanne Leitão and Chris Roast C3RI, Sheffield Hallam University {r.leitao, c.r.roast}@shu.ac.uk Abstract. Spreadsheets are widely used within Science, technology, engineer- ing and maths education. Despite their widespread use, end-user spreadsheet er- rors are still extremely common and have been shown to have an adverse effect on learning. The textual representation of formulas can be particularly complex and error-prone, exacerbating barriers to dyslexic users. Our work focuses on the design and development of a visual language to graphically represent spreadsheet formulae, with the objective of making them easier to understand than their default textual form. This work contributes to a body of human fac- tors research focused upon spreadsheets. Introduction It is estimated that 10% of the UK population is Dyslexic, with 4% being seriously affected (Association 2012).
    [Show full text]
  • Software Visualization in Prolog
    Software Visualization in Prolog Calum A. McK. Grant Queens’ College, Cambridge Dissertation submitted for the degree of Doctor of Philosphy December 1999 Copyright ­c Calum Grant 1999. Vmax and SVT are copyright ­c Calum Grant 1999. All rights reserved. Permission is hereby granted to distribute this document without modifica- tion in any format or electronic storage system. Declaration This dissertation is the result of my own work and includes nothing which is the outcome of work done in collaboration. I hereby declare that my dissertation/thesis entitled Software Visualization in Prolog is not substantially the same as any that I have submitted for a degree or diploma or other qualification at any other University. I further state that no part of my dissertation/thesis has already been or is being concurrently submitted for any such degree, diploma or other qualification. This dissertation is approximately 44 000 words long, excluding appendices. Acknowledgments Thanks to everyone who has helped me complete this work, and in particular Peter Robinson my supervisor, the EPSRC for funding this work, the proof-readers, and all members of the Rainbow Group for their help and ideas. Thanks also to the departmental secretaries and to my parents. Trademarks AVS Express is a registered trademark of Advanced Visual Systems, Inc. Borland is a registered trademark of Inprise Corp. C++ Builder is a trademark of Inprise Corp. Delphi is a trademark of Inprise Corp. Genitor is a registered trademark of Genitor Corp. IBM Visualization Data Explorer is a trademark of International Business Machines, Inc. Java is a trademark of Sun Microsystems, Inc.
    [Show full text]
  • A User-Centred Approach to Functions in Excel
    A User-Centred Approach to Functions in Excel 30th June 2003 Simon Peyton Jones Alan Blackwell Margaret Burnett Microsoft Research, Cambridge Cambridge University Oregon State University [email protected] [email protected] [email protected] Abstract 1 Introduction We describe extensions to the Excel spreadsheet that integrate user- For many people, the programming language of choice is a spread- defined functions into the spreadsheet grid, rather than treating sheet. This is especially true of people who are not employed as them as a “bolt-on”. Our first objective was to bring the benefits of programmers, but write programs for their own use — often defined additional programming language features to a system that is often as “end-user” programmers [Nar93]. An end-user programmer is a not recognised as a programming language. Second, in a project in- teacher, an engineer, a physicist, a secretary, an accountant, a man- volving the evolution of a well-established language, compatibility ager, in fact almost anything except a trained programmer. These with previous versions is a major issue, and maintaining this com- people use computers to get their job done, but often they are not patibility was our second objective. Third and most important, the interested in programming per se. End-user programmers outnum- commercial success of spreadsheets is largely due to the fact that ber professional programmers, and their numbers are projected to many people find them more usable than programming languages increase more rapidly; in fact, the number of end-user programmers for programming-like tasks. Thus, our third objective (with result- in the U.S.
    [Show full text]
  • Developing Visualisations for Spreadsheet Formulae: Towards Increasing the Accessibility of Science, Technology, Engineering and Maths Subjects
    Developing visualisations for spreadsheet formulae: towards increasing the accessibility of science, technology, engineering and maths subjects Roxanne Leitão and Chris Roast C3RI, Sheffield Hallam University {r.leitao, c.r.roast}@shu.ac.uk Abstract. Spreadsheets are widely used within Science, technology, engineer- ing and maths education. Despite their widespread use, end-user spreadsheet er- rors are still extremely common and have been shown to have an adverse effect on learning. The textual representation of formulas can be particularly complex and error-prone, exacerbating barriers to dyslexic users. Our work focuses on the design and development of a visual language to graphically represent spreadsheet formulae, with the objective of making them easier to understand than their default textual form. This work contributes to a body of human fac- tors research focused upon spreadsheets. Introduction It is estimated that 10% of the UK population is Dyslexic, with 4% being seriously affected (Association 2012). Regarding Dyscalculia, there are an estimated 3 million people in the UK who are affected, with 5% of school and higher education learners challenged by it. Dyslexic learners face a number of challenges related to reading, writing and numeracy skills (Association 2013), and may therefore find significant barriers when looking towards developing their education in numerate disciplines such as science, technology, engineering and mathematics (STEM). One tool common to establishing confidence and educational progress in STEM subjects is the spreadsheet. Widely used in work and education (Chambers and Scaffidi 2010), at school level and in higher education, the spreadsheet is a core generic tool to understanding in numerate subjects.
    [Show full text]