Saturday, 26 May 2012

VERIFICATION & VALIDATION

In Software Project management,software engineering and software testing,Verification and Validation(V&V), is the process of checking that the software system meets specification and that it full fills its intended purpose. It may also be referred as software quality control.

Verification :
  • It is the process of determining whether or not the products of a given phase of software (s/w) development, fullfill the specifications established during the previous phase.
  • Verification is concerned with phase containment of errors.
  • Verification takes place before Validation.
  • Verification: "Are We Building the Product Right"
  • Verification refers to the needs of the users.
  • Done by the developers of the software product.
  • It checks for documentation,code,plans,specifications,requirements.
  • The s/w is inspected by looking into the code going line by line or function by function.
Validation:

  • It is the process of evaluating  the s/w in the end of the s/w development to ensure compliance with the s/w requirement. 
  • It is the process of determining whether a fully developed system confirms to its requirement specification.
  • Testing is the common method of Validation .
  • Aim of Validation is that the final product to be error free.
  • For high reliability we need to perform both verification and validation activities.
  • Validation : "Are We Building the Right Product"
  • Validation refers to the correctness of the implementation of the specifications by the software system or application.
  • Done by the testers and it  is done against the requirements.
  • It checks the whole product.
  • In validation the code is executed and the s/w is run to find defects.
The major V& V activities for s/w development are inspection,reviews and testing. Testing is an activity that can be generally performed only on code.



Saturday, 19 May 2012

Software Measurements and Metrices

The size of a project is not the no. of bytes that the source code occupies
The Project size is a measure of the problem complexity in terms of the effort
and time required to develop the product.
Two metrices are widely used to estimate size among many metrices:
1. Line of Code (LOC)
2.Function point (FP)

1. Line of Code (LOC) :
   1.The Project size is estimated by counting the number of source
       instructions in the developed program (lines used for commenting the
       code & the header lines are ignored).
   2.To estimate the LOC count at the end of a project is a very simple
       job, to estimate the LOC at the begining , the project is divided into  
       modules and sub modules.

   Short Comings of LOC: 
   1.LOC gives a numerical value of problem size that can vary widely with  
      individual coding style.
   2.LOC only focuses on the coding activity alone, it only computes the
     no. of the sources lines in the final program.
   3.LOC measures corelates poorly with the quality and efficiency of the
      code .
   4.The LOC count can be accurately compute only after the code has  
      been fully developed. It is of little use to project manager during    
      planning.

2. Function Point Metric (FP):
    Function point metrics is used to :
   1  Estimate the cost or effort required to design ,code and test the s/w.
   2. To predict the no.of errors that will be encountered during testing.
   3. Forecast the no. of components or the no. of projected sources
       lines in the implemented system.
   4. This metric overcomes many of the shortcomings of the LOC metric.
   5. One  of the imp advantages of using the function point metric is that it
       can be used to easily estimate the size of a s/w product directly from
       the problem specification.
   6. A s/w product supporting many features would certainly be of larger
       size than a product with a less no.of features.


 Functon point is computed in two steps.
 - First step is to compute unadjusted function pt.(UFP).
 - In the second step technical complexity factor (TCF) is computed.

Difference :

S.No. Function Point Line of code
1. Specification based Analogy based
2. Language Independent Language Dependent
3. User Oriented Design Oriented
4. Variations a function of Counting Conventions Variations a function of languages
5. Expandable to source lines of code Convertible to function points

Saturday, 5 May 2012

MYCIN

1. MYCIN is an expert system for treating blood infections.
2. MYCIN would attempt to diagnose patients based on reported symptoms
    and medical test results.
3. Its job was to determine the nature of disease and recommend treatment for certain
    blood infections.
4. MYCIN represented its knowledge as a set of IF-THEN rules with certainity factors.
5. 0.7 is roughly the certainity that the conclusion will be true,given the evidence.
6. MYCIN was written in LISP and its rule are formally represented as LISP
    expression.
7. MYCIN is a goal -directed system,using the basic backward chaining
    reasoning strategy.
8. Useful for junior or non specialized doctors.
9. Never actually used in practice due to ethical and legal issues related to the use of
    computers in medicine.

It has following organizational features-
1. Knowledge Representation : Production rules implemented in LISP.
2. Reasoning : Background chaining, goal driven reasoning , uses
    certainity factors to reason with uncertain information.
3. Heuristic : MYCIN examines each candidate diagnosis in a depth first manner.
    Heuristic are used to limit the search , including checking all premise of a possible
    rule to see if any one of these is known to be false.
4. Dialog explanation : It is computer controlled. Explanations are generated by
    tracing back through the rules which have been triggered.Both "how" and "why"
    explanations are supported.

Sunday, 29 April 2012

Reference Count

1. Reference Count keeps track of the number of blocks that point directly to the
    present block.
2. It is a technique of storing the number of references,pointer or handles to a
    resource such as an object,block of memory or disk space
3.Within each element in the heap,some extra space is provided for a reference
    counter.
4. The Reference counter contains the reference count indicating the number of
    pointers to that element that exist. 
5. When an element is initially allocated from the space list its reference count is
    set to 1.
6. Each time a new pointer to the element is created,its reference count is
    increased by 1.
7. Each time a  pointer is destroyed,the reference count is decreased by 1. 
8. When the reference count of an element reaches zero,the element is free
    and may be returned to the free space list. In other words, the element has
     become garbage that can be collected. 
9. Reference counts allow both garbage and dangling references to be avoided
    in most situations.

Note: Reference counts are best used when pointers between blocks never
          appear in cycle.

Dangling References


1. Dangling Reference refers to a pointer variable whose value points to something
    which is no longer meaningful.
2. It is an access path that continues to exist after the lifetime of the associated data
    object.An Access path ordinarily leads to the location of a data object.
3. A dangling occurs when there is a reference to storage that has been deallocated
    or may have also been reallocated for another purpose.
4. At the end of the lifetime of the object,this block of storage is recovered for
     reallocation at some later point to another data object.
5. However,the recovery of the storage block does'nt necessarily destroy the
    existing accsess paths to the block and thus they may continue to exist as
    dangling references.
6. Dangling references are a particular serious problem for storage management
    because they may compromise  the integrity of the entire run-time structure
    during program execution.
7. For Example: An assignment to a non existent data object via a dangling
    reference can modify storage already allocated to another data object of an
    entirely different type.
8.                            main()
                             {
                                 int *p;
                                 p=dangle();
                             }
                             int * dangle()
                             {
                               int i=23;
                               return &i;
                             }
 Procedure dangle in the C Program returns a pointer to the storage bound to the
 local name i. The Pointer is created by the operator and applied to i. when control
 returns to main from dangle,thestorage for locals is freed & can be used for other
 purposes.Since p in main refers to this storage,the use of p is a dangling reference.