Skip to content
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

symbolic arrays in SymbolicListener #53

Open
dah-fari7009 opened this issue Jul 14, 2020 · 2 comments
Open

symbolic arrays in SymbolicListener #53

dah-fari7009 opened this issue Jul 14, 2020 · 2 comments

Comments

@dah-fari7009
Copy link

dah-fari7009 commented Jul 14, 2020

Good morning,

When returning a symbolic array, I get the following exception with SymbolicListener
image

I checked the indicated line and it contained:
ARETURN areturn = (ARETURN) insn; IntegerExpression returnAttr = (IntegerExpression) areturn.getReturnAttr(ti);

Shouldn't it be ARETURN areturn = (ARETURN) insn; ArrayExpression returnAttr = (ArrayExpression) areturn.getReturnAttr(ti); instead ?

@dah-fari7009
Copy link
Author

Additionally, the name of the symbolic array is java.lang.ClassLoader@1 which gives me no information about the type of the elements.

Is there a reason why it is not in the format [I@15c like concrete arrays ?

@dah-fari7009
Copy link
Author

dah-fari7009 commented Jul 14, 2020

Follow up :
Here is the example, in case you would like to reproduce the described issues:

public static int[] snippet(int[] array,int x)
{
    int w = 100;
    if(x > 0){
        array[0] = x;
        array[1] = x + array[0];
    }
    return array;
}

.jpf file :
target = Eq.newV
symbolic.method = Eq.newV.snippet(sym#sym)
classpath=target/classes
symbolic.min_int=-100
symbolic.max_int=100
symbolic.min_long=-100
symbolic.max_long=100
symbolic.min_double=-100.0
symbolic.max_double=100.0
symbolic.debug = true
symbolic.optimizechoices = false
symbolic.lazy=on
symbolic.arrays=true
symbolic.strings = true
symbolic.dp=z3
symbolic.string_dp_timeout_ms=300000
search.depth_limit=3
listener = gov.nasa.jpf.symbc.SymbolicListener
search.multiple_errors=true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant