10 research outputs found
Metaprogramming applied to web component deployment
Metaprogramming is a generic approach described in many
articles. Surprisingly, examples of
successful applications are
scarce. This paper gives such an example. With a metaprogram of
less
than 2500 lines, we deploy components on the web by adding
specific XML-based communication
facilities. This underlines the
expressiveness of the metaprogramming approach
Generating semantic analysis using constraint programming
We describe a new approach for the specification and generation
of the semantic analysis for typed programming languages.
We specify context-sensitive syntactic properties of a language
by a system of semantic rules. For various imperative programming
language concepts, we discuss the required semantic rules and show
how they can be solved efficiently, i.e., in time O(n) where n is
the program size
Component communication and data adaptation
Predefined components often require adaption to interoperate,
especially an adaption of the data
they exchange. This paper
presents an XML-based approach to the data adaption problem.
It
covers serialization of objects to XML, their transformation
with XSLT, as well as deserialization,
i.e., parsing and
reconstruction of the transformed objects. We statically analyze
classes
to generate specific document types and allow static
preprocessing. Compared to normal interpreted
XML processing,
this approach eliminates introspection overhead, thus
accelerating the
components communication
A lightweight XML-based middleware architecture
Predefined components often require adaption to make them work
together including an adaption of the data exchanged. The
present paper describes an XML based approach to solve the
adoption of data. It includes the serialization of objets to
XML, the transformation with XSLT, and the parsing and
construction of the transformed objects. The pre-agreed document
types involved allow a pre-compilation of the processes.
Compared to standard interpreted XML processing, this approach
reduces the online adaptation processes and speeds up the
components\u27 communication
Names, types, and static semantic analysis
We describe a new approach for the specification and
generation of the semantic analysis for typed programming languages.
We specify context-sensitive syntactic properties of a language by a
system of semantic rules. For various imperative programming
language concepts, we discuss the required semantic rules. In
particular, we show how overloading of programmer-defined
identifiers can be handled.
We propose an algorithm to solve these constraint systems
efficiently, i.e., in time O(n^2) where n is the program
size
Combining static and dynamic analyses to detect interaction patterns
We detect interaction patterns in legacy code combining static
and dynamic analyses. The analyses do not depend on coding or
naming conventions. We classified potential pattern instances
according to the evidence our analyses provide.
We discuss our approach with the Observer Pattern as an example.
Our Java implementation analyzes Java programs.
We evaluated our approach by self applying the tool looking for
Observers in its code. In general, our tool detects all
Observer Pattern instances actually contained in the code as
candidates, i.e., we do not miss a single pattern instance. In
the example, the candidates our tool considers Observers with
high evidence include 80% of the actual Observer Pattern
instances and no false positives
Language concepts and design patterns
Programming languages aim at the construction of simple but
expressive programs. To achieve this, plenty of language
concepts have arisen over time. Design patterns aim at the
solution of common design problems. To achieve this, plenty
of approved design concepts have been collected.
We claim that language concepts and design patterns are
essentially the same. Indeed, a language may offer a design
pattern as a language concept; we call such patterns "language
patterns".
A design pattern can be implemented in terms of other design or
language patterns. Since a concrete programming language only
supports a subset of language patterns, every other pattern must
be expressed in terms of this subset. We call such
an implementation a "workaround". The specification of a
workaround imposes proof obligations: it must be shown that a
workaround simulates the pattern. Once proved correct, we can
collect patterns and their workarounds in a trustworthy
catalogue. This helps software developers to correctly apply
patterns in any language and helps the language designer to
decide which patterns to put into the language core.
We demonstrate this pattern integration process with
well-known design patterns and concepts of object-oriented
languages. Additionally, we list important language patterns
together with their workarounds
Foundations of fast communication via XML
Communication with XML often involves pre-agreed document types. In this paper, we propose an offline parser generation approach to enhance online processing performance for documents con-forming to a given DTD. Our examination of DTDs and the languages they define demonstrates the existence of ambiguities. We present an algorithm that maps DTDs to deterministic context-free grammars defining the same languages. We prove the grammars to be LL(1) and LALR(1), making them suitable for standard parser generators. Our experiments show the superior performance of generated optimized parsers. Our results generalize from DTDs to XML Schema specifications with certain restrictions, most notably the absence of namespaces, which exceed the scope of context-free grammars
Subtyping and application of context-free classes
Object-oriented systems are usually not designed from scratch but
constructed using frameworks or class libraries. This construction
should lead to correct systems provided the reused classes are
locally correct. Therefore knowledge about the features that a
certain class provides is often not enough. It is additionally
necessary to know the correct semantics of classes, i.e. information
on how to use these features. Especially, we have to mind the
sequences of method calls that are acceptable by an object. Using
regular languages for the description of these sequences works
fine for some classes but is not adequate for others, e.g. for
stacks, buffers, queues or lists etc.
In this paper we present a more general approach for the
specification of the dynamic behavior of objects using context-free
grammars. We investigate questions of correctness in subtyping and
application of such classes. We define sufficient conditions for
class systems such that local correctness in subtyping and
application implies global correctness of the system