47 research outputs found
The C++0x "Concepts" Effort
C++0x is the working title for the revision of the ISO standard of the C++
programming language that was originally planned for release in 2009 but that
was delayed to 2011. The largest language extension in C++0x was "concepts",
that is, a collection of features for constraining template parameters. In
September of 2008, the C++ standards committee voted the concepts extension
into C++0x, but then in July of 2009, the committee voted the concepts
extension back out of C++0x.
This article is my account of the technical challenges and debates within the
"concepts" effort in the years 2003 to 2009. To provide some background, the
article also describes the design space for constrained parametric
polymorphism, or what is colloquially know as constrained generics. While this
article is meant to be generally accessible, the writing is aimed toward
readers with background in functional programming and programming language
theory. This article grew out of a lecture at the Spring School on Generic and
Indexed Programming at the University of Oxford, March 2010
Strong Normalization by Type-Directed Partial Evaluation and Run-Time Code Generation (Preliminary Version)
We investigate the synergy between type-directed partial evaluation and run-time code generation for the Caml dialect of ML. Type-directed partial evaluation maps simply typed, closed Caml values to a representation of their long beta-eta-normal form. Caml uses a virtual machine and has the capability to load byte code at run time. Representing the long beta-eta-normal forms as byte code gives us the ability to strongly normalize higher-order values (i.e., weak head normal forms in ML), to compile the resulting strong normal forms into byte code, and to load this byte code all in one go, at run time.We conclude this note with a preview of our current work on scalingup strong normalization by run-time code generation to the Camlmodule language
First-Class Nonstandard Interpretations by Opening Closures
We motivate and discuss a novel functional programming construct
that allows convenient modular run-time nonstandard interpretation
via reflection on closure environments. This map-closure construct
encompasses both the ability to examine the contents of a
closure environment and to construct a new closure with a modified
environment. From the user’s perspective, map-closure is a
powerful and useful construct that supports such tasks as tracing,
security logging, sandboxing, error checking, profiling, code instrumentation
and metering, run-time code patching, and resource
monitoring. From the implementor’s perspective, map-closure
is analogous to call/cc. Just as call/cc is a non-referentiallytransparent
mechanism that reifies the continuations that are only
implicit in programs written in direct style, map-closure is a nonreferentially-
transparent mechanism that reifies the closure environments
that are only implicit in higher-order programs. Just as
CPS conversion is a non-local but purely syntactic transformation
that can eliminate references to call/cc, closure conversion
is a non-local but purely syntactic transformation that can eliminate
references to map-closure. We show how the combination
of map-closure and call/cc can be used to implement set! as
a procedure definition and a local macro transformation
PARALLELIZING TIME-SERIES SESSION DATA ANALYSIS WITH A TYPE-ERASURE BASED DSEL
The Science Information Network (SINET) is a Japanese academic backbone network. SINET consists of more than 800 universities and research institutions. In the operation of a huge academic backbone network, more flexible querying technology is required to cope with massive time series session data and analysis of sophisticated cyber-attacks. This paper proposes a parallelizing DSEL (Domain Specific Embedded Language) processing for huge time-series session data. In our DESL, the function object is implemented by type erasure for constructing internal DSL for processing time-series data. Type erasure enables our parser to store function pointer and function object into the same *void type with class templates. We apply to scatter/gather pattern for concurrent DSEL parsing. Each thread parses DSEL to extract the tuple timestamp, source IP, and destination IP in the gather phase. In the scattering phase, we use a concurrent hash map to handle multiple thread outputs with our DSEL.
In the experiment, we have measured the elapsed time in parsing and inserting IPv4 address and timestamp data format ranging from 1,000 to 50,000 lines with 24-row items. We have also measured CPU idle time in processing 100,000,000 lines of session data with 5, 10 and 20 multiple threads. It has been turned out that the proposed method can work in feasible computing time in both cases
An abstract machine for an object-oriented language with top-level classes
Object-oriented programming languages where classes are top-level, i.e. not first-class citizens, are better suited for compilation than completely dynamic languages like SMALLTALK or SELF. In O\u27SMALL, a language with top-level classes, the compiler can statically determine the inheritance hierarchy. Due to late binding, the class of the receiver of a message must be determined at run time. After that a direct jump to the corresponding method is possible. Method lookup can thus be done in constant time. We present an abstract machine for O\u27SMALL based on these principles. It is a concise description of a portable O\u27SMALL implementation
Introduction to the Literature on Semantics
An introduction to the literature on semantics. Included are pointers to the literature on axiomatic semantics, denotational semantics, operational semantics, and type theory
The Logic of the RAISE Specification Language
This paper describes the logic of the RAISE Specification Language, RSL. It explains the particular logic chosen for RAISE, and motivates this choice as suitable for a wide spectrum language to be used for designs as well as initial specifications, and supporting imperative and concurrent specifications as well as applicative sequential ones. It also describes the logical definition of RSL, its axiomatic semantics, as well as the proof system for carrying out proofs
Static Type Inference for Parametric Classes
Central features of object-oriented programming are method inheritance and data abstraction attained through hierarchical organization of classes. Recent studies show that method inheritance can be nicely supported by ML style type inference when extended to labeled records. This is based on the fact that a function that selects a field Ć’ of a record can be given a polymorphic type that enables it to be applied to any record which contains a field Ć’. Several type systems also provide data abstraction through abstract type declarations. However, these two features have not yet been properly integrated in a statically checked polymorphic type system.
This paper proposes a static type system that achieves this integration in an ML-like polymorphic language by adding a class construct that allows the programmer to build a hierarchy of classes connected by multiple inheritance declarations. Moreover, classes can be parameterized by types allowing generic definitions. The type correctness of class declarations is st atically checked by the type system. The type system also infers a principal scheme for any type correct program containing methods and objects defined in classes