Filters








33 Hits in 4.2 sec

Composing bidirectional programs monadically (with appendices) [article]

Li-yao Xia, Dominic Orchard, Meng Wang
2019 arXiv   pre-print
Instead, we introduce a framework for composing bidirectional programs monadically, enabling bidirectional programming with familiar abstractions in functional languages such as Haskell.  ...  We show how to leverage compositionality and equational reasoning for the verification of round-tripping properties for such monadic bidirectional programs.  ...  composes the writer monad with the Maybe monad using WriterT (the writer monad transformer, equivalent to composing two monads with a distributive law).  ... 
arXiv:1902.06950v1 fatcat:hpw3qndwwrdmtfmelyd2hw7uci

Composing Bidirectional Programs Monadically [chapter]

Li-yao Xia, Dominic Orchard, Meng Wang
2019 Lecture Notes in Computer Science  
Instead, we introduce a framework for composing bidirectional programs monadically, enabling bidirectional programming with familiar abstractions in functional languages such as Haskell.  ...  We show how to leverage compositionality and equational reasoning for the verification of round-tripping properties for such monadic bidirectional programs.  ...  composes the writer monad with the Maybe monad using WriterT (the writer monad transformer, equivalent to composing two monads with a distributive law).  ... 
doi:10.1007/978-3-030-17184-1_6 fatcat:4gbjdtm7srg45i33pchcvdmoty

Dijkstra monads for free

Danel Ahman, Cătălin Hriţcu, Kenji Maillard, Guido Martínez, Gordon Plotkin, Jonathan Protzenko, Aseem Rastogi, Nikhil Swamy
2017 SIGPLAN notices  
Dijkstra monads are a means by which a dependent type theory can be enhanced with support for reasoning about effectful code.  ...  Besides equipping F with a more uniform and extensible effect system, EMF enables within F a mixture of intrinsic and extrinsic proofs that was previously impossible.  ...  Beyond controlling abstraction, Filinski shows how monadic reflection enables a universal implementation of monads using composable continuations and a single mutable cell.  ... 
doi:10.1145/3093333.3009878 fatcat:lgg4zn4donflxc5h5zxar36ewq

Dijkstra monads for free

Danel Ahman, Cătălin Hriţcu, Kenji Maillard, Guido Martínez, Gordon Plotkin, Jonathan Protzenko, Aseem Rastogi, Nikhil Swamy
2017 Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages - POPL 2017  
Dijkstra monads are a means by which a dependent type theory can be enhanced with support for reasoning about effectful code.  ...  Besides equipping F with a more uniform and extensible effect system, EMF enables within F a mixture of intrinsic and extrinsic proofs that was previously impossible.  ...  Beyond controlling abstraction, Filinski shows how monadic reflection enables a universal implementation of monads using composable continuations and a single mutable cell.  ... 
doi:10.1145/3009837.3009878 fatcat:kecm3fhvpbgozjkyqu2fmw6m4e

Dijkstra Monads for Free [article]

Danel Ahman and Catalin Hritcu and Kenji Maillard and Guido Martinez and Gordon Plotkin and Jonathan Protzenko and Aseem Rastogi and Nikhil Swamy
2019 arXiv   pre-print
Dijkstra monads enable a dependent type theory to be enhanced with support for specifying and verifying effectful code via weakest preconditions.  ...  Together with their closely related counterparts, Hoare monads, they provide the basis on which verification tools like F*, Hoare Type Theory (HTT), and Ynot are built.  ...  Acknowledgments We are grateful to Clément Pit-Claudel for all his help with the F interactive mode; to Pierre-Evariste Dagand and Michael Hicks for interesting discussions; and to the anonymous reviewers  ... 
arXiv:1608.06499v3 fatcat:6iiejejmtfftlmgnwxf247zaly

Quantum Hoare Type Theory [article]

Kartik Singhal
2021 arXiv   pre-print
As quantum computers become real, it is high time we come up with effective techniques that help programmers write correct quantum programs.  ...  QHTT has the potential to be a unified system for programming, specifying, and reasoning about quantum programs.  ...  These triples, along with a set of axioms and inference rules for composing them together, have proven to be quite effective in proving the correctness of classical state-manipulating (imperative) programs  ... 
arXiv:2012.02154v2 fatcat:aiqmck3cdjatlgtaq6odwsjqsq

Ties between Parametrically Polymorphic Type Systems and Finite Control Automata [article]

Joseph Gil, Ori Roth
2020 arXiv   pre-print
various methods for composing fluent APIs of more complex languages.  ...  The literature often defines tape automata with no consuming transitions, by making the assumption that they receive their input on the tape store which allows bidirectional movements.  ...  Listing D.2 Definitions in type system ⟨monadic, eventually-one-type⟩ (using Java-like syntax) encoding the language of even lengthed palindromes 1< 3<T>> a(); Note that even though the program in the  ... 
arXiv:2009.04437v3 fatcat:543tqv4aunbnlctk6mjh2c65ga

Multiparty Session Programming with Global Protocol Combinators [article]

