Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Object domain #44

Draft
wants to merge 69 commits into
base: dev
Choose a base branch
from
Draft

New Object domain #44

wants to merge 69 commits into from

Commits on Apr 4, 2023

  1. Configuration menu
    Copy the full SHA
    a59aaf3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    14bd9cb View commit details
    Browse the repository at this point in the history
  3. feat(domains): added implementation of decoupled domains

    The decoupled domain allows crab to use two different domains during
    the two different phases of the analysis.  In the descending
    (narrowing) phase it is possible to use an abstract domain which is
    more precise than the domain used in the ascending (widening) phase.
    
    The decoupled domains require two new abstract operations
    is_asc_phase() and set_phase() in order to manage ascending and
    descending phases. By default, start in *descending* (i.e., more
    precise) phase. The interleaved fixpoint iterator has been also
    modified to notify the underlying domains when there is change of
    (ascending or descending) phase.
    
    Implemented by Greta Dolcetti and Enea Zaffanella.
    gretadolcetti authored and caballa committed Apr 4, 2023
    Configuration menu
    Copy the full SHA
    746e98f View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    382954d View commit details
    Browse the repository at this point in the history

Commits on Apr 6, 2023

  1. Configuration menu
    Copy the full SHA
    eec17d4 View commit details
    Browse the repository at this point in the history
  2. chore: added comments

    caballa committed Apr 6, 2023
    Configuration menu
    Copy the full SHA
    75ad004 View commit details
    Browse the repository at this point in the history

Commits on Apr 12, 2023

  1. Configuration menu
    Copy the full SHA
    d455de8 View commit details
    Browse the repository at this point in the history

