Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 Examples  





2 Implementations  



2.1  Core Feature  





2.2  Full Support  





2.3  Partial Support and Prototypes  







3 References  



3.1  Textbook chapters  





3.2  Overview papers  







4 Further reading  














Effect system






Español
 

Edit links
 









Article
Talk
 

















Read
Edit
View history
 








Tools
   


Actions  



Read
Edit
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Cite this page
Get shortened URL
Download QR code
Wikidata item
 




Print/export  



Download as PDF
Printable version
 
















Appearance
   

 






From Wikipedia, the free encyclopedia
 


Incomputing, an effect system is a formal system that describes the computational effects of computer programs, such as side effects. An effect system can be used to provide a compile-time check of the possible effects of the program.

The effect system extends the notion of type to have an "effect" component, which comprises an effect kind and a region. The effect kind describes what is being done, and the region describes with what (parameters) it is being done.

An effect system is typically an extension of a type system. The term "type and effect system" is sometimes used in this case. Often, a type of a value is denoted together with its effect as type ! effect, where both the type component and the effect component mention certain regions (for example, a type of a mutable memory cell is parameterized by the label of the memory region in which the cell resides). The term "algebraic effect" follows from the type system.

Effect systems may be used to prove the external purity of certain internally impure definitions: for example, if a function internally allocates and modifies a region of memory, but the function's type does not mention the region, then the corresponding effect may be erased from the function's effect.[1]

Examples[edit]

Some examples of the behaviors that can be described by effect systems include:

From a programmer's point of view, effects are useful as it allows for separating the implementation (how) of specific actions from the specification of what actions to perform. For example, an ask name effect can read from either the console, pop a window, or just return a default value. The control flow can be described as a blend of yield (in that the execution continues) and throw (in that an unhandled effect propagates down until handled).[2]

Implementations[edit]

Core Feature[edit]

Full Support[edit]

Partial Support and Prototypes[edit]

References[edit]

  1. ^ Albin., Turbak, Franklyn (2010). Design concepts in programming languages. PHI Learning. ISBN 978-81-203-3996-5. OCLC 1261053520.{{cite book}}: CS1 maint: multiple names: authors list (link)
  • ^ Abramov, Dan. "Algebraic Effects for the Rest of Us". overreacted.io.
  • ^ "The Koka Manual". koka-lang.github.io.
  • ^ Pretnar, Matija (2021-12-07), Eff, retrieved 2021-12-11
  • ^ "The Unison language". www.unisonweb.org. Retrieved 2021-12-07.
  • ^ The Effekt research team. "Effekt Language: Concepts and Features". Effekt Language. Retrieved 2023-06-13.
  • ^ Vera, Josh (18 April 2020). "joshvera/freemonad-benchmark". GitHub. A benchmark comparing the performance of different free monad implementations.
  • ^ "OCaml - Language extensions". v2.ocaml.org. Retrieved 2023-06-13.
  • ^ "CanThrow Abilities". Scala Documentation. Retrieved 2021-12-07.
  • ^ "Java 8 Lambda function that throws exception?". Stack Overflow. Retrieved 2021-12-25.
  • ^ Macabeus, Bruno (16 September 2020). "macabeus/js-proposal-algebraic-effects: 📐Let there be algebraic effects in JS". GitHub.
  • Textbook chapters[edit]

    Overview papers[edit]

    Further reading[edit]


    Retrieved from "https://en.wikipedia.org/w/index.php?title=Effect_system&oldid=1207280398"

    Categories: 
    Program analysis
    Type theory
    Hidden categories: 
    CS1 maint: multiple names: authors list
    Articles with short description
    Short description matches Wikidata
    Articles lacking in-text citations from September 2010
    All articles lacking in-text citations
     



    This page was last edited on 14 February 2024, at 11:59 (UTC).

    Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



    Privacy policy

    About Wikipedia

    Disclaimers

    Contact Wikipedia

    Code of Conduct

    Developers

    Statistics

    Cookie statement

    Mobile view



    Wikimedia Foundation
    Powered by MediaWiki