Example of XML-IC and XML-3A

  3 posts   Feedicon  
Replies: 2 - Last Post: June 09, 2009 05:20
by: ABK
« Older Topic » Newer Topic
showing 1 - 3 of 3
 
Posted: April 20, 2009 19:47 by ABK
XML-IC

<?xml version="1.0" encoding="UTF-8"?>
<class name="dummyC">
<function name="main" type="bool">
<varList>
<var type="int">i</var>
<var type="int">j</var>
<var type="int">k</var>
</varList>
<mstmt type="=">
<val type="int">i</val>
<val type="number">10</val>
</mstmt>
<mstmt type="=">
<val type="int">j</val>
<val type="number">5</val>
</mstmt>
<mstmt type="=">
<val type="int">a</val>
<val type="stmt">
<stmt type="*">
<val type="number">j</val>
<val type="int">5</val>
</stmt>
</val>
</mstmt>
<mstmt type="="> <!-- k = 10 + 10 + 5 + j*1 -->
<val type="int">k</val>
<val type="stmt">
<stmt type="+">
<val type="number">10</val>
<val type="stmt">
<stmt type="+">
<val type="number">10</val>
<val type="stmt">
<stmt type="+">
<val type="number">5</val>
<val type="stmt">
<stmt type="*">
<val type="number">j</val>
<val type="int">1</val>
</stmt>
</val>
</stmt>
</val>
</stmt>
</val>
</stmt>
</val>
</mstmt>
<mstmt type="=">
<val type="int">l</val>
<val type="stmt">
<stmt type="*">
<val type="number">j</val>
<val type="int">5</val>
</stmt>
</val>
</mstmt>
<mstmt type="="> <!-- k = 10 + 1 * j + 5 + 10 -->
<val type="int">m</val>
<val type="stmt">
<stmt type="+">
<val type="stmt">
<stmt type="+">
<val type="number">10</val>
<val type="stmt">
<stmt type="+">
<val type="stmt">
<stmt type="*">
<val type="number">j</val>
<val type="int">1</val>
</stmt>
</val>
<val type="number">5</val>
</stmt>
</val>
</stmt>
</val>
<val type="number">10</val>
</stmt>
</val>
</mstmt>
<mstmt type="return">
<val type="bool">true</val>
</mstmt>
</function>
</class>



