| | 1 | <?xml version="1.0" standalone="yes"?> |
| | 2 | <rootNode xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| | 3 | xsi:schemaLocation="http://vsl.cis.udel.edu/ns/tass/tass_ast |
| | 4 | tass_ast.xsd" |
| | 5 | xmlns="http://vsl.cis.udel.edu/ns/tass/tass_ast" |
| | 6 | xmlns:file="http://vsl.cis.udel.edu/ns/tass/File" |
| | 7 | xmlns:astnode="http://vsl.cis.udel.edu/ns/tass/ASTNode" |
| | 8 | xmlns:rtn="http://vsl.cis.udel.edu/ns/tass/RootNode" |
| | 9 | xmlns:fdn="http://vsl.cis.udel.edu/ns/tass/declaration/FunctionDeclarationNode" |
| | 10 | xmlns:idn="http://vsl.cis.udel.edu/ns/tass/IdentifierNode" |
| | 11 | xmlns:tyn="http://vsl.cis.udel.edu/ns/tass/type/TypeNode" |
| | 12 | xmlns:fvn="http://vsl.cis.udel.edu/ns/tass/declaration/FormalVariableDeclarationNode" |
| | 13 | xmlns:bln="http://vsl.cis.udel.edu/ns/tass/statement/BlockNode" |
| | 14 | xmlns:vdn="http://vsl.cis.udel.edu/ns/tass/declaration/VariableDeclarationNode" |
| | 15 | xmlns:exn="http://vsl.cis.udel.edu/ns/tass/statement/expression/ExpressionNode" |
| | 16 | xmlns:itn="http://vsl.cis.udel.edu/ns/tass/type/IntegerTypeNode" |
| | 17 | xmlns:stn="http://vsl.cis.udel.edu/ns/tass/statement/StatementNode" |
| | 18 | xmlns:lvdn="http://vsl.cis.udel.edu/ns/tass/declaration/LocalVariableDeclarationNode" |
| | 19 | xmlns:mdn="http://vsl.cis.udel.edu/ns/tass/statement/expression/ModificationNode" |
| | 20 | xmlns:lhsn="http://vsl.cis.udel.edu/ns/tass/statement/expression/LHSExpressionNode" |
| | 21 | xmlns:asn="http://vsl.cis.udel.edu/ns/tass/statement/expression/AssignmentNode" |
| | 22 | xmlns:gsn="http://vsl.cis.udel.edu/ns/tass/GlobalScopeNode" |
| | 23 | xmlns:vtn="http://vsl.cis.udel.edu/ns/tass/type/VoidTypeNode" |
| | 24 | xmlns:vrn="http://vsl.cis.udel.edu/ns/tass/statement/expression/VariableReferenceNode" |
| | 25 | xmlns:rn="http://vsl.cis.udel.edu/ns/tass/statement/ReturnNode" |
| | 26 | xmlns:ln="http://vsl.cis.udel.edu/ns/tass/statement/expression/LiteralNode" |
| | 27 | xmlns:iln="http://vsl.cis.udel.edu/ns/tass/statement/expression/IntegerLiteralNode" |
| | 28 | xmlns:ptn="http://vsl.cis.udel.edu/ns/tass/type/PointerTypeNode" |
| | 29 | xmlns:frn="http://vsl.cis.udel.edu/ns/tass/statement/expression/FunctionReferenceNode" |
| | 30 | xmlns:fin="http://vsl.cis.udel.edu/ns/tass/statement/expression/FunctionInvocationNode" |
| | 31 | xmlns:on="http://vsl.cis.udel.edu/ns/tass/statement/expression/OperatorNode" |
| | 32 | xmlns:asrn="http://vsl.cis.udel.edu/ns/tass/statement/AssertStatementNode" |
| | 33 | xmlns:btn="http://vsl.cis.udel.edu/ns/tass/type/BooleanTypeNode" |
| | 34 | xmlns:gvdn="http://vsl.cis.udel.edu/ns/tass/declaration/GlobalVariableDeclarationNode" |
| | 35 | xmlns:misc="http://vsl.cis.udel.edu/ns/tass/misc"> |
| | 36 | |
| | 37 | <rtn:globalScopeNodes> |
| | 38 | <Pragma pragma="TASS input int " /> |
| | 39 | <Pragma pragma="TASS input {n>=0 && n<=B} int " /> |
| | 40 | <Pragma pragma="TASS input " /> |
| | 41 | <gsn:child xsi:type="gvdn:GlobalVariableDeclarationNode"> |
| | 42 | <gvdn:name identifier="a" /> |
| | 43 | <gvdn:type xsi:type="FIXME" /> |
| | 44 | </gsn:child> |
| | 45 | <Pragma pragma="TASS output " /> |
| | 46 | <gsn:child xsi:type="gvdn:GlobalVariableDeclarationNode"> |
| | 47 | <gvdn:name identifier="sum" /> |
| | 48 | <gvdn:type xsi:type="dtn:DoubleTypeNode" /> |
| | 49 | </gsn:child> |
| | 50 | <gsn:child xsi:type="fdn:FunctionDeclarationNode"> |
| | 51 | <astnode:source region="10,6,10,9" fileRef="0" /> |
| | 52 | <fdn:id> |
| | 53 | 0 |
| | 54 | </fdn:id> |
| | 55 | <fdn:name identifier="main" /> |
| | 56 | <fdn:outputType xsi:type="vtn:VoidTypeNode" /> |
| | 57 | <fdn:formals /> |
| | 58 | <fdn:body> |
| | 59 | <bln:id> |
| | 60 | 1 |
| | 61 | </bln:id> |
| | 62 | <bln:variables> <vdn:child xsi:type="lvdn:LocalVariableDeclarationNode"> |
| | 63 | <astnode:source region="11,2,11,20" fileRef="0" /> |
| | 64 | <vdn:id> |
| | 65 | 2 |
| | 66 | </vdn:id> |
| | 67 | <vdn:name identifier="result" /> |
| | 68 | <vdn:type xsi:type="dtn:DoubleTypeNode" /> |
| | 69 | <lvdn:bref> |
| | 70 | 1 |
| | 71 | </lvdn:bref> |
| | 72 | </vdn:child> |
| | 73 | <vdn:child xsi:type="lvdn:LocalVariableDeclarationNode"> |
| | 74 | <astnode:source region="12,2,12,6" fileRef="0" /> |
| | 75 | <vdn:id> |
| | 76 | 4 |
| | 77 | </vdn:id> |
| | 78 | <vdn:name identifier="i" /> |
| | 79 | <vdn:type xsi:type="itn:IntegerTypeNode" /> |
| | 80 | <lvdn:bref> |
| | 81 | 1 |
| | 82 | </lvdn:bref> |
| | 83 | </vdn:child> |
| | 84 | </bln:variables> |
| | 85 | <bln:statements> |
| | 86 | <stn:child xsi:type="asn:AssignmentNode"> |
| | 87 | <astnode:source region="11,2,11,20" fileRef="0" /> |
| | 88 | <stn:id> |
| | 89 | 3 |
| | 90 | </stn:id> |
| | 91 | <mdn:lhs xsi:type="vrn:VariableReferenceNode"> |
| | 92 | <astnode:source region="11,2,11,20" fileRef="0" /> |
| | 93 | <vrn:vref> |
| | 94 | 2 |
| | 95 | </vrn:vref> |
| | 96 | </mdn:lhs> |
| | 97 | </stn:child> |
| | 98 | <fsn:ForStatementNode> |
| | 99 | <astnode:source region="14,2,14,35" fileRef="0" /> |
| | 100 | <fsn:ForInit> |
| | 101 | <stn:child xsi:type="asn:AssignmentNode"> |
| | 102 | <astnode:source region="14,7,14,9" fileRef="0" /> |
| | 103 | <stn:id> |
| | 104 | 5 |
| | 105 | </stn:id> |
| | 106 | <mdn:lhs xsi:type="vrn:VariableReferenceNode"> |
| | 107 | <astnode:source region="14,7,14,7" fileRef="0" /> |
| | 108 | <vrn:vref> |
| | 109 | 4 |
| | 110 | </vrn:vref> |
| | 111 | </mdn:lhs> |
| | 112 | <asn:rhs xsi:type="iln:IntegerLiteralNode"> |
| | 113 | <astnode:source region="14,9,14,9" fileRef="0" /> |
| | 114 | <ln:type xsi:type="itn:IntegerTypeNode" /> |
| | 115 | <iln:integerValue> |
| | 116 | 0 |
| | 117 | </iln:integerValue> |
| | 118 | </asn:rhs> |
| | 119 | </stn:child> |
| | 120 | </fsn:ForInit> |
| | 121 | <fsn:ForCond> |
| | 122 | <stn:child xsi:type="on:OperatorNode"> |
| | 123 | <astnode:source region="14,12,14,14" fileRef="0" /> |
| | 124 | <on:operator> |
| | 125 | LESS |
| | 126 | </on:operator> |
| | 127 | <on:argument1 xsi:type="vrn:VariableReferenceNode"> |
| | 128 | <astnode:source region="14,12,14,12" fileRef="0" /> |
| | 129 | <vrn:vref> |
| | 130 | 4 |
| | 131 | </vrn:vref> |
| | 132 | </on:argument1> |
| | 133 | <on:argument2 xsi:type="iln:IntegerLiteralNode"> |
| | 134 | <astnode:source region="14,14,14,14" fileRef="0" /> |
| | 135 | <ln:name identifier="n" /> |
| | 136 | <ln:type xsi:type="itn:IntegerTypeNode" /> |
| | 137 | <iln:integerValue> |
| | 138 | 10 |
| | 139 | </iln:integerValue> |
| | 140 | </on:argument2> |
| | 141 | </stn:child> |
| | 142 | </fsn:ForCond> |
| | 143 | <fsn:ForInc> |
| | 144 | <stn:child xsi:type="inc:IncrementNode"> |
| | 145 | <stn:child xsi:type="vrn:VariableReferenceNode"> |
| | 146 | <astnode:source region="14,17,14,17" fileRef="0" /> |
| | 147 | <vrn:vref> |
| | 148 | 4 |
| | 149 | </vrn:vref> |
| | 150 | </stn:child> |
| | 151 | </stn:child> |
| | 152 | </fsn:ForInc> |
| | 153 | <fsn:ForBody> |
| | 154 | <stn:child xsi:type="casn:AddAssignmentNode"> |
| | 155 | <astnode:source region="14,22,14,35" fileRef="0" /> |
| | 156 | <stn:id> |
| | 157 | 6 |
| | 158 | </stn:id> |
| | 159 | <casn:lhs xsi:type="vrn:VariableReferenceNode"> |
| | 160 | <astnode:source region="14,22,14,27" fileRef="0" /> |
| | 161 | <vrn:vref> |
| | 162 | 2 |
| | 163 | </vrn:vref> |
| | 164 | </casn:lhs> |
| | 165 | <stn:child xsi:type="sub:SubscriptNode"> |
| | 166 | <casn:rhs xsi:type="vrn:VariableReferenceNode"> |
| | 167 | <astnode:source region="14,32,14,32" fileRef="0" /> |
| | 168 | <vrn:vref> |
| | 169 | 0 |
| | 170 | </vrn:vref> |
| | 171 | </casn:rhs> |
| | 172 | <casn:rhs xsi:type="vrn:VariableReferenceNode"> |
| | 173 | <astnode:source region="14,34,14,34" fileRef="0" /> |
| | 174 | <vrn:vref> |
| | 175 | 4 |
| | 176 | </vrn:vref> |
| | 177 | </casn:rhs> |
| | 178 | </stn:child> |
| | 179 | </stn:child> |
| | 180 | </fsn:ForBody> |
| | 181 | </fsn:ForStatementNode> |
| | 182 | <stn:child xsi:type="asn:AssignmentNode"> |
| | 183 | <astnode:source region="15,2,15,13" fileRef="0" /> |
| | 184 | <stn:id> |
| | 185 | 7 |
| | 186 | </stn:id> |
| | 187 | <mdn:lhs xsi:type="vrn:VariableReferenceNode"> |
| | 188 | <astnode:source region="15,2,15,4" fileRef="0" /> |
| | 189 | <vrn:vref> |
| | 190 | 0 |
| | 191 | </vrn:vref> |
| | 192 | </mdn:lhs> |
| | 193 | <asn:rhs xsi:type="vrn:VariableReferenceNode"> |
| | 194 | <astnode:source region="15,8,15,13" fileRef="0" /> |
| | 195 | <vrn:vref> |
| | 196 | 2 |
| | 197 | </vrn:vref> |
| | 198 | </asn:rhs> |
| | 199 | </stn:child> |
| | 200 | |
| | 201 | </bln:statements> |
| | 202 | </fdn:body> |
| | 203 | </gsn:child> |
| | 204 | |
| | 205 | </rtn:globalScopeNodes> |
| | 206 | <rtn:files> |
| | 207 | <file:child> |
| | 208 | <file:id> |
| | 209 | 0 |
| | 210 | </file:id> |
| | 211 | <file:fileName> |
| | 212 | /Users/tmcclory/src/tass/tass/trunk/examples/adder/adder_seq.c |
| | 213 | </file:fileName> |
| | 214 | <file:contents><![CDATA[#pragma TASS input int |
| | 215 | #define B 10 |
| | 216 | #pragma TASS input {n>=0 && n<=B} int |
| | 217 | #define n 10 |
| | 218 | #pragma TASS input |
| | 219 | double a[n]; |
| | 220 | #pragma TASS output |
| | 221 | double sum; |
| | 222 | |
| | 223 | void main() { |
| | 224 | double result = 0.0; |
| | 225 | int i; |
| | 226 | |
| | 227 | for (i=0; i<n; i++) result += a[i]; |
| | 228 | sum = result; |
| | 229 | } |
| | 230 | ]]> </file:contents> |
| | 231 | </file:child> |
| | 232 | </rtn:files> |
| | 233 | </rootNode> |