UROP Proceedings 2022-23

School of Engineering Department of Computer Science and Engineering 117 Compilation, Optimization, and Metaprogramming Supervisor: PARREAUX, Lionel / CSE Student: YUAN, Keyu / COMP Course: UROP1100, Fall Defunctionalization can transform a call to dynamic instance method into match clauses dispatching over static first-order function calls, which will be helpful for program optimization. In this UROP we implemented a defunctionalizer for MLScript, which utilizes 0-CFA (control flow analysis) to determine possible values for each expression. We avoided performing an explicit evaluation of recursive functions in order to guarantee program termination. As an alternative, we keep track of the values entering and exiting each function, and we halt when these values cease changing. This defunctionalizer can successfully transform instance methodcalls and additional functionalities that can be added in the future. Programming Language Design and Implementation Supervisor: PARREAUX, Lionel / CSE Student: LUO, Yicong / COMP Course: UROP2100, Spring During this UROP course, I mainly contribute to the development of MLscript, an object oriented functional programming language with principal type inference developed by Prof Lionel Parreaux. The first contribution is adding class and trait (interface) inheritance to the language. Later we add support for type arguments in classes and traits. We also start looking into extending the language with GADTs. Synthesizing Likely Invariants for Web Applications Supervisor: SHEN, Jiasi / CSE Student: CHEN, Kuo / COMP Course: UROP1000, Summer With the rapid development of Internet, the number of bugs keeps increasing in web applications, and there is a stronger demand for automatic debugging tools. This report describes the development progress of a tool that can automatically infer the expected behaviour of web applications. This research mainly applies the principle of program synthesis to automatically generate expressions that describe invariants in web applications. Our tool automatically configures a web browser and interacts with multiple web pages to collect the web application behaviour. At the same time, the use of SMT Solver further improves its operational efficiency and accuracy. This research will lay a certain foundation for the development of future software development and debugging tools.