Commits on Apr 14, 2023

  1. perf(domains): use of stats

    We minimize string allocation and copies.  Also, we add some macros
    that allow each domain to turn on or off statistics collection which
    adds a counter and a timer per operation. If stats collection is off
    then no string allocation or string copy should take place.
    
    For instance, the region domain enables stats by adding
    
    #define REGION_DOMAIN_SCOPED_STATS(NAME) CRAB_DOMAIN_SCOPED_STATS(NAME, 1)
    
    And the interval domain disables stats by adding
    
    #define INTERVALS_DOMAIN_SCOPED_STATS(NAME) CRAB_DOMAIN_SCOPED_STATS(NAME, 0)
    
    The macro CRAB_DOMAIN_SCOPED_STATS is defined in
    crab/domains/abstract_domain_macros.def
    
    In spite of all optimizations, the most efficient thing is to disable
    stats collection. By default, only the fixpoint solver and the region
    domain turn on stats. This is okay because stats gathering is a
    feature intended only for developers. If needed then the developer can
    turn on more stats timers and counters and recompile the code.
    caballa committed Apr 14, 2023
    Configuration menu
    Copy the full SHA
    e60a688 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ce9040f View commit details
    Browse the repository at this point in the history
  3. feat(inter-analysis): integreate dsa info into callsite information

    Giving a method to group region variables passed/returned between
    caller and callee based on dsa intrinsics. The information is precomputed
    before the analysis and stored into callsite_info class for further
    abstract operations of calls.
    LinerSu committed Apr 14, 2023
    Configuration menu
    Copy the full SHA
    5809692 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    9fbd979 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    7a4f9ac View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    f94420d View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    bea59ff View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    9ac250a View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    996acc5 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    77fe2c9 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    1564f79 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    0a18025 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    bb49656 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    55448c6 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    f049fe1 View commit details
    Browse the repository at this point in the history
  16. fix(obj-dom): fix leq op

    LinerSu committed Apr 14, 2023
    Configuration menu
    Copy the full SHA
    5131b13 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    15dcaa0 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    7e83479 View commit details
    Browse the repository at this point in the history
  19. fix(obj-dom): fix update object info map

    In crab IR, region initialization / copy occurs before intrinsic calls.
    The object info is required for each abstract object so that
    we need to initialize that info for object not informed by
    intrinsic calls.
    LinerSu committed Apr 14, 2023
    Configuration menu
    Copy the full SHA
    56be83f View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    f72e6f2 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    a4c8e32 View commit details
    Browse the repository at this point in the history
  22. feat(object): add implementation of cache, address, and regs doms

    The abstract domain is based on memory abstraction which models
    memory architecture with cache. Each abstract object contains a
    cache that precisely materializes memory load / store. The cache
    only records the most recently used by load/store instructions.
    The current cache size is one so that any loads / stores for
    non mru object require to commit and update cache subdomain.
    
    In the implementation, we also includes an alias analysis that abstracts
    references alias properties. That is, we only know two references are
    alias according to the DSA analysis. Such info are stored in an EUF domain.
    LinerSu committed Apr 14, 2023
    Configuration menu
    Copy the full SHA
    1923e26 View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    a0659a0 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    b810dd1 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    430ad71 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    be8551a View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    27f73ea View commit details
    Browse the repository at this point in the history
  28. fix(object): convert term to term op for comparison

    We use UF domain to represent base addresses.
    The caches in given two states refer the same MRU object if the base addresses of caches refer the same symbol in the uf domain.
    The symbol is actually a term operator in crab. The comparison is based
    on the value of operator but not the term.
    Yusen authored and LinerSu committed Apr 14, 2023
    Configuration menu
    Copy the full SHA
    b8ddf4d View commit details
    Browse the repository at this point in the history
  29. feat(object): add reduction operator between cache and base subdomains

    Introduce a new redution operator (transfer function) that reduce equalities
    between registers and fields in the cache. The reduction can be either adding
    constraints for registers into base domain or adding constraints for fields
    into corresponding cache domain.
    LinerSu committed Apr 14, 2023
    Configuration menu
    Copy the full SHA
    882e835 View commit details
    Browse the repository at this point in the history
  30. feat(object): add intrinsic method to perform reduction

    The object domain can handle an intrinsic reduction named:
    crab_intrinsic(do_reduction,@V_1:region,V_2:ref,V_3:bool);
    where V_1 is a region and V_2 is a reference. The V_3 indicates
    the direction for reduction. The value of V_3 is true(false) will
    perform reduction from cache to base (from base to cache).
    LinerSu committed Apr 14, 2023
    Configuration menu
    Copy the full SHA
    25b0303 View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    de76773 View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    6ec6ccd View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    f86721a View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    9b342db View commit details
    Browse the repository at this point in the history
  35. fix(object): fix assign address map in join/meet and treat noop when …

    …object is top
    Yusen authored and LinerSu committed Apr 14, 2023
    Configuration menu
    Copy the full SHA
    d1b6258 View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    620c353 View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    02c8fec View commit details
    Browse the repository at this point in the history
  38. Configuration menu
    Copy the full SHA
    4233faf View commit details
    Browse the repository at this point in the history
  39. feat(object): use ghost variables to express reference with extra inf…

    …ormation
    
    Since object domain can express relations between fields in more expressive
    way, we also want to deal with pointer analysis such as is-dereferenceable.
    The requirement for this check is using ghost variables to convey pointer
    information: offset and size.
    
    In object domain, now each typed variable such as region or reference
    are now having at least one ghost variables with fixed naming.
    This is also guarentee the efficiency for creating and manipulating
    such variables.
    LinerSu committed Apr 14, 2023
    Configuration menu
    Copy the full SHA
    95dd51c View commit details
    Browse the repository at this point in the history
  40. Configuration menu
    Copy the full SHA
    f15f309 View commit details
    Browse the repository at this point in the history
  41. Configuration menu
    Copy the full SHA
    7bb15bb View commit details
    Browse the repository at this point in the history
  42. Configuration menu
    Copy the full SHA
    57244f9 View commit details
    Browse the repository at this point in the history
  43. feat(object): implement forget, project, rename domain operators

    Based on subdomains we have right now, we need to distinguish three
    types of variables: variables in base domain, reference variables,
    and fields variables used in odi map.
    
    Once we have this classification, the operators can be performed based
    on each subdomain: base domain, address domain, uf register domain,
    and (summary domain, cache domain, uf field domain) in odi map.
    LinerSu committed Apr 14, 2023
    Configuration menu
    Copy the full SHA
    681f497 View commit details
    Browse the repository at this point in the history
  44. Configuration menu
    Copy the full SHA
    251f16b View commit details
    Browse the repository at this point in the history
  45. Configuration menu
    Copy the full SHA
    38f8a41 View commit details
    Browse the repository at this point in the history
  46. Configuration menu
    Copy the full SHA
    3dbd186 View commit details
    Browse the repository at this point in the history
  47. Configuration menu
    Copy the full SHA
    30c8aca View commit details
    Browse the repository at this point in the history
  48. Configuration menu
    Copy the full SHA
    670d641 View commit details
    Browse the repository at this point in the history
  49. Configuration menu
    Copy the full SHA
    0107251 View commit details
    Browse the repository at this point in the history
  50. fix(object): fix join / meet for singleton objects

    This commit fixes the issue of join / meet when two states
    contain singleton objects. Two states with singleton objects
    where they might refer the same object (with same address),
    or they are different. Therefore, join of two singleton objects
    will become a non-singleton object if they are different.
    LinerSu committed Apr 14, 2023
    Configuration menu
    Copy the full SHA
    014c48f View commit details
    Browse the repository at this point in the history
  51. Configuration menu
    Copy the full SHA
    7074ddb View commit details
    Browse the repository at this point in the history
  52. fix: update object info after join / meet

    If odi map is used, the object is not singleton. Therefore,
    any join / meet over non-singleton objects require to commit caches
    if necessary. If committed, we also need to reset caches as empty.
    LinerSu committed Apr 14, 2023
    Configuration menu
    Copy the full SHA
    50b8e46 View commit details
    Browse the repository at this point in the history
  53. feat(object-domain): flag to move singleton to base domain

    - change global object-id map (locate) function to local
    - add efficient join / meet operations on odi map
    LinerSu committed Apr 14, 2023
    Configuration menu
    Copy the full SHA
    26c4a09 View commit details
    Browse the repository at this point in the history
  54. Configuration menu
    Copy the full SHA
    37621a7 View commit details
    Browse the repository at this point in the history
  55. feat(domain): a symbolic variable equality domain

    A symbolic equality domain is an abstract domain which represents equalities
    used in analyses for allocation-site abstraction or domain reduction.
    In short, giving two program variables are known to hold equal values in concrete semantics
    if the analyzer determines that the variables hold equal symbolic term.
    LinerSu committed Apr 14, 2023
    Configuration menu
    Copy the full SHA
    b11d700 View commit details
    Browse the repository at this point in the history
  56. feat(domain): an environement map domain storing object odi

    A special seperate domain for odi map. Especially, it covers
    different cases during domain operations such as join or meet.
    LinerSu committed Apr 14, 2023
    Configuration menu
    Copy the full SHA
    9060bc2 View commit details
    Browse the repository at this point in the history
  57. Configuration menu
    Copy the full SHA
    b9350d8 View commit details
    Browse the repository at this point in the history
  58. Configuration menu
    Copy the full SHA
    7989f98 View commit details
    Browse the repository at this point in the history
  59. Configuration menu
    Copy the full SHA
    2a3ecb2 View commit details
    Browse the repository at this point in the history
  60. Configuration menu
    Copy the full SHA
    f7074f1 View commit details
    Browse the repository at this point in the history

Commits on Apr 18, 2023

  1. refactor(params): change doamin reduction params with multiple options

    object.reduction_level=FULL_REDUCTION to perform reduction before
    each transfer function;
    object.reduction_level=REDUCTION_BEFORE_CHECK to perform
    reduction only before assertion;
    object.reduction_level=NO_REDUCTION for no reduction.
    LinerSu committed Apr 18, 2023
    Configuration menu
    Copy the full SHA
    a8adf96 View commit details
    Browse the repository at this point in the history
  2. refactor(domain): refactor domains for inferring object invariants

    - `object_domain`: avoid deep copy during updating odi values;
    support new statistics; refactor cache operations.
    - `odi_map_domain`: perform cache flushing before join / meet
    each odi value; refactor cache operations.
    - `symbolic equality domain`: supports new join operation in
    quadratic running time
    LinerSu committed Apr 18, 2023
    Configuration menu
    Copy the full SHA
    464d617 View commit details
    Browse the repository at this point in the history