A typical if-statement contains an expression as a condition and then the execution part, say statements S1.. SN. Possible it contains an else-part, too, but it is not discussed here.

Symbolic evaluation produces redundant information about all symbols and their execution results, s.e. side effects. Their internal semantics is compatible with the original clauses, which makes combining results and commands very easy.

Implementation of the conditional statement in the atomistic model

For the symbolic atomistic model, all conditions either simple or complex, has only one reference in the if-statement, and the other parameters of the conditions are links to that main reference. Therefore, evaluating a condition results to a situation, where there is a value to be assigned to that condition symbol (atom). The whole expression then is connected to this new side effect symbol.

Modeling the then-part of the if-statement

The execution part of   the if-statement is a list referring to the corresponding statements. Therefore the internal model for an if-statement is if((C, [S1….SN]).

Simulating the if-statement

Simulating the condition C gives a new symbol R, which contains the result of evaluation or an expression, which holds the information about subterms and the semantics of the condition. If the condition is A==B, and A is not known and B is 1, then the side effect, say SE,  for C contains an expression eq(A, 1).

Proofing conditional statements

In all cases it is possible for the user to try to validate each simulation result against his assumptions. If SE is not wrong, or contains unexpected information, then it is possible for him to return, and to check the parameters. Because of that all simulated information can be processed as graphs. It is useful to add birectional links from symbols to their side effect symbols, which principle makes proofing programs and visualizing results rather easy.

Advertisements