Under my supervision, you can do cool research in software technology, here are our current hot topics.
Are you a KTH student? See Master's thesis / Bachelor's thesis guidelines and contact me by email
Are you a brilliant international student? Contact me by email
Category Program Repair
Machine Learning for Program Repair
Neural Program Repair of CodeQL Warnings
Using generative AI to adapt software components
Automatic translation of C to Rust with Language Models (or JS->Typescript or Java->Kotlin)
Generating Equivalent Patches with Neural Networks
Automatic Repair with Large Language Models on Code
Neural Repair of Compiler Warnings
Code Analysis for program repair
Self-supervised learning for proving program equivalence in LLVM
Automatic Repair of Breaking Dependency Updates
Automatic Program Repair of Code4Bench
Automated Program Repair for Smart Contracts
Category Software Supply Chain (CHAINS)
Diverse-double compilation for Java
Air-gapped software builds
Dynamic Integrity Verification & Repair for Java Applications
Embedding the software supply chain at runtime with Java classloaders
Investigation of the Software Supply Chain of Password Managers
Category Crypto & Smart Contracts
Fine-tuning an LLM for Solidity
Invariant Generation for Smart Contracts
Automated Program Repair for Smart Contracts
On-chain code coverage
Behavioral Hardening for Blockchain Nodes
Automatic Exploit Synthesis for Smart Contracts
Effective Mutation Testing for Solidity Smart Contracts
Automatic Specification Inference for Smart Contracts with Language Models
Category Program Repair
Machine Learning for Program Repair
Neural Program Repair of CodeQL Warnings
Description: Static analysis tools are much used in industry to statically detect bugs. CodeQL is a state-of-the-art tool in this domain. You will research in the area of machine learning for repairing CodeQL warnings in Java. You will devise, implement and evaluate an approach based on large languade models.
Using generative AI to adapt software components
Description: Software substitutability is a property which measures how readily a software component can be replaced by a different but equivalent component. In software supply chains, it is critical for faulty or vulnerable components to be replaced as quickly as possible [1,2]. However, software substitutes might not be immediately available. Generative AI tools like ChatGPT may be used to efficiently produce software substitutes in diverse programming languages and stacks. You will determine the feasibility of using generative AI tools to enhance substitutablity of components in software supply chains.
AdaptivePaste: Code Adaptation through Learning Semantics-aware Variable Usage Representations
Better Together? An Evaluation of AI-Supported Code Translation
Automatic translation of C to Rust with Language Models (or JS->Typescript or Java->Kotlin)
Description: The thesis aims to develop an automatic translation system for converting C language code to Rust language code, using state-of-the-art natural language processing techniques and deep learning models. The primary goal is to facilitate the migration of legacy C codebases to Rust, ensuring safer, more efficient, and more maintainable software systems. GPT4 version The same topic of automatic translation can be applied to JS->Typescript or Java->Kotlin or even Python->Typed-Python if you're excited about it).
Generating Equivalent Patches with Neural Networks
Description: Recently, neural networks (NN) have been trained on source code, with different purposes such as code completion and automated program repair (APR). In the latter case, an NN-based APR receives as input a buggy code and generates patched code. In this thesis, you will study another use case for neural networks: generation of equivalent patches [1,2], that is, generated code that is semantically equivalent but syntactically different to the patch given as input, using self-supervision [3] In the context of APR, generating a set of equivalent patches will help APR systems generate a bunch of diverse equivalent patches, and consequently, will let the developer choose the one she considers most appropriate to be integrated into her codebase.
SelfAPR: Self-supervised Program Repair with Test Execution Diagnostics
NatGen: generative pre-training by “naturalizing” source code
Automatic Repair with Large Language Models on Code
Description: Recently, very large language models have been trained on code (OpenAI Codex, Github Copilot). There are preliminary results suggesting that they are useful for program repair. In this thesis, you will make an empirical investigation on using large language models for program repair with strong baselines and state of the art datasets.
Neural Repair of Compiler Warnings
Description: It is a best practice to activate all warnings in a compiler. However, much work is needed to remediate the all. You will research in the area of machine learning for repairing compiler warnings. You will devise, implement and evaluate an approach based on sequence-to-sequence learning. The considered compilers are open and could be for example rust, go, clang, etc.
Break-It-Fix-It: Unsupervised Learning for Program Repair (2021)
Master's thesis: Exploring the Usage of Neural Networks for Repairing Static Analysis Warnings
MACER A Modular Framework for Accelerated Compilation Error Repair
Code Analysis for program repair
Self-supervised learning for proving program equivalence in LLVM
In recent years, self-supervised learning has emerged as a powerful technique for encoding high-level semantic properties in the absence of explicit supervision signals. The focus of this thesis is to explore the application of self-supervised learning methodologies towards proving program equivalence in LLVM bytecode. LLVM provides a structured format for representing program constructs at the intermediate level. Program equivalence is a fundamental problem in computer science, concerned with proving that two programs exhibit the same behavior under all possible inputs. By utilizing self-supervised learning techniques, we aim to develop a practical approach for efficient and accurate program equivalence verification in a mainstream binary format.
Automatic Repair of Breaking Dependency Updates
Description: This work aims at automatically proposing patches for breaking updates of software libraries. It is a best practice to keep all software dependencies to use the latest version. However, some dependency versions are not compatible with the previous version. In this case, automated dependency management (eg with DependaBot or Renovate) still involves some heavy manual work in order to adapt the code to the new version of the library. The student will design, implement and evaluate novel program analysis and program synthesis techniques to automatically repair breaking updates.
Automatic Program Repair of Code4Bench
Description: The student will design design and perform a large scale experiment of program repair on the Code4Bench benchmark [1], with quantitative and qualitative analysis [2].
Automated Program Repair for Smart Contracts
Description: Smart contracts are software, and hence, cannot be perfect. Smart contracts suffer from bugs, some of which putting high financial stakes at risk. There is a new line of research on automated patching of smart contract. You will devise, perform and analyze a comparative experiment to identify the successes, challenges and limitations of automated program repair for smart contracts.
Elysium: Automagically Healing Vulnerable Smart Contracts Using Context-Aware Patching
EVMPatch: Timely and automated patching of ethereum smart contracts
Category Software Supply Chain (CHAINS)
Work done as part of the https://chains.proj.kth.se/
Diverse-double compilation for Java
Description: Java is a key programming language for enterprise applications. As such, the Java compiler is an ideal target for a trusting trust attack. This thesis aims to investigate the feasibility of diverse-double compilation (DDC) to mitigate this problem You will design, implement and evaluate DDC for a Java.
Air-gapped software builds
Description: Air-gapped software development is done by the military and similar highly sensitive environment. Modern software builds typically require Internet connectivity, and a typical build involves thousands of network requests. How to reconcile those opposite requirements? In this thesis, you will design, implement and evaluate an infrastucture for air-gapped software builds.
Dynamic Integrity Verification & Repair for Java Applications
Description: Attackers constantly try to tamper with the code of software applications in production. Chang and Attalah have proposed a technique to not only detect modifications and also repairing the code after attacks by a network of small security units called guards. These guards can be programmed to perform tasks such as checksumming the program code, and they work in concert to create mutual protection. In this this, you will devise, implement and evaluate such as an approach in the context of modern Java software with dependencies. An open question is how to set up guard inside or around dependency code.
Embedding the software supply chain at runtime with Java classloaders
Description: In Java, class loading refers to retrieving the binary form of a class or interface and constructing, from that binary form, a class object to represent the class or interface [1]. Today, different subclasses of the `ClassLoader` may implement different loading policies [2]. For example, a class loader may cache the binary representation of a class, prefetch it based on expected usage, or load a group of related classes together. These activities may not be completely transparent to a running application. In this context, determining the third-party suppliers of classes loaded at runtime allows for controlling and hardening the software supply chain of third-party components used during program execution. Monitoring the origins of the “actually” executed code is a critical task for building more reliable and secure systems. The student will design and implement a novel software tool to build a representation of the software supply chain at runtime.
The Java® Virtual Machine Specification. Chapter 5. 01182103
Sharing the runtime representation of classes across class loaders
Investigation of the Software Supply Chain of Password Managers
Description: Password managers are designed to securely store and manage users' login credentials, but they also have access to sensitive information, such as credit card details and personal data. The increasing use of password managers has led to growing concerns about the security risks associated with them. Therefore, the security and reliability of these tools are critical for protecting users' privacy and preventing data breaches. This work aims to investigate the software supply chain of password managers, including the risks associated with their development, distribution, and maintenance.
Category Crypto & Smart Contracts
Fine-tuning an LLM for Solidity
The project aims to fine-tune an LLM (Learning Language Model) for Solidity, a programming language used for developing smart contracts on the Ethereum blockchain. By fine-tuning the LLM, the project aims to enhance its capabilities for downstream tasks such as repair. Additionally, the fine-tuned LLM can assist beginners in learning Solidity by providing coherent code examples and explanations.
Invariant Generation for Smart Contracts
Description: Invariant inference is useful for capturing the semantics of a program and detect deviations from normal behavior. While heavily studied in the context of mainstream languages [1], it is required to apply and evaluate invariant generation in the context of smart contracts [2]. You will devise, implement and evaluate an invariant generation tool for Solidity smart contracts.
The Daikon system for dynamic detection of likely invariants
InvCon: A Dynamic Invariant Detector for Ethereum Smart Contracts
Automated Program Repair for Smart Contracts
Description: Smart contracts are software, and hence, cannot be perfect. Smart contracts suffer from bugs, some of which putting high financial stakes at risk. There is a new line of research on automated patching of smart contract. You will devise, perform and analyze a comparative experiment to identify the successes, challenges and limitations of automated program repair for smart contracts.
Elysium: Automagically Healing Vulnerable Smart Contracts Using Context-Aware Patching
EVMPatch: Timely and automated patching of ethereum smart contracts
On-chain code coverage
Programs executed on the Ethereum blockchain are defined through smart contracts. Solidity is the de-facto programming language used to implement smart contracts. Since much is at stake, good test coverage is essential for Solidity programs [1]. Coverage in production gives additional information about field usage [2], and the blockchain is a fully reproducible production workload. You will design and perform experiments to study production coverage in the context of smart contracts specified in Solidity.
solidity-coverage: https://github.com/sc-forks/solidity-coverage
Behavioral execution comparison: Are tests representative of field behavior? 2017.
Behavioral Hardening for Blockchain Nodes
Description: An important concept in software security is to protect resources with whitelists. It has been implemented at different levels of the software stack (kernel, virtual machines, application frameworks). In Bitcoin Core, white lists of system calls can be used and enforced via Linux SecComp [1]. From a research perspective, the hard problem is to infer the whitelist of accessible resources via behavioral analysis [2,3]. You will design and perform an experiment to compare different behavior inference techniques for Bitcoin-Core.
Automatic Exploit Synthesis for Smart Contracts
Smart contracts typically hold large stakes and consequently, they are under constant attack by malicious actors. As counter-measure, engineering smart contracts involves auditing and formal verification. Another option is automatic exploit synthesis In this thesis, you will evaluate the state of the art of exploit synthesis for smart contracts. You will then design, implement and evaluate a better system that improves upon the state of the art.
ExGen: Cross-platform, Automated Exploit Generation for Smart Contract Vulnerabilities
FlashSyn: Flash Loan Attack Synthesis via Counter Example Driven Approximation
Smart Contract and DeFi Security: Insights from Tool Evaluations and Practitioner Surveys
Effective Mutation Testing for Solidity Smart Contracts
Description: One of the problems with mutation testing is that the developers are overwhelmed by the number of mutants to kill with new tests. One way to approach this problem is to view it as a recommendation problem. The student will design, implement and evaluate a novel technique for automatically prioritizing mutants to be killed in Solidity smart contracts.
Automatic Specification Inference for Smart Contracts with Language Models
Description: Recently, very large language models have been trained on code (OpenAI Codex, Github Copilot). There are preliminary results suggesting that they are useful for specification inference. In this thesis, you will make an empirical investigation on using large language models for specification inference on smart contracts with strong baselines and state of the art datasets.