
ローカルで動作するLLMを利用して擬似コード解析を支援するリバースエンジニアリング支援ツール。
「ソフトウェア開発における欠陥の大部分は、プログラマが自分のコードが取りうるすべての状態を完全に理解していないことに起因する。」 -- John Carmack
「Doomは動くか?」 -- https://canitrundoom.org/
Oneiromancerは、Hex-Raysの擬似コード用にファインチューニングされたローカル実行のLLMを使用してコード解析を支援するリバースエンジニアリングアシスタントです。関数またはより小さなコードスニペットを解析し、そのコードが何を行うかの高レベルな説明、関数に推奨される名前、および変数の名前変更の提案を、解析結果に基づいて返します。

mistral-7b-instructをベースにしたファインチューニング済みLLM aidapalのクロスプラットフォーム対応。analyze_codeまたはanalyze_fileを呼び出して擬似コードを解析し、解析結果を処理できます。最新リリースを入手する最も簡単な方法はcrates.io経由です:
cargo install oneiromancer --locked
ライブラリとしてインストールするには、プロジェクトディレクトリで以下のコマンドを実行します:
cargo add oneiromancer
あるいは、ソースからビルドすることもできます:
git clone --depth 1 https://github.com/0xdea/oneiromancer
cd oneiromancer
cargo build --release --locked
wget https://huggingface.co/AverageBusinessUser/aidapal/resolve/main/aidapal-8k.Q4_K_M.gguf
wget https://huggingface.co/AverageBusinessUser/aidapal/resolve/main/aidapal.modelfile
ollama create aidapal -f aidapal.modelfile
ollama list
export OLLAMA_BASEURL=custom_baseurl # if not set, the default will be used
export OLLAMA_MODEL=custom_model # if not set, the default will be used
oneiromancer <target_file>.c
<target_file>.out.cで確認します:
vim <target_file>.out.c
code <target_file>.out.c
[!TIP] 最良の結果を得るには、LLMで解析する関数を一度に1つずつ投入してください。
以下でOllama 0.32.9を用いてテスト済み:
aidapal <3