469 research outputs found
Cross-Language Learning for Program Classification using Bilateral Tree-Based Convolutional Neural Networks
Towards the vision of translating code that implements an algorithm from one programming language into another, this paper proposes an approach for automated program classification using bilateral tree-based convolutional neural networks (BiTBCNNs). It is layered on top of two tree-based convolutional neural networks (TBCNNs), each of which recognizes the algorithm of code written in an individual programming language. The combination layer of the networks recognizes the similarities and differences among code in different programming languages. The BiTBCNNs are trained using the source code in different languages but known to implement the same algorithms and/or functionalities. For a preliminary evaluation, we use 3591 Java and 3534 C++ code snippets from 6 algorithms we crawled systematically from GitHub. We obtained over 90% accuracy in the cross-language binary classification task to tell whether any given two code snippets implement a same algorithm. Also, for the algorithm classification task, i.e., to predict which one of the six algorithm labels is implemented by an arbitrary C++ code snippet, we achieved over 80% precision
Switchable metamaterial reflector/absorber for different polarized electromagnetic waves
We demonstrate a controllable electromagnetic wave reflector/absorber for
different polarizations with metamaterial involving electromagnetic resonant
structures coupled with diodes. Through biasing at different voltages to turn
ON and OFF the diodes, we are able to switch the structure between nearly total
reflection and total absorption of a particularly polarized incident wave. By
arranging orthogonally orientated resonant cells, the metamaterial can react to
different polarized waves by selectively biasing the corresponding diodes. Both
numerical simulations and microwave measurements have verified the performance.Comment: 11 pages, 4 figure
Recommended from our members
Technological-Personal-Environmental (TPE) Framework: A Conceptual Model for Technology Acceptance at the Individual Level
This paper describes the development of the Technological-Personal-Environmental (TPE) framework, which explains individuals’ behaviors of technology acceptance. We argue that existing individual-level technology acceptance theories provide a valuable, but incomplete, understanding of individuals’ technology acceptance. By synthesizing extant technology acceptance models and theories, the proposed TPE delineates the individual-level technology acceptance from technological, personal, and environmental aspects. The proposed framework provides a wider angle to investigate individual-level technology acceptance
CVRetrieval: Separating Consistency Retrieval from Consistency Maintenance
In distributed online collaboration applications, such as digital white board and online gaming, it is important to guarantee the consistency among participants’ views to make collaboration meaningful. However, maintaining even a relaxed consistency in a distributed environment with a large number of geographically dispersed participants still involves formidable communication and management cost among them. In this paper, we propose CVRetrieval (Consistency View Retrieval) to solve this scalability problem. Based on the observation that not all participants are equally active or engaged in distributed online collaboration applications, CVRetrieval differentiates the notions of consistency maintenance and consistency retrieval. Here, consistency maintenance implies a protocol that periodically communicates with all participants to maintain a certain consistency level; and consistency retrieval means that passive participants (those with little updating activity) explicitly request a consistent view from the system when the need arises in stead of joining the expensive consistency maintenance protocol all the time. The rationale is that, if a participant does not have updating activities, it is much more cost-effective to satisfy his or her needs on-demand. The evaluation of CVRetrieval is done in two parts. First, we theoretically analyze the scalability of CVRetrieval and compare it to other consistency maintenance protocols. The analytical result shows that CVRetrieval can greatly reduce communication cost and hence make consistency control more scalable. Second, a prototype of CVRetrieval is developed and deployed on the Planet-Lab test-bed to evaluate its performance. The results show that the active participants experience a short response time at some expense of the passive participants that may encounter a longer response time depends on the system setting. Overall, the retrieval performance is still reasonably high
Bilateral Dependency Neural Networks for Cross-Language Algorithm Classification
Algorithm classification is to automatically identify the classes of a program based on the algorithm(s) and/or data structure(s) implemented in the program. It can be useful for various tasks, such as code reuse, code theft detection, and malware detection. Code similarity metrics, on the basis of features extracted from syntax and semantics, have been used to classify programs. Such features, however, often need manual selection effort and are specific to individual programming languages, limiting the classifiers to programs in the same language.
To recognise the similarities and differences among algorithms implemented in different languages, this paper describes a framework of Bilateral Neural Networks (Bi-NN) that builds a neural network on top of two underlying sub-networks, each of which encodes syntax and semantics of code in one language. A whole Bi-NN can be trained with bilateral programs that implement the same algorithms and/or data structures in different languages and then be applied to recognise algorithm classes across languages.
We have instantiated the framework with several kinds of token-, tree- and graph-based neural networks that encode and learn various kinds of information in code. We have applied the instances of the framework to a code corpus collected from GitHub containing thousands of Java and C++ programs implementing 50 different algorithms and data structures.
Our evaluation results show that the use of Bi-NN indeed produces promising algorithm classification results both within one language and across languages, and the encoding of dependencies from code into the underlying neural networks helps improve algorithm classification accuracy further. In particular, our custom-built dependency trees with tree-based convolutional neural networks achieve the highest classification accuracy among the different instances of the framework that we have evaluated.
Our study points to a possible future research direction to tailor bilateral and multilateral neural networks that encode more relevant semantics for code learning, mining and analysis tasks
CVRetrieval: Separating Consistency Retrieval from Consistency Maintenance
In distributed online collaboration applications, such as digital white board and online gaming, it is important to guarantee the consistency among participants’ views to make collaboration meaningful. However, maintaining even a relaxed consistency in a distributed environment with a large number of geographically dispersed participants still involves formidable communication and management cost among them. In this paper, we propose CVRetrieval (Consistency View Retrieval) to solve this scalability problem. Based on the observation that not all participants are equally active or engaged in distributed online collaboration applications, CVRetrieval differentiates the notions of consistency maintenance and consistency retrieval. Here, consistency maintenance implies a protocol that periodically communicates with all participants to maintain a certain consistency level; and consistency retrieval means that passive participants (those with little updating activity) explicitly request a consistent view from the system when the need arises in stead of joining the expensive consistency maintenance protocol all the time. The rationale is that, if a participant does not have updating activities, it is much more cost-effective to satisfy his or her needs on-demand. The evaluation of CVRetrieval is done in two parts. First, we theoretically analyze the scalability of CVRetrieval and compare it to other consistency maintenance protocols. The analytical result shows that CVRetrieval can greatly reduce communication cost and hence make consistency control more scalable. Second, a prototype of CVRetrieval is developed and deployed on the Planet-Lab test-bed to evaluate its performance. The results show that the active participants experience a short response time at some expense of the passive participants that may encounter a longer response time depends on the system setting. Overall, the retrieval performance is still reasonably high
Adaptive Consistency Guarantees for Large-Scale Replicated Services
To maintain consistency, designers of replicated services have traditionally been forced to choose from either strong consistency guarantees or none at all. Realizing that a continuum between strong and optimistic consistencies is semantically meaningful for a broad range of network services, previous research has proposed a continuous consistency model for replicated services to support the tradeoff between the guaranteed consistency level, performance and availability. However, to meet changing application needs and to make the model useful for interactive users of large-scale replicated services, the adaptability and the swiftness of inconsistency resolution are important and challenging. This paper presents IDEA (an Infrastructure for DEtection-based Adaptive consistency guarantees) for adaptive consistency guarantees of large-scale, Internet-based replicated services. The main functions enabled by IDEA include quick inconsistency detection and resolution, consistency adaptation and quantified consistency level guarantees. Through experimentation on the Planet-Lab, IDEA is evaluated from two aspects: its adaptive consistency guarantees and its performance for inconsistency resolution. Results show that IDEA is able to provide consistency guarantees adaptive to user’s changing needs, and it achieves low delay for inconsistency resolution and incurs small communication overhead
- …