the present invention provides incremental algorithms for inter - procedural analysis of a correctness property of a program . the present invention employs a data structure referred to as a derivation graph or a state transition graph that records the analysis process . generally , in response to a program change , the algorithms re - check derivations recorded in this graph , pruning those that have been invalidated due to the change and adding new ones . this repair process results in a new derivation graph , which is stored and used for the following increment . the input to a conventional , non - incremental algorithm , as discussed further below in conjunction with fig4 , is typically a program , described by a collection of control flow graphs ( cfgs ), and a checking automaton . fig1 is a block diagram illustrating an incremental algorithm 600 in accordance with the present invention , as discussed further below in conjunction with fig6 . as shown in fig1 , the input to the incremental algorithm 600 is a derivation graph 110 and set 120 of additions , deletions , and modifications to cfg edges , shown in fig1 as “ cfg δs .” the incremental algorithm 600 generates a revised derivation graph 110 ′. the nodes of a cfg represent control locations , while edges are labeled either with simple assignment statements , ( side - effect free ) assertions , or function calls . in the model checking view , the ( possibly non - deterministic ) checking automaton “ runs ” over matched call - return paths in this collection of cfgs , flagging a potential program error whenever the current run enters an error state . a basic model checking algorithm works by building , on - the - fly , a “ synchronous product ” graph of the collective cfgs with the automaton . at a function call edge , this product is constructed by consulting a summary cache of entry - exit automaton state pairs for the function . using this cache has two consequences : it prevents indefinite looping when following recursive calls and it exploits the hierarchical function call structure , so that function code is not unnecessarily re - examined . the incremental version of the algorithm observes that the process of forming the synchronous product can be recorded as a derivation graph 110 . after a small change to the cfgs , it is likely that most of the process of forming the synchronous product is a repetition of the earlier effort . by storing the previous graph 110 , this repetitive calculation can be avoided by checking those portions that may have been affected by the change , updating derivations only when necessary . fig2 a provides code for an exemplary program 200 . in an exemplary implementation , the correctness property being evaluated is whether a global pointer , p , is initialized to a non - null value before being dereferenced . a simple automaton ( not shown ) to check for violations of this property has three states : z , indicating p may be null ; nz , indicating p is not null ; and the error state err indicating p is dereferenced when it may be null . fig2 b illustrates the cfgs 250 for the program 200 of fig2 a . fig2 c illustrates the resulting derivation graph 280 for the program 200 of fig2 a ( in this case a tree ). each node in the derivation graph 280 is the combination of a cfg node and an automaton state . if condition c holds on entry to setp ( the upper branch from the state ( 4 ; z ) in setp ), the function returns to main with the automaton state nz , and execution proceeds normally to termination . if c does not hold ( the lower branch ), setp returns to main with the automaton state z . on the statement “ y =* p ”, the automaton moves to the state err and an error is reported in usep . the incremental algorithm 600 of the present invention operates on the data structure of the derivation graph 280 . as previously indicated , the input to the incremental algorithm 600 also consists of additions , deletions , and modifications to cfg edges ( cfg δs ). generally , each derivation step is inspected to determine whether it is affected by a change ; if so , remove the derivation and re - check the graph from the affected point until a previously explored state is encountered . fig3 a illustrates the revised cfgs 300 for a modification to the program 200 of fig2 a that replaces the body of setp ( ) with the statement “ x ++; p =& amp ; x ;”. fig3 b is an updated derivation graph 350 illustrating the incremental effect 280 on the derivation graph of fig2 c for the modified version of the program 200 . the removal of the if statement form the program 200 has the effect of removing the conditional branch edges ( dashed ) from the graph 280 , making the previous error state unreachable . the addition of x ++ has the effect of adding the state ( 5 ′; z ) and two edges ( bold ) to the graph 350 . after processing these edges , evaluation proceeds to state ( 6 ; nz ), which is identical to the corresponding state in the previous analysis . the present invention provides incremental algorithms for inter - procedural analysis that operate in a backward direction , “ inside - out ” from the locations of the program changes . in order to understand the “ backwards ” incremental algorithms of the present invention , an understanding is necessary of an existing non - incremental ( full ) algorithm , and a proposed forward incremental algorithm . a program is given as a set f of functions , with a distinguished initial function , main . each function is represented by a cfg , which is a tuple ( n , σ , e ). here , n is a finite set of control locations containing the distinguished locations ↓ ( entry ) and ↑ ( exit ); σ is a set of ( simple ) program statements ( assignments and assertions ); and e is the set of edges . let σ ′ be σ together with call statements { call ( f )| f εf }. e is a subset of ( n \{↑})× σ ′× n . it is required that there are no calls to functions outside f . for simplicity of exposition , function call arguments and return values , or variables and their scoping rules are not represented . next the executions of a program are defined . a position is a pair ( f , n ), where f is a function and n is a node in ( the cfg for ) f a ( global ) program state is a sequence ( f 1 , n 1 ) . . . ( f k , n k ) of positions , representing a point during execution where control resides at position ( f k , n k ) and ( f 1 , n 1 ) . . . ( f k − 1 , n k − 1 ) is the stack of return locations that is in effect at this point . a labeled transition system is defined on program states , as follows . ( f 1 , n 1 ) ⁢ … ⁡ ( f k , n k ) ⁢ ⟶ a ⁢ ( f 1 , n 1 ) ⁢ … ⁡ ( f k , n k ′ ) ⁢ iff ⁡ ( n k , a , n k ′ ) 1 . is an edge in f k and is not a call ( f 1 , n 1 ) . . . ( f k , n k )→( f 1 , n 1 ) . . . ( f k , n ′ k ) ( f ′, ↓) iff ( n k , call ( f ′), n ′ k ) 2 . ( f 1 , n 1 ) . . . ( f k − 1 , n k − 1 )( f k , ↑)→( f 1 , n 1 ) . . . ( f k − 1 , n k − 1 ) 3 . an execution is a finite path in this transition system that begins with the program state ( main ; ↓), consisting of just the initial position . such an execution generates a trace consisting of the sequence of labels ( which are program statements ) along it . note that this is the definition of a recursive state machine , restricted to the case of finite executions . analysis properties are represented by ( non - deterministic , error detecting ) automata with σ as input alphabet . an analysis automaton is given by a tuple ( q , i , δ , f ), where q is a set of ( automaton ) states , i ⊂ q is a set of initial states , δ ⊂ q × σ × q , is a transition relation , and f ⊂ q is a set of rejecting states . a run of the automaton on a trace is defined in the standard way . a rejecting run is a run that includes a rejecting state . note that in this simplified presentation , the set σ of program statements does not include function calls and returns , and hence the automata cannot refer to them . in the implementation , transitions that represent function calls and returns ( rules 2 and 3 above ) carry special labels , and the error detecting automaton can react to them by changing its state , e . g ., to perform checks of the arguments passed to a function , or the value returned by it . an automaton operates on the syntax of the program ; the relationship with the semantics is up to the automaton writer . for instance , one might define an under - approximate automaton , so that any error reported by the automaton check is a real program error , but it might not catch all real errors . it is more common to define an over - approximate automaton , so that errors reported are not necessarily real ones , but the checked property holds if the automaton does not find any errors . fig4 illustrates pseudo - code 400 for the from - scratch ( non - incremental ) analysis algorithm ( full ). the full algorithm 400 keeps global configurations in a work - set ; each configuration is a tuple ( f , n , r , q ), where ( f , n ) is a position and r , q are automaton states . the presence of such a configuration in the work - set indicates that it is possible for a run of the automaton to reach position ( f , n ) in automaton state q as a result of entering f with automaton state r ( the “ root ” state ). in addition , the algorithm 400 keeps a set of summaries for each function , which are entry - exit automaton state pairs , and a set of known call - sites , which are configurations from which the function is called . analyze 450 repeatedly chooses a configuration from the work - set and calls step 430 to generate its successors . in step , if the automaton is in an error state , a potential error is reported . ( in an implementation , the report - error procedure may also do additional work to check if the error is semantically possible .) as shown in fig4 , much of the work is done in the follow - edge procedure 420 . for a non - call statement , the procedure 420 follows the automaton transition relation ( line 10 ). for a function call , the procedure 420 looks up the summary table to determine successor states ( line 6 ). if there is no available summary , registering the current configuration in call - sites ( f ′) and creating a new entry configuration for f ′ ensures that a summary entry will be created later , at which point this configuration is re - examined ( line 6 in step 430 ). it is assumed that visited configurations are kept in a suitable data structure ( e . g ., a hash - table ). the full algorithm 400 reports an error at a configuration ( f , n , r , q ), for some r , q , if and only if there is a program execution ending at a position ( f , n ), labeled with trace t , such that the automaton has a rejecting run on t . as previously indicated , a textual program change can be reflected in the cfgs as the addition , deletion , or modification of control - flow edges . a textual program change can also result in the redefinition of the number and types of variables . the forward incremental algorithm expects as input cfg changes , and repairs the derivation graph accordingly . changes to types and variables correspond to automaton modifications . the forward incremental algorithm 500 , discussed further below in conjunction with fig5 , can be modified for the situation where the property ( and not the program ) changes , since the joint ( i . e ., product ) derivation graph is maintained . the forward incremental algorithm 500 records a derivation relation on configurations in the procedure follow - edge 420 . whenever a new configuration of the form ( f , n ′, r , q ′) is added after processing a configuration ( f , n , r , q ) and an edge α , a derivation edge ( f , n , r , q )| α ( f , n ′, r , q ′) is recorded . this results in a labeled and directed derivation graph . notice that the derivation graph can be viewed also as a tableau proof that justifies either the presence or absence of reachable error states . given as input a set of changes to the cfgs and a derivation graph , the exemplary forward incremental algorithm 500 first processes all the modifications , then the deletions , and finally the additions . this order avoids excess work where new configurations are added only to be retracted later due to cfg deletions . for an edge e =( n , a , n ′) modified to e ′=( n , b , n ′) in function f if each derivation of the form ( f , n , r , q )| α ( f , n ′, r , q ′) holds also for the new statement b ( which is checked by code similar to that in follow - edge 420 ) there is no need to adjust the derivation graph . otherwise , the modification is handled as the deletion of edge e and the addition of e ′. for a new edge e =( n , a , n ′) in the cfg off , follow - edge 420 is applied to all configurations of the form c =( f , n , r , q ), for some r , q , that are present in the current graph . consequently , any newly generated configurations are processed as in the full algorithm 400 . deletion is the non - trivial case and is shown in further detail in fig5 . generally , the idea is to check all of the recorded derivation steps , disconnecting those that are based on deleted edges . fig5 illustrates pseudo - code 500 for an exemplary forward - traversing deletion algorithm 500 ( incrfwd ). the entry point is a procedure check - derivations 540 , that is called with the full set of functions , f . the auxiliary function ext - inits ( f ) ( line 3 ) returns the set of entry configurations for functions in f that arise from a call outside f . the initial configurations for main are considered to have external call sites . this gives a checking version of the full analysis algorithm . checking an existing derivation graph can be expected to be faster than regenerating it from scratch with the full algorithm 400 . the savings can be quite significant if the automaton transitions δ are computed on - the - fly ( note that the algorithm 500 does not re - compute δ ). the derivation graph resulting from the incrfwd algorithm 500 is essentially the same as the graph generated by the full analysis algorithm 400 on the modified cfgs . the incrfwd algorithm 500 of fig5 checks derivations in a forward traversal , which may result in unnecessary work . if only a function g is modified , functions that are not on any call path that includes g are not affected , and do not need to be checked . moreover , if the change to g does not affect its summary information , even its callers do not need to be checked . such situations can be detected with an “ inside - out ” algorithm , based on a maximal strongly connected component ( scc ) decomposition of the function call graph . ( a non - trivial , maximal scc in the call graph represents a set of mutually recursive functions .) the effect of a cfg edge deletion from a function f propagates both upward and downward in the call graph . since some summary pairs for f may no longer be valid , derivations in f &# 39 ; s callers might be invalidated . in the other direction , for a function called by f some of its entry configurations might now be unreachable . fig6 illustrates exemplary pseudo - code for deletion for an scc - based algorithm 600 ( incrback ). it works bottom - up on the scc decomposition , checking first the lowest ( in topological order ) scc that is affected . the function affected ( line 3 ) checks whether a function in c is modifed , or whether summaries for any external function called from c have been invalidated . for each scc , c , one can inductively assume that summaries for functions below c are valid . hence , it is only necessary to examine functions in c . this is done by the same check - derivations procedure 540 of fig5 , only now applied to a single scc instead of the full program . note that check - derivations 540 initially invalidates summaries in c that cannot be justified by calls outside c . this process can result in over - approximate reachability information . consider a scenario where f calls g . now suppose that f is modified . the algorithm repairs derivations in f , but does not touch g . however , derivations in f representing calls to g might have been deleted , making corresponding entry configurations for g unreachable . to avoid reporting spurious errors resulting from this over - approximation , the ( nondeterministic ) retrace procedure re - determines reachability for all error configurations . the derivation graph 110 ′ following execution of the incrback algorithm 600 is an over - approximation of the graph 110 generated by the full analysis algorithm on the modified cfgs , but has the same set of error configurations . incremental model checking may have benefits beyond speeding up analysis . for example , the speed gain from incremental analysis may be used for higher precision in order to reduce the number of false errors reported . in addition , a fine - grained incremental model checker can be integrated into a program development environment , so that program errors are caught immediately . in another variation , an incremental model checker can be used to enable correct - by - construction development . in this scenario , instead of applying model checking after a program is written , an incremental model checker can maintain and update a proof of correctness during program development . as is known in the art , the methods and apparatus discussed herein may be distributed as an article of manufacture that itself comprises a computer readable medium having computer readable code means embodied thereon . the computer readable program code means is operable , in conjunction with a computer system , to carry out all or some of the steps to perform the methods or create the apparatuses discussed herein . the computer readable medium may be a recordable medium ( e . g ., floppy disks , hard drives , compact disks , or memory cards ) or may be a transmission medium ( e . g ., a network comprising fiber - optics , the world - wide web , cables , or a wireless channel using time - division multiple access , code - division multiple access , or other radio - frequency channel ). any medium known or developed that can store information suitable for use with a computer system may be used . the computer - readable code means is any mechanism for allowing a computer to read instructions and data , such as magnetic variations on a magnetic media or height variations on the surface of a compact disk . the computer systems and servers described herein each contain a memory that will configure associated processors to implement the methods , steps , and functions disclosed herein . the memories could be distributed or local and the processors could be distributed or singular . the memories could be implemented as an electrical , magnetic or optical memory , or any combination of these or other types of storage devices . moreover , the term “ memory ” should be construed broadly enough to encompass any information able to be read from or written to an address in the addressable space accessed by an associated processor . with this definition , information on a network is still within a memory because the associated processor can retrieve the information from the network . it is to be understood that the embodiments and variations shown and described herein are merely illustrative of the principles of this invention and that various modifications may be implemented by those skilled in the art without departing from the scope and spirit of the invention .