Skip to main content
QUICK REVIEW

[Paper Review] Constraint Solving with Deep Learning for Symbolic Execution

Junye Wen, Mujahid Khan|arXiv (Cornell University)|Mar 18, 2020
Software Engineering ResearchComputer Science45 references4 citations
TL;DR

This paper proposes DeepSolver, a deep learning-based approach to accelerate constraint solving in symbolic execution by training a neural network on collective constraint solutions to classify path condition satisfiability. Unlike prior reuse techniques requiring syntactic or semantic equivalence, DeepSolver generalizes from learned patterns, achieving high accuracy and efficiency—outperforming Z3 and GreenTrie in both classification speed and symbolic execution support.

ABSTRACT

Symbolic execution is a powerful systematic software analysis technique, but suffers from the high cost of constraint solving, which is the key supporting technology that affects the effectiveness of symbolic execution. Techniques like Green and GreenTrie reuse constraint solutions to speed up constraint solving for symbolic execution; however, these reuse techniques require syntactic/semantic equivalence or implication relationship between constraints. This paper introduces DeepSover, a novel approach to constraint solving with deep learning for symbolic execution. Our key insight is to utilize the collective knowledge of a set of constraint solutions to train a deep neural network, which is then used to classify path conditions for their satisfiability during symbolic execution. Experimental evaluation shows DeepSolver is highly accurate in classifying path conditions, is more efficient than state-of-the-art constraint solving and constraint solution reuse techniques, and can well support symbolic execution tasks.

Motivation & Objective

  • Address the high computational cost of constraint solving in symbolic execution, a major bottleneck in software analysis.
  • Overcome limitations of existing constraint solution reuse techniques that require syntactic or semantic equivalence between constraints.
  • Explore the feasibility and effectiveness of using deep neural networks to generalize from historical constraint solutions for faster path condition classification.
  • Design a practical framework that integrates deep learning into symbolic execution without sacrificing correctness or scalability.
  • Demonstrate that deep learning can be effectively applied to symbolic execution workloads, particularly in predicting satisfiability of path conditions.

Proposed method

  • Transform path conditions into fixed-size matrices using a vectorization algorithm that encodes symbolic expressions and control flow structure.
  • Train a deep neural network (DNN) on a dataset of previously solved path conditions to learn patterns distinguishing satisfiable from unsatisfiable conditions.
  • Use the trained DNN to classify new path conditions during symbolic execution without invoking a traditional constraint solver.
  • Integrate the DNN classifier into a symbolic execution pipeline with a fallback mechanism to handle misclassifications and ensure correctness.
  • Apply logical reduction and normalization techniques to improve input consistency and model generalization across diverse path conditions.
  • Leverage off-the-shelf constraint solvers (e.g., Z3) for initial training data generation and validation of DNN predictions.

Experimental results

Research questions

  • RQ1Can deep learning be effectively used to predict the satisfiability of path conditions in symbolic execution?
  • RQ2How does the accuracy and efficiency of deep learning-based classification compare to traditional constraint solving and constraint solution reuse techniques?
  • RQ3To what extent can a DNN generalize across diverse path conditions without requiring exact syntactic or semantic matches?
  • RQ4How well does the DNN-based approach scale with increasing program complexity and path condition diversity?
  • RQ5Can the integration of deep learning into symbolic execution maintain correctness while significantly reducing solver call overhead?

Key findings

  • DeepSolver achieves high classification accuracy on path conditions from nine real-world Java programs, significantly outperforming baseline methods in terms of prediction reliability.
  • The model reduces the number of constraint solver calls during symbolic execution by leveraging learned patterns instead of exact matches, leading to faster analysis.
  • DeepSolver is more efficient than both Z3 (a state-of-the-art constraint solver) and GreenTrie (a leading solution reuse framework) in classifying path condition satisfiability.
  • The approach demonstrates strong generalization capability, classifying path conditions not seen during training with high precision, even when they differ syntactically from training examples.
  • The integration of a DNN with a fallback mechanism ensures correctness, making DeepSolver practical for real symbolic execution pipelines.
  • Evaluation shows DeepSolver supports symbolic execution tasks more effectively than existing techniques, particularly in scenarios with high path explosion and repetitive constraint patterns.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.