skip to main content
10.5555/962198.962225dlproceedingsArticle/Chapter ViewAbstractPublication PagescasconConference Proceedingsconference-collections
Article
Free access

SCRUPLE: a reengineer's tool for source code search

Published: 09 November 1992 Publication History

Abstract

For software maintainers and reengineers confronted with the task of locating an interesting section of source code, a slow, painstaking scan of the source code using grep like tools is often the only available option. Similar problems arise in code optimization and program understanding. To alleviate the situation, we have in the past proposed a scheme for defining pattern languages using which one can specify interesting code features [13]. This paper addresses the automatic detection of source code sections that fit patterns described using such languages. We have built prototypes of our runtime system for C and PL/AS (an IBM internal programming language). The key to efficient, automatic search lies in the representations of the source code and the pattern being searched. A domain-independent pattern detection algorithm based on these representations is described. A prototype of the system was also built to search for simple patterns in English text, which demonstrates the generality of the pattern language concept as well as the underlying pattern detection mechanism.

References

[1]
Aho, A. V., Kernighan, B. W., and Weinberger, P. J., "The AWK Programming Language", Addison-Wesley, 1988.
[2]
Al-Zoubi, R., and Prakash, A., "Software Change Analysis via Attributed Dependency Graphs", Technical Report No. CSE-TR-95-91, Dept. of EECS, University of Michigan, May 1991.
[3]
Berghel, H. L. and Sallach, D. L., "Measurements of program similarity in identical tasking environments". SIGPLAN notices 19(8), 1984.
[4]
Boyer, R. S., and Moore, J. S., "A fast string searching algorithm", Communications of the ACM, Vol. 20, No. 10, 1977, 762--772.
[5]
Brooks, H., "Towards a theory of the Comprehension of Computer Programs". Int. J. Man-Machine Studies, 18, 1983, 543--554.
[6]
Grier, S., "A tool that detects plagiarism in Pascal programs". SIGSCE Bulletin 13(1), 1981.
[7]
Halstead, M. H., "Elements of Software Science". Elsevier North-Holland, New York, 1977.
[8]
Jankowitz, H. T., "Detecting Plagiarism in Student Pascal Programs". The Computer Journal, Vol. 31, No. 1, 1988.
[9]
Karp, R. M., and Rabin, M. O., "Efficient randomized pattern matching algorithms", Technical Report TR-31-81, Aiken Computation Lab., Harvard University, 1981.
[10]
Kernighan, B. W., and Pike, R., "The Unix Programming Environment ". Prentice Hall, 1989.
[11]
Knuth, D. E., Morris, J. H., and Pratt, V. R., "Fast pattern matching in strings", SIAM Journal of Computing, Vol. 6, No. 2, 1977, 323--350.
[12]
Madhavji, N. H., "Compare: A Collusion Detector for Pascal". T.S.I --- Technique et Science Informatiques (TSI), Vol. 4, No. 6, November 1985, 489--498.
[13]
Paul, S., and Prakash, A., "Source Code Retrieval Using Program Patterns". Proceedings of the Fifth International Workshop on Computer-Aided Software Engineering, 1992. 95--105.
[14]
Rich, E., and Knight, K., "Artificial Intelligence", McGraw Hill, 1991.
[15]
Sedgewick, R., "Algorithms in C", Addison-Wesley, 1990, 293--304.

Cited By

View all
  • (2009)SourcererData Mining and Knowledge Discovery10.1007/s10618-008-0118-x18:2(300-336)Online publication date: 1-Apr-2009
  • (2008)Unparsed patternsProceedings of the 2008 ACM SIGPLAN symposium on Partial evaluation and semantics-based program manipulation10.1145/1328408.1328425(111-121)Online publication date: 7-Jan-2008
  • (1998)Execution patterns in object-oriented visualizationProceedings of the 4th conference on USENIX Conference on Object-Oriented Technologies and Systems - Volume 410.5555/1268009.1268025(16-16)Online publication date: 27-Apr-1998
  • Show More Cited By
  1. SCRUPLE: a reengineer's tool for source code search

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image DL Hosted proceedings
    CASCON '92: Proceedings of the 1992 conference of the Centre for Advanced Studies on Collaborative research - Volume 1
    November 1992
    527 pages

    Sponsors

    • IBM Canada Ltd. Laboratory Centre for Advanced Studies

    Publisher

    IBM Press

    Publication History

    Published: 09 November 1992

    Qualifiers

    • Article

    Acceptance Rates

    Overall Acceptance Rate 24 of 90 submissions, 27%

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)67
    • Downloads (Last 6 weeks)17
    Reflects downloads up to 19 Feb 2025

    Other Metrics

    Citations

    Cited By

    View all
    • (2009)SourcererData Mining and Knowledge Discovery10.1007/s10618-008-0118-x18:2(300-336)Online publication date: 1-Apr-2009
    • (2008)Unparsed patternsProceedings of the 2008 ACM SIGPLAN symposium on Partial evaluation and semantics-based program manipulation10.1145/1328408.1328425(111-121)Online publication date: 7-Jan-2008
    • (1998)Execution patterns in object-oriented visualizationProceedings of the 4th conference on USENIX Conference on Object-Oriented Technologies and Systems - Volume 410.5555/1268009.1268025(16-16)Online publication date: 27-Apr-1998
    • (1994)A Framework for Source Code Search Using Program PatternsIEEE Transactions on Software Engineering10.1109/32.29589420:6(463-475)Online publication date: 1-Jun-1994
    • (1993)Generating programming language-based pattern matchersProceedings of the 1993 conference of the Centre for Advanced Studies on Collaborative research: software engineering - Volume 110.5555/962289.962310(227-243)Online publication date: 24-Oct-1993
    • (1993)Understanding software systems using reverse engineering technology perspectives from the Rigi projectProceedings of the 1993 conference of the Centre for Advanced Studies on Collaborative research: software engineering - Volume 110.5555/962289.962309(217-226)Online publication date: 24-Oct-1993
    • (1993)Program representation and behavioural matching for localizing similar code fragmentsProceedings of the 1993 conference of the Centre for Advanced Studies on Collaborative research: software engineering - Volume 110.5555/962289.962307(194-205)Online publication date: 24-Oct-1993

    View Options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Login options

    Figures

    Tables

    Media

    Share

    Share

    Share this Publication link

    Share on social media