Subscribe by Email


Showing posts with label Compile. Show all posts
Showing posts with label Compile. Show all posts

Thursday, February 23, 2012

What is meant by severity of a bug? What are different types of severity?

We all know what a software bug is! It is a flaw, error or mistake in the software system or application that can cause it to crash or fail. Pretty much simple!
But very few of us are actually aware about the severity of a bug i.e., how much destruction it can cause to a software system or application.

- Bugs are of course results of the mistakes made by the software programmers and developers while coding the software program.
- Sometimes incorrect compilation of the source code by the program can also cause bugs.
- A buggy program is very hard to clean.
- Bugs can have a chain reaction also i.e., one bug giving rise to another and that in turn giving rise to one more bug and so on.
- Each bug has its own level of severity that it causes to the software system or application.
- While some bugs can work out total destruction of the program, there are some bugs that do not even come in to detection.
- Some bugs can cause the program to go out of service.
- In contrast to these harmful bugs, there are other bugs which are useful such as security bugs.

WHAT IS SEVERITY OF A BUG & ITS TYPES

-"Severity can be thought of as a measure of the harm that can be caused by a bug."
- Severity is an indication of how bad or harmful a bug is.
- The higher the severity of a bug, the more priority it seeks.
- Severity of the bugs of software can sometimes be used as a measure of its overall quality.
- Severity plays a major role in deciding the priority of fixing the bug.
- It is important that the severity of the bugs is assigned in a way that is logical and easy to understand.

There are several criteria depending on which the severity of a bug is measured. Below mentioned is one of the most commonly used ranking scheme for measuring severity of bugs:

1.Severity 1 Bugs
bugs coming under this category cease the meaningful operations that are being operated by a software program or application.

2.Severity 2 Bugs
Bugs coming under this category cause the failure of the software features and functionalities. But, still the application continues to run.

3.Severity 3 Bugs
Bugs coming under this category can cause the software system or application to generate unexpected results and behave abnormally. These bugs are responsible for inconsistency of the software system.

4.Severity 4 Bugs
Bugs coming under these categories basically affect the design of a software system pr application.

COMPONENTS OF SEVERITY
Severity has two main components namely the following:

1. Impact
- It is a measure of the disruption that is caused to the users when they encounter a bug while working.
- There is a certain level to which there is an interference with the user performing a task.
- Even the impact is classified in to various levels.

2. Visibility
- It is the measure of the probability of encountering the bug in future or we can say that it is measure of the closeness of a bug to the execution path.
- It is the frequency of the occurrence of a bug.

The severity is calculated as the product of both the impact as well as visibility. A measure of perceived quality and usefulness of the software product is given by the severity. Therefore it would not be wrong to say that the severity provides an overall measure of the quality of the software system or application.


Monday, November 21, 2011

What are different characteristics of dynamic testing?

Dynamic testing is also known as dynamic analysis. It’s a part of software testing which is basically used to explain the dynamic behavior of a software application or a program. Therefore, dynamic testing can now be defined as the testing the response or reaction (physical in nature) of the system to the dynamic variables ( the variables which keep changing with time and are not constant) that have been used in the program.

As the name suggests, dynamic testing should be carried out dynamically and not like static testing. To carry out a dynamic test for any program, one has to compile the software, run it and work with it. Working with the software involves inputting data values to the variables. It also involves checking the output if whether or not it is up to the expectations of the programmer.

The actual program output is checked against the desired program output. Input and output is checked for validation of the software. Many methodologies like unit tests, system tests, integration tests and acceptance tests have been developed for dynamic testing.

The idea of dynamic testing is typically based on testing the software during execution of the program and also during its compilation.
- Dynamic testing is totally opposite of static testing.
- The software application must be actually compiled and executed and tested as the dynamic testing is a part of validation process, which is again a part of verification and validation process.
- There are many methodologies that can be used for testing a program dynamically. If you are not comfortable with one technique, you can for the other one.

Functional Test Techniques
- These techniques are commonly known as black box techniques.
- These techniques help in designing test cases which are based on the functions of the software application under test and there is no need to consider the details of the software structure.
- These techniques are used to check for input and expected output.

Black box testing techniques:
There are many black box testing techniques available today. Few have listed below:
- Boundary value analysis
- Equivalent partitioning
- State transition testing
- Syntax testing
- Cause-effect graphing

White box testing techniques:
These are also known as structural test techniques. These are used to check the structural design of the software application for flaws and mistakes.There are many white box testing methodologies present today. They can be used effectively for dynamic testing. Following are some of the white box techniques:

