Patents
US 6,986,126 B2#11412881 Most CitedExpiredUnited States (USPTO)Utility

Method and apparatus for detecting violations of type rules in a computer program

9Forward Citations (#11412881 Global)
0.5/yrCitation Velocity (#17920099 Global)
2.34Citation PageRank (#11338847 Global)
17Prior Art Cited
3Claims (1 Indep. · 2 Dep.)
0Drawings / Sheets

Abstract

One embodiment of the present invention provides a system that detects violations of type rules in a computer program. The system operates by locating a type casting operation within the computer program, wherein the type casting operation involves a first pointer and a second pointer. The system then checks the type casting operation for a violation of a type rule. If a violation is detected, the system indicates the violation. In one embodiment of the present invention, if the first pointer is defined to be a structure pointer and the second pointer is not defined to be a structure pointer, the system indicates a violation of a type rule. In one embodiment of the present invention, if the first pointer is defined to point to a first structure type and the second pointer is defined to point to a second structure type, the system determines whether the first structure type and the second structure type belong to the same alias group. If not, the system generates an error to indicate a type violation.

Interactive Citation Constellation Global Citation Ranking

Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 17 · Forward citations: 9.

Claims (3 — 1 Independent, 2 Dependent)

  1. Claim 1Independent Claim

    A method for detecting violations of type casting rules in a computer program, comprising: receiving the computer program prior to compilation and execution, wherein the computer program is received in source code form; locating an explicit-type casting operation within the computer program, wherein the explicit type casting operation involves a first pointer and a second pointer; checking the explicit type casting operation for a violation of a type casting rule; and if a violation is detected, indicating the type-casting violation.

  2. Claim 2Depends on #1

    The method of claim 1 , wherein checking the explicit type casting operation involves determining if the first pointer is defined to be a structure pointer and the second pointer is not defined to be a structure pointer, and if so, indicating a violation if no char exception applies.

  3. Claim 3Depends on #2

    The method of claim 2 , whe

Technical Overview & Description

Full multi-page specification text is archived at the issuing office. Read complete official specification ↗

References Cited — Backward Prior Art (17)

PatentTitleYearCitations
US 5,293,629 AMethod of analyzing computer source code1994108
US 5,583,988 AMethod and apparatus for providing runtime checking features in a compiled programming development environment1996134
US 5,740,440 ADynamic object visualization and browsing system1998184
US 5,875,334 ASystem, method, and program for extending a SQL compiler for handling control statements packaged with SQL query statements1999290
US 5,937,187 AMethod and apparatus for execution and preemption control of computer process entities199955
US 6,029,144 ACompliance-to-policy detection method and system2000455
US 6,149,318 ALink-time and run-time error detection, and program instrumentation2000164
US 6,314,439 B1Computer system, program product and method of creating aliases and accessing storage locations in a computer system with same200168
US 6,341,366 B1Rule-driven method and system for editing physical integrated circuit layouts200240
US 6,353,925 B1System and method for lexing and parsing program annotations2002103
US 6,427,235 B1Method and apparatus for performing prefetching at the critical section level200223
US 6,463,470 B1Method and apparatus of storing policies for policy-based management of quality of service treatments of network data traffic flows2002503
US 6,631,518 B1Generating and utilizing organized profile information200377
US 6,651,244 B1System and method for determining program complexity200355
US 6,658,398 B1Goal based educational system utilizing a remediation object200332
US 6,718,542 B1Disambiguating memory references based upon user-specified programming constraints200417
US 6,745,383 B1Early warning mechanism for enhancing enterprise availability200429

Non-Patent Literature (5)

  • "C User's Guide Supplement for the Forte Developer 6 update 1 (Sun WorkShop 6 update 1)", Sun Microsystems, Inc., Part No. 806-6145-10, Oct. 2000, Revision A, XP-002242198.
  • Altucher et al., "An extended form of must alias analysis for dynamic allocation", Proceedings of the 22nd ACM SIGPLAN-SIGACT symposium on Principles of programming languages, Jan. 1995.
  • Austin et al., "Efficient detection of all pointer and array access errors", ACM SIGPLAN, pp 290-301, Jun. 1994.
  • Bacon et al., "Fast static analysis of C++ virtual function calls", ACM SIGPLAN Notices, Proceedings of the 11th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, vol. 31 Issue 10, Oct. 1996.
  • Diwan et al., "Type-based alias analysis", ACM SIGPLAN Notices , Proceedings of the ACM SIGPLAN 1998 conference on Programming language design and implementation, vol. 33 Issue 5, May 1998.