下载  >  开发技术  >  其它  > Drawing Programs The Theory and Practice of Schematic Functional Programming

Drawing Programs The Theory and Practice of Schematic Functional Programming 评分:

Drawing Programs The Theory and Practice of Schematic Functional Programming
Tom addis· Jan addis Drawing Programs The Theory and Practice of schematic functional Programming ringer Tom addis Jan addis University of Portsmouth Clarity Support School of Computing Southsea po4 9QU Portsmouth pol 3he United Kingdom United Kingdom ISBN978-1-84882-617-5 e-ISBN978-1-84882-618-2 DOI10.1007/978-1-84882-618-2 Springer London dordrecht Heidelberg New York British Library cataloguing in Publication Data A catalogue record for this book is available from the British Library Library of Congress Control Number: 2009927007 O Springer-Verlag London limited 2010 part from any fair dealing for the purposes of research or private study, or criticism or review, as permitted under the Copyright, Designs and Patents Act 1988, this publication may only be reproduced, stored or transmitted, in any form or by any means, with the prior permission in writing of the publishers, or in the case of reprographic reproduction in accordance with the terms of licenses issued by the Copyright Licensing Agency. Enquiries concerning reproduction outside those terms should be sent to the publishers The use of registered names, trademarks, etc, in this publication does not imply, even in the absence of a specific statement, that such names are exempt from the relevant laws and regulations and therefore free for general use The publisher makes no representation, express or implied, with regard to the accuracy of the information contained in this book and cannot accept any legal responsibility or liability for any errors or omissions that may be made Cover design: KuenkelLopka gmbH Printed on acid-free paper SpringerispartofSpringerScience+businessMedia(www.springer.com) To David gooding Who is a good friend and is a colleague who has enhanced this work with his scholarship. he has done more than most to make this book possible In particular, he listens and engages in real debate Preface Drawing programs is a personal response to some very practical problems. To explain this I need to go back in time to when my greatest toy was the Mechano set; a mechanical construction kit with instructions on how to build your own toys. I soon found that although the kit was boundless in one sense it was also very limited I spent many hours trying to do things that were well beyond the intention of the kit designer. Much later I found electronics where circuits provided me with a much wider scope for model building but it still took a long time to make devices. It was not until programming was introduced during my time at University that this really flexible tool was made available. No more bleeding fingers from the iron work and no more burnt ties from soldering irons. Modelling was going to be easy and fun However, there was snag. I had a natural inability to spell or even to construct coher ent written sentences. It is true that i had evolved many strategies to successfully overcome this problem but the strategies only worked within a limited framework The problem with programs is that they are written and involve the accurate use of characters. Most of my time was spent in pursuing typos and very little time on the programming. Sometimes it was necessary to ask someone to look for me and usu ally they could identify the problem within seconds; natural ability is a wonderful thing Functional programming in the form of lisP came along and the power of this anguage for expressing formal systems in an elegant way was very exciting. It was one move away from having to worry about the actual physical computer with all its storage management problems and one step closer to a language designed specifically for modelling. It was like stepping into an automatic car after years of struggling with manual gears. Even though practical computer languages had moved a long way from machine code it was still only a change from the crash gearbox to synchromesh. The computer structure was still in the background in that everything was forced into the framework of data and processes thus reflecting the fundamental dual distinction within the machine itself. The problem with functional programming was that it was constrained by its own formal framework and stopped short of being able to extend itself. LISP overcame this problem, to some extent by slipping back into the computer framework by introducing special program type functions. It also overcame another limitation by allowing the language to be Presa extended beyond the original formal functional description. In some cases it was still very clumsy and from my point of view still required being written As an engineer, electronic circuits had been no problem to read to find errors or to remember. If only programming could be made that easy. It was this drive to create a tool that would sidestep issues of spelling and yet still provide a professional tool for developing models and other kinds of programs. This led us to create Clarity, or rather, led Jan to develop the Clarity environment for me. Also, while we were t it. we could also eliminate some of the restrictions found in current text-based anguages Clarity has been introduced quite slowly in this book simply because it seems to be slightly at odds with the normal windows approach. This is not too surprising since it was developed well before windows had become generally available and it was also driven by different requirements. The theory related to designing mod els has been included right from the beginning but for practical purposes it can be skipped The justification for Clarity given in Chapter 1 is in response to criticism of the diagrammatic approach to programming These other diagrammatic approaches have usually been stimulated by a desire to make programming available to non programmers. This is not the purpose behind Clarity. Clarity has been driven by a need to provide a sophisticated tool for programmers that would rather work with diagrams than with text. Projects are given at the end of each chapter. These follow the style of the Mechano instruction book in that every step is described. The pur pose of doing it this way is to show how drawing programs should be done and to give an illustration of good techniques. Clarity has been developed over the last 23 years for a wide range of different projects. It evolved out of an IKBS project(CARDS)in 1986-1990 with the Gen eral Electric Company, the University of Reading and the Imperial Cancer Research Fund to build a special hardware device that would allow those involved with dna research to create models of dna behaviour. For this a modelling language was needed. Originally the researchers had used Prolog. The next SERC/ESRC/MRO project in 1991-1996 was with the Universities of Bath, with Professor David Good ing, and the University of Reading with us, to construct a model of scientific discov ery from the history of science. This work is still going on. another project started in 1996 and funded by Ship Analytics(now MPRi, part of the L3 consortium) was an expert system used as a teacher replacement for Mariners training on a ship sim- ulation for gas and oil management. Work on the automatic assessment of these students is also almost complete Other work involving modelling of the negotiation process(Billinge and Addis 2008)at the University of Portsmouth has come up with some surprising results requiring us to reconsider the motivation behind reasons for conversation We have also taken on some really good post graduate students from the techni cal University of Delft, The Netherlands. These have been provided by Dr, Drs Leon Rothkrantz almost every year between 1996 and 2006 to work on various projects Many of these projects have helped to start new research directions such as those described in Chapter 10. In particular, Dr Bart-Floris Visscher was one of the visit Preface ing students who led a team that used Clarity to construct a planning system for a multi-legged robot(Portech Ltd). He was an outstanding student. He came back to Portsmouth to do research with me and his Thesis(2005)'Exploring Complexity in Software Systems: From an irrational model of software evolution to a theory ofpsy chological complexity and cognitive limitations based on empirical evidence'went well beyond my own work started in 1977. It was thrilling stuff. He also designed the embellished Clarity icon on the front cover There have been many others that have helped us develop the Clarity Environ ment. Simon Gray(Sharp Edge Systems Ltd) was invaluable at the system level while we working with apple macintosh computers and he was always a source of new ideas. Dr. Carol Small introduced us to the functional database language (Poulovassilis 1988)during the Cards project and wrote the core interpreter for the Sun uniX system based on Field and Harrisons work(1988). John Chewter, an undergraduate student at the University of portsmouth, showed considerable pro gramming aptitude by constructing the Faith to Clarity interpreter for his final year project in 1995. It has been surprisingly useful. Ray Gillett(Director, MPRI, UK) has provided us with a set of excellent practical industrial projects since 1998. These projects have not only tested the system to its limits but many of the techniques developed for the belief system(model of science) have found a natural home. We thank him for his patience in allowing us to develop the system in our own way The Clarity schema has allowed us to work closely with many technically com- petent people. This close working with a fast implementation leads directly to the models needed. Any system that is useful requires to be continually mod ified to keep pace with technology and changing perspectives. For this reason we are giving away Clarity in all its forms with example databases and source code. At the time of publishing these will be found at the publisher's web site http://www.springer.com/978-1-84882-617-5,theUniversityofPortsmouthweb sitehttp://userweb.portac.uk/_addist/978-1-84882-617-5.zipandaspecialClarity communitywebsitehttp://www.clarity-support.com Southsea. march 2009 Tom addis References 1. Billinge D and Addis T, (2008)Seeking Allies: Modelling how Listners Choose their Musical Friends,, Special issue of Foundations of Science, Vol 13, Nol, March, pp 53-66, ISSN 1233-1821 2. Field A.J. and Harrison P G,(1998)Functional Programming pub Addis-Wesley Ltd, ISBN 0-201-19249-7 3. Poulovassilis A, (1988), FDL. An Integration of the functional database Model and the func tional Computer Model, BNCOD 6, CUP, Cambridge, pp 215-236 Contents Why Schematic Functional Programming? Introduction The Collapse of Visual Languages [->Page 12 Engineering Drawings [->Page 12 Engineering drawings Used for Programming [-> Page 12] 346 Different Types of Clarity A Brief History [-> Page 12 米 Getting Going A Little Bit about Functions[ Page 17] 15 *“ Hello world” 17 Exercise 1.1 18 An Example schematic 18 A First Attempt at a Schematic 19 e 1.2 24 ing a function 24 Saving a Program/Database 26 Loading a Program/Database 27 Project: Creating a Simple Clarity Program DICE Dice: Generating a random number 28 Exercises 1.3 32 Questions 1.1 32 R eferences 33 2 Making Changes 35 Introduction Problems of software Design [->Page 42 35 A Typical Example 36 The Engineering Dimensions of Design 36 Some definitions for Practical results 38 Choice and Random Selection 40 *Over your shoulder 42 List Manipulation [- Page 44 43 米 mproving ' Awake’., 44 Contents A Little Bit more about Functions [ Page 511 48 Built-In Library and Function Types [- Page 51] 49 Exercise 2.1 50 Questions 2.1 51 *k Great functions have little functions 51 More schema editing features Exercise 2.2 58 Memory, Windows and you 58 Exercise 2.3 61 Questions 2.2 61 Project: A Simple Interactive Program Guess: Finding Your Number with Least Questions 62 Exercise 2. 4 Questions 2.3 References 3 In Pursuit of Elegance Introduction Inferring Internal Experience [- Page 81 74 A Philosophical View of Computing [- Page 811 Dual Semantics[- Page &11 78 More on Functions [- Page &11 米 Creating Components 81 Constructors The Packaging of data 86 Looking through the function window 89 Exercises 3. 1 Questions 3.1 94 The notion of casting A Structure Process Diagram(SPD) Exercise 3.2 Questions 3.2 102 Project: Playing a simple game 102 Paper: Out Guess the Computer 102 Exercise 3.3 108 Questions 3.3 References 109 4 Mind Maps M and mechanisms Introduction 111 Junctions, Colour and organisation 112 Annotation 115 List Processing and constructors l18 Dealing with Input 120 Functions as global variables 123 Excercises 41 124 Questions 4.1 124

...展开详情
2019-03-25 上传 大小:10.27MB
举报 收藏
分享
Drawing Programs The Theory and Practice of Schematic Functional Programming

Drawing Programs The Theory and Practice of Schematic Functional Programming

立即下载
Open Drawing Alliance ActiveX Control

Open Drawing Alliance ActiveX Control, DWGdirectX Version 0.95This archive contains version 0.95 of the new Open Drawing Alliance ActiveX control, DWGdirectX (formerly ODX 3.0). To use the new control, run the setup.exe program, which will install and register DWGdirectX. Then add “OdaToolkit 1.0 Ty

立即下载
Developing Cybersecurity Programs and Policies, 3rd Edition

By 作者: Omar Santos ISBN-10 书号: 0789759403 ISBN-13 书号: 9780789759405 Edition 版本: 3 Release Finelybook 出版日期: 2018-08-20 pages 页数: 672 $80 All the Knowledge You Need to Build Cybersecurity Programs and Policies That Work Clearly presents best practices, governance frameworks, and key standards Include

立即下载
The Essential Guide to HTML5

Gain a deep, practical knowledge of HTML and JavaScript that will provide an introduction to programming and enable you to build interactive websites. This completely updated second edition explains HTML, JavaScript and CSS in the context of working examples and contains full-color screen shots of t

立即下载
Learn Cocoa on the Mac, 2nd Edition

Welcome! You must be here because you want to write programs for your Mac. Well, you’ve definitely come to the right place. (Here for Pilates? Third door down, on the right.) By the time you finish this book, you’ll know everything you need to know to create fast, efficient, good-looking Mac OS X ap

立即下载
The Essential Guide to HTML5: Using Games to Learn HTML5 and JavaScript

2018出版 第二版。高清原版,学习html好资料! Gain a deep, practical knowledge of HTML and JavaScript that will provide an introduction to programming and enable you to build interactive websites. This completely updated second edition explains HTML, JavaScript and CSS in the context of working examples and contains f

立即下载
Ecommerce analytics :analyze_and_improve_the_impact_of_your_digital_strategy

Profit from analytics throughout the entire customer experience and lifecycle Make the most of all the fast-changing data sources now available to you For all ecommerce executives, strategists, entrepreneurs, marketers, analysts, and data scientists Ecommerce Analytics is the only complete single-so

立即下载
Tricks of the Windows video Game Programming---part1

Tricks of the Windows video Game Programming<br><br>PART I Windows Programming Foundations 7<br>1 Journey into the Abyss 9<br>A Little History........................................................................................9<br>Designing Games .................................................

立即下载
A Practical Introduction to Computer Graphics Ian O. Angell (auth.) 1981

This book is a practical first step in understanding the methods of computer graphics. After studying the contents and implementing the examples and exercises, the reader will be ready to attempt most tasks in graphics, whether these be the production of elementary data graphs, pie charts, etc

立即下载
FlexGraphics_V_1.79_D4-XE10.2_Downloadly.ir

Version 1.7 ----------- - ADD: Delphi/CBuilder 10.2 Tokyo now supported. - ADD: Delphi/CBuilder 10.1 Berlin now supported. - ADD: Delphi/CBuilder 10 Seattle now supported. - ADD: Delphi/CBuilder XE8 now supported. - ADD: Delphi/CBuilder XE7 now supported. - ADD: Delphi/CBuilder XE6 now supported. -

立即下载
Tkinter GUI Application Development Blueprints(PACKT,2015)

Tkinter is the built-in GUI package that comes with standard Python distributions. It is a cross-platform package, which means you build once and deploy everywhere. It is simple to use and intuitive in nature, making it suitable for programmers and non-programmers alike. This book will help you mas

立即下载
dxf文件格式分析

This document describes the AutoCAD DXF (drawing interchange file) format and the commands provided to read and write these files. DXF files are standard ASCII text files. They can easily be translated to the formats of other CAD systems or submitted to other programs for specialized analysis. A

立即下载
Essential Windows Workflow Foundation

Windows Workflow Foundation (WF) is a groundbreaking approach to writing and executing programs. WF programs are assembled out of resumable program statements called activities, which provide encapsulation of both domainspecific logic and control flow patterns reflective of real-world processes.

立即下载
c++ primer 5th 源码

C++ Primer, Fifth Edition, introduces the C++ standard library from the outset, drawing on its common functions and facilities to help you write useful programs without first having to master every language detail. The book’s many examples have been revised to use the new language features and demon

立即下载
C++ Primer (5th Edition_English Version)

C++ Primer 英文版第5版 Bestselling Programming Tutorial and Reference Completely Rewritten for the New C++11 Standard Fully updated and recast for the newly released C++11 standard, this authoritative and comprehensive introduction to C++ will help you to learn the language fast, and to use it in moder

立即下载
C++ Primer, 5th Edition 源代码

新出的C++ Primer, 5th Edition 源代码 货真价实 适用于Visual Studio 2012 Bestselling Programming Tutorial and Reference Completely Rewritten for the New C++11 Standard Fully updated and recast for the newly released C++11 standard, this authoritative and comprehensive introduction to C++ will help you to lear

立即下载
C++ Primer, 5th Edition and C++ Primer, 5th Edition配套习题集【高清带目录】

文件内包含:C++ Primer, 5th Edition、C++ Primer, 5th Edition配套习题集、C++ Primer, 5th Edition源码;经典权威C++书籍:《C++ Primer, 5th Edition》介绍如下: Bestselling Programming Tutorial and Reference Completely Rewritten for the New C++11 Standard Fully updated and recast for the newly released C++11 standard, this authorita

立即下载
JavaScript for kids

高清英文版 JavaScript is the programming language of the Internet, the secret sauce that makes the Web awesome, your favorite sites interactive, and online games fun! JavaScript for Kids is a lighthearted introduction that teaches programming essentials through patient, step-by-step examples paired with

立即下载
Introduction to 3D Game Programming with DirectX 9.0 (电子书及源码)

Introduction to 3D Game Programming with DirectX 9.0 provides an introduction to programming interactive 3D computer graphics using DirectX 9.0, with an emphasis on game development. The book begins with an explanation of mathematical tools and moves on to general 3D concepts. Other topics include p

立即下载
现代天线设计 英文版

国外经典的天线设计教材 I wrote this book from my perspective as a designer in industry, primarily for other designers and users of antennas. On occasion I have prepared and taught antenna courses, for which I developed a systematic approach to the subject. For the last decade I have edited the “Antenna Designe

立即下载