Subscribe by Email


Tuesday, September 15, 2009

Introduction to Reengineering

Re-engineering occurs at two different levels of abstraction. At the business level, re-engineering focuses on the business process with the intent of making changes to improve competitiveness in some area of the business. At the software level, re-engineering examines information systems and applications with the intent of restructuring or reconstructing them so that they exhibit higher quality.
Business process reengineering defines business goals, identifies and evaluates existing business processes, specifies and designs revised processes, and prototypes, refines, and instantiates them within a business.
Business process reengineering (BPR) has a focus that extends beyond software. The result of BPR is often the definition of ways in which information technologies can better support the business.
Software reengineering encompasses a series of activities that include inventory analysis, document restructuring, reverse engineering, program and data restructuring, and forward engineering. The intent of these activities is to create versions of existing programs that exhibit higher quality and better maintainability-programs that will be viable well into the next century.
Inventory analysis enables an organization to assess each application systematically, with the intent of determining which are candidates for reengineering. Document restructuring creates a framework of documentation that is necessary for the long-term support of an application. reverse engineering is the process of analyzing a program in an effort to extract data, architectural, and procedural design information. Finally, forward engineering reconstructs a program using modern software engineering practices and information learned during reverse engineering.
The cost/benefit of reengineering can be determined quantitatively. The cost of the status quo, that is, the cost associated with ongoing support and maintenance of an existing application, is compared to the projected costs of reengineering and the resultant reduction in maintenance costs. In almost every case in which a program has a long life and currently exhibits poor maintainability, reengineering represents a cost-effective strategy.


Software Reverse Engineering Techniques

Software reverse engineering is done to retrieve the source code of a program because the source code was lost, to study how the program performs certain operations, to improve the performance of a program, to fix a bug (correct an error in the program when the source code is not available), to identify malicious content in a program such as a virus or to adapt a program written for use with one microprocessor for use with another. Reverse engineering for the purpose of copying or duplicating programs may constitute a copyright violation. In some cases, the licensed use of software specifically prohibits reverse engineering.

- De compilers
These are programs which will convert object code back to high level languages such as C.
- Functional Analysis
The input and output states of a chip can be monitored using an oscilloscope, or special purpose probes such as logic state analyzers or protocol analyzers, to acquire a picture of the behavior of the chip over time or in response to input signals.
- Patents
Many patented goods are not sold with restrictive licenses, and hence a bonafide purchaser cannot usually be prevented by the patent from doing what they like with the patented product. Indeed, the patent itself may give the reverse engineer valuable information on how the patented product operates.
- Software anti-tamper technology
It is used to deter both reverse engineering and re-engineering of proprietary software and software-powered systems. In practice, two main types of reverse engineering emerge. In the first case, source code is already available for the software, but higher-level aspects of the program, perhaps poorly documented or documented but no longer valid, are discovered. In the second case, there is no source code available for the software, and any efforts towards discovering one possible source code for the software are regarded as reverse engineering.
- Analysis through observation of information exchange, most prevalent in protocol reverse engineering, which involves using bus analyzers and packet sniffers, for example, for accessing a computer bus or computer network connection and revealing the traffic data thereon. Bus or network behavior can then be analyzed to produce a stand-alone implementation that mimics that behavior.
- Disassembly using a disassembler, meaning the raw machine language of the program is read and understood in its own terms, only with the aid of machine-language mnemonics.


Hardware Reverse Engineering Techniques

Reverse engineering is taking apart an object to see how it works in order to duplicate or enhance the object. The practice, taken from older industries, is now frequently used on computer hardware and software.
Hardware reverse engineering involves taking apart a device to see how it works. In general, hardware reverse engineering requires a great deal of expertise and is quite expensive.

- REFAB (Reverse Engineering - Feature Based)
This tool uses a laser digitizer to scan the part, and the analysis software then analyzes the shape of the part, using features which are based on typical machining operations, to generate a computerized manufacturing description which can be displayed, used to copy the product, or produce new products using the design.

- PRINTED CIRCUIT BOARDS (PCBS)
Computer vision has been widely used to scan PCBs for quality control and inspection purposes, and based on this, there are a number of machine vision for analysing and reverse engineering PCBs.