- Branch decision testing
- Branch condition testing
- Branch condition combination testing
- LCSAJ testing
- Modified condition decision testing
- Random testing
- Data flow testing
- Statement testing
- Random testing

Here statement testing technique is one of the structural testing techniques and it is used to examine the components of software components decomposed into smaller parts or modules. Statements can be categorized as executable or non executable and they are tested accordingly. But for this technique you need to provide inputs for the software component, some sort of identification for the statements to be executed and you also need to specify he expected outcome for the module or component. Dynamic testing is carried out by domain experts and professionals.

Programming the Dynamic Analysis of Structures
Dynamic Testing: The Nature and Measurement of Learning Potential


Wednesday, October 12, 2011

What makes one C compiler better than the other?

What makes C compiler better than the other? Well, that’s a question often debated upon. As we all know c is a general purpose programming language which was developed to run on UNIX operating system and till date it is the most widely used programming language being used to develop programs. it uses a weak compiler as compared to other language compilers.

The C compiler provides low level access to computer memory and offers programming constructs that are very easy to convert to machine level language. C compilers use minimum run time and they are very fats compilers though prone to errors. A C program can easily be converted to another language program with a minimum of rewriting. C compiler allows structured programming and is very flexible. Its static system avoids many of the errors that can happen during run time.
- C allows the executable code to be stored within functions.
- C compiler terminates a statement with a semicolon.
- C is basically a procedure oriented language.

There are many C compilers available in the market today and most them run on all operating systems including both windows and UNIX. Some of these c compilers are available as freeware, some are available under proprietary license, and some have BSD license and some other have GPL license. Many of the c compilers are not available online.

The best about C compilers is that a majority of them support “integrated development environment” or IDE which makes them more easy to use. Some C compilers apart from having IDE supporting feature come with some third party features which extend the functionality of the language and make it work faster. They provide better editing options and strong macros with great compiler integration and run time.

Most of these compilers take only 300 MB of space on your hard disk drive. For windows some are available in the size of 170 MB and so the installation process is not time consuming and does not checks your patience.

C compiler lets you use parallelism. Any source code before execution, needs to be converted into machine level language i.e., in the language that is easily understood by the CPU processor. C compiler does this effectively and very fast as compared to other language compilers available today.

C having a fast compiler is mostly used to write game codes. Since other languages are largely optimized, C is used widely even today. C compiler provides abstraction to a great degree. Compiling depends a lot on the length and complexity of the code and on the speed of the CPU processor. But, the C compiler compiles the required code in as less time as possible. C compiler being a very large and complex tool is very powerful and useful. C can be thought of as a portable assembly language and scripting of many other languages is based on C language only.

Learning all the features of C is a great deal. Many C compilers support all ANSI C standards. C compilers are so small that they can be directly used from a rescue disk. C compilers can produce x86 and x86- 64 code very fast. Many C compilers today come with an optional memory feature and a bound checker.

Few compilers can simultaneously compile and run the programs using the “command line” option. Under this feature programs run like shell scripts. The C compilers are exceptionally faster and better than any other compiler available today in terms of speed of compilation. C language is free of what is called bombastic jargon and it is not much optimized. Most of the C compilers like TCC produce codes in a single pass and each statement is compiled very carefully.


Tuesday, October 11, 2011

What are the problems of a C compiler?

Every programming language has some advantages and disadvantages which are not present in the other languages. Some languages are capable of solving some problems better as compared to other languages. But the point is that most of the problems have similar needs, requirements and logic, so the point where languages differ from each other is the efficiency with which they solve the problem.

Some provide more efficient and fluent solutions while others don’t. As we all know C is a basic programming language which was developed to solve problems and develop programs relating to kernels of the operating systems, compilers and graphical user interfaces. C compiler though being fast is not so efficient. It provides many downsides for a large number of problems. Many of us think that C is the fastest language but this is not true.

C++ compiles most of the C programs at the same speed as C++ does. Some of the features of C language like virtual function calls result in over heads. C is not object oriented. This in turn makes it more inconvenient to implement some programs. It is not able to force object orientation everywhere. C makes some programs that require object oriented programming more error prone. C has got a weak typing system as compared to other programming languages. This leads to many programming errors after compilation of the program.

A bigger standard library C++ allows the full use of the C standard library. This is very important of course, as the C standard library is an invaluable resource when writing real world programs.
- C++ has a library called the Standard Template Library.
- This standard library contains a number of templates that can be used while developing programs almost of any kind.
- It also includes many common data structures which are very useful like data lists, maps, data sets, etc. the standard library routines and its data structures are tailored to the specific needs of the programmer.
- Though standard library is no gold knife, still it does gives a great help in many programs for solving general purpose related problems. Many tasks like implementing a linked list in C take a lot of time.
- Though the compilation is fast but, who has got that much time to write those lengthy codes. That time you will feel the need for a better compiler which provides a shorter and effective code for implementing lists and other sorts of data structures in array form.

