83,052 research outputs found
Dynamic Package Interfaces - Extended Version
A hallmark of object-oriented programming is the ability to perform
computation through a set of interacting objects. A common manifestation of
this style is the notion of a package, which groups a set of commonly used
classes together. A challenge in using a package is to ensure that a client
follows the implicit protocol of the package when calling its methods.
Violations of the protocol can cause a runtime error or latent invariant
violations. These protocols can extend across different, potentially
unboundedly many, objects, and are specified informally in the documentation.
As a result, ensuring that a client does not violate the protocol is hard.
We introduce dynamic package interfaces (DPI), a formalism to explicitly
capture the protocol of a package. The DPI of a package is a finite set of
rules that together specify how any set of interacting objects of the package
can evolve through method calls and under what conditions an error can happen.
We have developed a dynamic tool that automatically computes an approximation
of the DPI of a package, given a set of abstraction predicates. A key property
of DPI is that the unbounded number of configurations of objects of a package
are summarized finitely in an abstract domain. This uses the observation that
many packages behave monotonically: the semantics of a method call over a
configuration does not essentially change if more objects are added to the
configuration. We have exploited monotonicity and have devised heuristics to
obtain succinct yet general DPIs. We have used our tool to compute DPIs for
several commonly used Java packages with complex protocols, such as JDBC,
HashSet, and ArrayList.Comment: The only changes compared to v1 are improvements to the Abstract and
Introductio
Engineering telecommunication services with SDL
If formal techniques are to be more widely accepted then they should evolve as current software engineering approaches evolve. Current techniques in the development of distributed systems use interface definition languages (IDLs) as a basis for the underlying communication and also as an abstraction tool. Object-oriented technologies [6] and the idea of engineering software through frameworks [5] are also widely accepted approaches in developing software. In this paper we show how the formal specification language SDL and associated tool support have been applied in the TOSCA1 project to engineer telecommunication services using these current techniques
Finite state machine based SDL
No abstract available
Fast Recompilation of Object Oriented Modules
Once a program file is modified, the recompilation time should be minimized,
without sacrificing execution speed or high level object oriented features. The
recompilation time is often a problem for the large graphical interactive
distributed applications tackled by modern OO languages. A compilation server
and fast code generator were developed and integrated with the SRC Modula-3
compiler and Linux ELF dynamic linker. The resulting compilation and
recompilation speedups are impressive. The impact of different language
features, processor speed, and application size are discussed
dotCall64: An Efficient Interface to Compiled C/C++ and Fortran Code Supporting Long Vectors
The R functions .C() and .Fortran() can be used to call compiled C/C++ and
Fortran code from R. This so-called foreign function interface is convenient,
since it does not require any interactions with the C API of R. However, it
does not support long vectors (i.e., vectors of more than 2^31 elements). To
overcome this limitation, the R package dotCall64 provides .C64(), which can be
used to call compiled C/C++ and Fortran functions. It transparently supports
long vectors and does the necessary castings to pass numeric R vectors to
64-bit integer arguments of the compiled code. Moreover, .C64() features a
mechanism to avoid unnecessary copies of function arguments, making it
efficient in terms of speed and memory usage.Comment: 17 page
A Notion of Dynamic Interface for Depth-Bounded Object-Oriented Packages
Programmers using software components have to follow protocols that specify
when it is legal to call particular methods with particular arguments. For
example, one cannot use an iterator over a set once the set has been changed
directly or through another iterator. We formalize the notion of dynamic
package interfaces (DPI), which generalize state-machine interfaces for single
objects, and give an algorithm to statically compute a sound abstraction of a
DPI. States of a DPI represent (unbounded) sets of heap configurations and
edges represent the effects of method calls on the heap. We introduce a novel
heap abstract domain based on depth-bounded systems to deal with potentially
unboundedly many objects and the references among them. We have implemented our
algorithm and show that it is effective in computing representations of common
patterns of package usage, such as relationships between viewer and label,
container and iterator, and JDBC statements and cursors
- …