-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to use specific symbol to represent calls to some functions. #5
Comments
you can take a look at the following for inspiration: |
Thank you! @corinus I run the example TestMain.java in jpf-symbc/src/main/gov/nasa/jpf/symbc/concolic ,But it don't occur uninterpreted functions .I have added annotation this is TestMain.jpf: target=gov.nasa.jpf.symbc.concolic.TestMain |
Hi: |
Hello, |
Hi: java.lang.Math functions are handled like that. You can take a look in classes and peers. |
Thank you ! |
From what I am seeing, I will need to define a separate function to obtain a FunctionExpression object for each method. I am having trouble to understand how and when this operation (generating a FunctionExpression) is triggered. |
You can define a listener that monitors for each method call and perform your calculation for the particular methods that you have in mind. |
Thank for this answer ! Is this any different from using the concolic listener, since it performs the transformation of a method to a FunctionExpression ? |
no it is not pls look at that listener |
Thank you for your help. Sorry for asking you so many questions, I am very confused since I have not changed the original code and this has been bugging me for a while now : For a few days now, I have been running tests with the concolic listener, on a simple file where I annoted one of the function @concrete("true"). I keep on getting an exception when it tries generating the FunctionExpression, where apparently the number of arguments returned by getArgumentAttr is not the expected value. Do you have any idea what could be causing this behavior or could let me know if my understanding of what this value represents is correct? |
Shouldn't getArgumentAttrs, getArgumentValues and getArgumentTypeNames all be the same length ? I don't understand why there are not in this case |
Hi again, Sorry to bug you but I would just like to know what getArgumentAttrs, getArgumentValues and getArgumentTypeNames are supposed to return. I have looked through the code but could not figure it out |
they return argument attributes, values and types (as he names suggest) |
Hi, Since I did not modify the code for the listener, I figured you might have more insight on what is causing this behavior |
Hello, I just wanted to let you know that I found the problem and fixed the issue that I was having and was wondering if you considered I should make a pull request for it (it is just one line of code to change) |
thank you yes please |
That's noted. Thank you for your help |
Hi,
Recently I use SPF, I want to represent some functions calls as specific symbols to add into PathCondition ,in order to I can handle path Condition later on.
For example express arrlist.get(x) as Arraylist_Get(X) But I don't know how to do it.
The text was updated successfully, but these errors were encountered: