473,804 Members | 3,162 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Source code as data structure in repositories.

There was recently some discussion of storing source code in databases. To
some extent that is a rather common practice. CVS, for example, provides a
means of storing source code in a database. In that case, the database
management system is indifferent to the type of file stored. There are
reasons not to store certain kinds of data in CVS, but in principle CVS
doesn't care.

An example of a mechanism for storing more structured document information
is provided by XML databases such as XMLDB, Xindice, XML Cannon, etc. Not
too long ago I enquired on the Xerces C mailing list as to the availability
of a means of validating XML against BNF, or converting the C++ grammar
into an XML Schema which could then be used to validate source code. If
source code were represented as and XML DOM object backing the edit buffer
of an IDE, it could certainly be stored using the same or a very similar
approach as that used by XML databases.

Before you reject the idea of representing C++ source code as XML, consider
MathML. The language of mathematics is huge in comparison to C++. If such
a thing can be done for mathematics, addressing not only syntax, but also
presentation, it can certainly be done for C++. The actual XML may never be
useful, but the DOM API, as well as the XML processing technology may prove
invaluable to managing C++ source.

Opinions?
--
p->m == (*p).m == p[0].m
http://www.kdevelop.org
http://www.suse.com
http://www.mozilla.org
Jul 22 '05 #1
8 2010
"Steven T. Hatton" <su******@setid ava.kushan.aa> wrote in message
news:Np******** ************@sp eakeasy.net...
There was recently some discussion of storing source code in databases. To some extent that is a rather common practice. CVS, for example, provides a means of storing source code in a database. In that case, the database
management system is indifferent to the type of file stored. There are
reasons not to store certain kinds of data in CVS, but in principle CVS
doesn't care.
[snip]
Opinions?


My opinion is that your post is not topical for comp.lang.c++,
where the topic is the C++ *language*, not code repositories.

-Mike
Jul 22 '05 #2
Steven T. Hatton wrote:
There was recently some discussion of storing source code in databases. To
some extent that is a rather common practice. CVS, for example, provides a
means of storing source code in a database. In that case, the database
management system is indifferent to the type of file stored. There are
reasons not to store certain kinds of data in CVS, but in principle CVS
doesn't care.

An example of a mechanism for storing more structured document information
is provided by XML databases such as XMLDB, Xindice, XML Cannon, etc. Not
too long ago I enquired on the Xerces C mailing list as to the availability
of a means of validating XML against BNF, or converting the C++ grammar
into an XML Schema which could then be used to validate source code. If
source code were represented as and XML DOM object backing the edit buffer
of an IDE, it could certainly be stored using the same or a very similar
approach as that used by XML databases.

Before you reject the idea of representing C++ source code as XML, consider
MathML. The language of mathematics is huge in comparison to C++. If such
a thing can be done for mathematics, addressing not only syntax, but also
presentation, it can certainly be done for C++. The actual XML may never be
useful, but the DOM API, as well as the XML processing technology may prove
invaluable to managing C++ source.

Opinions?


Out of curiosity, do you write any code or just analyze the
language. I seen many of your posts which analyze the language,
but not many that have code in them.

I would say to stop analyzing the language and just use it. :-)

--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.l earn.c-c++ faq:
http://www.raos.demon.uk/acllc-c++/faq.html
Other sites:
http://www.josuttis.com -- C++ STL Library book

Jul 22 '05 #3
Steven T. Hatton wrote:
There was recently some discussion of storing source code in databases.
To some extent that is a rather common practice. CVS, for example,
provides a means of storing source code in a database.
In that case, the database management system
is indifferent to the type of file stored.
There are reasons not to store certain kinds of data in CVS,
but in principle CVS doesn't care. An example of a mechanism for storing more structured document information
is provided by XML databases such as XMLDB, Xindice, XML Cannon, etc. Not
too long ago I inquired on the Xerces C mailing list as to the availability
of a means of validating XML against BNF, or converting the C++ grammar
into an XML Schema which could then be used to validate source code.
If source code were represented as and XML DOM object
backing the edit buffer of an IDE, it could certainly be stored using
the same or a very similar approach as that used by XML databases. Before you reject the idea of representing C++ source code as XML,
consider MathML. The language of mathematics is huge
in comparison to C++. If such a thing can be done for mathematics,
addressing not only syntax but also presentation,
it can certainly be done for C++.
The actual XML may never be useful,
but the DOM API, as well as the XML processing technology
may prove invaluable to managing C++ source.


These are Software Engineering and compiler design issues
that really are *not* on-topic here in the comp.lang.c++ newsgroup.
But please allow me to attempt to steer you back on-topic
be addressing the issue of C++ class and function template repositories.

The ANSI/ISO C++ standards do not specify how implementations
are to find template definitions and instantiate templates.
Some implementations use repositories for template source code
or some other representation of templates.
This is becoming a serious problem for C++ programmers
because there doesn't appear to be a solution
that is portable everywhere.

