Skip to content
Free planNo credit card requiredStart writing

Search 250 million research papers

Read the abstract, see who wrote it and who cites it, and get the citation in APA, MLA, Chicago or Harvard.

About 6,824 papers for “Dead code”

Dead Code

Simone Romano · 2018

Dead code is a bad smell. It is conjectured to be harmful and it appears to be also a common phenomenon in software systems. Surprisingly, dead code has received little empirical attention from the software engineering research community. This post-doctoral track paper shows the main results of a multi-study investigation into dead code with an overarching goal to study when and why developers introduce dead code, how they perceive and cope with it, and whether dead code is harmful. This investigation is composed of semi-structured interviews with software professionals and four experiments at the University of Basilicata and the College of William & Mary. The results suggest that it is worth studying dead code not only in maintenance and evolution phases, where the results suggest that its presence is detrimental to developers, but also in design and implementation phases, where source code is born dead because developers consider dead code as a sort of reuse means. The results also foster the development of tools for detecting dead code. In this respect, two approaches were proposed and then implemented in two prototypes of supporting tool.

Cited by 7

Dead Code Elimination

Original Code Written · 2007

this document, we use the term item to refer to either a register or a memory tag. The basic idea used in constructing SSA form is to give unique names to the targets of all assignments in the routine, and then to overwrite uses of the assignments with the new names. A complication arises in routines with more than one basic block. Values can flow into a block from more than one definition site, and each site has a unique SSA name for the item. Consider the following example: H H H H H H H H H H Hj \\Phi \\Phi \\Phi \\Phi \\Phi \\Phi \\Phi \\Phi \\Phi \\Phi \\Phi \\Phi \\Phi \\Phi \\Phi \\Phi \\Phi \\Phi \\Phi \\Phi \\Phi \\Phi H H H H H H H H H H Hj

Cited by 0

Dead Code Elimination

Original Code · 1993

this document, we use the term item to refer to either a register or a memory tag. The basic idea used in constructing SSA form is to give unique names to the targets of all assignments in the routine, and then to overwrite uses of the assignments with the new names. A complication arises in routines with more than one basic block. Values can flow into a block from more than one definition site, and each site has a unique SSA name for the item. Consider the following example: H H H H H H H H H H Hj \\Phi \\Phi \\Phi \\Phi \\Phi \\Phi \\Phi \\Phi \\Phi \\Phi \\Phiß \\Phi \\Phi \\Phi \\Phi \\Phi \\Phi \\Phi \\Phi \\Phi \\Phi \\Phiß H H H H H H H H H H Hj

Cited by 0

Partial dead code elimination

Jens Knoop, Oliver Rüthing, Bernhard Steffen · 1994

A new aggressive algorithm for the elimination of partially dead code is presented, i.e., of code which is only dead on some program paths. Besides being more powerful than the usual approaches to dead code elimination, this algorithm is optimal in the following sense: partially dead code remaining in the resulting program cannot be eliminated without changing the branching structure or the semantics of the program, or without impairing some program executions.

Cited by 189

Abstract Partial Dead Code Elimination

2008

A new aggressive algorithm for the elimination of par-tially dead code is presented, i.e., of code which is only dead on some program paths. Besides being more pow-erful than the usual approaches to dead code elimina-tion, this algorithm is optimal in the following sense: partially dead code remaining in the resulting program cannot be eliminated without changing the branching structure or the semantics of the programt or without impairing some program executions. Our approach is based on techniques for partial re-dundancy elimination. Besides some new technical problems there is a significant difference here: partial dead code elimination introduces second order effects, which we overcome by means of exhaustive motion and elimination steps. The optimality and the uniqueness of the program obtained is proved by means of a new technique which is universally applicable and partic-ularly useful in the case of mutually interdependent program optimizationso Topics: data flow analysis, program optimization, dead code elimination, partial redundancy elimination, code motion, assignment motion, bit-vector data flow analyses. 1

Cited by 0

Partial dead code elimination on predicated code regions

Jingling Xue, Qiong Cai, Lin Gao · Software Practice and Experience · 2006

