syntax tree
Recently Published Documents


TOTAL DOCUMENTS

117
(FIVE YEARS 45)

H-INDEX

9
(FIVE YEARS 2)

2021 ◽  
Vol 12 (1) ◽  
pp. 369
Author(s):  
Da Ma ◽  
Xingyu Chen ◽  
Ruisheng Cao ◽  
Zhi Chen ◽  
Lu Chen ◽  
...  

Generating natural language descriptions for structured representation (e.g., a graph) is an important yet challenging task. In this work, we focus on SQL-to-text, a task that maps a SQL query into the corresponding natural language question. Previous work represents SQL as a sparse graph and utilizes a graph-to-sequence model to generate questions, where each node can only communicate with k-hop nodes. Such a model will degenerate when adapted to more complex SQL queries due to the inability to capture long-term and the lack of SQL-specific relations. To tackle this problem, we propose a relation-aware graph transformer (RGT) to consider both the SQL structure and various relations simultaneously. Specifically, an abstract SQL syntax tree is constructed for each SQL to provide the underlying relations. We also customized self-attention and cross-attention strategies to encode the relations in the SQL tree. Experiments on benchmarks WikiSQL and Spider demonstrate that our approach yields improvements over strong baselines.


2021 ◽  
Author(s):  
Pu Yu ◽  
Hui Shu ◽  
Xiaobing Xiong ◽  
Fei Kang

2021 ◽  
Author(s):  
Arjun Verma ◽  
Prateksha Udhayanan ◽  
Rahul Murali Shankar ◽  
Nikhila KN ◽  
Sujit Kumar Chakrabarti

2021 ◽  
Vol 6 (2) ◽  
pp. 5110
Author(s):  
Lynn Santelmann

This paper describes an activity designed to help students improve skills in drawing syntax tree structures without significantly increasing instructor grading time. In this formative exercise, students draw ten trees prior to each class period, correct their own work, and reflect on their mistakes. This assignment incorporates many practices that research on learning suggests are essential for understanding and retention of material. In addition, this exercise incorporates some best practices on effective feedback. The activity works best when students understand the science behind it, so discussion of the pedagogical reasons for the exercise is essential. Further, overt discussion of how to learn helps students develop effective skills for learning linguistics. Self-correct homework assignments like this can be applied to many courses that involve learning skills or terminology.


2021 ◽  
Vol 5 (ICFP) ◽  
pp. 1-29
Author(s):  
Zhixuan Yang ◽  
Nicolas Wu

Effect handlers can be composed by applying them sequentially, each handling some operations and leaving other operations uninterpreted in the syntax tree. However, the semantics of composed handlers can be subtle---it is well known that different orders of composing handlers can lead to drastically different semantics. Determining the correct order of composition is a non-trivial task. To alleviate this problem, this paper presents a systematic way of deriving sufficient conditions on handlers for their composite to correctly handle combinations, such as the sum and the tensor, of the effect theories separately handled. These conditions are solely characterised by the clauses for relevant operations of the handlers, and are derived by fusing two handlers into one using a form of fold/build fusion and continuation-passing style transformation. As case studies, the technique is applied to commutative and distributive interaction of handlers to obtain a series of results about the interaction of common handlers: (a) equations respected by each handler are preserved after handler composition; (b) handling mutable state before any handler gives rise to a semantics in which state operations are commutative with any operations from the latter handler; (c) handling the writer effect and mutable state in either order gives rise to a correct handler of the commutative combination of these two theories.


2021 ◽  
Vol 2021 ◽  
pp. 1-12
Author(s):  
Yingjie Xu ◽  
Gengran Hu ◽  
Lin You ◽  
Chengtang Cao

In recent years, a lot of vulnerabilities of smart contracts have been found. Hackers used these vulnerabilities to attack the corresponding contracts developed in the blockchain system such as Ethereum, and it has caused lots of economic losses. Therefore, it is very important to find out the potential problems of the smart contracts and develop more secure smart contracts. As blockchain security events have raised more important issues, more and more smart contract security analysis methods have been developed. Most of these methods are based on traditional static analysis or dynamic analysis methods. There are only a few methods that use emerging technologies, such as machine learning. Some models that use machine learning to detect smart contract vulnerabilities cost much time in extracting features manually. In this paper, we introduce a novel machine learning-based analysis model by introducing the shared child nodes for smart contract vulnerabilities. We build the Abstract-Syntax-Tree (AST) for smart contracts with some vulnerabilities from two data sets including SmartBugs and SolidiFI-benchmark. Then, we build the Abstract-Syntax-Tree (AST) of the labeled smart contract for data sets named Smartbugs-wilds. Next, we get the shared child nodes from both of the ASTs to obtain the structural similarity, and then, we construct a feature vector composed of the values that measure structural similarity automatically to build our machine learning model. Finally, we get a KNN model that can predict eight types of vulnerabilities including Re-entrancy, Arithmetic, Access Control, Denial of Service, Unchecked Low Level Calls, Bad Randomness, Front Running, and Denial of Service. The accuracy, recall, and precision of our KNN model are all higher than 90%. In addition, compared with some other analysis tools including Oyente and SmartCheck, our model has higher accuracy. In addition, we spent less time for training .


Sign in / Sign up

Export Citation Format

Share Document