Keigo Imai, Rumyana Neykova, Nobuko Yoshida, Shoji Yuen
2020 arXiv   pre-print
To overcome these limitations, we propose a library for programming with global combinators -- a set of functions for writing and verifying multiparty protocols in OCaml.  ...  We show our library can interoperate with existing libraries and services, implementing DNS (Domain Name Service) protocol and the OAuth (Open Authentication) protocol.  ...  Lightweight linearly-typed programming with lenses and monads. Journal of Information Processing, 27:431-444, 2019.  ... 
arXiv:2005.06333v2 fatcat:zqtsntdqjrgbnfmg262g6zattu

Semantics of Higher-Order Quantum Computation via Geometry of Interaction [article]

Ichiro Hasuo, Naohiko Hoshino
2016 arXiv   pre-print
, based on linear lambda calculus and equipped with features like the !  ...  The proposed denotational model is the first one that supports the full features of a quantum functional programming language; we prove adequacy of our semantics.  ...  This kind of awkwardness will also be gone, once we equip Hoq with constructs for composing unitary operations.  ... 
arXiv:1605.05079v1 fatcat:xwlvnvpmajejjbkzx66ykogvfa

A decompilation of the pi-calculus and its application to termination [article]

Roberto Amadio
2011 arXiv   pre-print
Omitted specifications, some concurrent programming examples, and proof sketches of the main results are available in appendices A, B, and C, respectively. π − notation Functional λ ⊳ λ a ⊃ λ ak ∼ = π  ...  Nevertheless, we notice that the λ a -calculus contains a monadic sub-calculus that we denote with λ am where the types are restricted as follows: A ::= N (1) | | N (A → A) (monadic types) This sub-calculus  ... 
arXiv:1102.2339v1 fatcat:eevd7l74pvddtchod4pnfaezla

When is a container a comonad?

Danel Ahman, James Chapman, Tarmo Uustalu, Lars Birkedal
2014 Logical Methods in Computer Science  
We have formalized our development in the dependently typed programming language Agda.  ...  Some natural examples are non-empty lists and node-labelled trees, and data-structures with a designated position (zippers).  ...  The proofs of the main results of Sections 3 and 4 appear in Appendices A and B.  ... 
doi:10.2168/lmcs-10(3:14)2014 fatcat:sxgdvi75xjb7rdrrfmhrbwheli

Imperative functional programs that explain their work

Wilmer Ricciotti, Jan Stolarek, Roly Perera, James Cheney
2017 Proceedings of the ACM on Programming Languages  
We extend this approach to imperative functional programs that combine higher-order programming with references and exceptions.  ...  Program slicing provides explanations that illustrate how program outputs were produced from inputs.  ...  returning the value of that expression, and computations are composed using let x = M in N , which corresponds to monadic bind.  ... 
doi:10.1145/3110258 dblp:journals/pacmpl/RicciottiSPC17 fatcat:tqlpokyfyzhovoa2tvummf7rfa

Bidirectionalization for free! (Pearl)

Janis Voigtländer
2009 SIGPLAN notices  
All approaches so far to this bidirectionalization task have been syntactic in nature, either proposing a domain-specific language with limited expressiveness but built-in (and composable) backward components  ...  Both the database and programming language communities have studied techniques that essentially allow a user to specify only one of get and put and have the other inferred automatically.  ...  I thank Joachim Breitner for his work on the automatic deriver for Zippable instances, the implementation of the online tool, his assistance with efficiency measurements, and general release support.  ... 
doi:10.1145/1594834.1480904 fatcat:n27zhhqhpbbyhgctk5jr3vpawe

Model Synchronization: Mappings, Tiles, and Categories [chapter]

Zinovy Diskin
2011 Lecture Notes in Computer Science  
A common approach to implementing MMt tasks is to present models as collections of objects, and program model operations as operations with these objects; object-at-a-time programming is a suitable name  ...  Mappings of the same type can be sequentially composed and form a category (a graph with associatively composable arrows).  ...  Clearly, execution of a composed view is composed from the execution of components so that for any S S S-model A we should have as shown in Fig. 35(b2 ).  ... 
doi:10.1007/978-3-642-18023-1_3 fatcat:djfkxg7pnraehjme7fgv4nubey

A Modular Type-checking algorithm for Type Theory with Singleton Types and Proof Irrelevance

Andreas Abel, Thierry Coquand, Miguel Pagano, Pierre-Louis Curien
2011 Logical Methods in Computer Science  
We define a logical framework with singleton types and one universe of small types. We give the semantics using a PER model; it is used for constructing a normalisation-by-evaluation algorithm.  ...  The authors have led many discussions with Peter Dybjer on normalization by evaluation, generalized algebraic theories, and presentation of type theory as categories with families.  ...  The Haskell programs corresponding to the NbE, and type-checking algorithms are shown in the appendices A and B, respectively.  ... 
doi:10.2168/lmcs-7(2:4)2011 fatcat:5mpxki77wza5teoyfvpvnpe6qe
« Previous Showing results 1 — 15 out of 33 results