6,696 research outputs found
Projector - a partially typed language for querying XML
We describe Projector, a language that can be used to perform a mixture of typed and untyped computation against data represented in XML. For some problems, notably when the data is unstructured or semistructured, the most desirable programming model is against the tree structure underlying the document. When this tree structure has been used to model regular data structures, then these regular structures themselves are a more desirable programming model. The language Projector, described here in outline, gives both models within a single partially typed algebra and is well suited for hybrid applications, for example when fragments of a known structure are embedded in a document whose overall structure is unknown. Projector is an extension of ECMA-262 (aka JavaScript), and therefore inherits an untyped DOM interface. To this has been added some static typing and a dynamic projection primitive, which can be used to assert the presence of a regular structure modelled within the XML. If this structure does exist, the data is extracted and presented as a typed value within the programming language
A general framework for positioning, evaluating and selecting the new generation of development tools.
This paper focuses on the evaluation and positioning of a new generation of development tools containing subtools (report generators, browsers, debuggers, GUI-builders, ...) and programming languages that are designed to work together and have a common graphical user interface and are therefore called environments. Several trends in IT have led to a pluriform range of developments tools that can be classified in numerous categories. Examples are: object-oriented tools, GUI-tools, upper- and lower CASE-tools, client/server tools and 4GL environments. This classification does not sufficiently cover the tools subject in this paper for the simple reason that only one criterion is used to distinguish them. Modern visual development environments often fit in several categories because to a certain extent, several criteria can be applied to evaluate them. In this study, we will offer a broad classification scheme with which tools can be positioned and which can be refined through further research.
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
Intersection types for unbind and rebind
We define a type system with intersection types for an extension of
lambda-calculus with unbind and rebind operators. In this calculus, a term with
free variables, representing open code, can be packed into an "unbound" term,
and passed around as a value. In order to execute inside code, an unbound term
should be explicitly rebound at the point where it is used. Unbinding and
rebinding are hierarchical, that is, the term can contain arbitrarily nested
unbound terms, whose inside code can only be executed after a sequence of
rebinds has been applied. Correspondingly, types are decorated with levels, and
a term has type decorated with k if it needs k rebinds in order to reduce to a
value. With intersection types we model the fact that a term can be used
differently in contexts providing different numbers of unbinds. In particular,
top-level terms, that is, terms not requiring unbinds to reduce to values,
should have a value type, that is, an intersection type where at least one
element has level 0. With the proposed intersection type system we get
soundness under the call-by-value strategy, an issue which was not resolved by
previous type systems.Comment: In Proceedings ITRS 2010, arXiv:1101.410
Linguistic Reflection in Java
Reflective systems allow their own structures to be altered from within. Here
we are concerned with a style of reflection, called linguistic reflection,
which is the ability of a running program to generate new program fragments and
to integrate these into its own execution. In particular we describe how this
kind of reflection may be provided in the compiler-based, strongly typed
object-oriented programming language Java. The advantages of the programming
technique include attaining high levels of genericity and accommodating system
evolution. These advantages are illustrated by an example taken from persistent
programming which shows how linguistic reflection allows functionality (program
code) to be generated on demand (Just-In-Time) from a generic specification and
integrated into the evolving running program. The technique is evaluated
against alternative implementation approaches with respect to efficiency,
safety and ease of use.Comment: 25 pages. Source code for examples at
http://www-ppg.dcs.st-and.ac.uk/Java/ReflectionExample/ Dynamic compilation
package at http://www-ppg.dcs.st-and.ac.uk/Java/DynamicCompilation
EffectiveSan: Type and Memory Error Detection using Dynamically Typed C/C++
Low-level programming languages with weak/static type systems, such as C and
C++, are vulnerable to errors relating to the misuse of memory at runtime, such
as (sub-)object bounds overflows, (re)use-after-free, and type confusion. Such
errors account for many security and other undefined behavior bugs for programs
written in these languages. In this paper, we introduce the notion of
dynamically typed C/C++, which aims to detect such errors by dynamically
checking the "effective type" of each object before use at runtime. We also
present an implementation of dynamically typed C/C++ in the form of the
Effective Type Sanitizer (EffectiveSan). EffectiveSan enforces type and memory
safety using a combination of low-fat pointers, type meta data and type/bounds
check instrumentation. We evaluate EffectiveSan against the SPEC2006 benchmark
suite and the Firefox web browser, and detect several new type and memory
errors. We also show that EffectiveSan achieves high compatibility and
reasonable overheads for the given error coverage. Finally, we highlight that
EffectiveSan is one of only a few tools that can detect sub-object bounds
errors, and uses a novel approach (dynamic type checking) to do so.Comment: To appear in the Proceedings of 39th ACM SIGPLAN Conference on
Programming Language Design and Implementation (PLDI2018
Type-Directed Weaving of Aspects for Polymorphically Typed Functional Languages
Incorporating aspect-oriented paradigm to a polymorphically typed functional
language enables the declaration of type-scoped advice, in which the
effect of an aspect can be harnessed by introducing possibly polymorphic
type constraints to the aspect. The amalgamation of aspect orientation and
functional programming enables quick behavioral adaption of functions, clear
separation of concerns and expressive type-directed programming. However,
proper static weaving of aspects in polymorphic languages with a type-erasure
semantics remains a challenge. In this paper, we describe a type-directed
static weaving strategy, as well as its implementation, that supports
static type inference and static weaving of programs written in an aspect-oriented
polymorphically typed functional language, AspectFun. We show
examples of type-scoped advice, identify the challenges faced with compile-time
weaving in the presence of type-scoped advice, and demonstrate how
various advanced aspect features can be handled by our techniques. Lastly,
we prove the correctness of the static weaving strategy with respect to the
operational semantics of AspectFun
- …