아래 내용을 기반으로 score가 높을수록 어떤건가? 3 OUR APPROACH TO CONCOLIC TESTING Unlike conventional…
- User
아래 내용을 기반으로 score가 높을수록 어떤건가?
3 OUR APPROACH TO CONCOLIC TESTING Unlike conventional concolic testing, our approach is adaptive and changes the set H of search heuristics over the course of the testing process. To achieve this, we need to define a space of possible search heuristics and to develop an algorithm that can continuously learn a new set of search heuristics from the space during the concolic testing process. The latter constitutes the key contribution of this paper (Section 3.2). For the former, we use the idea of parametric search heuristic recently proposed in prior work [5]. 3.1 Parametric Search Heuristics Our work builds on the idea of parametric search heuristics [5], which defines the space of possible search heuristics used in our approach. Cha et al. [5] defined a search heuristic, denoted Heuristicw, which has a parameter w as follows: \text{Heuristic}{\mathbf{W}}(\Phi)=\underset{\phi_j\in\Phi}{\text{argmax}}score{\mathbf{W}}(\phi_j)\quad(\Phi=\phi_1\wedge\cdots\wedge\phi_n) where the parameter \mathbf{w} = \langle\theta_{1},\ldots,\theta_{d}\rangle is a d-dimensional vector of real numbers. Heuristicw takes a path-condition Φ and selects a branch ϕj with the highest score. To compute scores of branches, each branch ϕ is represented by a feature vector. A feature feat_{i} denotes a predicate describing characteristics of branches: feat_i:\mathbb{B}\to{0,1}. where B is the set of branches in the program. For instance, a feature may describe whether the branch ϕ is located inside a loop body or not. If true, the feati (ϕ) is 1; otherwise, it is 0. With a predefined set of d features, we are able to represent a branch by a d-dimensional boolean vector as follows: feat(\phi)=\langle feat_1(\phi),feat_2(\phi),\ldots,feat_d(\phi)\rangle. In this paper, we reused the 40 features (i.e., d=40) presented in [5], where these are divided into 12 static and 28 dynamic features. Using the predefined features, we transform each branch in a pathcondition into a feature vector. Then, the score for each branch ϕ is calculated by a linear combination of the feature vector feat(ϕ) and a given d-dimensional weight vector w: score_{\mathbf{W}}(\phi)=feat(\phi)\cdot\mathbf{w}. Lastly, we choose a branch ϕj with the highest score in Φ. With the parametric search heuristic described above, a search heuristics corresponds to a d-dimensional weight vector. Thus, in the rest of this paper, we will call the d-dimensional real-number vectors search heuristics when there is no confusion. With this convention, we write H = Rd for the space of possible search heuristics, where R denotes real numbers between −10 and 10.
- Assistant
The score in this context is a numerical representation calculated for each branch in a program as part of the concolic testing process. A higher score indicates that a particular branch is more likely to be selected for exploration during testing. The score is computed using a linear combination of a feature vector representing the branch and a weight vector that is part of the adaptive search heuristic approach described in the document.
Here's a breakdown of how it works:
-
Feature Vector: Each branch ( \phi ) in a program's path condition is represented by a feature vector ( \text{feat}(\phi) ). This vector is composed of predefined features (e.g., whether the branch is inside a loop) that capture certain characteristics of the branch. In the document, 40 features are used, divided into 12 static and 28 dynamic features.
-
- User
한글로
- Assistant
이 문맥에서의 점수(score)는 프로그램 내의 각 분기(branch)에 대해 계산된 수치적 표현으로, 이 점수가 높을수록 해당 분기가 테스트 과정에서 탐색될 가능성이 더 높다는 것을 의미합니다. 점수는 주어진 분기를 나타내는 특징 벡터(feature vector)와 검색 휴리스틱 접근 방식에 포함된 가중치 벡터(weight vector)를 사용하여 계산됩니다.
다음은 이 과정의 작동 방식에 대한 설명입니다:
-
특징 벡터: 각 분기 ( \phi )는 특징 벡터 ( \text{feat}(\phi) )로 표현됩니다. 이 벡터는 분기의 특정 특성을 포착하는 사전 정의된 특징들로 구성됩니다. 문서에서는 12개의 정적 특징과 28개의 동적 특징을 포함하여 총 40개의 특징이 사용됩니다.
-
가중치 벡터: 검색 휴리스틱은 d-차원의 가중치 벡터 ( \mathbf{W} = \langle \theta_1, \ldots, \theta_d \rangle )에 의해 정의됩니다. 이 벡터는 특징에 가중치를 부여하여 분기의 점수를 계산하는 데 사용됩니다.
-
점수 계산: 분기 ( \phi )의 점수는 해당 분기의 특징 벡터와 가중치 벡터의 내적(dot product)으로 계산됩니다:
[ \text{score}_{\mathbf{W}}(\phi) = \text{feat}(\phi) \cdot \mathbf{w} ]
이를 통해 각 분기에 대해 단일한 수치 점수가 생성됩니다.
-
분기 선택: 경로 조건 ( \Phi ) 내의 모든 분기들 중에서, 가장 높은 점수를 가진 분기가 탐색을 위해 선택됩니다.
따라서 높은 점수는 현재의 휴리스틱(가중치 벡터)에 따라 우선적으로 테스트할 분기임을 나타냅니다. 이 점수의 크기는 휴리스틱 검색 방법에 의해 탐색 가치가 있다고 여겨지는 분기들을 집중적으로 테스트하도록 안내하는 역할을 합니다.
-
- User
- Assistant
논문에서 설명하는 "Switch" 절차는 새로운 검색 휴리스틱을 학습하는 방법을 다루고 있습니다. 이 과정은 주어진 두 집합 ( K1 ) (상위 휴리스틱)과 ( K2 ) (하위 휴리스틱)의 분포를 기반으로 새로운 휴리스틱을 생성하는 것을 목표로 합니다. 이 과정은 다음과 같이 진행됩니다:
-
자손 생성: 각 상위 휴리스틱 ( h \in K1 )에 대해, ( K2 )와는 통계적으로 다른 자손을 생성합니다. 이를 위해 각 휴리스틱 ( h )의 자손을 생성하는데, 이 자손은 ( h )와 유사하지만 ( K2 )와는 다른 특성을 가집니다. 자손의 수는 하이퍼파라미터 ( \eta3 )에 의해 결정되며, 실험에서는 ( \eta3 = 10 )으로 설정되었습니다.
-
샘플 공간 구성: 자손을 생성하기 위해, 각 휴리스틱의 가중치 벡터의 각 구성 요소에 대해 샘플 공간 ( S_j )를 정의합니다. 이 샘플 공간은 상위 휴리스틱의 구성 요소에서 샘플링한 값에서 하위 휴리스틱의 구성 요소에서 샘플링한 값을 제외한 값들로 구성됩니다. 샘플링은 평균과 표준 편차를 기반으로 한 절단된 정규 분포에서 이루어집니다.
-
탐색과 활용: 생성된 자손 집합에서 일부는 활용(Exploit) 집합에 포함되고, 나머지는 무작위로 생성된 휴리스틱으로 탐색(Explore) 집합을 구성합니다. 활용과 탐색 간의 균형은 하이퍼파라미터 ( \eta4 )에 의해 조절되며, 실험에서는 ( \eta4 = 0.8 )로 설정되었습니다.
-
특징 선택: 후보 검색 휴리스틱의 공간을 줄이기 위해, 특징 선택을 통해 절차를 최적화할 수 있습니다. 상위 휴리스틱과 하위 휴리스틱 간의 가중치가 통계적으로 유사한 특징은 비정보성으로 간주하고, 해당 특징의 샘플 공간을 0으로 설정합니다. 유사성은 평균과 표준 편차의 차이가 특정 임계값보다 작은 경우로 정의됩니다.
이러한 과정을 통해, 알고리즘은 좋은 휴리스틱을 닮으면서도 나쁜 휴리스틱을 효과적으로 피하는 새로운 휴리스틱을 생성할 수 있습니다.
-