30,352 research outputs found
Polymorphic Endpoint Types for Copyless Message Passing
We present PolySing#, a calculus that models process interaction based on
copyless message passing, in the style of Singularity OS. We equip the calculus
with a type system that accommodates polymorphic endpoint types, which are a
variant of polymorphic session types, and we show that well-typed processes are
free from faults, leaks, and communication errors. The type system is
essentially linear, although linearity alone may leave room for scenarios where
well-typed processes leak memory. We identify a condition on endpoint types
that prevents these leaks from occurring.Comment: In Proceedings ICE 2011, arXiv:1108.014
The Sketch of a Polymorphic Symphony
In previous work, we have introduced functional strategies, that is,
first-class generic functions that can traverse into terms of any type while
mixing uniform and type-specific behaviour. In the present paper, we give a
detailed description of one particular Haskell-based model of functional
strategies. This model is characterised as follows. Firstly, we employ
first-class polymorphism as a form of second-order polymorphism as for the mere
types of functional strategies. Secondly, we use an encoding scheme of run-time
type case for mixing uniform and type-specific behaviour. Thirdly, we base all
traversal on a fundamental combinator for folding over constructor
applications.
Using this model, we capture common strategic traversal schemes in a highly
parameterised style. We study two original forms of parameterisation. Firstly,
we design parameters for the specific control-flow, data-flow and traversal
characteristics of more concrete traversal schemes. Secondly, we use
overloading to postpone commitment to a specific type scheme of traversal. The
resulting portfolio of traversal schemes can be regarded as a challenging
benchmark for setups for typed generic programming.
The way we develop the model and the suite of traversal schemes, it becomes
clear that parameterised + typed strategic programming is best viewed as a
potent combination of certain bits of parametric, intensional, polytypic, and
ad-hoc polymorphism
No value restriction is needed for algebraic effects and handlers
We present a straightforward, sound Hindley-Milner polymorphic type system
for algebraic effects and handlers in a call-by-value calculus, which allows
type variable generalisation of arbitrary computations, not just values. This
result is surprising. On the one hand, the soundness of unrestricted
call-by-value Hindley-Milner polymorphism is known to fail in the presence of
computational effects such as reference cells and continuations. On the other
hand, many programming examples can be recast to use effect handlers instead of
these effects. Analysing the expressive power of effect handlers with respect
to state effects, we claim handlers cannot express reference cells, and show
they can simulate dynamically scoped state
Two-phase coexistence in Fe–Ni alloys synthesized by ball milling
We used mechanical alloying with a Spex 8000 mixer/mill to synthesize a series of Fe100–xNix alloys from x=0 to x=49. The Spex mill was modified so that it could also operate at a reduced milling intensity, and we compared the alloys synthesized after long times with the normal and reduced milling intensities. X-ray diffractometry and Mössbauer spectrometry were used to measure the volume fractions of the bcc and fcc phases in the alloys, and to determine the chemical compositions of the individual phases. We found that the composition ranges of the bcc and fcc single phase regions were extended well beyond their equilibrium ranges. At the higher milling intensity, we found that the bcc phase was destabilized with respect to the fcc phase, and the two-phase region shifted to lower Ni concentrations. For those alloys with coexisting bcc and fcc phases, we present evidence that the chemical compositions of the two phases are nearly the same. We explain the destabilization of the bcc with milling intensity as originating with a higher defect density in the bcc alloys than in the fcc alloys. We argue that this defect density is not homogeneous throughout the alloy, however, and the distribution of defect enthalpies can explain the two-phase coexistence in the as-milled alloys
Type-Directed Weaving of Aspects for Higher-order Functional Languages
Aspect-oriented programming (AOP) has been shown to be a useful model for software development. Special care must be taken when we try to adapt AOP to strongly typed functional languages which come with features like a type inference mechanism, polymorphic types, higher-order functions and type-scoped pointcuts. Our main contribution lies in a seamless integration of these two paradigms through a static weaving process which deals with around advices with type-scoped pointcuts in the presence of higher-order functions. We give a source-level type inference system for a higher-order, polymorphic language coupled with type-scoped pointcuts. The type system ensures that base programs are oblivious to the type of around advices. We present a type-directed translation scheme which resolves all advice applications at static time. The translation removes advice declarations from source programs and produces translated code which is typable in the Hindley-Milner system
- …