Allegro CL Certification Program Lisp Programming Series Level I Session 1.1.4 Basic Lisp Development in the IDE.

Slides:



Advertisements
Similar presentations
6 Copyright © 2005, Oracle. All rights reserved. Building Applications with Oracle JDeveloper 10g.
Advertisements

N ATIONAL E NERGY R ESEARCH S CIENTIFIC C OMPUTING C ENTER TotalView on the T3E and IBM SP Systems NERSC User Services June 12, 2000.
Introduction to Eclipse. Start Eclipse Click and then click Eclipse from the menu: Or open a shell and type eclipse after the prompt.
Getting started with MPLAB Launch MPLAB Set Toolbar as in the next slide by clicking the leftmost icon Open a new Source file by choosing [FILE][NEW] Type.
Copyright  Oracle Corporation, All rights reserved. 1 Creating an Application: The AppBuilder for Java IDE.
COMPUTER PROGRAMMING I Essential Standard 5.02 Understand Breakpoint, Watch Window, and Try And Catch to Find Errors.
Using XCode © 2013 Surajit A Bose De Anza College.
Georgia Institute of Technology DrJava Appendix A Barb Ericson Georgia Institute of Technology May 2006.
Software Language Levels Machine Language (Binary) Assembly Language –Assembler converts Assembly into machine High Level Languages (C, Perl, Shell)
Integrated Development Environments. Today We Will: Go over more advanced functionality of Eclipse. Break up into teams to work on presentation and final.
Ten debugging techniques. The execution process Execution proceeds in a standard series of steps Compute values of subexpressions first Then call value.
The IDE (Integrated Development Environment) provides a DEBUGGER for locating and correcting errors in program logic (logic errors not syntax errors) The.
Visual Basic Debugging Tools Appendix D 6/27/20151Dr. Monther Aldwairi.
Chapter 2 Software Tools and Assembly Language Syntax.
Allegro CL Certification Program Lisp Programming Series Level I Session Top Ten Things to Know.
Debugging applications, using properties Jim Warren – COMPSCI 280 S Enterprise Software Development.
Introduction to Graphical User Interfaces. Objectives * Students should understand what a procedural program is. * Students should understand what an.
Introduction to Visual Basic. Quick Links Windows Application Programming Event-Driven Application Becoming familiar with VB Control Objects Saving and.
Chapter 3 Introducing Visual Basic.NET. 3.1 Visual Basic.NET Windows Programming -Used to create Windows, Web, and Console applications -Uses predefined.
PROGRAMMING IN VISUAL BASIC.NET VISUAL BASIC BUILDING BLOCKS Bilal Munir Mughal 1 Chapter-5.
Using Harlequin LispWorks. Using LispWorks On BURKS 5, the file is lwper410.exe Start up LispWorks; you get two windows –Listener 1 –LispWorks Personal.
Debugging Projects Using C++.NET Click with the mouse button to control the flow of the presentation.
Author: Loh Jianxiong Christopher Editors: Chua Jie Sheng, Li Mengran, Peh Shao Hong, Oo Theong Siang.
Chapter 9: MuPAD Programming II Procedures MATLAB for Scientist and Engineers Using Symbolic Toolbox.
 Application – another name for a program.  Interface – is what appears on the screen when the application is running.  Program Code – is instructions.
CPSC1301 Computer Science 1 Overview of Dr. Java.
Our Environment We will exercise on Microsoft Visual C++ v.6 We will exercise on Microsoft Visual C++ v.6 because that is what we have in the univ. because.
Debugging. 2 © 2003, Espirity Inc. Module Road Map 1.Eclipse Debugging  Debug Perspective  Debug Session  Breakpoint  Debug Views  Breakpoint Types.
Chapter 19: Visual Lisp. After completing this Chapter, you will be able to do the following: What is AutoLISP Launching Visual LISP Terminology and Fundamental.
Active-HDL Interfaces Debugging C Code Course 10.
Iterative Constructs Review l What are named constants? Why are they needed? l What is a block? What is special about declaring a variable inside a block?
1 Κατανεμημένες Διαδικτυακές Εφαρμογές Πολυμέσων Γιάννης Πετράκης.
Presented by IBM developer Works ibm.com/developerworks/ 2006 January – April © 2006 IBM Corporation. Making the most of The Eclipse debugger.
The Debugger and Inspector Two very useful tools available in Common Lisp are the debugger and inspector –Using them is partially implementation dependent,
Using Microsoft Visual Studio C++ Express 2005 Name: Dr Ju Wang Ashwin Belle Course Resource:
Programmable Logic Training Course HDL Editor
Centric features In this presentation… –macro capabilities more sophisticated functionality –advanced macro features Inspector Debugging error trapping.
IDLE An IDE for Python bundled with the program release Click on IDLE (Python GUI) in the Start menu under the Python program group  Get the IDLE Python.
1 Debugging and Syntax Errors in C++. 2 Debugging – a process of finding and fixing bugs (errors or mistakes) in a computer program.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 1 Slide 1 What we'll cover here l Using the debugger: Starting the debugger Setting.
© Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Tutorial 3 – Inventory Application: Introducing Variables,
Compiling “premature optimization is the root of all evil.” -Donald Knuth.
Author: Loh Jianxiong Christopher Contributions: Chua Jie Sheng, Li Mengran, Peh Shao Hong, Oo Theong Siang, Tong Chun Kit, Tania Chattopadhyay.
1 Printing in Python Every program needs to do some output This is usually to the screen (shell window) Later we’ll see graphics windows and external files.
Debugging tools in Flash CIS 126. Debugging Flash provides several tools for testing ActionScript in your SWF files. –The Debugger, lets you find errors.
Visual Basic Integrated Development Environment (IDE) 56:150 Information System Design.
Netbeans QuickStart. Creating a project File->New Project –For now you want General->Java Application –Then fill in the project details.
Editing and Debugging Mumps with VistA and the Eclipse IDE Joel L. Ivey, Ph.D. Dept. of Veteran Affairs OI&T, Veterans Health IT Infrastructure & Security.
 Wind River Systems, Inc Chapter - 4 CrossWind.
