scispace - formally typeset
Search or ask a question

Showing papers on "Java annotation published in 2019"


Journal ArticleDOI
TL;DR: This work considers the problem of generating a concurrent Java component from a high-level model of inter-process interaction and follows a realistic approach where the translation is semiautomatic (schemata for code generation) and the programmer still retains the power of coding or modifying parts of the code for the resource.
Abstract: Concurrent systems are hard to program, and ensuring quality by means of traditional testing techniques is often very hard as errors may not show up easily and reproducing them is hard. In previous work, we have advocated a model-driven approach to the analysis and design of concurrent, safety-critical systems. However, to take full advantage of these techniques, they must be supported by code generation schemes for concrete programming languages. Ideally, this translation should be traceable, automated and should support the verification of the generated code. In our work, we consider the problem of generating a concurrent Java component from a high-level model of inter-process interaction (i.e., communication + synchronization). We call our formalism shared resources. From the model, which can be represented in mathematical notation or written as a Java interface annotated using an extension of JML, a Java component can be obtained by a semiautomatic translation. We describe how to obtain shared memory (using a priority monitors library) and message passing (using the JCSP library) implementations. Focusing on inter-process interaction for formal development is justified by several reasons, e.g., mathematical models are language-independent and allow to analyze certain concurrency issues, such as deadlocks or liveness properties prior to code generation. Also, the Java components produced from the shared resource model will contain all the concurrency-related language constructs, which are often responsible for many of the errors in concurrent software. We follow a realistic approach where the translation is semiautomatic (schemata for code generation) and the programmer still retains the power of coding or modifying parts of the code for the resource. The code thus obtained is JML-annotated Java with proof obligations that help with code traceability and verification of safety and liveness properties. As the code thus obtained is not automatically correct, there is still the need to verify its conformance to the original specs. We illustrate the methodology by developing a concurrent control system and verifying the code obtained using the KeY program verification tool. We also show how KeY can be used to find errors resulting from a wrong use of the templates.

4 citations


Journal ArticleDOI
TL;DR: In a user study with ten student developers and three professional engineers at PayPal, the participants viewed favorably TAE-JS's flexible declarative enhancement capabilities, seeing them as a valuable mechanism for implementing non-functional concerns in JavaScript programs.

3 citations


Journal ArticleDOI
TL;DR: This paper presents the annotation‐based programming interface of the framework @PT (Annotation Parallel Task), a parallel computing framework that proposes Java annotations, standard Java components, as its language constructs, and its fundamental parallelization concepts.
Abstract: Parallel computing techniques have been supported by programming languages in two major ways: either library‐based APIs or extended language constructs. Library‐based features are portable and offer fine‐grained control on parallelization details. However, they rely on individual programmer skills; thus, they may lead to inconsistent implementations and considerable code restructurings. On the contrary, language constructs promote environments that largely conceal the details of parallel programming techniques. However, they normally reduce programmer control over the granularity of parallelization and impose additional development concepts and compilation requirements that may sacrifice ease of use and portability. Therefore, approaches that balance between programmer control on parallelization details, intuitiveness of concepts, and portability can gain priority over other paradigms. In this paper, we discuss @PT (Annotation Parallel Task), a parallel computing framework that proposes Java annotations, standard Java components, as its language constructs. @PT takes an object‐oriented approach on efficient execution and management of asynchronous tasks, with a special focus on GUI‐responsive applications. This paper presents the annotation‐based programming interface of the framework and its fundamental parallelization concepts. Furthermore, it studies the usability and performance of @PT by comparisons with other Java parallelization approaches in a set of standard benchmarks. The observations suggest that @PT maintains a simple programming interface, whereas it performs efficiently in different parallel computing domains.

2 citations


Patent
19 Apr 2019
TL;DR: In this article, the authors present a method and a device for data verification and injection based on Java annotations, which relates to the technical field of computers. But they do not specify a specific implementation of their method.
Abstract: The invention discloses a method and a device for realizing data verification and injection based on Java annotations, and relates to the technical field of computers. A specific embodiment of the method comprises the steps that the method for achieving data verification based on the Java annotation comprises the steps: determining a verification label based on the Java annotation according to aninterface standard, wherein the interface standard comprises a plurality of constraints; Adding the verification label into a source file to generate a to-be-verified file; And adopting the verifier to operate the to-be-verified file to realize verification of the source file. According to the embodiment, the data verification step can be greatly simplified, the configurability of data verification is realized, the reusability is high, and the universality is good.

1 citations