-
Do Names Echo Semantics? A Large-Scale Study of Identifiers Used in C++'s Named Casts
Authors:
Constantin Cezar Petrescu,
Sam Smith,
Rafail Giavrimis,
Santanu Kumar Dash
Abstract:
Developers relax restrictions on a type to reuse methods with other types. While type casts are prevalent, in weakly typed languages such as C++, they are also extremely permissive. Assignments where a source expression is cast into a new type and assigned to a target variable of the new type, can lead to software bugs if performed without care. In this paper, we propose an information-theoretic a…
▽ More
Developers relax restrictions on a type to reuse methods with other types. While type casts are prevalent, in weakly typed languages such as C++, they are also extremely permissive. Assignments where a source expression is cast into a new type and assigned to a target variable of the new type, can lead to software bugs if performed without care. In this paper, we propose an information-theoretic approach to identify poor implementations of explicit cast operations. Our approach measures accord between the source expression and the target variable using conditional entropy. We collect casts from 34 components of the Chromium project, which collectively account for 27MLOC and random-uniformly sample this dataset to create a manually labelled dataset of 271 casts. Information-theoretic vetting of these 271 casts achieves a peak precision of 81% and a recall of 90%. We additionally present the findings of an in-depth investigation of notable explicit casts, two of which were fixed in recent releases of the Chromium project.
△ Less
Submitted 3 April, 2023; v1 submitted 2 November, 2021;
originally announced November 2021.
-
Effect of Horizontal Spacing and Tilt Angle on Thermo-Buoyant Natural Convection from Two Horizontally Aligned Square Cylinders
Authors:
Subhasisa Rath,
Sukanta Kumar Dash
Abstract:
Laminar natural convection heat transfer from two horizontally aligned square cylinders has been investigated numerically using a finite-volume method (FVM) approach. Computations were performed to delineate the momentum and heat transfer characteristics under the following ranges of parameters: horizontal spacing between the cylinders (0 <= S/W <= 10), tilt angle of the square cylinder (0^0 <= δ…
▽ More
Laminar natural convection heat transfer from two horizontally aligned square cylinders has been investigated numerically using a finite-volume method (FVM) approach. Computations were performed to delineate the momentum and heat transfer characteristics under the following ranges of parameters: horizontal spacing between the cylinders (0 <= S/W <= 10), tilt angle of the square cylinder (0^0 <= δ <= 60^0), and Grashof number (10 <= Gr <= 10^5) for some specific Newtonian fluids having Prandtl number (0.71 <= Pr <= 7). The comprehensive results are represented in terms of temperature contours and streamlines, velocity and temperature profiles, the mass flow rate in the passage between the cylinders, local and average Nu, and the drag coefficient. Owing to the development of a chimney effect, the heat transfer increases with decrease in the horizontal spacing up to a certain limit, whereas it significantly degrades with a further decrease in the spacing. The square cylinder having δ = 45^0 shows a higher heat transfer, whereas it is least for δ = 0^0. At higher Gr and Pr, the average Nu is found to be in excess of 22% at δ = 45^0 compared to at δ = 0^0. Overall, the average Nu has a strong dependence on both Gr and Pr, whereas it is a weak function of S/W and δ. Furthermore, the entropy generation is reproduced non-dimensionally in terms of the Bejan number. Finally, a correlation for the average Nu has been developed, which can be useful for the engineering calculations.
△ Less
Submitted 14 June, 2019;
originally announced June 2019.
-
Numerical Study of Laminar and Turbulent Natural Convection from a Stack of Solid Horizontal Cylinders
Authors:
Subhasisa Rath,
Sukanta Kumar Dash
Abstract:
Natural convection from a stack of isothermal solid horizontal cylinders has been investigated numerically in a three dimensional computational domain. Simulations were conducted in both laminar and turbulent flow regimes of Rayleigh number (Ra) spanning in the range (10^4 to 10^8) and (10^10 to 10^13), respectively. In the present study, the length to diameter ratio of the cylinders has been vari…
▽ More
Natural convection from a stack of isothermal solid horizontal cylinders has been investigated numerically in a three dimensional computational domain. Simulations were conducted in both laminar and turbulent flow regimes of Rayleigh number (Ra) spanning in the range (10^4 to 10^8) and (10^10 to 10^13), respectively. In the present study, the length to diameter ratio of the cylinders has been varied in the range 0.5 to 20. Three different stack arrangements were considered for the numerical simulations by arranging three, six and ten number of cylinders in a triangular manner. The present computational study is able to appraise very interesting thermo-buoyant plume structures around the stack of cylinders. The average Nusselt number (Nu) shows a positive dependence on Ra for all L/D. The average Nu for a stack of three-cylinders is marginally higher than that of six-cylinders followed by ten-cylinders. Furthermore, at a particular Ra, Nu is significantly higher for short cylinders (low L/D) and decreases with increase in L/D up to 10 or 15 and remain constant for long cylinders. In addition, the present numerical results are also compared with the stack of hollow cylinders. A new Nusselt number correlation has been developed for different stacks as a function of Ra and L/D, which would be useful to industrial practitioners and academic researchers.
△ Less
Submitted 14 May, 2019;
originally announced May 2019.
-
Effect of Horizontal Spacing on Natural Convection from Two Horizontally Aligned Circular Cylinders in Non-Newtonian Power-Law Fluids
Authors:
Subhasisa Rath,
Sukanta K. Dash
Abstract:
Laminar natural convection from two horizontally aligned isothermal cylinders in unconfined Power-law fluids has been investigated numerically. The effect of horizontal spacing (0<=(S/D)<=10) on both momentum and heat transfer characteristics has been delineated under the following pertinent parameters: Grashof number (10<=Gr<=1e3), Prandtl number (0.71<=n<=100), and Power-law index (0.4<=n<=1.6).…
▽ More
Laminar natural convection from two horizontally aligned isothermal cylinders in unconfined Power-law fluids has been investigated numerically. The effect of horizontal spacing (0<=(S/D)<=10) on both momentum and heat transfer characteristics has been delineated under the following pertinent parameters: Grashof number (10<=Gr<=1e3), Prandtl number (0.71<=n<=100), and Power-law index (0.4<=n<=1.6). The heat transfer characteristics are elucidated in terms of isotherms, local Nusselt number (Nu) distributions and average Nusselt number values, whereas the flow characteristics are interpreted in terms of streamlines, pressure contours, local distribution of the pressure drag and skin-friction drag coefficients along with the total drag coefficient values. The average Nusselt number shows a positive dependence on both Gr and Pr whereas it shows an adverse dependence on Power-law index (n). Overall, shear-thinning (n<1) fluid behavior promotes the convection whereas shear-thickening (n>1) behavior impedes it with reference to a Newtonian fluid (n=1). Furthermore, owing to the formation of a chimney effect, the heat transfer increases with decrease in horizontal spacing (S/D) and reaches a maximum value corresponding to the optimal spacing whereas the heat transfer drops significantly with further decrease in S/D. Finally, a correlation for Nu has been developed, which can be useful to academic researchers and practicing engineers.
△ Less
Submitted 26 June, 2019; v1 submitted 23 December, 2018;
originally announced December 2018.
-
Spatio-temporal prediction of crimes using network analytic approach
Authors:
Saroj Kumar Dash,
Ilya Safro,
Ravisutha Sakrepatna Srinivasamurthy
Abstract:
It is quite evident that majority of the population lives in urban area today than in any time of the human history. This trend seems to increase in coming years. A study [5] says that nearly 80.7% of total population in USA stays in urban area. By 2030 nearly 60% of the population in the world will live in or move to cities. With the increase in urban population, it is important to keep an eye on…
▽ More
It is quite evident that majority of the population lives in urban area today than in any time of the human history. This trend seems to increase in coming years. A study [5] says that nearly 80.7% of total population in USA stays in urban area. By 2030 nearly 60% of the population in the world will live in or move to cities. With the increase in urban population, it is important to keep an eye on criminal activities. By doing so, governments can enforce intelligent policing systems and hence many government agencies and local authorities have made the crime data publicly available. In this paper, we analyze Chicago city crime data fused with other social information sources using network analytic techniques to predict criminal activity for the next year. We observe that as we add more layers of data which represent different aspects of the society, the quality of prediction is improved. Our prediction models not just predict total number of crimes for the whole Chicago city, rather they predict number of crimes for all types of crimes and for different regions in City of Chicago.
△ Less
Submitted 30 October, 2018; v1 submitted 19 August, 2018;
originally announced August 2018.
-
Deep Learning to Detect Redundant Method Comments
Authors:
Annie Louis,
Santanu Kumar Dash,
Earl T. Barr,
Charles Sutton
Abstract:
Comments in software are critical for maintenance and reuse. But apart from prescriptive advice, there is little practical support or quantitative understanding of what makes a comment useful. In this paper, we introduce the task of identifying comments which are uninformative about the code they are meant to document. To address this problem, we introduce the notion of comment entailment from cod…
▽ More
Comments in software are critical for maintenance and reuse. But apart from prescriptive advice, there is little practical support or quantitative understanding of what makes a comment useful. In this paper, we introduce the task of identifying comments which are uninformative about the code they are meant to document. To address this problem, we introduce the notion of comment entailment from code, high entailment indicating that a comment's natural language semantics can be inferred directly from the code. Although not all entailed comments are low quality, comments that are too easily inferred, for example, comments that restate the code, are widely discouraged by authorities on software style. Based on this, we develop a tool called CRAIC which scores method-level comments for redundancy. Highly redundant comments can then be expanded or alternately removed by the developer. CRAIC uses deep language models to exploit large software corpora without requiring expensive manual annotations of entailment. We show that CRAIC can perform the comment entailment task with good agreement with human judgements. Our findings also have implications for documentation tools. For example, we find that common tags in Javadoc are at least two times more predictable from code than non-Javadoc sentences, suggesting that Javadoc tags are less informative than more free-form comments
△ Less
Submitted 12 June, 2018;
originally announced June 2018.
-
Experimental validation of XRF inversion code for Chandrayaan-1
Authors:
P. S. Athiray,
M. Sudhakar,
M. K. Tiwari,
S. Narendranath,
G. S. Lodha,
S. K. Deb,
P. Sreekumar,
S. K. Dash
Abstract:
We have developed an algorithm (x2abundance) to derive the lunar surface chemistry from X-ray fluorescence (XRF) data for the Chandrayaan-1 X-ray Spectrometer (C1XS) experiment. The algorithm converts the observed XRF line fluxes to elemental abundances with uncertainties. We validated the algorithm in the laboratory using high Z elements (20 < Z < 30) published in Athiray et al. (2013). In this p…
▽ More
We have developed an algorithm (x2abundance) to derive the lunar surface chemistry from X-ray fluorescence (XRF) data for the Chandrayaan-1 X-ray Spectrometer (C1XS) experiment. The algorithm converts the observed XRF line fluxes to elemental abundances with uncertainties. We validated the algorithm in the laboratory using high Z elements (20 < Z < 30) published in Athiray et al. (2013). In this paper, we complete the exercise of validation using samples containing low Z elements, which are also analogous to the lunar surface composition (ie., contains major elements between 11 < Z < 30). The paper summarizes results from XRF experiments performed on Lunar simulant (JSC-1A) and anorthosite using a synchrotron beam excitation. We also discuss results from the validation of x2abundance using Monte Carlo simulation (GEANT4 XRF simulation).
△ Less
Submitted 4 October, 2013;
originally announced October 2013.
-
WLAN location system: Background theories and future directions
Authors:
Debabala Swain,
S. P. Panigrahi,
S. K. Routray,
P. K. Dash,
R. R. Mohanty,
S. K. Dash
Abstract:
This paper presents background theories and required steps towards preparation of a WLAN location system. This paper targets on a software project and intention behind this paper is to motivate the young researchers in the area.
This paper presents background theories and required steps towards preparation of a WLAN location system. This paper targets on a software project and intention behind this paper is to motivate the young researchers in the area.
△ Less
Submitted 25 July, 2011;
originally announced July 2011.