| Version 1 (modified by , 15 years ago) ( diff ) |
|---|
<?xml version="1.0" standalone="yes"?> <rootNode xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://vsl.cis.udel.edu/ns/tass/tass_ast
tass_ast.xsd"
xmlns="http://vsl.cis.udel.edu/ns/tass/tass_ast" xmlns:file="http://vsl.cis.udel.edu/ns/tass/File" xmlns:astnode="http://vsl.cis.udel.edu/ns/tass/ASTNode" xmlns:rtn="http://vsl.cis.udel.edu/ns/tass/RootNode" xmlns:fdn="http://vsl.cis.udel.edu/ns/tass/declaration/FunctionDeclarationNode" xmlns:idn="http://vsl.cis.udel.edu/ns/tass/IdentifierNode" xmlns:tyn="http://vsl.cis.udel.edu/ns/tass/type/TypeNode" xmlns:fvn="http://vsl.cis.udel.edu/ns/tass/declaration/FormalVariableDeclarationNode" xmlns:bln="http://vsl.cis.udel.edu/ns/tass/statement/BlockNode" xmlns:vdn="http://vsl.cis.udel.edu/ns/tass/declaration/VariableDeclarationNode" xmlns:exn="http://vsl.cis.udel.edu/ns/tass/statement/expression/ExpressionNode" xmlns:itn="http://vsl.cis.udel.edu/ns/tass/type/IntegerTypeNode" xmlns:stn="http://vsl.cis.udel.edu/ns/tass/statement/StatementNode"
xmlns:lvdn="http://vsl.cis.udel.edu/ns/tass/declaration/LocalVariableDeclarationNode" xmlns:mdn="http://vsl.cis.udel.edu/ns/tass/statement/expression/ModificationNode"
xmlns:lhsn="http://vsl.cis.udel.edu/ns/tass/statement/expression/LHSExpressionNode" xmlns:asn="http://vsl.cis.udel.edu/ns/tass/statement/expression/AssignmentNode" xmlns:gsn="http://vsl.cis.udel.edu/ns/tass/GlobalScopeNode" xmlns:vtn="http://vsl.cis.udel.edu/ns/tass/type/VoidTypeNode" xmlns:vrn="http://vsl.cis.udel.edu/ns/tass/statement/expression/VariableReferenceNode" xmlns:rn="http://vsl.cis.udel.edu/ns/tass/statement/ReturnNode" xmlns:ln="http://vsl.cis.udel.edu/ns/tass/statement/expression/LiteralNode" xmlns:iln="http://vsl.cis.udel.edu/ns/tass/statement/expression/IntegerLiteralNode" xmlns:ptn="http://vsl.cis.udel.edu/ns/tass/type/PointerTypeNode" xmlns:frn="http://vsl.cis.udel.edu/ns/tass/statement/expression/FunctionReferenceNode" xmlns:fin="http://vsl.cis.udel.edu/ns/tass/statement/expression/FunctionInvocationNode" xmlns:on="http://vsl.cis.udel.edu/ns/tass/statement/expression/OperatorNode" xmlns:asrn="http://vsl.cis.udel.edu/ns/tass/statement/AssertStatementNode" xmlns:btn="http://vsl.cis.udel.edu/ns/tass/type/BooleanTypeNode"
xmlns:gvdn="http://vsl.cis.udel.edu/ns/tass/declaration/GlobalVariableDeclarationNode"
xmlns:misc="http://vsl.cis.udel.edu/ns/tass/misc">
<rtn:globalScopeNodes>
<Pragma pragma="TASS input int " /> <Pragma pragma="TASS input {n>=0 && n<=B} int " /> <Pragma pragma="TASS input " /> <gsn:child xsi:type="gvdn:GlobalVariableDeclarationNode">
<gvdn:name identifier="a" /> <gvdn:type xsi:type="FIXME" />
</gsn:child> <Pragma pragma="TASS output " /> <gsn:child xsi:type="gvdn:GlobalVariableDeclarationNode">
<gvdn:name identifier="sum" /> <gvdn:type xsi:type="dtn:DoubleTypeNode" />
</gsn:child> <gsn:child xsi:type="fdn:FunctionDeclarationNode">
<astnode:source region="10,6,10,9" fileRef="0" /> <fdn:id>
0
</fdn:id> <fdn:name identifier="main" /> <fdn:outputType xsi:type="vtn:VoidTypeNode" /> <fdn:formals /> <fdn:body>
<bln:id>
1
</bln:id> <bln:variables> <vdn:child xsi:type="lvdn:LocalVariableDeclarationNode">
<astnode:source region="11,2,11,20" fileRef="0" /> <vdn:id>
2
</vdn:id> <vdn:name identifier="result" /> <vdn:type xsi:type="dtn:DoubleTypeNode" /> <lvdn:bref>
1
</lvdn:bref>
</vdn:child> <vdn:child xsi:type="lvdn:LocalVariableDeclarationNode">
<astnode:source region="12,2,12,6" fileRef="0" /> <vdn:id>
4
</vdn:id> <vdn:name identifier="i" /> <vdn:type xsi:type="itn:IntegerTypeNode" /> <lvdn:bref>
1
</lvdn:bref>
</vdn:child>
</bln:variables>
<bln:statements>
<stn:child xsi:type="asn:AssignmentNode">
<astnode:source region="11,2,11,20" fileRef="0" /> <stn:id>
3
</stn:id> <mdn:lhs xsi:type="vrn:VariableReferenceNode">
<astnode:source region="11,2,11,20" fileRef="0" /> <vrn:vref>
2
</vrn:vref>
</mdn:lhs>
</stn:child> <fsn:ForStatementNode>
<astnode:source region="14,2,14,35" fileRef="0" /> <fsn:ForInit>
<stn:child xsi:type="asn:AssignmentNode">
<astnode:source region="14,7,14,9" fileRef="0" /> <stn:id>
5
</stn:id> <mdn:lhs xsi:type="vrn:VariableReferenceNode">
<astnode:source region="14,7,14,7" fileRef="0" /> <vrn:vref>
4
</vrn:vref>
</mdn:lhs> <asn:rhs xsi:type="iln:IntegerLiteralNode">
<astnode:source region="14,9,14,9" fileRef="0" /> <ln:type xsi:type="itn:IntegerTypeNode" /> <iln:integerValue>
0
</iln:integerValue>
</asn:rhs>
</stn:child>
</fsn:ForInit> <fsn:ForCond>
<stn:child xsi:type="on:OperatorNode">
<astnode:source region="14,12,14,14" fileRef="0" /> <on:operator>
LESS
</on:operator> <on:argument1 xsi:type="vrn:VariableReferenceNode">
<astnode:source region="14,12,14,12" fileRef="0" /> <vrn:vref>
4
</vrn:vref>
</on:argument1> <on:argument2 xsi:type="iln:IntegerLiteralNode">
<astnode:source region="14,14,14,14" fileRef="0" /> <ln:name identifier="n" /> <ln:type xsi:type="itn:IntegerTypeNode" /> <iln:integerValue>
10
</iln:integerValue>
</on:argument2>
</stn:child>
</fsn:ForCond> <fsn:ForInc>
<stn:child xsi:type="inc:IncrementNode">
<stn:child xsi:type="vrn:VariableReferenceNode">
<astnode:source region="14,17,14,17" fileRef="0" /> <vrn:vref>
4
</vrn:vref>
</stn:child>
</stn:child>
</fsn:ForInc> <fsn:ForBody>
<stn:child xsi:type="casn:AddAssignmentNode">
<astnode:source region="14,22,14,35" fileRef="0" /> <stn:id>
6
</stn:id> <casn:lhs xsi:type="vrn:VariableReferenceNode">
<astnode:source region="14,22,14,27" fileRef="0" /> <vrn:vref>
2
</vrn:vref>
</casn:lhs> <stn:child xsi:type="sub:SubscriptNode">
<casn:rhs xsi:type="vrn:VariableReferenceNode">
<astnode:source region="14,32,14,32" fileRef="0" /> <vrn:vref>
0
</vrn:vref>
</casn:rhs> <casn:rhs xsi:type="vrn:VariableReferenceNode">
<astnode:source region="14,34,14,34" fileRef="0" /> <vrn:vref>
4
</vrn:vref>
</casn:rhs>
</stn:child>
</stn:child>
</fsn:ForBody>
</fsn:ForStatementNode> <stn:child xsi:type="asn:AssignmentNode">
<astnode:source region="15,2,15,13" fileRef="0" /> <stn:id>
7
</stn:id> <mdn:lhs xsi:type="vrn:VariableReferenceNode">
<astnode:source region="15,2,15,4" fileRef="0" /> <vrn:vref>
0
</vrn:vref>
</mdn:lhs> <asn:rhs xsi:type="vrn:VariableReferenceNode">
<astnode:source region="15,8,15,13" fileRef="0" /> <vrn:vref>
2
</vrn:vref>
</asn:rhs>
</stn:child>
</bln:statements>
</fdn:body>
</gsn:child>
</rtn:globalScopeNodes> <rtn:files>
<file:child>
<file:id>
0
</file:id> <file:fileName>
/Users/tmcclory/src/tass/tass/trunk/examples/adder/adder_seq.c
</file:fileName> <file:contents><![CDATA[#pragma TASS input int
#define B 10 #pragma TASS input {n>=0 && n<=B} int #define n 10 #pragma TASS input double a[n]; #pragma TASS output double sum;
void main() {
double result = 0.0; int i;
for (i=0; i<n; i++) result += a[i]; sum = result;
} ]]> </file:contents>
</file:child>
</rtn:files> </rootNode>
