3#include <featureTests.h>
4#ifdef ROSE_ENABLE_LIBRARY_IDENTIFICATION
6#include <Rose/BinaryAnalysis/AstHasher.h>
8#include "Combinatorics.h"
11namespace LibraryIdentification {
13const std::string unknownLibraryName =
"UNKNOWN";
14const std::string multiLibraryName =
"MULTIPLE_LIBS";
28 LibraryInfo(
const std::string& libName,
const std::string& libVersion,
const std::string& libHash,
29 const std::string& architecture)
30 : libName(libName), libVersion(libVersion), libHash(libHash), architecture(architecture) {
31 analysisTime = time(NULL);
39 LibraryInfo(
const std::string& libHash)
40 : libName(unknownLibraryName), libVersion(unknownLibraryName), libHash(libHash), architecture(unknownLibraryName) {}
45 friend bool operator<(
const LibraryInfo& lhs,
const LibraryInfo& rhs) {
46 return lhs.libHash < rhs.libHash;
52 static LibraryInfo getUnknownLibraryInfo() {
53 return LibraryInfo(unknownLibraryName, unknownLibraryName, unknownLibraryName, unknownLibraryName);
60 static LibraryInfo getMultiLibraryInfo() {
61 return LibraryInfo(multiLibraryName, multiLibraryName, multiLibraryName, multiLibraryName);
66 return libName +
"." + libVersion;
73 std::string libVersion;
79 std::string architecture;
ROSE_UTIL_API std::string toString(const Path &)
Convert a path to a string.