|code transformations? email@example.com (1996-09-22)|
|Re: code transformations? firstname.lastname@example.org (1996-09-23)|
|Re: code transformations? email@example.com (Charles Fiterman) (1996-09-23)|
|Re: code transformations? firstname.lastname@example.org (1996-09-25)|
|Re: code transformations? email@example.com (Darius Blasband) (1996-09-26)|
|Re: code transformations? firstname.lastname@example.org (1996-09-26)|
|Re: code transformations? email@example.com (1996-09-26)|
|Re: code transformations? firstname.lastname@example.org (1996-09-29)|
|[5 later articles]|
|From:||email@example.com (Niels Ull Jacobsen)|
|Date:||23 Sep 1996 21:00:34 -0400|
|Organization:||Department of Computer Science, U of Copenhagen|
firstname.lastname@example.org (Tom Lord) writes:
>Some time ago, somebody suggested to me the idea of writing a certain
>kind of C preprocessor. The gist of it was that the preprocessor
>would actually parse the program, make some changes to the AST and
>then write source back to disk. This got me to thinking -- suitably
>sophisticated transformations could preserve the semantics of the
>program, while completely disguising the text of the source. This has
>obvious implications for anyone into intellectual property theft.
>So the question is, has anybody written such a program? Will anyone?
>Would releasing such a program on the net be like the SATAN of IP?
>[There are certainly C obfuscators, but the ones I know of perform primarily
>lexical smooshing. -John]
As noted by the moderator, this would probably be nothing more than an
advanced obfuscator. You can, of course, replace most high-level
constructs with goto's and if's (basically creating a flow-chart
version of the program), split compound expressions into pieces and
even change the order of some statements.
The problem is the same as with an obfuscator - the code will become
unreadable and unmaintainable. Even if you reconstruct some higher
level construct, they're likely to either become the old program or to
become much harder to understand. After all, the original program as
written is probably the most straightforward way of expressing the
Niels Ull Jacobsen, Dep. of CS, U of Copenhagen (email@example.com)
Roenne Alle 3 st.th, 2860 Soeborg, Denmark, tel. +45 39 66 39 86
[I suppose a counter-example is struct, an old Bell Labs Unix tool that
apparently did a remarkably good job of discovering structure in Fortran
spaghetti code, turning if-goto into loops. -John]
Return to the
Search the comp.compilers archives again.