Permalink
Switch branches/tags
Nothing to show
Commits on May 20, 2012
  1. ignore purity script

    Stone Shi committed May 20, 2012
  2. run as escript

    Stone Shi committed May 20, 2012
  3. resolve version in .app file

    Stone Shi committed May 20, 2012
  4. add compile target to makefile

    Stone Shi committed May 20, 2012
  5. add rebar

    Stone Shi committed May 20, 2012
Commits on May 11, 2012
  1. Fix mutually recursive analysis. Closes #1

    mpitid committed May 11, 2012
    A bug fix in the digraph_utils:condensation/1 function in Erlang R15
    partially broke detection and analysis of mutually recursive functions.
    
    The fix accounts for R15 but is also backwards compatible with R14.
    
    Thanks to Stone Shi for spotting the bug.
Commits on Jul 21, 2011
  1. Minor cleanup

    mpitid committed Jul 21, 2011
  2. Rename README file to show properly on github

    mpitid committed Jul 21, 2011
    The github markup parser requires an .asciidoc extension.
  3. Merge module/PLT branch into dev

    mpitid committed Jul 21, 2011
Commits on Jul 19, 2011
  1. Get rid of the module map altogether

    mpitid committed Jul 19, 2011
    It is rarely used and can always be calculated on the fly when it is
    needed. It should have never been a part of the PLT in the first place.
  2. Fix bug when analysing changed modules

    mpitid committed Jul 19, 2011
    The changed modules themselves were not included in the list of affected
    modules (unless they were part of some loop).
  3. Minor refactoring

    mpitid committed Jul 19, 2011
  4. Optimise aspects of PLT handling

    mpitid committed Jul 19, 2011
    Only keep a simple reverse map of modules and find reachable modules
    upon request. This saves both space and time (since we only reach for
    the modules requested).
    
    When analysing changed files, use pfiles instead of files.
    
    Run checksum verification in parallel. This is still the biggest
    bottlenecks in PLT loading.
  5. Analyse actual dependencies, not the whole PLT

    mpitid committed Jul 18, 2011
    Optimise analysis in the presence of a PLT. Only analyse the necessary
    dependencies, and not the whole PLT as past versions did. This cannot
    always be avoided however, for instance when there is no result table
    present for the specific set of options. Another problem is when the PLT
    is to be updated. In this case, extract only those functions which are
    still unresolved in the result table.
    
    Take the opportunity to decouple the first stage of the analysis from
    the PLT and any analysis options, since neither is actually necessary.
    Move these dependencies to the propagation stage instead. Change to more
    descriptive function names in the collect module.
    
    Add functions to export a PLT into a form more suitable for debugging,
    as well as a plain text file.
    
    Refactor the timing functions and move them into the utils module,
    allowing them to be used by external scripts, etc.
    
    Add a PLT test script to test the new analysis and PLT update scheme, as
    well as cover most of the new PLT code.
    
    The analysis runs much faster now when analysing a small set of modules
    against a large PLT. The remaining bottlenecks are the PLT loading and
    updating functions, which have a much smaller impact and can also be
    aided by caching at the operating system level (the loading part).
Commits on Jul 17, 2011
  1. Stop execution on outdated PLT

    mpitid committed Jul 17, 2011
    Shutdown cleanly whenever an outdated PLT is loaded, instead of crashing
    with a badmatch.
Commits on Jul 11, 2011
  1. Fix module reference in parallel scan

    mpitid committed Jul 11, 2011
    Not detected beacause of a stray stale beam in the path.
  2. Move distinct analysis phases to separate modules

    mpitid committed Jul 11, 2011
    Move information gathering and value propagation to separate modules.
    The purity module will only provide the external API of the application,
    and any functions which do not fit into either of the two stages.
