153 research outputs found

    Monadic parsing using JavaScript

    Get PDF
    Pdf of an interactive website created from: http://www.cs.rit.edu/~ats/projects/jsm/paper.xml Monad is a class in Haskell which is fundamental to encapsulating side effects. A monadic type can be used, e.g., to maintain and manipulate state alongside another computation or to bypass sequential execution and recover from failure. A significant problem domain is parsing: support for monadic parsers exists for Haskell, Python, and other languages. This web page describes monadic LL(n) parsing with JavaScript, complete with a base class for monadic classes which wrap state functions, a notation to embed monadic computations in JavaScript (i.e., an equivalent to the do notation in Haskell), a preprocessor to translate the notation into JavaScript, a scanner generator based on regular expressions, a factory for classes to represent parse trees, and the implementation of a little language with exception handling as another example of a monadic computation. The preprocessor is implemented using the monadic parser which it supports

    ACM programming contest management

    Get PDF
    This is the homepage of ACM, software to manage a competition in the ACM Programming Contest. It consists of sb, a portable, distributed scoreboard system, implemented in Java, which displays the current standings, and of a number of Unix shell scripts which can be used to submit and judge solutions and ask for clarifications

    A Pattern for Distributing Turn-Based Games

    Get PDF
    A common choice of applications used in introductory computer science courses is from the domain of simple games. Games present some interesting design notions including move, outcome, state, and turn. If one focuses on the notion of a turn a new design is revealed that combines the familiar patterns of the Model- View-Controller architecture and Proxy when the game is played over a network

    An Object-oriented LL(1) parser generator

    Get PDF
    This paper describes oops, an object-oriented parser generator implemented in Java [1]. Oops takes a grammar written in EBNF, checks that it is indeed LL(1), i.e., suitable for recursive descent parsing, and produces a parser as a set of serialized objects. A scanner must be provided and classes satisfying certain interfaces can be implemented which the parser uses to build parse trees. The paper discusses the ideas behind oops — which are not specific to an implementation in Java — and shows the advantages of an object-oriented approach to grammar verification and parsing

    Functional Parsing — A Multi-Lingual Killer-Application

    Get PDF
    Monads are used in Haskell to support error handling and a concept of global state such as input/output. Parsing is a killer application for monads. This paper discusses a parser generator implementation for Java and JavaScript and shows how to benefit greatly from object-oriented design patterns based on monads adapted from functional programming. All examples discussed here are available for online use through the links at the end of the paper

    Sudoku: A Little Lesson in OOP

    Get PDF
    Paying only lip service to the principles of object-oriented programming rarely results in the expected benefits. This paper presents a series of designs for a Sudoku application that will lead introductory students through the allimportant process of trial and error. They will see examples of design analysis, criticism, and improvement. The paper concludes with some general pointers why and how the initial mistakes could have been avoided

    Design Patterns in Parsing

    Get PDF
    oops3, targeted to Java and C#, is the latest in a family of LL(1) parser generators based on an object-oriented architecture that carries through to the parsers it generates. Moreover, because oops3 employs several design patterns, its rich variety of APIs are nevertheless easy to learn. This paper discusses the use of patterns in the oops3 system and the resulting benefits for users and educators

    Objects for lexical analysis

    Get PDF
    This paper presents a new idea for lexical analysis: lolo (language-oriented lexer objects) is strictly based on the object orientation paradigm. We introduce the idea behind the system, describe the implementation, and compare it to the conventional approach using lex[1] or flex[2].lolo[3] extracts symbols from a sequence of input characters belonging to the ASCII or Unicode sets. lolo scanners can be extended without access to the source code: symbol recognizers can be derived by inheritance and an executing scanner can be reconfigured for different contexts. Recognizer actions are represented by objects which may be replaced at any time. Recognizers need not be based on finite state automata; therefore, lolo can recognize symbols that systems like lex cannot recognize directly

    Physics case for an LHCb Upgrade II - Opportunities in flavour physics, and beyond, in the HL-LHC era

    Get PDF
    The LHCb Upgrade II will fully exploit the flavour-physics opportunities of the HL-LHC, and study additional physics topics that take advantage of the forward acceptance of the LHCb spectrometer. The LHCb Upgrade I will begin operation in 2020. Consolidation will occur, and modest enhancements of the Upgrade I detector will be installed, in Long Shutdown 3 of the LHC (2025) and these are discussed here. The main Upgrade II detector will be installed in long shutdown 4 of the LHC (2030) and will build on the strengths of the current LHCb experiment and the Upgrade I. It will operate at a luminosity up to 2×1034 cm−2s−1, ten times that of the Upgrade I detector. New detector components will improve the intrinsic performance of the experiment in certain key areas. An Expression Of Interest proposing Upgrade II was submitted in February 2017. The physics case for the Upgrade II is presented here in more depth. CP-violating phases will be measured with precisions unattainable at any other envisaged facility. The experiment will probe b → sl+l−and b → dl+l− transitions in both muon and electron decays in modes not accessible at Upgrade I. Minimal flavour violation will be tested with a precision measurement of the ratio of B(B0 → μ+μ−)/B(Bs → μ+μ−). Probing charm CP violation at the 10−5 level may result in its long sought discovery. Major advances in hadron spectroscopy will be possible, which will be powerful probes of low energy QCD. Upgrade II potentially will have the highest sensitivity of all the LHC experiments on the Higgs to charm-quark couplings. Generically, the new physics mass scale probed, for fixed couplings, will almost double compared with the pre-HL-LHC era; this extended reach for flavour physics is similar to that which would be achieved by the HE-LHC proposal for the energy frontier

    LHCb upgrade software and computing : technical design report

    Get PDF
    This document reports the Research and Development activities that are carried out in the software and computing domains in view of the upgrade of the LHCb experiment. The implementation of a full software trigger implies major changes in the core software framework, in the event data model, and in the reconstruction algorithms. The increase of the data volumes for both real and simulated datasets requires a corresponding scaling of the distributed computing infrastructure. An implementation plan in both domains is presented, together with a risk assessment analysis
    corecore