Comments (4)
Hello utdael,
I would run lorina
as follows to parse a bench file:
#include <lorina/lorina.hpp>
#include <iostream>
int main()
{
using namespace lorina;
bench_reader reader;
text_diagnostics consumer;
diagnostic_engine diag( &consumer );
if ( read_bench( "c432.bench", reader, &diag ) == return_code::success )
{
std::cout << "parsing successful" << std::endl;
}
else
{
std::cout << "parsing failed" << std::endl;
}
}
On my system, this approach seems to be able to read all of Maksim's benchmarks.
What do you mean by "it isn't working"? Do you see a specific error message?
Edit: I should point out that lorina
is a C++ library. It provides you with API to read bench files, but you still have to implement an executable that calls the API to process the file(s).
Best,
Heinz
from lorina.
Thank you for the quick response.
My main problem is compiling and running lorina on one of our cpp files in a linux environment. At the moment, we cloned the github in the same folder as our cpp file.
We attempted to compile it using gcc bench.cpp in one of the screenshots attached.
However, we get an error that says "no such file or directory" for the #include <lorina/lorina.hpp> library.
How can I go about compiling this design?
from lorina.
lorina
uses CMake as a build system.
Try the following steps:
$ git clone [email protected]:hriener/lorina.git
Cloning into 'lorina'...
[...]
$ cd lorina
$ mkdir build
$ cd build
$ cmake .. -DLORINA_EXAMPLES=ON
-- The CXX compiler identification is ...
[...]
$ make
[ 50%] Building CXX object examples/CMakeFiles/pretty_print.dir/pretty_print.cpp.o
[100%] Linking CXX executable pretty_print
[100%] Built target pretty_print
$ ./example/pretty_print PATH_TO_YOUR_BENCH_FILE
Two more notes:
- You may have to install
cmake
andmake
on your system first. You will notice if you see error messages saying thatcmake
ormake
is not a valid command. - All files ending with
.cpp
in the directoryexamples
will be automatically build. Each time you add a new example, you have to runcmake
again in the build directory. Each time you change one of the.cpp
files, you have to runmake
again in the build directory.
from lorina.
Seems to be resolved.
If not, then the issue can be re-opened...
from lorina.
Related Issues (11)
- Add <vector> to files HOT 1
- operator== on truth tables? HOT 3
- Integration with the conan package manager HOT 4
- mismatch in parsing symbol table of AIG ASCII format? HOT 4
- Compile error in clang 6.0.0 HOT 2
- Wrong include filename HOT 1
- verilog to aig HOT 2
- [Verilog] Multi-output module instances are instantiated multiple times HOT 1
- Getting parse errors when reading Verilog files using Lorina Verilog reader HOT 2
- CMake stepup for installation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lorina.