skip to main content
research-article

Managing ambiguity in programming by finding unambiguous examples

Published:17 October 2010Publication History
Skip Abstract Section

Abstract

We propose a new way to raise the level of discourse in the programming process: permit ambiguity, but manage it by linking it to unambiguous examples. This allows programming environments to work with informal descriptions that lack precise semantics, such as natural language descriptions or conceptual diagrams, without requiring programmers to formulate their ideas in a formal language first. As an example of this idea, we present Zones, a code search and reuse interface that connects code with ambiguous natural language statements about its purpose. The backend, called ProcedureSpace, relates purpose statements, static code analysis features, and natural language background knowledge. ProcedureSpace can search for code given statements of purpose or vice versa, and can find code that was never annotated or commented. Since completed Zones searches become annotations, system coverage grows with user interaction. Users in a preliminary study found that reasoning jointly over natural language and programming language helped them reuse code.

References

  1. }}J. Brandt, M. Dontcheva, M. Weskamp, and S. R. Klemmer. Example-centric programming: Integrating web search into the development environment. Technical report, CSTR-2009-01, 2009.Google ScholarGoogle Scholar
  2. }}A. Diller. Z: An Introduction to Formal Methods. John Wiley & Sons, Inc., New York, NY, USA, 1990. ISBN 047192489X. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. }}C. Fry. Programming on an already full brain.Commun. ACM, 40(4):55--64, 199ISSN 0001-078doi: http://doi.acm.org/10.1145/248448.248459. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. }}T. R. G. Green. Cognitive dimensions of notations. In Proceedings of the fifth conference of the British Computer Society, Human-Computer Interaction Specialist Group on People and computers V, pages 443--460, New York, NY, USA, 1989. Cambridge University Press. ISBN 0-521-38430-3. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. }}C. Havasi, R. Speer, J. Pustejovsky, and H. Lieberman. Digital Intuition: Applying common sense using dimensionality reduction. IEEE Intelligent Systems, July 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. }}R. M. Hierons, K. Bogdanov, J. P. Bowen, R. Cleaveland, J. Derrick, J. Dick, M. Gheorghe, M. Harman, K. Kapoor, P. Krause, G. Lüttgen, A. J. H. Simons, S. Vilkomir, M. R. Woodward, and H. Zedan. Using formal specifications to support testing. ACM Comput. Surv., 41(2):1--76, 2009. ISSN 0360-0300. doi: http://doi.acm.org/10.1145/1459352.1459354. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. }}R. Knöll and M. Mezini. Pegasus: first steps toward a naturalistic programming language. In OOPSLA '06: Companion to the 21st ACM SIGPLAN symposium on Object-oriented programming systems, languages, and applications, pages 542--559, New York, NY, USA, 2006. ACM.ISBN 1-59593-491-X. doi: http://doi.acm.org/10.1145/1176617.1176628. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. }}H. Lieberman and M. Ahmad. Knowing what you're talking about: Natural language programming of a multi-player online game. In M. Dontcheva, T. Lau, A. Cypher, and J. Nichols, editors, No Code Required: Giving Users Tools to Transform the Web. Morgan Kaufmann, 2010.Google ScholarGoogle Scholar
  9. }}G. Little and R. C. Miller. Keyword programming in Java. In ASE '07: Proceedings of the twenty-second IEEE/ACM international conference on Automated software engineering, pages 84--93. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. }}New York, NY, USA, 2007. ACM. ISBN 978-1-59593-882-4. doi: http://doi.acm.org/10.1145/1321631.1321646.Google ScholarGoogle Scholar
  11. }}H. Liu and H. Lieberman. Programmatic semantics for natural language interfaces. In CHI '05: CHI '05 extended abstracts on Human factors in computing systems, pages 1597--1600, New York, NY, USA, 2005. ACM. ISBN 1-59593-002-7. doi: http://doi.acm.org/10.1145/1056808.1056975. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. }}A. Monroy-Hernández and M. Resnick.Empowering kids to create and share programmable media. interactions, 15(2):50--53, 200ISSN 1072-55doi: http://doi.acm.org/10.1145/1340961.1340974. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. }}S. P. Reiss. Semantics-based code search. In ICSE '09: Pro- ceedings of the 2009 IEEE 31st International Conference on Software Engineering, pages 243--253, Washington, DC, USA, 2009. IEEE Computer Society. ISBN 978-1-4244-3453-4. doi: http://dx.doi.org/10.1109/ICSE.2009.5070525. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. }}M. Resnick, Y. Kafai, and J. Maeda. A networked, media-rich programming environment to enhance technological fluency at after-school centers in economically-disadvantaged communities. Proposal to National Science Foundation, 2003.Google ScholarGoogle Scholar
  15. }}R. Speer, C. Havasi, and H. Lieberman. AnalogySpace: Reducing the dimensionality of common sense knowledge. Proceedings of AAAI 2008, October 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. }}Y. Ye. Supporting Component-Based Software Development with Active Component Repository Systems. PhD thesis, University of Colorado, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Managing ambiguity in programming by finding unambiguous examples

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in

      Full Access

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader
      About Cookies On This Site

      We use cookies to ensure that we give you the best experience on our website.

      Learn more

      Got it!