Nothing Special   »   [go: up one dir, main page]

skip to main content
10.1145/2568225.2568309acmconferencesArticle/Chapter ViewAbstractPublication PagesicseConference Proceedingsconference-collections
research-article

A study and toolkit for asynchronous programming in c#

Published: 31 May 2014 Publication History

Abstract

Asynchronous programming is in demand today, because responsiveness is increasingly important on all modern devices. Yet, we know little about how developers use asynchronous programming in practice. Without such knowledge, developers, researchers, language and library designers, and tool providers can make wrong assumptions.
We present the first study that analyzes the usage of asynchronous programming in a large experiment. We analyzed 1378 open source Windows Phone (WP) apps, comprising 12M SLOC, produced by 3376 developers. Using this data, we answer 2 research questions about use and misuse of asynchronous constructs. Inspired by these findings, we developed (i) Asyncifier, an automated refactoring tool that converts callback-based asynchronous code to use async/await; (ii) Corrector, a tool that finds and corrects common misuses of async/await. Our empirical evaluation shows that these tools are (i) applicable and (ii) efficient. Developers accepted 314 patches generated by our tools.

References

[1]
J. Albahari and B. Albahari. CSharp 5.0 in a Nutshell: The Definitive Reference. O’Reilly Media, 2012.
[2]
Adsclient App. August’13, https://github.com/roelandmoors/adsclient.
[3]
Cimbalino-Phone-Toolkit App. August’13, https: //github.com/Cimbalino/Cimbalino-Phone-Toolkit.
[4]
Phoneguitartab App. August’13, http://phoneguitartab.codeplex.com/.
[5]
Playerframework App. August’13, http://playerframework.codeplex.com/.
[6]
Softbuild.Data App. August’13, https://github.com/CH3COOH/Softbuild.Data.
[7]
Scala Async. August’13, http: //docs.scala-lang.org/sips/pending/async.html.
[8]
Gavin Bierman, Claudio Russo, Geoffrey Mainland, Erik Meijer, and Mads Torgersen. Pause n Play: Formalizing Asynchronous CSharp. In Proceedings of the 26th European conference on Object-Oriented Programming, ECOOP ’12, pages 233–257, 2012.
[9]
Oscar Callaú, Romain Robbes, Éric Tanter, and David Röthlisberger. How developers use the dynamic features of programming languages. In Proceeding of the 8th Working Conference on Mining Software Repositories, MSR ’11, pages 23–32, 2011.
[10]
WPCollector Source Code. August’13, https://github.com/semihokur/wpcollector.
[11]
CodePlex. August’13, http://codeplex.com.
[12]
Danny Dig, John Marrero, and Michael D. Ernst. Refactoring sequential Java code for concurrency via concurrent libraries. In Proceedings of the 31st International Conference on Software Engineering, ICSE ’09, pages 397–407, 2009.
[13]
Danny Dig, Mihai Tarce, Cosmin Radoi, Marius Minea, and Ralph Johnson. Relooper. In Proceedings of the 24th ACM SIGPLAN Conference Companion on Object Oriented Programming Systems Languages and Applications, OOPSLA ’09, pages 793–794, 2009.
[14]
Indulged flickr App. August’13, https://github.com/powerytg/indulged-flickr.
[15]
Windows Forms. August’13, http://msdn.microsoft. com/en-us/library/dd30h2yb.aspx.
[16]
Windows Presentation Foundation. August’13, http:// msdn.microsoft.com/en-us/library/ms754130.aspx.
[17]
Gartner. August’13, http://www.gartner.com/newsroom/id/2153215.
[18]
Github. August’13, https://github.com.
[19]
Mark Grechanik, Collin McMillan, Luca DeFerrari, Marco Comi, Stefano Crespi, Denys Poshyvanyk, Chen Fu, Qing Xie, and Carlo Ghezzi. An empirical investigation into a large-scale Java open source code repository. In Proceedings of the International Symposium on Empirical Software Engineering and Measurement, ESEM ’10, pages 11–21, 2010.
[20]
Alex Gyori, Lyle Franklin, Danny Dig, and Jan Lahoda. Crossing the gap from imperative to functional programming through refactoring. In Proceedings of the Foundations of Software Engineering, FSE ’13, pages 543–553, 2013.
[21]
Best Practices in Asynchronous Programming. August’13, http://msdn.microsoft.com/en-us/ magazine/jj991977.aspx.
[22]
iRacerMotionControl App. August’13, https: //github.com/lanceseidman/iRacer_MotionControl.
[23]
Oracle JavaAWT. August’13, http://docs.oracle.com/javase/7/docs/api/java/ awt/package-summary.html.
[24]
Oracle JavaSwing. August’13, http://docs.oracle. com/javase/7/docs/technotes/guides/swing/.
[25]
Siim Karus and Harald Gall. A study of language usage evolution in open source software. In Proceeding of the 8th Working Conference on Mining Software Repositories, MSR ’11, pages 13–22, 2011.
[26]
Survival of the Forgest. August’13, http://redmonk. com/sogrady/2011/06/02/blackduck-webinar/.
[27]
Semih Okur and Danny Dig. How do developers use parallel libraries? In Proceedings of the ACM SIGSOFT 20th International Symposium on the Foundations of Software Engineering, FSE ’12, pages 54–65, 2012.
[28]
Chris Parnin, Christian Bird, and Emerson Murphy-Hill. Adoption and use of Java generics. Empirical Software Engineering, 18(6):1047–1089, 2013.
[29]
Microsoft Asynchronous Programming Patterns. August’13, http://msdn.microsoft.com/en-us/ library/jj152938.aspx.
[30]
The Roslyn Project. August’13, http://msdn.microsoft.com/en-us/hh500769.
[31]
Cosmin Radoi and Danny Dig. Practical static race detection for java parallel loops. In Proceedings of the 2013 International Symposium on Software Testing and Analysis, ISSTA ’13, pages 178–190, 2013.
[32]
Cimbalino Pull Request. August’13, https://github. com/Cimbalino/Cimbalino-Phone-Toolkit/pull/21.
[33]
OCell Pull Request. August’13, https://github.com/gjulianm/Ocell/pull/27.
[34]
ReSharper. August’13, http://www.jetbrains.com/resharper/.
[35]
Martin P. Robillard and Robert DeLine. A field study of API learning obstacles. Empirical Software Engineering, 16(6):703–732, December 2010.
[36]
Max Schäfer, Manu Sridharan, Julian Dolby, and Frank Tip. Refactoring Java programs for flexible locking. In Proceeding of the 33rd international conference on Software engineering, ICSE ’11, pages 71–80, 2011.
[37]
Windows Store. August’13, http://www.windowsphone.com/en-us/store.
[38]
Don Syme, Tomas Petricek, and Dmitry Lomov. The F# asynchronous programming model. In Proceedings of the 13th international conference on Practical aspects of declarative languages, PADL’11, pages 175–189, 2011.
[39]
Our Companion Website. August’13, http://learnasync.net.
[40]
Jan Wloka, Manu Sridharan, and Frank Tip. Refactoring for reentrancy. In Proceedings of the 7th Joint Meeting of the ACM SIGSOFT Symposium on the Foundations of Software Engineering, FSE ’09, pages 173–182, 2009.