This paper presents the design, implementation and experimental evaluation of a practical region-based partial dead code elimination (PDE) algorithm on predicated code in the Open Research Compiler framework. Existing PDE algorithms are not applicable on predicated code due to the existence of if-converted branches in the program. The proposed algorithm processes all PDE candidates in a worklist and considers their partial deadness using predicate partition graphs. Our algorithm operates uniformly on individual hyperblocks as well as regions comprising of basic blocks and hyperblocks. The result of applying our algorithm to a single-entry multiple-exit (SEME) region is optimal: partially dead code cannot be removed without changing the branching structure of the program or potentially introducing new predicate defining instructions. We present statistical evidence about the PDE opportunities in the 17 SPEC95 and SPEC00 integer benchmarks. Our algorithm achieves performance improvements in 12 out of the 17 benchmarks on an Itanium machine at small compilation overheads. Our results indicate that our algorithm can be used as a practical pass before instruction scheduling. Copyright © 2006 John Wiley & Sons, Ltd.

Cited by 2

Classifying Dead Code in Software Development

Arman Alavizadeh · 2022

Dead code pervades as an issue in the world of software development as a source of many famous software disasters such as the ARIANE 5 rocket failure and chemical bank withdrawal error. Defining dead code on narrow levels of granularity has not been fully explored, yet is crucial to better our understanding of dead code. Here we will be starting a discussion on how to approach classifying dead code via comparing dead code research specific to an industry segment. Research will be compared primarily by methodology and limitations. Dead code subtype classifications are gleaned from research comparisons and can serve as a methodology for identifying new dead code subtype classifications. Being able to identify dead code is a step in the right direction, but our approach in removing dead code must also be sound. In general, developers do not have enough resources to focus on eliminating dead code which is why automation is utilized instead. Automation in the form of static and dynamic code analysis, which are currently limited in dead code removal capability due to dead code’s abstractness. However, if we utilize our dead code subtype classifications, we can target specific types of dead code with static/dynamic code analysis that are more quantifiable (hence detectable by automation) than general dead code. In conclusion, if we classify dead code and specify what type of dead code we want to remove, we could find new ways to utilize static and dynamic code analysis in dead code elimination.

Cited by 0Open access

Code 291 - Tolerant today - dead tomorrow

Code 291 · Bulletin of Miscellaneous Information (Royal Gardens Kew)

När det uppdagades att polisledningen infört en speciell kod för att mörka brott mot den egna befolkningen så var folkförräderiet ett faktum! Eftersom polisledningen aldrig kommer att avslöja omfattningen av vad som döljer sig bakom kod 291 så valde Jocke K och hans tre bärsärkar att göra det åt dom, sagt och gjort Code 291 såg dagens ljus! I låtar som Code 291 & Open your hearts så berättar herrarna sanningen om det som systemet gör allt för att mörka. Dessa låtar berättar historier från vår samtid, historier som kan få ett lyckligt slut om vi erövrar vår framtid och för att kunna göra det så måste vi känna till vår historia och det är VI nationella som är länken mellan dåtid & nutid vilket påpekas i låten Nationalism . Den historiska kopplingen görs dels i låten Troops of glory och även senare i den heroiska historien Russian nightmare där vi får höra om den finska skarpskytten Simo Häyhä. Skivan innehåller även två svenska spår, Sten för sten & Fristadens barn varav den sistnämnda är en nostalgisk låt som ändå blickar mot framtiden. Jocke har lyckats mejsla fram ett för honom helt nytt sound, ett sound som är dynamiskt till texterna vilket ger skivan en riktigt schysst bredd. Något som märks tydligt i låtar som An elephant in the room , Stand up and fight och Spirit of´69 . Skivan innehåller 13 spår och har en speltid på över 50 minuter allt levereras med en schysst designad booklet som håller samma höga klass som musiken på skivan. Sten för sten - Kampen på oss kallar! Utgivningsår: 2017 01. Troops of glory 02. An elephant in the room 03. Spirit of '69 04. Russian nightmare 05. Sten för sten 06. Stand up and fight 07. The new plague 08. Open your hears 09. Code 291 10. Oh my god 11. Nationalism 12. Fristadens barn 13. Staying true (White resistance)

Cited by 0

ML Type Inference for Dead Code Analysis

Frédéric Prost, Ecole Normale, Suprieure Lyon · 1997

