Computer Science
Permanent URI for this collectionhttps://uwspace.uwaterloo.ca/handle/10012/9930
This is the collection for the University of Waterloo's Cheriton School of Computer Science.
Research outputs are organized by type (eg. Master Thesis, Article, Conference Paper).
Waterloo faculty, students, and staff can contact us or visit the UWSpace guide to learn more about depositing their research.
Browse
Recent Submissions
Item Latra: A Template-Based Language-Agnostic Transformation Framework for Program Reduction(University of Waterloo, 2025-04-29) Wang, YiranEssential for debugging compilers and interpreters, existing reduction tools face a fundamental trade-off. Language-specific reducers, such as C-Reduce and ddSMT, offer highly effective reductions but require substantial engineering effort for each target language. Conversely, language-agnostic reducers, like Vulcan, sacrifice effectiveness for broad applicability. To bridge this gap, we present Latra, a novel template-based framework that balances both aspects, enabling general, effective, targeted program reduction. Latra combines language-agnostic reduction with user-defined, language-specific transformations. It facilitates user-defined transforms through a user-friendly domain-specific language based on simple matching and rewriting templates. This minimizes the need for deep formal grammar knowledge. Latra empowers users to tailor reductions to specific languages with reduced implementation overhead. Evaluation shows that Latra significantly outperforms Vulcan. It reduces 33.77% more tokens in C and 9.17% more tokens in SMT-LIB, with 32.27% faster execution in SMT-LIB. Notably, Latra closely matches the effectiveness of language-specific reducers C-Reduce and ddSMT (89 vs. 85, 103 vs. 109 tokens), while significantly reducing engineering effort (167 vs. 5,508, 62 vs. 118 lines of code). We strongly believe that Latra provides a practical and cost-efficient approach to program reduction, effectively balancing language-specific effectiveness with language-agnostic generality.Item NaviX: A Native Vector Index Design for Graph DBMSs With Robust Predicate-Agnostic Search Performance(University of Waterloo, 2025-04-17) Sehgal, GauravThere is an increasing demand for extending existing DBMSs with vector indices to become unified systems that can support modern predictive applications, which require joint querying of vector embeddings and structured properties and connections of objects. We present NaviX, a Native vector indeX for graph DBMSs (GDBMSs) that has two main design goals. First, we aim to implement a disk-based vector index that leverages the core storage and query processing capabilities of the underlying GDBMS. To this end, NaviX is a hiearchical navigable small world (HNSW) index, which is itself a graph-based structure. Second, we aim to evaluate predicate-agnostic vector search queries, where the k nearest neighbors (kNNs) of a query vector vQ is searched across an arbitrary subset S of vectors that is specified by an ad-hoc selection sub-query QS. We adopt a prefiltering based approach that evaluates QS first and passes the full information about S to the kNN search operator. We study how to design a pre-filtering-based search algorithm that is robust under different selectivities as well as correlations of S with vQ. We propose an adaptive algorithm that utilizes local selectivity of each vector in the HNSW graph to pick a suitable heuristic at each iteration of the kNN search algorithm. We demonstrate NaviX’s robustness and efficiency through extensive experiments against both existing prefiltering- and postfiltering-based baselines that include specialized vector databases as well as DBMSs.Item MIRAGE-ANNS: Mixed Approach Graph-based Indexing for Approximate Nearest Neighbour Search(University of Waterloo, 2025-04-14) Voruganti, SairajApproximate nearest neighbor search (ANNS) on high dimensional vectors is important for numerous applications, such as search engines, recommendation systems, and more recently, large language models (LLMs), where Retrieval Augmented Generation (RAG) is used to add context to an LLM query. Graph-based indexes built on these vectors have been shown to perform best but have challenges. These indexes can either employ refinement-based construction strategies such as K-Graph and NSG, or increment-based strategies such as HNSW. Refinement-based approaches have fast construction times, but worse search performance and do not allow for incremental inserts, requiring a full reconstruction each time new vectors are added to the index. Increment-based approaches have good search performance and allow for incremental inserts, but suffer from slow construction. This work presents MIRAGE-ANNS (Mixed Incremental Refinement Approach Graph-based Exploration for Approximate Nearest Neighbor Search) that constructs the index as fast as refinement-based approaches while retaining search performance comparable or better than increment-based ones. It also allows incremental inserts. We show that MIRAGE achieves state of the art construction and query performance, outperforming existing methods by up to 2x query throughput on real-world datasets.Item A Modular Framework for the Plausible Depiction of Starburst Patterns(University of Waterloo, 2025-04-11) Sun, YuxiangWhen human viewers look at an intense light source, they can observe a set of dense spikes radiating from its center. The observed spike patterns result from a complex optical process known as the starburst phenomenon. These patterns have been frequently depicted in virtual applications (e.g., films and video games) to enhance the perception of brightness. From a broader scientific perspective, they also have relevant real life implications such as the impairing of driving safety. This may occur when an observed starburst pattern saturates a driver’s field of view. Previous computer graphics works on the simulation of the starburst phenomenon have primarily relied on the assumption that the resulting patterns are formed by light being obscured and diffracted by particles in the observer’s eyeball during the focusing process. However, the key role played by background luminance on the perception of starburst patterns has been consistently overlooked. By also taking into account this pivotal factor as well as the different physiological characteristics of the human photoreceptor cells, we propose a modular framework capable of producing plausible visual depictions of starburst patterns for daytime and nighttime scenes. To enhance the physical correctness and resolution of the simulated patterns, its formulation was guided by the Rayleigh-Sommerfeld diffraction theory and implemented using the Chirp Z Transform, respectively. We also introduce a biophysically-inspired algorithm to enable the seamless incorporation of the resulting patterns onto computer-rendered scenes. Besides examining theoretical and practical aspects associated with the use of the proposed framework in realistic image synthesis, we also derive biophysical insights that may contribute to the current knowledge about the inner workings of the starburst phenomenon.Item Bridging Technology and Therapy: Assessing the Quality and Analyzing the Impact of Human Editing on AI-Generated SOAP Notes in Pediatric Rehabilitation(University of Waterloo, 2025-04-07) Amenyo, SolomonThis thesis explores the integration of artificial intelligence (AI) into clinical documentation, focusing on evaluating AI-generated SOAP (Subjective, Objective, Assessment, and Plan) notes in pediatric rehabilitation settings. AI-powered tools, such as Microsoft's Copilot and the University of Waterloo-developed KAUWbot, offer potential efficiencies by automating aspects of clinical documentation. However, their quality, reliability, and applicability to clinical practice have remained largely unexamined. The research aims to assess and compare the quality of human-authored SOAP notes and AI-generated notes across five key criteria: clarity, completeness, conciseness, relevance, and organization. A dataset of 432 SOAP notes, divided into four pools, was evaluated using a custom rubric. The pools included human-authored notes, Copilot-generated notes edited by occupational therapists, unedited KAUWbot-generated notes, and KAUWbot-generated notes edited by occupational therapists. A rigorous anonymization process ensured evaluator impartiality. Findings indicate that AI-generated notes, particularly when edited by clinicians, achieve comparable or superior quality to human-authored notes. After editing, notes generated by KAUWbot, a model fine-tuned on pediatric occupational therapy data, exhibited notable improvements in relevance and organization. Statistical analyses demonstrated some differences among note pools, with edited AI-generated notes consistently receiving the highest ratings. This highlights the importance of human oversight in enhancing AI output and tailoring it to specific clinical needs. The research shows the potential of AI to augment clinical documentation processes, reduce clinician workload, and improve documentation quality. However, it also emphasizes the necessity of human-AI collaboration and robust training to mitigate limitations such as contextual inaccuracies and misclassifications. These findings provide a foundation for future research and practical recommendations for integrating AI into healthcare documentation workflows.Item Application Persistence, Performance, and Deployment in a UNIX-Compatible Single Level Store Operating System(University of Waterloo, 2025-04-01) Tsalapatis, AimiliosThis thesis presents the Aurora single level store, an OS design that uses continuous checkpointing for application persistence and deployment. Aurora provides submillisecond application checkpoint and restore operations to efficiently turn applications into on-disk images and back. Fast checkpointing/restore as an OS service also serves as a foundation for further research into open problems like efficient persistence APIs for memory-mapped data and serverless computing. Aurora’s single level store-based persistence has recently become practical because of advances in hardware and file system technology. Modern SSD storage devices have low latency at 10µs, allowing us to persist application checkpoints to the disk with minimal latency overhead. Modern CPUs also have IO throughput that rivals that of their memory bandwidth, making it possible to continuously checkpoint and forward in-memory application state to the disk. This thesis describes three systems that demonstrate the efficiency and flexibility of the single level store paradigm. We first present Aurora (SOSP 2021), an OS design capable of continuous application checkpointing at a fast enough granularity to provide transparent persistence. We follow up with MemSnap (ASPLOS 2024), an OS single level store API and associated virtual memory mechanism. MemSnap persists application data, e.g., database data, more efficiently than the file API. Finally, we present Metropolis, a serverless invoker that uses the single level store paradigm to create serverless function instances at submillisecond latency.Item Symbols, Dynamics, and Maps: A Neurosymbolic Approach to Spatial Cognition(University of Waterloo, 2025-03-12) Dumont, Nicole Sandra-Yaffa; Eliasmith, Chris; Orchard, JeffThe discovery of various spatially sensitive neurons in the hippocampal formation, such as place, grid, and boundary cells, has provided valuable insights into the neural mechanisms underlying spatial representation and navigation. However, neural activity and connectivity data alone cannot fully reveal the brain’s algorithms. Bridging this gap requires computational models that not only explain the low-level activity of spatially sensitive cells but also link it to higher-level symbolic representations manipulable within a cognitive framework – models capable of binding spatial representations to discrete abstractions, while also supporting hierarchical and probabilistic structures that enable reasoning and decision-making. The Semantic Pointer Architecture (SPA; Eliasmith, 2013), in combination with the Neural Engineering Framework (NEF; Eliasmith et al., 2003), provides a mathematical and computational framework to represent symbols and implement dynamical systems in spiking neural networks. Spatial Semantic Pointers (SSPs; Komer et al., 2019), an extension to the SPA, encode continuous variables, such as spatial locations, while supporting the binding of spatial information with other features – continuous or discrete – into compressed, multi-domain representations. This flexibility allows SSPs to model diverse cognitive processes, ranging from spatial memory to abstract reasoning, offering a unified theory for how continuous variables might be represented and manipulated in the brain. In this thesis, we leverage these tools to model key components of spatial cognition, including path integration, cognitive map creation, and reinforcement learning. Our contributions include the development of SSP-PI, a SSP-based path integration model that combines velocity controlled oscillators with attractor dynamics to integrate continuous spatial variables. We also introduce SSP-SLAM, a biologically inspired spiking neural SLAM system capable of constructing semantic cognitive maps that bind and associate spatial and non spatial features. Furthermore, we propose spiking RL models that demonstrate how SSP embeddings can effectively represent successor features, reward distributions, and stochastic policies. Finally, we use the SPA and SSPs to construct state embeddings for deep RL networks, demonstrating their utility in tasks requiring mixed semantic-spatial representations. Our findings underscore the potential of SSPs to act as a unifying framework for understanding spatial representation in the brain while advancing biologically inspired approaches to navigation and learning in artificial systems. This work bridges theoretical neuroscience and artificial intelligence, laying the groundwork for future explorations of shared principles across spatial and abstract cognition.Item Perspectives of Graph Diffusion: Computation, Local Partitioning, Statistical Recovery, and Applications(University of Waterloo, 2025-03-06) Yang, Shenghao; Fountoulakis, KimonDiffusion describes the process of mass moving from one region to another. In the con- text of graph, the diffusing mass spreads from nodes to nodes along the edges of the graph. Broadly speaking, this includes a number of stochastic and deterministic processes such as random walk, heat diffusion, network flow and electrical flow on graphs. Graph diffusion is a highly important primitive, and has been shown to have a variety of surprising properties both theoretically and practically. In this thesis, we present several new perspectives of graph diffusion, with an emphasis on how diffusion algorithms uncover the local clustering structure of the input data without necessarily exploring the entire graph. In the first two parts of the thesis, we introduce a new class of graph diffusion methods that are provably better at extracting the local clustering structure of a graph or a hy- pergraph. Here, diffusion is formulated as a pair of primal and dual convex optimization problems, based on the idea of spreading mass in the graph while minimizing a p-norm net- work flow cost. The primal solution of the diffusion problem provides an intuitive physical interpretation where paint (i.e. mass) spills from the source nodes, spreads over the graph, and there is a sink at each node where up to a certain amount of paint can settle. The dual solution embeds the nodes on the non-negative real line and is considered as the output of diffusion. We will show that the dual variables nicely encode the local clustering structure around a given set of seed nodes. In particular, assume the existence of a cluster C of low conductance Φ(C), the sweep cut procedure on the dual variables returns a cluster whose conductance is not too much larger than Φ(C). In the next two parts of the thesis, we introduce a weighted diffusion mechanism which allows any existing diffusion method to take into account additional node information such as node attributes and labels. The method weighs the edges of the graph based on the attributes or the labels of each node. Depending on the nature and availability of additional node information, two simple yet effective edge-weighting schemes are introduced and analyzed. Over contextual random graphs generated by a local variant of the stochastic block model with noisy node information, we will show that, if the additional information contains enough signal about the ground-truth cluster, then employing existing diffusion algorithms in the weighted graph can more accurately recover the ground-truth cluster than employing diffusion in the original graph without edge weights. In particular, statistical recovery guarantees in terms of precision and F1 score will be derived and compared. All of the results are supplemented with extensive experiments on both synthetic and real-world data to illustrate the technical results and the effectiveness of the new methods in practice. The code is open-source on GitHub.Item Operating Systems are a Service(University of Waterloo, 2025-03-05) Hancock, Kenneth; Mashtizadeh, AliOS containers have set the standard for the deployment of applications in modern systems. OS containers are combined sandboxes/manifests of applications that isolate the running applications and its dependencies from other applications running on top of the same kernel. Containers make it easy to provide multi-tenancy and control over the application, making it ideal for use within cloud architectures such as serverless. This thesis explores and develops novel systems to address three problems faced by containers and the services that use them. First, OS containers currently lack a fast checkpoint-restore mechanism. Second, container security is still inadequate due to its underlying security mechanisms, which provide coarse-grained policies that are abused. Third, the lack of a benchmark for serverless clouds, one of the largest consumers of containers, and specifically checkpoint-restore. This thesis outlines solutions to these problems. First, ObjSnap, a storage system designed and built for two modern single-level store systems, Aurora and MemSnap, which enable checkpoint restore for container systems. ObjSnap is a transactional copy-on-write object store that can outperform other storage systems by up to 4×. Second, we introduce SlimSys, a framework that tackles security issues found within containers by binding a policy to kernel resources. Lastly, we introduce Orcbench, the first benchmark used to evaluate serverless orchestrators.Item A First-Principles Framework for Simulating Light and Snow Interactions(University of Waterloo, 2025-02-25) Varsa, Petri Matthew; Baranoski, GladimirInteractions between light and matter give rise to an abundance of natural phenomena. Common examples include those between light and atmospheric ice crystals producing halos, and between light and liquid water droplets producing rainbows. However, interesting effects may also be observed when light impinges upon more dense materials such as snow. These may be noted as changes to the appearance of the material resulting from variations in the characteristics of the material itself. In some cases, these appearance changes may even manifest themselves as dramatic changes in colour. In this thesis, we study snow as a material and reproduce such phenomena by simulating light interactions with virtual snow samples. Accordingly, this work presents a first-principles framework for simulating light transport through snow. Data and information that describe the characteristics of snowpacks are obtained from the literature and used to devise a digital representation of them suitable for predicatively modelling light interactions with snow. The employed formulation allows for different virtual snow samples to be investigated. Simulated rays of light are cast into a virtual snow sample, and these rays are reflected and refracted until they exit from the surface of the sample, are transmitted through the sample or are absorbed. The modelling results are recorded as spectral response datasets for evaluation and analysis. These datasets are then compared with measured data and observations reported in the literature in order to assess the simulations’ fidelity. There are a number of study areas where such a framework can make a contribution. In this thesis, we discuss such contributions to two fields of research, namely, computer graphics and remote sensing. From a computer graphics perspective, the outputs of simulating light interactions with snow may be used in natural phenomena visualizations employed for educational and entertainment purposes. From a remote sensing perspective, the simulations may be used to conduct in silico experiments that help to shed light on topics that are actively being studied. Furthermore, the simulation outputs may also be used as data products in themselves, to make comparisons against remotely acquired data and support other modelling initiatives. The proposed framework presented in this thesis encapsulates a body of work that is expected to advance the state of the art of snow appearance modelling using a multi-faceted approach. The foundation of the framework is a novel radiative transfer model of light impingement on snow, whose predictive capabilities are extensively evaluated. Then, data products produced by this framework are used to address open questions in the two fields of interest, i.e., computer graphics and remote sensing. In particular, we describe a method to include the complex, visual phenomena that are predicted by the radiative transfer model introduced here into a traditional rendering pipeline. We also make use of the proposed framework to investigate open problems (e.g., the absorption of solar radiation by snow and the effect that this has on avalanche prediction) with potential interdisciplinary applications.Item Reweighted Eigenvalues: A New Approach to Spectral Theory beyond Undirected Graphs(University of Waterloo, 2025-02-21) Tung, Kam Chuen; Lau, Lap ChiWe develop a concept called reweighted eigenvalues, to extend spectral graph theory beyond undirected graphs. Our main motivation is to derive Cheeger inequalities and spectral rounding algorithms for a general class of graph expansion problems, including vertex expansion and edge conductance in directed graphs and hypergraphs. The goal is to have a unified approach to achieve the best known results in all these settings. The first main result is an optimal Cheeger inequality for undirected vertex expansion. Our result connects (i) reweighted eigenvalues, (ii) vertex expansion, and (iii) fastest mixing time [BDX04] of graphs, similar to the way the classical theory connects (i) Laplacian eigenvalues, (ii) edge conductance, and (iii) mixing time of graphs. We also obtain close analogues of several interesting generalizations of Cheeger’s inequality [Tre09, LOT12, LRTV12, KLLOT13] using higher reweighted eigenvalues, many of which were previously unknown. The second main result is Cheeger inequalities for directed graphs. The idea of Eulerian reweighting is used to effectively reduce these directed expansion problems to the basic setting of edge conductance in undirected graphs. Our result connects (i) Eulerian reweighted eigenvalues, (ii) directed vertex expansion, and (iii) fastest mixing time of directed graphs. This provides the first combinatorial characterization of fastest mixing time of general (non-reversible) Markov chains. Another application is to use Eulerian reweighted eigenvalues to certify that a directed graph is an expander graph. Several additional results are developed to support this theory. One class of results is to show that adding $\ell_2^2$ triangle inequalities [ARV09] to reweighted eigenvalues provides simpler semidefinite programming relaxations, that achieve or improve upon the previous best approximations for a general class of expansion problems. These include edge expansion and vertex expansion in directed graphs and hypergraphs, as well as multi-way variations of some undirected expansion problems. Another class of results is to prove upper bounds on reweighted eigenvalues for special classes of graphs, including planar, bounded genus, and minor free graphs. These provide the best known spectral partitioning algorithm for finding balanced separators, improving upon previous algorithms and analyses [ST96, BLR10, KLPT11] using ordinary Laplacian eigenvalues.Item A Study of the Opportunities and Challenges of Using Edge Computing to Accelerate Cloud Applications(University of Waterloo, 2025-02-18) Qadi, Hala; Al-Kiswany, SamerI explore the viability of using edge clusters to host latency-sensitive applications and to run services that can improve end-to-end communication performance across both wide area networks (WANs) and 5G environments. The study examines the viability of using edge clusters in three scenarios: accelerating TCP communications through TCP splitting in 5G deployments, hosting an entire application-level service or the latency-sensitive part of an application on an edge cluster, and deploying a TCP splitting service on edge clusters to support WAN communication. I explore these scenarios while varying packet drop rates, communication stacks, congestion control protocols, and TCP buffer sizes. My findings bring new insights about these deployment scenarios. I show that edge computing, especially through TCP splitting, can significantly improve end-to-end communication performance over the classical communication stack. TCP splitting over the 5G communication stack does not bring any benefit and can reduce throughput. This is because of the unique characteristics of the 5G communication stack. Furthermore, over the classical communication stack, TCP splitting brings higher benefit for flows larger than 64 KB. These findings provide valuable insights into how edge clusters can accelerate TCP communication in different network environments and identify high-impact research ideas for future work.Item The Power of Experimental Approaches to Social Choice(University of Waterloo, 2025-02-14) Armstrong, Ben; Larson, KateWith increasing connectivity between humans and the rise of autonomous agents, group decision-making scenarios are becoming ever more commonplace. Simultaneously, the requirements placed upon decision-making procedures grow increasingly nuanced as social choices are made in more niche settings. To support these demands, a deeper understanding of the behaviour of social choice procedures is needed. The standard theoretical approach to analyze social choice procedures is limited in the type of question it can answer. Theoretical analyses can be rigid: It may speak to the incompatibility of different properties without also providing a deeper understanding of the properties themselves, or might stop at proving the worst-case outcome of a voting rule without communicating the rule's typical behaviour. In this dissertation, we address these limitations by demonstrating that experimental analysis of social choice domains can provide an understanding of social choice which is both complementary and additional to theoretical findings. In particular, experimental approaches can form a middle ground between theory and practice: more practical than theoretical approaches in a setting more controlled than real-world application. We apply this approach to a new form of delegative voting and to a task of learning existing and novel voting rules. In each area we find results of a type and scale which are infeasible to traditional analysis. We first examine an abstract model of delegative voting -- agents use liquid democracy to transitively delegate their vote -- in a setting where the voters collectively agree on a correct outcome. Through extensive simulations we show the dynamic effects on group accuracy from varying a wide range of parameters that collectively encompass many types of human behaviour. We identify two features of this paradigm which result in improvements to group accuracy and highlight a possible explanation for their effectiveness. Subsequently, we apply this liquid democracy framework to the process of training an ensemble of classifiers. We show that the experimental findings from our simulations are largely maintained on a task involving real-world data and result in further improvements when considering a novel metric of the training cost of ensembles. Additionally, we demonstrate the creation of a robust framework for axiomatic comparison of arbitrary voting rules. Rather than proving whether individual rules satisfy particular axioms, we establish a framework for showing experimentally the degree to which rules general satisfy sets of axioms. This enables a new type of question -- degrees of axiom satisfaction -- and provides a clear example of how to compare a wide range of single and multi-winner voting rules. Using this framework, we develop a procedure for training a model to act as a novel voting rule. This results in a trained model which realizes a far lower axiomatic violation rate than most existing rules and demonstrates the possibility for new rules which provide superior axiomatic properties.Item Large Language Models for Build System Maintenance: An Empirical Study of CodeGen’s Next-Line Prediction(University of Waterloo, 2025-01-31) Akin-Taylor, Akinbowale; McIntosh, Shane; Nagappan, MeiyappanBuild systems play a crucial role in software development and are responsible for compiling source code into executable programs. Despite their importance, build systems often receive limited attention because their impact is not directly visible to end users. This oversight can lead to inadequate maintenance, frequent build failures, and disruptions that require additional resources. Recognising and addressing the maintenance needs of build systems is essential to preventing costly disruptions and ensuring efficient software production. In this thesis, I explore whether applying a Large Language Model (LLM) can reduce the burden of maintaining build systems. I aim to determine whether the prior content in build specifications provides sufficient context for an LLM to generate subsequent lines accurately. I conduct an empirical study on CodeGen, a state-of-the-art Large Language Model (LLM), using a dataset of 13,343 Maven build files. The dataset consists of the Expert dataset from the Apache Software Foundation (ASF) for fine-tuning (9,426 build files) and the Generalised dataset from GitHub for testing (3,917 build files). I observe that (i) fine-tuning on a small portion of data (i.e., 11% of fine-tuning datasets) provides the largest improvement in performance by 13.93% (ii) When applied to the Generalised dataset, the fine-tuned model retains 83.86% of its performance, indicating that it is not overfitted. Upon further investigation, I classify build-code content into functional and metadata subgroups based on enclosing tags. The fine-tuned model performs substantially better in suggesting functional than metadata build-code. The findings highlight the potential of leveraging LLMs like CodeGen to relieve the maintenance challenges associated with build systems, particularly in functional content. My thesis highlights the limitations of large language models in suggesting the metadata components of build code. Future research should focus on developing approaches to enhance the accuracy and effectiveness of metadata generation.Item Analyzing Access Control logic in the Android Automotive Framework(University of Waterloo, 2025-01-30) Jumana, .; Aafer, YousraThe Android Automotive Operating System (AAOS) is a specialized version of the Android OS designed specifically for in-vehicle hardware. Prominent car manufacturers, including Honda, General Motors (GM), Volvo, and Ford have already adopted it, with Porsche planning to follow soon. Despite its popularity, little has been done to evaluate the security of AAOS integration, particularly at the framework layer where access control vulnerabilities are likely to arise. To bridge the gap, we perform the first security evaluation of automotive APIs in AAOS. Our study is enabled by AutoAcRaptor, an automated tool that identifies automotive-specific entry points, generates their access control specifications, and analyzes them for potential security risks. AutoAcRaptor leverages static analysis and NLP to perform a three-staged analysis pipeline: 1) Convergence Analysis, 2) Similarity Analysis, and 3) Cross-Image Analysis. Our evaluation demonstrates that the tool is able to efficiently focus the security analysis on auto-specific functionality and pinpoint automotive APIs with likely anomalous access control.Item A Survival-Driven Machine Learning Framework for Donor-Recipient Matching in Liver Transplantation: Predictive Ranking and Optimal Donor Profiling(University of Waterloo, 2025-01-27) Wang, Yingke; He, Xi; Rambhatla, SirishaLiver transplantation is a life-saving treatment for patients with end-stage liver disease. However, donor organ scarcity and patient heterogeneity make finding the optimal donor-recipient matching a persistent challenge. Existing models and clinical scores are shown to be ineffective for large national datasets such as the United Network for Organ Sharing (UNOS). In this study, I present a comprehensive machine-learning-based approach to predict posttransplant survival probabilities at discrete clinical important time points and to derive a ranking score for donor-recipient compatibility. Furthermore, I developed a recipient-specific "optimal donor profile," enabling clinicians to quickly compare waiting-list patients to their ideal standard, streamlining allocation decisions. Empirical results demonstrate that my score’s discriminative performance outperforms traditional methods while maintaining clinical interpretability. I further validate that the top compatibility list generated by our proposed scoring method is non-trivial, demonstrating statistically significant differences from the list produced by the traditional approach. By integrating these advances into a cohesive framework, our approach supports more nuanced donor-recipient matching and facilitates practical decision-making in real-world clinical settings.Item Type-Safe Tree Transformations for Precisely-Typed Compilers(University of Waterloo, 2025-01-23) Magnan Cavalcante Oliveira, Pedro Jorge; Lhoták, OndřejCompilers translate programs from a source language to a target language. This can be done by translating into an intermediate tree representation, performing multiple partial transformations on the tree, and translating out. Compiler implementers must choose between encoding transformation invariants with multiple tree types at the cost of code boilerplate and duplication, or forgoing static correctness by using a broad and imprecise tree datatype. This thesis proposes a new approach to writing precisely-typed compilers and tree transformations without code boilerplate or duplication. The approach requires encoding the tree nodes using two type indices, one for the phase of the root node and another for the phase of all children nodes. This tree datatype can represent partially transformed nodes, and distinguish between trees of different phases. In order to make this approach possible it was necessary to modify the Scala type checker to better infer types in ‘match’-expressions. Precisely-typed tree transformations make use of the default case of a ‘match’-expression; this case must be elaborated to a type which is the type difference of the scrutinee expression and all previously matched patterns. We demonstrate the viability of this approach by implementing a case study for a precisely-typed compiler for the instructional language Lacs. This case study modifies the existing implementation of Lacs to track which subset of tree nodes may be present before and after any given tree transformation. We show that this approach can increase static correctness without the burden of additional code boilerplate or duplication.Item Secure and Efficient Message Routing and Delivery Across Blockchain Networks(University of Waterloo, 2025-01-22) Davidson, Solomon; Wong, BernardThe increasing demand for blockchain applications and services has led to a surge of new public blockchains to support this growth. Although the availability of additional blockchains enables the support of more applications and users, it also fragments liquidity, which can create a challenging user experience. Cross-chain communications can tackle this issue by providing interoperability for smart contracts across blockchains. However, current cross-chain delivery solutions either only support message passing between directly connected chains, which significantly limits their connectivity, or are heavily centralized, requiring messages to be routed through a single hub chain. In this thesis, we present Baton, an interoperability protocol for efficient and secure cross-chain message routing and delivery. Baton is built on the Inter-Blockchain Communication protocol (IBC). IBC is a protocol for general message passing between blockchains. Developers independently connect chains over IBC as they see fit, and Baton can route messages across the IBC topology to allow pairs of chains to communicate. This reduces the need for additional trusted connection setup periods, which are vulnerable for exploitation. Routes are computed off-chain and verified on-chain to minimize the cost of route computation. Unlike IBC, where users must manually specify routes, users can send cross-chain messages just by specifying a destination chain. Baton enforces cryptoeconomic incentives to ensure that near-optimal routes, based on a user specified metric, are maintained. Unlike packet routing in traditional networks where the packets have to traverse one or more transit networks, Baton delivers messages directly from the source to the destination and only uses the state of the intermediate chains to construct a proof to verify the authenticity of the message. Baton can also include information about chain security properties within these proofs, such as how stake is distributed. These user-specified security policies disallow messages from being sent along routes with less secure blockchains. Baton can send messages along multiple disjoint paths that connect the same chains. By verifying that messages sent along disjoint paths are the same, Baton can detect compromised chains and fabricated messages. Cosmos Hub and Axelar are hub chains that connect to other blockchains, and that enable wide-spread interoperability by forwarding messages between pairs of chains. If Cosmos Hub or Axelar become unavailable, only 32.8% and 48.2% of chain pairs can communicate, respectively. In contrast, Baton can maintain connectivity between 57.5% of chain pairs when the top 10 most connected blockchains become unavailable. Our evaluation shows that Baton can deliver up to 20.6% and 3.26% more messages than if blockchains were arranged in a mesh topology or a hub-and-spoke topology respectively, given the same number of cross-chain proof transactions.Item SWE-bench-secret: Automating AI Agent Evaluation for Software Engineering Tasks(University of Waterloo, 2025-01-21) Kio, Godsfavour; Nagappan, MeiyappanThe rise of large language models (LLMs) has sparked significant interest in their application to software engineering tasks. However, as new and more capable LLMs emerge, existing evaluation benchmarks (such as HumanEval and MBPP) are no longer sufficient for gauging their potential. While benchmarks like SWE-bench and SWE-bench-java provide a foundation for evaluating these models on real-world challenges, publicly available datasets face potential contamination risks, compromising their reliability for assessing generalization. To address these limitations, we introduce SWE-bench-secret, a private dataset carefully selected to evaluate AI agents on software engineering tasks spanning multiple years, including some originating after the models’ training data cutoff. Derived from three popular GitHub repositories, it comprises 457 task instances designed to mirror SWE-bench’s structure while maintaining strict data secrecy. Evaluations on a lightweight subset, called SWE-Secret-Lite, reveal significant performance gaps between public and private datasets, highlighting the increased difficulty models face when dealing with tasks that extend beyond familiar patterns found in publicly available data. Additionally, we provide a secure mechanism that allows researchers to submit their agents for evaluation without exposing the dataset. Our findings emphasize the need for improved logical reasoning and adaptability in AI agents, particularly when confronted with tasks that lie outside well-known public training data distributions. By introducing a contamination-free evaluation framework and a novel secret benchmark, this work strengthens the foundation for advancing benchmarking methodologies and promoting the development of more versatile, context-aware AI agents.Item Exploring high-level transport programming through eXpress Data Path(University of Waterloo, 2025-01-20) Valenca Mizuno, Pedro Vitor; Tahmasbi Arashloo, MinaThe transport layer is a layer from the network stack responsible for providing several essential services, such as congestion control, and lost packet detection and retransmission. Moreover, this layer is constantly changing to satisfy the new demands present in the network. This includes the increase in traffic, the leveraging of new hardware, and the release of new workloads. However, implementing these protocols is a considerably challenging task due to several reasons. First, the available documentation about these algorithms is written in natural language and can be long, which may result in misinterpretations, and consequently, incorrect implementations. Second, while developing transport algorithms, programmers must deeply study the environment where the protocol will run to find the best-suiting built-in helper functions and data structures available for their implementations. For this reason, the protocols are usually implemented as large sections of optimized code that are challenging to navigate, read, and modify. Third, since the transport layer is located between two other layers, namely application and network, transport algorithms must handle the details of these interactions, which can depend on the execution environment. In this thesis, we introduce Modular Transport Programming (MTP). This event-driven framework allows the declaration of transport algorithms with a high-level, yet, precise language. MTP abstracts low-level details by providing a set of high-level built-in functions and constructs focused solely on transport programming. It also abstracts the interactions between the transport layer and its neighbours by having interfaces responsible for such communication. Moreover, it improves the readability of MTP code by having a modularized design that clearly shows how each module interacts with the other and how the events are processed. To explore the feasibility and effectiveness of MTP, we chose to implement transport protocols in the Linux Kernel. The Linux Kernel and its transport layer implementations are some of the most notable examples that highlight the challenges stated above. These implementations can require thousands of lines of code and hundreds of functions, which are difficult to navigate due to the low-level C used to write their codes. Additionally, transport protocol implementations in the Kernel are tightly linked with the neighbouring layers of the network stack, utilizing complex data structures for packet processing and socket interface. Thus, implementing protocols from the start or modifying already existing ones can be a considerably difficult task. Nevertheless, instead of directly implementing protocols to the Linux Kernel, we opted to use the eXpress Data Path (XDP) framework as our first step. This framework allows a simple and safe loading of new user-defined code to the Linux Kernel. Moreover, several characteristics of the framework are ideal for the implementation of transport layer protocols, such as its loading point being in the Network Interface Card (NIC) driver and allowing Kernel bypass. Thus, this thesis also introduces a back-end developed in the XDP framework, to which the MTP code can be compiled using our code generator. During the development of this back-end, we explored XDP in depth to make wise design decisions. This includes utilizing a set of data structures best suited for our model, making the most of the helper functions available in its libraries, and bypassing the limitations of this framework. Finally, we show that it is possible to specify the logic of transport protocols in a high-level language and translate it to XDP. We implemented two protocols, TCP and RoCEv2, in the MTP language and successfully translated them with our compiler to the XDP back-end. Moreover, between two servers connected by 100Gbps links, the TCP implementation presented 80Gbps of throughput with 16 cores processing packets. Meanwhile, RoCEv2 translation is functional but still needs further optimizations to reach its expected performance. Lastly, we evaluate the strengths and weaknesses of XDP for transport programming.