- INTEGRATED CIRCUIT (IC) COMPONENTS
* The first step is to get through the encapsulating material into the product itself, by chemical etching or grinding.
* Once at the chip surface, each layer of components is photographed, then ground away to reveal the layer below. This process reveals the structure of the chip.
* Although these processes can reveal the structure of the chip, they do not indicate the voltages at each point. However, if the chip is undamaged, voltage contrast electron microscopy can be used to scan the chip in use, and watch the voltage level change over time.
These processes are generally referred to as "stripping" or "peeling" the chip.


Overview of Reverse Engineering

Reverse engineering is the attempt to recapture the top level specification by analyzing the product - I call it an "attempt", because it is not possible in practice, or even in theory, to recover everything in the original specification purely by studying the product.

Reverse engineering is difficult and time consuming, but it is getting easier all the time thanks to IT, for two reasons:
- Firstly, as engineering techniques themselves become more computerised, more of the design is due to the computer. Thus, recognisable blocks of code, or groups of circuit elements on a substrate, often occur in many different designs produced by the same computer program. These are easier to recognise and interpret than a customised product would be.
- Secondly, artificial intelligence techniques for pattern recognition, and for parsing and interpretation, have advanced to the point where these and other structures within a product can be recognized automatically.

Reverse engineering generally consists of the following stages:
1. Analysis of the product
2. Generation of an intermediate level product description
3. Human analysis of the product description to produce a specification
4. Generation of a new product using the specification.
There is thus a chain of events between the underlying design specification and any intermediate level design documents lying behind the product, through the product itself, through the reverse engineered product description, through the reverse engineered specification, and into the new product itself.

Reasons for reverse engineering:

- Interoperability.
- Lost documentation: Reverse engineering often is done because the documentation of a particular device has been lost (or was never written), and the person who built it is no longer available. Integrated circuits often seem to have been designed on obsolete, proprietary systems, which means that the only way to incorporate the functionality into new technology is to reverse-engineer the existing chip and then re-design it.
- Product analysis : To examine how a product works, what components it consists of, estimate costs, and identify potential patent infringement.
- Digital update/correction : To update the digital version (e.g. CAD model) of an object to match an "as-built" condition.
- Security auditing.
- Military or commercial espionage : Learning about an enemy's or competitor's latest research by stealing or capturing a prototype and dismantling it.
- Removal of copy protection, circumvention of access restrictions.
- Creation of unlicensed/unapproved duplicates.
- Academic/learning purposes.
- Curiosity.
- Competitive technical intelligence.
- Learning.


Monday, September 14, 2009

The Extended Memory (XMS)

The extended memory refers to memory above the first megabyte of address space in an IBM PC or compatible with an 80286 or later processor. The term is mainly used under the DOS and Windows operating systems. DOS programs, running in real mode or virtual x86 mode, cannot directly access this memory, but are able to do so through an application programming interface called the eXtended Memory Specification (XMS).
With the exception of the first 65,520 bytes, extended memory is not accessible to a PC when running in real mode. This means that under normal DOS operation, extended memory is not available at all; protected mode must be used to access extended memory.

Note: Extended memory is different from expanded memory (EMS), which uses bank switching and a page frame in the upper memory area to access memory over 1 MB.

There are two ways that extended memory is normally used. A true, full protected mode operating system like Windows NT, can access extended memory directly. However, operating systems or applications that run in real mode, including DOS programs that need access to extended memory, Windows 3.x, and also Windows 95, must coordinate their access to extended memory through the use of an extended memory manager. The most commonly used manager is HIMEM.SYS, which sets up extended memory according to the extended memory specification (XMS). XMS is the standard that PC programs use for accessing extended memory.
The main uses extended memory are:
- RAM-disks : It is a chunk of semiconductor memory that behaves like an ordinary disk but is extremely fast. It also loses its data instantly once power is turned off but is great for temporary files such as index files, extracted data from Lotus to be imported into another application etc.
- Disk caches : It is a program to speed up disk access by storing the most frequently use information in the computer's memory and reading ahead from the disk in anticipation.
- Print spoolers : It utilizes the computer's memory as a high speed buffer so that a fast computer is not slowed down by a slow printer. For example you can print a 100 page database report and then load a spread sheet program, print reports and graphs, then use your word processor while the database report is still printing. Print spoolers that use extended memory usually come with the memory card.
- OS/2 : The operating system OS/2 can make good use of extended memory.
- UNIX : UNIX is another operating system that can use extended memory.