Even though C language was standardized long back in 1998, but till date we don’t have any good compilers for this language. It’s a very complex language and so requires a heavy compiler like itself to compile it. Another problem related to C compiling is that being a big and complex language, many few people have its correct knowledge of usage. A lot depends on the programmer also. If you are typing in the wrong code you are sure to get bad results.
Today also most of the programs are written in C. a need is felt to convert them to another programming language for better compilation. But the conversion is no good solution. Conversion of a C language program code is often ended up in rewriting almost the entire content of the program.

Programs written in C will always have 2 major problems. Firstly their code will be unusually lengthy and time consuming. Secondly, the program execution will be slower even though the compilation time is very less. The C program codes require more time to read, write and understand. C compiler being ineffective can crash any time. There’s a lack of high level routines in C compiler.


Sunday, September 11, 2011

Why C compilers are better than other language Compilers?

A compiler as we all know is a program that translates source code into object code so that the code becomes executable, or we can say A compiler converts high level language code into a low level language code (assembly language).A compiler performs six major operations namely preprocessing, semantic analysis,lexical analysis, code generation, code optimization and parsing.

A compiler has basically 3 main parts. First is the front end that checks the semantics and syntax of the program and the errors are reported.Second, the middle end which does the optimization removing any unwanted or bad code.The last part is called the back end which translates the middle level intermediate representation or IR into the assembly language.

Processor registers are assigned. The back end also draws the schedule for the hardware units. Today we see a number of compilers available in the market like clang, Microsoft C, GCC, etc. C is still the favorite language of many programmers in the world. What makes it so special? It is its compiler. C compiler is better than any other language because it is small in size, so that you can execute a program everywhere. The C compiler is usually faster than any other language compiler. Furthermore there is no overhead byte code generated.

- You can use the dynamic C library directly.
- Most of the C compilers include memory and bound checker.
- Many C compilers are capable of running under windows XP and windows Vista and are also able to compile the command line.
- Most of them support integrated environment.
- C compilers are capable of handling multi- threaded programming and are good for exploiting dynamic parallelism which otherwise can make it difficult for passing messages.
- C compilers are algorithmic in nature and provide a scheduler to schedule the performance of the programs.
- They compile and link the codes very fast and they have a very powerful optimization technology.
- They come with a library source which is complete and brows able.
- They do extensive checking during the process of compilation.
- Some C compilers are safe from the risk of pointers and are capable of fast prototyping of the programs.
- They also don’t allow violation of array bonding.
- They can be run as interactive or non- interactive phases.
- They support enumerated data types, all data type variables like int, long, and float etc. some may also provide you with some sample programs to help you understand the features of the language.
- They are perfect for parallel computing. Global vectorization and optimization is also supported.
- These C compilers do inter procedural analysis. While doing optimization they give the user necessary feedback. They are able of transferring loops.
- C compilers are capable of code generation and give optimal performance from the processors.
- They simplify the execution thus, accelerating it. No limitations are imposed code size and optimization. They are very fast and accurate as compared to the compilers of other languages.
- Latest compilers are capable of building internet, distributed and windows applications. The code generation includes compiling, assembling, linking, resource compiling and adding library files.
- The integrated development includes editing, debugging, generating files and resource editing.
- They come with documentation and user’s manual.
- Most of the C compilers don’t come as freeware.
- C compilers require Windows 95 and other latest versions for implementing command lines.
- If a C compiler is supporting IDE, you need to have windows 2000 and following versions. The system should have a minimum of 32 MB of RAM and 500 MB of ROM.

We can say they are like many in one package which allow writing, developing, compiling, interpreting, assembling and debugging, and execution of the programs.


Sunday, September 4, 2011

What are C Compilers and their properties?