Cited By

View all
  • (2024)MPI Progress For AllProceedings of the SC '24 Workshops of the International Conference on High Performance Computing, Network, Storage, and Analysis10.1109/SCW63240.2024.00063(425-435)Online publication date: 17-Nov-2024
  • (2023)CQS: A Formally-Verified Framework for Fair and Abortable SynchronizationProceedings of the ACM on Programming Languages10.1145/35912307:PLDI(244-266)Online publication date: 6-Jun-2023
  • (2022)ReInstancerProceedings of the ACM/IEEE 44th International Conference on Software Engineering: Companion Proceedings10.1145/3510454.3516868(183-187)Online publication date: 21-May-2022
  • Show More Cited By

Index Terms

  1. A study and toolkit for asynchronous programming in c#

    Recommendations

    Comments

    Please enable JavaScript to view thecomments powered by Disqus.

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    ICSE 2014: Proceedings of the 36th International Conference on Software Engineering
    May 2014
    1139 pages
    ISBN:9781450327565
    DOI:10.1145/2568225
    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 ACM 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

    In-Cooperation

    • TCSE: IEEE Computer Society's Tech. Council on Software Engin.

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 31 May 2014

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. C#
    2. Program transformation
    3. asynchronous

    Qualifiers

    • Research-article

    Conference

    ICSE '14
    Sponsor:

    Acceptance Rates

    Overall Acceptance Rate 276 of 1,856 submissions, 15%

    Upcoming Conference

    ICSE 2025

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)68
    • Downloads (Last 6 weeks)10
    Reflects downloads up to 23 Feb 2025

    Other Metrics

    Citations

    Cited By

    View all
    • (2024)MPI Progress For AllProceedings of the SC '24 Workshops of the International Conference on High Performance Computing, Network, Storage, and Analysis10.1109/SCW63240.2024.00063(425-435)Online publication date: 17-Nov-2024
    • (2023)CQS: A Formally-Verified Framework for Fair and Abortable SynchronizationProceedings of the ACM on Programming Languages10.1145/35912307:PLDI(244-266)Online publication date: 6-Jun-2023
    • (2022)ReInstancerProceedings of the ACM/IEEE 44th International Conference on Software Engineering: Companion Proceedings10.1145/3510454.3516868(183-187)Online publication date: 21-May-2022
    • (2022)NessieProceedings of the 44th International Conference on Software Engineering10.1145/3510003.3510106(1494-1505)Online publication date: 21-May-2022
    • (2022)A Survey of Performance Optimization for Mobile ApplicationsIEEE Transactions on Software Engineering10.1109/TSE.2021.307119348:8(2879-2904)Online publication date: 1-Aug-2022
    • (2022)ReInstancer: Automatically Refactoring for Instanceof Pattern Matching2022 IEEE/ACM 44th International Conference on Software Engineering: Companion Proceedings (ICSE-Companion)10.1109/ICSE-Companion55297.2022.9793818(183-187)Online publication date: May-2022
    • (2022)To var or not to var: how do C# developers use and misuse implicit and explicit typing?Software Quality Journal10.1007/s11219-018-9426-627:3(1175-1207)Online publication date: 10-Mar-2022
    • (2022)Automated Synthesis of AsynchronizationsStatic Analysis10.1007/978-3-031-22308-2_7(135-159)Online publication date: 2-Dec-2022
    • (2021)Automatic migration from synchronous to asynchronous JavaScript APIsProceedings of the ACM on Programming Languages10.1145/34855375:OOPSLA(1-27)Online publication date: 15-Oct-2021
    • (2021)Robust I/O-compute concurrency for machine learning pipelines in constrained cyber-physical devicesProceedings of the 22nd ACM SIGPLAN/SIGBED International Conference on Languages, Compilers, and Tools for Embedded Systems10.1145/3461648.3463842(1-11)Online publication date: 22-Jun-2021
    • Show More Cited By

    View Options

    Login options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Figures

    Tables

    Media

    Share

    Share

    Share this Publication link

    Share on social media