kusumotolab / kGenProg

A High-performance, High-extensibility and High-portability APR System
MIT License
48 stars 13 forks source link

BuildFailedの理由が握りつぶされることがある #827

Open shinsuke-mat opened 3 years ago

shinsuke-mat commented 3 years ago

related to #823

802 で初回のBuildFailedを適切にコンソールに出力するように変更した.

以下の題材に対し,

  public int close_to_zero(int n) {
    if (n == 0) {
      k++; // build failure
    ...

以下の出力.これはOK.

...
version = 1.8.0+
================================================================
2020-12-17 16:28:19 [Time-limited test] [ERROR] KGenProgMain - Failed to build the specified project.
シンボルを見つけられません
  シンボル:   変数 k
  場所: クラス example.CloseToZero

Process finished with exit code 0

コンパイルエラーの種類?によってはエラーの原因が握りつぶされる. 以下の場合,

  public int close_to_zero(int n) {
    a // error
    if (n == 0) {

build failed or reproduced. というメッセージでエラー原因が上書きされる.

version = 1.8.0+
================================================================
2020-12-17 16:29:14 [Time-limited test] [ERROR] KGenProgMain - Failed to build the specified project.
build failed or reproduced.

Process finished with exit code 0
shinsuke-mat commented 3 years ago

EmptyTestResults オブジェクトの生成タイミングの問題っぽい.

$ find src -type f | xargs grep 'reprodu'
src/main/java/jp/kusumotolab/kgenprog/ga/variant/VariantStore.java:            .cache() : Single.just(new EmptyTestResults("build failed or reproduced."));

https://github.com/kusumotolab/kGenProg/blob/6e40150dbebe93875613b32299b08cb89a4c4d65/src/main/java/jp/kusumotolab/kgenprog/ga/variant/VariantStore.java#L228-L230

823 と合わせて修正すべき.