Commits on Jul 8, 2011
  1. Update copyright notice

    mpitid committed Jul 8, 2011
  2. Minor refactoring, update TODO

    mpitid committed Jul 8, 2011
    Also update is_pure/2 to work on the new values.
  3. Make use of the purelevel option

    mpitid committed Jul 6, 2011
    Map values to either pure or impure based on the purelevel option, for
    some type of backwards compatibility.
  4. Remove macros from remote types

    mpitid committed Jul 5, 2011
    EDoc does not expand macros in type specs, thus creating invalid links
    between remote types.
  5. Remove @spec from docstrings

    mpitid committed Jul 5, 2011
    EDoc can now extract type specifications from -spec.
  6. Add new termination test case

    mpitid committed Jul 5, 2011
    Make sure that erlang:apply/3 is handled correctly in termination
    analysis.
  7. Remove old implementations completely

    mpitid committed Jul 5, 2011
    Replace old implementations with their new counterparts.
  8. Update specs

    mpitid committed Jul 5, 2011
    Also refactor purity_cli slightly, and remove leftover old purity_utils
    dependencies.
  9. Fix bug in termination analysis

    mpitid committed Jul 5, 2011
    Setting all BIFs as terminating is wrong. Part of this is fixed now,
    namely honoring dependency lists and unresolvable BIFs. Still there is
    work to be done here, since the current approach cannot express other
    types of non-terminating BIFs at the moment.
    
    This is not very serious in the sense that any such BIFs are most likely
    impure functions too (e.g. port calls), so there should be no impact on
    the combined results of the analysis (which is the ultimate goal), just
    the termination part.
    
    Note also that two commits ago a significant fix went unnoticed. Some
    BIFs were not properly converted to the new values for termination
    (those marked with `false' in the cheat sheets), and were erroneously
    marked as non-terminating.
  10. Update values of predefined BIFs

    mpitid committed Jul 5, 2011
    Switch values to the new format, and add convenience functions in the
    generated module.
    
    Built-ins whose purity cannot be statically determined (like
    erlang:apply/3) are marked specifically as unknown. This changes the
    results for dependent functions slightly, but should not otherwise
    influence the analysis results (the are still impure from a conservative
    standpoint).
    
    Fix minor omissions, and remove obsolete test case for combined analysis.
  11. Update plt and utils

    mpitid committed Jul 4, 2011
    For the moment rewrite into separate modules for easier testing.
    
    Besides updating any relevant functions to work on the new values of
    purity, there have been some minor enhancements and fixes.
    
    For instance, the PLT update function did not check that the caches it
    kept were consistent. Also, the dependency resolution of affected
    modules was not correct, as it only took into account direct
    dependencies.
  12. Minor fix

    mpitid committed Jul 3, 2011
    Keep track of indirect HOFs even if they are marked as unknown because
    not all of the passed arguments are ultimately resolved. This should not
    have any impact on analysis results, besides slightly more refined
    values.
  13. Clean up code from previous algorithm

    mpitid committed Jun 30, 2011
    Remove most of the code in purity and related tests. There should still
    be left over code in other modules I suppose.
Commits on Jun 30, 2011
  1. Update broken test

    mpitid committed Jun 30, 2011
    The termination result of m/2 in test/higher was incorrectly left to
    `s', instead of the more accurate `>= p [1]'. While there is no
    difference in practice, the significance lies in telling apart recursion
    (which is resolved correctly here) from unhandled HOFs.
    
    The issue was uncovered because the recursion removal functions of the
    previous algorithm did not work on unhandled HOFs.
  2. Refactor detection of recursive functions

    mpitid committed Jun 30, 2011
    Don't depend on code from the old termination algorithm. This makes for
    a simpler and cleaner implementation.
  3. Optimise contamination loop

    mpitid committed Jun 30, 2011
    Achieve significant speedup in contamination (8x for termination
    analysis and ~1.5x for purity analysis) by keeping track of the working
    set as a nested list with possible duplicates, instead of an ordered
    set.
    
    Since the working set is not used in the inner loop, only incremented,
    it is possible to move the working set invariant (list of unique
    functions) to the outer loop, where it is actually used.
    
    Performance is now similar (if not better) to the old algorithm.