Debugging using By: Samuel Ashby. What is debugging?  A bug is an error in either a program or the hardware itself.  Debugging is first locating and.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This training course demonstrates the use of the High-performance.
1 CS 192 Lecture 4 Winter 2003 December 8-9, 2003 Dr. Shafay Shamail.
Multiple Forms and Menus
Appendix A Barb Ericson Georgia Institute of Technology May 2006
Appendix A Barb Ericson Georgia Institute of Technology May 2006
Debugging Dwight Deugo
Testing and Debugging.
Chrome Developer Tools
Important terms Black-box testing White-box testing Regression testing
Important terms Black-box testing White-box testing Regression testing
Starting a project in VisualDSP++
Homework Any Questions?.
Our Environment We will exercise on Microsoft Visual C++ v.6
Debugging Visual Basic Programs
Debugging Dwight Deugo
Debugging.
Allegro CL Certification Program
Workshop for Programming And Systems Management Teachers
Presentation transcript:

Allegro CL Certification Program Lisp Programming Series Level I Session Basic Lisp Development in the IDE

Starting the IDE From the Windows start menu, start the development environment The windows you get: –Menu bar across the top –Debug window –Untitled Edit window –Form window –Inspect window

Creating a Source File Find the Edit window (which is initially titled Untitled) –View > Editor Initially, there is a tab named Untitled. (If there is not, create one via File > New.) Enter the following source code: (in-package :user) (defun square (x) (* x x)) –Note the cursors help balance parentheses

Warning Put all important source code into files Don’t type source code into the debug window! –It won’t be saved if you exit Allegro! –Use debug window only for performing small experiments

Compile Your Code Click on the “truck” icon to compile and load the current source file OR Click on the (=>) icon to compile the definition under the cursor

Run Your Code Bring up the Debug window Change to the package where the symbols in your application live Run the new function CG-USER(5): (in-package :user) # CL-USER(6): (square 7) 49 CL-USER(7):

Debug your code Type (squar 7) into the debug window –Function name is intentionally misspelled Error: attempt to call 'SQUAR' which is an undefined function. You can –Invoke Selected Restart Pick from a menu of predefined error handlers –Debug Starts the Lisp Debugger –Abort Exits the debugger and returns you back to the top level This is the same as the "Return to Top Level" restart

The Lisp Debugger Click 'Debug' on the error window to get here Button bar across top –Click on the big “X” to get back to top level Display area shows call stack –The bottom of the call stack shows the functions being used by the IDE itself to evaluate the line of code you just typed Debug area for evaluating expressions in the current environment

What You Can And Can't Do You can see the call stack, including values of all the arguments You can to see local variables, given the proper declaration (defun foo (x) (declare (optimize (debug 3))) (let ((y (cons 2 3))) (cons x y))) You can't step line-by-line through your source code

How to Set a Breakpoint (defun foo (x) (declare (optimize (debug 3))) (let ((y (cons 2 3))) (BREAK) (cons x y)))

Tracing Function Execution Put this in your source file: (defun add (a b) (+ a b)) (defun sum-squares (x y) (add (* x x) (* y y))) Type three things to the debug window: (trace add) (trace sum-squares) (sum-squares 3 4)

Interpreting Trace Output 0[1]: (SUM-SQUARES 3 4) 1[1]: (ADD 9 16) 1[1]: returned 25 0[1]: returned 25 The first line shows SUM-SQUARES being called with arguments 3 and 4. The second line shows that within the scope of SUM- SQUARES, the function ADD is being called with arguments 9 and 16 The third line shows the function ADD returns the value 25 The fourth line shows the function SUM-SQUARES returns the value 25

The Lisp Compiler (disassemble # 'square) –Shows the assembly instructions generated by the compiler Instructions depend on your OS *.fasl files encode this information *.lisp files are portable to multiple OS, but not *.fasl files.

Declarations Data types of variables are not (usually) declared, e.g. –int a = 0; OR Dim a as Integer Data type of function return value is not declared Arithmetic is generic –You can add an integer to a double-float Compiler doesn’t warn you about data type problems You can optionally declare data types to eliminate generic arithmetic and speed things up