Jul 22 '05 #4
Steven T. Hatton wrote:
There was recently some discussion of storing source code in databases.
To some extent that is a rather common practice. CVS, for example,
provides a means of storing source code in a database.
In that case, the database management system
is indifferent to the type of file stored.
There are reasons not to store certain kinds of data in CVS,
but in principle CVS doesn't care. An example of a mechanism for storing more structured document information
is provided by XML databases such as XMLDB, Xindice, XML Cannon, etc. Not
too long ago I inquired on the Xerces C mailing list as to the availability
of a means of validating XML against BNF, or converting the C++ grammar
into an XML Schema which could then be used to validate source code.
If source code were represented as and XML DOM object
backing the edit buffer of an IDE, it could certainly be stored using
the same or a very similar approach as that used by XML databases. Before you reject the idea of representing C++ source code as XML,
consider MathML. The language of mathematics is huge
in comparison to C++. If such a thing can be done for mathematics,
addressing not only syntax but also presentation,
it can certainly be done for C++.
The actual XML may never be useful,
but the DOM API, as well as the XML processing technology
may prove invaluable to managing C++ source.


These are Software Engineering and compiler design issues
that really are *not* on-topic here in the comp.lang.c++ newsgroup.
But please allow me to attempt to steer you back on-topic
be addressing the issue of C++ class and function template repositories.

The ANSI/ISO C++ standards do not specify how implementations
are to find template definitions and instantiate templates.
Some implementations use repositories for template source code
or some other representation of templates.
This is becoming a serious problem for C++ programmers
because there doesn't appear to be a solution
that is portable everywhere.

Jul 22 '05 #5
Thomas Matthews wrote:
Out of curiosity, do you write any code or just analyze the
language. I seen many of your posts which analyze the language,
but not many that have code in them.

I would say to stop analyzing the language and just use it. :-)


That's a fair question. I have not been writing a lot of code. Mostly
because I don't have the kind of infrastructure to make the process
efficient. That has a lot to do with why I am talking about all this. You
may notice many, but not all, the topics I raise have to do with
development infrastructure.

I don't mean to belittle the extraordinary accomplishments of the KDevelop
team, but there are certain features not even they have found a way to
support. It's beginning to look like there's only one team left in the
league for full featured C++ IDEs. That is _very_ unhealthy for C++.

Because of the way my nervous system is wired, I rely on certain
functionality such as code completion and syntax highlighting more than
most people. Nonetheless, those features are force multipliers for any
programmer who masters them.

Imagine you could type the name of a class in, and hit a key combo to get a
pick list of all the available identifiers in your include path that match.
You could then select the appropriate match and the #include would
automatically be added to your source file.

Perhaps you can do that with VC++. I won't use it. I have my reasons.

But this topic actually goes beyond that interest. The repository aspect
really wasn't the essential part. It was the data model backing the
displayed source code.

If this is possible, then I _know_ C++ can be defined in an XML grammar
representation:

http://www.w3.org/TR/MathML2/

I just happen to find the topic both interesting and compelling as regards
it's potential usefullness.

And one last thing. I don't learn the way other people do. I tend to master
things from the top down. I don't get the fine points until I get the big
picture.
--
p->m == (*p).m == p[0].m
http://www.kdevelop.org
http://www.suse.com
http://www.mozilla.org
Jul 22 '05 #6
Thomas Matthews wrote:
Out of curiosity, do you write any code or just analyze the
language. I seen many of your posts which analyze the language,
but not many that have code in them.

I would say to stop analyzing the language and just use it. :-)


That's a fair question. I have not been writing a lot of code. Mostly
because I don't have the kind of infrastructure to make the process
efficient. That has a lot to do with why I am talking about all this. You
may notice many, but not all, the topics I raise have to do with
development infrastructure.

I don't mean to belittle the extraordinary accomplishments of the KDevelop
team, but there are certain features not even they have found a way to
support. It's beginning to look like there's only one team left in the
league for full featured C++ IDEs. That is _very_ unhealthy for C++.

Because of the way my nervous system is wired, I rely on certain
functionality such as code completion and syntax highlighting more than
most people. Nonetheless, those features are force multipliers for any
programmer who masters them.

Imagine you could type the name of a class in, and hit a key combo to get a
pick list of all the available identifiers in your include path that match.
You could then select the appropriate match and the #include would
automatically be added to your source file.

Perhaps you can do that with VC++. I won't use it. I have my reasons.

But this topic actually goes beyond that interest. The repository aspect
really wasn't the essential part. It was the data model backing the
displayed source code.

If this is possible, then I _know_ C++ can be defined in an XML grammar
representation:

http://www.w3.org/TR/MathML2/

I just happen to find the topic both interesting and compelling as regards
it's potential usefullness.

And one last thing. I don't learn the way other people do. I tend to master
things from the top down. I don't get the fine points until I get the big
picture.
--
p->m == (*p).m == p[0].m
http://www.kdevelop.org
http://www.suse.com
http://www.mozilla.org
Jul 22 '05 #7
Steven T. Hatton wrote:
But this topic actually goes beyond that interest. The repository aspect
really wasn't the essential part. It was the data model backing the
displayed source code.

