Boost logo

Boost :

From: ÒÝÁØ Ñî (yyl_20050115_at_[hidden])
Date: 2020-08-03 16:42:06


Greetings, everyone,

Please, don¡¯t get me wrong ¡­ although I¡¯ve made lots of mistakes.

The story I posted seems one night of work. However, I worked on the field of a general parser framework for nearly two decades since as a teenager.

Started coding in BASIC from 12 years old (later ASM/Pascal/C/C++/Java/C#/ PHP/Python/¡­) and now 38, Two decades as a programmer.

Most of the my programming experience was focus on the language parsing area, or some kind of AI based parser (not the AI we used to know, or saying,
not connectionism, but symbolism), building a parser which can recognize all computer languages or even all human languages was always my dream.
(please don¡¯t think current NLP technology has solved this problem already, it has not yet)

For quite a long time, experiments on the parser I mentioned before all failed.

Until in late 2018, I found a way to solve the BIG problem with a new idea borrowed from the AI that we all know (Deep Neuron Network etc).

Here is the easy way to understand what I¡¯m talking about:

How can you cut a three-layers birthday cake?
Of course, you can cut it into fans vertically.

However, if you realized that its three-layers birthday cake already,
you don¡¯t have to cut, you can just split it horizontally into three layers directly without a knife.

So the key is, changing point of view can bring up solutions: From Control Flow based to Data Flow based programming.

Freeing or deleting or destroying linked objects is just another Graph Theory problem in Computer Science.
Actually we do have method to deal with graphs efficiently(DFS,BFS) in control flow based programming.
But there is limit in languages, such as
we know that the detors can have no parameters (this is important if you traverse the graph).
And the binding of detors and free() is another obstacle of making things right,
but the Data Flow based programming can help solving this problem.
(Of course, it is realized after the implementation, not before, not planed, nothing is foreseen.)

And If we can do this on common graph, we can do this on the freeing of object graph either in C++
or in other OO languages.

This is the thing, not a trick or simple idea, but implemented in C++
(other choice is C, as you can not choose Java or C#).
However, to explain it correctly, I may be limited by my English vocabulary.
So if you¡¯re interested, please read and debug the code to see what happens.
And we can talk about details or failure situations accordingly.

I¡¯m still on trail-and-error stage. And don¡¯t have full confidence that in every situation things will work correctly.

Feed-back is always welcomed. And if you don¡¯t like the ¡°abuse of the detors¡±, please just change it to dispose(or disposing?),
Because they¡¯re logically equivalent (maybe semantically not).

Best Regards,
Yilin



Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk