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

Prototype mru #43

Closed
wants to merge 5 commits into from
Closed

Prototype mru #43

wants to merge 5 commits into from

Conversation

LinerSu
Copy link
Contributor

@LinerSu LinerSu commented Dec 15, 2021

  1. Prototype a simple update cache if the cache is empty.
  2. Prototype basic operations:
    • fold: add three examples;
    • expand: add two examples.

@LinerSu
Copy link
Contributor Author

LinerSu commented Jan 14, 2022

Details about my implementation, I made mru_region_domain class as a friend class of region_domain (also forward declare as well) because all the fields in the original implementation are private members. I think the friend class is the easier way to design so far.

include/crab/domains/mru_region_domain.hpp Outdated Show resolved Hide resolved
include/crab/domains/mru_region_domain.hpp Outdated Show resolved Hide resolved
include/crab/domains/mru_region_domain.hpp Show resolved Hide resolved
include/crab/domains/mru_region_domain.hpp Show resolved Hide resolved
include/crab/domains/mru_region_domain.hpp Outdated Show resolved Hide resolved
include/crab/domains/mru_region_domain.hpp Outdated Show resolved Hide resolved
include/crab/domains/mru_region_domain.hpp Outdated Show resolved Hide resolved
include/crab/domains/mru_region_domain.hpp Outdated Show resolved Hide resolved
include/crab/domains/mru_region_domain.hpp Outdated Show resolved Hide resolved
include/crab/domains/region_domain.hpp Outdated Show resolved Hide resolved
include/crab/domains/mru_region_domain.hpp Show resolved Hide resolved
include/crab/domains/mru_region_domain.hpp Show resolved Hide resolved
include/crab/domains/mru_region_domain.hpp Show resolved Hide resolved
include/crab/domains/mru_region_domain.hpp Show resolved Hide resolved
include/crab/domains/mru_region_domain.hpp Show resolved Hide resolved
// mem: { 1 <= V1 <= 2; V1 < V2; ... }
// The cache line will be:
// cache_lines: { 1 <= V1 <= 2; V1 < V2; }
void expand(const variable_t &rgn) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name expand already exists. I would call it differently. I would use a name like materialize so we use fold and materialize like in shape abstract domains.

include/crab/domains/mru_region_domain.hpp Show resolved Hide resolved
include/crab/domains/mru_region_domain.hpp Show resolved Hide resolved
include/crab/domains/mru_region_domain.hpp Show resolved Hide resolved
include/crab/domains/mru_region_domain.hpp Show resolved Hide resolved
@LinerSu
Copy link
Contributor Author

LinerSu commented Sep 21, 2023

new implementation on PR #60.

@LinerSu LinerSu closed this Sep 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants