summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitlab-ci.yml11
-rw-r--r--lib/loader/kconfig.py12
2 files changed, 15 insertions, 8 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 1648cb3..79b3188 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -44,13 +44,16 @@ make_benchmark:
- mkdir kconfig-static-data
- cd kconfig-static-data
- ../bin/explore-kconfig.py --log-level debug --random 5 --with-neighbourhood ../examples/kconfig-static
- - DFATOOL_DTREE_IGNORE_IRRELEVANT_PARAMS=0 DFATOOL_KCONF_WITH_CHOICE_NODES=0 ../bin/analyze-kconfig.py --export-webconf ../example-static-rmt.json --export-raw-predictions ../example-static-rmt-eval.json ../examples/kconfig-static/Kconfig .
+ - DFATOOL_DTREE_IGNORE_IRRELEVANT_PARAMS=0 DFATOOL_KCONF_WITH_CHOICE_NODES=0 ../bin/analyze-kconfig.py --export-webconf ../example-static-rmt-b.json --export-raw-predictions ../example-static-rmt-b-eval.json ../examples/kconfig-static/Kconfig .
+ - DFATOOL_DTREE_IGNORE_IRRELEVANT_PARAMS=0 DFATOOL_KCONF_WITH_CHOICE_NODES=1 ../bin/analyze-kconfig.py --export-webconf ../example-static-rmt-nb.json --export-raw-predictions ../example-static-rmt-nb-eval.json ../examples/kconfig-static/Kconfig .
- cp ../examples/kconfig-static/Kconfig ../example-static.kconfig
artifacts:
paths:
- example-static.kconfig
- - example-static-rmt.json
- - example-static-rmt-eval.json
+ - example-static-rmt-b.json
+ - example-static-rmt-b-eval.json
+ - example-static-rmt-nb.json
+ - example-static-rmt-nb-eval.json
make_model:
stage: build
@@ -80,5 +83,5 @@ deploy_model:
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
- chmod 600 "$STAGING_PRIVATE_KEY"
script:
- - lftp -e "set sftp:connect-program 'ssh -a -x -i $STAGING_PRIVATE_KEY'; mkdir -p -f /dfatool/$CI_COMMIT_REF_NAME; put -e -O dfatool/$CI_COMMIT_REF_NAME example-static.kconfig example-static-rmt.json example-static-rmt-eval.json x264.kconfig x264-cart.json x264-rmt.json; quit" --password invalid sftp://ci-deploy@ess.cs.uos.de
+ - lftp -e "set sftp:connect-program 'ssh -a -x -i $STAGING_PRIVATE_KEY'; mkdir -p -f /dfatool/$CI_COMMIT_REF_NAME; put -e -O dfatool/$CI_COMMIT_REF_NAME example-static.kconfig example-static-rmt-b.json example-static-rmt-b-eval.json example-static-rmt-nb.json example-static-rmt-nb-eval.json x264.kconfig x264-cart.json x264-rmt.json; quit" --password invalid sftp://ci-deploy@ess.cs.uos.de
diff --git a/lib/loader/kconfig.py b/lib/loader/kconfig.py
index 80bdd21..575d617 100644
--- a/lib/loader/kconfig.py
+++ b/lib/loader/kconfig.py
@@ -56,14 +56,18 @@ class KConfigAttributes:
)
)
- self.choice_names = sorted(
- map(lambda choice: choice.name or choice.name_and_loc, kconf.choices)
- )
+ unnamed_choice_index = 0
+ for choice in kconf.choices:
+ if choice.name is None:
+ choice.name = f"UNNAMED_CHOICE_{unnamed_choice_index}"
+ unnamed_choice_index += 1
+
+ self.choice_names = sorted(map(lambda choice: choice.name, kconf.choices))
self.choice = dict()
self.choice_symbol_names = list()
for choice in kconf.choices:
- self.choice[choice.name or choice.name_and_loc] = choice
+ self.choice[choice.name] = choice
self.choice_symbol_names.extend(map(lambda sym: sym.name, choice.syms))
self.symbol = dict()