publications: - title: "Closing the stage: from staged code to typed closures" author: - name: "Yukiyoshi Kameyama" link: "https://researchr.org/alias/yukiyoshi-kameyama" - name: "Oleg Kiselyov" link: "http://okmij.org/ftp/" - name: "Chung-chieh Shan" link: "http://www.cs.rutgers.edu/~ccshan/" year: "2008" doi: "http://doi.acm.org/10.1145/1328408.1328430" links: doi: "http://doi.acm.org/10.1145/1328408.1328430" researchr: "https://researchr.org/publication/KameyamaKS08" cites: 0 citedby: 0 pages: "147-157" booktitle: "Proceedings of the 2008 ACM SIGPLAN Symposium on Partial Evaluation and Semantics-based Program Manipulation, PEPM 2008, San Francisco, California, USA, January 7-8, 2008" editor: - name: "Robert Glück" link: "http://www.diku.dk/hjemmesider/ansatte/glueck/" - name: "Oege de Moor" link: "http://progtools.comlab.ox.ac.uk/members/oege" publisher: "ACM" isbn: "978-1-59593-977-7" kind: "inproceedings" key: "KameyamaKS08" - title: "Lightweight Static Capabilities" author: - name: "Oleg Kiselyov" link: "http://okmij.org/ftp/" - name: "Chung-chieh Shan" link: "http://www.cs.rutgers.edu/~ccshan/" year: "2007" doi: "http://dx.doi.org/10.1016/j.entcs.2006.10.039" links: doi: "http://dx.doi.org/10.1016/j.entcs.2006.10.039" researchr: "https://researchr.org/publication/KiselyovS07" cites: 0 citedby: 0 journal: "Electronic Notes in Theoretical Computer Science" volume: "174" number: "7" pages: "79-104" kind: "article" key: "KiselyovS07" - title: "Shifting the stage: staging with delimited control" author: - name: "Yukiyoshi Kameyama" link: "https://researchr.org/alias/yukiyoshi-kameyama" - name: "Oleg Kiselyov" link: "http://okmij.org/ftp/" - name: "Chung-chieh Shan" link: "http://www.cs.rutgers.edu/~ccshan/" year: "2009" doi: "http://doi.acm.org/10.1145/1480945.1480962" abstract: "It is often hard to write programs that are efficient yet reusable. For example, an efficient implementation of Gaussian elimination should be specialized to the structure and known static properties of the input matrix. The most profitable optimizations, such as choosing the best pivoting or memoization, cannot be expected of even an advanced compiler because they are specific to the domain, but expressing these optimizations directly makes for ungainly source code. Instead, a promising and popular way to reconcile efficiency with reusability is for a domain expert to write code generators. Two pillars of this approach are types and effects. Typed multilevel languages such as MetaOCaml ensure safety and early error reporting: a well-typed code generator neither goes wrong nor generates code that goes wrong. Side effects such as state and control ease correctness and expressivity: an effectful generator can resemble the textbook presentation of an algorithm, as is familiar to domain experts, yet insert `let' for memoization and `if' for bounds-checking, as is necessary for efficiency. Together types and effects enable structuring code generators as compositions of modules with well-defined interfaces, and hence scaling to large programs. However, blindly adding effects renders multilevel types unsound. We introduce the first multilevel calculus with control effects and a sound type system. We give small-step operational semantics as well as a one-pass continuation-passing style (CPS) translation. For soundness, our calculus restricts the code generator's effects to the scope of generated binders. Even with this restriction, we can finally write efficient code generators for dynamic programming and numerical methods in direct style, like in algorithm textbooks, rather than in CPS or monadic style. " links: doi: "http://doi.acm.org/10.1145/1480945.1480962" tags: - "control systems" - "programming languages" - "optimization" - "semantics" - "translation" - "type soundness" - "composition" - "type system" - "reuse" - "source-to-source" - "type checking" - "compiler" - "programming" - "operational semantics" - "program optimization" - "systematic-approach" - "open-source" - "domain-specific language" researchr: "https://researchr.org/publication/KameyamaKS09" cites: 0 citedby: 0 pages: "111-120" booktitle: "Proceedings of the 2009 ACM SIGPLAN Symposium on Partial Evaluation and Semantics-based Program Manipulation, PEPM 2009, Savannah, GA, USA, January 19-20, 2009" editor: - name: "Germán Puebla" link: "https://researchr.org/alias/germ%C3%A1n-puebla" - name: "Germán Vidal" link: "http://users.dsic.upv.es/~gvidal/" publisher: "ACM" isbn: "978-1-60558-327-3" kind: "inproceedings" key: "KameyamaKS09" - title: "Types as Graphs: Continuations in Type Logical Grammar" author: - name: "Chris Barker" link: "https://researchr.org/alias/chris-barker" - name: "Chung-chieh Shan" link: "http://www.cs.rutgers.edu/~ccshan/" year: "2006" doi: "http://dx.doi.org/10.1007/s10849-006-0541-6" links: doi: "http://dx.doi.org/10.1007/s10849-006-0541-6" tags: - "graph-rewriting" - "rewriting" - "grammar" researchr: "https://researchr.org/publication/BarkerS06" cites: 0 citedby: 0 journal: "Journal of Logic, Language and Information" volume: "15" number: "4" pages: "331-370" kind: "article" key: "BarkerS06" - title: "Lightweight monadic regions" author: - name: "Oleg Kiselyov" link: "http://okmij.org/ftp/" - name: "Chung-chieh Shan" link: "http://www.cs.rutgers.edu/~ccshan/" year: "2008" doi: "http://doi.acm.org/10.1145/1411286.1411288" links: doi: "http://doi.acm.org/10.1145/1411286.1411288" tags: - "Haskell" researchr: "https://researchr.org/publication/KiselyovS08" cites: 0 citedby: 0 pages: "1-12" booktitle: "Proceedings of the 1st ACM SIGPLAN Symposium on Haskell, Haskell 2008, Victoria, BC, Canada, 25 September 2008" editor: - name: "Andy Gill" link: "http://www.ittc.ku.edu/~andygill/" publisher: "ACM" isbn: "978-1-60558-064-7" kind: "inproceedings" key: "KiselyovS08" - title: "Backtracking, interleaving, and terminating monad transformers: (functional pearl)" author: - name: "Oleg Kiselyov" link: "http://okmij.org/ftp/" - name: "Chung-chieh Shan" link: "http://www.cs.rutgers.edu/~ccshan/" - name: "Daniel P. Friedman" link: "https://researchr.org/alias/daniel-p.-friedman" - name: "Amr Sabry" link: "https://researchr.org/alias/amr-sabry" year: "2005" doi: "http://doi.acm.org/10.1145/1086365.1086390" links: doi: "http://doi.acm.org/10.1145/1086365.1086390" researchr: "https://researchr.org/publication/KiselyovSFS05" cites: 0 citedby: 0 pages: "192-203" booktitle: "Proceedings of the 10th ACM SIGPLAN International Conference on Functional Programming, ICFP 2005, Tallinn, Estonia, September 26-28, 2005" editor: - name: "Olivier Danvy" link: "https://www.yale-nus.edu.sg/about/faculty/olivier-danvy/" - name: "Benjamin C. Pierce" link: "http://www.cis.upenn.edu/~bcpierce/" publisher: "ACM" isbn: "1-59593-064-7" kind: "inproceedings" key: "KiselyovSFS05" - title: "Sexy types in action" author: - name: "Chung-chieh Shan" link: "http://www.cs.rutgers.edu/~ccshan/" year: "2004" doi: "http://doi.acm.org/10.1145/997140.997142" links: doi: "http://doi.acm.org/10.1145/997140.997142" researchr: "https://researchr.org/publication/Shan04" cites: 0 citedby: 0 journal: "SIGPLAN Notices" volume: "39" number: "5" pages: "15-22" kind: "article" key: "Shan04" - title: "Purely functional lazy non-deterministic programming" author: - name: "Sebastian Fischer" link: "https://researchr.org/alias/sebastian-fischer" - name: "Oleg Kiselyov" link: "http://okmij.org/ftp/" - name: "Chung-chieh Shan" link: "http://www.cs.rutgers.edu/~ccshan/" year: "2009" doi: "http://doi.acm.org/10.1145/1596550.1596556" links: doi: "http://doi.acm.org/10.1145/1596550.1596556" tags: - "laziness" - "functional programming" - "programming" researchr: "https://researchr.org/publication/FischerKS09" cites: 0 citedby: 0 pages: "11-22" booktitle: "Proceeding of the 14th ACM SIGPLAN international conference on Functional programming, ICFP 2009, Edinburgh, Scotland, UK, August 31 - September 2, 2009" editor: - name: "Graham Hutton" link: "https://researchr.org/alias/graham-hutton" - name: "Andrew P. Tolmach" link: "http://www.cs.pdx.edu/~apt" publisher: "ACM" isbn: "978-1-60558-332-7" kind: "inproceedings" key: "FischerKS09" - title: "Embedded Probabilistic Programming" author: - name: "Oleg Kiselyov" link: "http://okmij.org/ftp/" - name: "Chung-chieh Shan" link: "http://www.cs.rutgers.edu/~ccshan/" year: "2009" doi: "http://dx.doi.org/10.1007/978-3-642-03034-5_17" abstract: "Two general techniques for implementing a domain-specific language (DSL) with less overhead are the finally-tagless embedding of object programs and the direct-style representation of side effects. We use these techniques to build a DSL for probabilistic programming, for expressing countable probabilistic models and performing exact inference and importance sampling on them. Our language is embedded as an ordinary OCaml library and represents probability distributions as ordinary OCaml programs. We use delimited continuations to reify probabilistic programs as lazy search trees, which inference algorithms may traverse without imposing any interpretive overhead on deterministic parts of a model. We thus take advantage of the existing OCaml implementation to achieve competitive performance and ease of use. Inference algorithms can easily be embedded in probabilistic programs themselves. " links: doi: "http://dx.doi.org/10.1007/978-3-642-03034-5_17" tags: - "laziness" - "programming languages" - "object-oriented programming" - "meta programming" - " OCaml" - "meta-model" - "modeling language" - "modeling" - "traversal" - "language modeling" - "tagless-final" - "object-role modeling" - "DSL" - "programming" - "subject-oriented programming" - "Meta-Environment" - "search" - "feature-oriented programming" - "meta-objects" - "probabilistic programming" - "domain-specific language" researchr: "https://researchr.org/publication/KiselyovS09" cites: 0 citedby: 0 pages: "360-384" booktitle: "Domain-Specific Languages, IFIP TC 2 Working Conference, DSL 2009, Oxford, UK, July 15-17, 2009, Proceedings" editor: - name: "Walid Mohamed Taha" link: "https://researchr.org/alias/walid-mohamed-taha" volume: "5658" series: "Lecture Notes in Computer Science" publisher: "Springer" isbn: "978-3-642-03033-8" kind: "inproceedings" key: "KiselyovS09" - title: "J Is for JavaScript: A Direct-Style Correspondence between Algol-Like Languages and JavaScript Using First-Class Continuations" author: - name: "Olivier Danvy" link: "https://www.yale-nus.edu.sg/about/faculty/olivier-danvy/" - name: "Chung-chieh Shan" link: "http://www.cs.rutgers.edu/~ccshan/" - name: "Ian Zerny" link: "https://researchr.org/alias/ian-zerny" year: "2009" doi: "http://dx.doi.org/10.1007/978-3-642-03034-5_1" links: doi: "http://dx.doi.org/10.1007/978-3-642-03034-5_1" tags: - "JavaScript" - "DSL" researchr: "https://researchr.org/publication/DanvySZ09" cites: 0 citedby: 0 pages: "1-19" booktitle: "Domain-Specific Languages, IFIP TC 2 Working Conference, DSL 2009, Oxford, UK, July 15-17, 2009, Proceedings" editor: - name: "Walid Mohamed Taha" link: "https://researchr.org/alias/walid-mohamed-taha" volume: "5658" series: "Lecture Notes in Computer Science" publisher: "Springer" isbn: "978-3-642-03033-8" kind: "inproceedings" key: "DanvySZ09" - title: "Boosting Optimal Logical Patterns Using Noisy Data" author: - name: "Noam Goldberg" link: "https://researchr.org/alias/noam-goldberg" - name: "Chung-chieh Shan" link: "http://www.cs.rutgers.edu/~ccshan/" year: "2007" doi: "http://www.siam.org/meetings/proceedings/2007/datamining/papers/021Goldberg.pdf" links: doi: "http://www.siam.org/meetings/proceedings/2007/datamining/papers/021Goldberg.pdf" tags: - "data-flow" researchr: "https://researchr.org/publication/GoldbergS07" cites: 0 citedby: 0 pages: "228-236" booktitle: "Proceedings of the Seventh SIAM International Conference on Data Mining, April 26-28, 2007, Minneapolis, Minnesota, USA" publisher: "SIAM" kind: "inproceedings" key: "GoldbergS07" - title: "Finally Tagless, Partially Evaluated" author: - name: "Jacques Carette" link: "https://researchr.org/alias/jacques-carette" - name: "Oleg Kiselyov" link: "http://okmij.org/ftp/" - name: "Chung-chieh Shan" link: "http://www.cs.rutgers.edu/~ccshan/" year: "2007" doi: "http://dx.doi.org/10.1007/978-3-540-76637-7_15" links: doi: "http://dx.doi.org/10.1007/978-3-540-76637-7_15" researchr: "https://researchr.org/publication/CaretteKS07" cites: 0 citedby: 0 pages: "222-238" booktitle: "Programming Languages and Systems, 5th Asian Symposium, APLAS 2007, Singapore, November 29-December 1, 2007, Proceedings" editor: - name: "Zhong Shao" link: "https://researchr.org/alias/zhong-shao" volume: "4807" series: "Lecture Notes in Computer Science" publisher: "Springer" isbn: "978-3-540-76636-0" kind: "inproceedings" key: "CaretteKS07" - title: "A Substructural Type System for Delimited Continuations" author: - name: "Oleg Kiselyov" link: "http://okmij.org/ftp/" - name: "Chung-chieh Shan" link: "http://www.cs.rutgers.edu/~ccshan/" year: "2007" doi: "http://dx.doi.org/10.1007/978-3-540-73228-0_17" links: doi: "http://dx.doi.org/10.1007/978-3-540-73228-0_17" tags: - "type system" researchr: "https://researchr.org/publication/KiselyovS07%3A0" cites: 0 citedby: 0 pages: "223-239" booktitle: "Typed Lambda Calculi and Applications, 8th International Conference, TLCA 2007, Paris, France, June 26-28, 2007, Proceedings" editor: - name: "Simona Ronchi Della Rocca" link: "http://www.di.unito.it/~ronchi/" volume: "4583" series: "Lecture Notes in Computer Science" publisher: "Springer" isbn: "978-3-540-73227-3" kind: "inproceedings" key: "KiselyovS07:0" - title: "Pure, Declarative, and Constructive Arithmetic Relations (Declarative Pearl)" author: - name: "Oleg Kiselyov" link: "http://okmij.org/ftp/" - name: "William E. Byrd" link: "https://researchr.org/alias/william-e.-byrd" - name: "Daniel P. Friedman" link: "https://researchr.org/alias/daniel-p.-friedman" - name: "Chung-chieh Shan" link: "http://www.cs.rutgers.edu/~ccshan/" year: "2008" doi: "http://dx.doi.org/10.1007/978-3-540-78969-7_7" links: doi: "http://dx.doi.org/10.1007/978-3-540-78969-7_7" tags: - "e-science" researchr: "https://researchr.org/publication/KiselyovBFS08" cites: 0 citedby: 0 pages: "64-80" booktitle: "Functional and Logic Programming, 9th International Symposium, FLOPS 2008, Ise, Japan, April 14-16, 2008. Proceedings" editor: - name: "Jacques Garrigue" link: "https://researchr.org/alias/jacques-garrigue" - name: "Manuel V. Hermenegildo" link: "https://researchr.org/alias/manuel-v.-hermenegildo" volume: "4989" series: "Lecture Notes in Computer Science" publisher: "Springer" isbn: "978-3-540-78968-0" kind: "inproceedings" key: "KiselyovBFS08" - title: "Inverse Scope as Metalinguistic Quotation in Operational Semantics" author: - name: "Chung-chieh Shan" link: "http://www.cs.rutgers.edu/~ccshan/" year: "2007" doi: "http://dx.doi.org/10.1007/978-3-540-78197-4_13" links: doi: "http://dx.doi.org/10.1007/978-3-540-78197-4_13" tags: - "semantics" - "operational semantics" researchr: "https://researchr.org/publication/Shan07" cites: 0 citedby: 0 pages: "123-134" booktitle: "New Frontiers in Artificial Intelligence, JSAI 2007 Conference and Workshops, Miyazaki, Japan, June 18-22, 2007, Revised Selected Papers" editor: - name: "Ken Satoh" link: "https://researchr.org/alias/ken-satoh" - name: "Akihiro Inokuchi" link: "https://researchr.org/alias/akihiro-inokuchi" - name: "Katashi Nagao" link: "https://researchr.org/alias/katashi-nagao" - name: "Takahiro Kawamura" link: "https://researchr.org/alias/takahiro-kawamura" volume: "4914" series: "Lecture Notes in Computer Science" publisher: "Springer" isbn: "978-3-540-78196-7" kind: "inproceedings" key: "Shan07" - title: "A static simulation of dynamic delimited control" author: - name: "Chung-chieh Shan" link: "http://www.cs.rutgers.edu/~ccshan/" year: "2007" doi: "http://dx.doi.org/10.1007/s10990-007-9010-4" links: doi: "http://dx.doi.org/10.1007/s10990-007-9010-4" researchr: "https://researchr.org/publication/Shan07%3A0" cites: 0 citedby: 0 journal: "Higher-Order and Symbolic Computation" volume: "20" number: "4" pages: "371-401" kind: "article" key: "Shan07:0" - title: "Finally tagless, partially evaluated: Tagless staged interpreters for simpler typed languages" author: - name: "Jacques Carette" link: "https://researchr.org/alias/jacques-carette" - name: "Oleg Kiselyov" link: "http://okmij.org/ftp/" - name: "Chung-chieh Shan" link: "http://www.cs.rutgers.edu/~ccshan/" year: "2009" doi: "http://dx.doi.org/10.1017/S0956796809007205" abstract: "We have built the first family of tagless interpretations for a higher-order typed object language in a typed metalanguage (Haskell or ML) that require no dependent types, generalized algebraic data types, or postprocessing to eliminate tags. The statically type-preserving interpretations include an evaluator, a compiler (or staged evaluator), a partial evaluator, and call-by-name and call-by-value CPS transformers. Our principal technique is to encode de Bruijn or higher-order abstract syntax using combinator functions rather than data constructors. In other words, we represent object terms not in an initial algebra but using the coalgebraic structure of the lambda-calculus. Our representation also simulates inductive maps from types to types, which are required for typed partial evaluation and CPS transformations. Our encoding of an object term abstracts uniformly over the family of ways to interpret it, yet statically assures that the interpreters never get stuck. This family of interpreters thus demonstrates again that it is useful to abstract over higher-kinded types. " links: doi: "http://dx.doi.org/10.1017/S0956796809007205" tags: - "types" - "data-flow language" - "interpreter" - "abstract syntax" - "tagging" - "transformation language" - "tagless-final" - "Haskell" - "data-flow" - "compiler" - " algebra" - "partial evaluation" - "DSL" - "Meta-Environment" - "higher-order transformations" - "meta-objects" - "transformation" researchr: "https://researchr.org/publication/CaretteKS09" cites: 0 citedby: 0 journal: "Journal of Functional Programming" volume: "19" number: "5" pages: "509-543" kind: "article" key: "CaretteKS09"