OSI Definition ToolAPI Syntax Definition : Syntax Definition : sub expression 2 and sub expression 3: : Example 2

Example 2
Some prefix, fix code ?<begin> $<prop1> ?<==> prop1val
?<&&> $<prop1.1> ?<==> prop1.1val ?<?> ?<begin>
$<prop2> ?<==> prop2val ?<||> $<prop2.1> ?<==>
prop2.1val ?<?> exp 1.1 when yes ?<:> exp 1.2 when no
?<end> ?<:> exp 2 when no ?<end> Some postfix code,
then another conditional expression ?<begin> $<prop3>
?<==> prop3val ?<?> exp 3.1 when yes ?<:> exp 3.2 when
no ?<end>
 
 

In this example we are trying to illustrate a “full” capability expression. Begin with the inner expression:

?<begin> $<prop2> ?<==> prop2val ?<||> $<prop2.1> ?<==>
prop2.1val ?<?> exp 1.1 when yes ?<:> exp 1.2 when no
?<end>
 
 

That expression will be evaluated to “exp 1.1 when yeswhen either $<prop2> evaluates to “prop2val” or $<prop2.1> evaluates to “prop2.1val”. When none of them is true, it will be evaluated to “exp 1.2 when no”.

So that expression will be replaced by either “exp 1.1 when yesor “exp 1.2 when no, let us mark it as exp 1”.

Now, substituting for “exp 1”, the first conditional expression will look like:

?<begin> $<prop1> ?<==> prop1val ?<&&> $<prop1.1> ?<==>
prop1.1val ?<?> exp 1 ?<:> exp 2 when no ?<end>
 

That expression will be evaluated to exp 1 when $<prop1>evaluates to prop1val and $<prop1.1> evaluates to prop1.1val. Otherwise, the expression will be evaluated to exp 2 when no.

So, assuming that:

$<prop1> = prop1val
$<prop1.1> = prop1.1val
$<prop2> = prop2val DIFFER
$<prop2.1> = prop2.1val DIFFER
$<prop3> = prop3val DIFFER
 
 

The API result will be:

Some prefix, fix code exp 1.2 when no Some postfix code, then another conditional expression exp 3.2 when no