Browse Wiki & Semantic Web

Jump to: navigation, search
Http://dbpedia.org/resource/Continuation-passing style
  This page has no properties.
hide properties that link here 
  No properties link to this page.
 
http://dbpedia.org/resource/Continuation-passing_style
http://dbpedia.org/ontology/abstract Στο συναρτησιακό προγραμματισμό, το στυλ περάσματος συνεχειών (continuation-passing style, CPS) είναι ένα στυλ προγραμματισμού στο οποίο η ροή του ελέγχου δίνεται ρητά από το πέρασμα συνεχειών. , En la programación funcional, el ContinuatEn la programación funcional, el Continuation-passing style (CPS) es un estilo de programación en el cual el Flujo de control se pasa explícitamente en forma de una Continuación, en oposición al estilo directo, que es el estilo habitual de programar.​​​ La notación CPS (abreviatura de continuation-passing style) es una forma de escribir el código de un programa en la que las Continuaciones se escriben y se pasan de forma explícita. Cuando se escribe un programa en notación CPS, cada función recibe un parámetro adicional, que representa la Continuación de la función. En lugar de retornar, la función invocará la continuación recibida pasando el valor de retorno. De esta forma, las funciones nunca regresan al código que las llamó, sino que la ejecución del programa transcurre “hacia adelante” sin retornar hasta que el programa finalice. Cuando desde una función A se desea invocar a una función B, se pasa como continuación de la función B el código que se desea ejecutar a continuación (incluyendo la invocación de la continuación de la función A). La notación CPS ocasiona que el tamaño de la pila crezca con cada llamada a función, con el peligro de desbordamiento que eso conlleva. Por ello, cualquier implementación que pretenda escribir el código en notación CPS para ser ejecutado emplea la optimización conocida como tail-call optimization (TCO) que en español se traduce como optimización de cola. Esta optimización consiste en aprovechar que el marco de pila de la función actual al realizar una llamada a función no va a volver a ser usado (ya que las funciones no retornan) y por tanto puede ser reutilizado como marco de pila para la función invocada, evitando por tanto el crecimiento desmedido de la pila.​anto el crecimiento desmedido de la pila.​ , 継続渡しスタイル (CPS: Continuation-passing style)継続渡しスタイル (CPS: Continuation-passing style) とは、プログラムの制御を継続を用いて陽に表すプログラミングスタイルのことである。この用語は、ジェラルド・ジェイ・サスマン とガイ・スティール・ジュニアにより、Scheme言語に関する初期の論文において導入された。 継続渡しスタイルで書かれた関数は、通常の直接スタイル (direct style) のように値を「返す」かわりに、「継続」を引数として陽に受け取り、その継続に計算結果を渡す。継続とは、関数の計算結果を受け取るための(一般には元の関数とは別の)1引数の関数のことである。継続渡しスタイルの関数を呼び出すときは、呼び出し側の関数が、呼び出される関数の「戻り値」を受け取るための継続を与える必要がある。この形でコードを書くと、直接スタイルにおいて暗黙に仮定されていた様々な動作が、陽に表される。例えば、手続きからの復帰が継続の呼び出しとして表される、計算の途中の値がすべて陽に名前を与えられる、引数の評価順序が陽に表される、末尾呼び出しは呼び出される手続きに呼び出し側と同じ継続を渡すことにあたる、等である。 直接スタイルのプログラムはCPSに自動変換することが可能である。関数型言語や論理型言語のコンパイラはCPSを中間表現として用いることがある。命令型言語ないし手続き型言語のコンパイラはしばしば静的単一代入(SSA)形式を用いるが、SSAとCPSはある意味で等価であることが知られている。また、やはり関数型言語のコンパイラの中間表現として用いられることがあるA正規形(A-normal form)も、CPSとの対応関係が(当初から)知られている。規形(A-normal form)も、CPSとの対応関係が(当初から)知られている。 , Unter Continuation-Passing Style (kurz CPSUnter Continuation-Passing Style (kurz CPS) versteht man einen Programmierstil, bei dem der Kontrollfluss ausschließlich durch Continuations gesteuert wird. Continuations sind Funktionen, die die verbleibenden Berechnungen repräsentieren. An die Stelle der Funktionsrückkehr tritt bei Programmen im Continuation-Passing Style der Aufruf der übergebenen Continuation. In den meisten Programmiersprachen werden nach Beendigung einer Funktion ihr Ergebnis und der Kontrollfluss an den Aufrufer zurückgegeben. Zur Abgrenzung von CPS wird dies als direkter Stil, direct style, bezeichnet. Es ist aber auch möglich, der Funktion eine Nachfolgefunktion zu übergeben, die an Stelle des Aufrufers das Ergebnis erhalten soll. Anstatt zum Aufrufer zurückzukehren, übergibt die Funktion ihr Ergebnis dieser Nachfolgefunktion. Die Funktionen bilden gewissermaßen eine Kette. Statt von einer Nachfolgefunktion kann man auch von einer „Fortführung“ sprechen, dem deutschen Wort für Continuation. Der CPS ist ein Programmierstil, der dieser Vorgehensweise folgt. CPS macht den in vielen Sprachen notwendigen Stack zur Speicherung der Rücksprungadresse beim Aufruf einer Methode überflüssig. Damit ist es möglich, eine Programmiersprache ohne Stack (stackless) zu implementieren. Da auf vielen Systemen die Größe des Stacks begrenzt ist, ist ohne CPS auch die maximale Rekursionstiefe begrenzt, was unter Umständen zum Problem werden kann. Mit CPS ist es möglich, diese Begrenzung zu umgehen. Ein Beispiel hierfür ist Stackless Python. Viele Compiler logischer und funktionaler Programmiersprachen verwenden CPS als interne Repräsentation eines Programmes, da er es erleichtert, Schlüsse über das Programm zu ziehen, und damit Optimierungen vereinfacht. Eine direct-style-Sprache wie JavaScript in CPS zu transformieren, führt (sofern der Compiler keine Tail Call Optimization unterstützt) dazu, dass früher oder später der Stack überläuft, da eine durch Aufruf einer Continuation verlassene Funktion nicht über ihren „offiziellen“ Weg beendet wird und somit der Stackeintrag nicht abgeräumt wird. Wenn Exceptions verfügbar sind, ist es aber möglich, beim Erreichen einer bestimmten Rekursionstiefe die aktuelle Continuation in eine Exception zu packen und diese zu werfen. Das wickelt den Stack ab, und am oberen Ende der Kette von Funktionsaufrufen wartet ein Exceptionhandler, der die verpackte Continuation aufruft. Auf diese Weise implementiert beispielsweise flapjax eine CPS-Transformation von JavaScript-Code.ne CPS-Transformation von JavaScript-Code. , In functional programming, continuation-paIn functional programming, continuation-passing style (CPS) is a style of programming in which control is passed explicitly in the form of a continuation. This is contrasted with direct style, which is the usual style of programming. Gerald Jay Sussman and Guy L. Steele, Jr. coined the phrase in AI Memo 349 (1975), which sets out the first version of the Scheme programming language.John C. Reynolds gives a detailed account of the numerous discoveries of continuations. A function written in continuation-passing style takes an extra argument: an explicit "continuation"; i.e., a function of one argument. When the CPS function has computed its result value, it "returns" it by calling the continuation function with this value as the argument. That means that when invoking a CPS function, the calling function is required to supply a procedure to be invoked with the subroutine's "return" value. Expressing code in this form makes a number of things explicit which are implicit in direct style. These include: procedure returns, which become apparent as calls to a continuation; intermediate values, which are all given names; order of argument evaluation, which is made explicit; and tail calls, which simply call a procedure with the same continuation, unmodified, that was passed to the caller. Programs can be automatically transformed from direct style to CPS. Functional and logic compilers often use CPS as an intermediate representation where a compiler for an imperative or procedural programming language would use static single assignment form (SSA). SSA is formally equivalent to a subset of CPS (excluding non-local control flow, which does not occur when CPS is used as intermediate representation). Functional compilers can also use A-normal form (ANF) (but only for languages requiring eager evaluation), rather than with 'thunks' (described in the examples below) in CPS. CPS is used more frequently by compilers than by programmers as a local or global style.by programmers as a local or global style.
http://dbpedia.org/ontology/wikiPageExternalLink http://www.scheme.com/tspl3/ + , http://www.brics.dk/RS/07/6/ + , http://scheme.com/tspl3/further.html%23./further:h4 + , http://www.cs.princeton.edu/~appel/papers/ssafun.ps + , https://github.com/kerneis/cpc + , https://books.google.com/books%3Fid=0Uoecu9ju4AC + , http://www.pps.univ-paris-diderot.fr/~kerneis/software/ +
http://dbpedia.org/ontology/wikiPageID 749852
http://dbpedia.org/ontology/wikiPageLength 22199
http://dbpedia.org/ontology/wikiPageRevisionID 1105224202
http://dbpedia.org/ontology/wikiPageWikiLink http://dbpedia.org/resource/ML_programming_language + , http://dbpedia.org/resource/Pythagorean_theorem + , http://dbpedia.org/resource/Thunk_%28functional_programming%29 + , http://dbpedia.org/resource/Static_single_assignment_form + , http://dbpedia.org/resource/Functional_programming + , http://dbpedia.org/resource/Swing_%28Java%29 + , http://dbpedia.org/resource/Procedural_programming + , http://dbpedia.org/resource/Chicken_%28Scheme_implementation%29 + , http://dbpedia.org/resource/Continuations + , http://dbpedia.org/resource/Tail_recursion + , http://dbpedia.org/resource/AI_Memo + , http://dbpedia.org/resource/Curry%E2%80%93Howard_isomorphism + , http://dbpedia.org/resource/Functional_programming_language + , http://dbpedia.org/resource/Category:Articles_with_example_Scheme_%28programming_language%29_code + , http://dbpedia.org/resource/Category:Functional_programming + , http://dbpedia.org/resource/Tail_call_optimization + , http://dbpedia.org/resource/Trampoline_%28computers%29 + , http://dbpedia.org/resource/John_C._Reynolds + , http://dbpedia.org/resource/Semantics + , http://dbpedia.org/resource/Category:Continuations + , http://dbpedia.org/resource/Intermediate_representation + , http://dbpedia.org/resource/Glasgow_Haskell_Compiler + , http://dbpedia.org/resource/Control_flow + , http://dbpedia.org/resource/Java_%28programming_language%29 + , http://dbpedia.org/resource/First-class_function + , http://dbpedia.org/resource/Logic_programming + , http://dbpedia.org/resource/Compiler + , http://dbpedia.org/resource/C_%28programming_language%29 + , http://dbpedia.org/resource/Imperative_programming + , http://dbpedia.org/resource/Continuation + , http://dbpedia.org/resource/Mathematics + , http://dbpedia.org/resource/Yoneda_embedding + , http://dbpedia.org/resource/Double-negation_translation + , http://dbpedia.org/resource/Haskell_%28programming_language%29 + , http://dbpedia.org/resource/Garbage_collection_%28computer_science%29 + , http://dbpedia.org/resource/Identity_function + , http://dbpedia.org/resource/Chicken_Scheme_compiler + , http://dbpedia.org/resource/Tail-call_optimization + , http://dbpedia.org/resource/Classical_logic + , http://dbpedia.org/resource/Call-with-current-continuation + , http://dbpedia.org/resource/Lambda_calculus + , http://dbpedia.org/resource/Thunk_%28delayed_computation%29 + , http://dbpedia.org/resource/Category:Implementation_of_functional_programming_languages + , http://dbpedia.org/resource/Intuitionistic_logic + , http://dbpedia.org/resource/Guy_L._Steele%2C_Jr. + , http://dbpedia.org/resource/Natural_language + , http://dbpedia.org/resource/Category:Articles_with_example_Java_code + , http://dbpedia.org/resource/Programming_language + , http://dbpedia.org/resource/A-normal_form + , http://dbpedia.org/resource/%CE%A0-calculus + , http://dbpedia.org/resource/Lambda_%28programming%29 + , http://dbpedia.org/resource/Call_stack + , http://dbpedia.org/resource/Computer_science + , http://dbpedia.org/resource/Chris_Barker_%28linguist%29 + , http://dbpedia.org/resource/Gerald_Jay_Sussman + , http://dbpedia.org/resource/Scheme_%28programming_language%29 + , http://dbpedia.org/resource/Embedding + , http://dbpedia.org/resource/Tail_call +
http://dbpedia.org/property/wikiPageUsesTemplate http://dbpedia.org/resource/Template:Reflist + , http://dbpedia.org/resource/Template:Cite_journal + , http://dbpedia.org/resource/Template:Cite_book + , http://dbpedia.org/resource/Template:Manual + , http://dbpedia.org/resource/Template:See_also + , http://dbpedia.org/resource/Template:Center + , http://dbpedia.org/resource/Template:Clarify +
http://purl.org/dc/terms/subject http://dbpedia.org/resource/Category:Articles_with_example_Java_code + , http://dbpedia.org/resource/Category:Continuations + , http://dbpedia.org/resource/Category:Implementation_of_functional_programming_languages + , http://dbpedia.org/resource/Category:Articles_with_example_Scheme_%28programming_language%29_code + , http://dbpedia.org/resource/Category:Functional_programming +
http://purl.org/linguistics/gold/hypernym http://dbpedia.org/resource/Style +
http://www.w3.org/ns/prov#wasDerivedFrom http://en.wikipedia.org/wiki/Continuation-passing_style?oldid=1105224202&ns=0 +
http://xmlns.com/foaf/0.1/isPrimaryTopicOf http://en.wikipedia.org/wiki/Continuation-passing_style +
owl:sameAs http://es.dbpedia.org/resource/Continuation-passing_style + , http://el.dbpedia.org/resource/%CE%A3%CF%84%CE%B9%CE%BB_%CF%80%CE%B5%CF%81%CE%AC%CF%83%CE%BC%CE%B1%CF%84%CE%BF%CF%82_%CF%83%CF%85%CE%BD%CE%B5%CF%87%CE%B5%CE%B9%CF%8E%CE%BD + , http://www.wikidata.org/entity/Q749893 + , http://ru.dbpedia.org/resource/%D0%9F%D1%80%D0%BE%D0%B3%D1%80%D0%B0%D0%BC%D0%BC%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5_%D0%B2_%D1%81%D1%82%D0%B8%D0%BB%D0%B5_%D0%BF%D0%B5%D1%80%D0%B5%D0%B4%D0%B0%D1%87%D0%B8_%D0%BF%D1%80%D0%BE%D0%B4%D0%BE%D0%BB%D0%B6%D0%B5%D0%BD%D0%B8%D0%B9 + , http://de.dbpedia.org/resource/Continuation-Passing_Style + , http://ja.dbpedia.org/resource/%E7%B6%99%E7%B6%9A%E6%B8%A1%E3%81%97%E3%82%B9%E3%82%BF%E3%82%A4%E3%83%AB + , http://yago-knowledge.org/resource/Continuation-passing_style + , http://rdf.freebase.com/ns/m.0383t8 + , https://global.dbpedia.org/id/4uqRe + , http://dbpedia.org/resource/Continuation-passing_style +
rdf:type http://dbpedia.org/class/yago/Continuance101017987 + , http://dbpedia.org/class/yago/Event100029378 + , http://dbpedia.org/class/yago/Abstraction100002137 + , http://dbpedia.org/class/yago/Activity100407535 + , http://dbpedia.org/class/yago/YagoPermanentlyLocatedEntity + , http://dbpedia.org/class/yago/WikicatContinuations + , http://dbpedia.org/class/yago/PsychologicalFeature100023100 + , http://dbpedia.org/class/yago/Act100030358 +
rdfs:comment Unter Continuation-Passing Style (kurz CPSUnter Continuation-Passing Style (kurz CPS) versteht man einen Programmierstil, bei dem der Kontrollfluss ausschließlich durch Continuations gesteuert wird. Continuations sind Funktionen, die die verbleibenden Berechnungen repräsentieren. An die Stelle der Funktionsrückkehr tritt bei Programmen im Continuation-Passing Style der Aufruf der übergebenen Continuation. Viele Compiler logischer und funktionaler Programmiersprachen verwenden CPS als interne Repräsentation eines Programmes, da er es erleichtert, Schlüsse über das Programm zu ziehen, und damit Optimierungen vereinfacht.ehen, und damit Optimierungen vereinfacht. , En la programación funcional, el ContinuatEn la programación funcional, el Continuation-passing style (CPS) es un estilo de programación en el cual el Flujo de control se pasa explícitamente en forma de una Continuación, en oposición al estilo directo, que es el estilo habitual de programar.​​​ La notación CPS (abreviatura de continuation-passing style) es una forma de escribir el código de un programa en la que las Continuaciones se escriben y se pasan de forma explícita.se escriben y se pasan de forma explícita. , Στο συναρτησιακό προγραμματισμό, το στυλ περάσματος συνεχειών (continuation-passing style, CPS) είναι ένα στυλ προγραμματισμού στο οποίο η ροή του ελέγχου δίνεται ρητά από το πέρασμα συνεχειών. , In functional programming, continuation-paIn functional programming, continuation-passing style (CPS) is a style of programming in which control is passed explicitly in the form of a continuation. This is contrasted with direct style, which is the usual style of programming. Gerald Jay Sussman and Guy L. Steele, Jr. coined the phrase in AI Memo 349 (1975), which sets out the first version of the Scheme programming language.John C. Reynolds gives a detailed account of the numerous discoveries of continuations.the numerous discoveries of continuations. , 継続渡しスタイル (CPS: Continuation-passing style)継続渡しスタイル (CPS: Continuation-passing style) とは、プログラムの制御を継続を用いて陽に表すプログラミングスタイルのことである。この用語は、ジェラルド・ジェイ・サスマン とガイ・スティール・ジュニアにより、Scheme言語に関する初期の論文において導入された。 継続渡しスタイルで書かれた関数は、通常の直接スタイル (direct style) のように値を「返す」かわりに、「継続」を引数として陽に受け取り、その継続に計算結果を渡す。継続とは、関数の計算結果を受け取るための(一般には元の関数とは別の)1引数の関数のことである。継続渡しスタイルの関数を呼び出すときは、呼び出し側の関数が、呼び出される関数の「戻り値」を受け取るための継続を与える必要がある。この形でコードを書くと、直接スタイルにおいて暗黙に仮定されていた様々な動作が、陽に表される。例えば、手続きからの復帰が継続の呼び出しとして表される、計算の途中の値がすべて陽に名前を与えられる、引数の評価順序が陽に表される、末尾呼び出しは呼び出される手続きに呼び出し側と同じ継続を渡すことにあたる、等である。末尾呼び出しは呼び出される手続きに呼び出し側と同じ継続を渡すことにあたる、等である。
rdfs:label Continuation-passing style , Программирование в стиле передачи продолжений , Continuation-Passing Style , 継続渡しスタイル , Στιλ περάσματος συνεχειών
rdfs:seeAlso http://dbpedia.org/resource/Callback_%28computer_programming%29 +
hide properties that link here 
http://dbpedia.org/resource/CPS + http://dbpedia.org/ontology/wikiPageDisambiguates
http://dbpedia.org/resource/Direct_style + , http://dbpedia.org/resource/CPS_conversion + , http://dbpedia.org/resource/Continuation-passing + , http://dbpedia.org/resource/Continuation_Passing_Style + , http://dbpedia.org/resource/Continuation_passing + http://dbpedia.org/ontology/wikiPageRedirects
http://dbpedia.org/resource/A-normal_form + , http://dbpedia.org/resource/Iota_and_Jot + , http://dbpedia.org/resource/Continuation + , http://dbpedia.org/resource/Essentials_of_Programming_Languages + , http://dbpedia.org/resource/Scheme_%28programming_language%29 + , http://dbpedia.org/resource/Trampoline_%28computing%29 + , http://dbpedia.org/resource/Scope_%28formal_semantics%29 + , http://dbpedia.org/resource/Cilk + , http://dbpedia.org/resource/Call-with-current-continuation + , http://dbpedia.org/resource/Async/await + , http://dbpedia.org/resource/Closure_%28computer_programming%29 + , http://dbpedia.org/resource/Futures_and_promises + , http://dbpedia.org/resource/Matthias_Felleisen + , http://dbpedia.org/resource/Tail_call + , http://dbpedia.org/resource/Glossary_of_computer_science + , http://dbpedia.org/resource/Static_single-assignment_form + , http://dbpedia.org/resource/Funarg_problem + , http://dbpedia.org/resource/Monad_%28functional_programming%29 + , http://dbpedia.org/resource/Fold_%28higher-order_function%29 + , http://dbpedia.org/resource/Direct_style + , http://dbpedia.org/resource/Store-passing_style + , http://dbpedia.org/resource/CPS_conversion + , http://dbpedia.org/resource/Chicken_%28Scheme_implementation%29 + , http://dbpedia.org/resource/Curry%E2%80%93Howard_correspondence + , http://dbpedia.org/resource/Callback_%28computer_programming%29 + , http://dbpedia.org/resource/Double-negation_translation + , http://dbpedia.org/resource/Calling_convention + , http://dbpedia.org/resource/CPS + , http://dbpedia.org/resource/Threaded_code + , http://dbpedia.org/resource/Continuation-passing + , http://dbpedia.org/resource/Continuation_Passing_Style + , http://dbpedia.org/resource/Continuation_passing + , http://dbpedia.org/resource/Continuation_passing_style + http://dbpedia.org/ontology/wikiPageWikiLink
http://en.wikipedia.org/wiki/Continuation-passing_style + http://xmlns.com/foaf/0.1/primaryTopic
http://dbpedia.org/resource/Continuation-passing_style + owl:sameAs
 

 

Enter the name of the page to start semantic browsing from.