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

Exclusive branches in diamond call graphs #10

Open
tilk opened this issue Jan 15, 2024 · 2 comments
Open

Exclusive branches in diamond call graphs #10

tilk opened this issue Jan 15, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@tilk
Copy link
Member

tilk commented Jan 15, 2024

Suppose we have a code like this:

@def_method(m, method1):
def _():
    method3(m)

@def_method(m, method2):
def _():
    method3(m)

with Transaction().body(m):
    with m.If(foo):
        method1(m)
    with m.Else():
        method2(m)

Currently, an exception "Method 'method3' can't be called twice from the same transaction" will be raised. But these calls are on syntactically different branches, so they could technically be allowed.

@tilk tilk added the enhancement New feature or request label Jan 15, 2024
@tilk tilk self-assigned this Jan 15, 2024
@tilk
Copy link
Member Author

tilk commented Jan 16, 2024

This will require a small redesign of the Transactron core. Currently, method calls are analyzed on direct caller level (methods and transactions which directly call a given method). To solve this issue, they need to by analyzed at transaction level (transitive calls through multiple methods).

@tilk tilk transferred this issue from kuznia-rdzeni/coreblocks Nov 25, 2024
@tilk
Copy link
Member Author

tilk commented Nov 25, 2024

This branch in Coreblocks contains a work in progress for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant