ksen007 / janala2 Goto Github PK
View Code? Open in Web Editor NEWa concolic testing engine for Java
License: BSD 2-Clause "Simplified" License
a concolic testing engine for Java
License: BSD 2-Clause "Simplified" License
Is it possible to emit jUnit (or similar) tests as an output?
The README file still refers to cvc3 while cvc4 is now needed
Does the application work with .class files compiled with 1.7?
Whenever I try to examine a simple HelloWorld have file compiled in 1.7, I get a message
Exception in thread "main" java.lang.VerifyError: Expecting a stackmap frame at branch target 24
Exception Details:
Location:
HelloWorld.()V @18: invokespecial
Reason:
Expected stackmap frame at this location.
Bytecode:
0000000: 0304 03b8 0022 2a04 0412 2312 2412 25b8
0000010: 0029 b700 01a7 0007 b800 2cbf b800 2fb8
0000020: 0032 0504 b800 36b1
Exception Handler Table:
bci [18, 24] => handler: 24
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2570)
at java.lang.Class.getMethod0(Class.java:2813)
at java.lang.Class.getMethod(Class.java:1663)
at sun.launcher.LauncherHelper.getMainMethod(LauncherHelper.java:494)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:486)
However, when I test out the same HelloWorld code compiled in 1.6, everything seems to work fine.
Hello,
I am running CATG on javapoet and I am facing to an exception:
java.lang.ArrayIndexOutOfBoundsException: 6
at janala.interpreters.ObjectValue.setField(ObjectValue.java:104)
at janala.interpreters.ConcolicInterpreter.visitPUTFIELD(ConcolicInterpreter.java:1384)
at janala.logger.inst.PUTFIELD.visit(PUTFIELD.java:16)
at janala.logger.DirectConcolicExecution.log(DirectConcolicExecution.java:58)
at janala.logger.AbstractLogger.SPECIAL(AbstractLogger.java:706)
at janala.logger.DJVM.SPECIAL(DJVM.java:708)
at com.squareup.javapoet.CodeWriter.<init>(CodeWriter.java:41)
at com.squareup.javapoet.CodeWriter.<init>(CodeWriter.java:67)
at com.squareup.javapoet.CodeWriter.<init>(CodeWriter.java:63)
at com.squareup.javapoet.TypeName.toString(TypeName.java:256)
at com.squareup.javapoet.AnnotatedTypeNameTest.main(AnnotatedTypeNameTest.java:146)
happening when I try to run CATG on:
public static void main(String[] args) {
String lit1 = catg.CATG.readString("java.util.List<@");
String lit2 = catg.CATG.readString(" java.lang.String>");
String expected = (lit1 + (AnnotatedTypeNameTest.NN)) + lit2;
TypeName type = TypeName.get(String.class).annotated(annotatedTypeNameTest.NEVER_NULL);
ClassName list = ClassName.get(List.class);
String actual = ParameterizedTypeName.get(list, type).toString();
}
I assumed that there is a problem with the fields of the class com.squareup.javapoet.CodeWriter
.
Find here, an excerpt of this class:
final class CodeWriter {
/** Sentinel value that indicates that no user-provided package has been set. */
private static final String NO_PACKAGE = new String();
private final String indent;
private final Appendable out;
private int indentLevel;
private boolean javadoc = false;
private boolean comment = false;
private String packageName = NO_PACKAGE;
private final List<TypeSpec> typeSpecStack = new ArrayList<>();
private final Set<String> staticImportClassNames;
private final Set<String> staticImports;
private final Map<String, ClassName> importedTypes;
private final Map<String, ClassName> importableTypes = new LinkedHashMap<>();
private final Set<String> referencedNames = new LinkedHashSet<>();
private boolean trailingNewline;
/**
* When emitting a statement, this is the line of the statement currently being written. The first
* line of a statement is indented normally and subsequent wrapped lines are double-indented. This
* is -1 when the currently-written line isn't part of a statement.
*/
int statementLine = -1;
CodeWriter(Appendable out) {
this(out, " ", Collections.<String>emptySet());
}
CodeWriter(Appendable out, String indent, Set<String> staticImports) {
this(out, indent, Collections.<String, ClassName>emptyMap(), staticImports);
}
CodeWriter(Appendable out, String indent, Map<String, ClassName> importedTypes,
Set<String> staticImports) {
this.out = checkNotNull(out, "out == null");
this.indent = checkNotNull(indent, "indent == null");
this.importedTypes = checkNotNull(importedTypes, "importedTypes == null");
this.staticImports = checkNotNull(staticImports, "staticImports == null");
this.staticImportClassNames = new LinkedHashSet<>();
for (String signature : staticImports) {
staticImportClassNames.add(signature.substring(0, signature.lastIndexOf('.')));
}
}
Do you have any idea or tips to fix this issues?
Best regards,
Benjamin.
The folder src/common is referred in the Makefile at line 71 but does not exist
Hello,
I meet problem when testing the class without main() method. The concolic.py seems to always look for main() and report errors when there is no main(). Anyone can point out how can I test the one without main()? I cannot find it in README.
Thanks!
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.