-
Synthesis of Semantic Actions in Attribute Grammars
Authors:
Pankaj Kumar Kalita,
Miriyala Jeevan Kumar,
Subhajit Roy
Abstract:
Attribute grammars allow the association of semantic actions to the production rules in context-free grammars, providing a simple yet effective formalism to define the semantics of a language. However, drafting the semantic actions can be tricky and a large drain on developer time. In this work, we propose a synthesis methodology to automatically infer the semantic actions from a set of examples a…
▽ More
Attribute grammars allow the association of semantic actions to the production rules in context-free grammars, providing a simple yet effective formalism to define the semantics of a language. However, drafting the semantic actions can be tricky and a large drain on developer time. In this work, we propose a synthesis methodology to automatically infer the semantic actions from a set of examples associating strings to their meanings. We also propose a new coverage metric, derivation coverage. We use it to build a sampler to effectively and automatically draw strings to drive the synthesis engine. We build our ideas into our tool, PANINI, and empirically evaluate it on twelve benchmarks, including a forward differentiation engine, an interpreter over a subset of Java bytecode, and a mini-compiler for C language to two-address code. Our results show that PANINI scales well with the number of actions to be synthesized and the size of the context-free grammar, significantly outperforming simple baselines.
△ Less
Submitted 14 August, 2022;
originally announced August 2022.
-
Synthesizing Abstract Transformers
Authors:
Pankaj Kumar Kalita,
Sujit Kumar Muduli,
Loris D'Antoni,
Thomas Reps,
Subhajit Roy
Abstract:
This paper addresses the problem of creating abstract transformers automatically. The method we present automates the construction of static analyzers in a fashion similar to the way $\textit{yacc}$ automates the construction of parsers. Our method treats the problem as a program-synthesis problem. The user provides specifications of (i) the concrete semantics of a given operation $\textit{op}$, (…
▽ More
This paper addresses the problem of creating abstract transformers automatically. The method we present automates the construction of static analyzers in a fashion similar to the way $\textit{yacc}$ automates the construction of parsers. Our method treats the problem as a program-synthesis problem. The user provides specifications of (i) the concrete semantics of a given operation $\textit{op}$, (ii) the abstract domain A to be used by the analyzer, and (iii) the semantics of a domain-specific language $L$ in which the abstract transformer is to be expressed. As output, our method creates an abstract transformer for $\textit{op}$ in abstract domain A, expressed in $L$ (an "$L$-transformer for $\textit{op}$ over A"). Moreover, the abstract transformer obtained is a most-precise $L$-transformer for $\textit{op}$ over A; that is, there is no other $L$-transformer for $\textit{op}$ over A that is strictly more precise.
We implemented our method in a tool called AMURTH. We used AMURTH to create sets of replacement abstract transformers for those used in two existing analyzers, and obtained essentially identical performance. However, when we compared the existing transformers with the transformers obtained using AMURTH, we discovered that four of the existing transformers were unsound, which demonstrates the risk of using manually created transformers.
△ Less
Submitted 15 August, 2022; v1 submitted 2 May, 2021;
originally announced May 2021.
-
Quantum Confinement Induced Shift in Energy Band Edges and Band Gap of Spherical Quantum Dot
Authors:
P. Borah,
D. Siboh,
P. K. Kalita,
J. K. Sarma,
N. M. Nath
Abstract:
We have proposed and validated an ansatz as effective potential for confining electron/hole within spherical quantum dot in order to understand quantum confinement and its consequences associated with energy states and band gap of Spherical Quantum Dot. Within effective mass approximation formalism, considering an ansatz incorporating a conjoined harmonic oscillator and coulomb interaction as the…
▽ More
We have proposed and validated an ansatz as effective potential for confining electron/hole within spherical quantum dot in order to understand quantum confinement and its consequences associated with energy states and band gap of Spherical Quantum Dot. Within effective mass approximation formalism, considering an ansatz incorporating a conjoined harmonic oscillator and coulomb interaction as the effective potential for confining an electron or a hole within a spherical quantum dot and by employing appropriate boundary conditions we have calculated the shifts in energy of minimum of conduction band(CBM) and maximum of valence band(VBM) with respect to size of spherical quantum dot. We have also determined the quantum confinement induced shift in band gap energy of spherical quantum dot. In order to verify our theoretical predictions as well as to validate our ansatz, we have performed phenomenological analysis in comparison with available experimental results for quantum dots made of CdSe and observe a very good agreement in this regard. Our experimentally consistent theoretical results also help in map** the probability density of electron and hole inside spherical quantum dot. The consistency of our results with available experimental data signifies the capability as well as applicability of the ansatz for the effective confining potential to have reasonable information in the study of real nano-structured spherical systems.
△ Less
Submitted 2 June, 2017; v1 submitted 29 May, 2017;
originally announced May 2017.