A compiler is a program that translates source code into object code. The compiler got its name from the way it works, checking the entire piece of source code and collecting and reorganizing the procedural instructions. Thus in this way a compiler differs from an interpreter which analyzes and executes each line of source code in succession, without looking at the entire program. Compilers require some time for producing an executable source code. However, programs produced by compilers execute much faster than the same programs executed by an interpreter. Many compilers are available for the same language. More than a dozen companies develop and sell compilers for C language. So here are some C compilers at your finger tips listed along with their properties:
1. AMPC: By Axiomatic Solutions Sdn Bhd. Supports all Operating systems. Proprietary license. not available online. Supports IDE.
2. Amsterdam Compiler Kit: By Andrew Tanenbaum and Cerial Jacobs. Works with UNIX and other OSs except windows. BSD license. Not available online. Does not support IDE.
3. Clang: By low level virtual kit. Supports all OSs. BSD license. Not available online. Does not support IDE.
4. Compiler: By Ninja Otter Inc. supports all OSs. Proprietary license. Available online. supports IDE.
5. DMS software reengineering Tool Kit: By semantic Designs. Supports all operating systems. Proprietary license. Not available online. Does not support IDE.
6. GCC: By GNU project. Supports all Oss. GPL license. Not available online. Doesn’t support IDE.
7. RCC (RCOR C compiler): By Rodrigo Caetano (rcor). Supports only windows and UNIX. GPL license. Not available online. Does not supports IDE.
8. Ideone: unknown author. Doesn’t support any OS. Freeware. available online. Does not support IDE.
9. Lab windows/ CVI: by National Instruments. All OSs. Proprietary license. Not available on web. Supports IDE.
10. Icc: By Chris Fraser and David Hanson. Supports all OSs. Freeware. Not available online. Supports IDE in windows only.
11. Mark Williams C: By Mark Williams Company. Supports all Oss except UNIX. Proprietary license. Not available online. Supports IDE.
12. Microsoft C: by Microsoft. Supports only windows. Proprietary license. Not available online. supports IDE.
13. Nwcc: By Nils Weller. Supports all OSs. BSD license. Not available online. Doesn’t support IDE.
14. Open64: By SGI Google, HP, and Intel, Nvidia, Path Scale, Tsinghua University and team. Supports all OSs. GPL license. Not available online. Doesn’t support IDE.
15. Pelles C: by Pelle Orinius. Supports only windows. Freeware. Unavailable on web. Supports IDE.
16. PGCC: By The Portland Group. Supports all OSs. proprietary license. Not found on web. Supports IDE.
17. Portable C compiler: By Anders Magnusson and team. Supports all OSs. BSD license. Not available online. Does not support IDE.
18. Power C: by Mix Software. Supports all Oss except windows and UNIX. Proprietary license. Doesn’t support IDE. Not available online.
19. QuickC: By Microsoft. Supports only windows. Proprietary license. Supports IDE. Not available online.
20. SAS/ C: Its author is SAS institute. Works with all Oss. Proprietary license. Supports IDE. Not available online.
21. Tiny C compiler: Its author is Fabrice Bellard. Supports only windows and UNIX. LGPL license. Doesn’t support IDE. Not available online.
22. Turbo C: By Embarcadero. Supports all Oss except windows and UNIX. Proprietary license. Supports IDE. Not available online.
23. CCS C compiler: By CCs, Inc. supports all OSs. Proprietary license. Supports IDE. Not available online.
24. Ups debugger: By Tom Hughes, Ian Edwards and team. Supports all Oss except windows. GPL license. Not available online. Supports IDE.
25. VBCC: by Dr. Volker Barthelmann. Supports all OSs. Doesn’t support IDE. Not available online.


Tuesday, August 3, 2010

Static and Dynamic Analysis in Testing and their differences.

Static analysis involves going through the code in order to find out any possible defect in the code. Dynamic analysis involves executing the code and analyzing the output.

- Static testing is about prevention.
- In static testing, the software is not actually used.
- It is generally not detailed testing, but checks mainly for the sanity of the code, algorithm, or document. It is primarily syntax checking of the code or and manually reading of the code.
- This testing is used by the developer who writes the code in isolation.
- Out of Verification and Validation, it is the verification portion.
- Static testing methodologies include code reviews, inspection and walkthroughs.
- Dynamic testing is about cure.
- The source code is actually compiled and run.
- It examines the physical response from the system.
- Out of Verification and Validation, it is the validation portion.
- Dynamic testing methodologies include unit testing, integration testing, system testing and acceptance testing.
- Static testing is many times more cost-effective than dynamic testing.
- Static testing achieves 100 statement coverage in a relatively short time while dynamic testing often often achieves less than 50 statement coverage.
- Static testing can be done before compilation while dynamic testing can take place only after compilation and linking.
- Static check is more profitable than the dynamics of the static check because tests are made at the initial stage.

Why is static testing more effective?
Static testing gives you comprehensive diagnostics for your code. It warns you about:
- syntax errors.
- code that will be hard to maintain.
- code that will be hard to test.
- code that does not conform to your coding standards.
- non-portable usage.
- ANSI violations.


Facebook activity