WO2006126989A1 - Method and apparatus for pattern-based system design analysis - Google Patents
Method and apparatus for pattern-based system design analysis Download PDFInfo
- Publication number
- WO2006126989A1 WO2006126989A1 PCT/US2005/018003 US2005018003W WO2006126989A1 WO 2006126989 A1 WO2006126989 A1 WO 2006126989A1 US 2005018003 W US2005018003 W US 2005018003W WO 2006126989 A1 WO2006126989 A1 WO 2006126989A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- query
- model
- meta
- store
- artifacts
- Prior art date
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/75—Structural analysis for program understanding
Definitions
- One common type of quality management tool is used to analyze the source code of the software application to identify errors (or potential errors) in the source code.
- This type of quality management tool typically includes functionality to parse the source code written in a specific programming language (e.g., JavaTM, C++, etc.) to determine whether the source code satisfies one or more coding rules (i.e., rules that define how source code in the particular language should be written).
- coding rules i.e., rules that define how source code in the particular language should be written.
- Some quality management tools of the aforementioned type have been augmented to also identify various coding constructs that may result in security or reliability issues. While the aforementioned type of quality management tools corrects coding errors, it does not provide the software developer with any functionality to verify the quality of the architecture of software application.
- quality management tools of the aforementioned type have been augmented to verify that software patterns have been properly implemented. Specifically, some quality management tools of the aforementioned type have been augmented to allow the software developer to indicate, in the source code, the type of software pattern the developer is using. Then the quality management tool verifies, during compile time, that the software pattern was used/implemented correctly.
- the source code of the software is parsed and the components (e.g., classes, interfaces, etc.) extracted from the parsing are subsequently combined in a relational graph (i.e., a graph linking all (or sub-sets) of the components).
- a relational graph i.e., a graph linking all (or sub-sets) of the components.
- the software developer generates an architectural design, and then compares the architectural design to the relational graph to determine whether the software application conforms to the architectural pattern. While the aforementioned type of quality management tool enables the software developer to view the relationships present in the software application, it does not provide the software developer with any functionality to conduct independent analysis on the extracted components.
- Another common type of quality management tool includes functionality to extract facts (i.e., relationships between components (classes, interfaces, etc.) in the software) and subsequently displays the extracted facts to the software developer. While the aforementioned type of quality management tool enables the software developer to view the relationships present in the software application, it does not provide the developer with any functionality to independently query the facts or any functionality to extract information other than facts from the software application.
- Another common type of quality management tool includes functionality to extract and display various statistics (e.g., number of lines of code, new artifacts added, software packages present, etc.) of the software application to the software developer. While the aforementioned type of quality management tool enables the software developer to view the current state of the software application, it does not provide the developer with any functionality to verify the quality of the architecture of the software application.
- the invention in general, in one aspect, relates to a A method for analyzing a target system, comprising obtaining a characteristics model, loading the characteristics model into a meta model, obtaining a plurality of characteristics from the target system using a characteristics extractor, wherein each of the plurality of characteristics is associated with the characteristics model, storing each of the plurality of characteristics obtained from the target system in a characteristics store, and analyzing the target system by issuing at least one query to the characteristics store to obtain an analysis result, wherein the issuing the at least one query comprises verifying the at least one query using the meta model.
- the invention in general, in one aspect, relates to a system for analyzing a target system, comprising a meta model configured to extract and store information about a characteristics model, the target system comprising a plurality of characteristics, at least one characteristics extractor configured to obtain at least one of the plurality of characteristics from the target system, wherein the at least one of the plurality of characteristics is defined in the characteristics model, a characteristics store configured to store the at least one of the plurality of characteristics obtained from the target system, and a query engine configured to analyze the target system by issuing at least one query to the characteristics store and configured to obtain an analysis result in response to the at least one query, wherein the issuing the at least one query comprises verifying the at least one query using the meta model.
- the invention relates to a computer readable medium comprising software instructions for analyzing a target system, the software instructions executable on a computer to obtain a characteristics model, load the characteristics model into a meta model, obtain a plurality of characteristics from the target system using a characteristics extractor, wherein each of the plurality of characteristics is associated with the characteristics model, store each of the plurality of characteristics obtained from the target system in a characteristics store, and analyze the target system by issuing at least one query to the characteristics store to obtain an analysis result, wherein the issuing the at least one query comprises verifying the at least one query using the meta model.
- FIG. 2 shows a meta model schema in accordance with one embodiment of the invention.
- FIG. 3 shows a characteristics model in accordance one embodiment of the invention.
- FIGS. 4 through 6 show flowcharts in accordance with one embodiment of the invention.
- FIG. 7 shows a computer system in accordance with one embodiment of the invention.
- embodiments of the invention relate to a method and apparatus for pattern-based system design analysis. More specifically, embodiments of the invention provide a method and apparatus for using one or more characteristics models, one or more characteristics extractors, a query engine configured to query the characteristics of a target system to analyze the system design, and a meta model configured to load the one or more characteristics models and configured to verify queries used to analyze the characteristics of the target system.
- Embodiments of the invention provide the software developer with a fully configurable software quality management tool that enables the software developer to extract information about the characteristics of the various artifacts in the target system, and then issue queries to determine specific details about the various artifacts including, but not limited to, information such as: number of artifacts of the specific type present in the target system, relationships between the various artifacts in the target system, the interaction of the various artifacts within the target system, the software patterns that are used within the target system, etc.
- FIG. 1 shows a system in accordance with one embodiment of the invention.
- the system includes a target system (100) (i.e., the system that is to be analyzed) and a number of components used in the analysis of the target system.
- the target system (100) may correspond to a system that includes software, hardware, or a combination of software and hardware. More specifically, embodiments of the invention enable a user to analyze specific portions of a system or the entire system. Further, embodiments of the invention enable a user to analyze the target system with respect to a specific domain (discussed below).
- the target system (100) may correspond to any system under analysis where the system may correspond to the entire system including software and hardware, or only a portion of the system (e.g., only the hardware portion, only the software portion, a sub-set of the hardware or software portion, or any combination thereof).
- the system includes the following components to aid in the analysis of the target system: one or more characteristics extractors (e.g., characteristics extractor A (102A), characteristics extractor N (102N)), a characteristics store application programming interface (API) (104), a characteristics store (106), one or more characteristics models (108 A, 108N), a meta model (109), a query engine (110), and visualization engine (112).
- characteristics extractors e.g., characteristics extractor A (102A), characteristics extractor N (102N)
- API application programming interface
- the domain corresponds to any grouping of "related artifacts" (i.e., there is a relationship between the artifacts).
- domains include, but are not limited to, a JavaTM 2 Enterprise Edition (J2EE) domain (that includes artifacts such as servlets, filters, welcome file, error page, etc.), a networking domain (that includes artifacts such as web server, domain name server, network interface cards, etc), a DTrace domain (that includes artifacts such as network, cpu, process, thread stack, function call, etc.) , and JavaTM domain (described below).
- J2EE JavaTM 2 Enterprise Edition
- a networking domain that includes artifacts such as web server, domain name server, network interface cards, etc
- DTrace domain that includes artifacts such as network, cpu, process, thread stack, function call, etc.
- JavaTM domain described below.
- each of the characteristics models (108 A, 108N) includes one or more artifacts, one or more relationships describing the interaction between the various artifacts, and one or more characteristics that describe various features of the artifact.
- An example of a characteristics model (108 A, 108N) is shown in FIG. 3.
- 108A, 108N enables a user to analyze the target system (100) with respect to a specific domain. Further, the use of multiple characteristics models (108 A, 108N) allows the user to analyze the target system (100) across multiple domains. In addition, the use of multiple characteristics models (108A, 108N) allows the user to analyze the interaction between various domains on the target system (100).
- the meta model (109) provides a layer of abstraction between the other components in the system and the characteristics models (108 A, 108N).
- the meta model enables the other components in the system to operate without any knowledge of the actual characteristics models (108A, 108N) currently being used.
- the meta model (109) includes functionality to extract specific pieces of information from the characteristics models (108 A, 108N) in the system and store this information in a form that may be used by other components within the system. Further, the meta model (109) enables characteristics models (108A, 108N) to be dynamically added and removed from the system (i.e., characteristics models (108A, 108N) may be "plugged-in” to the system). The structure and functionality of the meta model (109) is described below in FIG. 2.
- the characteristics extractors are used to obtain information about various artifacts (i.e., characteristics) defined in the characteristics models (108A, 108N).
- the characteristics models (108A, 108N) are used to generate the characteristics extractor (e.g., characteristics extractor A (102A), characteristics extractor N (102N)).
- the characteristics extractors are generated using the characteristics models (108A, 108N).
- the characteristics extractor corresponds to an agent loaded on the target system (100) that is configured to monitor and obtain information about the artifacts in the target system (100).
- the characteristics extractor e.g., characteristics extractor A (102A), characteristics extractor N (102N)
- the characteristics extractor may correspond to a process (or system) configured to obtain information about one or more artifacts in the target system (100) by monitoring network traffic received by and sent from the target system (100).
- the characteristics extractor may correspond to a process (or system) configured to obtain information about one or more artifacts in the target system (100) by sending requests (e.g., pinging, etc.) for specific pieces of information about artifacts in the target system (100) to the target system (100), or alternatively, sending requests to the target system and then extracting information about the artifacts from the responses received from target system (100).
- requests e.g., pinging, etc.
- the characteristics extractor e.g., characteristics extractor A (102A), characteristics extractor N (102N)
- the characteristics extractor may correspond to a process that is configured to parse the source code and temporarily store the artifacts and characteristics obtained from parsing the source code in an in-memory object graph.
- each characteristics extractor (or set of characteristics extractors) is associated with a particular characteristics model (108A, 108N).
- each characteristics extractor typically only retrieves information about artifacts described in the characteristics model (108 A, 108N) with which the characteristics extractor is associated.
- each characteristics model (108A, 108N) may be associated with one or more characteristics extractors.
- characteristics store API (104) provides an interface between the various characteristics extractors (characteristics extractor A (102A), characteristics extractor N (102N)) and the characteristics store (106). Further, the characteristics store API (104) includes information about where in the characteristics store (106) each characteristic obtained from the target system (100) should be stored.
- the characteristics store (106) corresponds to any storage that includes functionality to store characteristics in a manner that allows the characteristics to be queried.
- the characteristics store (106) may correspond to a persistent storage device (e.g., hard disk, etc).
- the characteristics store (106) corresponds to a relational database that may be queried using a query language such as Structure Query Language (SQL).
- SQL Structure Query Language
- the characteristics model (108 A, 108N) may be used to generate a schema for storing the characteristics associated with the particular characteristics model (108A, 108N).
- each characteristics model (108 A, 108N) within the system may be associated with a separate schema.
- the characteristics store (104) is a relational database that includes a schema generated from the characteristics model (108 A, 108N)
- the characteristics store API (104) includes the necessary information to place characteristics obtained from target system (100) in the appropriate tables in the characteristics store (106).
- the characteristics store API (104) may include information about which table in the characteristics store (106) to place specific pieces of information about artifacts in the target system (100).
- the characteristics store API (104) is generated using the characteristics model (108A, 108N).
- the characteristic store API (104) is configured to populate the characteristics store (106) using the populated in-memory object graph.
- characteristics store API (104) populates the characteristics store (106) by traversing the in- memory object graph and, for each artifact or characteristic encountered, determining where in the characteristics store (106) to store the artifact or characteristics, in accordance with the schema generated using the characteristics model with which the artifacts and characteristics are associated.
- the characteristics store API (104) includes functionality to search the characteristics store (106) for the schema associated with the particular artifacts and/or characteristics.
- the characteristics store (106) includes a schema
- the mapping of individual components (e.g., artifacts, characteristics, relationships) in the characteristics models (108A, 108N) to the various tables within the schema is stored in the corresponding characteristics model (108 A, 108N).
- the query engine (110) is configured to issue queries to the characteristics store (106).
- the queries issued by the query engine (110) enable a user (e.g., a system developer, etc.) to analyze the target system (100).
- the query engine (110) is configured to enable the user to analyze the presence of specific software patterns in the target system as well as the interaction between various software patterns in the target system.
- a software pattern corresponds to a framework that defines how specific components in the target system should be configured (e.g., what types of information each component should manage, what interfaces should each component expose), and how the specific components should communicate with each other (e.g., what data should be communicated to other components, etc.).
- Software patterns are typically used to address a specific problem in a specific context (i.e., the software/system environment in which the problem arises). Said another way, software patterns may correspond to a software architectural solution that incorporates best practices to solve a specific problem in a specific context.
- the query engine (110) may also be configured to issue queries about the interaction of specific software patterns with components that do not belong to a specific software pattern. Further, the query engine (110) may be configured to issue queries about the interaction of components that do not belong to any software patterns. In one embodiment of the invention, the query engine (110) includes functionality to verify the query using the meta model (109) prior to issuing the query to the characteristics store (106). The verification of the query using the meta model (109) is described below in FIG. 6.
- the query engine (110) may include pre-specified queries and/or enable to the user to specify custom queries.
- both the pre-specified queries and the custom queries are used to identify the presence of one or more software patterns and/or the presence of components that do not belong to a pattern in the target system (100).
- the pre-specified queries and the custom queries are specified using a Pattern Query Language (PQL).
- PQL Pattern Query Language
- PQL enables the user to query the artifacts and characteristics of the artifacts stored in the characteristics store (106) to determine the presence of a specific software pattern, specific components of a specific software pattern, and/or other components that are not part of a software pattern, within the target system (100).
- the query engine (110) may include information (or have access to information) about the characteristics model (108A, 108N) that includes the artifact and/or characteristics being queried. Said another way, if the query engine (110) is issuing a query about a specific artifact, then the query engine (110) includes information (or has access to information) about the characteristics model to which the artifact belongs. Those skilled in the art will appreciate that the query engine (110) only requires information about the particular characteristics model (108A, 108N) to the extent the information is required to issue the query to the characteristics store (106).
- the query engine (110) may include functionality to translate PQL queries (i.e., queries written in PQL) into queries written in a query language understood by the characteristics store (106) (e.g., SQL).
- a query written in PQL may be translated into an SQL query prior to being issued to the characteristics store (106).
- the user only needs to understand the artifacts and/or characteristics that the user wishes to search for and how to express the particular search using PQL. The user does not need to be concerned with how the PQL query is handled by the characteristics store (106).
- PQL queries may be embedded in a programming language such as JavaTM, Groovy, or any other programming language capable of embedding PQL queries.
- a user may embed one or more PQL queries into a program written in one of the aforementioned programming languages.
- the program issues one or more PQL queries embedded within the program and subsequently receives and processes the results prior to displaying them to the user.
- the processing of the results is performed using functionality of the programming language in which the PQL queries are embedded.
- the results of the individual PQL queries may be displayed using the visualization engine (112).
- the visualization engine (112) is configured to output the results of the queries on a display device (i.e., monitor, printer, projector, etc.).
- FIG. 2 shows a meta model schema in accordance with one embodiment of the invention.
- the function of the meta model (109) is to provide a layer of abstraction between the components of the system and the characteristics models (108A, 108N).
- the meta model (109) corresponds to a model that stores information that describes characteristics models (108A, 108N). More specifically, the meta model (109) stores meta model instances of the characteristics models (108A, 108N), where each meta model instance of the characteristics model (108 A, 108N) corresponds to the representation of the particular characteristics model within the meta model (109).
- the representation of a characteristics model (108A, 108N) in the meta model is dictated by the meta model schema.
- the meta model schema includes four entities: a meta model entity (120), a meta attribute entity (122), a meta characteristics entity (124), and a meta relationship entity (126).
- the meta model entity (120) represents a characteristics model (109).
- the meta model entity (120) may include zero or more meta attribute entities (122), where each meta attribute entity (122) is configured to store a name of an attribute associated with a characteristics model (108A, 108N).
- Each meta attribute entity (122) is associated with zero or more meta characteristics (124), where each meta characteristics is configured to store a name of a characteristic associated with the attribute stored in the associated meta attribute entity (122).
- each meta attribute entity (122) is also associated with zero or more meta relationships (126), where each meta relationship (126) is configured to store a name of relationship associated with the attribute store in the associated meta attribute entity (122). Exemplary information stored in each of the aforementioned entities is shown in FIG. 2.
- the meta model (109) includes exemplary information as described in the meta model schema shown in FIG. 2. However, the additional information associated with the particular characteristics model is maintained in the characteristics models (108A, 108N).
- meta model schema only describes the organization of the information within the meta model and that the actual implementation of the meta model schema may vary in different implementations.
- the meta model is implemented as a relational database configured using the meta model schema.
- the meta model (109) includes functionality to remove information that corresponds to characteristics models (108A, 108N) that have been removed from the system. Further, the meta model (109) may also include functionality to request information from the specific characteristics models (108A, 108N) (e.g., information about how the specific attributes, characteristics, and relationships are represented in the characteristics store, etc.)- The meta model (109) also includes functionality to traverse and/or search the contents of the meta model to determine the presence of a specific artifact, characteristic, or relationship between artifacts in the system.
- each characteristics model defines one or more artifacts, one or more relationships between the artifacts, and one or more characteristics for each artifact.
- the characteristics model corresponds to a formal specification of a domain.
- the following is an example of a JavaTM characteristics model that is formal specification of a JavaTM language domain in accordance with one embodiment of the invention.
- JavaTM Characteristics Model persistent class JFactDatabase ⁇ long id primary key; String version; String name; String sourceFile; references JPackage packages(0,n) inverse factDatabase(l,l); ⁇ // class JFactDatabase persistent class JPackage ⁇ long id primary key; String version; String name; String shortName; references JPackage packages (0,n) inverse parentPackage(l,l); references JClass classes (0,n) inverse parentPackage(l,l); ⁇ // class JPackage persistent class JClass ⁇ long id primary key; String version; String name; String shortName; Boolean isStatic; Boolean isFinal; Boolean islnner; String accessibility; String sourceFile; Integer filePosition; references JClass implementslnterfaces( ⁇ ,n) inverse implementingClasses(O,n); references JClass extendsClass(O,l) inverse extendingClasses(O,n); references JClass contains(0,
- the JFactDatabase artifact is defined in lines 1-7
- the JPackage artifact is defined in lines 9-16
- the JClass artifact is defined in lines 18-35
- the JMethod artifact is defined in lines 37-57
- the JField artifact is defined in lines 59-70
- the JParameter artifact is defined in lines 72-80.
- FIG. 3 A graphical representation of the JavaTM characteristics model described above is shown in FIG. 3. Specifically, FIG.
- FIG. 3 shows each of the aforementioned JavaTM characteristics model attributes (i.e., JFactDatabase, JPackage, JClass, JField, JParameter, and JMethod) as well as the characteristics associated with each of the aforementioned artifacts and the relationships between the aforementioned artifacts.
- box (130) corresponds to the JFactDatabase artifact
- box (132) corresponds to the JPackage artifact
- box (134) corresponds to the JClass artifact
- box (136) corresponds to the JField artifact
- box (138) corresponds to the JParameter artifact
- box (140) corresponds to the JMethod artifact.
- the characteristics model is used to generate a schema.
- JavaTM Schema CREATE TABLE JFactDatabase( id INTEGER, version VARCHAR(255), name VARCHAR(255), sourceFile VARCHAR(255), PRIMARY KEY ( id ) ); CREATE UNIQUE INDEX JFactDatabase PRIMARY KEY ON JFactDatabase(id); CREATE UNIQUE INDEX JFactDatabase_name ON JFactDatabase(name); COMMIT; CREATE TABLE JPackage( id INTEGER, version VARCHAR(255), name VARCHAR(255), shortName VARCHAR(255), factDatabase INTEGER, PRIMARY KEY ( id ) ); CREATE UNIQUE INDEX JPackage_PRIMARY_KEY ON JPackage(id); CREATE UNIQUE INDEX JPackage_name ON JPackage(name);
- lines 158-174 define the table associated with the JField artifact
- lines 176-188 define the table associated with the JParameter artifact
- lines 190-247 define additional tables used to implement the JavaTM schema
- lines 248-315 define the various relationships (e.g., 1 :1 and l :n) between the various artifacts defined in the JavaTM characteristics model.
- FIG. 4 shows a flowchart in accordance with one embodiment of the invention.
- a characteristics model is obtained (STlOO).
- the characteristics model is obtained from a predefined set of characteristics models.
- the characteristics model is a customized characteristics model to analyze a specific domain in the target system and obtained from a source specified by the user.
- the characteristics model is subsequently loaded into the meta model (ST 102).
- "loading" the characteristics model into the meta model includes extracting specific pieces of information about the characteristics model (such as the information described in the meta model schema shown in FIG. 2) and loading the extracted information into the meta model. [0052] Continuing with the discussion of FIG.
- a schema for the characteristics store is subsequently created and associated with characteristics model (STl 04).
- One or more characteristics extractors associated with characteristics model are subsequently created (ST 106).
- a characteristics store API is created (ST 108).
- creating the characteristics store API includes creating a mapping between characteristics obtained by the characteristics extractors and tables defined by the schema configured to store the characteristics in the characteristics store.
- STl 00-ST 108 may be repeated for each characteristics model.
- the characteristics store API may only need to be modified to support additional schemas in the characteristics data store and additional characteristics extractors.
- each characteristics model may be associated with a different characteristics store API.
- FIG. 5 shows a flowchart in accordance with one embodiment of the invention. Initially, characteristics are obtained from the target system using one or more characteristics extractors (STI lO). In one embodiment of the invention, the characteristics extractors associated with a given characteristics model only obtain information about characteristics associated with the artifacts defined in the characteristics model.
- STI lO characteristics extractors
- the characteristics obtained from the target system using the characteristics extractors are stored in the characteristics store using the characteristics store API (STl 12).
- the target system may be analyzed using the characteristics model (or models), the query engine, the meta model, and the characteristics stored in the characteristics store (STl 14) (describe below in FIG. 6).
- the user uses the query engine to issue queries to characteristics store.
- the query engine has access, via the meta model, to information about the characteristics models currently being used to analyze the target system.
- the results of the analysis are subsequently displayed using a visualization engine (STl 16).
- FIG. 6 shows a flowchart in accordance with one embodiment of the invention.
- a PQL query is received by the query engine (ST120).
- the PQL query is subsequently verified using the meta model (ST 122).
- verifying the PQL query includes searching the meta model to determine whether each component in the PQL query (i.e., artifact, characteristic, or relationship) is present in the meta model. If the meta model is implemented as a series of tables in accordance with a meta model schema (such as the one shown in FIG. 2), then searching the meta model includes searching the various tables in the meta model.
- a meta model schema such as the one shown in FIG. 2
- a determination of whether the verification of the PQL query was successful is subsequently made (ST124).
- the verification of the PQL query is successful if every component in the PQL query is present in the meta model.
- the meta model When the above query is submitted to the meta model for verification, the meta model first determines whether the "JClass” component is present in the meta model. Assuming that the JavaTM characteristics model (described above) is loaded into the meta model, then the meta model will discover that "JClass” is an artifact. Next, the meta model will attempt to verify whether "c.parentPackage.name” is a valid component. Since “c” is selected from “JClass” (as defined in the query), the component “c.parentPackage.name” may be re-written as "JClass.parentPackage.name.” As defined in the JavaTM characteristics model discussed above, “JClass” is related to "JPackage” through a “parentPackage” relationship. Further, "name” is a characteristic of "JPackage,” thus the component "JClass.parentPackage.name” is a valid component. As there are no other components in the query to verify, the verification of the query is complete and successful.
- the query engine may request a new or modified PQL query (ST 126). If a new or modified PQL query is submitted, then the method proceeds to ST 120. Alternatively, if a new or modified PQL query is not submitted, then the method ends.
- the meta model may also issue an error message indicating that the verification was not successful.
- PQL query is translated into a query understood by the characteristics store using the schema(s) associated with the various components in the PQL query (ST128).
- the characteristics store may not include functionality to query the characteristics using a PQL query.
- the PQL query is translated into a query understood by the characteristics store, for example, an SQL query.
- translating the PQL query into, for example, an SQL query includes obtaining information about how specific components (i.e., artifacts, characteristics, and relationships) are referred to in the characteristics store.
- the meta model upon successful verification of the PQL query, may query the individual characteristics models to determine how each of the components in the PQL query are represented in the characteristics store (i.e., what table each component is in, what name is used to refer to the component in the characteristics store, etc.).
- the query resulting from the translation is subsequently issued to the characteristics store (ST 130), and the results of the query are then returned to the query engine (ST132).
- ST 130 the characteristics store
- ST132 the results of the query are then returned to the query engine (ST132).
- FIG. 6 refers to PQL and SQL queries, other query languages (such as those discussed above) may be used.
- STI lO-STl 12 may be performed concurrently with STl 14-ST116.
- steps in FIG. 4, FIG. 5, and FIG. 6 may be performed concurrently.
- a networked computer system includes a processor (202), associated memory (204), a storage device (206), and numerous other elements and functionalities typical of today's computers (not shown).
- the networked computer (200) may also include input means, such as a keyboard (208) and a mouse (210), and output means, such as a monitor (212).
- the networked computer system (200) is connected to a local area network (LAN) or a wide area network via a network interface connection (not shown).
- LAN local area network
- network interface connection not shown.
- one or more elements of the aforementioned computer (200) may be located at a remote location and connected to the other elements over a network.
- software instructions to perform embodiments of the invention may be stored on a computer readable medium such as a compact disc (CD), a diskette, a tape, a file, or any other computer readable storage device. While the invention has been described with respect to a limited number of embodiments, those skilled in the art, having benefit of this disclosure, will appreciate that other embodiments can be devised which do not depart from the scope of the invention as disclosed herein. Accordingly, the scope of the invention should be limited only by the attached claims.
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
A method for analyzing a target system, where the method includes obtaining a plurality of characteristics from the target system using a characteristics extractor wherein each of the plurality of characteristics is associated with a characteristics model, storing each of the plurality of characteristics obtained from the target system in a characteristics store, and analyzing the target system by issuing at least one query to the characteristics store to obtain an analysis result.
Description
METHOD AND APPARATUS FOR PATTERN-BASED SYSTEM
DESIGN ANALYSIS
BACKGROUND
[0001] As software technology has evolved, new programming languages and increased programming language functionality has been provided. The resulting software developed using this evolving software technology has become more complex. The ability to manage the quality of software applications (including design quality and architecture quality) is becoming increasingly more difficult as a direct result of the increasingly complex software. In an effort to manage the quality of software applications, several software development tools and approaches are now available to aid software developers in managing software application quality. The following is a summary of some of the types of quality management tools currently available.
[0002] One common type of quality management tool is used to analyze the source code of the software application to identify errors (or potential errors) in the source code. This type of quality management tool typically includes functionality to parse the source code written in a specific programming language (e.g., Java™, C++, etc.) to determine whether the source code satisfies one or more coding rules (i.e., rules that define how source code in the particular language should be written). Some quality management tools of the aforementioned type have been augmented to also identify various coding constructs that may result in security or reliability issues. While the aforementioned type of quality management tools corrects coding errors, it does not provide the software developer with any functionality to verify the quality of the architecture of software application.
[0003] Other quality management tools of the aforementioned type have been augmented to verify that software patterns have been properly implemented. Specifically, some quality management tools of the aforementioned type have been augmented to allow the software developer to indicate, in the source code, the type of software pattern the developer is using. Then the quality management tool verifies, during compile time, that the software pattern was used/implemented correctly.
[0004] In another implementation of the aforementioned type of quality management tools, the source code of the software is parsed and the components (e.g., classes, interfaces, etc.) extracted from the parsing are subsequently combined in a relational graph (i.e., a graph linking all (or sub-sets) of the components). In a subsequent step, the software developer generates an architectural design, and then compares the architectural design to the relational graph to determine whether the software application conforms to the architectural pattern. While the aforementioned type of quality management tool enables the software developer to view the relationships present in the software application, it does not provide the software developer with any functionality to conduct independent analysis on the extracted components.
[0005] Another common type of quality management tool includes functionality to extract facts (i.e., relationships between components (classes, interfaces, etc.) in the software) and subsequently displays the extracted facts to the software developer. While the aforementioned type of quality management tool enables the software developer to view the relationships present in the software application, it does not provide the developer with any functionality to independently query the facts or any functionality to extract information other than facts from the software application.
[0006] Another common type of quality management tool includes functionality to extract and display various statistics (e.g., number of lines of code, new artifacts added, software packages present, etc.) of the software application to the software developer. While the aforementioned type of quality management tool enables the software developer to view the current state of the software application, it does not provide the developer with any functionality to verify the quality of the architecture of the software application.
SUMMARY
[0007] In general, in one aspect, the invention relates to a A method for analyzing a target system, comprising obtaining a characteristics model, loading the characteristics model into a meta model, obtaining a plurality of characteristics from the target system using a characteristics extractor, wherein each of the plurality of characteristics is associated with the characteristics model, storing each of the plurality of characteristics obtained from the target system in a characteristics store, and analyzing the target system by issuing at least one query to the characteristics store to obtain an analysis result, wherein the issuing the at least one query comprises verifying the at least one query using the meta model.
[0008] In general, in one aspect, the invention relates to a system for analyzing a target system, comprising a meta model configured to extract and store information about a characteristics model, the target system comprising a plurality of characteristics, at least one characteristics extractor configured to obtain at least one of the plurality of characteristics from the target system, wherein the at least one of the plurality of characteristics is defined in the characteristics model, a characteristics store configured to store the at least one of the plurality of characteristics obtained from the target system, and a query engine configured to analyze the target system by issuing at least one query to the characteristics store and configured to obtain an analysis result in response to
the at least one query, wherein the issuing the at least one query comprises verifying the at least one query using the meta model.
[0009] In general, in one aspect, the invention relates to a computer readable medium comprising software instructions for analyzing a target system, the software instructions executable on a computer to obtain a characteristics model, load the characteristics model into a meta model, obtain a plurality of characteristics from the target system using a characteristics extractor, wherein each of the plurality of characteristics is associated with the characteristics model, store each of the plurality of characteristics obtained from the target system in a characteristics store, and analyze the target system by issuing at least one query to the characteristics store to obtain an analysis result, wherein the issuing the at least one query comprises verifying the at least one query using the meta model.
[0010] Other aspects of the invention will be apparent from the following description and the appended claims.
BRIEF DESCRIPTION OF DRAWINGS
[0011] FIG. 1 shows a system in accordance with one embodiment of the invention.
[0012] FIG. 2 shows a meta model schema in accordance with one embodiment of the invention.
[0013] FIG. 3 shows a characteristics model in accordance one embodiment of the invention.
[0014] FIGS. 4 through 6 show flowcharts in accordance with one embodiment of the invention.
[0015] FIG. 7 shows a computer system in accordance with one embodiment of the invention.
DETAILED DESCRIPTION
[0016] Exemplary embodiments of the invention will be described with reference to the accompanying drawings. Like items in the drawings are shown with the same reference numbers.
[0017] In the exemplary embodiment of the invention, numerous specific details are set forth in order to provide a more thorough understanding of the invention. However, it will be apparent to one of ordinary skill in the art that the invention may be practiced without these specific details. In other instances, well-known features have not been described in detail to avoid obscuring the invention.
[0018] In general, embodiments of the invention relate to a method and apparatus for pattern-based system design analysis. More specifically, embodiments of the invention provide a method and apparatus for using one or more characteristics models, one or more characteristics extractors, a query engine configured to query the characteristics of a target system to analyze the system design, and a meta model configured to load the one or more characteristics models and configured to verify queries used to analyze the characteristics of the target system. Embodiments of the invention provide the software developer with a fully configurable software quality management tool that enables the software developer to extract information about the characteristics of the various artifacts in the target system, and then issue queries to determine specific details about the various artifacts including, but not limited to, information such as: number of artifacts of the specific type present in the target system, relationships between the various artifacts in the target system, the interaction of the various artifacts
within the target system, the software patterns that are used within the target system, etc.
[0019] FIG. 1 shows a system in accordance with one embodiment of the invention. The system includes a target system (100) (i.e., the system that is to be analyzed) and a number of components used in the analysis of the target system. In one embodiment of the invention, the target system (100) may correspond to a system that includes software, hardware, or a combination of software and hardware. More specifically, embodiments of the invention enable a user to analyze specific portions of a system or the entire system. Further, embodiments of the invention enable a user to analyze the target system with respect to a specific domain (discussed below). Accordingly, the target system (100) may correspond to any system under analysis where the system may correspond to the entire system including software and hardware, or only a portion of the system (e.g., only the hardware portion, only the software portion, a sub-set of the hardware or software portion, or any combination thereof).
[0020] As shown in FIG. 1, the system includes the following components to aid in the analysis of the target system: one or more characteristics extractors (e.g., characteristics extractor A (102A), characteristics extractor N (102N)), a characteristics store application programming interface (API) (104), a characteristics store (106), one or more characteristics models (108 A, 108N), a meta model (109), a query engine (110), and visualization engine (112). Each of these components is described below.
[0021] In one embodiment of the system, each of the characteristics models (108A,
108N) describes artifacts (i.e., discrete components) in a particular domain. In one embodiment of the invention, the domain corresponds to any grouping of "related artifacts" (i.e., there is a relationship between the artifacts). Examples of domains include, but are not limited to, a Java™ 2 Enterprise Edition (J2EE)
domain (that includes artifacts such as servlets, filters, welcome file, error page, etc.), a networking domain (that includes artifacts such as web server, domain name server, network interface cards, etc), a DTrace domain (that includes artifacts such as network, cpu, process, thread stack, function call, etc.) , and Java™ domain (described below). In one embodiment of the invention, each of the characteristics models (108 A, 108N) includes one or more artifacts, one or more relationships describing the interaction between the various artifacts, and one or more characteristics that describe various features of the artifact. An example of a characteristics model (108 A, 108N) is shown in FIG. 3.
[0022] In one embodiment of the invention, the use of characteristics models
(108A, 108N) enables a user to analyze the target system (100) with respect to a specific domain. Further, the use of multiple characteristics models (108 A, 108N) allows the user to analyze the target system (100) across multiple domains. In addition, the use of multiple characteristics models (108A, 108N) allows the user to analyze the interaction between various domains on the target system (100).
[0023] In one embodiment of the invention, other components in the system (e.g., characteristics store (106), characteristics store API (104), query engine (110), etc.) do not directly interact with the characteristics models (108A, 108N). Instead, the other components in the system communicate with the characteristics models (108A, 108N) through the meta model (109). In one embodiment of the invention, the meta model (109) provides a layer of abstraction between the other components in the system and the characteristics models (108 A, 108N). Thus, the meta model enables the other components in the system to operate without any knowledge of the actual characteristics models (108A, 108N) currently being used. Thus, the meta model (109) includes functionality to extract specific pieces of information from the characteristics models (108 A, 108N) in the system and store this information in a form that may be used by other
components within the system. Further, the meta model (109) enables characteristics models (108A, 108N) to be dynamically added and removed from the system (i.e., characteristics models (108A, 108N) may be "plugged-in" to the system). The structure and functionality of the meta model (109) is described below in FIG. 2.
[0024] In one embodiment of the invention, the characteristics extractors (e.g., characteristics extractor A (102A), characteristics extractor N (102N)) are used to obtain information about various artifacts (i.e., characteristics) defined in the characteristics models (108A, 108N). In one embodiment of the invention, the characteristics models (108A, 108N) are used to generate the characteristics extractor (e.g., characteristics extractor A (102A), characteristics extractor N (102N)). In one embodiment of the invention, the characteristics extractors (characteristics extractor A (102A), characteristics extractor N (102N)) are generated using the characteristics models (108A, 108N).
[0025] In one embodiment of the invention, the characteristics extractor (e.g., characteristics extractor A (102A), characteristics extractor N (102N)) corresponds to an agent loaded on the target system (100) that is configured to monitor and obtain information about the artifacts in the target system (100). Alternatively, the characteristics extractor (e.g., characteristics extractor A (102A), characteristics extractor N (102N)) may correspond to an interface that allows a user to manually input information about one or more artifacts. In another embodiment of the invention, the characteristics extractor (e.g., characteristics extractor A (102A), characteristics extractor N (102N)) may correspond to a process (or system) configured to obtain information about one or more artifacts in the target system (100) by monitoring network traffic received by and sent from the target system (100).
[0026] In another embodiment of the invention, the characteristics extractor (e.g., characteristics extractor A (102A), characteristics extractor N (102N)) may correspond to a process (or system) configured to obtain information about one or more artifacts in the target system (100) by sending requests (e.g., pinging, etc.) for specific pieces of information about artifacts in the target system (100) to the target system (100), or alternatively, sending requests to the target system and then extracting information about the artifacts from the responses received from target system (100).
[0027] In one embodiment of the invention, if the target system (100) corresponds to source code and the characteristics model (108 A, 108N) corresponds to a formal specification of a programming language (e.g., Java™), then the characteristics extractor (e.g., characteristics extractor A (102A), characteristics extractor N (102N)) may correspond to a process that is configured to parse the source code and temporarily store the artifacts and characteristics obtained from parsing the source code in an in-memory object graph.
[0028] Those skilled in the art will appreciate that different types of characteristics extractors may be used to obtain information about artifacts in the target system (100). Further, those skilled in the art will appreciate that each characteristics extractor (or set of characteristics extractors) is associated with a particular characteristics model (108A, 108N). Thus, each characteristics extractor typically only retrieves information about artifacts described in the characteristics model (108 A, 108N) with which the characteristics extractor is associated. Furthermore, if there are multiple characteristics models (108 A, 108N) in the system, then each characteristics model (108A, 108N) may be associated with one or more characteristics extractors.
[0029] The information about the various artifacts in the target system (100) obtained by the aforementioned characteristics extractors (characteristics
extractor A (102A), characteristics extractor N (102N)) is stored in the characteristics store (106) via the characteristic store API (104). In one embodiment of the invention, characteristics store API (104) provides an interface between the various characteristics extractors (characteristics extractor A (102A), characteristics extractor N (102N)) and the characteristics store (106). Further, the characteristics store API (104) includes information about where in the characteristics store (106) each characteristic obtained from the target system (100) should be stored.
[0030] In one embodiment of the invention, the characteristics store (106) corresponds to any storage that includes functionality to store characteristics in a manner that allows the characteristics to be queried. In one embodiment of the invention, the characteristics store (106) may correspond to a persistent storage device (e.g., hard disk, etc). In one embodiment of the invention, the characteristics store (106) corresponds to a relational database that may be queried using a query language such as Structure Query Language (SQL). Those skilled in the art will appreciate that any query language may be used. In one embodiment of the invention, if the characteristics store (106) is a relational database, then the characteristics model (108 A, 108N) may be used to generate a schema for storing the characteristics associated with the particular characteristics model (108A, 108N). Those skilled in the art will appreciate that each characteristics model (108 A, 108N) within the system may be associated with a separate schema.
[0031] In one embodiment of the invention, if the characteristics store (106) is a relational database that includes a schema generated from the characteristics model (108 A, 108N), then the characteristics store API (104) includes the necessary information to place characteristics obtained from target system (100) in the appropriate tables in the characteristics store (106). Specifically, the characteristics store API (104) may include information about which table in the
characteristics store (106) to place specific pieces of information about artifacts in the target system (100). In one embodiment of the invention, the characteristics store API (104) is generated using the characteristics model (108A, 108N).
[0032] In one embodiment of the invention, if the characteristics extractors are configured to temporarily store artifacts and characteristics obtained from the target system in an in-memory object graph, then the characteristic store API (104) is configured to populate the characteristics store (106) using the populated in-memory object graph. In one embodiment of the invention, characteristics store API (104) populates the characteristics store (106) by traversing the in- memory object graph and, for each artifact or characteristic encountered, determining where in the characteristics store (106) to store the artifact or characteristics, in accordance with the schema generated using the characteristics model with which the artifacts and characteristics are associated. In one embodiment of the invention, if the characteristics store (106) includes multiple schemas, then the characteristics store API (104) includes functionality to search the characteristics store (106) for the schema associated with the particular artifacts and/or characteristics.
[0033] In one embodiment of the invention, if the characteristics store (106) includes a schema, then the mapping of individual components (e.g., artifacts, characteristics, relationships) in the characteristics models (108A, 108N) to the various tables within the schema is stored in the corresponding characteristics model (108 A, 108N).
[0034] Continuing with the discussion of FIG. 1, in one embodiment of the invention, the query engine (110) is configured to issue queries to the characteristics store (106). In one embodiment of the invention, the queries issued by the query engine (110) enable a user (e.g., a system developer, etc.) to
analyze the target system (100). In particular, in one embodiment of the invention, the query engine (110) is configured to enable the user to analyze the presence of specific software patterns in the target system as well as the interaction between various software patterns in the target system.
[0035] In one embodiment of the invention, a software pattern corresponds to a framework that defines how specific components in the target system should be configured (e.g., what types of information each component should manage, what interfaces should each component expose), and how the specific components should communicate with each other (e.g., what data should be communicated to other components, etc.). Software patterns are typically used to address a specific problem in a specific context (i.e., the software/system environment in which the problem arises). Said another way, software patterns may correspond to a software architectural solution that incorporates best practices to solve a specific problem in a specific context.
[0036] Continuing with the discussion of FIG. 1, the query engine (110) may also be configured to issue queries about the interaction of specific software patterns with components that do not belong to a specific software pattern. Further, the query engine (110) may be configured to issue queries about the interaction of components that do not belong to any software patterns. In one embodiment of the invention, the query engine (110) includes functionality to verify the query using the meta model (109) prior to issuing the query to the characteristics store (106). The verification of the query using the meta model (109) is described below in FIG. 6.
[0037] In one embodiment of the invention, the query engine (110) may include pre-specified queries and/or enable to the user to specify custom queries. In one embodiment of the invention, both the pre-specified queries and the custom queries are used to identify the presence of one or more software patterns and/or
the presence of components that do not belong to a pattern in the target system (100). In one embodiment of the invention, the pre-specified queries and the custom queries are specified using a Pattern Query Language (PQL). In one embodiment of the invention, PQL enables the user to query the artifacts and characteristics of the artifacts stored in the characteristics store (106) to determine the presence of a specific software pattern, specific components of a specific software pattern, and/or other components that are not part of a software pattern, within the target system (100).
[0038] In one embodiment of the invention, the query engine (110) may include information (or have access to information) about the characteristics model (108A, 108N) that includes the artifact and/or characteristics being queried. Said another way, if the query engine (110) is issuing a query about a specific artifact, then the query engine (110) includes information (or has access to information) about the characteristics model to which the artifact belongs. Those skilled in the art will appreciate that the query engine (110) only requires information about the particular characteristics model (108A, 108N) to the extent the information is required to issue the query to the characteristics store (106).
[0039] Those skilled in the art will appreciate that, the query engine (110) may include functionality to translate PQL queries (i.e., queries written in PQL) into queries written in a query language understood by the characteristics store (106) (e.g., SQL). Thus, a query written in PQL may be translated into an SQL query prior to being issued to the characteristics store (106). In this manner, the user only needs to understand the artifacts and/or characteristics that the user wishes to search for and how to express the particular search using PQL. The user does not need to be concerned with how the PQL query is handled by the characteristics store (106).
[0040] Further, in one or more embodiments of the invention, PQL queries may be embedded in a programming language such as Java™, Groovy, or any other programming language capable of embedding PQL queries. Thus, a user may embed one or more PQL queries into a program written in one of the aforementioned programming languages. Upon execution, the program issues one or more PQL queries embedded within the program and subsequently receives and processes the results prior to displaying them to the user. Those skilled in the art will appreciate that the processing of the results is performed using functionality of the programming language in which the PQL queries are embedded.
[0041] In one embodiment of the invention, the results of the individual PQL queries may be displayed using the visualization engine (112). In one embodiment of the invention, the visualization engine (112) is configured to output the results of the queries on a display device (i.e., monitor, printer, projector, etc.).
[0042] FIG. 2 shows a meta model schema in accordance with one embodiment of the invention. As discussed above, the function of the meta model (109) is to provide a layer of abstraction between the components of the system and the characteristics models (108A, 108N). In one embodiment of the invention, the meta model (109) corresponds to a model that stores information that describes characteristics models (108A, 108N). More specifically, the meta model (109) stores meta model instances of the characteristics models (108A, 108N), where each meta model instance of the characteristics model (108 A, 108N) corresponds to the representation of the particular characteristics model within the meta model (109). In one embodiment of the invention, the representation of a characteristics model (108A, 108N) in the meta model is dictated by the meta model schema. An example of a meta model schema shown in FIG. 2.
[0043] As shown in FIG. 2, the meta model schema includes four entities: a meta model entity (120), a meta attribute entity (122), a meta characteristics entity (124), and a meta relationship entity (126). The meta model entity (120) represents a characteristics model (109). The meta model entity (120) may include zero or more meta attribute entities (122), where each meta attribute entity (122) is configured to store a name of an attribute associated with a characteristics model (108A, 108N). Each meta attribute entity (122) is associated with zero or more meta characteristics (124), where each meta characteristics is configured to store a name of a characteristic associated with the attribute stored in the associated meta attribute entity (122). In addition, each meta attribute entity (122) is also associated with zero or more meta relationships (126), where each meta relationship (126) is configured to store a name of relationship associated with the attribute store in the associated meta attribute entity (122). Exemplary information stored in each of the aforementioned entities is shown in FIG. 2.
[0044] In one embodiment of the invention, the meta model (109) includes exemplary information as described in the meta model schema shown in FIG. 2. However, the additional information associated with the particular characteristics model is maintained in the characteristics models (108A, 108N).
[0045] Those skilled in the art will appreciate that the meta model schema only describes the organization of the information within the meta model and that the actual implementation of the meta model schema may vary in different implementations. In one embodiment of the invention, the meta model is implemented as a relational database configured using the meta model schema.
[0046] In addition to extracting and storing information about characteristics models (108 A, 108N) within the system, the meta model (109) includes functionality to remove information that corresponds to characteristics models
(108A, 108N) that have been removed from the system. Further, the meta model (109) may also include functionality to request information from the specific characteristics models (108A, 108N) (e.g., information about how the specific attributes, characteristics, and relationships are represented in the characteristics store, etc.)- The meta model (109) also includes functionality to traverse and/or search the contents of the meta model to determine the presence of a specific artifact, characteristic, or relationship between artifacts in the system.
[0047] As discussed above, each characteristics model defines one or more artifacts, one or more relationships between the artifacts, and one or more characteristics for each artifact. In one embodiment of the invention, the characteristics model corresponds to a formal specification of a domain. The following is an example of a Java™ characteristics model that is formal specification of a Java™ language domain in accordance with one embodiment of the invention.
Java™ Characteristics Model persistent class JFactDatabase { long id primary key; String version; String name; String sourceFile; references JPackage packages(0,n) inverse factDatabase(l,l); } // class JFactDatabase persistent class JPackage { long id primary key; String version; String name; String shortName; references JPackage packages (0,n) inverse parentPackage(l,l); references JClass classes (0,n) inverse parentPackage(l,l); } // class JPackage persistent class JClass { long id primary key; String version;
String name; String shortName; Boolean isStatic; Boolean isFinal; Boolean islnner; String accessibility; String sourceFile; Integer filePosition; references JClass implementslnterfaces(θ,n) inverse implementingClasses(O,n); references JClass extendsClass(O,l) inverse extendingClasses(O,n); references JClass contains(0,n) inverse containingClass(l,l); references JMethod methods(0,n) inverse parentClass( 1,1); references JField fields(0,n) inverse parentClass(l,l); references JAnnotation annotations(0,n) inverse parentClass(l,l); } // class JClass persistent class JMethod { long id primary key; String version; String name; String shortName; Boolean isAbstract; Boolean isConstructor; Boolean isStatic; Boolean isFinal; Integer numParams; String accessibility; Integer filePosition; references JClass returnType(l , 1) inverse returnedBy(O,n); references JClass throwsExceptions(0,n) inverse thrownBy(0,n); references JClass catchesExceptions(0,n) inverse caughtBy(O,n); references JClass instantiates(O,n) inverse instantiatedBy(O,n); references JMethod calls(0,n) inverse callers(O,n); references JParameter parameters(O,n) inverse method( 1,1); references JField usedFields(O,n) inverse usedByMethods(0,n); references JAnnotation annotations(0,n) inverse parentMethod(l ,1 ); } // class JMethod persistent class JField { long id primary key; String version; String name; String shortName; Boolean isStatic; Boolean isFinal;
String accessibility; Integer filePosition; references JClass type(l,l) inverse typeFields(O,n); references JAnnotation annotations(0,n) inverse parentField( 1,1); } // class JField persistent class JParameter { long id primary key; String version; String name; String shortName; Integer index; references JClass type(l,l) inverse typeParameters(O,n); references JAnnotation annotations(0,n) inverse parentParameter( 1,1); } // class JParameter
[0048] In the above Java™ characteristics model, the JFactDatabase artifact is defined in lines 1-7, the JPackage artifact is defined in lines 9-16, the JClass artifact is defined in lines 18-35, the JMethod artifact is defined in lines 37-57, the JField artifact is defined in lines 59-70, and the JParameter artifact is defined in lines 72-80. A graphical representation of the Java™ characteristics model described above is shown in FIG. 3. Specifically, FIG. 3 shows each of the aforementioned Java™ characteristics model attributes (i.e., JFactDatabase, JPackage, JClass, JField, JParameter, and JMethod) as well as the characteristics associated with each of the aforementioned artifacts and the relationships between the aforementioned artifacts. In particular, box (130) corresponds to the JFactDatabase artifact, box (132) corresponds to the JPackage artifact, box (134) corresponds to the JClass artifact, box (136) corresponds to the JField artifact, box (138) corresponds to the JParameter artifact, and box (140) corresponds to the JMethod artifact.
[0049] As discussed above, the characteristics model is used to generate a schema.
The following text describes a textual representation of a Java™ schema generated using the Java™ characteristics model shown in FIG. 3.
Java™ Schema CREATE TABLE JFactDatabase( id INTEGER, version VARCHAR(255), name VARCHAR(255), sourceFile VARCHAR(255), PRIMARY KEY ( id ) ); CREATE UNIQUE INDEX JFactDatabase PRIMARY KEY ON JFactDatabase(id); CREATE UNIQUE INDEX JFactDatabase_name ON JFactDatabase(name); COMMIT; CREATE TABLE JPackage( id INTEGER, version VARCHAR(255), name VARCHAR(255), shortName VARCHAR(255), factDatabase INTEGER, PRIMARY KEY ( id ) ); CREATE UNIQUE INDEX JPackage_PRIMARY_KEY ON JPackage(id); CREATE UNIQUE INDEX JPackage_name ON JPackage(name); COMMIT; CREATE TABLE JClass( id INTEGER, version VARCHAR(255), name VARCHAR(255), shortName VARCHAR(255), isStatic BOOLEAN, isFinal BOOLEAN, islnner BOOLEAN, accessibility VARCHAR(255), sourceFile VARCHAR(255), fϊlePosition INTEGER, parentPackage INTEGER, extendsClass INTEGER, containingClass INTEGER, PRIMARY KEY ( id ) ); CREATE UNIQUE INDEX JClass_PRIMARY_KEY ON JClass(id);
CREATE UNIQUE INDEX JClass_name ON JClass(name); COMMIT; CREATE TABLE JClass_ImplementsInterfaces( ~ JOIN table for m:n relationship implementslnterfaces INTEGER, implementingClasses INTEGER, PRIMARY KEY ( implementsInterfaceSjirnplementingClasses ), KEY(implementsInterfaces), KEY(implementingClasses) ); CREATE TABLE JClass_ImplementsInterfacesTransitive( — JOIN table for m:n relationship implementslnterfaces INTEGER, implementingClasses INTEGER, PRIMARY KEY ( implementsInterfaces.irnplementingClasses ), KEY(implementsInterfaces), KEY(implementingClasses) ); COMMIT; CREATE TABLE JClass_ExtendsClasses( - JOIN table for m:n relationship extendsClasses INTEGER, extendingClasses INTEGER, PRIMARY KEY ( extendsClasses,extendingClasses ), KEY(extendsClasses), KEY(extendingClasses) ); CREATE TABLE JClass_ExtendsClassesTransitive( ~ JOIN table for m:n relationship extendsClasses INTEGER, extendingClasses INTEGER, PRIMARY KEY ( extendsClasses,extendingClasses ), KEY(extendsClasses), KEY(extendingClasses) ); COMMIT; CREATE TABLE JMethod_Calls( calls INTEGER, callers INTEGER, filePosition INTEGER, PRIMARY KEY (calls,callers), KEY(calls), KEY(callers) ); CREATE TABLE JMethod_CallsTransitive( calls INTEGER, callers INTEGER, filePosition INTEGER,
89 PRIMARY KEY (calls,callers),
90 KEY(calls), KEY(callers)
91 );
92 COMMIT; 93
94 CREATE TABLE JMethod_ThrowsExceptions(
95 throwsExceptions INTEGER,
96 thrownBy INTEGER,
97 filePosition INTEGER,
98 PRIMARY KEY ( throwsExceptions,thrownBy ),
99 KEY(throwsExceptions), KEY(thrownBy)
100 );
101 COMMIT; 102
103 CREATE TABLE JMethod_CatchesExceptions(
104 catchesExceptions INTEGER,
105 caughtBy INTEGER,
106 filePosition INTEGER,
107 PRIMARY KEY ( catchesExceptions,caughtBy ),
108 KEY(catchesExceptions), KEY(caughtBy)
109 );
110 COMMIT;
111 CREATE TABLE JMethod_Instantiates(
112 callingMethod INTEGER,
113 instantiatedClass INTEGER,
114 filePosition INTEGER,
115 PRIMARY KEY ( callingMethod.instantiatedClass ),
116 KEY(callingMethod), KEY(instantiatedClass)
117 ); 118
119 CREATE TABLE JMethod_InstantiatesTransitive(
120 callingMethod INTEGER,
121 instantiatedClass INTEGER,
122 filePosition INTEGER,
123 PRIMARY KEY ( callingMethod,instantiatedClass ),
124 KEY(callingMethod), KEY(instantiatedClass)
125 );
126 COMMIT; 127
128 CREATE TABLE JMethod(
129 id INTEGER,
130 version VARCHAR(255),
131 name VARCHAR(255),
132 shortName VARCHAR(255), 133 isAbstract BOOLEAN,
134 isConstructor BOOLEAN,
135 isStatic BOOLEAN,
136 isFinal BOOLEAN,
137 numParams INTEGER,
138 accessibility VARCHAR(255),
139 filePosition INTEGER,
140 parentClass INTEGER,
141 retuπiType INTEGER,
142 PRIMARY KEY ( id )
143 ); 144
145 CREATE UNIQUE INDEX JMethod_PRIMARY_KEY ON JMethod(id)
146 CREATE UNIQUE INDEX JMethod_name ON JMethod(name);
147 COMMIT; 148
149 CREATE TABLE JMethod_UsedFields(
150 usedFields INTEGER,
151 usedByMethods INTEGER,
152 filePosition INTEGER,
153 PRIMARY KEY ( usedFields.usedByMethods ),
154 KEY(usedFields), KEY(usedByMethods)
155 );
156 COMMIT; 157
158 CREATE TABLE JField(
159 id INTEGER,
160 version VARCHAR(255),
161 name VARCHAR(255),
162 shortName VARCHAR(255),
163 isStatic BOOLEAN,
164 isFinal BOOLEAN,
165 accessibility VARCHAR(255),
166 filePosition INTEGER,
167 parentClass INTEGER,
168 type INTEGER,
169 PRIMARY KEY ( id )
170 ); 171
172 CREATE UNIQUE INDEX JField_PRIMARY_KEY ON JField(id);
173 CREATE UNIQUE INDEX JField_name ON JField(name);
174 COMMIT; 175
176 CREATE TABLE JParameter(
177 id INTEGER PRIMARY KEY,
178 version VARCHAR(255),
179 name VARCHAR(255),
180 shortName VARCHAR(255),
181 parameterlndex INTEGER,
182 method INTEGER,
183 type INTEGER
184 ); 185
186 CREATE UNIQUE INDEX JParameter_PRIMARY_KEY ON JParameter(id);
187 CREATE UNIQUE INDEX JParameter name ON JParameter(name);
188 COMMIT; 189
190 CREATE TABLE JAnnotation(
191 id INTEGER PRIMARY KEY,
192 version VARCHAR(255),
193 name VARCHAR(255),
194 shortName VARCHAR(255),
195 numArgs INTEGER,
196 parentClass INTEGER,
197 parentMethod INTEGER,
198 parentField INTEGER,
199 parentParameter INTEGER,
200 type INTEGER
201 ); 202
203 CREATE UNIQUE INDEX JAnnotation PRIMARYJCEY ON JAnnotation(id);
204 CREATE UNIQUE INDEX JAnnotation name ON JAnnotation(name);
205 COMMIT; 206
207 CREATE TABLE JAnnotationArgument(
208 id INTEGER PRIMARY KEY,
209 version VARCHAR(255),
210 name VARCHAR(255),
211 shortName VARCHAR(255),
212 stringValue VARCHAR(10000),
213 annotation INTEGER,
214 type INTEGER
215 ); 216
217 CREATE UNIQUE INDEX JAnnotationArgument_PRIMARY_KE Y ON
218 J AnnotationArgument(id) ;
219 CREATE UNIQUE INDEX JAnnotationArgument name ON JAnnotationArgument(name);
220 COMMIT; 221
222 CREATE TABLE WriteVariable( 223
224 cookie VARCHAR(255),
225 scope INTEGER,
226 name VARCHAR(255),
227 varlndex INTEGER,
228 nodeld DECIMAL(20,0),
229 nodeName VARCHAR(255)
230 ); 231
232 COMMIT;
233
234 CREATE TABLE ReadVariable(
235
236 cookie VARCHAR(255),
237 scope INTEGER,
238 name VARCHAR(255),
239 varlndex INTEGER,
240 nodeld DECIMAL(20,0),
241 nodeName VARCHAR(255)
242 ); 243
244 CREATE UNIQUE INDEX ReadVariable_PRIMARY_KEY ON
245 ReadVariable(cookie,scope,name,varIndex);
246 COMMIT; 247
248 ALTER TABLE JPackage ADD CONSTRAINT JPackage_factDatabase FOREIGN KEY
249 (factDatabase) REFERENCES JFactDatabase(id);
250 ALTER TABLE JClass ADD CONSTRAINT JClass_parentPackage FOREIGN KEY
251 (parentPackage) REFERENCES JPackage(id);
252 ALTER TABLE JClass ADD CONSTRAINT JClass_extendsClass FOREIGN KEY
253 (extendsClass) REFERENCES JClass(id);
254 ALTER TABLE JClass ADD CONSTRAINT JClass_containingClass FOREIGN KEY
255 (containingClass) REFERENCES JClass(id);
256 ALTER TABLE JClassJmplementsInterfaces ADD CONSTRAINT
257 JClass_ImplementsInterfaces_fk_for_implementsInterfaces FOREIGN KEY
258 (implementslnterfaces) REFERENCES JClass(id);
259 ALTER TABLE JClassJmplementsInterfaces ADD CONSTRAINT
260 JClass_ImplementsInterfaces_fk_for_implementingClasses FOREIGN KEY
261 (implementingClasses) REFERENCES JClass(id);
262 ALTER TABLE JClass_ExtendsClasses ADD CONSTRAINT
263 JClass_ExtendsClasses_fk_for_extendsClasses FOREIGN KEY (extendsClasses)
264 REFERENCES JClass(id);
265 ALTER TABLE JClass_ExtendsClasses ADD CONSTRAINT
266 JClass_ExtendsClasses_fk_for_extendingClasses FOREIGN KEY (extendingClasses)
267 REFERENCES JClass(id);
268 ALTER TABLE JMethod ThrowsExceptions ADD CONSTRAINT
269 JMethod_ThrowsExceptions_fk_for_throwsExceptions FOREIGN KEY
270 (throwsExceptions) REFERENCES JMethod(id);
271 ALTER TABLE JMethod_ThrowsExceptions ADD CONSTRAINT
272 JMethod_ThrowsExceptions_fk_for_thrownBy FOREIGN KEY (thrownBy)
273 REFERENCES JClass(id);
274 ALTER TABLE JMethod_CatchesExceptions ADD CONSTRAINT
275 JMethod_CatchesExceptions_fk_for_catchesExceptions FOREIGN KEY
276 (catchesExceptions) REFERENCES JMethod(id);
277 ALTER TABLE JMethod_CatchesExceptions ADD CONSTRAINT
278 JMethod_CatchesExceptions_fk_for_caughtBy FOREIGN KEY (caughtBy)
279 REFERENCES JClass(id);
280 ALTER TABLE JMethod ADD CONSTRAINT JMethod_parentClass FOREIGN KEY
281 (parentClass) REFERENCES JClass(id);
282 ALTER TABLE JMethod ADD CONSTRAINT JMethod_returnType FOREIGN KEY
283 (returnType) REFERENCES JClass(id);
284 ALTER TABLE JMethod Calls ADD CONSTRAINT JMethod_Calls_fk_for_calls FOREIGN
285 KEY (calls) REFERENCES JMethod(id);
286 ALTER TABLE JMethod_Calls ADD CONSTRAINT JMethod_Calls_fk_for_callers FOREIGN
287 KEY (callers) REFERENCES JMethod(id);
288 ALTER TABLE JMethodJJsedFields ADD CONSTRAINT
289 JMethodJJsedFields Jk for usedFields FOREIGN KEY (usedFields) REFERENCES
290 JMethod(id);
291 ALTER TABLE JMethodJJsedFields ADD CONSTRAINT
292 JMethod JJsedFields Jk Jor usedByMethods FOREIGN KEY (usedByMethods)
293 REFERENCES JField(id);
294 ALTER TABLE JField ADD CONSTRAINT JField_parentClass FOREIGN KEY (parentClass)
295 REFERENCES JClass(id);
296 ALTER TABLE JField ADD CONSTRAINT JField Jype FOREIGN KEY (type)
297 REFERENCES JClass(id);
298 ALTER TABLE JParameter ADD CONSTRAINT JParameter_method FOREIGN KEY
299 (method) REFERENCES JMethod(id);
300 ALTER TABLE JParameter ADD CONSTRAINT JParameter type FOREIGN KEY (type)
301 REFERENCES JClass(id);
302 ALTER TABLE JAnnotation ADD CONSTRAINT JAnnotation_parentClass FOREIGN KEY
303 (parentClass) REFERENCES JClass(id);
304 ALTER TABLE JAnnotation ADD CONSTRAINT JAnnotation_parentMethod FOREIGN KEY
305 (parentMethod) REFERENCES JMethod(id);
306 ALTER TABLE JAnnotation ADD CONSTRAINT JAnnotation_parentField FOREIGN KEY
307 (parentField) REFERENCES JField(id);
308 ALTER TABLE JAnnotation ADD CONSTRAINT JAnnotation_parentParameter FOREIGN
309 KEY (parentParameter) REFERENCES JParameter(id);
310 ALTER TABLE JAnnotation ADD CONSTRAINT JAnnotationJype FOREIGN KEY (type)
311 REFERENCES JClass(id);
312 ALTER TABLE JAnnotationArgument ADD CONSTRAINT JAnnotationArgument_annotation
313 FOREIGN KEY (annotation) REFERENCES JAnnotation(id);
314 ALTER TABLE JAnnotationArgument ADD CONSTRAINT JAnnotationArgumentJype
315 FOREIGN KEY (type) REFERENCES JClass(id);
[0050] The following describes the various portions of the Java™ Schema: (i) lines
1-11 define the table associated with the JFactDatabase artifact; (ii) lines 13-24 define the table associated with the JPackage artifact; (iii) lines 26-45 define the table associated with the JClass artifact; (iv) lines 47-76 define various join tables used to represent various m:n relationships defined in the Java™ characteristics model shown in FIG. 3 for the JClass artifact; (v) lines 128-147 define the table associated with the JMethod artifact; (vi) lines 78-126 and 149- 157 define various tables used to represent various relationships defined in the Java™ characteristics mode shown in FIG. 3 for the JMethod artifact; (vii) lines 158-174 define the table associated with the JField artifact; (viii) lines 176-188 define the table associated with the JParameter artifact; (ix) lines 190-247 define additional tables used to implement the Java™ schema; (x) lines 248-315 define the various relationships (e.g., 1 :1 and l :n) between the various artifacts defined in the Java™ characteristics model.
[0051] FIG. 4 shows a flowchart in accordance with one embodiment of the invention. Initially, a characteristics model is obtained (STlOO). In one embodiment of the invention, the characteristics model is obtained from a predefined set of characteristics models. Alternatively, the characteristics model is a customized characteristics model to analyze a specific domain in the target system and obtained from a source specified by the user. The characteristics model is subsequently loaded into the meta model (ST 102). In one embodiment of the invention, "loading" the characteristics model into the meta model includes extracting specific pieces of information about the characteristics model (such as the information described in the meta model schema shown in FIG. 2) and loading the extracted information into the meta model.
[0052] Continuing with the discussion of FIG. 4, a schema for the characteristics store is subsequently created and associated with characteristics model (STl 04). One or more characteristics extractors associated with characteristics model are subsequently created (ST 106). Finally, a characteristics store API is created (ST 108). In one embodiment of the invention, creating the characteristics store API includes creating a mapping between characteristics obtained by the characteristics extractors and tables defined by the schema configured to store the characteristics in the characteristics store.
[0053] Those skilled in the art will appreciate that STl 00-ST 108 may be repeated for each characteristics model. In addition, those skilled in the art will appreciate that once a characteristics store API is created, the characteristics store API may only need to be modified to support additional schemas in the characteristics data store and additional characteristics extractors. Alternatively, each characteristics model may be associated with a different characteristics store API.
[0054] At this stage, the system is ready to analyze a target system. FIG. 5 shows a flowchart in accordance with one embodiment of the invention. Initially, characteristics are obtained from the target system using one or more characteristics extractors (STI lO). In one embodiment of the invention, the characteristics extractors associated with a given characteristics model only obtain information about characteristics associated with the artifacts defined in the characteristics model.
[0055] Continuing with the discussion of FIG. 5, the characteristics obtained from the target system using the characteristics extractors are stored in the characteristics store using the characteristics store API (STl 12). Once the characteristics are stored in the characteristics store, the target system may be analyzed using the characteristics model (or models), the query engine, the meta model, and the characteristics stored in the characteristics store (STl 14)
(describe below in FIG. 6). In one embodiment of the invention, the user uses the query engine to issue queries to characteristics store. As discussed above, the query engine has access, via the meta model, to information about the characteristics models currently being used to analyze the target system. The results of the analysis are subsequently displayed using a visualization engine (STl 16).
[0056] FIG. 6 shows a flowchart in accordance with one embodiment of the invention. Initially, a PQL query is received by the query engine (ST120). The PQL query is subsequently verified using the meta model (ST 122). In one embodiment of the invention, verifying the PQL query includes searching the meta model to determine whether each component in the PQL query (i.e., artifact, characteristic, or relationship) is present in the meta model. If the meta model is implemented as a series of tables in accordance with a meta model schema (such as the one shown in FIG. 2), then searching the meta model includes searching the various tables in the meta model.
[0057] A determination of whether the verification of the PQL query was successful is subsequently made (ST124). The verification of the PQL query is successful if every component in the PQL query is present in the meta model.
[0058] The following is an example of PQL query and the process involved in verifying the various components of the PQL query.
Query
SELECT c from JClass c WHERE c.parentPackage.name = "java.lang"
[0059] When the above query is submitted to the meta model for verification, the meta model first determines whether the "JClass" component is present in the meta model. Assuming that the Java™ characteristics model (described above) is loaded into the meta model, then the meta model will discover that "JClass" is
an artifact. Next, the meta model will attempt to verify whether "c.parentPackage.name" is a valid component. Since "c" is selected from "JClass" (as defined in the query), the component "c.parentPackage.name" may be re-written as "JClass.parentPackage.name." As defined in the Java™ characteristics model discussed above, "JClass" is related to "JPackage" through a "parentPackage" relationship. Further, "name" is a characteristic of "JPackage," thus the component "JClass.parentPackage.name" is a valid component. As there are no other components in the query to verify, the verification of the query is complete and successful.
[0060] Continuing with the discussion of FIG. 6, if the verification is not successful, then the query engine may request a new or modified PQL query (ST 126). If a new or modified PQL query is submitted, then the method proceeds to ST 120. Alternatively, if a new or modified PQL query is not submitted, then the method ends. Those skilled in the art will appreciate that the meta model may also issue an error message indicating that the verification was not successful.
[0061] If the PQL query is successfully verified, then PQL query is translated into a query understood by the characteristics store using the schema(s) associated with the various components in the PQL query (ST128). As discussed above, the characteristics store may not include functionality to query the characteristics using a PQL query. In such cases, the PQL query is translated into a query understood by the characteristics store, for example, an SQL query. In one embodiment of the invention, translating the PQL query into, for example, an SQL query includes obtaining information about how specific components (i.e., artifacts, characteristics, and relationships) are referred to in the characteristics store. Thus, the meta model, upon successful verification of the PQL query, may query the individual characteristics models to determine how each of the components in the PQL query are represented in the characteristics store (i.e.,
what table each component is in, what name is used to refer to the component in the characteristics store, etc.).
[0062] Continuing with the discussion of FIG. 6, the query resulting from the translation is subsequently issued to the characteristics store (ST 130), and the results of the query are then returned to the query engine (ST132). Those skilled in the art will appreciate that while FIG. 6 refers to PQL and SQL queries, other query languages (such as those discussed above) may be used. Further, those skilled in the art will appreciate that STI lO-STl 12 may be performed concurrently with STl 14-ST116. In addition, steps in FIG. 4, FIG. 5, and FIG. 6 may be performed concurrently.
[0063] An embodiment of the invention may be implemented on virtually any type of computer regardless of the platform being used. For example, as shown in FIG. 7, a networked computer system (200) includes a processor (202), associated memory (204), a storage device (206), and numerous other elements and functionalities typical of today's computers (not shown). The networked computer (200) may also include input means, such as a keyboard (208) and a mouse (210), and output means, such as a monitor (212). The networked computer system (200) is connected to a local area network (LAN) or a wide area network via a network interface connection (not shown). Those skilled in the art will appreciate that these input and output means may take other forms. Further, those skilled in the art will appreciate that one or more elements of the aforementioned computer (200) may be located at a remote location and connected to the other elements over a network. Further, software instructions to perform embodiments of the invention may be stored on a computer readable medium such as a compact disc (CD), a diskette, a tape, a file, or any other computer readable storage device.
While the invention has been described with respect to a limited number of embodiments, those skilled in the art, having benefit of this disclosure, will appreciate that other embodiments can be devised which do not depart from the scope of the invention as disclosed herein. Accordingly, the scope of the invention should be limited only by the attached claims.
Claims
1. A method for analyzing a target system, comprising: obtaining a plurality of characteristics from the target system using a characteristics extractor, wherein each of the plurality of characteristics is associated with a characteristics model; storing each of the plurality of characteristics obtained from the target system in a characteristics store; and analyzing the target system by issuing at least one query to the characteristics store to obtain an analysis result.
2. The method of claim 1, further comprising: obtaining the characteristics model; generating the characteristics extractor associated with the characteristics model; and generating a characteristics store application programming interface (API) associated with the characteristics model, wherein the characteristics extractor uses the characteristics store API to store each of the plurality of characteristics in the characteristics store.
3. The method of claim 1, further comprising: displaying the analysis result.
4. The method of claim 1, further comprising: loading the characteristics model into a meta model.
5. The method of claim 4, wherein the characteristics model comprises a plurality of artifacts, at least one relationship between a first one of the plurality of artifacts and a second one of the plurality of artifacts, and at least one characteristic associated with each of the plurality of artifacts.
6. The method of claim 5, wherein the meta model is associated with a meta model schema, wherein the meta model schema comprises a plurality of meta attributes, a plurality of meta characteristics, and a plurality of meta relationships, wherein each of the plurality of meta attributes is configured to store a name of one of the plurality of artifacts, wherein each of the plurality of the meta relationships is configured to store a name for the at least one relationship, wherein each of the plurality of meta characteristics is configured to store a name for the at least one characteristics associated with each of the plurality of artifacts.
7. The method of claim 4, wherein issuing the at least one query comprises verifying the at least one query using the meta model.
8. The method of claim 7, wherein verifying the at least one query comprises traversing the meta model to determine whether each component within the at least one query is defined in the meta model, wherein each component comprises one selected from the group consisting of a characteristic, an artifact, and a relationship.
9. The method of claim 8, wherein verifying the at least one query further comprises translating the at least one query from a pattern query language query into a query language supported by the characteristics store, if the at least one query is successfully verified.
10. The method of claim 9, wherein translating the at least one query comprises using a schema implemented in the characteristics store, wherein the schema is associated with the characteristics model.
11. The method of claim 1 , wherein the at least one query is defined using a pattern query language.
12. The method of claim 11, wherein the pattern query language includes functionality to search for at least one software pattern in the target system.
13. The method of claim 1, wherein the characteristics store is a relational database.
14. A system for analyzing a target system, comprising: the target system comprising a plurality of characteristics; at least one characteristics extractor configured to obtain at least one of the plurality of characteristics from the target system, wherein the at least one of the plurality of characteristics is defined in a characteristics model; a characteristics store configured to store the at least one of the plurality of characteristics obtained from the target system; and a query engine configured to analyze the target system by issuing at least one query to the characteristics store and configured to obtain an analysis result in response to the at least one query.
15. The system of claim 14, further, comprising: a characteristics store API, wherein the at least one characteristics extractor is associated with the characteristics model and is configured to use the characteristics store API to store at least one of the plurality of characteristics obtained from the target system in the characteristics store.
16. The system of claim 14, further comprising: a meta model configured to extract and store information about the characteristics model.
17. The system of claim 16, wherein the characteristics model comprises a plurality of artifacts, at least one relationship between a first one of the plurality of artifacts and a second one of the plurality of artifacts, and at least one characteristic associated with each of the plurality of artifacts.
18. The system of claim 17, wherein the meta model is associated with a meta model schema, wherein the meta model schema comprises a plurality of meta attributes, a plurality of meta characteristics, and a plurality of meta relationships, wherein each of the plurality of meta attributes is configured to store a name of one the plurality of artifacts, wherein the meta relationship is configured to store a name for the at least one relationship, wherein each of the plurality of meta characteristics are configured to store a name for the at least one characteristics associated with each of the plurality of artifacts.
19. The system of claim 16, wherein extracting the information from the characteristics model comprises obtaining information about the characteristics model to create an meta model instance of the characteristics model using a meta model schema associated with the meta model.
20. The system of claim 16, wherein issuing the at least one query comprises verifying the at least one query using the meta model.
21. The system of claim 20, wherein verifying the at least one query comprises traversing the meta model to determine whether each component within the at least one query is defined in the meta model, wherein each component comprises one selected from the group consisting of a characteristic, an artifact, and a relationship.
22. The system of claim 21, wherein verifying the at least one query further comprises translating the at least one query from a pattern query language query into a query language supported by the characteristics store, if the at least one query is successfully verified.
23. The system of claim 22, wherein translating the at least one query comprises using a schema implemented in the characteristics store, wherein the schema is associated with the characteristics model.
24. The system of claim 14, wherein the at least one query is defined using a pattern query language and wherein the pattern query language includes functionality to search for at least one pattern in the target system.
25. A computer readable medium comprising software instructions for analyzing a target system, the software instructions executable on a computer to: obtain a plurality of characteristics from the target system using a characteristics extractor, wherein each of the plurality of characteristics is associated with a characteristics model; store each of the plurality of characteristics obtained from the target system in a characteristics store; and analyze the target system by issuing at least one query to the characteristics store to obtain an analysis result.
26. The computer readable medium of claim 25, further comprising software instructions to: load the characteristics model into a meta model.
27. The computer readable medium of claim 26, wherein the characteristics model comprises a plurality of artifacts, at least one relationship between a first one of the plurality of artifacts and a second one of the plurality of artifacts, and at least one characteristic associated with each of the plurality of artifacts and wherein the meta model is associated with a meta model schema, wherein the meta model schema comprises a plurality of meta attributes, a plurality of meta characteristics, and a plurality of meta relationships, wherein each of the plurality of meta attributes is configured to store a name of one of the plurality of artifacts, wherein each of the plurality of the meta relationships is configured to store a name for the at least one relationship, wherein each of the plurality of meta characteristics is configured to store a name for the at least one characteristics associated with each of the plurality of artifacts.
28. The computer readable medium of claim 26, wherein software instructions to issue the at least one query comprise software instructions to verify the at least one query using the meta model.
29. The computer readable medium of claim 28, wherein software instructions to verify the at least one query comprise software instructions to traverse the meta model to determine whether each component within the at least one query is defined in the meta model, wherein each component comprises one selected from the group consisting of a characteristic, an artifact, and a relationship.
30. The computer readable medium of claim 29, wherein software instructions to verify the at least one query further comprise software instructions to translate the at least one query from a pattern query language query into a query language supported by the characteristics store, if the at least one query is successfully verified.
31. The computer readable medium of claim 30, wherein software instructions to translate the at least one query comprise software instructions to use a schema implemented in the characteristics store, wherein the schema is associated with the characteristics model.
Applications Claiming Priority (4)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US11/134,062 | 2005-05-20 | ||
US11/134,062 US20060265700A1 (en) | 2005-05-20 | 2005-05-20 | Method and apparatus for pattern-based system design analysis |
US11/134,021 | 2005-05-20 | ||
US11/134,021 US7634766B2 (en) | 2005-05-20 | 2005-05-20 | Method and apparatus for pattern-based system design analysis using a meta model |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2006126989A1 true WO2006126989A1 (en) | 2006-11-30 |
Family
ID=37452306
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/US2005/018003 WO2006126989A1 (en) | 2005-05-20 | 2005-05-23 | Method and apparatus for pattern-based system design analysis |
Country Status (1)
Country | Link |
---|---|
WO (1) | WO2006126989A1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2021124962A (en) * | 2020-02-05 | 2021-08-30 | 富士通株式会社 | Management program, management device and management method |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20010042067A1 (en) * | 1999-10-04 | 2001-11-15 | Homayoun Dayani-Fard | Dynamic semi-structured repository for mining software and software-related information |
-
2005
- 2005-05-23 WO PCT/US2005/018003 patent/WO2006126989A1/en active Application Filing
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20010042067A1 (en) * | 1999-10-04 | 2001-11-15 | Homayoun Dayani-Fard | Dynamic semi-structured repository for mining software and software-related information |
Non-Patent Citations (2)
Title |
---|
LANGE C ET AL: "Comparing graph-based program comprehension tools to relational database-based tools", PROGRAM COMPREHENSION, 2001. IWPC 2001. PROCEEDINGS. 9TH INTERNATIONAL WORKSHOP ON 12-13 MAY 2001, PISCATAWAY, NJ, USA,IEEE, 12 May 2001 (2001-05-12), pages 209 - 218, XP010541022, ISBN: 0-7695-1131-7 * |
SARTIPI K ET AL: "A pattern matching framework for software architecture recovery and restructuring", PROCEEDINGS IWPC'00. 8TH INTERNATIONAL WORKSHOP ON PROGRAM COMPREHENSION, 10 June 2000 (2000-06-10) - 11 June 2000 (2000-06-11), LIMERICK, IRELAND, pages 1 - 11, XP002357227, ISBN: 0-7695-0656-9 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2021124962A (en) * | 2020-02-05 | 2021-08-30 | 富士通株式会社 | Management program, management device and management method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7814459B2 (en) | System and method for automated on demand replication setup | |
US8065323B2 (en) | Offline validation of data in a database system for foreign key constraints | |
CN102687124B (en) | Apparatus and method for analyzing query optimizer performance | |
US7870163B2 (en) | Implementation of backward compatible XML schema evolution in a relational database system | |
US8577927B2 (en) | Producing a virtual database from data sources exhibiting heterogeneous schemas | |
US7970732B2 (en) | Data migration | |
US7194475B2 (en) | Method, system, and program for performing an impact analysis of program statements in at least one source code file | |
US8180810B2 (en) | Interactive generation of integrated schemas | |
US20060143144A1 (en) | Rule sets for a configuration management system | |
US20120272329A1 (en) | Obfuscating sensitive data while preserving data usability | |
US20060037000A1 (en) | Configuration management data model using blueprints | |
US8260813B2 (en) | Flexible data archival using a model-driven approach | |
US20060149408A1 (en) | Agent-less discovery of software components | |
US20040205509A1 (en) | System and method for comparing parsed XML files | |
US20030177442A1 (en) | System and method for comparing hashed XML files | |
US7634766B2 (en) | Method and apparatus for pattern-based system design analysis using a meta model | |
US7653898B1 (en) | Method and apparatus for generating a characteristics model for a pattern-based system design analysis using a schema | |
Bisbal et al. | A survey of research into legacy system migration | |
US7490098B2 (en) | Apparatus, system, and method for processing hierarchical data in disparate data repositories | |
US7571434B1 (en) | Method and apparatus for transparent invocation of a characteristics extractor for pattern-based system design analysis | |
US7703074B2 (en) | Method and apparatus for tracking changes in a system | |
US20070112886A1 (en) | Method and apparatus for database change management | |
WO2005055561A2 (en) | System and method for managing oss component configuration | |
US20060265697A1 (en) | Pattern query language | |
US20050114642A1 (en) | System and method for managing OSS component configuration |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application | ||
NENP | Non-entry into the national phase |
Ref country code: DE |
|
NENP | Non-entry into the national phase |
Ref country code: RU |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 05754442 Country of ref document: EP Kind code of ref document: A1 |