pgarba / simba- Goto Github PK
View Code? Open in Web Editor NEWPort of MBA Solver SiMBA to C/C++
License: GNU General Public License v3.0
Port of MBA Solver SiMBA to C/C++
License: GNU General Public License v3.0
I used clion to compile wsl, but couldn't find the llvm headers.
#include "llvm/IR/Module.h" not found Module.h
For example, the llvm-version must be appended to the header
#include "llvm-15/llvm/IR/Module.h"
llvm include:/usr/lib/llvm-15/include
What should I do ?
hi, my friend, where can I get SATURN source code, I want to learn.
5>LLVMParser.obj : error LNK2019: unresolved external symbol "bool __cdecl prove(class z3::expr)" (?prove@@YA_NVexpr@z3@@@Z) referenced in function "private: bool __cdecl LSiMBA::LLVMParser::verify(class llvm::SmallVectorImpl<struct LSiMBA::BFSEntry> &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,class llvm::SmallVectorImpl<class llvm::Value *> &)" (?verify@LLVMParser@LSiMBA@@AEAA_NAEAV?$SmallVectorImpl@UBFSEntry@LSiMBA@@@llvm@@AEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAV?$SmallVectorImpl@PEAVValue@llvm@@@4@@Z)
6>SiMBA++.vcxproj -> Z:\SiMBA-\build\RelWithDebInfo\SiMBA++.exe
5>Simplifier.obj : error LNK2019: unresolved external symbol "bool __cdecl proveReplacement(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,int,class std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > &)" (?proveReplacement@@YA_NAEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0HAEAV?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@2@@Z) referenced in function "private: bool __cdecl LSiMBA::Simplifier::verify_mba_unsat(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &)" (?verify_mba_unsat@Simplifier@LSiMBA@@AEAA_NAEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0@Z)
5>Z:\SiMBA-\build\RelWithDebInfo\SiMBAPass.dll : fatal error LNK1120: 2 unresolved externals
5>Done building project "SiMBAPass.vcxproj" -- FAILED.
What version of z3 you are using ?
llvm was compiled with LLVM_ENABLE_Z3_SOLVER=ON
support and the z3 lib is linked.
I've had an segmentation fault trying to run the tool for LLVM samples with a BitWidth
of 64 bits, the error comes from the next line:
Line 161 in 21df900
The value Modulus
will obtain a value of 0, since it is a uint64_t
. The value will be passed as parameter in the next call:
Line 182 in 21df900
Inside of initResultVector
the value Modulus
is used in the next line:
Line 104 in 21df900
And that generates a division by 0, causing a Segmentation Fault.
I have seen that in Simplifier
class you use a modulus
with a value of type int64_t
, then the value of the call to pow
will not generate a value of 0. Could be possible to change the Modulus
variable from LLVMParser.cpp
and the parameter of initResultVector
from uint64_t
to int64_t
, for example like the next changes:
LLVMParser.h
:
void initResultVector(llvm::Function &F, std::vector<int64_t> &ResultVector,
int64_t Modulus, int VNumber, llvm::Type *IntType);
LLVMParser.cpp
:
int64_t Modulus = pow(2, this->BitWidth);
...
void LLVMParser::initResultVector(llvm::Function &F,
std::vector<int64_t> &ResultVector,
int64_t Modulus, int VNumber, Type *IntType) {
If that is a valid solution, let me know, and I will be happy to make a pull request.
The paper and the tool are amazing!
Would be nice if you could add a license to allow combining it in other open source projects!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.