Discovering how program components affect one another plays a fundamental role in aiding engineers comprehend and maintain a software system. Despite the fact that the degree to which one program component depends upon another can vary in strength, traditional dependence analysis typically ignores such nuance. To account for this nuance in dependence-based analysis, we propose Causal Program Dependence Analysis (CPDA), a framework based on causal inference that captures the degree (or strength) of the dependence between program elements. For a given program, CPDA intervenes in the program execution to observe changes in value at selected points in the source code. It observes the association between program elements by constructing and executing modified versions of a program (requiring only light-weight parsing rather than sophisticated static analysis). CPDA applies causal inference to the observed changes to identify and estimate the strength of the dependence relations between program elements. We explore the advantages of CPDA's quantified dependence by presenting results for several applications. Our further qualitative evaluation demonstrates 1) that observing different levels of dependence facilitates grouping various functional aspects found in a program and 2) how focusing on the relative strength of the dependences for a particular program element provides a detailed context for that element. Furthermore, a case study that applies CPDA to debugging illustrates how it can improve engineer productivity.
Object Constraint Language (OCL) is one lightweight formal specification. Integrated within the Unified Modeling Language (UML) standard, it serves as a cornerstone in requirements modeling, enjoying widespread adoption across various domains. OCL can precisely define the pre- and post-condition of system operations and system invariants. While OCL provides a simple yet expressive syntax, it lacks clarity in mapping Object-Oriented (OO) concepts, such as object states, object links, and object attributes. This ambiguity makes it challenging for OO developers to identify errors in requirements. In this paper, we propose an approach named OCLVerifier, which can automatically detect the requirements errors of OCL, such as conflict, redundancy, and failure error. OCLVerifier first transforms OO contracts and detection patterns into SMT formulas and then proves them by using a SMT solver. Finally, the results are mapped to the original OCL contracts to display detailed error type and location information. To evaluate OCLVerifier, we conducted a comprehensive evaluation of four case studies. Experimental results indicate that OCLVerifier successfully identifies 65.5% of error cases, with each identified case offering accurate error location information. Compared with human experts, OCLVerifier can reduce evaluation time by 80.8% while enhancing repair accuracy by 18%. The results are satisfactory, and the proposed approach can be further extended to the software industry for requirements verification.
Mi Superpoder es la Programación is a web tool designed to teach programming to children and young people. It focuses on developing logical thinking through interactive exercises that cover computer parts recognition, sequences, patterns, and flowcharts. The tool was developed to address the educational needs identified in the social project of the same name, where modern technologies and a serverless-based architecture were used to create an accessible and effective solution for teaching programming. Initial results indicate that students found the tool useful and demonstrated improvements in their understanding of computational logic. This analysis is framed within the global challenge of teaching programming to children and youth, demonstrating the potential of gamified tools across diverse educational contexts. Future plans include expanding the tool to incorporate more modules, allowing customization by teachers, and conducting broader evaluations in different educational environments.
The need for more flexible and robust models to reason about systems in the presence of conflicting information is becoming more and more relevant in different contexts. This has prompted the introduction of paraconsistent transition systems, where transitions are characterized by two pairs of weights: one representing the evidence that the transition effectively occurs and the other its absence. Such a pair of weights can express scenarios of vagueness and inconsistency. This paper establishes a foundation for a compositional and structured specification approach of paraconsistent transition systems, framed as paraconsistent institution. The proposed methodology follows the stepwise implementation process outlined by Sannella and Tarlecki.