8 research outputs found

    Trustworthy Refactoring via Decomposition and Schemes: A Complex Case Study

    Get PDF
    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

    Séma alapú refaktoráló DSL adaptálása objektumorientált programozási nyelvre

    Get PDF
    Refaktorálásnak azokat a forráskód-transzformációkat nevezzük, amelyek úgy javítanak a szoftver valamely nemfunkcionális jellemzőjén, hogy közben a program jelentését nem változtatják meg. Az átalakítások jelentésmegtartó tulajdonságát egy alkalmasan megválasztott ekvivalenciadefiníció függvényében vizsgálhatjuk. Számos specifikus nyelv létezik programátírások megadására, ezek leegyszerűsítik a transzformációk formális megfogalmazását és ellenőrzését. A legtöbb megoldás a mikrolépésekre bontáson és a leírható átírások körének megszorításán alapul. A funkcionális paradigmához elérhető olyan nyelv, amelyben szemantikus átírási sémákra lehet visszavezetni bonyolult programátalakításokat úgy, hogy a megfogalmazott átalakítások helyességéről formális érvelés adható. Dolgozatomban ennek egy objektumelvű paradigmára való adaptálási lehetőségét mutatom be a Java programozási nyelven keresztül. Ehhez ismertetek egy intuitív jelentésfogalmat közelítő, többszintű ekvivalenciadefiníciót; meghatározok a célparadigma absztrakcióit karakterizáló, elsősorban előfeltételek megadásához használható szemantikus függvényeket és predikátumokat; illetve azonosítok új refaktorálási sémákat. Az így konstruált prototípust egy komplex refaktorálási szabály dekomponálására és formális definiálására használom fel, végül az előálló mikroátalakítások működését egy konkrét programon illusztrálom

    SyTeCi: Automating Contextual Equivalence for Higher-Order Programs with References

    Get PDF
    International audienc

    A Language-Independent Proof System for Full Program Equivalence

    Get PDF
    International audienceTwo programs are mutually equivalent if, for the same input, either they both diverge or they both terminate with the same result. Mutual equivalence is an adequate notion of equivalence for programs written in deterministic languages. It is useful in many contexts, such as capturing the correctness of program transformations within the same language, or capturing the correctness of compilers between two different languages. In this paper we introduce a language-independent proof system for mutual equivalence, which is para-metric in the operational semantics of two languages and in a state-similarity relation. The proof system is sound: if it terminates then it establishes the mutual equivalence of the programs given to it as input. We illustrate it on two programs in two different languages (an imperative one and a functional one), that both compute the Collatz sequence. The Collatz sequence is an interesting case study since it is not known wether the sequence terminates or not; nevertheless, our proof system shows that the two programs are mutually equivalent (even if we cannot establish termination or divergence of either one)
    corecore