Skip to content

Finer regionality #1815

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

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from
Draft

Finer regionality #1815

wants to merge 12 commits into from

Conversation

riaqn
Copy link
Contributor

@riaqn riaqn commented Sep 8, 2023

Based on #1760

Currently the Regionality axis has three levels: global, regional and local. This PR generalizes it to natural numbers 0, 1, 2, ... where 0 means global, 1 means the top level, and so on. For example:

let local_ x = "hello"
let foo () = 
  let z = "foo" in 
  let local_ y = ref z in 
  ()

z is 0, y is 2. x would be 1, but it will be rejected because we force top-level to be global.

Moreover, Regionality is indexed as follows:

Regionality 1 = {0, 1}
Regionality 2 = {0, 1, 2}
...

The essential idea is that, by indexing, we can avoid talking about Regionality = 6 when we are only in 5 layers of nested regions. This is essential for some morphisms to have adjoints.

Note that the index starts at 1 instead of 0 - this is also essential for some morphisms to have adjoints. Intuitively, some adjunctions lose meanings if there is only "global" and no local to talk about.

@riaqn riaqn force-pushed the finer-regionality branch from 22138e3 to c9b8439 Compare September 8, 2023 14:53
@riaqn riaqn force-pushed the finer-regionality branch 2 times, most recently from 5ddda88 to f8041db Compare September 18, 2023 14:44
@riaqn riaqn force-pushed the finer-regionality branch 2 times, most recently from 43c7653 to ee03963 Compare October 5, 2023 13:33
@riaqn riaqn force-pushed the finer-regionality branch 3 times, most recently from 85c62ec to 1052a1a Compare October 19, 2023 16:27
@riaqn riaqn force-pushed the finer-regionality branch 2 times, most recently from 38ba15a to f04327e Compare October 30, 2023 14:52
@riaqn riaqn mentioned this pull request Nov 4, 2023
@riaqn riaqn force-pushed the finer-regionality branch from 286c83d to b7b7f6b Compare November 6, 2023 11:29
@riaqn riaqn force-pushed the finer-regionality branch from b7b7f6b to 6fcc449 Compare November 7, 2023 11:07
@riaqn riaqn force-pushed the finer-regionality branch from 6fcc449 to 1673253 Compare November 7, 2023 11:16
@riaqn riaqn mentioned this pull request Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants