-
Notifications
You must be signed in to change notification settings - Fork 42
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
Tracking control-flow linearity for effect handlers #1173
Merged
Merged
Changes from all commits
Commits
Show all changes
76 commits
Select commit
Hold shift + click to select a range
0adf01d
Some attempts on fixing issue 1161:
thwfhk 421c2a8
some tests for the usage of linear variables in handlers
thwfhk 769e047
clean up comments
thwfhk d204c5a
Fix a bug that params of parameterised handlers can escape the scope …
thwfhk 3207347
clean up comments
thwfhk 2ba1870
clean up comments
thwfhk cb11dea
deal with linear variables in the return clauses of handlers; add mor…
thwfhk 1d5a151
initial attempt to track control-flow linearity:
thwfhk 2f69150
more proof of concept implementation
thwfhk b38ed56
Fix and improve the naive implementation of tracking control-flow
thwfhk 8445815
Improve syntax and fix bugs:
thwfhk 68821d4
some minor updates
thwfhk 9e7b867
comments
thwfhk e99585b
merge with polymorphic operations
thwfhk b95faa7
Merge branch 'master' into control-flow-linearity
thwfhk 0d9599a
pass all the linear handler tests
thwfhk 24bb4c7
fix the unification of rows with subkinds
thwfhk 834f8e0
improve the choose_and_state examples
thwfhk aa5d797
syntax for lincase
thwfhk ecc51eb
fix the linearity checking of unbound continuation
thwfhk 003d517
a potential bug
thwfhk e087edc
remove some test files
thwfhk d45d20a
comment some unused functions
thwfhk bbac798
nullary operations & some lib function signatures
thwfhk 65e4b6d
fix typo in core/typeSugar.ml
thwfhk 712e229
remove dead code
thwfhk b6e19f9
remove dead code
thwfhk 25b5ec4
remove dead code in core/typeSugar.ml
thwfhk b5dfc75
Update core/types.mli
thwfhk f9885e4
use DeclaredLinearity.t instead of ad hoc boolean in the definition o…
thwfhk f8de147
wrap the linear continuation things in typeSugar.ml into a module
thwfhk b1a361d
add a flag track-control-flow-linearity
thwfhk 909c599
something
thwfhk 682a5c4
modify the pretty printing for effect rows
thwfhk 19d67dd
modify the pretty printing for function types
thwfhk a85105b
modify the parser and printer; try to keep the round-tripping property
thwfhk 445ae32
something
thwfhk c902696
a mess
thwfhk 626cbd2
some attempts to make default Any
thwfhk 20ced3e
add a test example
thwfhk e67293a
successfully make Any as the default of effect row vars
thwfhk 1e801bc
clean up some tests
thwfhk df3e053
fix a bug of the effect vars of curried functions
thwfhk 1b57295
fix some bugs (including the parsing of effect presence types)
thwfhk cc632ab
need to explicitly say Presence(Any)
thwfhk 91ae333
compatibility with old handler tests
thwfhk e9e3bf8
Merge branch 'cfl-linear-default' into control-flow-linearity
thwfhk c525c04
postpone something, but equivalent
thwfhk c9eba50
more printing compatibility
thwfhk b98378a
more tests
thwfhk 5796f26
Merge remote-tracking branch 'upstream/control-flow-linearity' into c…
thwfhk 2615823
add a readme
thwfhk 7b9a8c2
update the syntax of presence variables
thwfhk ed2c26c
some backward compatibility
thwfhk 6086c36
update the documentation
thwfhk 0235d3e
typo
thwfhk dd43b18
Merge remote-tracking branch 'upstream/master' into control-flow-line…
thwfhk 366aaaf
update document
thwfhk 0d3c5b9
Fixed a stupid and hard-to-find bug about flattening effect types, wh…
thwfhk 6b741ee
update the original handlers test
thwfhk 5d5fa5e
update the original typecheck_examples test
thwfhk 6d9c0fa
update tests and compatibility document
thwfhk 6ba486d
update tests and compatibility document
thwfhk 436bc16
trim trailing whitespaces
thwfhk f8e5218
remove some test comments
thwfhk 29a0605
add more test cases on usage of linear resources in handlers
thwfhk 55ab6c5
try to enable automatic xlin, but it seems to be not very useful
thwfhk 3728cee
fix a testcase
thwfhk 7202caa
add more CFL tests
thwfhk ee943ba
modify the type signatures of some library functions
thwfhk fc00331
fix a test case because APs are unlimited
thwfhk 0f10124
give a more flexible type to the prelude function fork
thwfhk 8336bf3
more tests
thwfhk 29e7eec
remove a redundant line
thwfhk 5413bca
more tests from the paper
thwfhk f17866c
remove a doc file
thwfhk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets leave as-is for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Though, I see that you have changed the signature of
SessionFail
below... I would be inclined not to change any of the session exceptions stuff.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have to change the
SessionFail
operation to be linear to make the functions inprelude.links
well-typed. Otherwise we would get a type error because we use the unlimited operationSessionFail
with linear channels. I also need to change some signatures of functions inlib.ml
, because by defaulte::Row
ise::Row(Unl,Any)
, which can only be unified with linear operations.This is also a challenge for hiding this feature behind a new flag; it is not entirely compatible with the current Links syntax.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see... The settings logic does allow you specify transitive dependencies, so if session exceptions are toggled, then you can forcibly toggle linear continuations too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually it is fine to not toggle control_flow_linearity, but we still need to make sure that the existing library code is compatible with it. FOr example, using unlimited row variable
e::Row(Any, Any)
by default and use the linear operation signature=@
forSessionFail
.