Knowledge (XXG)

Continuation

Source đź“ť

43: 365:, by providing the basic, low-level primitive which unifies these seemingly unconnected patterns. Continuations can provide elegant solutions to some difficult high-level problems, like programming a web server that supports multiple pages, accessed by the use of the forward and back buttons and by following links. The 286:
Say you're in the kitchen in front of the refrigerator, thinking about a sandwich. You take a continuation right there and stick it in your pocket. Then you get some turkey and bread out of the refrigerator and make yourself a sandwich, which is now sitting on the counter. You invoke the continuation
272:
First-class continuations are a language's ability to completely control the execution order of instructions. They can be used to jump to a function that produced the call to the current function, or to a function that has previously exited. One can think of a first-class continuation as saving the
1634:
protocol. In the traditional model of web programming, the lack of state is reflected in the program's structure, leading to code constructed around a model that lends itself very poorly to expressing computational problems. Thus continuations enable code that has the useful properties associated
1999:
in "The Proper Treatment of Quantification in Ordinary English" (PTQ), writing that "with the benefit of hindsight, a limited form of continuation-passing is clearly discernible at the core of Montague’s (1973) PTQ treatment of NPs as generalized quantifiers".
333:. This means that each function consumes a function that represents the rest of the computation relative to this function call. To return a value, the function calls this "continuation function" with a return value; to abort the computation it returns a value. 163:) the program control state, i.e. the continuation is a data structure that represents the computational process at a given point in the process's execution; the created data structure can be accessed by the programming language, instead of being hidden in the 340:
gain the expressive power to manipulate the flow of control in arbitrary ways. The cost is that they must maintain the invariants of control and continuations by hand, which can be a highly complex undertaking (but see 'continuation-passing style' below).
296:(e.g., an object on the heap), and rather than calling a "make sandwich" routine and then returning, the person called a "make sandwich with current continuation" routine, which creates the sandwich and then continues where execution left off. 2166:
Haynes, C. T., Friedman, D. P., and Wand, M. 1984. Continuations and coroutines. In Proceedings of the 1984 ACM Symposium on LISP and Functional Programming (Austin, Texas, United States, August 06–08, 1984). LFP '84. ACM, New York, NY,
287:
in your pocket, and you find yourself standing in front of the refrigerator again, thinking about a sandwich. But fortunately, there's a sandwich on the counter, and all the materials used to make it are gone. So you eat it. :-)
1639:, while avoiding its problems. "Inverting back the inversion of control or, Continuations versus page-centric programming" is a paper that provides a good introduction to continuations applied to web programming. 2413:
Technical Monograph PRG-11. Oxford University Computing Laboratory. January 1974. Reprinted in Higher Order and Symbolic Computation, 13(1/2):135—152, 2000, with a foreword by Christopher P. Wadsworth.
1735:
statement, and the same caveats apply. While they are a sensible option in some special cases such as web programming, use of continuations can result in code that is difficult to follow. In fact, the
1881: 1827: 1993: 1939: 1707:
remaining computation at a given point in the program and provide no way of delimiting this capture. Delimited continuation operators address this by providing two separate control mechanisms: a
1302:
for this, which allows for flexibility at a higher cost for allocating and deallocating memory. Both of these implementations have benefits and drawbacks in the context of continuations.
1771:(e.g., the fact that the QNP "everyone" behaves very differently from the non-quantificational noun phrase "Bob" in contributing towards the meaning of a sentence like "Alice sees "), 186:" or "continuation of the computation step" is the continuation that, from the perspective of running code, would be derived from the current point in a program's execution. The term 2466:
AI Memo 349, MIT Artificial Intelligence Laboratory, Cambridge, Massachusetts, December 1975. Reprinted in Higher-Order and Symbolic Computation 11(4):405-439, 1998, with a foreword.
1659:(for Jump) operator that could transfer the flow of control back into the middle of a procedure invocation. Re-invocable continuations have also been called "re-entrant" in the 391:
to another, provided the second function lies deeper in the stack (if it is waiting for the first function to return, possibly among others). Other more complex examples include
1747:
as one of its features solely because expressions involving it "tend to be hopelessly difficult to track down." The external links below illustrate the concept in more detail.
210:
in September 1964. Wijngaarden spoke at the IFIP Working Conference on Formal Language Description Languages held in Baden bei Wien, Austria. As part of a formulation for an
2502:
Proceedings of the 1988 ACM conference on LISP and Functional Programming, pp. 124–131, 1988. Journal version: Higher-Order and Symbolic Computation, 12(1):7-45, 1999.
2357:
Report. UNIVAC Systems Programming Research. August 1965. Reprinted in Higher Order and Symbolic Computation, 11(2):125-143, 1998, with a foreword by Hayo Thielecke.
372:
web framework uses continuations to great effect, allowing one to program the web server in procedural style, by switching continuations when switching pages.
2544: 2423:
Proceedings of 25th ACM National Conference, pp. 717–740, 1972. Reprinted in Higher-Order and Symbolic Computation 11(4):363-397, 1998, with a foreword.
1298:
for storing the variables needed because it allows for fast and simple allocating and automatic deallocation of memory. Other programming languages use a
2647: 1339:: "sign up the rest of method as the continuation, and then return to your caller immediately; the task will invoke the continuation when it completes." 3121: 1651:
continuations if a continuation may be invoked repeatedly (even after it has already returned). Re-invocable continuations were introduced by
1674:
that may be used to escape the current context to a surrounding one. Many languages which do not explicitly support continuations support
2989: 2656: 2522: 198:
the ability to save the execution state at any point and return to that point at a later point in the program, possibly multiple times.
1476: 247: 2576: 2003:
The extent to which continuations can be used to explain other general phenomena in natural language is a topic of current research.
126: 2596: 2559: 2065:, a type of object which allows selectable continuations (called 'callouts') to be set for methods on a per-object basis, through 3076: 2610: 2730: 2601: 2220: 3197: 3071: 2640: 2012: 1744: 1591: 1587: 1529: 1487: 1362: 1358: 1324: 755: 468: 444: 303: 160: 148: 64: 1582:
and manually implement call/cc. (In continuation-passing style, call/cc becomes a simple function that can be written with
2323: 1832: 1778: 1367: 107: 2849: 2670: 2443: 2109:
could serve as an interpreter for LISP, promptly hand coded it, and we now had a programming language with an interpreter.
1944: 1890: 1737: 1660: 1524: 1482: 1467: 1409: 1386: 1345: 464: 420: 299: 60: 31: 79: 1507: 424: 412: 172: 2735: 1498: 1454: 1396: 1382: 432: 416: 388: 251: 2823: 2177: 218:, though he did not use this name, and his intention was to simplify a program and thus make its result more clear. 86: 3217: 2879: 2700: 2027: 2017: 1579: 1571: 1435: 400: 337: 330: 215: 53: 3222: 3172: 2934: 2633: 1550: 1418: 1299: 452: 2484:
Proceedings of the ACM SIGPLAN '90 Conference on Programming Language Design and Implementation, pp. 66–77.
2430:
Proceedings of Second Colloquium on Automata, Languages, and Programming. LNCS Vol. 14, pp. 141–156, 1974.
3277: 3141: 2720: 428: 380: 2406: 1294:
A program must allocate space in memory for the variables its functions use. Most programming languages use a
225: 93: 1763:
some linguistic expressions (in particular, QNPs ) have denotations that manipulate their own continuations.
3272: 2818: 2538: 2307: 2195: 1756: 350: 207: 2143: 1663:
language. However this use of the term "re-entrant" can be easily confused with its use in discussions of
329:. These models rely on programmers or semantics engineers to write mathematical functions in the so-called 3333: 3302: 2974: 2944: 2919: 2859: 2758: 2690: 2047: 2042: 1696: 1427: 448: 314: 241: 237: 75: 3338: 3202: 3096: 3061: 2949: 2924: 2768: 2685: 2568: 2505: 1689: 1117: 1723:. Continuations captured using delimited operators thus only represent a slice of the program context. 1547:; in most modern Smalltalk environments continuations can be implemented without additional VM support. 1286:
This is AAA 0 Hello from BBB 0 This is AAA 1 Hello from BBB 1 This is AAA 2 Hello from BBB 2 ...
2435: 3187: 2994: 2773: 2491: 2402: 2392: 2066: 1636: 221: 195: 2620: 2477: 3267: 3182: 3126: 3029: 3014: 2984: 2964: 2939: 2808: 2793: 240:
that makes extensive use of continuations to allow sequential programs to be analysed in terms of
167:. Continuations are useful for encoding other control mechanisms in programming languages such as 3312: 3237: 3212: 3177: 3157: 3086: 3066: 3004: 2999: 2909: 2899: 2884: 2828: 2469: 1675: 1664: 369: 362: 168: 2252:(2003) Inverting back the inversion of control or, Continuations versus page-centric programming 1310:
Many programming languages exhibit first-class continuations under various names; specifically:
3292: 3247: 3232: 3192: 3131: 3101: 3081: 2874: 2803: 2495: 281:– only the execution context. This is illustrated by the "continuation sandwich" description: 2124: 2104: 3297: 3227: 3116: 2894: 2416: 1996: 1627: 408: 229: 156: 140: 3106: 3009: 2904: 2869: 2614: 2580: 2573: 2563: 2327: 2057: 1685: 1652: 1623: 1583: 471:(abbreviated as: call/cc) with which a Scheme program can manipulate the flow of control: 326: 322: 164: 100: 2510:
Inverting back the inversion of control or, Continuations versus page-centric programming
1678:, which is equivalent to escape continuations and can be used for the same purposes. C's 277:
state of the program. True first-class continuations do not save program data – unlike a
2264: 3287: 3282: 3207: 3091: 2969: 2864: 2705: 2556: 2473: 2455: 2360: 2331: 2251: 1680: 1607: 1575: 1403: 2625: 3327: 2979: 2954: 2788: 2374: 2364: 278: 2621:
Comparison of generators, coroutines, and continuations, source of the above example
2607: 3242: 3034: 2914: 2798: 2778: 2487: 2388: 2350: 2336:
ed. Chris Barker and Pauline Jacobson, pp. 132-163, Oxford University Press, 2007).
2032: 1340: 436: 358: 152: 17: 2282: 3162: 3136: 3019: 2783: 2710: 2384: 2379:
A Model for Control Structures for Artificial Intelligence Programming Languages
2320: 1314: 318: 307: 42: 3307: 2959: 2725: 2680: 2675: 2459: 1767:
Barker argued that this hypothesis could be used to explain phenomena such as
1400: 1295: 767: 1116:
The functions defined above allow for defining and executing threads through
3111: 2929: 2854: 2833: 2763: 2715: 2695: 2227: 2037: 1995:). He also observed that this idea is in a way just a natural extension of 1540: 1377: 392: 366: 354: 176: 1610:
is needed because in continuation-passing style no function ever returns;
1318: 3024: 2813: 2591: 2022: 1740: 1647:
Support for continuations varies widely. A programming language supports
1559: 1449: 211: 2550: 2528: 349:
Continuations simplify and clarify the implementation of several common
2569:
On-line proceedings of the Second ACM SIGPLAN Workshop on Continuations
2557:
On-line proceedings of the Fourth ACM SIGPLAN Workshop on Continuations
2525: 2062: 1775:(e.g., that "a raindrop fell on every car" is interpreted typically as 384: 255: 214:
preprocessor, he called for a transformation of proper procedures into
2585: 1887:(that a sentence like "someone saw everyone" may be ambiguous between 302:
was the first full production system providing first "catch" and then
1328: 440: 396: 1445: 2889: 766:
This example shows a possible usage of continuations to implement
2482:
Representing Control in the Presence of First-Class Continuations
2199: 1000:;;; This yields the processor to another thread, if there is one. 2532: 2421:
Definitional Interpreters for Higher-Order Programming Languages
2052: 1732: 1631: 1471: 1441: 1373: 778:;;; It holds a list of continuations "waiting to run". 680:; stores the current continuation (which will print 4 next) away 404: 2629: 2411:
Continuations: a Mathematical semantics for handling full jumps
2397:
A Universal Modular Actor Formalism for Artificial Intelligence
1566:, the flow control operation for call with current continuation 313:
Continuations are also used in models of computation including
1120:, i.e. threads that yield control to the next one in a queue: 36: 1060:;;; This terminates the current thread, or the entire program 619:
Using the above, the following code block defines a function
1622:
One area that has seen practical use of continuations is in
264:
gives a complete history of the discovery of continuations.
1626:. The use of continuations shields the programmer from the 1406:(requires bytecode manipulation at runtime or compile time) 1125:;;; The body of some typical Scheme thread that does stuff: 2547:
by Dorai Sitaram features a nice chapter on continuations.
2089: 2087: 2085: 2083: 584:; The next time the-continuation is called, we start here. 2428:
On the Relation between Direct and Continuation Semantics
292:
In this description, the sandwich is part of the program
27:
Representation of the control state of a computer program
1590:, where it is easy to construct a "continuation-passing 1964: 1910: 1852: 1798: 1688:. Escape continuations can also be used to implement 206:
The earliest description of continuations was made by
2330:(Continuations Workshop 2004), or Chung-chieh Shan, 1947: 1893: 1876:{\displaystyle \exists r\forall c,{\mbox{fell}}(r,c)} 1835: 1822:{\displaystyle \forall c\exists r,{\mbox{fell}}(r,c)} 1781: 1755:
In "Continuations and the nature of quantification",
1988:{\displaystyle \forall y\exists x,{\mbox{saw}}(x,y)} 1934:{\displaystyle \exists x\forall y,{\mbox{saw}}(x,y)} 527:; a continuation variable representing this point in 524:; call/cc calls its first function argument, passing 3260: 3150: 3054: 3047: 2842: 2751: 2744: 2663: 2464:
SCHEME: An Interpreter for Extended Lambda Calculus
1731:Continuations are the functional expression of the 467:programming language includes the control operator 336:Functional programmers who write their programs in 67:. Unsourced material may be challenged and removed. 2178:"Call with current continuation for C programmers" 1987: 1933: 1875: 1821: 754:For a gentler introduction to this mechanism, see 536:; In this case, the function argument assigns that 3122:Segmented discourse representation theory (SDRT) 539:; continuation to the variable the-continuation. 1759:introduced the "continuation hypothesis", that 1233:;;; Create two threads, and start them running. 530:; the program as the argument to that function. 2308:Continuations and the nature of quantification 1684:are also equivalent: they can only be used to 1586:.) This is a particularly common strategy in 377:"continuations provide an elegant description" 236:into prominence in their work in the field of 2641: 2310:, 2002 Natural Language Semantics 10:211-242. 1711:that delimits a continuation operation and a 8: 2512:SIGPLAN Notices 38(2), pp. 57–64, 2003. 1283:The previous code will produce this output: 937:;;; This starts a new thread running (proc). 2500:Implementation Strategies for Continuations 2144:"undo()? ("continuation sandwich" example)" 387:can be used to jump from the middle of one 3051: 2748: 2648: 2634: 2626: 2196:"Reading list on XML and Web Programming" 1963: 1946: 1909: 1892: 1851: 1834: 1797: 1780: 746:; uses the previously stored continuation 627:to the future execution state of itself: 127:Learn how and when to remove this message 2093: 1695:One generalization of continuations are 775:;;; A naive queue for thread scheduling. 261: 250:invented the continuation in his second 2617:from the RIFE web application framework 2604:from the RIFE web application framework 2079: 1063:;;; if there are no other threads left. 2592:https://wiki.haskell.org/Continuations 1578:, it is possible to write programs in 3077:Discourse representation theory (DRT) 306:. Bruce Duba introduced call/cc into 7: 2608:Debugging continuations in pure Java 2545:Teach Yourself Scheme in Fixnum Days 2355:A Generalization of Jumps and Labels 2221:"Web Programming with Continuations" 65:adding citations to reliable sources 2990:Quantificational variability effect 2657:Formal semantics (natural language) 2586:http://okmij.org/ftp/continuations/ 2283:"The Unlambda Programming Language" 194:, which are constructs that give a 2551:Continuations and Stackless Python 2436:"The discoveries of continuations" 1954: 1948: 1900: 1894: 1842: 1836: 1788: 1782: 375:More complex constructs for which 25: 2574:Continuation, functions and jumps 2321:Continuations in Natural Language 1463:continue(aContinuation, anyValue) 2263:Quigley, John (September 2007). 1321:. One can also use custom macros 41: 2319:See for example Chris Barker, 2148:perl.perl6.language (newsgroup) 1570:In any language which supports 1341:Asynchronous Programming for C# 52:needs additional citations for 3072:Combinatory categorial grammar 2529:Workshop on Continuations 2011 2142:Palmer, Luke (June 29, 2004). 2013:Call-with-current-continuation 1982: 1970: 1928: 1916: 1870: 1858: 1816: 1804: 1745:call-with-current-continuation 1699:. Continuation operators like 1530:call-with-current-continuation 1488:call-with-current-continuation 756:call-with-current-continuation 469:call-with-current-continuation 1: 2850:Antecedent-contained deletion 2539:Continuations for Curmudgeons 2444:LISP and Symbolic Computation 2369:The Conniver Reference Manual 2334:(in "Direct compositionality, 2265:"Computational Continuations" 1738:esoteric programming language 258:, though he did not name it. 190:can also be used to refer to 159:. A continuation implements ( 32:Continuation (disambiguation) 1306:Programming language support 379:also exist. For example, in 2371:MIT AI Memo 259. May 1972. 1997:Richard Montague's approach 1670:A more limited kind is the 3355: 2731:Syntax–semantics interface 2602:Continuations in pure Java 2434:Reynolds, John C. (1993). 2105:S.R. Russell noticed that 2028:Continuation-passing style 1606:library). The support for 1580:continuation-passing style 1436:continuation-passing style 1266:"Hello from BBB" 338:continuation-passing style 331:continuation-passing style 216:continuation-passing style 29: 3223:Question under discussion 3173:Conversational scoreboard 2950:Intersective modification 2935:Homogeneity (linguistics) 1602:monad transformer in the 1551:Standard ML of New Jersey 1477:_continuation.continulets 713:; resets the-continuation 435:(starting in 1.9.1); the 268:First-class continuations 192:first-class continuations 3278:Distributional semantics 2597:Rhino With Continuations 2407:Christopher P. Wadsworth 1512:scala.util.continuations 1122: 1118:cooperative multitasking 772: 629: 473: 226:Christopher P. Wadsworth 3273:Computational semantics 3015:Subsective modification 2819:Propositional attitudes 2332:Linguistic Side Effects 1697:delimited continuations 1545:Continuation currentDo: 1533:(commonly shortened to 1491:(commonly shortened to 1393:operator: coexpressions 1248:"This is AAA" 254:implementation for the 208:Adriaan van Wijngaarden 149:abstract representation 3303:Philosophy of language 2945:Inalienable possession 2925:Free choice inferences 2920:Faultless disagreement 2691:Generalized quantifier 2125:"Steve "Slug" Russell" 2048:Denotational semantics 2043:Delimited continuation 1989: 1935: 1877: 1823: 1765: 1614:calls are tail calls. 449:functional programming 315:denotational semantics 290: 242:functional programming 238:denotational semantics 3203:Plural quantification 3097:Inquisitive semantics 3062:Alternative semantics 2182:Community-Scheme-Wiki 1990: 1936: 1878: 1824: 1769:duality of NP meaning 1761: 1690:tail call elimination 770:as separate threads. 283: 3188:Function application 2995:Responsive predicate 2985:Privative adjectives 2403:Christopher Strachey 2067:Dependency Injection 1945: 1891: 1833: 1779: 1637:inversion of control 1594:" (for example, the 1438:for all control flow 740:another-continuation 692:another-continuation 222:Christopher Strachey 196:programming language 184:current continuation 61:improve this article 30:For other uses, see 3268:Cognitive semantics 3183:Existential closure 3127:Situation semantics 3030:Temperature paradox 3000:Rising declaratives 2965:Modal subordination 2940:Hurford disjunction 2900:Discourse relations 2553:by Christian Tismer 2250:Christian.Queinnec 1672:escape continuation 1555:SMLofNJ.Cont.callcc 1361:: The Continuation 427:(starting in 2.8); 423:; continuations in 165:runtime environment 18:First class control 3313:Semantics of logic 3238:Strict conditional 3213:Quantifier raising 3178:Downward entailing 3158:Autonomy of syntax 3087:Generative grammar 3067:Categorial grammar 3005:Scalar implicature 2910:Epistemic modality 2885:De dicto and de re 2613:2021-05-16 at the 2579:2010-12-02 at the 2562:2010-12-02 at the 2506:Christian Queinnec 2426:John C. Reynolds. 2326:2007-08-24 at the 2184:. 12 October 2008. 1985: 1968: 1931: 1914: 1873: 1856: 1819: 1802: 1773:scope displacement 1676:exception handling 1618:In Web development 1391:create, suspend, @ 1368:Control.Monad.Cont 363:exception handling 3321: 3320: 3293:Logic translation 3256: 3255: 3248:Universal grinder 3233:Squiggle operator 3193:Meaning postulate 3132:Supervaluationism 3102:Intensional logic 3082:Dynamic semantics 3043: 3042: 2875:Crossover effects 2824:Tense–aspect–mood 2804:Lexical semantics 1967: 1913: 1855: 1801: 1715:operator such as 1608:proper tail calls 1576:proper tail calls 1378:haxe-continuation 232:brought the term 137: 136: 129: 111: 16:(Redirected from 3346: 3298:Linguistics wars 3228:Semantic parsing 3117:Montague grammar 3052: 2895:Deontic modality 2749: 2736:Truth conditions 2671:Compositionality 2664:Central concepts 2650: 2643: 2636: 2627: 2588:by Oleg Kiselyov 2452: 2440: 2417:John C. Reynolds 2338: 2317: 2311: 2304: 2298: 2297: 2295: 2293: 2278: 2272: 2271: 2269: 2260: 2254: 2248: 2242: 2241: 2239: 2238: 2232: 2226:. Archived from 2225: 2217: 2211: 2210: 2208: 2207: 2198:. Archived from 2192: 2186: 2185: 2174: 2168: 2164: 2158: 2157: 2155: 2154: 2139: 2133: 2132: 2129:Computer History 2121: 2115: 2111:—John McCarthy, 2102: 2096: 2091: 1994: 1992: 1991: 1986: 1969: 1965: 1940: 1938: 1937: 1932: 1915: 1911: 1882: 1880: 1879: 1874: 1857: 1853: 1828: 1826: 1825: 1820: 1803: 1799: 1722: 1718: 1702: 1686:unwind the stack 1683: 1605: 1601: 1597: 1565: 1556: 1546: 1536: 1532: 1521: 1517: 1513: 1504: 1494: 1490: 1479: 1464: 1460: 1433: 1424: 1419:JavaScript Rhino 1415: 1392: 1370: 1355: 1351: 1338: 1334: 1279: 1276: 1273: 1270: 1267: 1264: 1263:do-stuff-n-print 1261: 1258: 1255: 1252: 1249: 1246: 1245:do-stuff-n-print 1243: 1240: 1237: 1234: 1231: 1228: 1225: 1222: 1219: 1216: 1213: 1210: 1207: 1204: 1201: 1198: 1195: 1192: 1189: 1186: 1183: 1180: 1177: 1174: 1171: 1168: 1165: 1162: 1159: 1156: 1153: 1150: 1147: 1144: 1141: 1138: 1137:do-stuff-n-print 1135: 1132: 1129: 1126: 1112: 1109: 1106: 1103: 1100: 1097: 1094: 1091: 1088: 1085: 1082: 1079: 1076: 1073: 1070: 1067: 1064: 1061: 1058: 1055: 1052: 1049: 1046: 1043: 1040: 1037: 1034: 1031: 1028: 1025: 1022: 1019: 1016: 1013: 1010: 1007: 1004: 1001: 998: 995: 992: 989: 986: 983: 980: 977: 974: 971: 968: 965: 962: 959: 956: 953: 950: 947: 944: 941: 938: 935: 932: 929: 926: 923: 920: 917: 914: 911: 908: 905: 902: 899: 896: 893: 890: 887: 884: 881: 878: 875: 872: 869: 866: 863: 860: 857: 854: 851: 848: 845: 842: 839: 836: 833: 830: 827: 824: 821: 818: 815: 812: 809: 806: 803: 800: 797: 794: 791: 788: 785: 782: 779: 776: 750: 747: 744: 741: 738: 735: 732: 729: 726: 725:the-continuation 723: 720: 717: 714: 711: 708: 705: 702: 699: 696: 695:the-continuation 693: 690: 687: 684: 681: 678: 675: 672: 669: 668:the-continuation 666: 663: 660: 657: 654: 653:the-continuation 651: 648: 645: 642: 639: 636: 633: 626: 625:the-continuation 622: 615: 612: 609: 606: 603: 600: 597: 594: 591: 588: 585: 582: 579: 576: 573: 572:the-continuation 570: 567: 564: 561: 558: 555: 552: 549: 546: 543: 540: 537: 534: 531: 528: 525: 522: 519: 516: 513: 510: 507: 504: 501: 498: 495: 492: 489: 486: 483: 482:the-continuation 480: 477: 409:Stackless Python 230:John C. Reynolds 157:computer program 141:computer science 132: 125: 121: 118: 112: 110: 69: 45: 37: 21: 3354: 3353: 3349: 3348: 3347: 3345: 3344: 3343: 3324: 3323: 3322: 3317: 3252: 3146: 3107:Lambda calculus 3039: 3010:Sloppy identity 2970:Opaque contexts 2905:Donkey anaphora 2870:Counterfactuals 2838: 2740: 2659: 2654: 2615:Wayback Machine 2581:Wayback Machine 2564:Wayback Machine 2519: 2492:Anne Hartheimer 2451:(3/4): 233–248. 2438: 2433: 2393:Richard Steiger 2347: 2345:Further reading 2342: 2341: 2328:Wayback Machine 2318: 2314: 2305: 2301: 2291: 2289: 2281:Madore, David. 2280: 2279: 2275: 2267: 2262: 2261: 2257: 2249: 2245: 2236: 2234: 2230: 2223: 2219: 2218: 2214: 2205: 2203: 2194: 2193: 2189: 2176: 2175: 2171: 2165: 2161: 2152: 2150: 2141: 2140: 2136: 2123: 2122: 2118: 2113:History of LISP 2103: 2099: 2092: 2081: 2076: 2058:Spaghetti stack 2009: 1943: 1942: 1889: 1888: 1885:scope ambiguity 1831: 1830: 1829:rather than as 1777: 1776: 1753: 1729: 1720: 1716: 1700: 1679: 1653:Peter J. Landin 1645: 1624:Web programming 1620: 1603: 1599: 1595: 1563: 1554: 1544: 1534: 1528: 1519: 1515: 1511: 1502: 1492: 1486: 1475: 1462: 1458: 1431: 1422: 1413: 1390: 1366: 1353: 1349: 1336: 1332: 1308: 1292: 1287: 1281: 1280: 1277: 1274: 1271: 1268: 1265: 1262: 1259: 1256: 1253: 1250: 1247: 1244: 1241: 1238: 1235: 1232: 1229: 1226: 1223: 1220: 1217: 1214: 1211: 1208: 1205: 1202: 1199: 1196: 1193: 1190: 1187: 1184: 1181: 1178: 1175: 1172: 1169: 1166: 1163: 1160: 1157: 1154: 1151: 1148: 1145: 1142: 1139: 1136: 1133: 1130: 1127: 1124: 1114: 1113: 1110: 1107: 1104: 1101: 1098: 1095: 1092: 1089: 1086: 1083: 1080: 1077: 1074: 1071: 1068: 1065: 1062: 1059: 1056: 1053: 1050: 1047: 1044: 1041: 1038: 1035: 1032: 1029: 1026: 1023: 1020: 1017: 1014: 1011: 1008: 1005: 1002: 999: 996: 993: 990: 987: 984: 981: 978: 975: 972: 969: 966: 963: 960: 957: 954: 951: 948: 945: 942: 939: 936: 933: 930: 927: 924: 921: 918: 915: 912: 909: 906: 903: 900: 897: 894: 891: 888: 885: 882: 879: 876: 873: 870: 867: 864: 861: 858: 855: 852: 849: 846: 843: 840: 837: 834: 831: 828: 825: 822: 819: 816: 813: 810: 807: 804: 801: 798: 795: 792: 789: 786: 783: 780: 777: 774: 764: 752: 751: 748: 745: 742: 739: 736: 733: 730: 727: 724: 721: 718: 715: 712: 709: 706: 703: 700: 697: 694: 691: 688: 685: 682: 679: 676: 673: 670: 667: 664: 661: 658: 655: 652: 649: 646: 643: 640: 637: 634: 631: 624: 620: 617: 616: 613: 610: 607: 604: 601: 598: 595: 592: 589: 586: 583: 580: 577: 574: 571: 568: 565: 562: 559: 556: 553: 550: 547: 544: 541: 538: 535: 532: 529: 526: 523: 520: 517: 514: 511: 508: 505: 502: 499: 496: 493: 490: 487: 484: 481: 478: 475: 461: 351:design patterns 347: 327:lambda calculus 323:process calculi 270: 262:Reynolds (1993) 204: 133: 122: 116: 113: 70: 68: 58: 46: 35: 28: 23: 22: 15: 12: 11: 5: 3352: 3350: 3342: 3341: 3336: 3326: 3325: 3319: 3318: 3316: 3315: 3310: 3305: 3300: 3295: 3290: 3288:Inferentialism 3285: 3283:Formal grammar 3280: 3275: 3270: 3264: 3262: 3258: 3257: 3254: 3253: 3251: 3250: 3245: 3240: 3235: 3230: 3225: 3220: 3215: 3210: 3208:Possible world 3205: 3200: 3195: 3190: 3185: 3180: 3175: 3170: 3165: 3160: 3154: 3152: 3148: 3147: 3145: 3144: 3139: 3134: 3129: 3124: 3119: 3114: 3109: 3104: 3099: 3094: 3092:Glue semantics 3089: 3084: 3079: 3074: 3069: 3064: 3058: 3056: 3055:Formal systems 3049: 3045: 3044: 3041: 3040: 3038: 3037: 3032: 3027: 3022: 3017: 3012: 3007: 3002: 2997: 2992: 2987: 2982: 2980:Polarity items 2977: 2972: 2967: 2962: 2957: 2952: 2947: 2942: 2937: 2932: 2927: 2922: 2917: 2912: 2907: 2902: 2897: 2892: 2887: 2882: 2877: 2872: 2867: 2865:Conservativity 2862: 2857: 2852: 2846: 2844: 2840: 2839: 2837: 2836: 2831: 2829:Quantification 2826: 2821: 2816: 2811: 2806: 2801: 2796: 2791: 2786: 2781: 2776: 2771: 2766: 2761: 2755: 2753: 2746: 2742: 2741: 2739: 2738: 2733: 2728: 2723: 2718: 2713: 2708: 2706:Presupposition 2703: 2698: 2693: 2688: 2683: 2678: 2673: 2667: 2665: 2661: 2660: 2655: 2653: 2652: 2645: 2638: 2630: 2624: 2623: 2618: 2605: 2599: 2594: 2589: 2583: 2571: 2566: 2554: 2548: 2542: 2536: 2518: 2517:External links 2515: 2514: 2513: 2503: 2485: 2478:Carl Bruggeman 2474:R. Kent Dybvig 2467: 2456:Gerald Sussman 2453: 2431: 2424: 2414: 2400: 2382: 2372: 2361:Drew McDermott 2358: 2346: 2343: 2340: 2339: 2312: 2306:Chris Barker, 2299: 2287:www.madore.org 2273: 2255: 2243: 2212: 2187: 2169: 2159: 2134: 2116: 2097: 2078: 2077: 2075: 2072: 2071: 2070: 2060: 2055: 2050: 2045: 2040: 2035: 2030: 2025: 2020: 2015: 2008: 2005: 1984: 1981: 1978: 1975: 1972: 1962: 1959: 1956: 1953: 1950: 1930: 1927: 1924: 1921: 1918: 1908: 1905: 1902: 1899: 1896: 1872: 1869: 1866: 1863: 1860: 1850: 1847: 1844: 1841: 1838: 1818: 1815: 1812: 1809: 1806: 1796: 1793: 1790: 1787: 1784: 1752: 1749: 1728: 1725: 1681:setjmp/longjmp 1665:multithreading 1644: 1641: 1630:nature of the 1619: 1616: 1568: 1567: 1557: 1548: 1538: 1522: 1505: 1496: 1480: 1465: 1452: 1439: 1425: 1416: 1407: 1394: 1380: 1371: 1356: 1343: 1322: 1307: 1304: 1291: 1290:Implementation 1288: 1285: 1123: 773: 763: 760: 630: 474: 460: 457: 407:; tasklets in 346: 343: 269: 266: 203: 200: 135: 134: 76:"Continuation" 49: 47: 40: 26: 24: 14: 13: 10: 9: 6: 4: 3: 2: 3351: 3340: 3337: 3335: 3334:Continuations 3332: 3331: 3329: 3314: 3311: 3309: 3306: 3304: 3301: 3299: 3296: 3294: 3291: 3289: 3286: 3284: 3281: 3279: 3276: 3274: 3271: 3269: 3266: 3265: 3263: 3259: 3249: 3246: 3244: 3241: 3239: 3236: 3234: 3231: 3229: 3226: 3224: 3221: 3219: 3216: 3214: 3211: 3209: 3206: 3204: 3201: 3199: 3196: 3194: 3191: 3189: 3186: 3184: 3181: 3179: 3176: 3174: 3171: 3169: 3166: 3164: 3161: 3159: 3156: 3155: 3153: 3149: 3143: 3140: 3138: 3135: 3133: 3130: 3128: 3125: 3123: 3120: 3118: 3115: 3113: 3110: 3108: 3105: 3103: 3100: 3098: 3095: 3093: 3090: 3088: 3085: 3083: 3080: 3078: 3075: 3073: 3070: 3068: 3065: 3063: 3060: 3059: 3057: 3053: 3050: 3046: 3036: 3033: 3031: 3028: 3026: 3023: 3021: 3018: 3016: 3013: 3011: 3008: 3006: 3003: 3001: 2998: 2996: 2993: 2991: 2988: 2986: 2983: 2981: 2978: 2976: 2975:Performatives 2973: 2971: 2968: 2966: 2963: 2961: 2958: 2956: 2955:Logophoricity 2953: 2951: 2948: 2946: 2943: 2941: 2938: 2936: 2933: 2931: 2928: 2926: 2923: 2921: 2918: 2916: 2913: 2911: 2908: 2906: 2903: 2901: 2898: 2896: 2893: 2891: 2888: 2886: 2883: 2881: 2878: 2876: 2873: 2871: 2868: 2866: 2863: 2861: 2858: 2856: 2853: 2851: 2848: 2847: 2845: 2841: 2835: 2832: 2830: 2827: 2825: 2822: 2820: 2817: 2815: 2812: 2810: 2807: 2805: 2802: 2800: 2797: 2795: 2792: 2790: 2789:Evidentiality 2787: 2785: 2782: 2780: 2777: 2775: 2772: 2770: 2767: 2765: 2762: 2760: 2757: 2756: 2754: 2750: 2747: 2743: 2737: 2734: 2732: 2729: 2727: 2724: 2722: 2719: 2717: 2714: 2712: 2709: 2707: 2704: 2702: 2699: 2697: 2694: 2692: 2689: 2687: 2684: 2682: 2679: 2677: 2674: 2672: 2669: 2668: 2666: 2662: 2658: 2651: 2646: 2644: 2639: 2637: 2632: 2631: 2628: 2622: 2619: 2616: 2612: 2609: 2606: 2603: 2600: 2598: 2595: 2593: 2590: 2587: 2584: 2582: 2578: 2575: 2572: 2570: 2567: 2565: 2561: 2558: 2555: 2552: 2549: 2546: 2543: 2540: 2537: 2534: 2530: 2527: 2524: 2521: 2520: 2516: 2511: 2507: 2504: 2501: 2497: 2493: 2489: 2486: 2483: 2479: 2475: 2471: 2468: 2465: 2461: 2457: 2454: 2450: 2446: 2445: 2437: 2432: 2429: 2425: 2422: 2418: 2415: 2412: 2408: 2404: 2401: 2398: 2394: 2390: 2386: 2383: 2380: 2376: 2375:Daniel Bobrow 2373: 2370: 2366: 2365:Gerry Sussman 2362: 2359: 2356: 2352: 2349: 2348: 2344: 2337: 2333: 2329: 2325: 2322: 2316: 2313: 2309: 2303: 2300: 2288: 2284: 2277: 2274: 2270:. p. 38. 2266: 2259: 2256: 2253: 2247: 2244: 2233:on 2012-09-05 2229: 2222: 2216: 2213: 2202:on 2010-06-14 2201: 2197: 2191: 2188: 2183: 2179: 2173: 2170: 2163: 2160: 2149: 2145: 2138: 2135: 2130: 2126: 2120: 2117: 2114: 2110: 2108: 2101: 2098: 2095: 2094:Reynolds 1993 2090: 2088: 2086: 2084: 2080: 2073: 2068: 2064: 2061: 2059: 2056: 2054: 2051: 2049: 2046: 2044: 2041: 2039: 2036: 2034: 2031: 2029: 2026: 2024: 2021: 2019: 2016: 2014: 2011: 2010: 2006: 2004: 2001: 1998: 1979: 1976: 1973: 1960: 1957: 1951: 1925: 1922: 1919: 1906: 1903: 1897: 1886: 1867: 1864: 1861: 1848: 1845: 1839: 1813: 1810: 1807: 1794: 1791: 1785: 1774: 1770: 1764: 1760: 1758: 1750: 1748: 1746: 1742: 1739: 1734: 1727:Disadvantages 1726: 1724: 1714: 1710: 1706: 1698: 1693: 1691: 1687: 1682: 1677: 1673: 1668: 1666: 1662: 1658: 1654: 1650: 1642: 1640: 1638: 1633: 1629: 1625: 1617: 1615: 1613: 1609: 1593: 1589: 1585: 1581: 1577: 1573: 1561: 1558: 1552: 1549: 1542: 1539: 1531: 1526: 1523: 1509: 1506: 1500: 1497: 1489: 1484: 1481: 1478: 1473: 1469: 1466: 1456: 1453: 1451: 1447: 1443: 1440: 1437: 1429: 1426: 1420: 1417: 1411: 1408: 1405: 1402: 1398: 1395: 1388: 1384: 1381: 1379: 1375: 1372: 1369: 1364: 1360: 1357: 1347: 1344: 1342: 1330: 1326: 1323: 1320: 1316: 1313: 1312: 1311: 1305: 1303: 1301: 1297: 1289: 1284: 1121: 1119: 771: 769: 761: 759: 757: 628: 472: 470: 466: 458: 456: 454: 450: 446: 442: 439:mechanism in 438: 434: 430: 426: 422: 418: 414: 410: 406: 402: 398: 394: 390: 386: 382: 378: 373: 371: 368: 364: 360: 359:green threads 356: 353:, including 352: 344: 342: 339: 334: 332: 328: 324: 320: 316: 311: 309: 305: 301: 297: 295: 289: 288: 282: 280: 279:process image 276: 267: 265: 263: 259: 257: 253: 249: 248:Steve Russell 245: 243: 239: 235: 231: 227: 223: 219: 217: 213: 209: 201: 199: 197: 193: 189: 188:continuations 185: 180: 179:, and so on. 178: 174: 170: 166: 162: 158: 154: 153:control state 150: 146: 142: 131: 128: 120: 109: 106: 102: 99: 95: 92: 88: 85: 81: 78: â€“  77: 73: 72:Find sources: 66: 62: 56: 55: 50:This article 48: 44: 39: 38: 33: 19: 3339:Control flow 3243:Type shifter 3218:Quantization 3168:Continuation 3167: 3035:Veridicality 2915:Exhaustivity 2880:Cumulativity 2799:Indexicality 2779:Definiteness 2774:Conditionals 2701:Logical form 2509: 2499: 2488:Will Clinger 2481: 2463: 2448: 2442: 2427: 2420: 2410: 2396: 2389:Peter Bishop 2378: 2368: 2354: 2351:Peter Landin 2335: 2315: 2302: 2290:. Retrieved 2286: 2276: 2258: 2246: 2235:. Retrieved 2228:the original 2215: 2204:. Retrieved 2200:the original 2190: 2181: 2172: 2162: 2151:. Retrieved 2147: 2137: 2128: 2119: 2112: 2106: 2100: 2033:Control flow 2002: 1884: 1772: 1768: 1766: 1762: 1757:Chris Barker 1754: 1730: 1712: 1708: 1704: 1703:capture the 1694: 1671: 1669: 1656: 1649:re-invocable 1648: 1646: 1621: 1611: 1569: 1432:Continuation 1423:Continuation 1414:Continuation 1309: 1293: 1282: 1115: 1090:empty-queue? 805:empty-queue? 765: 753: 618: 462: 437:backtracking 376: 374: 348: 335: 312: 298: 293: 291: 285: 284: 274: 271: 260: 246: 234:continuation 233: 220: 205: 191: 187: 183: 181: 145:continuation 144: 138: 123: 114: 104: 97: 90: 83: 71: 59:Please help 54:verification 51: 3163:Context set 3137:Type theory 3020:Subtrigging 2784:Disjunction 2711:Proposition 2541:by Sam Ruby 2470:Robert Hieb 2399:IJCAI 1973. 2385:Carl Hewitt 2381:IJCAI 1973. 1751:Linguistics 1713:reification 1459:call(exp()) 1315:Common Lisp 1275:thread-exit 1185:"~A ~A 1075:thread-exit 319:actor model 244:semantics. 3328:Categories 3308:Pragmatics 2960:Mirativity 2726:Speech act 2681:Entailment 2676:Denotation 2460:Guy Steele 2237:2012-09-05 2206:2006-08-03 2153:2009-10-04 2074:References 1655:using his 1598:monad and 1450:Continuity 1434:PMC; uses 1296:call stack 768:coroutines 762:Coroutines 623:that sets 413:generators 393:coroutines 355:coroutines 177:coroutines 173:generators 169:exceptions 87:newspapers 3112:Mereology 3048:Formalism 2930:Givenness 2855:Cataphora 2843:Phenomena 2834:Vagueness 2764:Ambiguity 2716:Reference 2696:Intension 2686:Extension 2038:Coroutine 1955:∃ 1949:∀ 1901:∀ 1895:∃ 1843:∀ 1837:∃ 1789:∃ 1783:∀ 1743:includes 1628:stateless 1541:Smalltalk 1514:provides 1401:Lightwolf 397:Simula 67 367:Smalltalk 275:execution 117:July 2010 3261:See also 3151:Concepts 3025:Telicity 2860:Coercion 2814:Negation 2809:Modality 2759:Anaphora 2611:Archived 2577:Archived 2560:Archived 2496:Eric Ost 2324:Archived 2167:293-298. 2063:Quajects 2023:COMEFROM 2007:See also 1741:Unlambda 1572:closures 1560:Unlambda 1421: : 1412: : 1404:javaflow 1389: : 459:Examples 389:function 212:Algol 60 2769:Binding 2531:at the 2526:SIGPLAN 2292:19 June 2018:Closure 1883:), and 1721:control 1701:call/cc 1588:Haskell 1535:call/cc 1493:call/cc 1359:Haskell 1354:callcc1 1350:callcc0 1319:cl-cont 1108:dequeue 1054:dequeue 1042:enqueue 1021:call/cc 982:enqueue 961:call/cc 925:*queue* 916:*queue* 904:*queue* 880:dequeue 856:*queue* 847:*queue* 832:enqueue 817:*queue* 787:*queue* 548:call/cc 453:threads 385:longjmp 370:Seaside 304:call/cc 256:IBM 704 202:History 161:reifies 151:of the 101:scholar 3198:Monads 2745:Topics 1709:prompt 1705:entire 1661:Racket 1584:lambda 1525:Scheme 1503:callcc 1483:Racket 1468:Python 1428:Parrot 1410:Kotlin 1387:Unicon 1346:Factor 1329:VB.NET 1191:" 1179:format 1149:lambda 1131:define 1069:define 1027:lambda 1006:define 967:lambda 943:define 874:define 853:append 826:define 799:define 784:define 689:define 554:lambda 494:define 479:define 465:Scheme 451:; and 445:monads 441:Prolog 429:fibers 421:Python 403:, and 325:, and 317:, the 300:Scheme 147:is an 103:  96:  89:  82:  74:  2890:De se 2794:Focus 2752:Areas 2721:Scope 2439:(PDF) 2268:(PDF) 2231:(PDF) 2224:(PDF) 1717:shift 1643:Kinds 1635:with 1600:ContT 1592:monad 1520:reset 1516:shift 1508:Scala 1363:monad 1337:await 1333:async 1230:))))) 1206:yield 1057:))))) 1012:yield 814:null? 790:' 425:Scala 182:The " 155:of a 108:JSTOR 94:books 2533:ICFP 2458:and 2405:and 2391:and 2363:and 2294:2021 2107:eval 2053:GOTO 1941:and 1854:fell 1800:fell 1733:GOTO 1632:HTTP 1596:Cont 1574:and 1499:Ruby 1472:PyPy 1461:and 1455:Pico 1448:and 1446:Coro 1442:Perl 1397:Java 1383:Icon 1374:Haxe 1352:and 1335:and 1300:heap 1257:fork 1239:fork 1215:loop 1161:loop 1111:)))) 1099:exit 997:)))) 994:proc 952:proc 949:fork 913:set! 868:)))) 862:list 844:set! 734:> 719:> 707:test 701:> 683:> 677:> 662:> 647:> 638:test 632:> 621:test 590:set! 569:set! 500:test 463:The 433:Ruby 419:and 417:Icon 405:Perl 361:and 345:Uses 294:data 252:Lisp 228:and 143:, a 80:news 3142:TTR 2523:ACM 2409:. 2353:. 1966:saw 1912:saw 1719:or 1612:all 1604:mtl 1474:'s 1365:in 1194:str 1158:let 1140:str 922:cdr 907:))) 901:car 889:let 793:()) 578:))) 509:let 447:in 431:in 415:in 401:Lua 395:in 308:SML 139:In 63:by 3330:: 2508:. 2498:. 2494:, 2490:, 2480:. 2476:, 2472:, 2462:. 2447:. 2441:. 2419:. 2395:. 2387:, 2377:: 2367:. 2285:. 2180:. 2146:. 2127:. 2082:^ 1692:. 1667:. 1562:: 1553:: 1543:: 1527:: 1510:: 1501:: 1485:: 1470:: 1457:: 1444:: 1430:: 1399:: 1385:, 1376:: 1348:: 1331:: 1327:/ 1325:C# 1317:: 1269:)) 1251:)) 1188:\n 1182:#t 1173:)) 1164:(( 1152:() 1105:(( 1084:if 1051:(( 934:)) 928:)) 892:(( 820:)) 758:. 614:)) 608:)) 521:)) 512:(( 485:#f 455:. 443:; 411:; 399:, 383:, 321:, 310:. 224:, 175:, 171:, 2649:e 2642:t 2635:v 2535:. 2449:6 2296:. 2240:. 2209:. 2156:. 2131:. 2069:. 1983:) 1980:y 1977:, 1974:x 1971:( 1961:, 1958:x 1952:y 1929:) 1926:y 1923:, 1920:x 1917:( 1907:, 1904:y 1898:x 1871:) 1868:c 1865:, 1862:r 1859:( 1849:, 1846:c 1840:r 1817:) 1814:c 1811:, 1808:r 1805:( 1795:, 1792:r 1786:c 1657:J 1564:c 1537:) 1518:/ 1495:) 1278:) 1272:( 1260:( 1254:( 1242:( 1236:( 1227:1 1224:n 1221:+ 1218:( 1212:( 1209:) 1203:( 1200:) 1197:n 1176:( 1170:0 1167:n 1155:( 1146:( 1143:) 1134:( 1128:( 1102:) 1096:( 1093:) 1087:( 1081:( 1078:) 1072:( 1066:( 1048:) 1045:k 1039:( 1036:) 1033:k 1030:( 1024:( 1018:( 1015:) 1009:( 1003:( 991:( 988:) 985:k 979:( 976:) 973:k 970:( 964:( 958:( 955:) 946:( 940:( 931:x 919:( 910:( 898:( 895:x 886:( 883:) 877:( 871:( 865:x 859:( 850:( 841:( 838:) 835:x 829:( 823:( 811:( 808:) 802:( 796:( 781:( 749:4 743:) 737:( 731:2 728:) 722:( 716:1 710:) 704:( 698:) 686:( 674:3 671:) 665:( 659:2 656:) 650:( 644:1 641:) 635:( 611:i 605:1 602:i 599:+ 596:( 593:i 587:( 581:; 575:k 566:( 563:) 560:k 557:( 551:( 545:( 542:; 533:; 518:0 515:i 506:( 503:) 497:( 491:( 488:) 476:( 381:C 357:/ 130:) 124:( 119:) 115:( 105:· 98:· 91:· 84:· 57:. 34:. 20:)

Index

First class control
Continuation (disambiguation)

verification
improve this article
adding citations to reliable sources
"Continuation"
news
newspapers
books
scholar
JSTOR
Learn how and when to remove this message
computer science
abstract representation
control state
computer program
reifies
runtime environment
exceptions
generators
coroutines
programming language
Adriaan van Wijngaarden
Algol 60
continuation-passing style
Christopher Strachey
Christopher P. Wadsworth
John C. Reynolds
denotational semantics

Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.

↑