• No results found

Testing object Interactions Grüner, A.

N/A
N/A
Protected

Academic year: 2021

Share "Testing object Interactions Grüner, A."

Copied!
5
0
0

Bezig met laden.... (Bekijk nu de volledige tekst)

Hele tekst

(1)

Citation

Grüner, A. (2010, December 15). Testing object Interactions. Retrieved from https://hdl.handle.net/1887/16243

Version: Corrected Publisher’s Version

License: Licence agreement concerning inclusion of doctoral thesis in the Institutional Repository of the University of Leiden

Downloaded from: https://hdl.handle.net/1887/16243

Note: To cite this publication please use the final published version (if

applicable).

(2)

Part II

Testing Multi-threaded Components

135

(3)
(4)

137

In the previous part of this thesis we presented a formal framework for testing object-oriented components in a sequential setting. That is, the language allowed for a single-threaded flow of control, only. In the following part, we suggest an extension of the framework regarding multi-threaded components. In particular, we will extend the underlying programming language with the notion of threads.

In languages like Java and C] objects are passive entities residing in the heap of the program – instantiated from classes that serve as “generators of state”; the active part of the program is represented by threads. Indeed, in a multi-threaded setting, there is also a mechanism for “generating new activity”, i.e., for creating new threads. Thus, we extend our previous work by thread instantiation from thread classes, meaning that new activities can be dynamically spawned from

“templates”.

Correspondingly, we have to adapt the test specification language. The un- derlying idea is that we cope with multi-threading by providing a specification statement for each thread. Hence, only the order of interactions which belong to the same thread is specified.

Finally, we sketch how the code generation algorithm of the single-threaded setting can be modified in order to generate test programs also for multi-threaded components.

(5)

Referenties

GERELATEERDE DOCUMENTEN

A program consists of a list of global variables, a set of classes, and a main program (or main body). Note, that due to simplicity, our language slightly differs from Java already

Thus, the original statement of an (outgoing) method call, x = e.m(e), is now split into the actual outgoing call and its corresponding incoming return such that the new

Thus, if no matching incoming call expectation can be found, then, before we consider the constructor call to be unexpected, we additional check if an internal object creation

As for the remaining inherited typing rules regarding statements, they are again extended by the new name context. Some of them are also adapted regard- ing the control context. A

Consequently, the thread configuration mapping is extended by the new thread n, where n is mapped to its thread class and a new call stack consisting of the method or, respectively,

Note, furthermore, that we need not to provide a specification statement for the expectation of incoming spawns. To understand the reason, consider the case that we do provide such

As a third step, we developed a test code generation algorithm which allows to automatically generate a Japl test program from a test specification.. A central contribution is

Kiczales (ed.) Proceedings of the 23rd ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA 2008), pp.