14,164 research outputs found
Tools and libraries to model and manipulate circular programs
This paper presents techniques to model circular lazy programs in a strict, purely functional setting. Circular lazy programs model any algorithm based on multiple traversals over a recursive data structure as a single traversal function. Such elegant and concise circular programs are defined in a (strict or lazy) functional language and they are transformed into efficient strict and deforested, multiple traversal programs by using attribute grammars-based techniques. Moreover, we use standard slicing techniques to slice such circular lazy programs. We have expressed these transformations as an Haskell library and two tools have been constructed: the HaCirctool that refactors Haskell lazy circular programs into strict ones, and the OCirctool that extends Ocaml with circular definitions allowing programmers to write circular programs in Ocaml notation, which are transformed into strict Ocaml programs before they are executed. The first benchmarks of the different implementations are presented and show that for algorithms relying on a large number of traversals the resulting strict, deforested programs are more efficient than the lazy ones, both in terms of runtime and memory consumption.(undefined
Synthesizing Functional Reactive Programs
Functional Reactive Programming (FRP) is a paradigm that has simplified the
construction of reactive programs. There are many libraries that implement
incarnations of FRP, using abstractions such as Applicative, Monads, and
Arrows. However, finding a good control flow, that correctly manages state and
switches behaviors at the right times, still poses a major challenge to
developers. An attractive alternative is specifying the behavior instead of
programming it, as made possible by the recently developed logic: Temporal
Stream Logic (TSL). However, it has not been explored so far how Control Flow
Models (CFMs), as synthesized from TSL specifications, can be turned into
executable code that is compatible with libraries building on FRP. We bridge
this gap, by showing that CFMs are indeed a suitable formalism to be turned
into Applicative, Monadic, and Arrowized FRP. We demonstrate the effectiveness
of our translations on a real-world kitchen timer application, which we
translate to a desktop application using the Arrowized FRP library Yampa, a web
application using the Monadic threepenny-gui library, and to hardware using the
Applicative hardware description language ClaSH.Comment: arXiv admin note: text overlap with arXiv:1712.0024
A Browser-based IDE for the MUzECS Platform
We report on a scalable, portable, and secure visual development environment for programming embedded Arduino platforms with Chromebooks in a successful secondary school computer science curriculum. Our web-based environment is part of the larger MUzECS project, an inexpensive replacement module for the Exploring Computer Science (ECS) course being widely deployed in United States high schools. Students use MUzECS to gain a deeper understanding of computing, through a set of blocks which provide appropriate abstractions for working with low-level hardware.
MUzECS improves upon the existing curriculum module by reducing the hardware cost by an order of magnitude, while still preserving the key ECS pillars of computer science content, student inquiry and classroom equity. Programming with visual blocks provides a more attractive tool for introductory courses than traditional approaches, and yet enables high-impact exploration activities such as building a series of embedded musical instruments.
The current work combines and modifies several existing tools to eliminate technical barriers on low-cost platforms like Chromebooks, such as the reliance on special block-based toolchains, remote compilation servers, or multi-stage transfers for student code
An object-oriented programming of an explicit dynamics code: application to impact simulation
During the last fifty years, the development of better numerical methods and more powerful computers has been a major enterprise for the scientific community. Recent advances in computational softwares have lead to the possibility of solving more physical and complex problems (coupled problems, nonlinearities, high strain and high strain rate problems, etc.). The development of object-oriented programming leads to better structured codes for the finite element method and facilitates the development, the maintainability and the expandability of such codes.
This paper presents an implementation in C++ of an explicit finite element program dedicated to the simulation of impacts. We first present a brief overview of the kinematics, the conservative and constitutive laws related to large deformation inelasticity. Then we present the design and the numerical implementation of some aspects developed with an emphasis on the object-oriented programming adopted. Finally, the efficiency and accuracy of the program are investigated through some benchmark tests
QuantumInformation.jl---a Julia package for numerical computation in quantum information theory
Numerical investigations are an important research tool in quantum
information theory. There already exists a wide range of computational tools
for quantum information theory implemented in various programming languages.
However, there is little effort in implementing this kind of tools in the Julia
language. Julia is a modern programming language designed for numerical
computation with excellent support for vector and matrix algebra, extended type
system that allows for implementation of elegant application interfaces and
support for parallel and distributed computing. QuantumInformation.jl is a new
quantum information theory library implemented in Julia that provides functions
for creating and analyzing quantum states, and for creating quantum operations
in various representations. An additional feature of the library is a
collection of functions for sampling random quantum states and operations such
as unitary operations and generic quantum channels.Comment: 32 pages, 8 figure
ROOT - A C++ Framework for Petabyte Data Storage, Statistical Analysis and Visualization
ROOT is an object-oriented C++ framework conceived in the high-energy physics
(HEP) community, designed for storing and analyzing petabytes of data in an
efficient way. Any instance of a C++ class can be stored into a ROOT file in a
machine-independent compressed binary format. In ROOT the TTree object
container is optimized for statistical data analysis over very large data sets
by using vertical data storage techniques. These containers can span a large
number of files on local disks, the web, or a number of different shared file
systems. In order to analyze this data, the user can chose out of a wide set of
mathematical and statistical functions, including linear algebra classes,
numerical algorithms such as integration and minimization, and various methods
for performing regression analysis (fitting). In particular, ROOT offers
packages for complex data modeling and fitting, as well as multivariate
classification based on machine learning techniques. A central piece in these
analysis tools are the histogram classes which provide binning of one- and
multi-dimensional data. Results can be saved in high-quality graphical formats
like Postscript and PDF or in bitmap formats like JPG or GIF. The result can
also be stored into ROOT macros that allow a full recreation and rework of the
graphics. Users typically create their analysis macros step by step, making use
of the interactive C++ interpreter CINT, while running over small data samples.
Once the development is finished, they can run these macros at full compiled
speed over large data sets, using on-the-fly compilation, or by creating a
stand-alone batch program. Finally, if processing farms are available, the user
can reduce the execution time of intrinsically parallel tasks - e.g. data
mining in HEP - by using PROOF, which will take care of optimally distributing
the work over the available resources in a transparent way
- …