C++ Formalism: any progress since n1885-6?

K

kwikius

Steven said:
These were circulated on the Mathematica mailing list when they were
originally released. I have not yet found time to examine them. Does
anybody know if subsequent work has been done in this area?

http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1885.pdf
http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1886.pdf

Yes. There are recent proposals:

http://www.generic-programming.org/languages/conceptcpp/

and also a version of gcc which is being used to experiment with(and
which you can download):

http://www.generic-programming.org/software/ConceptGCC/

It seems that the commitee is quite keen. I have used the compiler and
it is interesting but you can't do anything advanced with it and there
are some bugs, but it provides some insight into what Concepts will
look like:

regards
Andy Little
 
S

Steven T. Hatton

kwikius said:
Yes. There are recent proposals:

http://www.generic-programming.org/languages/conceptcpp/

and also a version of gcc which is being used to experiment with(and
which you can download):

http://www.generic-programming.org/software/ConceptGCC/

It seems that the commitee is quite keen. I have used the compiler and
it is interesting but you can't do anything advanced with it and there
are some bugs, but it provides some insight into what Concepts will
look like:

I was really looking for a follow-up on the formalism itself, not so much
the application. I'm currently more interested in non-template end of
things. I don't know if anybody will follow up on my suggestion of
devising an abstract state machine to use as a heuristic to help explain
and understand some of the trickier aspects of the standard such as the
interplay of friend declarations and ADL.

For myself, I'm currently trying to develop the GUI skills to rapidly create
tools to help visualize such things.
 
K

kwikius

Steven said:
I was really looking for a follow-up on the formalism itself, not so much
the application. I'm currently more interested in non-template end of
things. I don't know if anybody will follow up on my suggestion of
devising an abstract state machine to use as a heuristic to help explain
and understand some of the trickier aspects of the standard such as the
interplay of friend declarations and ADL.

I don't quite know what the above means, but AFAIK trying to express
C++ language just by grammar rules and such like doesnt work. That is
why it is near impossible to write automated tools for C++. What things
mean depends on the context. I guess the best model for a state machine
would be a C++ compiler maybe.

OTOH I reckon quite how C++ came to be is something of an enigma, which
its better just to accept. Maybe that is what makes it great. Like
other great things, it is not possible to know it completely.

regards
Andy Little
 
S

Steven T. Hatton

kwikius said:
I don't quite know what the above means, but AFAIK trying to express
C++ language just by grammar rules and such like doesnt work. That is
why it is near impossible to write automated tools for C++. What things
mean depends on the context. I guess the best model for a state machine
would be a C++ compiler maybe.

I'm not talking about a comprehensive state machine. That would be a
compiler. What I mean is some way of representing a name, for example, in
such a way that its state is clearly defined at a given point in the token
stream. What attributes should be assigned to it in order to fully
represent it? Is it in scope, visible, valid, defined, accessible etc.
Can an orthogonal set of attributes which fully characterizes the state of
a program component be identified?
OTOH I reckon quite how C++ came to be is something of an enigma, which
its better just to accept. Maybe that is what makes it great. Like
other great things, it is not possible to know it completely.

What can be created with C++ may be boundless, but the language definition
is finite. It should be comprehensible.
 
K

kwikius

Steven said:
I'm not talking about a comprehensive state machine. That would be a
compiler. What I mean is some way of representing a name, for example, in
such a way that its state is clearly defined at a given point in the token
stream. What attributes should be assigned to it in order to fully
represent it? Is it in scope, visible, valid, defined, accessible etc.
Can an orthogonal set of attributes which fully characterizes the state of
a program component be identified?

The best way to proceed IMO is to start with the various scopes. They
are listed somewhere in the standard. That gives some handle on the
'context' idea. Then the other layer that needs to be applied is
templates. Once you can say I am in context X then you are on safer
ground as to what such and such a construct means, but in another
context it could mean something else.

OTOH my mind works quite well with the context scheme, so things
usually work as I expect them to sort of instinctively. There is some
sort of a picture is worth a thousand words idea here that I cant
explain, but seems to be how the language was designed. I guess C++
work well with the way I think! But I don't try to analyse it too much
:)

regards
Andy Little
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top