We propose to adapt ML type inference algorithm to find and erase dead-code in simply typed -terms. We prove the correctness of our optimization: the optimized program is observationally equivalent to the original one. This paper also sheds new lights on links between typing and static analyses, in the particular case of dead code analysis. Indeed, the same algorithm can be used both for typing and dead-code analysis. Moreover, it appears new to the author that ML type inference can be used to represent links as encountered in data flow analyses. Keywords: ML Type Inference, Dead-Code Analysis, Polymorphism, Extraction R'esum'e Nous proposons d'adapter l'algorithme d'inf'erence de type de ML pour trouver et effacer le code mort de -termes simplement typ'es. Nous prouvons la correction de notre optimisation: le programme optimis'e est observationnellement 'equivalent `a l'original. Ce papier 'eclaire d'une mani`ere nouvelle les liens entre le typage et l'analyse statique, d...

Cited by 0

Partial dead code elimination using slicing transformations

Rastislav Bodík, Rajiv Gupta · 1997

We present an approach for optimizing programs that uncovers additional opportunities for optimization of a statement by predicating the statement. In this paper predication algorithms for achieving partial dead code elimination (PDE) are presented. The process of predication embeds a statement in a control flow structure such that the statement is executed only if the execution follows a path along which the value computed by the statement is live. The control flow restructuring performed to achieve predication is expressed through slicing transformations. This approach achieves PDE that is not realizable by existing algorithms. We prove that our algorithm never increases the operation count along any path, and that for acyclic code all partially dead statements are eliminated. The slicing transformation that achieves predication introduces into the program additional conditional branches. These branches are eliminated in a branch deletion step based upon code duplication. We also show how PDE can be used by acyclic schedulers for VLIW processors to reduce critical path lengths along frequently executed paths.

Cited by 57Open access

A Multi-Study Investigation into Dead Code

Simone Romano, Christopher Vendome, Giuseppe Scanniello et al. · IEEE Transactions on Software Engineering · 2018

Dead code is a bad smell and it appears to be widespread in open-source and commercial software systems. Surprisingly, dead code has received very little empirical attention from the software engineering research community. In this paper, we present a multi-study investigation with an overarching goal to study, from the perspective of researchers and developers, when and why developers introduce dead code, howthey perceive and cope with it, and whether dead code is harmful. To this end, we conducted semi-structured interviews with software professionals and four experiments at the University of Basilicata and the College of William & Mary. The results suggest that it is worth studying dead code not only in the maintenance and evolution phases, where our results suggest that dead code is harmful, but also in the design and implementation phases. Our results motivate future work to develop techniques for detecting and removing dead code and suggest that developers should avoid this smell.

Cited by 37

Partial Dead Code Elimination using Slicing Transformations

Rastislav Bod'ik, Rajiv Gupta · 1997

We present an approach for optimizing programs that uncovers additional opportunities for optimization of a statement by predicating the statement. In this paper predication algorithms for achieving partial dead code elimination (PDE) are presented. The process of predication embeds a statement in a control flow structure such that the statement is executed only if the execution follows a path along which the value computed by the statement is live. The control flow restructuring performed to achieve predication is expressed through slicing transformations. This approach achieves PDE that is not realizable by existing algorithms. We prove that our algorithm never increases the operation count along any path, and that for acyclic code all partially dead statements are eliminated. The slicing transformation that achieves predication introduces into the program additional conditional branches. These branches are eliminated in a branch deletion step based upon code duplication. We also sho...

Cited by 0

The UNCTAD Liner Code: A Dead Letter?

Sock‐Yong Phang, Rex S. Toh · Institutional Knowledge (InK) - Institutional Knowledge at Singapore Management University (Singapore Management University) · 1994

Cited by 0Open access

Beyond Natural Language Perplexity: Detecting Dead Code Poisoning in Code Generation Datasets

Chung-Hung Tsai, Chia-Mu Yu, Ying‐Dar Lin et al. · ArXiv.org · 2025

The increasing adoption of large language models (LLMs) for code-related tasks has raised concerns about the security of their training datasets. One critical threat is dead code poisoning, where syntactically valid but functionally redundant code is injected into training data to manipulate model behavior. Such attacks can degrade the performance of neural code search systems, leading to biased or insecure code suggestions. Existing detection methods, such as token-level perplexity analysis, fail to effectively identify dead code due to the structural and contextual characteristics of programming languages. In this paper, we propose DePA (Dead Code Perplexity Analysis), a novel line-level detection and cleansing method tailored to the structural properties of code. DePA computes line-level perplexity by leveraging the contextual relationships between code lines and identifies anomalous lines by comparing their perplexity to the overall distribution within the file. Our experiments on benchmark datasets demonstrate that DePA significantly outperforms existing methods, achieving 0.14-0.19 improvement in detection F1-score and a 44-65% increase in poisoned segment localization precision. Furthermore, DePA enhances detection speed by 0.62-23x, making it practical for large-scale dataset cleansing. Overall, by addressing the unique challenges of dead code poisoning, DePA provides a robust and efficient solution for safeguarding the integrity of code generation model training datasets.

Cited by 0Open access