2,041 research outputs found
Clarifying and compiling C/C++ concurrency: from C++11 to POWER
The upcoming C and C++ revised standards add concurrency to the languages, for the first time, in the form of a subtle *relaxed memory model* (the *C++11 model*). This aims to permit compiler optimisation and to accommodate the differing relaxed-memory behaviours of mainstream multiprocessors, combining simple semantics for most code with high-performance *low-level atomics* for concurrency libraries. In this paper, we first establish two simpler but provably equivalent models for C++11, one for the full language and another for the subset without consume operations. Subsetting further to the fragment without low-level atomics, we identify a subtlety arising from atomic initialisation and prove that, under an additional condition, the model is equivalent to sequential consistency for race-free programs
Functional Big-step Semantics
When doing an interactive proof about a piece of software, it is important that the underlying programming language’s semantics does not make the proof unnecessarily difficult or unwieldy. Both smallstep and big-step semantics are commonly used, and the latter is typically given by an inductively defined relation. In this paper, we consider an alternative: using a recursive function akin to an interpreter for the language. The advantages include a better induction theorem, less duplication, accessibility to ordinary functional programmers, and the ease of doing symbolic simulation in proofs via rewriting. We believe that this style of semantics is well suited for compiler verification, including proofs of divergence preservation. We do not claim the invention of this style of semantics: our contribution here is to clarify its value, and to explain how it supports several language features that might appear to require a relational or small-step approach. We illustrate the technique on a simple imperative language with C-like for-loops and a break statement, and compare it to a variety of other approaches. We also provide ML and lambda-calculus based examples to illustrate its generality
Exploring Student Understanding of the Connections Between Music and Literacy
It has been found that music training improves attention and recall of memory, two skills that are linked to literacy. Music is also strongly correlated with phonological and phonemic awareness. More research is needed to pinpoint therapy methods that integrate music and are Evidence- Based Practices. The purpose of this project was to discover the extent to which aspiring speech language pathologists are aware that musical experiences aid learning and literacy by conducting a survey of undergraduate speech-language pathology and audiology students at The University of Akron. For the methods of this survey, twenty-eight participants completed a survey that was approximately fifteen minutes long. Two sections- “Background Questions” and “Literacy-Based Questions”- were included in the survey. The project was mixed methods, with some questions being likert scale and others being qualitative short- answer prompts. methods, discussion, etc. After the data was collected and the results were analyzed, one overall theme was noted by the researchers: students are somewhat knowledgeable about the neurological connections between music and literacy, and when asked, students can think of ways to apply music to therapy. However, when asked to discuss music integration in therapy or music appreciation in general, students are more inclined to first view music as a calming, engaging sensory activity, rather than a potential therapy aide
WILL FARMERS USE SAFER PESTICIDES?
Virtually all technology adoption studies are conducted ex post, yet policy makers often need to assess the likely level of adoption before the technology is introduced. This study uses data from a contingent valuation survey of Michigan corn growers to assess what factors would influence the adoption of two safer corn herbicides, one that is not carcinogenic and one that does not leach. Results indicate that price, risk perception, and sources of pest control information are all important. This suggests that public policies designed to change perceptions and improve information dissemination may encourage voluntary use of more environmentally friendly technologies.atrazine, cancer risk, contingent valuation, herbicides, nitrate leaching, public policy, technology adoption, Crop Production/Industries,
Molecular Aspects of H. pylori-Related MALT Lymphoma
Helicobacter pylori-related extranodal marginal zone lymphoma of mucosa-associated lymphoid tissue is a paradigm for malignancy arising in an inflammatory background. While the diagnosis of H. pylori gastritis is often straightforward, distinction between severe gastritis and early lymphoma can be difficult and requires careful assessment of clinical findings in addition to histological features and immunohistochemical results. A number of cytogenetic abnormalities have been discovered in H. pylori-related lymphomas and several have clinical importance, related to the responsiveness of lymphoma to H. pylori eradication therapy, but routine molecular studies are not widely utilized. While molecular methods may be used in equivocal cases, a trial of conservative therapy is warranted given the propensity for these lymphomas to regress with eradication of the
organism. Once therapy is initiated, care must be taken to avoid a premature assignment of disease refractoriness because complete response can take several months to more than a year. Cases truly refractory to H. pylori eradication therapy may be treated with adjuvant chemoradiation with a high response rate
Synchronising C/C++ and POWER
Shared memory concurrency relies on synchronisation primitives: compare-and-swap, load-reserve/store-conditional (aka LL/SC), language-level mutexes, and so on. In a sequentially consistent setting, or even in the TSO setting of x86 and Sparc, these have well-understood semantics. But in the very relaxed settings of IBM®, POWER®, ARM, or C/C++, it remains surprisingly unclear exactly what the programmer can depend on.
This paper studies relaxed-memory synchronisation. On the hardware side, we give a clear semantic characterisation of the load-reserve/store-conditional primitives as provided by POWER multiprocessors, for the first time since they were introduced 20 years ago; we cover their interaction with relaxed loads, stores, barriers, and dependencies. Our model, while not officially sanctioned by the vendor, is validated by extensive testing, comparing actual implementation behaviour against an oracle generated from the model, and by detailed discussion with IBM staff. We believe the ARM semantics to be similar.
On the software side, we prove sound a proposed compilation scheme of the C/C++ synchronisation constructs to POWER, including C/C++ spinlock mutexes, fences, and read-modify-write operations, together with the simpler atomic operations for which soundness is already known from our previous work; this is a first step in verifying concurrent algorithms that use load-reserve/store-conditional with respect to a realistic semantics. We also build confidence in the C/C++ model in its own terms, fixing some omissions and contributing to the C standards committee adoption of the C++11 concurrency model
Mathematizing C++ concurrency
Shared-memory concurrency in C and C++ is pervasive in systems programming, but has long been poorly defined. This motivated an ongoing shared effort by the standards committees to specify concurrent behaviour in the next versions of both languages. They aim to provide strong guarantees for race-free programs, together with new (but subtle) relaxed-memory atomic primitives for high-performance concurrent code. However, the current draft standards, while the result of careful deliberation, are not yet clear and rigorous definitions, and harbour substantial problems in their details.
In this paper we establish a mathematical (yet readable) semantics for C++ concurrency. We aim to capture the intent of the current (`Final Committee') Draft as closely as possible, but discuss changes that fix many of its problems. We prove that a proposed x86 implementation of the concurrency primitives is correct with respect to the x86-TSO model, and describe our Cppmem tool for exploring the semantics of examples, using code generated from our Isabelle/HOL definitions.
Having already motivated changes to the draft standard, this work will aid discussion of any further changes, provide a correctness condition for compilers, and give a much-needed basis for analysis and verification of concurrent C and C++ programs
A Verified Type System for CakeML
CakeML is a dialect of the (strongly typed) ML family of programming
languages, designed to play a central role in high-assurance
software systems. To date, the main artefact supporting this is a verified
compiler from CakeML source code to x86-64 machine code.
The verification effort addresses each phase of compilation from
parsing through to code generation and garbage collection.
In this paper, we focus on the type system: its declarative speci-
fication, type soundness theorem, and the soundness and completeness
of an implementation of type inference – all formally veri-
fied in the HOL4 proof assistant. Each of these aspects of a type
system is important in any design and implementation of a typed
functional programming language. They allow the programmer to
soundly employ (informal) type-based reasoning, and the compiler
to apply optimisations that assume type-correctness. So naturally,
their verification is a critical part of a verified compiler
k-d Darts: Sampling by k-Dimensional Flat Searches
We formalize the notion of sampling a function using k-d darts. A k-d dart is
a set of independent, mutually orthogonal, k-dimensional subspaces called k-d
flats. Each dart has d choose k flats, aligned with the coordinate axes for
efficiency. We show that k-d darts are useful for exploring a function's
properties, such as estimating its integral, or finding an exemplar above a
threshold. We describe a recipe for converting an algorithm from point sampling
to k-d dart sampling, assuming the function can be evaluated along a k-d flat.
We demonstrate that k-d darts are more efficient than point-wise samples in
high dimensions, depending on the characteristics of the sampling domain: e.g.
the subregion of interest has small volume and evaluating the function along a
flat is not too expensive. We present three concrete applications using line
darts (1-d darts): relaxed maximal Poisson-disk sampling, high-quality
rasterization of depth-of-field blur, and estimation of the probability of
failure from a response surface for uncertainty quantification. In these
applications, line darts achieve the same fidelity output as point darts in
less time. We also demonstrate the accuracy of higher dimensional darts for a
volume estimation problem. For Poisson-disk sampling, we use significantly less
memory, enabling the generation of larger point clouds in higher dimensions.Comment: 19 pages 16 figure
- …