Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I need an open source tool (even a relatively primitive one will do) which performs Mutation Testing on C++ code. I require it to be open source as I require to modify it in a proof of concept experiment.
I tried Googling it but did not come up with open source tools, I came up with this question, but the suggested tools in the answers are either not open source or do not mutate C++.
I presume that by "C++ code" you mean something that mutates the source code itself rather than a compiled version? Source code mutation is far harder to implement than intermediate code mutation (e.g. Java bytecode or .NET IL). Because of this, I strongly suspect that you won't find an open source one.
The challenge is to parse the source code into some form of syntax tree, a hard problem in C++, which will then allow you to identify mutation points and make the source code changes you need. You might like to take a look at GCCXML as an open source starting point for parsing - adding the mutation is actually the more straightforward part of the problem.
The open source NinjaTurtles (disclaimer: I am lead developer on this) will mutate assemblies compiled from .NET managed C++ code, but I suspect that won't be any good to you?
Have you looked into the Clang rewriter engine or their AST matchers? You can search for certain spots in the source code semantically, then apply transformations and recompile. It was designed for generic source to source tools and analysis.
It's a bit roll your own, but I think it is definitely workable.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I am developing some c++ code, but having code separated in to .h and .cpp is driving me mad, as it is slowing down re-factoring.
Is there a tool that lets one work on a single file. An editor that just hides the truth, or a per-processor that takes a single file and produces the two files .cpp and .h
clarification:
I want a single file per compilation unit (like Java, C♯, Eiffel). I will still have to have #include in files to include the headers of other modules. (but then Java and c♯ have import and using).
clarification 2:
Things are easier if everything that should be together is together.
i.e. one and only one file per class.
There's Lzz. I haven't tried it, but it seems like what you're looking for.
Whatever tool you try to use to do this will only hide some of the complexity or make your code C++-unlike and that will in turn make it harder for others to read/maintain.
I recommend that you just learn and get used to the compilation model of the language rather than fighting it. Deciding what goes into the header and/or the implementation is not an automated process, but rather part of the design and tools cannot design for you. Any automated tool to do that will end up generating a less than perfect result, probably longer compile times and/or leaking implementation details to the users of your headers.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Possible duplicate
What is the best open source example of a lightweight
Windows Application?
µTorrent is a small bit-torrent client, a really small one. It doesn't come with an installer, just a exe, you drop in your PATH somewhere. It's super lightweight and yet feature rich. Plus it is the work of one man. It's also closed-source.
Many people have been curious about how it has been written, and there are hints here and there about a custom library etc. But the question is, are there any programs with attributes like µTorrent that are available with source code--attributes like speed, small size, awesomeness.
Possible related question (/questions/9603/what-is-some-great-source-code-to-read), but think smaller than something like the Linux kernel.
Clarification: I don't want examples of bit-torrent source code, but anything which is used by tons of people (validation of awesomeness) and also fast, small and awesome!
I think you should take a look at Notepad++ if you want to see a feature-rich low-consumption of power software :)
Netcat
It's the program that started all of the curiousity behind networks and how things WORK.
Everyone's looked at this source code.
rTorrent is a lightweight, feature-rich, console-only open-source torrent client.
I like Frhed, a simple open-source Windows hex editor.
FRESHMEAT is a great place to start. There are lots of small open source programs available that you can study.
Examples:
XML-RPC specification.C implementation for Python. Its easy to learn and its fun.
Heapq [\Lib\heapq.py] , xml-rpc [\Lib\xmlrpc] and lots of other codes in Python library are very well written.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I have an old DLL that stopped working (log2vis.dll) and I want to look inside it to see what objects it uses.
The DLL was written in C++ (not .NET). Is there a tool that will decompile/disassemble C++ files?
This might be impossible or at least very hard. The DLL's contents don't depend (a lot) on it being written in C++; it's all machine code. That code might have been optimized so a lot of information that was present in the original source code is simply gone.
That said, here is one article that goes through a lot of material about doing this.
Hex-Rays decompiler is probably the best in this field !!!
I think a C++ DLL is a machine code file. Therefore decompiling will only result in assembler code. If you can read that and create C++ from that you're good to go.
There are no decompilers which I know about.
W32dasm is good Win32 disassembler.
There really isn't any way of doing this as most of the useful information is discarded in the compilation process. However, you may want to take a look at this
site to see if you can find some way of extracting something from the DLL.
The closest you will ever get to doing such thing is a dissasembler, or debug info (Log2Vis.pdb).
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I have several projects, some using managed code and some using only unmanaged. All have the XML comments have been added and the XML documentation is being generated correctly (the generated xml file and intermediate the xdc files).
Surely there's something that can take these files (the output of xdcmake) and generate MSDN style chm help! ?
From what I understand, both doxygen and sandcastle ignore that obvious step and re-invent the wheel to re-scan your code. (there's also the fact that sandcastle is apparently useless for non-.NET projects).
Having tried doxygen (horrible output, but fast) and sandcastle (nice MSDN style output, but sloooooow) both are begging to be outdone by something much simpler.
It would also be nice if there was some kind of editor associated that we can also write the 'Getting Started' and 'Information' kind of pages that are also needed with any API documentation.
Does anyone know of any solutions?
You might want to try DoxyComment. Here is the description from Doxygen's Helper tools & scripts:
An addin for Visual Studio 2005 called
DoxyComment was created by Troels
Gram. It is designed to assist you in
inserting context sensitive comment
blocks into C/C++ source files.
DoxyComment also comes with an xslt
template that lets you generate
documentation like the MSDN library.
Honestly, Sandcastle is your best bet. I know it can be a bit of a pain to configure, but the documentation is exactly the style you are looking for.
I know the project where people still use NDocConsole
However I suppose that NDoc is a dead project, because on http://ndoc.sourceforge.net/ there are no updates since 2005
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I have a program in which I've lost the C++ source code. Are there any good C++ decompilers out there?
I've already ran across Boomerang.
You can use IDA Pro by Hex-Rays. You will usually not get good C++ out of a binary unless you compiled in debugging information. Prepare to spend a lot of manual labor reversing the code.
If you didn't strip the binaries there is some hope as IDA Pro can produce C-alike code for you to work with. Usually it is very rough though, at least when I used it a couple of years ago.
information is discarded in the compiling process. Even if a decompiler could produce the logical equivalent code with classes and everything (it probably can't), the self-documenting part is gone in optimized release code. No variable names, no routine names, no class names - just addresses.
Yes, but none of them will manage to produce readable enough code to worth the effort. You will spend more time trying to read the decompiled source with assembler blocks inside, than rewriting your old app from scratch.
I haven't seen any decompilers that generate C++ code. I've seen a few experimental ones that make a reasonable attempt at generating C code, but they tended to be dependent on matching the code-generation patterns of a particular compiler (that may have changed, it's been awhile since I last looked into this). Of course any symbolic information will be gone. Google for "decompiler".
Depending on how large and how well-written the original code was, it might be worth starting again in your favourite language (which might still be C++) and learning from any mistakes made in the last version. Didn't someone once say about writing one to throw away?
n.b. Clearly if this is a huge product, then it may not be worth the time.