Yet Another Haskell Tutorial
Total Page:16
File Type:pdf, Size:1020Kb
Load more
Recommended publications
-
On the Implementation of a Cloud-Based Computing Test Bench Environment for Prolog Systems †
information Article On the Implementation of a Cloud-Based Computing Test Bench Environment for Prolog Systems † Ricardo Gonçalves, Miguel Areias * ID and Ricardo Rocha ID CRACS & INESC TEC and Faculty of Sciences, University of Porto, Rua do Campo Alegre, 1021/1055, 4169-007 Porto, Portugal; [email protected] (R.G.); [email protected] (R.R.) * Correspondence: [email protected] † This paper is an extended version of our paper published in the Symposium on Languages, Applications and Technologies 2017. Received: 13 September 2017; Accepted: 13 October 2017; Published: 19 October 2017 Abstract: Software testing and benchmarking are key components of the software development process. Nowadays, a good practice in large software projects is the continuous integration (CI) software development technique. The key idea of CI is to let developers integrate their work as they produce it, instead of performing the integration at the end of each software module. In this paper, we extend a previous work on a benchmark suite for the YAP Prolog system, and we propose a fully automated test bench environment for Prolog systems, named Yet Another Prolog Test Bench Environment (YAPTBE), aimed to assist developers in the development and CI of Prolog systems. YAPTBE is based on a cloud computing architecture and relies on the Jenkins framework as well as a new Jenkins plugin to manage the underlying infrastructure. We present the key design and implementation aspects of YAPTBE and show its most important features, such as its graphical user interface (GUI) and the automated process that builds and runs Prolog systems and benchmarks. -
Specialising Dynamic Techniques for Implementing the Ruby Programming Language
SPECIALISING DYNAMIC TECHNIQUES FOR IMPLEMENTING THE RUBY PROGRAMMING LANGUAGE A thesis submitted to the University of Manchester for the degree of Doctor of Philosophy in the Faculty of Engineering and Physical Sciences 2015 By Chris Seaton School of Computer Science This published copy of the thesis contains a couple of minor typographical corrections from the version deposited in the University of Manchester Library. [email protected] chrisseaton.com/phd 2 Contents List of Listings7 List of Tables9 List of Figures 11 Abstract 15 Declaration 17 Copyright 19 Acknowledgements 21 1 Introduction 23 1.1 Dynamic Programming Languages.................. 23 1.2 Idiomatic Ruby............................ 25 1.3 Research Questions.......................... 27 1.4 Implementation Work......................... 27 1.5 Contributions............................. 28 1.6 Publications.............................. 29 1.7 Thesis Structure............................ 31 2 Characteristics of Dynamic Languages 35 2.1 Ruby.................................. 35 2.2 Ruby on Rails............................. 36 2.3 Case Study: Idiomatic Ruby..................... 37 2.4 Summary............................... 49 3 3 Implementation of Dynamic Languages 51 3.1 Foundational Techniques....................... 51 3.2 Applied Techniques.......................... 59 3.3 Implementations of Ruby....................... 65 3.4 Parallelism and Concurrency..................... 72 3.5 Summary............................... 73 4 Evaluation Methodology 75 4.1 Evaluation Philosophy -
Yacc: Yet Another Compiler-Compiler
Yacc: Yet Another Compiler-Compiler http://dinosaur.compilertools.net/yacc/index.html The Lex & Yacc Page Yacc: Yet Another Compiler-Compiler Stephen C. Johnson AT&T Bell Laboratories Murray Hill, New Jersey 07974 ABSTRACT Computer program input generally has some structure; in fact, every computer program that does input can be thought of as defining an ``input language'' which it accepts. An input language may be as complex as a programming language, or as simple as a sequence of numbers. Unfortunately, usual input facilities are limited, difficult to use, and often are lax about checking their inputs for validity. Yacc provides a general tool for describing the input to a computer program. The Yacc user specifies the structures of his input, together with code to be invoked as each such structure is recognized. Yacc turns such a specification into a subroutine that handles the input process; frequently, it is convenient and appropriate to have most of the flow of control in the user's application handled by this subroutine. The input subroutine produced by Yacc calls a user-supplied routine to return the next basic input item. Thus, the user can specify his input in terms of individual input characters, or in terms of higher level constructs such as names and numbers. The user-supplied routine may also handle idiomatic features such as comment and continuation conventions, which typically defy easy grammatical specification. Yacc is written in portable C. The class of specifications accepted is a very general one: LALR(1) grammars with disambiguating rules. In addition to compilers for C, APL, Pascal, RATFOR, etc., Yacc has also been used for less conventional languages, including a phototypesetter language, several desk calculator languages, a document retrieval system, and a Fortran debugging system. -
Sicstus Prolog User's Manual
SICStus Prolog User's Manual Mats Carlsson et al. SICS Swedish ICT AB PO Box 1263 SE-164 29 Kista, Sweden Release 4.3.2 May 2015 SICS Swedish ICT AB [email protected] http://sicstus.sics.se/ Copyright c 1995-2015 SICS SICS Swedish ICT AB PO Box 1263 SE-164 29 Kista, Sweden Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. Permission is granted to copy and distribute modified versions of this manual under the con- ditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. Permission is granted to copy and distribute translations of this manual into another lan- guage, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by SICS. i Table of Contents Introduction :::::::::::::::::::::::::::::::::::::::: 1 Acknowledgments :::::::::::::::::::::::::::::::::: 3 1 Notational Conventions :::::::::::::::::::::::: 5 1.1 Keyboard Characters::::::::::::::::::::::::::::::::::::::::::: 5 1.2 Mode Spec ::::::::::::::::::::::::::::::::::::::::::::::::::::: 5 1.3 Development and Runtime Systems::::::::::::::::::::::::::::: 5 1.4 Function Prototypes:::::::::::::::::::::::::::::::::::::::::::: 5 1.5 ISO Compliance:::::::::::::::::::::::::::::::::::::::::::::::: 6 2 Glossary ::::::::::::::::::::::::::::::::::::::::: 7 3 How to Run Prolog ::::::::::::::::::::::::::: 21 3.1 Getting -
Cultures of Programming Understanding the History of Programming Through Controversies and Technical Artifacts
Cultures of programming Understanding the history of programming through controversies and technical artifacts TOMAS PETRICEK, University of Kent, UK Programming language research does not exist in isolation. Many programming languages are designed to address a particular business problem or as a reflection of more wide-ranging shifts in the computing community. Histories of individual programming languages often take their own contexts for granted, which makes it difficult to connect the dots and understand the history of programming in a holistic way. This paper documents the broader socio-technological context that shapes programming languages. To structure our discussion, we introduce the idea of a culture of programming which embodies a particular perspective on programming. We identify four major cultures: hacker culture, engineering culture, managerial culture and mathematical culture. To understand how the cultures interact and influence the design of programming languages, we look at a number of historical strands in four lectures that comprise this paper. We follow the mathematization of programming, the development of types, discussion on fundamental limits of complex software systems and the methods that help make modern software acceptably reliable. This paper makes two key observations. First, many interesting developments that shape programming languages happen when multiple cultures meet and interact. Those include both the development of new technical artifacts and controversies that change how we think about programming. Second, the cultures of programming retain a strong identity throughout the history. In other words, the existence of multiple cultures of programming is not a sign of an immaturity of the field, but instead, a sign that programming developed a fruitful multi-cultural identity. -
The YAP Prolog System
Under consideration for publication in Theory and Practice of Logic Programming 1 The YAP Prolog System V´ITOR SANTOS COSTA and RICARDO ROCHA DCC & CRACS INESC-Porto LA, Faculty of Sciences, University of Porto R. do Campo Alegre 1021/1055, 4169-007 Porto, Portugal (e-mail: fvsc,[email protected]) LU´IS DAMAS LIACC, Faculty of Sciences, University of Porto R. do Campo Alegre 1021/1055, 4169-007 Porto, Portugal (e-mail: [email protected]) submitted 10 October 2009; revised 5 March 2010; accepted 6 February 2011 Abstract Yet Another Prolog (YAP) is a Prolog system originally developed in the mid-eighties and that has been under almost constant development since then. This paper presents the general structure and design of the YAP system, focusing on three important contributions to the Logic Programming community. First, it describes the main techniques used in YAP to achieve an efficient Prolog engine. Second, most Logic Programming systems have a rather limited indexing algorithm. YAP contributes to this area by providing a dynamic indexing mechanism, or just-in-time indexer (JITI). Third, a important contribution of the YAP system has been the integration of both or-parallelism and tabling in a single Logic Programming system. KEYWORDS: Prolog, logic programming system arXiv:1102.3896v1 [cs.PL] 18 Feb 2011 1 Introduction Prolog is a widely used Logic Programming language. Applications include the se- mantic web (Devitt et al. 2005), natural language analysis (Nugues 2006), bioinfor- matics (Mungall 2009), machine learning (Page and Srinivasan 2003), and program analysis (Benton and Fischer 2007), just to mention a few. -
Intro to Web Prolog for Erlangers
Intro to Web Prolog for Erlangers Torbjörn Lager Department of Philosophy, Linguistics and Theory of Science University of Gothenburg Sweden [email protected] Abstract logic-based knowledge representation and reasoning, and We describe a programming language called Web Prolog. We support for meta-programming, user-defined operators, a think of it as a web programming language, or, more specifi- term-expansion mechanism and grammars is also provided. cally, as a web logic programming language. The language is These are the features that underlie Prolog’s reputation as a based on Prolog, with a good pinch of Erlang added. We stay symbolic AI programming language. Also, they are features close to traditional Prolog, so close that the vast majority of that Erlang does not support. In this paper, we present Web programs in Prolog textbooks will run without modification. Prolog – a language which combines the most important Towards Erlang we are less faithful, picking only features features of Prolog with those of Erlang. we regard as useful in a web programming language, e.g. The structure of the paper is as follows. The rest of this features that support concurrency, distribution and intra- section justifies the introduction of yet another dialect of process communication. In particular, we borrow features Prolog. Section2 presents an IDE for Web Prolog, introduces that make Erlang into an actor programming language, and the notion of a node, and describes the interaction between on top of these we define the concept ofa pengine – a pro- the IDE and a node over a WebSocket sub-protocol. Section3 gramming abstraction in the form of a special kind of actor introduces the language of Web Prolog as such and compares which closely mirrors the behaviour of a Prolog top-level. -
Yacc: Yet Another Compiler-Compiler
-- -- Yacc: Yet Another Compiler-Compiler Stephen C. Johnson ABSTRACT Computer program input generally has some structure; in fact, every computer pro- gram that does input can be thought of as defining an ‘‘input language’’ which it accepts. An input language may be as complex as a programming language, or as simple as a sequence of numbers. Unfortunately, usual input facilities are limited, difficult to use, and often are lax about checking their inputs for validity. Yacc provides a general tool for describing the input to a computer program. The Yacc user specifies the structures of his input, together with code to be invoked as each such structure is recognized. Yacc turns such a specification into a subroutine that han- dles the input process; frequently, it is convenient and appropriate to have most of the flow of control in the user’s application handled by this subroutine. The input subroutine produced by Yacc calls a user-supplied routine to return the next basic input item. Thus, the user can specify his input in terms of individual input characters, or in terms of higher level constructs such as names and numbers. The user- supplied routine may also handle idiomatic features such as comment and continuation conventions, which typically defy easy grammatical specification. Yacc is written in portable C. The class of specifications accepted is a very general one: LALR(1) grammars with disambiguating rules. In addition to compilers for C, APL, Pascal, RATFOR, etc., Yacc has also been used for less conventional languages, including a phototypesetter language, several desk calculator languages, a document retrieval system, and a Fortran debugging system. -
The Ruby Programming Language Other Resources from O’Reilly
The Ruby Programming Language Other resources from O’Reilly Related titles Ruby Cookbook Ruby Pocket Reference Learning Ruby Ajax on Rails Advanced Rails Ruby on Rails: Up and Rails Cookbook Running oreilly.com oreilly.com is more than a complete catalog of O’Reilly books. You'll also find links to news, events, articles, weblogs, sample chapters, and code examples. oreillynet.com is the essential portal for developers interested in open and emerging technologies, including new platforms, pro- gramming languages, and operating systems. Conferences O’Reilly & Associates brings diverse innovators together to nur- ture the ideas that spark revolutionary industries. We specialize in documenting the latest tools and systems, translating the in- novator’s knowledge into useful skills for those in the trenches. Visit conferences.oreilly.com for our upcoming events. Safari Bookshelf (safari.oreilly.com) is the premier online refer- ence library for programmers and IT professionals. Conduct searches across more than 1,000 books. Subscribers can zero in on answers to time-critical questions in a matter of seconds. Read the books on your Bookshelf from cover to cover or sim- ply flip to the page you need. Try it today for free. The Ruby Programming Language David Flanagan and Yukihiro Matsumoto Beijing • Cambridge • Farnham • Köln • Paris • Sebastopol • Taipei • Tokyo The Ruby Programming Language by David Flanagan and Yukihiro Matsumoto with drawings by why the lucky stiff Copyright © 2008 David Flanagan and Yukihiro Matsumoto. All rights reserved. Printed in the United States of America. Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472 O’Reilly books may be purchased for educational, business, or sales promotional use. -
YAP User's Manual
YAP User's Manual Version 6.2.2 V´ıtorSantos Costa, Lu´ısDamas, Rog´erioReis, and R´uben Azevedo Copyright c 1989-2000 L. Damas, V. Santos Costa and Universidade do Porto. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. Permission is granted to copy and distribute modified versions of this manual under the con- ditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. Permission is granted to copy and distribute translations of this manual into another lan- guage, under the above conditions for modified versions. i Table of Contents Introduction :::::::::::::::::::::::::::::::::::::::: 1 1 Installing YAP :::::::::::::::::::::::::::::::::: 3 1.1 Tuning the Functionality of YAP ::::::::::::::::::::::::::::::: 3 1.2 Tuning YAP for a Particular Machine and Compiler :::::::::::: 4 1.3 Tuning YAP for GCC. ::::::::::::::::::::::::::::::::::::::::::: 4 1.3.1 Compiling Under Visual C++ ::::::::::::::::::::::::::::: 6 1.3.2 Compiling Under SGI's cc ::::::::::::::::::::::::::::::::: 7 2 Running YAP ::::::::::::::::::::::::::::::::::: 9 2.1 Running YAP Interactively ::::::::::::::::::::::::::::::::::::: 9 2.2 Running Prolog Files:::::::::::::::::::::::::::::::::::::::::: 10 3 Syntax:::::::::::::::::::::::::::::::::::::::::: 13 3.1 Syntax of Terms :::::::::::::::::::::::::::::::::::::::::::::: 13 3.2 Prolog Tokens::::::::::::::::::::::::::::::::::::::::::::::::: -
The Ruby Programming Language
The Ruby Programming Language The Ruby Programming Language David Flanagan and Yukihiro Matsumoto Beijing • Cambridge • Farnham • Köln • Sebastopol • Taipei • Tokyo The Ruby Programming Language by David Flanagan and Yukihiro Matsumoto with drawings by why the lucky stiff Copyright © 2008 David Flanagan and Yukihiro Matsumoto. All rights reserved. Printed in the United States of America. Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472 O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (http://safari.oreilly.com). For more information, contact our corporate/ institutional sales department: (800) 998-9938 or [email protected]. Editor: Mike Loukides Indexer: Joe Wizda Production Editor: Sarah Schneider Cover Designer: Karen Montgomery Proofreader: Sarah Schneider Interior Designer: David Futato Illustrators: Rob Romano and why the lucky stiff Printing History: January 2008: First Edition. Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of O’Reilly Media, Inc. The Ruby Programming Language, the image of Horned Sungem hummingbirds, and related trade dress are trademarks of O’Reilly Media, Inc. Java™ and all Java-based trademarks are registered trademarks of Sun Microsystems, Inc., in the United States and other countries. O’Reilly Media, Inc. is independent of Sun Microsystems. Many of the designations uses by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and O’Reilly Media, Inc. was aware of a trademark claim, the designations have been printed in caps or initial caps. While every precaution has been taken in the preparation of this book, the publisher and authors assume no responsibility for errors or omissions, or for damages resulting from the use of the information con- tained herein. -
Implicit Operating System Awareness in a Virtual Machine Monitor
IMPLICIT OPERATING SYSTEM AWARENESS IN A VIRTUAL MACHINE MONITOR by Stephen T. Jones A dissertation submitted in partial fulfillment of the requirements for the degree of Doctor of Philosophy Computer Sciences at the UNIVERSITY OF WISCONSIN–MADISON 2007 For my family i ii ACKNOWLEDGMENTS So many people have contributed to the success of this endeavor. I am indebted to them all. I will mention just a few by name here. First and most importantly I want to thank my wife and best friend Alyson whose persistent faith, love, encouragement,and support have been essential to all of my successes and have helped me learn from each of my failures. She got me started on this path and has seen me through to yet another beginning. My children Emma, Abbi, and Ian provide me with constant inspiration and perspective, often when I expect it least and need it most. My advisors Andrea and Remzi gently and deftly shepherded me through the some- times uncomfortable realization of what high quality research actually is. Their curiosity and enthusiasm about computer systems and, most importantly to me, their humanity form the core of what I take away from Wisconsin. I thank my Parents Ben and Shirley Jones for giving me life, teaching me the value of work, and nurturing a loveof discoveryand learning. I also appreciate the diverse examples of all my wonderful siblings who continue to teach me whenever we are together. My brother Benjamin contributed especially to my love of design and elegant technology by generously sharing his time and ideas with me when I was young.