-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactoring in usvm-python-annotations
- Loading branch information
1 parent
191a6a1
commit fef890b
Showing
13 changed files
with
73 additions
and
73 deletions.
There are no files selected for viewing
3 changes: 0 additions & 3 deletions
3
usvm-python/usvm-python-annotations/src/main/java/org/usvm/annotations/CPythonFunction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
...hon-annotations/src/main/kotlin/org/usvm/annotations/CPythonAdapterJavaMethodProcessor.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 0 additions & 5 deletions
5
.../usvm-python-annotations/src/main/kotlin/org/usvm/annotations/CPythonFunctionProcessor.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
usvm-python/usvm-python-annotations/src/main/kotlin/org/usvm/annotations/DataClasses.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
package org.usvm.annotations | ||
|
||
data class MemberDescriptorInfo( | ||
val nativeTypeName: String, | ||
val nativeMemberName: String, | ||
val javaMemberName: String, | ||
) | ||
|
||
const val MEMBER_DESCRIPTION_QUALNAME = "Lorg/usvm/interpreter/MemberDescriptor;" | ||
|
||
enum class ObjectConverter(val repr: String) { | ||
StandardConverter("object_converter"), | ||
FrameConverter("frame_converter"), | ||
IntConverter("int_converter"), | ||
RefConverter("ref_converter"), | ||
ObjectWrapper("object_wrapper"), | ||
ArrayConverter("array_converter"), | ||
TupleConverter("tuple_converter"), | ||
StringConverter("string_converter"), | ||
ObjectIdConverter("object_id_converter"), | ||
NoConverter(""), | ||
} | ||
|
||
enum class CType(val repr: String) { | ||
PyObject("PyObject *"), | ||
PyObjectArray("PyObject **"), | ||
PyFrameObject("PyFrameObject *"), | ||
CInt("int"), | ||
CStr("const char *"), | ||
JObject("jobject"), | ||
} | ||
|
||
enum class JavaType(val repr: String, val call: String) { | ||
JObject("jobject", "Object"), | ||
JLong("jlong", "Long"), | ||
JInt("jint", "Int"), | ||
JBoolean("jboolean", "Boolean"), | ||
JObjectArray("jobjectArray", "Object"), | ||
NoType("", "Void"), | ||
} | ||
|
||
data class ArgumentDescription( | ||
val cType: CType, | ||
val javaType: JavaType, | ||
val converter: ObjectConverter, | ||
) | ||
|
||
data class CPythonFunctionDescription( | ||
val cName: String, | ||
val args: List<ArgumentDescription>, | ||
val result: ArgumentDescription, | ||
val failValue: String, | ||
val defaultValue: String, | ||
val addToSymbolicAdapter: Boolean, | ||
) | ||
|
||
data class DefinitionDescriptor( | ||
val cName: String, | ||
val javaName: String, | ||
val javaSignature: String, | ||
) |
1 change: 0 additions & 1 deletion
1
...hon-annotations/src/main/kotlin/org/usvm/annotations/SymbolicMemberDescriptorProcessor.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
...hon-annotations/src/main/kotlin/org/usvm/annotations/SymbolicMethodDescriptorProcessor.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 2 additions & 45 deletions
47
...otations/src/main/kotlin/org/usvm/annotations/codegeneration/CPythonFunctionGeneration.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 0 additions & 3 deletions
3
.../usvm-python-annotations/src/main/kotlin/org/usvm/annotations/codegeneration/Constants.kt
This file was deleted.
Oops, something went wrong.
6 changes: 1 addition & 5 deletions
6
...on-annotations/src/main/kotlin/org/usvm/annotations/codegeneration/GenerateDefinitions.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 2 additions & 5 deletions
7
...src/main/kotlin/org/usvm/annotations/codegeneration/SymbolicMemberDescriptorGeneration.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters