20 research outputs found
Trustworthy Refactoring via Decomposition and Schemes: A Complex Case Study
Widely used complex code refactoring tools lack a solid reasoning about the
correctness of the transformations they implement, whilst interest in proven
correct refactoring is ever increasing as only formal verification can provide
true confidence in applying tool-automated refactoring to industrial-scale
code. By using our strategic rewriting based refactoring specification
language, we present the decomposition of a complex transformation into smaller
steps that can be expressed as instances of refactoring schemes, then we
demonstrate the semi-automatic formal verification of the components based on a
theoretical understanding of the semantics of the programming language. The
extensible and verifiable refactoring definitions can be executed in our
interpreter built on top of a static analyser framework.Comment: In Proceedings VPT 2017, arXiv:1708.0688
A mesteréges intelligencia feladatok megoldása Polrogban
Szakdolgozatomban tárgyalom a logikai programozás elméleti hátterét: az alapvető logikai fogalmakat és az SLD rezolúciót, vizsgálom a Prolog műkdését és implementálok néhány megoldás-kereső algoritmust Prologban.B
Towards Trustworthy Refactoring in Erlang
Tool-assisted refactoring transformations must be trustworthy if programmers
are to be confident in applying them on arbitrarily extensive and complex code
in order to improve style or efficiency. We propose a simple, high-level but
rigorous, notation for defining refactoring transformations in Erlang, and show
that this notation provides an extensible, verifiable and executable
specification language for refactoring. To demonstrate the applicability of our
approach, we show how to define and verify a number of example refactorings in
the system.Comment: In Proceedings VPT 2016, arXiv:1607.0183
Machine-checked natural semantics for Core Erlang: exceptions and side effects
This research is part of a wider project that aims to investigate and reason about the correctness of scheme-based source code transformations of Erlang programs. In order to formally reason about the definition of a programming language and the software built using it, we need a mathematically rigorous description of that language. In this paper, we present an extended natural semantics for Core Erlang based on our previous formalisation implemented with the Coq Proof Assistant. This extension includes the concepts of exceptions and side effects, moreover, some modifications and updates are also discussed. Then we describe theorems about the properties of this formalisation (e.g. determinism), formal expression evaluation and equivalence examples. These equivalences can be interpreted as simple local refactorings
Static analysis of function calls in Erlang
Functions and their relations can affect numerous properties and metrics of a functional program. To identify and represent the functions and their calling connections, software analysers commonly apply semantic function analysis, which derives the static call graph of the program, based on its source code. Function calls however may be dynamic and complex, making it difficult to statically identify the callee. Dynamic calls are determined just at run-time, static analysis therefore cannot be expected to fully identify every call.
Nevertheless, by utilising the results of a properly performed data-flow analysis as well as taking ambiguous references into account, numerous dynamic calls are discoverable and representable. We consider cases where the identifiers of the callee are statically determined, but they flow into the call expression from a different program point, and also, we manage to handle function calls whose identifiers are not fully identifiable at compile-time. By utilising the improved reference analysis, we extend the static call graph with various information about dynamic function calls. We investigate such a function call analysis in the programming language Erlang
STATIC ANALYSIS BASED SUPPORT FOR PROGRAM COMPREHENSION IN ERLANG 1
ABSTRACT Program comprehension is important process in software maintenance, considering the lifetime of an industrial software. The first task for a developer is to understand the structure and the behaviour of the program without considering the type of the changerefactoring, bugfix -must be performed on the source code. Understanding and debugging the source code is not straightforward in case of a dynamically typed functional programming language, like Erlang. Thus RefactorErl supports code comprehension through a Semantic Query Language that helps the developers to query semantic relationships in their software product