Wei-Ngan Chin

dblp:c/WeiNganChin · DBLP profile ↗
← Back
101ranked-venue papers
23as first author
10since 2021 · last 2025
0000-0002-9660-5682ORCID · corroborated

Domains — the database's venue-derived domains; a paper can count in several

Software engineering, systems software and programming languages · 84 · 21 first-author · 10 since 2021Theory of computation · 22 · 3 first-author · 1 since 2021Systems, architecture and hardware · 4Artificial intelligence and machine learning · 1
YearPublicationVenuePosition
2025 Specifying and Verifying Future Conditions
Yahui Song, Darius Foo, Wei-Ngan Chin
SAS3
2025 Inferring Incorrectness Specifications for Object-Oriented Programs
abstract
Abstract Incorrectness logic (IL) based on under-approximation is effective at finding real program bugs. The prior work utilises bi-abductive specification inference mechanism to infer IL specifications for analysing large-scale C projects. However, this approach does not work well with object-oriented (OO) programs because it does not account for class inheritance and method overriding. In our work, we present an IL specification inference system that tackles these issues. At its core, we encode type information in our bi-abductive reasoning and propagate type constraints throughout the analysis. The direct benefit is that we can efficiently identify bugs caused by improper usage of the casting operator, which cannot be handled by the existing specification inference. Meanwhile, our system can reduce false positives while finding more true bugs because of not losing OO-type information. Furthermore, we model dynamic dispatching calls by inferring dynamic specifications, where the possible types of the calling object at runtime are bounded by the type constraints. We prototype our system in ILoop and evaluate it using real-world projects. Experimental results show that it finds 400% more class-cast-exceptions compared with Error Prone and improves the precision of finding null-pointer-exceptions by 27.0% compared with Pulse.
Quang Loc Le, Yahui Song, Wei-Ngan Chin
TACAS (1)4
2024 Staged Specification Logic for Verifying Higher-Order Imperative Programs
abstract
Abstract Higher-order functions and imperative states are language features supported by many mainstream languages. Their combination is expressive and useful, but complicates specification and reasoning, due to the use of yet-to-be-instantiated function parameters. One inherent limitation of existing specification mechanisms is its reliance ononly two stages : an initial stage to denote the precondition at the start of the method and a final stage to capture the postcondition. Such two-stage specifications forceabstract propertiesto be imposed on unknown function parameters, leading to less precise specifications for higher-order methods. To overcome this limitation, we introduce a novel extension to Hoare logic that supportsmultiple stagesfor a call-by-value higher-order language with ML-like local references. Multiple stages allow the behavior of unknown function-type parameters to be captured abstractly as uninterpreted relations; and can also model the repetitive behavior of each recursion as a separate stage. In this paper, we define our staged logic with its semantics, prove its soundness and develop a new automated higher-order verifier, calledHeifer, for a core ML-like language.
Darius Foo, Yahui Song, Wei-Ngan Chin
FM (1)3
2024 Specification and Verification for Unrestricted Algebraic Effects and Handling
abstract
Programming with user-defined effects and effect handlers has many practical use cases involving imperative effects. Additionally, it is natural and powerful to use multi-shot effect handlers for non-deterministic or probabilistic programs that allow backtracking to compute a comprehensive outcome. Existing works for verifying effect handlers are restricted in one of three ways: i) permitting multi-shot continuations under pure setting; ii) allowing heap manipulation for only one-shot continuations; or iii) allowing multi-shot continuations with heap-manipulation but under a restricted frame rule. This work proposes a novel calculus called Effectful Specification Logic (ESL) to support unrestricted effect handlers, where zero-/one-/multi-shot continuations can co-exist with imperative effects and higher-order constructs. ESL captures behaviors in stages, and provides precise models to support invoked effects, handlers and continuations. To show its feasibility, we prototype an automated verification system for this novel specification logic, prove its soundness, report on useful case studies, and present experimental results. With this proposal, we have provided an extended specification logic that is capable of modeling arbitrary imperative higher-order programs with algebraic effects and continuation-enabled handlers.
Yahui Song, Darius Foo, Wei-Ngan Chin
Proc. ACM Program. Lang.3
2023 Incorrectness Proofs for Object-Oriented Programs via Subclass Reflection
Quang Loc Le, Yahui Song, Wei-Ngan Chin
APLAS4
2023 Automated Verification for Real-Time Systems - via Implicit Clocks and an Extended Antimirov Algorithm
abstract
Abstract The correctness of real-time systems depends both on the correct functionalities and the realtime constraints. To go beyond the existing Timed Automata based techniques, we propose a novel solution that integrates a modular Hoare-style forward verifier with a term rewriting system (TRS) on Timed Effects ( TimEffs ). The main purposes are to: increase the expressiveness, dynamically manipulate clocks, and efficiently solve clock constraints. We formally define a core language $$ C^{t} $$ C t , generalizing the real-time systems, modeled using mutable variables and timed behavioral patterns, such as delay , timeout , interrupt , deadline . Secondly, to capture real-time specifications, we introduce TimEffs , a new effects logic, that extends regular expressions with dependent values and arithmetic constraints. Thirdly, the forward verifier reasons temporal behaviors – expressed in TimEffs – of target $$ C^{t} $$ C t programs. Lastly, we present a purely algebraic TRS, i.e., an extended Antimirov algorithm , to efficiently check language inclusions between TimEffs . To demonstrate the feasibility of our proposal, we prototype the verification system; prove its soundness; report on case studies and experimental results.
Yahui Song, Wei-Ngan Chin
TACAS (1)2
2023 Protocol Conformance with Choreographic PlusCal
Darius Foo, Andreea Costea, Wei-Ngan Chin
TASE3
2022 Automated Temporal Verification for Algebraic Effects
Yahui Song, Darius Foo, Wei-Ngan Chin
APLAS3
2021 Automated Repair of Heap-Manipulating Programs Using Deductive Synthesis
Thanh-Toan Nguyen, Quang-Trung Ta, Ilya Sergey, Wei-Ngan Chin
VMCAI4
2021 A Synchronous Effects Logic for Temporal Verification of Pure Esterel
Yahui Song, Wei-Ngan Chin
VMCAI2
2020 Automated Temporal Verification of Integrated Dependent Effects
Yahui Song, Wei-Ngan Chin
ICFEM2
2019 SL-COMP: Competition of Solvers for Separation Logic
abstract
SL-COMP aims at bringing together researchers interested on improving the state of the art of the automated deduction methods for Separation Logic (SL). The event took place twice until now and collected more than 1K problems for different fragments of SL. The input format of problems is based on the SMT-LIB format and therefore fully typed; only one new command is added to SMT-LIB’s list, the command for the declaration of the heap’s type. The SMT-LIB theory of SL comes with ten logics, some of them being combinations of SL with linear arithmetics. The competition’s divisions are defined by the logic fragment, the kind of decision problem (satisfiability or entailment) and the presence of quantifiers. Until now, SL-COMP has been run on the StarExec platform, where the benchmark set and the binaries of participant solvers are freely available. The benchmark set is also available with the competition’s documentation on a public repository in GitHub.
Mihaela Sighireanu, Juan Antonio Navarro Pérez, Andrey Rybalchenko, Nikos Gorogiannis, Radu Iosif, Andrew Reynolds 0001, Cristina Serban, Jens Pagel, Christoph Matheja, Thomas Noll 0001, Florian Zuleger, Wei-Ngan Chin, Quang Loc Le, Quang-Trung Ta, Ton Chanh Le, Thanh-Toan Nguyen, Siau-Cheng Khoo, Michal Cyprian, Adam Rogalewicz, Tomás Vojnar, Constantin Enea, Ondrej Lengál, Zhilin Wu
TACAS (3)12
2019 Automatic Program Repair Using Formal Verification and Expression Templates
Thanh-Toan Nguyen, Quang-Trung Ta, Wei-Ngan Chin
VMCAI3
2019 Automated mutual induction proof in separation logic
abstract
Abstract We present a deductive proof system to automatically prove separation logic entailments by mathematical induction. Our technique is called the mutual induction proof . It is an instance of the well-founded induction, a.k.a., Noetherian induction. More specifically, we propose a novel induction principle based on a well-founded relation of separation logic models. We implement this principle explicitly as inference rules so that it can be easily integrated into a deductive proof system. Our induction principle allows a goal entailment and other entailments derived during the proof search to be used as hypotheses to mutually prove each other. This feature increases the success chance of proving the goal entailment. We have implemented this mutual induction proof technique in a prototype prover and evaluated it on two entailment benchmarks collected from the literature as well as a synthetic benchmark. The experimental results are promising since our prover can prove most of the valid entailments in these benchmarks, and achieves a better performance than other state-of-the-art separation logic provers.
Quang-Trung Ta, Ton Chanh Le, Siau-Cheng Khoo, Wei-Ngan Chin
Formal Aspects Comput.4
2019 Completeness and expressiveness of pointer program verification by separation logic
Makoto Tatsuta, Wei-Ngan Chin, Mahmudul Faisal Al Ameen
Inf. Comput.2
2018 Automated Modular Verification for Relaxed Communication Protocols
Andreea Costea, Wei-Ngan Chin, Shengchao Qin, Florin Craciun
APLAS2
2018 Variant Region Types
abstract
Region-based memory management has been shown to be an effective alternative that can co-exist with garbage collectors in memory managed languages especially for Real-Time and Big Data applications. In this paper we propose a novel variant region type system that extends our previous Java region types to Generic Java. The main difficulties are given by the type variables used by Generic Java. Our proposal is based on a modular flow analysis that captures regions lifetime relations via subtyping constraints at the method boundary. Our variant region type system guarantees that well-typed Generic Java programs use lexically-scoped regions and never create dangling references in the store and on the program stack.
Florin Craciun, Wei-Ngan Chin, Shengchao Qin
ICECCS2
2018 A Logical System for Modular Information Flow Verification
Adi Prabawa, Mahmudul Faisal Al Ameen, Benedict Lee, Wei-Ngan Chin
VMCAI4
2018 Automated lemma synthesis in symbolic-heap separation logic
abstract
The symbolic-heap fragment of separation logic has been actively developed and advocated for verifying the memory-safety property of computer programs. At present, one of its biggest challenges is to effectively prove entailments containing inductive heap predicates. These entailments are usually proof obligations generated when verifying programs that manipulate complex data structures like linked lists, trees, or graphs. To assist in proving such entailments, this paper introduces a lemma synthesis framework, which automatically discovers lemmas to serve as eureka steps in the proofs. Mathematical induction and template-based constraint solving are two pillars of our framework. To derive the supporting lemmas for a given entailment, the framework firstly identifies possible lemma templates from the entailment's heap structure. It then sets up unknown relations among each template's variables and conducts structural induction proof to generate constraints about these relations. Finally, it solves the constraints to find out actual definitions of the unknown relations, thus discovers the lemmas. We have integrated this framework into a prototype prover and have experimented it on various entailment benchmarks. The experimental results show that our lemma-synthesis-assisted prover can prove many entailments that could not be handled by existing techniques. This new proposal opens up more opportunities to automatically reason with complex inductive heap predicates.
Quang-Trung Ta, Ton Chanh Le, Siau-Cheng Khoo, Wei-Ngan Chin
Proc. ACM Program. Lang.4
2017 A Decidable Fragment in Separation Logic with Inductive Predicates and Arithmetic
Quang Loc Le, Makoto Tatsuta, Jun Sun 0001, Wei-Ngan Chin
CAV (2)4
2017 A Certified Decision Procedure for Tree Shares
Xuan Bach Le, Thanh-Toan Nguyen, Wei-Ngan Chin, Aquinas Hobor
ICFEM3
2017 HipTNT+: A Termination and Non-termination Analyzer by Second-Order Abduction - (Competition Contribution)
Ton Chanh Le, Quang-Trung Ta, Wei-Ngan Chin
TACAS (2)3
2017 Automated specification inference in a combined domain via user-defined predicates
Shengchao Qin, Guanhua He, Wei-Ngan Chin, Florin Craciun, Mengda He, Zhong Ming 0001
Sci. Comput. Program.3
2016 Decision Procedure for Separation Logic with Inductive Definitions and Presburger Arithmetic
Makoto Tatsuta, Quang Loc Le, Wei-Ngan Chin
APLAS3
2016 Satisfiability Modulo Heap-Based Programs
Quang Loc Le, Jun Sun 0001, Wei-Ngan Chin
CAV (1)3
2016 Automated Mutual Explicit Induction Proof in Separation Logic
Quang-Trung Ta, Ton Chanh Le, Siau-Cheng Khoo, Wei-Ngan Chin
FM4
2015 Certified Reasoning with Infinity
Asankhaya Sharma, Andreea Costea, Aquinas Hobor, Wei-Ngan Chin
FM5
2015 Specifying Compatible Sharing in Data Structures
Asankhaya Sharma, Aquinas Hobor, Wei-Ngan Chin
ICFEM3
2015 Threads as Resource for Concurrency Verification
abstract
In mainstream languages, threads are first-class in that they can be dynamically created, stored in data structures, passed as parameters, and returned from procedures. However, existing verification systems support reasoning about threads in a restricted way: threads are often represented by unique tokens that can neither be split nor shared. In this paper, we propose "threads as resource" to enable more expressive treatment of first-class threads. Our approach allows the ownership of a thread (and its resource) to be flexibly split, combined, and (partially) transferred across procedure and thread boundaries. We illustrate the utility of our approach in handling three problems. First, we use "threads as resource" to verify the multi-join pattern, i.e. threads can be shared among concurrent threads and joined multiple times in different threads. Second, using inductive predicates, we show how our approach naturally captures the threadpool idiom where threads are stored in data structures. Lastly, we present how thread liveness can be precisely tracked. To demonstrate the feasibility of our approach, we implemented it in a tool, called ThreadHIP, on top of an existing ParaHIP verifier. Experimental results show that ThreadHIP is more expressive than ParaHIP while achieving comparable verification performance.
Duy-Khanh Le, Wei-Ngan Chin, Yong Meng Teo
PEPM2
2015 Termination and non-termination specification inference
abstract
Techniques for proving termination and non-termination of imperative programs are usually considered as orthogonal mechanisms. In this paper, we propose a novel mechanism that analyzes and proves both program termination and non-termination at the same time. We first introduce the concept of second-order termination constraints and accumulate a set of relational assumptions on them via a Hoare-style verification. We then solve these assumptions with case analysis to determine the (conditional) termination and non- termination scenarios expressed in some specification logic form. In contrast to current approaches, our technique can construct a summary of terminating and non-terminating behaviors for each method. This enables modularity and reuse for our termination and non-termination proving processes. We have tested our tool on sample programs from a recent termination competition, and compared favorably against state-of-the-art termination analyzers.
Ton Chanh Le, Shengchao Qin, Wei-Ngan Chin
PLDI3
2015 Selected and extended papers from Partial Evaluation and Program Manipulation 2014
Wei-Ngan Chin, Jurriaan Hage
Sci. Comput. Program.1
2014 Shape Analysis via Second-Order Bi-Abduction
Quang Loc Le, Cristian Gherghina, Shengchao Qin, Wei-Ngan Chin
CAV4
2014 A Resource-Based Logic for Termination and Non-termination Proofs
Ton Chanh Le, Cristian Gherghina, Aquinas Hobor, Wei-Ngan Chin
ICFEM4
2014 Completeness of Separation Logic with Inductive Definitions for Program Verification
Makoto Tatsuta, Wei-Ngan Chin
SEFM2
2014 Automatically refining partial specifications for heap-manipulating programs
Shengchao Qin, Guanhua He, Chenguang Luo, Wei-Ngan Chin
Sci. Comput. Program.4
2014 Automated verification of the FreeRTOS scheduler in Hip/Sleek
João F. Ferreira 0001, Cristian Gherghina, Guanhua He, Shengchao Qin, Wei-Ngan Chin
Int. J. Softw. Tools Technol. Transf.5
2014 Expressive program verification via structured specifications
Cristian Gherghina, Cristina David, Shengchao Qin, Wei-Ngan Chin
Int. J. Softw. Tools Technol. Transf.4
2013 Bi-Abduction with Pure Properties for Specification Inference
Minh-Thai Trinh, Quang Loc Le, Cristina David, Wei-Ngan Chin
APLAS4
2013 An Expressive Framework for Verifying Deadlock Freedom
Duy-Khanh Le, Wei-Ngan Chin, Yong Meng Teo
ATVA2
2013 Automated Specification Discovery via User-Defined Predicates
Guanhua He, Shengchao Qin, Wei-Ngan Chin, Florin Craciun
ICFEM3
2013 Verification of Static and Dynamic Barrier Synchronization Using Bounded Permissions
Duy-Khanh Le, Wei-Ngan Chin, Yong Meng Teo
ICFEM2
2013 A Proof Slicing Framework for Program Verification
Ton Chanh Le, Cristian Gherghina, Razvan Voicu, Wei-Ngan Chin
ICFEM4
2013 Loop invariant synthesis in a combined abstract domain
Shengchao Qin, Guanhua He, Chenguang Luo, Wei-Ngan Chin, Xin Chen 0027
J. Symb. Comput.4
2013 Dual analysis for proving safety and finding bugs
Corneliu Popeea, Wei-Ngan Chin
Sci. Comput. Program.2
2012 Variable Permissions for Concurrency Verification
Duy-Khanh Le, Wei-Ngan Chin, Yong Meng Teo
ICFEM2
2012 From Verification to Specification Inference
abstract
Traditionally, the focus of specification mechanism has been on improving its ability to cover a wider range of problems more accurately, while the effectiveness of verification is left to the underlying theorem provers. Our work attempts a novel approach, where the focus is on designing good specification mechanisms to achieve better expressivity (the specification should capture more accurately and concisely the functionality of the corresponding code) and better verifiability (the verification process should succeed in more scenarios than the corresponding verification without the specification enhancements, with better or similar performance). Moreover, we are also interested in providing the necessary tools to assist the user with the important but tedious task of constructing desired specifications. Existing approaches to specification construction tend to be either fully manual or fully automatic. We propose a new framework for specification construction that can be done selectively and incrementally. This framework allows preconditions and postconditions to be selectively inferred via a set of specified variables, that included synthesis for unknown functions and relations.
Wei-Ngan Chin, Cristina David
TASE1
2012 Automated verification of shape, size and bag properties via user-defined predicates in separation logic
Wei-Ngan Chin, Cristina David, Huu Hai Nguyen, Shengchao Qin
Sci. Comput. Program.1
2011 A Specialization Calculus for Pruning Disjunctive Predicates to Support Verification
Wei-Ngan Chin, Cristian Gherghina, Razvan Voicu, Quang Loc Le, Florin Craciun, Shengchao Qin
CAV1
2011 FixBag: A Fixpoint Calculator for Quantified Bag Constraints
Tuan-Hung Pham, Minh-Thai Trinh, Anh-Hoang Truong, Wei-Ngan Chin
CAV4
2011 Structured Specifications for Better Verification of Heap-Manipulating Programs
Cristian Gherghina, Cristina David, Shengchao Qin, Wei-Ngan Chin
FM4
2011 Automatically Refining Partial Specifications for Program Verification
Shengchao Qin, Chenguang Luo, Wei-Ngan Chin, Guanhua He
FM3
2011 Immutable specifications for more concise and precise verification
abstract
In the current work, we investigate the benefits of immutability guarantees for allowing more flexible handling of aliasing, as well as more precise and concise specifications. Our approach supports finer levels of control that can mark data structures as being immutable through the use of immutability annotations. By using such annotations to encode immutability guarantees, we expect to obtain better specifications that can more accurately describe the intentions, as well as prohibitions, of the method. Ultimately, our goal is improving the precision of the verification process, as well as making the specifications more readable, more precise and as an enforceable program documentation. We have designed and implemented a new entailment procedure to formally and automatically reason about immutability enhanced specifications. We have also formalised the soundness for our new procedure through an operational semantics with mutability assertions on the heap. Lastly, we have carried out a set of experiments to both validate and affirm the utility of our current proposal on immutability enhanced specification mechanism.
Cristina David, Wei-Ngan Chin
OOPSLA2
2010 Loop Invariant Synthesis in a Combined Domain
Shengchao Qin, Guanhua He, Chenguang Luo, Wei-Ngan Chin
ICFEM4
2010 Verifying Heap-Manipulating Programs with Unknown Procedure Calls
Shengchao Qin, Chenguang Luo, Guanhua He, Florin Craciun, Wei-Ngan Chin
ICFEM5
2010 Stack Bound Inference for Abstract Java Bytecode
abstract
Ubiquitous embedded systems are often resource-constrained. Developing software for these systems should take into account resources such as memory space. In this paper, we develop and implement an analysis framework to infer statically stack usage bounds for assembly-level programs in abstract Java Byte code. Our stack bound inference process, extended from a theoretical framework proposed earlier by some of the authors, is composed of deductive inference rules in multiple passes. Based on these rules, a usable tool has been developed for processing programs to capture the stack memory needs of each procedure in terms of the symbolic values of its parameters. The final result contains path-sensitive information to achieve better precision. The tool invokes a Presburger solver to perform fixed point analysis for loops and recursive procedures. Our initial experiments have confirmed the viability and power of the approach.
Zongyan Qiu, Shengchao Qin, Wei-Ngan Chin
TASE4
2010 Verifying pointer safety for programs with unknown calls
Chenguang Luo, Florin Craciun, Shengchao Qin, Guanhua He, Wei-Ngan Chin
J. Symb. Comput.5
2009 Memory Usage Verification Using Hip/Sleek
Guanhua He, Shengchao Qin, Chenguang Luo, Wei-Ngan Chin
ATVA4
2009 An Interval-Based Inference of Variant Parametric Types
Florin Craciun, Wei-Ngan Chin, Guanhua He, Shengchao Qin
ESOP2
2009 Translation and optimization for a core calculus with exceptions
abstract
A requirement of any source language is to be rich in features and concise to use by the programmers. As a drawback, it is often too complex to analyse, causing research studies to omit some of the fancy features. For instance, exception handling is an important aspect of programming languages that is instrumental for building robust software with good error handling capability. However, exceptions are often omitted during the initial formulation on program analysis and optimization. Moreover, when considering the traditional approach of converting programs from high level languages to machine code, the target code is meant for the machine, being too cryptic (or low level) for program analysis. Our goal is to design an intermediate, minimal but expressive, core calculus which can be easily analysed and manipulated, and to show that this calculus can handle major language features by translating a significant imperative source language into it. The translation to the core calculus enables us to easily analyse and optimize the code, while not sacrificing the flexibility and rich characteristic of the source language.
Cristina David, Cristian Gherghina, Wei-Ngan Chin
PEPM3
2009 Completeness of Pointer Program Verification by Separation Logic
abstract
Reynolds' separation logical system for pointer program verification is investigated. This paper proves its completeness theorem as well as the expressiveness theorem that states the weakest precondition of every program and every assertion can be expressed by some assertion. This paper also introduces the predicate that represents the next new cell, and proves the completeness and the soundness of the extended system under deterministic semantics.
Makoto Tatsuta, Wei-Ngan Chin, Mahmudul Faisal Al Ameen
SEFM2
2009 A rigorous methodology for specification and verification of business processes
abstract
Abstract Both specification and verification of business processes are gaining more and more attention in the field. Most of the existing works in the last years are dealing with important, yet very specialized, issues. Among these, we can enumerate compensation constructs to cope with exceptions generated by long running business transactions, fully programmable fault and compensation handling mechanism, web service area, scope-based compensation and shared-labels for synchronization, and so on. The main purpose of this paper is to present a semi-automatized framework to describe and analysebusiness processes. Business analysts can now use a simple specification language (e.g.,BPMN[Obj06]) to describe any type of activity in a company, in aconcurrentandmodularfashion. The associated programs (e.g.,BPDs [Obj06]) have to be executed in an appropriate language (e.g.,BPEL4WS[ACD+03]). Much more, they have to beconfirmed to be sound, via some prescribed (a priori) conditions. We suggest how all the issues can be embedded in aunifying computer tool. We link our work with similar approaches and we justify our particular choices (besidesBPMNandBPD): theTLA+ language for expressing the imposed behavioural conditions andPetri Nets([EB87], [EB88]) to describe an intermediate semantics. In fact, we want to manage in an appropriate way the general relationship diagram (Fig. 1). Examples and case studies are provided.
Cristian Masalagiu, Wei-Ngan Chin, Stefan Andrei, Vasile Alaiba
Formal Aspects Comput.2
2009 Optimizing the parallel computation of linear recurrences using compact matrix representations
Adrian Nistor, Wei-Ngan Chin, Tiow Seng Tan, Nicolae Tapus
J. Parallel Distributed Comput.2
2008 A Flow-Sensitive Region Inference for CLI
Alexandru Stefan, Florin Craciun, Wei-Ngan Chin
APLAS3
2008 Enhancing Program Verification with Lemmas
Huu Hai Nguyen, Wei-Ngan Chin
CAV2
2008 A Formal Soundness Proof of Region-Based Memory Management for Object-Oriented Paradigm
Florin Craciun, Shengchao Qin, Wei-Ngan Chin
ICFEM3
2008 Analysing memory resource bounds for low-level programs
abstract
Embedded systems are becoming more widely used but these systems are often resource constrained. Programming models for these systems should take into formal consideration resources such as stack and heap. In this paper, we show how memory resource bounds can be inferred for assembly-level programs. Our inference process captures the memory needs of each method in terms of the symbolic values of its parameters. For better precision, we infer path-sensitive information through a novel guarded expression format. Our current proposal relies on a Presburger solver to capture memory requirements symbolically, and to perform fixpoint analysis for loops and recursion. Apart from safety in memory adequacy, our proposal can provide estimate on memory costs for embedded devices and improve performance via fewer runtime checks against memory bound.
Wei-Ngan Chin, Huu Hai Nguyen, Corneliu Popeea, Shengchao Qin
ISMM1
2008 A practical and precise inference and specializer for array bound checks elimination
abstract
Arrays are intensively used in many software programs, including those in the popular graphics and game programming domains. Although the problem of eliminating redundant array bound checks has been studied for a long time, there are few works that attempt to be both aggressively precise and practical. We propose an inference mechanism that achieves both aims by combining a forward relational analysis with a backward precondition derivation. Our inference algorithm works for a core imperative language with assignments, and analyses each method once through a summary-based approach. Our inference is precise as it is both path and context sensitive. Through a novel technique that can strengthen preconditions, we can selectively reduce the sizes of formulae to support a practical inference algorithm. Moreover, we subject each inferred program to a flexivariant specialization that can achieve good tradeoff between elimination of array checks and code explosion concerns. We have proven the soundness of our approach and have also implemented a prototype inference and specialization system. Initial experiments suggest that such a desired system is viable.
Corneliu Popeea, Dana N. Xu, Wei-Ngan Chin
PEPM3
2008 Enhancing modular OO verification with separation logic
abstract
Conventional specifications for object-oriented (OO) programs must adhere to behavioral subtyping in support of class inheritance and method overriding. However, this requirement inherently weakens the specifications of overridden methods in superclasses, leading to imprecision during program reasoning. To address this, we advocate a fresh approach to OO verification that focuses on the distinction and relation between specifications that cater to calls with static dispatching from those for calls with dynamic dispatching. We formulate a novel specification subsumption that can avoid code re-verification, where possible. Using a predicate mechanism, we propose a flexible scheme for supporting class invariant and lossless casting. Our aim is to lay the foundation for a practical verification system that is precise, concise and modular for sequential OO programs. We exploit the separation logic formalism to achieve this.
Wei-Ngan Chin, Cristina David, Huu Hai Nguyen, Shengchao Qin
POPL1
2008 A Fast Algorithm to Compute Heap Memory Bounds of Java Card Applets
abstract
In this paper, we present an approach to find upper bounds of heap space for Java Card applets. Our method first transforms an input bytecode stream into a control flow graph (CFG), and then collapses cycles of the CFG to produce a directed acyclic graph (DAG). Based on the DAG, we propose a linear-time algorithm to solve the problem of finding the single-source largest path in it. We also have implemented a prototype tool, tested it on several sample applications, and then compared the bounds found by our tool with the actual heap bounds of the programs. The experiment shows that our tool returns good estimation of heap bounds, runs fast, and has a small memory footprint.
Tuan-Hung Pham, Anh-Hoang Truong, Ninh-Thuan Truong, Wei-Ngan Chin
SEFM4
2008 Runtime Checking for Separation Logic
Huu Hai Nguyen, Viktor Kuncak, Wei-Ngan Chin
VMCAI3
2007 Automated Verification of Shape, Size and Bag Properties
abstract
In recent years, separation logic has emerged as a contender for formal reasoning of heap-manipulating imperative programs. Recent works have focused on specialised provers that are mostly based on fixed sets of predicates. To improve expressivity, we have proposed a prover that can automatically handle user-defined predicates. These shape predicates allow programmers to describe a wide range of data structures with their associated size properties. In the current work, we shall enhance this prover by providing support for a new type of constraints, namely bag (multi-set) constraints. With this extension, we can capture the reachable nodes (or values) inside a heap predicate as a bag constraint. Consequently, we are able to prove properties about the actual values stored inside a data structure.
Wei-Ngan Chin, Cristina David, Huu Hai Nguyen, Shengchao Qin
ICECCS1
2007 Automated Verification of Shape and Size Properties Via Separation Logic
Huu Hai Nguyen, Cristina David, Shengchao Qin, Wei-Ngan Chin
VMCAI4
2006 A flow-based approach for variant parametric types
abstract
10.1145/1167473.1167498
Wei-Ngan Chin, Florin Craciun, Siau-Cheng Khoo, Corneliu Popeea
OOPSLA1
2006 Redundant Call Elimination via Tupling
Wei-Ngan Chin, Siau-Cheng Khoo, Neil D. Jones
Fundam. Informaticae1
2006 Automatic Debugging of Real-Time Systems Based on Incremental Satisfiability Counting
abstract
Real-time logic (RTL) is useful for the verification of a safety assertion with respect to the specification of a realtime system. Since the satisfiability problem for RTL is undecidable, the systematic debugging of a real-time system appears impossible. A first step toward this challenge was presented. With RTL, each prepositional formula corresponds to a verification condition. The number of truth assignments of a prepositional formula can help us determine the specific constraints which should be added or modified to get the expected solutions. This paper solves an even more challenging problem specified as future work, namely, the embedding and the integration of our debugger in autonomous systems which generate real-time control plans on-the-fly, since these specifications must meet timing constraints, but without human interaction. The idea is to consider in advance all the necessary information, such as the designer's guidance. We have implemented a tool (called ADRTL) that is able to perform automatic debugging. The confidence of our approach is high as we have successfully evaluated ADRTL on several existing industrial-based applications.
Stefan Andrei, Wei-Ngan Chin, Albert Mo Kim Cheng, Mihai Lupu
IEEE Trans. Computers2
2005 Verifying safety policies with size properties and alias controls
abstract
Many software properties can be analysed through a relational size analysis on each function's inputs and outputs. Such relational analysis (through a form of dependent typing) has been successfully applied to declarative programs, and to restricted imperative programs; but it has been elusive for object-based programs. The main challenge is that objects may mutate and they may be aliased. In this paper, we show how safety policies of programs can be analysed by tracking size properties of objects and be enforced by objects' invariants and the preconditions of methods. We propose several new ideas to allow both mutability and sharing of objects, whilst aiming for precision in our analysis. We introduce the concept of size-immutability to facilitate sharing, and also a set of alias controls to track unaliased objects whose size properties may change. We formalise our results through a set of advanced type checking rules for an object-based imperative language. We re-affirm the utility of the proposed type system by showing how a variety of software properties can be automatically verified according to size-inspired safety policies.
Wei-Ngan Chin, Siau-Cheng Khoo, Shengchao Qin, Corneliu Popeea, Huu Hai Nguyen
ICSE1
2005 Systematic Debugging of Real-Time Systems based on Incremental Satisfiability Counting
abstract
Real-time logic (RTL) (F. Jahanian et al., 1986, 1987, F. Wang et al., 1994) is useful for the verification of a safety assertion with respect to the specification of a real-time system. Since the satisfiability problem for RTL is undecidable, the systematic debugging of a real-time system appears impossible. This paper provides a first step towards this challenge. With RTL, each propositional formula corresponds to a verification condition. The number of truth assignments of a propositional formula helps to determine the timing constraints which should be added or modified to the system's specification. We have implemented a tool (called SDRTL, (S. Andrei et al., 2004)) that is able to perform systematic debugging. The confidence of our approach is high as we have evaluated SDRTL on several existing industrial-based applications.
Stefan Andrei, Albert Mo Kim Cheng, Wei-Ngan Chin, Mihai Lupu
IEEE Real-Time and Embedded Technology and Applications Symposium3
2005 Runtime-Coordinated Scalable Incremental Checksum Testing of Combinational Circuits
abstract
Circuit testing is the most significant cost in modern chip design and production. Due to the complexity in terms of millions of gates, manufacturers often have to truncate test patterns to make the testing feasible on ATEs with limited capacities. In this paper, we present a novel approach to this challenge by run-time coordinating the algorithm and ATE. A unique combination of a #SAT solver, checksum computation and frame testing enables the efficient incremental testing. Unlike checksums from the communication domain which can only detect the existence of stuck-at faults, our approach differentiates by also locating them. In our experimental results, our method further demonstrates a shorter testing time.
Stefan Andrei, Wei-Ngan Chin, Albert Mo Kim Cheng, Yongxin Zhu 0001
RTCSA2
2005 Memory Usage Verification for OO Programs
Wei-Ngan Chin, Huu Hai Nguyen, Shengchao Qin, Martin C. Rinard
SAS1
2004 An Automatic Mapping from Statecharts to Verilog
Viet-Anh Vu Tran, Shengchao Qin, Wei-Ngan Chin
ICTAC3
2004 A type system for resource protocol verification and its correctness proof
abstract
We present a new method, based on a form of dependent typing, to verify the correct usage of resources in a program. Our approach allows complex resources to be specified, whose properties are captured by annotated types and conditions on invariance and final states. The protocol itself is specified through a set of pre-defined methods, whose pre-condition and post-condition together, enforce the correct temporal usage of each resource type. We design a simple language together with a type system that shows how resource protocol verification can be achieved. We formalise an operational semantics for the language and provide a correctness proof which confirms that well-typed programs conform to the specified protocol of each resource type.
Corneliu Popeea, Wei-Ngan Chin
PEPM2
2004 Region inference for an object-oriented language
abstract
Region-based memory management offers several important potential advantages over garbage collection, including real-time performance, better data locality, and more efficient use of limited memory. Researchers have advocated the use of regions for functional, imperative, and object-oriented languages. Lexically scoped regions are now a core feature of the Real-Time Specification for Java (RTSJ)[5].Recent research in region-based programming for Java has focused on region checking, which requires manual effort to augment the program with region annotations. In this paper, we propose an automatic region inference system for a core subset of Java. To provide an inference method that is both precise and practical, we support classes and methods that are region-polymorphic, with region-polymorphic recursion for methods. One challenging aspect is to ensure region safety in the presence of features such as class subtyping, method overriding, and downcast operations. Our region inference rules can handle these object-oriented features safely without creating dangling references.
Wei-Ngan Chin, Florin Craciun, Shengchao Qin, Martin C. Rinard
PLDI1
2004 Incremental Satisfiability Counting for Real-Time Systems
abstract
Testing constraints for real-time systems are usually verified through the satisfiability of propositional formulae. In this paper, we propose an alternative where the verification of timing constraints can be done by counting the number of truth assignments instead of Boolean satisfiability. This number can also tell us how "far away" a given specification is from satisfying its safety assertion. Furthermore, specifications and safety assertions are often modified in an incremental fashion, where problematic bugs are fixed one at a time. To support this development, we propose an incremental algorithm for counting satisfiability. Our proposed incremental algorithm is optimal as no unnecessary nodes are created during each counting. This works for the class of expressions, known as path RTL ([F. Jahanian et al. (1987), F. Wang et al. (1994)]). To illustrate this application, we show how incremental satisfiability counting can be applied to a well-known rail-road crossing example, particularly when its specification is still being refined.
Stefan Andrei, Wei-Ngan Chin
IEEE Real-Time and Embedded Technology and Applications Symposium2
2004 Self-embedded context-free grammars with regular counterparts
Stefan Andrei, Wei-Ngan Chin, Salvador Valerio Cavadini
Acta Informatica2
2004 Solving a class of higher-order equations over a group structure
Stefan Andrei, Wei-Ngan Chin
J. Symb. Comput.2
2003 Extending sized type with collection analysis
abstract
Many program optimizations and analyses, such as array-bounds checking, termination analysis, depend on knowing the size of a function's input and output. However, size information can be difficult to compute. Firstly, accurate size computation requires detecting a size relation between different inputs of a function. Secondly, size information may also be contained inside a collection (data structure with multiple elements). In this paper, we introduce some techniques to derive universal and existential size properties over collections of elements of recursive data structures. We shall show how a mixed constraint system could support the enhanced size type, and highlight examples where collection analysis are useful.
Wei-Ngan Chin, Siau-Cheng Khoo, Dana N. Xu
PEPM1
2003 A new algorithm for regularizing one-letter context-free grammars
Stefan Andrei, Salvador Valerio Cavadini, Wei-Ngan Chin
Theor. Comput. Sci.3
2002 Towards a Modular Program Derivation via Fusion and Tupling
Wei-Ngan Chin, Zhenjiang Hu 0002
GPCE1
2002 A Lazy Divide and Conquer Approach to Constraint Solving
abstract
A divide and conquer strategy enables a problem to be divided into subproblems, which are solved independently and later combined to form solutions of the original problem. For solving constraint satisfaction problems, however, the divide and conquer technique has not been shown to be effective. This is because it is not possible to cleanly divide a problem into independent subproblems in the presence of constraints that involve variables belonging to different subproblems. Consequently, solutions of one subproblem may prune solutions of another subproblem, making those solutions of the latter subproblem redundant. In this paper we propose a divide and conquer approach to constraint solving in a lazy evaluation framework. In this framework, a subproblem is solved on demand, which eliminates redundant consistency checks. Moreover, once solved, the solutions of a subproblem can be reused in the satisfaction of various global constraints connecting this subproblem with others, thus reducing the search space. We also demonstrate the effectiveness of our algorithm in solving a practical problem: finding all instances of a user-defined pattern in stock market price charts.
Saswat Anand, Wei-Ngan Chin, Siau-Cheng Khoo
ICTAI2
2002 An Efficient Distributed Deadlock Avoidance Algorithm for the AND Model
abstract
A new rank-based distributed deadlock avoidance algorithm for the AND resource request model is presented. Deadlocks are avoided by dynamically maintaining an invariant Con(WFG): For each pair of processes p/sub i/ and p/sub j/, p/sub i/ is allowed to wait for process p/sub j/ iff the rank of p/sub j/ is greater than that of p/sub i/ for the WFG (Wait-For Graph). Our algorithm neither restricts the order of resource requests nor needs a priori information about resource requests nor causes unnecessary abortion of processes. Multidimensional ranks, which are partially ordered and dynamically modified are used to drastically reduce the cost of maintaining Con(WFG). Our simulation results show that the performance of our algorithm is better than that of existing algorithms.
Hui Wu 0001, Wei-Ngan Chin, Joxan Jaffar
IEEE Trans. Software Eng.2
2001 Charting Patterns on Price History
abstract
10.1145/507635.507653
Saswat Anand, Wei-Ngan Chin, Siau-Cheng Khoo
ICFP2
2000 Calculating Sized Types
abstract
Many program optimisations and analyses, such as arraybound checking, termination analysis, etc, depend on knowing the size of a function's input and output. However, size information can be difficult to compute. Firstly, accurate size computation requires detecting size relation between different inputs of a function. Secondly, different optimisations and analyses may require slightly different size information, and thus slightly different computation. Literature in size computation has mainly concentrated on size checking, instead of inferencing. In this paper, we provide a generic framework on which different size variants can be expressed and computed. We also describe an effective algorithm for inferring, instead of checking, size information. Size information are expressed in terms of Presburger formulae, and our algorithm utilises the Omega Calculator to compute as exact a size information as possible, within the linear arithmetic capability. 1 Introduction Many program optimi...
Wei-Ngan Chin, Siau-Cheng Khoo
PEPM1
2000 Deriving Parallel Codes via Invariants
Wei-Ngan Chin, Siau-Cheng Khoo, Zhenjiang Hu 0002, Masato Takeichi
SAS1
1999 Effective Optimization of Multiple Traversals in Lazy Languages
Wei-Ngan Chin, Aik-Hui Goh, Siau-Cheng Khoo
PEPM1
1998 Synchronisation Analysis to Stop Tulping
Wei-Ngan Chin, Siau-Cheng Khoo, Tat-Wee Lee
ESOP1
1998 Parallelization in Calculational Forms
abstract
The problems involved in developing efficient parallel programs have proved harder than those in developing efficient sequential ones, both for programmers and for compilers. Although program calculation has been found to be a promising way to solve these problems in the sequential world, we believe that it needs much more effort to study its effective use in the parallel world. In this paper, we propose a calculational framework for the derivation of efficient parallel programs with two main innovations:. -We propose a novel inductive synthesis lemma based on which an elementary but powerful parallelization theorem is developed. -We make the first attempt to construct a calculational algorithm for parallelization, deriving associative operators from data type definition and making full use of existing fusion and tupling calculations.Being more constructive, our method is not only helpful in the design of efficient parallel programs in general but also promising in the construction of parallelizing compiler. Several interesting examples are used for illustration.
Zhenjiang Hu 0002, Masato Takeichi, Wei-Ngan Chin
POPL3
1997 A Bounds Inference Method for Vector-Based Memoisation
abstract
The dynamic-sized tabulation method can be used to eliminate redundant calls for certain classes of recursive programs. An innovative aspect of the method is the use of lambda abstractions that may subsequently be converted to bounded vectors, in order to share redundant calls via vector lookup.To facilitate this conversion to vector form, we propose a new inference method to conservatively determine the bounds for arithmetic parameters of recursive functions. Suitable techniques for inferring the safe bounds of these parameters are introduced, together with supporting transformations. The resulting method can obtain efficient vector-based programs without the need for run-time bounds checking.
Wei-Ngan Chin, Masami Hagiya
ICFP1
1995 A Transformation Method for Dynamic-Sized Tabulation
Wei-Ngan Chin, Masami Hagiya
Acta Informatica1
1994 Safe Fusion of Functional Expressions II: Further Improvements
abstract
Abstract Large functional programs are often constructed by decomposing each big task into smaller tasks which can be performed by simpler functions. This hierarchical style of developing programs has been found to improve programmers' productivity because smaller functions are easier to construct and reuse. However, programs written in this way tend to be less efficient. Unnecessary intermediate data structures may be created. More function invocations may be required. To reduce such performance penalties, Phil Wadler proposed a transformation algorithm, called deforestation , which could automatically fuse certain composed expressions together to eliminate intermediate tree-like data structures. However, his technique is currently safe (terminates with no loss of efficiency) for only a subset of first-order expressions. This paper will generalise the deforestation technique to make it safe for all first-order and higher-order functional programs. Our generalisation is explained using a model for safe fusion which views each function as a producer and its parameters as consumers. Through this model, syntactic program properties are proposed to classify producers and consumers as either safe or unsafe. This classification is used to identify sub-terms that can be safely fused/eliminated. We present the generalised transformation algorithm, illustrate it with examples and provide a termination proof for the transformation algorithm of first-order programs. This paper also contains a suite of additional techniques to further improve the basic safe fusion method. These improvements could be viewed as enhancements to compensate for some inadequacies of the syntactic analyses used.
Wei-Ngan Chin
J. Funct. Program.1
1993 Towards an Automated Tupling Strategy
abstract
The tupling transformation strategy can be used to merge loops together by combining recursive calls and also to eliminate redundant calls for a class of programs. The clever (and difficult) step of this transformation strategy is to find an appropriate tuple of calls, called the eureka tuple, which would allow each set of calls to be computed recursively from its previous set. In many cases, this transformation can produce super-linear speedup.
Wei-Ngan Chin
PEPM1
1992 Fully Lazy Higher-Order Removal
Wei-Ngan Chin
PEPM1