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

#include-style Composability #63

Merged
merged 1 commit into from
Mar 2, 2025
Merged

Conversation

s-arash
Copy link
Owner

@s-arash s-arash commented Feb 10, 2025

Closes #44

Example usage:

mod my_sources {
    ascent::ascent_source! { tc:
        relation edge(usize, usize);
        relation path(usize, usize);
        path(x, y) <-- edge(x, y);
        path(x, z) <-- edge(x, y), path(y, z);
    }
}

ascent_source! { edges:
    edge(1, 2);
    edge(2, 3);
    edge(3, 4);
}

#[test]
fn include_ascent_source() {
    let res = ascent_run! {
        include_source!(my_sources::tc);

        include_source!(edges);        
    };

    assert!(res.path.iter().contains(&(1, 4)));
}

@s-arash s-arash mentioned this pull request Feb 10, 2025
@s-arash s-arash force-pushed the composability_include_style branch from cd4e717 to 3dc549c Compare February 10, 2025 05:13
@s-arash s-arash changed the title Composability include style #include-style Composability Feb 10, 2025
@s-arash s-arash force-pushed the composability_include_style branch 10 times, most recently from 7f05489 to 32033b8 Compare February 15, 2025 04:54
@s-arash s-arash marked this pull request as ready for review February 15, 2025 04:55
@s-arash s-arash force-pushed the composability_include_style branch 9 times, most recently from c649238 to f6f8476 Compare February 17, 2025 19:45
@s-arash s-arash force-pushed the composability_include_style branch 4 times, most recently from 51dd452 to 74a55c7 Compare March 2, 2025 17:31
as an `#include` style composability feature
@s-arash s-arash force-pushed the composability_include_style branch from 74a55c7 to b957d7c Compare March 2, 2025 17:54
@s-arash s-arash merged commit 3f4b2fd into master Mar 2, 2025
5 checks passed
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.

Composition Feature
1 participant