Closed Cortys closed 5 years ago
Feature branch for this issue: code-generator
Weekly status update: Added support for code snippets to the library modeling submodule. This includes:
Weekly status update: Started with the implementation of pattern injection as a new type of action during the code search. The current implementation does however not support the completion of incomplete calls with missing callables yet. This will be worked on next.
Weekly status update: Implemented basic call completion. This uses a recursive placeholder matching algorithm to find a set of candidate completions for incomplete calls. While the matcher already performs deep matching, only shallow placeholder replacement is currently used.
Next steps: Extend the call completion implementation so that it performs proper deep replacement of placeholders. This will be an important milestone for the generation of valid control flow graphs (CFGs). After that I plan to extend the generator with support for optionals and user input to allow for the generation of useful CFGs. After that the conversion of CFGs to executable code strings can begin.
Weekly status update:
Next steps: Some minor edge cases are still open for the call completion. After those are handled, I plan to add support for optional parameters and to tweak the search heuristics to be suitable for at least the scikit clustering use case.
If time permits, I will then start with the implementation of the inverse parser, that will convert CFGs to Python code.
These steps were already schedules for this week but were delayed due to the optimizations I worked on. Those optimizations were necessary because initial tests showed that the previous implementation was insufficient for real world use cases.
Weekly status update:
librarian.generator.core
namespace was split up into separate modules for every action type and the cost computation.Next steps: Complete the new search heuristic. Then start implementing the reverse parser (already a week late, due to conceptual problems in the old search heuristic approach that had to be figured out first).
Weekly status update:
Next steps: Implement the CFG to code converter and integrate a semantic type compatibility measure in the cost model.
Weekly status update:
Next steps:
Weekly status update:
log((n+1)!)
where n
is the number of parameter flaws.Next steps: Integrate the generator into the existing IDA chatbot as a POC to show that it actually works.
Weekly status update:
Next steps: Finalize the generator and get it merged.
Final update: Completed the integration of the code generation into IDA. Also fixed the stability issues the code executor was having when running as part of ida-ws.
The PR for this feature is #164.
Implement an uninteractive code generator which gets a user request (task and parameters) and generates a code snippet that fulfills that request.