Comments (12)
I just tried from on a fresh virtual machine(ubuntu 64-bit), and it worked smoothly!
Even if I still get this message
"
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
.........
"
now the script writes all the files I need.
TBH, I don't know what happened before.
Anyway Thank you all for your time :)
from astminer.
hi @antonio-mastropaolo, thank you for the report. I'll have a look asap.
from astminer.
@antonio-mastropaolo could you please confirm if there is still output in results/c
regardless of the error?
from astminer.
@vovak Yes, but they're empty
from astminer.
Looks like the reason is either the error in the last line, which is not related to slf4j
, or other problems with the C parser. Could you please share the output of java --version
in your environment?
from astminer.
Ook I see, this is the java version I have:
openjdk 15 2020-09-15
OpenJDK Runtime Environment (build 15+36-1562)
OpenJDK 64-Bit Server VM (build 15+36-1562, mixed mode, sharing)
from astminer.
Thanks. Would it be an option for you to share a (minimal) example of input where it fails? It works fine in my environment (Catalina, openjdk15) with a sample input. I build astminer from master-dev
before running ./cli.sh
from astminer.
@vovak Yep sure. Here the sample I'm trying to make it works
int sim_lifted_irk_integrator_calculate_args_size(sim_dims *dims, void *submodules_)
{
sim_lifted_irk_integrator_submodules *submodules = (sim_lifted_irk_integrator_submodules *) submodules_;
int size = sizeof(sim_lifted_irk_integrator_args);
int ns = dims->num_stages;
size += ns * ns * sizeof(double); // A_mat
size += ns * sizeof(double); // b_vec
size += ns * sizeof(double); // c_vec
size += sizeof(Newton_scheme);
make_int_multiple_of(8, &size);
size += ns * sizeof(double); // eig
size += ns*ns * sizeof(double); // transf1
size += ns*ns * sizeof(double); // transf2
size += ns*ns * sizeof(double); // transf1_T
size += ns*ns * sizeof(double); // transf2_T
size += 2*sizeof(external_function_fcn_ptrs);
size += submodules->forward_vde.calculate_args_size(&sim_lifted_irk_forward_vde_dims, NULL);
size += submodules->jacobian_ode.calculate_args_size(&sim_lifted_irk_jacobian_ode_dims, NULL);
make_int_multiple_of(8, &size);
size += 2 * 8;
return size;
}
I also want to ask you, if we need to import all the dependencies or we can discard them.
For example, in the example I post above _ make_int_multiple_of_ is not defined.
Can be this a problem?
Thank you for your time :)
from astminer.
Importing the dependencies is not necessary, as code is merely parsed for paths extraction.
When I place the snippet above to results/prep/example.c
and run the cli.sh command with arguments just as you've provided, it works, and the output looks OK.
It's a classic it-works-on-my-machine, but I'd love to help you get it to work.
What OS do you use?
from astminer.
hi @vovak
I really appreciate your help :)
I'm using macOS Big Sur 11.1. FYI I've already tried on another machine(ubuntu) and got the same problem.
At this stage, my only guess is that it could be something related to the java version.
I'm using openjdk 15 2020-09-15
from astminer.
Hi @antonio-mastropaolo! Wild guess, what is the path to the file that you're trying to parse?
from astminer.
@antonio-mastropaolo great! Please let us know if you encounter it again.
from astminer.
Related Issues (20)
- Error running astminer HOT 24
- Error Parsing C++ Files for Code2Seq HOT 15
- Integrating astminer with code2vec for C source codes HOT 6
- need help HOT 3
- File information of path_context result HOT 2
- different paths for same code content in python HOT 2
- problem with running "gradle shadowJar" HOT 4
- cli.jar HOT 8
- Looping over AST trees to generate paths between terminals HOT 2
- can astminer extract control flow of a source code? HOT 5
- Fuzzy error
- How to add a new language? HOT 1
- Is it possible to extract shortest path between two nodes?
- Output format code2vec HOT 2
- Manage the number of output path contexts
- "No such file or directory" error while parsing C++ code HOT 1
- C/C++ tests fail on M1
- Plugin [id: 'org.jetbrains.dokka', version: '1.4.32'] was not found in any of the following sources:
- Which version of JDK do I need to install before running this project?
- About generating input data for Code2Vec from C files
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 astminer.