The Isabelle proof assistant includes a small functional language, which allows users to write and reason about programs. So far, these programs could be extracted into a number of functional languages: Standard ML, O...
详细信息
ISBN:
(纸本)9783031711763;9783031711770
The Isabelle proof assistant includes a small functional language, which allows users to write and reason about programs. So far, these programs could be extracted into a number of functional languages: Standard ML, OCaml, Scala, and Haskell. This work adds support for go as a fifth target language for the Code Generator. Unlike the previous targets, go is not a functional language and encourages code in an imperative style, thus many of the features of Isabelle's language (particularly data types, pattern matching, and type classes) have to be emulated using imperative language constructs in go. The developed Code Generation is provided as an add-on library that can be simply imported into existing theories.
go programming language is a powerful tool for modern software development. Ensuring the correct functionality of language features is paramount for the seamless execution of go programs. Despite meticulous design and...
详细信息
ISBN:
(纸本)9798350365634
go programming language is a powerful tool for modern software development. Ensuring the correct functionality of language features is paramount for the seamless execution of go programs. Despite meticulous design and development efforts, bugs are an unavoidable aspect of any software, and go is no exception. This paper presents a comprehensive empirical study based on an extensive analysis of 51,020 issue reports from go's repositories on GitHub, providing a panoramic view of the bug landscape within the go ecosystem and its core packages. Our investigation reveals that: (1) Bugs are more prevalent in components such as Documentation, compiler/runtime, and builder. Windows OS and WebAssembly (WASM) exhibit a higher number of bugs compared to other system architectures. (2) Compilation and Building, gocommand are the most affected language features by bugs. (3) Behavioral, compiler and runtime errors, and documentation are the three most common types of bug symptoms. (4) Approximately 35% of bugs are fixed within a day, and about 80% of bugs are fixed within a year. Roughly 5% are labeled as soon or release-blockers, statistics indicates that there's a moderate positive correlation between bug priority and resolution time. (5) Incorrect code logic, improper condition checks, and documentation errors are the three most prevalent root causes of bugs.
golang (short for go programming language) is a fast and compiled language, which has been increasingly used in industry due to its excellent performance on concurrent programming. golang redefines concurrent programm...
详细信息
ISBN:
(纸本)9781450362245
golang (short for go programming language) is a fast and compiled language, which has been increasingly used in industry due to its excellent performance on concurrent programming. golang redefines concurrent programming grammar, making it a challenge for traditional clone detection tools and techniques. However, there exist few tools for detecting duplicates or copy-paste related bugs in golang. Therefore, an effective and efficient code clone detector on golang is especially needed. In this paper, we present go-Clone, a learning-based clone detector for golang. go-Clone contains two modules - the training module and the user interaction module. In the training module, firstly we parse golang source code into llvm IR (Intermediate Representation). Secondly, we calculate LSFG (labeled semantic flow graph) for each program function automatically. go-Clone trains a deep neural network model to encode LSFGs for similarity classification. In the user interaction module, users can choose one or more golang projects. go-Clone identifies and presents a list of function pairs, which are most likely clone code for user inspection. To evaluate go-Clone's performance, we collect 6,110 commit versions from 48 Github projects to construct a golang clone detection data set. go-Clone can reach the value of AUC (Area Under Curve) and ACC (Accuracy) for 89.61% and 83.80% in clone detection. By testing several groups of unfamiliar data, we also demonstrates the generility of go-Clone. The address of the abstract demo video: https://***/o5DogtYGbeo
Escape analysis is widely used to determine the scope of variables, and is an effective way to optimize memory usage. However, the escape analysis algorithm can hardly reach 100% accurate, mistakes of which can lead t...
详细信息
ISBN:
(纸本)9781450371230
Escape analysis is widely used to determine the scope of variables, and is an effective way to optimize memory usage. However, the escape analysis algorithm can hardly reach 100% accurate, mistakes of which can lead to a waste of heap memory. It is challenging to ensure the correctness of programs for memory optimization. In this paper, we propose an escape analysis optimization approach for go programming language (golang), aiming to save heap memory usage of programs. First, we compile the source code to capture information of escaped variables. Then, we change the code so that some of these variables can bypass golang's escape analysis mechanism, thereby saving heap memory usage and reducing the pressure of memory garbage collection. Next, we present a verification method to validate the correctness of programs, and evaluate the effect of memory optimization. We implement the approach to an automatic tool and make it open-source(1). For evaluation, we apply our approach to 10 open-source projects. For the optimized golang code, the heap allocation is reduced by 8.88% in average, and the heap usage is reduced by 8.78% in average. Time consumption is reduced by 9.48% in average, while the cumulative time of GC pause is reduced by 5.64% in average. We also apply our approach to 16 industrial projects in Bytedance Technology. Our approach successfully finds 452 optimized cases which are confirmed by developers.
Training artificial neural networks is a computationally intensive task. A common and reasonable approach to reduce the computation time of neural networks is parallelizing the training. Therefore, we present a data p...
详细信息
ISBN:
(纸本)9783030205188;9783030205171
Training artificial neural networks is a computationally intensive task. A common and reasonable approach to reduce the computation time of neural networks is parallelizing the training. Therefore, we present a data parallel neural network implementation written in go. The chosen programminglanguage offers built-in concurrency support, allowing to focus on the neural network instead of the multi-threading. The multi-threaded performance of various networks was compared to the single-threaded performance in accuracy, execution time and speedup. Additionally, two alternative parallelization approaches were implemented for further comparisons. Summing up, all networks benefited from the parallelization in terms of execution time and speedup. Splitting the mini-batches for parallel gradient computation and merging the updates produced the same accuracy results as the single-threaded network. Averaging the parameters too infrequently in the alternative implementations had a negative impact on accuracy.
Edge computing platform is a critical component to form next-generation intelligent equipment. In an effort to support new military and industrial applications with more flexible computing power, a new lightweight edg...
详细信息
ISBN:
(数字)9781728123455
ISBN:
(纸本)9781728123462
Edge computing platform is a critical component to form next-generation intelligent equipment. In an effort to support new military and industrial applications with more flexible computing power, a new lightweight edge computing platform is introduced in this paper. This platform is fully based on embedded hardware, such as ARM, DSP and FPGA. Platform's management and scheduling architecture is developed using golanguage to minimize code size and dependence on three-party libraries. In addition, the management and scheduling commands transmit across the platform over the Ethernet, while data transmit among computing nodes via the RapidIO network to isolate the commands and data channels. An experimental letter count application was performed to validate the feasibility of the platform and also supply optimization hint with a data throughput test. This work has the potential to reduce developer's experience in parallel and distributed systems, and then the cost and time in development of embedded intelligent equipment.
暂无评论