Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/3139337.3139338acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedingsconference-collections
research-article

Encoding DCC in Haskell

Published: 30 October 2017 Publication History
  • Get Citation Alerts
  • Abstract

    The seminal work on the Dependency Core Calculus (DCC) shows how monads not only can be used for embedding effects in purely functional languages but also to statically track data dependencies. Such types of analysis have applications in research areas like security, partial evaluation, and slicing, where DCC plays the role of a unifying formalism. For a Haskell programmer, putting DCC into practice raises many interesting conceptual and implementation concerns. Specifically, DCC uses a non-standard bind operator, i.e., with a different type signature than that provided by monads. In fact, embedding such non-standard bind operator opens the door for many design decisions. Furthermore, it is unclear if DCC extends to traditional methods used by Haskell programmers to handle effects (such as monad transformers). In this work, we describe a novel encoding of DCC in Haskell, with a focus on its use for security-although our results also apply to the other domains. We address the concerns mentioned above and show how our implementation of DCC can be seen as a direct translation from its typing rules via the use of closed type families and type classes-two advanced type-system features of Haskell. We also analyze what kind of effects DCC is compatible with and which ones it cannot secure. We also derive an alternative formulation of DCC based on fmap and a corresponding non-standard join.

    References

    [1]
    M. Abadi, A. Banerjee, N. Heintze, and J. Riecke. 1999. A Core Calculus of Dependency. In Proc. ACM Symp. on Principles of Programming Languages. 147--160.
    [2]
    Thomas H. Austin, Cormac Flanagan, and Martín Abadi. 2012. A Functional View of Imperative Information Flow. Lecture Notes in Computer Science (2012), 34--49. 1007/978--3--662--49498--1_26
    [3]
    Naokata Shikuma and Atsushi Igarashi 2006. Proving Noninterference by a Fully Complete Translation to the Simply Typed lambda-Calculus Advances in Computer Science - ASIAN 2006. Secure Software and Related Issues, 11th Asian Computing Science Conference, Tokyo, Japan, December 6--8, 2006, Revised Selected Papers.
    [4]
    Naokata Shikuma and Atsushi Igarashi 2008. Proving Noninterference by a Fully Complete Translation to the Simply Typed Lambda-Calculus. Logical Methods in Computer Science Vol. 4, 3 (2008).
    [5]
    D. Stefan, A. Russo, D. Mazières, and J. C. Mitchell. 2011natexlaba. Disjunction Category Labels. In Proc. of the Nordic Conference on Information Security Technology for Applications (NORDSEC »11). Springer-Verlag.
    [6]
    D. Stefan, A. Russo, J. C. Mitchell, and D. Mazières. 2011natexlabb. Flexible Dynamic Information Flow Control in Haskell Proc. of the ACM SIGPLAN Haskell symposium (HASKELL »11).
    [7]
    Wouter Swierstra and Thorsten Altenkirch 2007. Beauty in the Beast: A Functional Semantics of the Awkward Squad Haskell »07: Proceedings of the ACM SIGPLAN Workshop on Haskell. 25--36.
    [8]
    David Terei, Simon Marlow, Simon Peyton Jones, and David Mazières 2012natexlaba. Safe haskell ACM SIGPLAN Notices, Vol. Vol. 47. ACM, 137--148.
    [9]
    D. Terei, S. Marlow, S. Peyton Jones, and D. Mazières. 2012natexlabb. Safe Haskell Proc. of the ACM SIGPLAN Haskell symposium (HASKELL »11). ACM.
    [10]
    S. Tse and S. Zdancewic 2004natexlaba. Translating dependency into parametricity. In Proc. of the Ninth ACM SIGPLAN International Conference on Functional Programming. ACM.
    [11]
    Stephen Tse and Steve Zdancewic 2004natexlabb. Translating Dependency into Parametricity. SIGPLAN Not., Vol. 39, 9 (Sept. 2004), 115--125. showISSN0362--1340
    [12]
    D. Volpano, G. Smith, and C. Irvine 1996. A Sound Type System for Secure Flow Analysis. J. Computer Security Vol. 4, 3 (1996), 167--187.
    [13]
    Philip Wadler. 1990. Comprehending Monads Proceedings of the 1990 ACM Conference on LISP and Functional Programming (LFP »90). ACM, 61--78.
    [14]
    Philip Wadler. 1995. Monads for functional programming. In International School on Advanced Functional Programming. Springer, 24--52.
    [15]
    Brent A. Yorgey, Stephanie Weirich, Julien Cretin, Simon Peyton Jones, Dimitrios Vytiniotis, and José Pedro Magalh aes. 2012. Giving Haskell a Promotion. In Proc. of the 8th ACM SIGPLAN Workshop on Types in Language Design and Implementation (TLDI »12). ACM. endthebibliography

    Cited By

    View all
    • (2022)Evolution of a haskell repository and its use of monadsProceedings of the 37th ACM/SIGAPP Symposium on Applied Computing10.1145/3477314.3506982(1475-1482)Online publication date: 25-Apr-2022
    • (2021)Giving semantics to program-counter labels via secure effectsProceedings of the ACM on Programming Languages10.1145/34343165:POPL(1-29)Online publication date: 4-Jan-2021
    • (2021)Mechanized logical relations for termination-insensitive noninterferenceProceedings of the ACM on Programming Languages10.1145/34342915:POPL(1-29)Online publication date: 4-Jan-2021
    • Show More Cited By

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    PLAS '17: Proceedings of the 2017 Workshop on Programming Languages and Analysis for Security
    October 2017
    128 pages
    ISBN:9781450350990
    DOI:10.1145/3139337
    Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

    Sponsors

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 30 October 2017

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. dependency core calculus
    2. haskell
    3. information-flow control

    Qualifiers

    • Research-article

    Funding Sources

    Conference

    CCS '17
    Sponsor:

    Acceptance Rates

    PLAS '17 Paper Acceptance Rate 8 of 10 submissions, 80%;
    Overall Acceptance Rate 43 of 77 submissions, 56%

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)2
    • Downloads (Last 6 weeks)1
    Reflects downloads up to 10 Aug 2024

    Other Metrics

    Citations

    Cited By

    View all
    • (2022)Evolution of a haskell repository and its use of monadsProceedings of the 37th ACM/SIGAPP Symposium on Applied Computing10.1145/3477314.3506982(1475-1482)Online publication date: 25-Apr-2022
    • (2021)Giving semantics to program-counter labels via secure effectsProceedings of the ACM on Programming Languages10.1145/34343165:POPL(1-29)Online publication date: 4-Jan-2021
    • (2021)Mechanized logical relations for termination-insensitive noninterferenceProceedings of the ACM on Programming Languages10.1145/34342915:POPL(1-29)Online publication date: 4-Jan-2021
    • (2021)Dynamic IFC Theorems for Free!2021 IEEE 34th Computer Security Foundations Symposium (CSF)10.1109/CSF51468.2021.00005(1-14)Online publication date: Jun-2021
    • (2020)Type-Based Declassification for FreeFormal Methods and Software Engineering10.1007/978-3-030-63406-3_11(181-197)Online publication date: 19-Dec-2020
    • (2020)Higher-Ranked Annotation Polymorphic Dependency AnalysisProgramming Languages and Systems10.1007/978-3-030-44914-8_24(656-683)Online publication date: 27-Apr-2020
    • (2019)On the expressiveness and semantics of information flow typesJournal of Computer Security10.3233/JCS-191382(1-28)Online publication date: 6-Dec-2019
    • (2019)Simple noninterference from parametricityProceedings of the ACM on Programming Languages10.1145/33416933:ICFP(1-22)Online publication date: 26-Jul-2019
    • (2019)Optimising Faceted Secure Multi-Execution2019 IEEE 32nd Computer Security Foundations Symposium (CSF)10.1109/CSF.2019.00008(1-115)Online publication date: Jun-2019
    • (2018)A Perspective on the Dependency Core CalculusProceedings of the 13th Workshop on Programming Languages and Analysis for Security10.1145/3264820.3264823(24-28)Online publication date: 15-Oct-2018
    • Show More Cited By

    View Options

    Get Access

    Login options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media