XML-3A (3Address Code From It)
<class name="dummyC">
<function name="main" type="bool">
<mstmt type="=">
<istmt type="=">
<val type="temp">i</val>
<val type="int">10</val>
</istmt>
</mstmt>
<mstmt type="=">
<istmt type="=">
<val type="temp">j</val>
<val type="int">5</val>
</istmt>
</mstmt>
<mstmt type="=">
<istmt type="=">
<val type="temp">TMPqwertyuiopVAR1</val>
<val type="stmt">
<stmt type="*">
<val type="int">5</val>
<val type="int">j</val>
</stmt>
</val>
</istmt>
<istmt type="=">
<val type="temp">a</val>
<val type="int">TMPqwertyuiopVAR1</val>
</istmt>
</mstmt>
<mstmt type="=">
<istmt type="=">
<val type="temp">TMPqwertyuiopVAR1</val>
<val type="stmt">
<stmt type="*">
<val type="int">1</val>
<val type="int">j</val>
</stmt>
</val>
</istmt>
<istmt type="=">
<val type="temp">TMPqwertyuiopVAR2</val>
<val type="stmt">
<stmt type="+">
<val type="int">TMPqwertyuiopVAR1</val>
<val type="int">5</val>
</stmt>
</val>
</istmt>
<istmt type="=">
<val type="temp">TMPqwertyuiopVAR3</val>
<val type="stmt">
<stmt type="+">
<val type="int">TMPqwertyuiopVAR2</val>
<val type="int">10</val>
</stmt>
</val>
</istmt>
<istmt type="=">
<val type="temp">TMPqwertyuiopVAR4</val>
<val type="stmt">
<stmt type="+">
<val type="int">TMPqwertyuiopVAR3</val>
<val type="int">10</val>
</stmt>
</val>
</istmt>
<istmt type="=">
<val type="temp">k</val>
<val type="int">TMPqwertyuiopVAR4</val>
</istmt>
</mstmt>
<mstmt type="=">
<istmt type="=">
<val type="temp">TMPqwertyuiopVAR1</val>
<val type="stmt">
<stmt type="*">
<val type="int">5</val>
<val type="int">j</val>
</stmt>
</val>
</istmt>
<istmt type="=">
<val type="temp">l</val>
<val type="int">TMPqwertyuiopVAR1</val>
</istmt>
</mstmt>
<mstmt type="=">
<istmt type="=">
<val type="temp">TMPqwertyuiopVAR1</val>
<val type="stmt">
<stmt type="*">
<val type="int">1</val>
<val type="int">j</val>
</stmt>
</val>
</istmt>
<istmt type="=">
<val type="temp">TMPqwertyuiopVAR2</val>
<val type="stmt">
<stmt type="+">
<val type="int">5</val>
<val type="int">TMPqwertyuiopVAR1</val>
</stmt>
</val>
</istmt>
<istmt type="=">
<val type="temp">TMPqwertyuiopVAR3</val>
<val type="stmt">
<stmt type="+">
<val type="int">TMPqwertyuiopVAR2</val>
<val type="int">10</val>
</stmt>
</val>
</istmt>
<istmt type="=">
<val type="temp">TMPqwertyuiopVAR4</val>
<val type="stmt">
<stmt type="+">
<val type="int">10</val>
<val type="int">TMPqwertyuiopVAR3</val>
</stmt>
</val>
</istmt>
<istmt type="=">
<val type="temp">m</val>
<val type="int">TMPqwertyuiopVAR4</val>
</istmt>
</mstmt>
<mstmt type="return"/>
</function>
</class>
 
Posted: June 02, 2009 06:17 by blaise.braye
hello ABK,

I was making a tour on this website when I saw you interest with managing code from xml...
I never heard about XML-IC or XML-3A but when reading those languages, a first question comes to me:
is it really powerful? I mean... you nead quite a lot of data, only in order to describe a class which has a very little core method.
where is the benefit? do you intend to share this kind of code cross over the Internet?

ever more, it seems that you whish to describe object patterns... why not choosing standards like XMI?

thank you for taking the time with those issues,
Blaise.
 
Posted: June 09, 2009 05:20 by ABK
hi,
thanks for noticing the evolving idea Smile and for the helpful comments
I'm sure you wouldn't have heard of XML-IC and XML-3A cuz those aren't any International Standards by any International Org., they are yet in their very infant stage

Now answers to all your queries:

[] about the power of it, believe me... leave the final state even at intermediate state of this technology we'll be able to see an entire new style of application development with few basic features like:
> any language can be used as a Platform Independent Language
> even Web Prog. Languages can be used for Desktop App. Prog.
> a truly unique and dynamic, new style of Distributed Dynamic Environment
I think to begin with powers this is not all but enough to support the cause
Yes, you are right we'd need a hell lot of data for little core method... but thats the backdrop of entire XML tech., but that is only generated at Run-Time, its not need to be stored...
"Look its this way... suppose you like java... write your code in Java... Then compiler will use use Java Parser compatible with my Code Generator to generate the reqd. XML further processed by my CodeGen, and few other reqd processes performed"

[] yes this will be shared cross over the internet

[] i said the goal is to enable any prog. language to use the code gen., to support such architecture Meta-Object Facility (somewhat base for XMI) isn't enough... so needed a new one, so using a new one
Replies: 2 - Last Post: June 09, 2009 05:20
by: ABK
« Older Topic » Newer Topic
  • Mysql
  • Glassfish
  • Jruby
  • Rails
  • Nblogo
Terms of Use; Privacy Policy;
© 2010, Oracle Corporation and/or its affiliates
(revision 20120518.3c65429)
 
 
Close
loading
Please Confirm
Close