Object Query Language (OQL)

Object Query Language (OQL) is a query language standard for object-oriented databases modelled after SQL. OQL was developed by the Object Data Management Group (ODMG). Because of its overall complexity no vendor has ever fully implemented the complete OQL. OQL has influenced the design of some of the newer query languages like JDOQL and EJB QL, but they can't be considered as different flavours of OQL, and should be treated separately.

The key Differences Between OQL and SQL :
- OQL supports object referencing within tables. Objects can be nested within objects.
- Not all SQL keywords are supported within OQL. Keywords that are not relevant to Netcool/Precision IP have been removed from the syntax.
- OQL can perform mathematical computations within OQL statements.

General Rules of OQL :
- All complete statements must be terminated by a semi-colon.
- A list of entries in OQL is usually separated by commas but not terminated by a comma.
- Strings of text are enclosed by matching quotation marks.

OQL was designed to be object-oriented. Queries are specified using objects and their attributes (data-members). Similarly, queries return sets of objects. The complex relationships in an object model can be easily navigated, using the same class-member paradigm, used by object-oriented programming languages. This can often lead to increased performance over SQL, where resource-consuming join processes are necessary to capture relationships. Another big advantage is, that table names and column names are not necessary in the query strings, because queries are formulated using class names and attribute names and no mapping knowledge is necessary in the application.
OQL may be used as an embedded language or as a standalone query language. Both of these are supported by OpenAccess. As an embedded language, OQL queries can be used directly in your application programs. Programs can embed OQL queries, and receive results in the native data types of the programming language being used. OQL statements are simply text strings, which means that the standard string representation of your programming language is used to express the query.

Simple query :
The following example illustrates how one might retrieve the CPU-speed of all PCs with more than 64MB of RAM from a fictional PC database:
SELECT pc.cpuspeed
FROM PCs pc
WHERE pc.ram > 64

Query with grouping and aggregation :
The following example illustrates how one might retrieve the average amount of RAM on a PC, grouped by manufacturer:
SELECT manufacturer, AVG(SELECT part.pc.ram FROM partition part)
FROM PCs pc
GROUP BY manufacturer: pc.manufacturer
Note the use of the keyword partition, as opposed to aggregation in traditional SQL.


Sunday, September 13, 2009

Object Definition language (ODL)

Object Definition Language (ODL) is the specification language defining the interface to object types conforming to the ODMG Object Model. Often abbreviated by the acronym ODL.
This language's purpose is to define the structure of an Entity-relationship diagram.

- Class Declarations
* interface < name > {elements = attributes, relationships,methods }
- Element Declarations
* attribute < type > < name >;
* relationship < rangetype >< name >;
- Method Example
* float gpa(in: Student) raises(noGrades)
# float = return type.
# in: indicates Student argument is read-only.
Other options: out, inout.
# noGrades is an exception that can be raised by method gpa.

ODL Type System :
- Basic types: int, real/ float, string, enumerated types, and classes.
- Type constructors: Struct for structures and four collection types: Set, Bag, List, and
Array.

ER versus ODL :
- E/R: arrow pointing to "one".
- ODL: don't use a collection type for relationship in the “many" class.
* Collection type remains in “one.”
- E/R: arrows in both directions.
- ODL: omit collection types in both directions.
- ODL only supports binary relationship.
- Convert multi-way relationships to binary and then represent in ODL.
- Create a new connecting entity set to represent the rows in the relationship set.
- Problems handling cardinality constraints properly!!

Keys in ODL :
- Indicate with key(s) following the class name, and a list of attributes forming the key.
* Several lists may be used to indicate several alternative keys.
* Parentheses group members of a key, and also group key to the declared keys.
* Thus, (key(a1; a2; : : : ; an )) = “one key consisting of all n attributes." (key a1; a2; : : : ; an ) =“each ai is a key by itself.
- Keys are not necessary for ODL. Object identity and not keys differentiates objects


Facebook activity