File size: 3,771 Bytes
2ab7a4a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
code`block`FunctionDecl`FunctionDeclRec`ForStmt`ForStmtRec`DoStmt`DoStmtRec`WhileStmt`WhileStmtRec`IfStmt`IfStmtRec`SwitchStmt`SwitchStmtRec`countBlocks`countBlocksRec`countCondition`countVariable`countLiteral`IntegerLiteral`StringLiteral`IfStmt`ForStmt`WhileStmt`DoStmt`SwitchStmt`countLoop`VarDecl`DeclRefExpr`DeclStmt`countDecl`countPointer`writeFunction`CallExpr`BinaryOperator`UnaryOperator`CompoundAssignOperator`countOperand`ArraySubscriptE`RealFaultLocation
   int i;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`0`0`0`0`0`0`0`0`0`0`1`0`1`2`0`0`0`0`0`0`0`0`1
   int up=0,low=0;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`0`2`2`0`0`0`0`0`0`0`2`0`1`3`0`0`0`0`0`0`0`0`0
   char str[100];`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`0`0`0`0`0`0`0`0`0`0`1`0`1`2`0`0`0`0`0`0`0`0`0
   scanf(" %s",str);`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`1`1`0`1`0`0`0`0`0`0`0`2`0`2`0`0`1`0`0`0`0`0`0
   for(i=0;i<strlen(str);i++)`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`4`1`1`0`0`1`0`0`0`1`0`5`0`5`0`0`1`2`1`0`3`0`0
      if(str[i]>='a' && str[i]<='z')`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`4`4`2`0`0`1`0`0`0`0`0`0`4`0`4`0`0`0`3`0`0`3`2`0
         low++;`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`4`1`0`0`0`0`0`0`0`0`0`0`1`0`1`0`0`0`0`1`0`1`0`0
         up++;`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`4`1`0`0`0`0`0`0`0`0`0`0`1`0`1`0`0`0`0`1`0`1`0`0
   if(up>low)`FunctionDecl,false;IfStmt,false;`1`0`0`0`0`0`0`0`1`0`0`0`2`0`1`2`0`0`0`1`0`0`0`0`0`0`2`0`2`0`0`0`1`0`0`1`0`0
      for(i=0;i<strlen(str);i++)`FunctionDecl,false;IfStmt,false;ForStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`2`4`1`1`0`0`1`0`0`0`1`0`5`0`5`0`0`1`2`1`0`3`0`0
         if(str[i]>='a' && str[i]<='z')`FunctionDecl,false;IfStmt,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`2`0`0`0`4`0`5`4`2`0`0`1`0`0`0`0`0`0`4`0`4`0`0`0`3`0`0`3`2`0
            str[i]-='a'-'A';`FunctionDecl,false;IfStmt,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`2`0`0`0`4`0`5`2`2`0`0`0`0`0`0`0`0`0`2`0`2`0`0`0`1`0`1`2`1`0
   else if(low>up)`FunctionDecl,false;IfStmt,false;IfStmt,false;`1`0`0`0`0`0`0`0`2`0`0`0`3`0`2`2`0`0`0`1`0`0`0`0`0`0`2`0`2`0`0`0`1`0`0`1`0`0
      for(i=0;i<strlen(str);i++)`FunctionDecl,false;IfStmt,false;IfStmt,false;ForStmt,false;`1`0`1`0`0`0`0`0`2`0`0`0`4`0`3`4`1`1`0`0`1`0`0`0`1`0`5`0`5`0`0`1`2`1`0`3`0`0
         if(str[i]>='A' && str[i]<='Z')`FunctionDecl,false;IfStmt,false;IfStmt,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`3`0`0`0`5`0`6`4`2`0`0`1`0`0`0`0`0`0`4`0`4`0`0`0`3`0`0`3`2`0
            str[i]+='a'-'A';`FunctionDecl,false;IfStmt,false;IfStmt,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`3`0`0`0`5`0`6`2`2`0`0`0`0`0`0`0`0`0`2`0`2`0`0`0`1`0`1`2`1`0
   else if(low==up)`FunctionDecl,false;IfStmt,false;IfStmt,false;IfStmt,false;`1`0`0`0`0`0`0`0`3`0`0`0`4`0`3`2`0`0`0`1`0`0`0`0`0`0`2`0`2`0`0`0`1`0`0`1`0`0
      for(i=0;i<strlen(str);i++)`FunctionDecl,false;IfStmt,false;IfStmt,false;IfStmt,false;ForStmt,false;`1`0`1`0`0`0`0`0`3`0`0`0`5`0`4`4`1`1`0`0`1`0`0`0`1`0`5`0`5`0`0`1`2`1`0`3`0`0
         if(str[i]>='A' && str[i]<='Z')`FunctionDecl,false;IfStmt,false;IfStmt,false;IfStmt,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`4`0`0`0`6`0`7`4`2`0`0`1`0`0`0`0`0`0`4`0`4`0`0`0`3`0`0`3`2`0
            str[i]+='a'-'A';`FunctionDecl,false;IfStmt,false;IfStmt,false;IfStmt,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`4`0`0`0`6`0`7`2`2`0`0`0`0`0`0`0`0`0`2`0`2`0`0`0`1`0`1`2`1`0
   printf("%s",str);`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`1`1`0`1`0`0`0`0`0`0`0`2`0`2`0`0`1`0`0`0`0`0`0
   return 0;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0