How to tell if effect is algebraic?
$begingroup$
I've read Bauer's What is algebraic about algebraic effects and handlers? and he talks about IO being an algebraic effect, even though it doesn't have any equations. In other papers on algebraic effects and handlers, people mention effects that are not algebraic, like backtracking. How does one can tell an algebraic effect apart from a non-algebraic one?
pl.programming-languages
$endgroup$
add a comment |
$begingroup$
I've read Bauer's What is algebraic about algebraic effects and handlers? and he talks about IO being an algebraic effect, even though it doesn't have any equations. In other papers on algebraic effects and handlers, people mention effects that are not algebraic, like backtracking. How does one can tell an algebraic effect apart from a non-algebraic one?
pl.programming-languages
$endgroup$
$begingroup$
Backtracking can be algebraic, at least most versions of it. Can you give an exact pointer to these claims?
$endgroup$
– Andrej Bauer
5 hours ago
add a comment |
$begingroup$
I've read Bauer's What is algebraic about algebraic effects and handlers? and he talks about IO being an algebraic effect, even though it doesn't have any equations. In other papers on algebraic effects and handlers, people mention effects that are not algebraic, like backtracking. How does one can tell an algebraic effect apart from a non-algebraic one?
pl.programming-languages
$endgroup$
I've read Bauer's What is algebraic about algebraic effects and handlers? and he talks about IO being an algebraic effect, even though it doesn't have any equations. In other papers on algebraic effects and handlers, people mention effects that are not algebraic, like backtracking. How does one can tell an algebraic effect apart from a non-algebraic one?
pl.programming-languages
pl.programming-languages
asked 8 hours ago
Jesper DahlJesper Dahl
192
192
$begingroup$
Backtracking can be algebraic, at least most versions of it. Can you give an exact pointer to these claims?
$endgroup$
– Andrej Bauer
5 hours ago
add a comment |
$begingroup$
Backtracking can be algebraic, at least most versions of it. Can you give an exact pointer to these claims?
$endgroup$
– Andrej Bauer
5 hours ago
$begingroup$
Backtracking can be algebraic, at least most versions of it. Can you give an exact pointer to these claims?
$endgroup$
– Andrej Bauer
5 hours ago
$begingroup$
Backtracking can be algebraic, at least most versions of it. Can you give an exact pointer to these claims?
$endgroup$
– Andrej Bauer
5 hours ago
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
The general answer which you do not want to hear is: an effect is algebraic if it can be described using operations and equations. The question is a bit open-ended and gives no hint as to what you're expecting, so perhaps you deserve such a useless answer.
Nevertheless, it's still good to know some typical examples, as they help you develop a feeling for things:
Continuations are not algebraic. That's important because there are effects that let you encode continuations, and so those are not aglebraic either. (But be careful about the meaning of "encode").
Delimited continuations are kind of algebraic, see Section 6.11 of "Programming with algebraic effects and handlers".
If your effect looks like you're passing around state of some sort, then it's likely algebraic.
Nondeterministic choice, search, etc., are typically algebraic.
Exception-like effects are algebraic (transactions of various sorts are included).
Anything that looks like communication (I/O, reader monad) is algebraic.
Probabilistic programming is algebraic.
Most useful effects fall under one of these cases. If I forgot anything, I am sure people will remind me in the comments.
$endgroup$
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "114"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcstheory.stackexchange.com%2fquestions%2f42431%2fhow-to-tell-if-effect-is-algebraic%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
The general answer which you do not want to hear is: an effect is algebraic if it can be described using operations and equations. The question is a bit open-ended and gives no hint as to what you're expecting, so perhaps you deserve such a useless answer.
Nevertheless, it's still good to know some typical examples, as they help you develop a feeling for things:
Continuations are not algebraic. That's important because there are effects that let you encode continuations, and so those are not aglebraic either. (But be careful about the meaning of "encode").
Delimited continuations are kind of algebraic, see Section 6.11 of "Programming with algebraic effects and handlers".
If your effect looks like you're passing around state of some sort, then it's likely algebraic.
Nondeterministic choice, search, etc., are typically algebraic.
Exception-like effects are algebraic (transactions of various sorts are included).
Anything that looks like communication (I/O, reader monad) is algebraic.
Probabilistic programming is algebraic.
Most useful effects fall under one of these cases. If I forgot anything, I am sure people will remind me in the comments.
$endgroup$
add a comment |
$begingroup$
The general answer which you do not want to hear is: an effect is algebraic if it can be described using operations and equations. The question is a bit open-ended and gives no hint as to what you're expecting, so perhaps you deserve such a useless answer.
Nevertheless, it's still good to know some typical examples, as they help you develop a feeling for things:
Continuations are not algebraic. That's important because there are effects that let you encode continuations, and so those are not aglebraic either. (But be careful about the meaning of "encode").
Delimited continuations are kind of algebraic, see Section 6.11 of "Programming with algebraic effects and handlers".
If your effect looks like you're passing around state of some sort, then it's likely algebraic.
Nondeterministic choice, search, etc., are typically algebraic.
Exception-like effects are algebraic (transactions of various sorts are included).
Anything that looks like communication (I/O, reader monad) is algebraic.
Probabilistic programming is algebraic.
Most useful effects fall under one of these cases. If I forgot anything, I am sure people will remind me in the comments.
$endgroup$
add a comment |
$begingroup$
The general answer which you do not want to hear is: an effect is algebraic if it can be described using operations and equations. The question is a bit open-ended and gives no hint as to what you're expecting, so perhaps you deserve such a useless answer.
Nevertheless, it's still good to know some typical examples, as they help you develop a feeling for things:
Continuations are not algebraic. That's important because there are effects that let you encode continuations, and so those are not aglebraic either. (But be careful about the meaning of "encode").
Delimited continuations are kind of algebraic, see Section 6.11 of "Programming with algebraic effects and handlers".
If your effect looks like you're passing around state of some sort, then it's likely algebraic.
Nondeterministic choice, search, etc., are typically algebraic.
Exception-like effects are algebraic (transactions of various sorts are included).
Anything that looks like communication (I/O, reader monad) is algebraic.
Probabilistic programming is algebraic.
Most useful effects fall under one of these cases. If I forgot anything, I am sure people will remind me in the comments.
$endgroup$
The general answer which you do not want to hear is: an effect is algebraic if it can be described using operations and equations. The question is a bit open-ended and gives no hint as to what you're expecting, so perhaps you deserve such a useless answer.
Nevertheless, it's still good to know some typical examples, as they help you develop a feeling for things:
Continuations are not algebraic. That's important because there are effects that let you encode continuations, and so those are not aglebraic either. (But be careful about the meaning of "encode").
Delimited continuations are kind of algebraic, see Section 6.11 of "Programming with algebraic effects and handlers".
If your effect looks like you're passing around state of some sort, then it's likely algebraic.
Nondeterministic choice, search, etc., are typically algebraic.
Exception-like effects are algebraic (transactions of various sorts are included).
Anything that looks like communication (I/O, reader monad) is algebraic.
Probabilistic programming is algebraic.
Most useful effects fall under one of these cases. If I forgot anything, I am sure people will remind me in the comments.
answered 5 hours ago
Andrej BauerAndrej Bauer
21.7k52102
21.7k52102
add a comment |
add a comment |
Thanks for contributing an answer to Theoretical Computer Science Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcstheory.stackexchange.com%2fquestions%2f42431%2fhow-to-tell-if-effect-is-algebraic%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
$begingroup$
Backtracking can be algebraic, at least most versions of it. Can you give an exact pointer to these claims?
$endgroup$
– Andrej Bauer
5 hours ago