1,342 research outputs found
Array operators using multiple dispatch: a design methodology for array implementations in dynamic languages
Arrays are such a rich and fundamental data type that they tend to be built
into a language, either in the compiler or in a large low-level library.
Defining this functionality at the user level instead provides greater
flexibility for application domains not envisioned by the language designer.
Only a few languages, such as C++ and Haskell, provide the necessary power to
define -dimensional arrays, but these systems rely on compile-time
abstraction, sacrificing some flexibility. In contrast, dynamic languages make
it straightforward for the user to define any behavior they might want, but at
the possible expense of performance.
As part of the Julia language project, we have developed an approach that
yields a novel trade-off between flexibility and compile-time analysis. The
core abstraction we use is multiple dispatch. We have come to believe that
while multiple dispatch has not been especially popular in most kinds of
programming, technical computing is its killer application. By expressing key
functions such as array indexing using multi-method signatures, a surprising
range of behaviors can be obtained, in a way that is both relatively easy to
write and amenable to compiler analysis. The compact factoring of concerns
provided by these methods makes it easier for user-defined types to behave
consistently with types in the standard library.Comment: 6 pages, 2 figures, workshop paper for the ARRAY '14 workshop, June
11, 2014, Edinburgh, United Kingdo
A Reference Interpreter for the Graph Programming Language GP 2
GP 2 is an experimental programming language for computing by graph
transformation. An initial interpreter for GP 2, written in the functional
language Haskell, provides a concise and simply structured reference
implementation. Despite its simplicity, the performance of the interpreter is
sufficient for the comparative investigation of a range of test programs. It
also provides a platform for the development of more sophisticated
implementations.Comment: In Proceedings GaM 2015, arXiv:1504.0244
Glitch Behavior of Pulsars and Contribution from Neutron Star Crust
Pulsars are highly magnetized rotating neutron stars with a very stable
rotation speed. Irrespective of their stable rotation rate, many pulsars have
been observed with the sudden jump in the rotation rate, which is known as
pulsar glitch. The glitch phenomena are considered to be an exhibit of
superfluidity of neutron matter inside the neutron star's crustal region. The
magnitude of such rapid change in rotation rate relative to their stable
rotation frequency can quantify the moment of inertia of the crustal region to
the total moment of inertia of the star called as the fractional moment of
inertia (FMI). In this paper, we have calculated FMI for different masses of
the star using six different representative unified equations of state (EoS)
constructed under Relativistic Mean Field (RMF) framework. We have performed an
event-wise comparison of FMI obtained from data with that of theoretically
calculated values with and without considering the entrainment effect. It is
found that larger glitches can't be explained by crustal FMI alone, even
without the entrainment.Comment: 9 pages, 3 figures, 1 table, revised, accepted for publication in Ap
Maximum elastic deformations of relativistic stars
We present a method for calculating the maximum elastic quadrupolar
deformations of relativistic stars, generalizing the previous Newtonian,
Cowling approximation integral given by [G. Ushomirsky et al., Mon. Not. R.
Astron. Soc. 319, 902 (2000)]. (We also present a method for Newtonian gravity
with no Cowling approximation.) We apply these methods to the m = 2 quadrupoles
most relevant for gravitational radiation in three cases: crustal deformations,
deformations of crystalline cores of hadron-quark hybrid stars, and
deformations of entirely crystalline color superconducting quark stars. In all
cases, we find suppressions of the quadrupole due to relativity compared to the
Newtonian Cowling approximation, particularly for compact stars. For the crust
these suppressions are up to a factor ~6, for hybrid stars they are up to ~4,
and for solid quark stars they are at most ~2, with slight enhancements instead
for low mass stars. We also explore ranges of masses and equations of state
more than in previous work, and find that for some parameters the maximum
quadrupoles can still be very large. Even with the relativistic suppressions,
we find that 1.4 solar mass stars can sustain crustal quadrupoles of a few
times 10^39 g cm^2 for the SLy equation of state or close to 10^40 g cm^2 for
equations of state that produce less compact stars. Solid quark stars of 1.4
solar masses can sustain quadrupoles of around 10^44 g cm^2. Hybrid stars
typically do not have solid cores at 1.4 solar masses, but the most massive
ones (~2 solar masses) can sustain quadrupoles of a few times 10^41 g cm^2 for
typical microphysical parameters and a few times 10^42 g cm^2 for extreme ones.
All of these quadrupoles assume a breaking strain of 0.1 and can be divided by
10^45 g cm^2 to yield the fiducial "ellipticities" quoted elsewhere.Comment: 21 pages, 11 figures, version accepted by PRD, including the
corrected maximum hybrid star quadrupoles (from the erratum to the shear
modulus calculation) and the corrected binding energy computatio
A heuristic-based approach to code-smell detection
Encapsulation and data hiding are central tenets of the object oriented paradigm. Deciding what data and behaviour to form into a class and where to draw the line between its public and private details can make the difference between a class that is an understandable, flexible and reusable abstraction and one which is not. This decision is a difficult one and may easily result in poor encapsulation which can then have serious implications for a number of system qualities. It is often hard to identify such encapsulation problems within large software systems until they cause a maintenance problem (which is usually too late) and attempting to perform such analysis manually can also be tedious and error prone. Two of the common encapsulation problems that can arise as a consequence of this decomposition process are data classes and god classes. Typically, these two problems occur together – data classes are lacking in functionality that has typically been sucked into an over-complicated and domineering god class. This paper describes the architecture of a tool which automatically detects data and god classes that has been developed as a plug-in for the Eclipse IDE. The technique has been evaluated in a controlled study on two large open source systems which compare the tool results to similar work by Marinescu, who employs a metrics-based approach to detecting such features. The study provides some valuable insights into the strengths and weaknesses of the two approache
Gravitational waves from single neutron stars: an advanced detector era survey
With the doors beginning to swing open on the new gravitational wave
astronomy, this review provides an up-to-date survey of the most important
physical mechanisms that could lead to emission of potentially detectable
gravitational radiation from isolated and accreting neutron stars. In
particular we discuss the gravitational wave-driven instability and
asteroseismology formalism of the f- and r-modes, the different ways that a
neutron star could form and sustain a non-axisymmetric quadrupolar "mountain"
deformation, the excitation of oscillations during magnetar flares and the
possible gravitational wave signature of pulsar glitches. We focus on progress
made in the recent years in each topic, make a fresh assessment of the
gravitational wave detectability of each mechanism and, finally, highlight key
problems and desiderata for future work.Comment: 39 pages, 12 figures, 2 tables. Chapter of the book "Physics and
Astrophysics of Neutron Stars", NewCompStar COST Action 1304. Minor
corrections to match published versio
Computability and analysis: the legacy of Alan Turing
We discuss the legacy of Alan Turing and his impact on computability and
analysis.Comment: 49 page
- …