12 research outputs found

    Quoted Staged Rewriting: A Practical Approach to Library-Defined Optimizations

    Get PDF
    Staging has proved a successful technique for programmatically removing code abstractions, thereby allowing for faster program execution while retaining a high-level interface for the programmer. Unfortunately, techniques based on staging suffer from a number of problems — ranging from practicalities to fundamental limitations — which have prevented their widespread adoption. We introduce Quoted Staged Rewriting (QSR), an approach that uses type-safe, pattern matching-enabled quasiquotes to define optimizations. The approach is “staged” in two ways: first, rewrite rules can execute arbitrary code during pattern matching and code reconstruction, leveraging the power and flexibility of staging; second, library designers can orchestrate the application of successive rewriting phases (stages). The advantages of using quasiquote-based rewriting are that library designers never have to deal directly with the intermediate representation (IR), and that it allows for non-intrusive optimizations — in contrast with staging, it is not necessary to adapt the entire library and user programs to accommodate optimizations. We show how Squid, a Scala macro-based framework, enables QSR and renders library-defined optimizations more practical than ever before: library designers write domain-specific optimizers that users invoke transparently on delimited portions of their code base. As a motivating example we describe an implementation of stream fusion (a well-known deforestation technique) that is both simpler and more powerful than the state of the art, and can readily be used by Scala programmers with no knowledge of metaprogramming

    Relationship between Module Size, Alternative Cost and Bugs

    Get PDF
    Selle lõputöö eesmärgiks on uurida, kas alternatiivkulu (AC) ja mooduli suurus viivad suurema vigade arvuni tarkvaraprojektis. Kasutades nelja tarkvaraprojekti – JQuery, Font-Awesome, ReactJS ja Atom – versiooniajaloost ja vearaportitest eraldatud andmeid, arvutame me nende alternatiivkulud. Seejärel kasutame me Kendalli korrelatsiooni, et uurida AC ja vigade ning mooduli suuruse (mõõdetuna koodiridades) ja vigade vahelise seose tugevust. Me leidsime, et moodulite suuruse ja vigade vahel on tugev korrelatsioon kõigis neljas tarkvaraprojektis. Samas AC ja vigade vaheline seos jäi tõendamata. Oma uurimusest järeldame, et tarkvaraprojekti kvaliteeditagamise tegevuste käigus tuleks suurtele moodulitele pöörata rohkem tähelepanu. Alternatiivkulu ei ole oluline vigade asukoha tuvastamiseks.The aim of this thesis is to find out if Alternative Cost (AC) and size of modules lead to more bugs in a software project. Using the historical churn extracted from revisions data and bug reports data retrieved from four software projects namely, JQuery, Font-Awesome, ReactJS, and Atom, we calculate their AC. After which we use Kendall correlation to investigate the strength of association between AC and bugs, and module size (measured in Lines of Code) and bugs. We find a strong association between size of modules in all four software projects and bugs existing in them, while that of AC and bugs remain inconclusive. From our investigation, we conclude that when quality assurance activities are performed on a software project, modules with larger size should be given more attention. On the other hand, using our result, Alternative Cost is not relevant for bugs localization
    corecore