If this is possible, then I _know_ C++ can be defined in an XML grammar
representation:
Let me ask you one thing. What do you perceive to be the strength of an
XML representation as opposed to whatever abstract syntax tree the
compiler generates upon a parse? The one Java IDE I have studied in
detail (Eclipse, which is probably one of the best out there) works on
ASTs generated by its internal compiler. XML just seems superfluos.
http://www.w3.org/TR/MathML2/

I just happen to find the topic both interesting and compelling as regards
it's potential usefullness.

--
Daniel Sjöblom
Remove _NOSPAM to reply by mail
Jul 22 '05 #8
Steven T. Hatton wrote:
But this topic actually goes beyond that interest. The repository aspect
really wasn't the essential part. It was the data model backing the
displayed source code.

If this is possible, then I _know_ C++ can be defined in an XML grammar
representation:
Let me ask you one thing. What do you perceive to be the strength of an
XML representation as opposed to whatever abstract syntax tree the
compiler generates upon a parse? The one Java IDE I have studied in
detail (Eclipse, which is probably one of the best out there) works on
ASTs generated by its internal compiler. XML just seems superfluos.
http://www.w3.org/TR/MathML2/

I just happen to find the topic both interesting and compelling as regards
it's potential usefullness.

--
Daniel Sjöblom
Remove _NOSPAM to reply by mail
Jul 22 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
5342
by: FISH | last post by:
Ever have one of those days when you're not sure if it's you who's gone mad, or the rest of the world? I have an Open Source project on SourceForge for communication with YSMG - Yahoo's IM protocol. I keep the project source in three directories, based upon the code's function: one for the network API code itself, one for the support APIs (basic chat spam filtering, Swing models, rich text decoders, etc), and one for the test client...
8
421
by: Steven T. Hatton | last post by:
There was recently some discussion of storing source code in databases. To some extent that is a rather common practice. CVS, for example, provides a means of storing source code in a database. In that case, the database management system is indifferent to the type of file stored. There are reasons not to store certain kinds of data in CVS, but in principle CVS doesn't care. An example of a mechanism for storing more structured...
0
319
by: Huihong | last post by:
Please check out our source code search engine here, http://www.codase.com e.g., search main method, http://www.codase.com/search/definition?name=main&class=&lang=*&project=&type=&parameters=&nparams=-1 Rather than treating code as text, Codase understands programming languages, and treats code as code, the way it's supposed to be. This unique and syntax-aware approach provides the most accurate and detailed search results with fine...
41
3098
by: Matt Alanzo | last post by:
Our SOHO 2 person compay sells furniture (not programmers). In '98 we paid $,$$$ for a VBA -Access '97 accounting application, including VBA source code .... an huge investment for us then (and now!). The application publisher went belly up years ago. Over time we've made a number of VBA code changes (< 500 lines total). Now our CPA is urging us to switch to Quickbooks Premier for Contractors at a cost of $,$$$ plus data entry. Argh, no...
4
3867
by: Thomas Paul Diffenbach | last post by:
Can anyone point me to an open source library of /statically allocated/ data structures? I'm writing some code that would benefit from trees, preferably self balancing, but on an embedded system that doesn't offer dynamic memory allocation (to be clear: no malloc, no realloc), and with rather tight memory constraints. Writing my own malloc to do dynamic allocation from some static pool isn't really an option, for various reasons, not...
13
1745
by: Naeem | last post by:
What are the ways data can be transported/moved among these Products. SQL Server, Access and Excel. The main ways are: Replication Service, BackUp and Restore, Data Link Server,Import/Export Utility, BCP Utility, Using Database APIs(DAO, ADO etc). Is there any other way to transform data from each of three products to eachof three products separately.
8
3631
by: Huihong | last post by:
Please check out our newly released source code search engine here, http://www.codase.com e.g., search socket method call, http://www.codase.com/search/call?name=socket&owner=&lang=*&type=&parameters=&obj= Rather than treating code as text, Codase understands programming languages, and treats code as code, the way it's supposed to be. This unique and syntax-aware approach provides the most accurate and detailed search results with...
0
1137
by: Huihong | last post by:
Please check out our source code search engine here, http://www.codase.com e.g., search the "main" method, http://www.codase.com/search/definition?name=main&class=&lang=*&project=&type=&parameters=&nparams=-1 Rather than treating code as text, Codase understands programming languages, and treats code as code, the way it's supposed to be. This unique and syntax-aware approach provides the most accurate and detailed search results with...
0
1212
by: medha1 | last post by:
Are you a programmer? Have you ever had to search for open source code? We are surveying programmers on how they search for open source software on the web, as part of our project at the University of California, Irvine. We're looking for fairly basic information, such as what tools you use and what types of source code you look for. Our research project aims at improving open source code search engines, based on features programmers...
0
9707
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9585
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10586
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10323
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10082
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9161
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5525
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4301
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3823
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.