<commit_before>#include <stdio.h>

#include "llvm/LLVMContext.h"
#include "llvm/Module.h"
#include "ExpertSystem/CLIPSEnvironment.h"
#include "ExpertSystem/KnowledgeConstructor.h"
#include "ExpertSystem/KnowledgeConstructionEngine.h"
#include "rampancy/Compiler.h"
#include "rampancy/LLVMIRCompiler.h"
#include "rampancy/Cortex.h"

extern "C" {
   #include "clips.h"
}

int main(int argc, char** argv, char* const *envp) {
   rampancy::ClangCompilerGlobals::argv0 = argv[0];
   rampancy::Cortex& rampantCortex = *rampancy::Cortex::getRampantCortex();
   rampancy::CompilerRegistry& compilerRegistry = 
      *rampancy::CompilerRegistry::getCompilerRegistry();
   PassRegistry &registry = *PassRegistry::getPassRegistry();
   initializeCore(registry);
   initializeScalarOpts(registry);
   initializeVectorization(registry);
   initializeIPO(registry);
   initializeAnalysis(registry);
   initializeIPA(registry);
   initializeTransformUtils(registry);
   initializeInstCombine(registry);
   initializeInstrumentation(registry);
   initializeTarget(registry);
   llvm::StringRef ref("bc");
   llvm::StringRef ref1("llvm-ir");
   llvm::StringRef ref2("bitcode");
   llvm::StringRef ref3("llvm-bitcode");
   rampancy::LLVMIRCompiler cc;
   compilerRegistry.registerCompiler(ref, &cc);
   compilerRegistry.registerCompiler(ref1, &cc);
   compilerRegistry.registerCompiler(ref2, &cc);
   compilerRegistry.registerCompiler(ref3, &cc);
   CLIPSEnvironment* theEnv = rampantCortex.getEnvironment();
   theEnv->batchStar("Init.clp");

   llvm::Module* mod = rampantCortex.compile(ref, argc, argv);
	//we need to setup 
   if(mod) {
      rampantCortex.convertToKnowledge(ref, mod);
      theEnv->eval((char*)"(save-instances \"instances\" visible)");
   } else {
      theEnv->eval((char*)"(printout t \"ERROR: Something went wrong\" crlf)");
   }
   llvm::llvm_shutdown();
}
<commit_msg>Removed the call to ClangCompilerGlobals from kbc<commit_after>#include <stdio.h>

#include "llvm/LLVMContext.h"
#include "llvm/Module.h"
#include "ExpertSystem/CLIPSEnvironment.h"
#include "ExpertSystem/KnowledgeConstructor.h"
#include "ExpertSystem/KnowledgeConstructionEngine.h"
#include "rampancy/Compiler.h"
#include "rampancy/LLVMIRCompiler.h"
#include "rampancy/Cortex.h"

extern "C" {
   #include "clips.h"
}

int main(int argc, char** argv, char* const *envp) {
   rampancy::Cortex& rampantCortex = *rampancy::Cortex::getRampantCortex();
   rampancy::CompilerRegistry& compilerRegistry = 
      *rampancy::CompilerRegistry::getCompilerRegistry();
   PassRegistry &registry = *PassRegistry::getPassRegistry();
   initializeCore(registry);
   initializeScalarOpts(registry);
   initializeVectorization(registry);
   initializeIPO(registry);
   initializeAnalysis(registry);
   initializeIPA(registry);
   initializeTransformUtils(registry);
   initializeInstCombine(registry);
   initializeInstrumentation(registry);
   initializeTarget(registry);
   llvm::StringRef ref("bc");
   llvm::StringRef ref1("llvm-ir");
   llvm::StringRef ref2("bitcode");
   llvm::StringRef ref3("llvm-bitcode");
   rampancy::LLVMIRCompiler cc;
   compilerRegistry.registerCompiler(ref, &cc);
   compilerRegistry.registerCompiler(ref1, &cc);
   compilerRegistry.registerCompiler(ref2, &cc);
   compilerRegistry.registerCompiler(ref3, &cc);
   CLIPSEnvironment* theEnv = rampantCortex.getEnvironment();
   theEnv->batchStar("Init.clp");

   llvm::Module* mod = rampantCortex.compile(ref, argc, argv);
	//we need to setup 
   if(mod) {
      rampantCortex.convertToKnowledge(ref, mod);
      theEnv->eval((char*)"(save-instances \"instances\" visible)");
   } else {
      theEnv->eval((char*)"(printout t \"ERROR: Something went wrong\" crlf)");
   }
   llvm::llvm_shutdown();
}

{'fraction_non_alphanumeric': 0.14110101549973275, 'fraction_numerical': 0.0037413148049171567, 'mean_word_length': 5.842778793418647, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3782902', 'n_tokens_mistral': 1213, 'n_tokens_neox': 1187, 'n_words': 198}