This Item Was Submitted to Loughborough University As A

Total Page:16

File Type:pdf, Size:1020Kb

This Item Was Submitted to Loughborough University As A This item was submitted to Loughborough University as a Masters thesis by the author and is made available in the Institutional Repository (https://dspace.lboro.ac.uk/) under the following Creative Commons Licence conditions. For the full text of this licence, please go to: http://creativecommons.org/licenses/by-nc-nd/2.5/ .- LOUGHBOROUGH UNIVERSITY OF TECHNOLOGY t LIBRARY AUTHOR/FILING TITLE ~fIT)j-,-h _e __ _________________________ -;'-- ___ _ F --ACC-ES-SIO-NiCOPY--NO~------ ---- --- ---- --- -,----~ __QJ tJ_'i o_S J~! _________ -- ---- -_-- VOL. NO. CLASS MARK t- of\f\l (of' , ...... '( J \t •·-....0 0 ,/• THE DESIGN OF A FIRST COURSE IN PROGRAMMING by Michael P. Brady B.Sc., H.D.E. A Master's Thesis Submitted in partial fulfilment of the requirements for the award of M. Phil. of the Loughborough University of Teohnology MAY 1986 @ by Miohael P. Brady B.So., H.D.E 1986 Supervisor Professor A.C. Bajpai, Director of C.A.M.E.T. and Head of the 'Department of Engineering Mathematics, Loughborough University of Technology. Local Supervisor Dr ..John O'Donoghue, Head of Mathematics, Thornond College, Limerick, Ireland. The Design of a First Course in Programming Michael P. Brady =========================================== ---------------- THESIS ABSTRACT A course was designed to teach Top-Down programming to second level students who had no previous computer experience. The purposes of the course were a) to enable them to become computer literate and b) to develop their problem-solving ability. The course was designed to teach programming in a manner which was independent of any particular programming language or machine. This approach was prompted by dissatisfaction with traditional courses which generally concentrate on the syntax and semantics of a particular programming language, at the expense of developing important underlying concepts. Initially, a review of the history of programming languages was carried out to identify the essential elements of programming. This review found that there was general agreement about the fundamental importance of structure and that it was not necessary to use all of the control constructs contained in the available languages (BASIC, COMAL and PASCAL). Both a mini-language; containing just two control structures, and a diagrammatic representation (structure diagrams) of the mini-language were then designed. The chosen control structures were IF/THEN/ELIF/ELSE for selection and a WHILE loop for iteration. The students were trained to solve problems using the mini-language and structure diagrams and were supplied with translation rules to convert their solutions into COMAL. Translation rules were also drawn up for PASCAL and BASIC. The course was tested with girls aged 15 and 16 years in a Dublin secondary school. These trials showed that the method may be used successfully with students of this age . •• j j j j · -' j j j j j j j .---~-.--. .. ~. - .-. j j , - j j j j j j j j j The Design of a First Course in Programming Michael P. Brady ------------------------------------------- ================ KEYWORDS Top-Down Analysis Structured Programming Control Structures Mini-Language Structure Diagrams Problem-Solving Second Level Students ACKNOWLEDGMENTS --------------- I wish to express my gratitude to Professor A.C. Bajpai for providing me with this research opportunity and for his support. I also wish to thank my local supervisor, Dr. John O'Donoghue of Thomond College Limerick, for his practical advice and for his constant interest in the project. I wish to thank the staff of the Holy Faith Secondary School, The Coombe, Dublin for their co-operation. In particular I would like to thank Sister Aideen, who made the school's computer facilities available to me at all times. Mia Delaney. who provided much background information, and Christina Nult;,'. who offered many helpful suggestions 1n preparing the manuscript. I would especially like to thank Mari ta McGrath who helped teach the course and whc offered much constructive advice and support. Finally, I would like to thank my wife, Bridin, whose constant support and encouragement were invaluable. TABLE OF CONTENTS ------------------ CHAPTER 1 INTRODUCTION 1 CHAPTER 2 HISTORICAL BACKGROUND 10 2.1 I~r~uction 10 2.2 The 1950s 10 2.3 The 1960s 14 2.4 Structured Programming 15 2.5 Computers in Education 18 2.6 The Irish Situation 23 CHAPTER 3 EDUCATIONAL ROLE OF STRUCTURED PROGRAMMING 27 3.1 Introduction 27 3.2 Structured Programming 28 3.2.1 Problem Definition 29 3.2.2 Top-Down Desi~n 29 3.2.3 Control Structures 32 3.2.4 Coding Style 33 3.3 Structured Programming ln Education 34 CHAPTER 4 DESIGN OF A SUITABLE MINI-LANGUAGE 37 4.1 Languages for Beginners' Courses 37 4.2 The Need for a Mini-Language 39 4.3 Mini-Language Definition 41 4.3.1 Iterative Structures 41 4.3.2 Decision Structures 44 4.3.3 Other Statements and Structures 45 4.4 Diagrammatic Representation of Program Design 46 4.4.1 Flowcharts 46 4.4.2 Pseudocode 47 4.4.3 Structure Diagrams 48 4.5 Translation of Diagrams into Programming Languages 50 4.5.1 Translation of Sequential Statements 51 4.5.2 Translation of the Conditional Control Structure 53 4.5.3 Translation of the Iterative Control Struct'lre 56 4.6 Choice of Implementation Language 58 CHAPTER 5 REVIEW OF THE AVAILABLE TEXTBOOKS 61 5.1 Introduction 61 .5.2 Basic ~omputer Programming for Students [51] 62 5.2.1 Flowcharts 62 .5.2.2 Selection and Iteration 64 5.2.3 Advanced BASIC 70 5.3 Foundations in Computer Studies with COMAL [49] 71 5.3.1 Selection 71 5.3.2 Iteration 74 5.3.3 Structure Diagrams 78 5.4 Structured Programming With COMAL [·50] 79 5.4.1 Iteration 82 5.4.2 Selection 83 5.5 Beginning CO MAL [52] 84 5.6. The Design and Use of Structured Algorithms [7] 85 5.7 Conclusion 90 CHAPTER 6 PROJECT RATIONALE 91 6.1 School and Student Background 91 6.2 Aims of the Course 95 6.3 Outline of the Syllabus 96 6.4 The Fifth Year Course 98 6.4.1 Developing the Concept of a Computer System 98 6.4.2 Variables, Input, Assignment and Output 98 6.4.3 Struct.ure Diagrams 100 6.4.4 The Conditional Control Structure 101 6.4.5 The Iterative Control Structure 102 6.4.6 Procedures 103 6.5 The Sixth Year Course 104 6.5.1 Arrays 105 6.6 Conclusion 106 CHAPTER 7 IMPLEMENTATION OF THE COURSE 107 7.1 Developing the Concept of a Computer System 107 7.2 The Concept of a Variable 110 7.3 The Assignment Statement 110 7.4 Input and Output Statements 112 7.5 Structure Diagrams 113 7.6 Top-Down Method 116 7.7 The Conditional Control Structure 119 7.7. 1 Rules for Translation of IF Statements into COMAL 120 7.7.2 Boolean Operators 121 7.8 The Iterative Control Structure 125 7.8. 1 Rules f9r Translation of Iterative Structure into COMAL 125 7.8.2 Fixed Iteration vs. Indefinite Iteration 127 7.8.3 General Method for Constructing Loops 130 7.8.4 Loops to Add Numbers 130 7.8.5 Problems Involving READ/DATA Statements 133 7.8.6 More Difficult Looping Problems 136 7.9 Procedures 138 7.9.1 Coding Style 141 7.9.2 Library Procedures 143 7.10 General Approach to Lllr~e Problems 145 7. 11 The Sixth Year Course 151 7.11.1 Introduction to Arl'IlYs 151 7.11.2 String Handling Functions 155 7.11.3 Arrays of Strings 157 7.11. 4 Sorting -Arrays 161 CHAPTER 8 EVALUATION OF THE COURSE 165 8.1 Introduction 165 8.2 The Metanic COMAL System 165 8.3 The Concept of a Computer System 166 8.4 Variables 166 8.4.1 String Variables 167 8.5 The INPUT Statement 169 8.6 Types of Problems for Exercises 170 8.7 Structure Diagrams 170 8.8 The Conditional Control Structure 173 8.8.1 Use of an ELSE Branch in IF Statements 175 8.8.2 The Use of 'Explicit' Boolean Conditions 176 8.8.3 De Morgan' s Law 179 8.9 The Iterative Control Structure 181 8.10 Procedures 181 8.11 Arrays 182 8.12 Projects 185 8.13 The Use of Structure Diagrams in Mathematics 190 Chapter 9 CONCLUSIONS 198 APPENDIX A Programming Course Notes 205 APPENDIX B Some Demonstration Programs 219 APPENDIX C Student Projects 227 APPENDIX D Mathematics Course Notes 234 APPENDIX E How To Use The Accompanying Disk 237 REFERENCES 239 CHAPTER 1 --------- INTRODUCTION ------------ A recent survey of Irish schools [1] concluded that many of our school leavers are computer illiterate. This is clearly undesirable in a society which is increasingly influenced by information technology and in which the rate of technological innovation is so rapid. The need for familiarisation with the new technology as part of the curriculum is now generally recognised. The government has expressed the hope that encouragement will be given to the promotion of the study of computers as part of the school curriculum [2] and has begun this process by including Computer Studies modules in both the Intermediate and Leaving Certificate programmes and by arranging for the supply of computing equipment to all second level schools. This view, that education should embrace the new technologies, has been endorsed by the recently formed Curripulum and Examinations Board [3] and by many other bodies representing teachers at all levels of education. The broad goal of all computer education is to provide students with an understanding of the operation and applications of computers and to alert them to the limitations and difficulties associated with the new technology.
Recommended publications
  • PL/SQL Multi-Diagrammatic Source Code Visualization
    SQLFlow: PL/SQL Multi-Diagrammatic Source Code Visualization Samir Tartir Ayman Issa Department of Computer Science University of the West of England (UWE), University of Georgia Coldharbour Lane, Frenchay, Bristol BS16 1QY Athens, Georgia 30602 United Kingdom USA Email: [email protected] Email: [email protected] ABSTRACT: A major problem in software introducing new problems to other code that was perfectly maintenance is the lack of a well-documented source code working before. Therefore, educating programmers about in software applications. This has led to serious the behaviors of the target code before start modifying it difficulties in software maintenance and evolution. In is not an easy task. Source code visualization is one of the particular, for those developers who are faced with the heavily used techniques in the literature to overcome this task of fixing or modifying a piece of code they never lack of documentation problem, and its consequent even knew existed before. Database triggers and knowledge-sharing problem [7, 9]. procedures are parts of almost every application, are typical examples of badly documented software Therefore, this research aims at investigating the current components being the hidden back end of software database source code visualization tools and identifying applications. Source code visualization is one of the the main open issues for research. Consequently, the heavily used techniques in the literature so as to mostly used PL/SQL database programming language has familiarize software developers with new source code, been selected for a flowcharting reverse engineering and compensate for the knowledge-sharing problem. prototype tool called "SQLFlow". SQLFlow has been Therefore, a new PL/SQL flowcharting reverse designed, implemented, and tested to parse the target engineering tool, SQLFlow, has been designed and PL/SQL code stored in database procedures, analyze its developed.
    [Show full text]
  • A Prolog-Based Proof Tool for Type Theory Taλ and Implicational Intuitionistic-Logic
    A Prolog-based Proof Tool for Type Theory TAλ and Implicational Intuitionistic-Logic L. Yohanes Stefanus University of Indonesia Depok 16424, Indonesia [email protected] and Ario Santoso∗ Technische Universit¨atDresden Dresden 01187, Germany [email protected] Abstract Studies on type theory have brought numerous important contributions to computer science. In this paper we present a GUI-based proof tool that provides assistance in constructing deductions in type theory and validating implicational intuitionistic-logic for- mulas. As such, this proof tool is a testbed for learning type theory and implicational intuitionistic-logic. This proof tool focuses on an important variant of type theory named TAλ, especially on its two core algorithms: the principal-type algorithm and the type inhabitant search algorithm. The former algorithm finds a most general type assignable to a given λ-term, while the latter finds inhabitants (closed λ-terms in β-normal form) to which a given type can be assigned. By the Curry{Howard correspondence, the latter algorithm provides provability for implicational formulas in intuitionistic logic. We elab- orate on how to implement those two algorithms declaratively in Prolog and the overall GUI-based program architecture. In our implementation, we make some modification to improve the performance of the principal-type algorithm. We have also built a web-based version of the proof tool called λ-Guru. 1 Introduction In 1902, Russell revealed the inconsistency in naive set theory. This inconsistency challenged the foundation of mathematics at that time. To solve that problem, type theory was introduced [1, 5]. As time goes on, type theory becomes widely used, it becomes a logician's standard tool, especially in proof theory.
    [Show full text]
  • DOCUMENT RESUME Basic Programming II
    DOCUMENT RESUME ED 280 432 IR 012 568 TITLE Basic Programming II: Course Guide; Revised Edition; INSTITUTION Hawaii State Dept; of Education; Honolulu; Office of Instructional Services; REPORT NO RS-86-9863 PUB DATE Jun 86 NOTE 205p; PUB TYPE Guides Classroom Use Guides (For Teachers) (052) Computer Programs (101) Reports Descriptive (14I) EDRS PRICE MFOI/PC09 Plus Postage; DESCRIPTORS Business Education; Classification; Computer Graphics; *Computer Literacy; Computer Science Education; Course Descriptions; *Course Objectives; Ethics; *Learning Activities; Mathematics Instruction; *Microcomputers; *Programing; Programing Languages;_Resource Materials; Secondary Education; State Curriculum Guides; *Teaching Methods IDENTIFIERS *BASIC Programing Language ABSTRACT This guide is designed to provide teachers with guidelines and suggested activities for teaching a one-semester advanced programming course7-BASIC Programming II--for the ninth through twelfth gradesAlthough primarily oriented toward _ mathematics_the guide does offer sample applications in_business that also_address the needs of students with_a variety of_academic_ backgrounds._Intended to serve as a framework of goals and activities upon which the teacher can organizei_build, and expand his or her course, the_guide provides a course description, course requirements, a course outline, a syllabus, course management considerations, sample_activities and programs, and suggested resources. The activities include teaching strategies for introducing_concepts, developing specific skills,
    [Show full text]
  • LIGO Data Analysis Software Specification Issues
    LASER INTERFEROMETER GRAVITATIONAL WAVE OBSERVATORY - LIGO - CALIFORNIA INSTITUTE OF TECHNOLOGY MASSACHUSETTS INSTITUTE OF TECHNOLOGY Document Type LIGO-T970100-A - E LIGO Data Analysis Software Specification Issues James Kent Blackburn Distribution of this draft: LIGO Project This is an internal working document of the LIGO Project. California Institute of Technology Massachusetts Institute of Technology LIGO Project - MS 51-33 LIGO Project - MS 20B-145 Pasadena CA 91125 Cambridge, MA 01239 Phone (818) 395-2129 Phone (617) 253-4824 Fax (818) 304-9834 Fax (617) 253-7014 E-mail: [email protected] E-mail: [email protected] WWW: http://www.ligo.caltech.edu/ Table of Contents Index file /home/kent/Documents/framemaker/DASS.fm - printed July 22, 1997 LIGO-T970100-A-E 1.0 Introduction The subject material discussed in this document is intended to support the design and eventual implementation of the LIGO data analysis system. The document focuses on raising awareness of the issues that go into the design of a software specification. As LIGO construction approaches completion and the interferometers become operational, the data analysis system must also approach completion and become operational. Through the integration of the detector and the data analysis system, LIGO evolves from being an operational instrument to being an operational grav- itational wave detector. All aspects of software design which are critical to the specifications for the LIGO data analysis are introduced with the preface that they will be utilized in requirements for the LIGO data analysis system which drive the milestones necessary to achieve this goal. Much of the LIGO data analysis system will intersect with the LIGO diagnostics system, espe- cially in the areas of software specifications.
    [Show full text]
  • IDE-JASMIN an Interactive Graphical Approach for Parallel Programming in Scientific Computing
    IDE-JASMIN An Interactive Graphical Approach for Parallel Programming in Scientific Computing Liao Li, Zhang Aiqing, Yang Zhang, Wang Wei and Jing Cuiping Institute of Applied Physics and Computational Mathematics, No. 2, East Fenghao Road, Beijing, China Keywords: Parallel Programming, Integrator Component, Integrated Development Environment, Structured Flow Chart. Abstract: A major challenge in scientific computing lays in the rapid design and implementation of parallel applications for complex simulations. In this paper, we develop an interactive graphical system to address this challenge. Our system is based on JASMIN infrastructure and outstands three key features. First, to facilitate the organization of parallel data communication and computation, we encapsulate JASMIN integrator component models as user-configurable components. Second, to support the top-down design of the application, we develop a structured-flow-chart based visual programming approach. Third, to finally generate application code, we develop a powerful code generation engine, which can generate major part of the application code using information in flow charts and component configurations. We also utilize the FORTRAN 90 standard to assist users write numerical kernels. These approaches are integrated and implemented in IDE-JASMIN to ease parallel programming for domain experts. Real applications demonstrate that our approaches for developing complex numerical applications are both practical and efficient. 1 INTRODUCTION data access and manipulation, respectively. Using JASMIN, users need implement several subclasses “J Adaptive Structured Meshes applications of strategy classes in C++ language though they Infrastructure” (JASMIN) is an infrastructure for mainly focus on writing numerical subroutine in structured mesh and SAMR applications for FORTRAN. numerical simulations of complex systems on The limited popularization of JASMIN is parallel computers (Mo et al., 2010).
    [Show full text]
  • David T. Craig 941 Calle Mejia # 509, Santa Fe, New Mexico 87501 Home (505) 820-0358 Compuserve 71533,606
    ------------------------------------------------------- David T. Craig 941 Calle Mejia # 509, Santa Fe, New Mexico 87501 Home (505) 820-0358 CompuServe 71533,606 ------------------------------------------------------- Mr. Jef Raskin 8 Gypsy Hill Pacifica CA 94044 Re: Canon Cat and SwyftCard information Dear Mr. Raskin: Enclosed is a photocopy of the Canon Cat article that I wrote for the Historical Computer Society. The printed article is much better than the draft that you saw. Thanks for your help. Unfortunately, I was unable to obtain copies of all of your various articles concerning the Cat and Information Appliance. I did finally receive your LEAP paper from my local public library via inter-library loan, but the library could not locate your Venture Vulture paper. I received the LEAP paper after I had sent the final Cat paper for publication so was not able to correctly document LEAP's technology. In an e-mail to me from at least a month ago you said that if I sent you an envelope large enough for a SwyftCard and return postage that you would send me one. Please use the envelope that I've sent this letter in for this purpose. You should also find here self-sticking stamps for the postage and a mailing label with my mailing address. I would also very much like, if possible, to obtain a user's manual for the SwyftCard. From your comments in Microsoft's book Programmers at Work this manual seems to be very well written. There is no rush in returning this envelope so please take your time. I am slowly updating my Cat paper to add a correct description of LEAP and more information about the people behind the Cat and its hardware and software.
    [Show full text]
  • Retrocomputer Magazine
    Jurassic News Retrocomputing: Buon compleanno tre scuole di Spectrum! pensiero, un solo movimento C R La storia del BASIC A Y 1 Le mostre Torino: Steve Jobs 1955-2011 Bertiolo 2012 Apple Club: il miniBASIC Trento: Era domani Retrocomputer Magazine Anno 7 - Numero 41 - Maggio 2012 Collophon I dati editoriali della rivista Jurassic News Jurassic News Rivista aperiodica di Retrocomputer Jurassic News Coordinatore editoriale: Tullio Nicolussi [Tn] E’ una fanzine dedicata al retro- Redazione: computing nella più ampia accezione del [email protected] termine. Gli articoli trattano in generale dell’informatica a partire dai primi anni Hanno collaborato a questo numero: ‘80 e si spingono fino ...all’altro ieri. Besdelsec [Bs] Lorenzo [L2] La pubblicazione ha carattere Sonicher [Sn] puramente amatoriale e didattico, tutte Salvatore Macomer [Sm] Lorenzo Paolini [Lp] le informazioni sono tratte da materiale Giovanni [jb72] originale dell’epoca o raccolte su Internet. Antonio Tierno Cecilia Botta Normalmente il materiale originale, Moira Bertolini anche se “giurassico” in termini Felice Pescatore informatici, non è privo di restrizioni di Luca Papinutti utilizzo, pertanto non sempre è possibile Damiano Cavicchio Massimo Cellini riportare per intero articoli, foto, schemi, listati, etc…, che non siano esplicitamente Diffusione: liberi da diritti. La rivista viene diffusa in formato PDF via Internet agli utenti E’ possibile che parti del materiale registrati sul sito: pubblicato derivi da siti internet che non sono citati direttamente negli articoli. www.jurassicnews.com. Questo per la difficoltà di attribuzione del Contatti: materiale alla fonte originale; eventuali [email protected] segnalazioni e relative notifiche sono benvenute. Copyright: I marchi citati sono di copyrights La redazione e gli autori degli dei rispettivi proprietari.
    [Show full text]
  • Design and Implementation of Single Node Noc Router Using Small Side
    ISSN 2278-3091 Volume 9, No.4, July – August 2020 Priti ShahaneInternational, International Journal Journal of Advanced of TrendsAdvanced in Computer Trends Science and in Engineering,Computer 9(4), Science July – August and 2020, Engineering 5700 – 5709 Available Online at http://www.warse.org/IJATCSE/static/pdf/file/ijatcse222942020.pdf https://doi.org/10.30534/ijatcse/2020/2 22942020 Design and Implementation of Single Node NoC Router using Small Side Buffer in Input Block and iSLIP Scheduler Priti Shahane1 1Symbiosis Institute of Technology, Symbiosis International (Deemed University) Pune, India, [email protected] as slave devices. The standard bus based device has a ABSTRACT limitation of scalability and turns into a bottleneck in a complex system. Shared bus for example AMBA bus as well as Network on chip (NoC) has been recommended as an IBM’s core connects becomes overloaded fast when more emerging alternative for scalability and performance needs of number of master modules is connected to it. To overcome next generation System on chips (SoCs). NoCs are actually this problem, Network on chip (NoC) is suggested as a forecast to solve the bus based interconnection problem of SoC communication subsystem among various IP cores of a SoC. NoC has emerged as an effective and scalable communication where large numbers of Intellectual property modules (IPs) are centric approach to solving the interconnection problem for incorporated on a single chip for much better results. NoC such architecture [1]-[3]. The NoC structure consists of 4 provides a solution for communication infrastructure for SoC. major components specifically routers, link and network The router is a foremost element of NoC which significantly interface and IP modules.
    [Show full text]
  • Computer Graphics
    ANSI X3.124.2 1988 3 American National Standard ADOPTED FOR USE BY THE for information systems - FEDERAL GOVERNMENT WLrt? computer graphics - PUB 120-1 graphical kernel system (GKS) SEE NOTICE ON INSIDE pascal binding X3.124.2-1988 ANSI american nationalana standards institute, me 1430 broadway, new york, new york 10018 . A8A3 NO.120-1 1988 This standard has been adopted for Federal Government use. Details concerning its use within the Federal Government are contained in Federal Information Processing Standards Publication 120-1, Graphical Kernel System (GKS). For a complete list of the publications available in the Federal Information Processing Standards Series, write to the Standards Processing Coordinator (ADP), National Institute of Standards and Technology, Gaithersburg, MD 20899. ANSI® X3.124.2-1988 American National Standard for information Systems - Computer Graphics - Graphical Kernel System (GKS) Pascal Binding Secretariat Computer and Business Equipment Manufacturers Association Approved February 18, 1988 American National Standards Institute, Inc Approval of an American National Standard requires verification by ANSI that the re¬ American quirements for due process, consensus, and other criteria for approval have been met by National the standards developer. Consensus is established when, in the judgment of the ANSI Board of Standards Review, Standard substantial agreement has been reached by directly and materially affected interests. Sub¬ stantial agreement means much more than a simple majority, but not necessarily unanim¬ ity. Consensus requires that all views and objections be considered, and that a concerted effort be made toward their resolution. The use of American National Standards is completely voluntary; their existence does not in any respect preclude anyone, whether he has approved the standards or not, from man¬ ufacturing, marketing, purchasing, or using products, processes, or procedures not con¬ forming to the standards.
    [Show full text]
  • Lab Manual for Is Lab
    WCTM /IT/LAB MANUAL/6TH SEM/IF LAB LAB MANUAL FOR IS LAB 1 INTELLIGENT SYSTEM LAB MANUAL WCTM /IT/LAB MANUAL/6TH SEM/IF LAB STUDY OF PROLOG Prolog – Programming in Logic PROLOG stands for Programming In Logic – an idea that emerged in the early 1970s to use logic as programming language. The early developers of this idea included Robert Kowalski at Edinburgh ( on the theoretical side ), Marrten van Emden at Edinburgh (experimental demonstration ) and Alain Colmerauer at Marseilles ( implementation). David D.H.Warren’s efficient implementation at Edinburgh in the mid – 1970’s greatly contributed to the popularity of PROLOG. PROLOG is a programming language centered around a small set of basic mechanisms, including pattern matching , tree-based data structuring and automatic backtracking. This small set constitutes a surprisingly powerful and flexible programming framework. PROLOG is especially well suited for problems that involve objects – in particular, structured objects – and relations between them . SYMBOLIC LANGUAGE PROLOG is a programming language for symbolic , non – numeric computation. It is especially well suited for solving problems that involve objects and relations between objects . For example , it is an easy exercise in prolog to express spatial relationship between objects , such as the blue sphere is behind the green one . It is also easy to state a more general rule : if object X is closer to the observer than object Y , and Y is closer than Z, then X must be closer than Z. PROLOG can reason about the spatial relationships and their consistency with respect to the general rule . Features like this make PROLOG a powerful language for Artificial Language (A1) and non – numerical programming.
    [Show full text]
  • QUICK REFERENCE CARD an Error Message Is Given If a DOS Command INIT X [,Vv] [,Ss] [,Dd] Quantity Is Too Large Or Too Small
    DOS COMMAND PARAMmRS HOUSEKEEPING COMMANDS QUICK REFERENCE CARD An error message is given if a DOS command INIT X [,Vv] [,Ss] [,Dd] quantity is too large or too small. Initializes a blank diskette to form a slave On this card, DOS commands are grouped into diskette. Assigns greeting program name X these 5 categories: and volume number v (if specified). SAVEs ALL FILES the BASIC program currently in memory, under Housekeeping commands: file name X. INIT LOAD DELETE VERIFY MAXFILES Parameter As shown Min Max CATALOG RUN LOCK MON Slot SAVE RENAME UNLOCK NOMON ,Ss S1 S7 Drive ,Dd D1 D2 CATALOG [, Ss] [,Dd] Displays volume number and all files on a Volume ,Vv V0 V254 Access Commands: * diskette, with each file's type and sector FP INT PRil INil CHAIN * Using v0 is like omitting the Vv parameter. length. * indicates a LOCKed file. the diskette's volume number is ignored. • Sequential Text File Commands: Type Description (How created) OPEN READ APPEND EXEC Smallest volume number INIT will actually assign to a diskette is 1. I Integer BASIC program file (SAVE) CLOSE WRITE POSITION A Applesoft BASIC program file (SAVE) T Text File (OPEN, then WRITE) Random-Access Text File Commands: SEQUENTIAL TEXT FILES B Binary memory-image file (BSAVE) OPEN CLOSE READ WRITE Parameter Machine-Language File Commands: As shown Min Max Byte SAVE X [,Ss] [,Dd] [,Vv] BLOAD BRUN BSAVE ,Bb Bill B32767 Relative Field * ,Rp Rill R32767 Stores current BASIC program onto diskette, under file name X. Overwrites any previous NOTATION AND SYNTAX * With EXEC, always relative to field Ill.
    [Show full text]
  • Enhancing Applesoft Using Ampersand Routines
    Behavior Research Methods, Instruments, & Computers 1988, 20 (2), 224-230 Enhancing Applesoft using ampersand routines DOUGLAS B. EAMON University of Wisconsin-Whitewater, Whitewater, Wisconsin Machine language routines, which can provide many useful and unusual applications for BASIC, run faster than BASIC and usually occupy less memory than comparable BASIC routines. Ex­ amples of two types of easy-to-use enhancements to Applesoft BASIC are described. The first type consists of integrated collections of enhancements and extensions that are used as a group. A second type allows program developers to select only those routines that are desired. Features available in several sets of such routines are discussed. Applesoft BASIC's ampersand (&) jump feature gives tor or BLOADing the routines each time the program is the programmer an easy and fast way to connect machine run). language routines to BASIC. When the Applesoft inter­ There are two major approaches to development of preter encounters an "&," it does an immediate and un­ commercially available ampersand utilities. In the first, conditional jump to location $3F5 (decimal 1013). This the routines are provided as an integrated and insepara­ feature, originally described as being "intended for the ble collection. A second approach is to provide routines computer's internal use only" and "not a proper that may be individually selected and added to programs. APPLESOFT command" (Apple Computer, 1978, The major advantage ofthe first approach is that it is pos­ p. 123), has become the favorite procedure for execut­ sible to provide many functions with less memory, since ing machine language routines from a running Applesoft the utilities usually share subroutines.
    [Show full text]