Skip to content

Commit 25cc10a

Browse files
1 parent b9d15f6 commit 25cc10a

26 files changed

+3893
-3914
lines changed

gobpie-demos/chrony/chrony-4.2.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,6 @@
5252
"exp": {
5353
"earlyglobs": true
5454
},
55-
"dbg": {
56-
"print_dead_code": true
57-
},
5855
"cil": {
5956
"merge": {
6057
"inlines": false

gobpie-demos/silver-searcher/goblint.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@
1111
"domain": "plain"
1212
}
1313
},
14-
"dbg": {
15-
"print_dead_code": true
16-
},
1714
"exp": {
1815
"earlyglobs": true
1916
},
@@ -22,4 +19,4 @@
2219
"spawn": false
2320
}
2421
}
25-
}
22+
}

gobpie-demos/silver-searcher/the_silver_searcher.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@
3737
"exp": {
3838
"earlyglobs": true
3939
},
40-
"dbg": {
41-
"print_dead_code": true
42-
},
4340
"cil": {
4441
"merge": {
4542
"inlines": false

gobpie-demos/smtprc/smtprc-fuel.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,6 @@
5353
"exp": {
5454
"earlyglobs": true
5555
},
56-
"dbg": {
57-
"print_dead_code": true
58-
},
5956
"cil": {
6057
"merge": {
6158
"inlines": false

gobpie-demos/smtprc/smtprc.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,6 @@
5353
"exp": {
5454
"earlyglobs": true
5555
},
56-
"dbg": {
57-
"print_dead_code": true
58-
},
5956
"cil": {
6057
"merge": {
6158
"inlines": false

index/conf/zstd-race-baseline.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,6 @@
6363
"ZSTD_customFree"
6464
]
6565
},
66-
"dbg": {
67-
"print_dead_code": true
68-
},
6966
"pre": {
7067
"cppflags": ["-DZSTD_NO_INTRINSICS", "-D_FORTIFY_SOURCE=0", "-DGOBLINT_NO_ASSERT", "-DGOBLINT_NO_BSEARCH"]
7168
},

index/conf/zstd-race-incrpostsolver.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,6 @@
5656
"ZSTD_customFree"
5757
]
5858
},
59-
"dbg": {
60-
"print_dead_code": true
61-
},
6259
"pre": {
6360
"cppflags": ["-DZSTD_NO_INTRINSICS", "-D_FORTIFY_SOURCE=0", "-DGOBLINT_NO_ASSERT", "-DGOBLINT_NO_BSEARCH"]
6461
},

juliet/juliet_summary.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
try:
1616
zip_path, _ = urllib.request.urlretrieve(juliet_url)
1717
with zipfile.ZipFile(zip_path, "r") as f:
18-
f.extractall()
18+
f.extractall()
1919
except urllib.error.HTTPError:
2020
os.system('echo "FAILURE: Download url invalid."')
2121
quit()
@@ -31,7 +31,7 @@
3131
path = sys.argv[1] # path + '/' + sys.argv[1]
3232
# Checking if the path is valid
3333
if not os.path.exists(juliet_path):
34-
os.system('echo "PATH NOT FOUND: "' + path)
34+
os.system('echo "PATH NOT FOUND: "' + path)
3535
elif len(sys.argv) != 1:
3636
os.system('echo "FAILURE: Run script with no arguments to run on all testcases or add path to a specific testcases folder (that has individual cases or folders containing testcases)."')
3737
quit()
@@ -42,7 +42,7 @@
4242

4343
# The definitive function that performs all the main operations:
4444
# - Takes current working directory and HTML contents as input
45-
# - Finds valid C files for Goblint in that dir and establishes
45+
# - Finds valid C files for Goblint in that dir and establishes
4646
# other potential sub-directories for the future
4747
# - Runs Goblint on valid test cases if they exist
4848
# - Generates HTML table with new results from those cases
@@ -57,30 +57,30 @@ def goblint_analyse(current_directory, HTML_info):
5757
HTML_info[0] = files_output_to_HTML(valid_files, current_directory, HTML_info[0])
5858
HTML_info[1].append(current_directory)
5959
return pot_directories, HTML_info
60-
61-
# Goes through all the files in given path, returns all suitable testcase files and
60+
61+
# Goes through all the files in given path, returns all suitable testcase files and
6262
# all directories that might potentially contain testcases1
6363
def check_path(filepath):
6464
files = os.listdir(filepath)
6565
v_files = [] # Valid files
6666
dirs = [] # Directories
6767
for f in files:
6868
if re.search('^CWE', f) != None and re.search('[0-9]{2}a?\.c$', f) != None and re.search('w32', f) == None: v_files.append(f)
69-
elif os.path.isdir(filepath + '/' + f):
69+
elif os.path.isdir(filepath + '/' + f):
7070
dirs.append(f)
7171
return v_files, dirs
72-
72+
7373
# Runs Goblint to process a testcase function, testcase function will be either
7474
# '_good' or '_bad' determined by input parameter 'mode'
7575
def goblint_cmd(filepath, filename, mode):
7676
func = re.sub('a?\.c$', mode, filename) # File ending is cut and replaced by mode
77-
cmd = goblint_path + ' ' + filepath + ' ' + testsupport_files + ' -I ' + testsupport_path + ' --sets "mainfun[+]" ' + func + ' --enable dbg.print_dead_code --enable dbg.debug --enable printstats'
77+
cmd = goblint_path + ' ' + filepath + ' ' + testsupport_files + ' -I ' + testsupport_path + ' --sets "mainfun[+]" ' + func + ' --enable dbg.debug --enable printstats'
7878
print(filename + ' -- ' + mode[1:] + ' ', end='\r')
7979
process = subprocess.run(cmd, shell=True, check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True)
8080
#title = '#####################\n' + mode.upper() + '\n#####################\n\n'
8181
return cmd + "\n\n" + process.stdout + process.stderr
82-
83-
# Takes a list of testcase files as input and iterates through them to analyze
82+
83+
# Takes a list of testcase files as input and iterates through them to analyze
8484
# outputs for both 'good' and 'bad' function. Generates an HTML table based on outputs.
8585
def files_output_to_HTML(testcases, filepath, html_table):
8686
# Creating column headers for the table
@@ -92,14 +92,14 @@ def files_output_to_HTML(testcases, filepath, html_table):
9292
html_table += " <th>{0}</th>\n".format(column.strip())
9393
html_table += " </tr>\n"
9494
# Going through valid testcase files
95-
testcases.sort()
95+
testcases.sort()
9696
for t in testcases:
9797
f_path = filepath + '/' + t
9898
v_good = '-' # Vulnerabilities in 'good', initial value: nothing found
9999
v_bad = '-' # Vulnerabilities in 'bad', initial value: nothing found
100100
output_good = 'Function missing / Error unrelated to Goblint\n' # initial value
101101
output_bad = 'Function missing / Error unrelated to Goblint\n' # initial value
102-
# The upcoming 'try' statements are used because at least one test case
102+
# The upcoming 'try' statements are used because at least one test case
103103
#from Juliet suite does not contain both functions.
104104
try:
105105
output_good = goblint_cmd(f_path, t, '_good') # 'good' function
@@ -111,7 +111,7 @@ def files_output_to_HTML(testcases, filepath, html_table):
111111
if re.search(v_detection, output_bad) != None:
112112
v_bad = 'X'
113113
except: v_bad = '?'
114-
114+
115115
# Generating .txt file for the output
116116
title = t + '\n\n'
117117
good_title = '#####################\n_GOOD\n#####################\n\n'
@@ -134,9 +134,9 @@ def files_output_to_HTML(testcases, filepath, html_table):
134134

135135
# # # MAIN PROCEDURES # # #
136136

137-
# Regex string that is used to confirm that vulnerabilities were detected
137+
# Regex string that is used to confirm that vulnerabilities were detected
138138
v_detection = 'is dead!|Summary for all memory locations:'
139-
139+
140140
# Blanks for HTML content
141141
# '' - empty string for HTML table that will contain results from Goblint
142142
# [] - empty array for href values that will be used for table of contents
@@ -153,7 +153,7 @@ def files_output_to_HTML(testcases, filepath, html_table):
153153
current_dir = path
154154
# Running Goblint on current directory and getting new potential sub-directories
155155
directories, HTML = goblint_analyse(current_dir, HTML)
156-
156+
157157
# Going through the main CWE directories if present
158158
directories.sort()
159159
for d in directories:
@@ -166,7 +166,7 @@ def files_output_to_HTML(testcases, filepath, html_table):
166166
current_subdir = current_dir + '/' + s
167167
# Running Goblint, max depth achieved so no sub-directories
168168
goblint_analyse(current_subdir, HTML)
169-
169+
170170

171171
# Generating content for HTML
172172
HTML_content = '<p id="top" style="font-size:30px">RESULTS</p>\n'
@@ -177,7 +177,7 @@ def files_output_to_HTML(testcases, filepath, html_table):
177177
for href in HTML[1]:
178178
HTML_content += '<a href="#' + href + '">' + href + '</a><br>\n'
179179
# Adding table of contents and results table together
180-
HTML_content = HTML_content + '<br><hr><br>\n' + HTML[0] + '<a href="#top">Go to top</a>'
180+
HTML_content = HTML_content + '<br><hr><br>\n' + HTML[0] + '<a href="#top">Go to top</a>'
181181
# Creating HTML file
182182
with open('summary_table.html', 'w', encoding='utf-8') as file:
183183
file.write(HTML_content)

pthread/aget_comb_traces_rel.yml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
''/home/simmo/dev/goblint/sv-comp/analyzer/conf/traces-rel.json'' ''--set''
1111
''dbg.timeout'' ''900'' ''--set'' ''ana.activated[+]'' ''apron'' ''--set''
1212
''ana.path_sens[+]'' ''threadflag'' ''--set'' ''ana.apron.privatization''
13-
''mutex-meet-tid-cluster12'' ''aget_comb.c'' ''--enable'' ''dbg.uncalled''
13+
''mutex-meet-tid-cluster12'' ''aget_comb.c''
1414
''--enable'' ''allglobs'' ''--enable'' ''printstats'' ''--enable'' ''dbg.debug''
15-
''-v'' ''--enable'' ''dbg.print_dead_code'' ''--enable'' ''witness.yaml.enabled''
15+
''-v'' ''--enable'' ''witness.yaml.enabled''
1616
''--set'' ''witness.yaml.path'' ''./aget_comb_traces_rel.yml'''
1717
task:
1818
input_files:
@@ -43,9 +43,9 @@
4343
''/home/simmo/dev/goblint/sv-comp/analyzer/conf/traces-rel.json'' ''--set''
4444
''dbg.timeout'' ''900'' ''--set'' ''ana.activated[+]'' ''apron'' ''--set''
4545
''ana.path_sens[+]'' ''threadflag'' ''--set'' ''ana.apron.privatization''
46-
''mutex-meet-tid-cluster12'' ''aget_comb.c'' ''--enable'' ''dbg.uncalled''
46+
''mutex-meet-tid-cluster12'' ''aget_comb.c''
4747
''--enable'' ''allglobs'' ''--enable'' ''printstats'' ''--enable'' ''dbg.debug''
48-
''-v'' ''--enable'' ''dbg.print_dead_code'' ''--enable'' ''witness.yaml.enabled''
48+
''-v'' ''--enable'' ''witness.yaml.enabled''
4949
''--set'' ''witness.yaml.path'' ''./aget_comb_traces_rel.yml'''
5050
task:
5151
input_files:
@@ -76,9 +76,9 @@
7676
''/home/simmo/dev/goblint/sv-comp/analyzer/conf/traces-rel.json'' ''--set''
7777
''dbg.timeout'' ''900'' ''--set'' ''ana.activated[+]'' ''apron'' ''--set''
7878
''ana.path_sens[+]'' ''threadflag'' ''--set'' ''ana.apron.privatization''
79-
''mutex-meet-tid-cluster12'' ''aget_comb.c'' ''--enable'' ''dbg.uncalled''
79+
''mutex-meet-tid-cluster12'' ''aget_comb.c''
8080
''--enable'' ''allglobs'' ''--enable'' ''printstats'' ''--enable'' ''dbg.debug''
81-
''-v'' ''--enable'' ''dbg.print_dead_code'' ''--enable'' ''witness.yaml.enabled''
81+
''-v'' ''--enable'' ''witness.yaml.enabled''
8282
''--set'' ''witness.yaml.path'' ''./aget_comb_traces_rel.yml'''
8383
task:
8484
input_files:
@@ -109,9 +109,9 @@
109109
''/home/simmo/dev/goblint/sv-comp/analyzer/conf/traces-rel.json'' ''--set''
110110
''dbg.timeout'' ''900'' ''--set'' ''ana.activated[+]'' ''apron'' ''--set''
111111
''ana.path_sens[+]'' ''threadflag'' ''--set'' ''ana.apron.privatization''
112-
''mutex-meet-tid-cluster12'' ''aget_comb.c'' ''--enable'' ''dbg.uncalled''
112+
''mutex-meet-tid-cluster12'' ''aget_comb.c''
113113
''--enable'' ''allglobs'' ''--enable'' ''printstats'' ''--enable'' ''dbg.debug''
114-
''-v'' ''--enable'' ''dbg.print_dead_code'' ''--enable'' ''witness.yaml.enabled''
114+
''-v'' ''--enable'' ''witness.yaml.enabled''
115115
''--set'' ''witness.yaml.path'' ''./aget_comb_traces_rel.yml'''
116116
task:
117117
input_files:
@@ -142,9 +142,9 @@
142142
''/home/simmo/dev/goblint/sv-comp/analyzer/conf/traces-rel.json'' ''--set''
143143
''dbg.timeout'' ''900'' ''--set'' ''ana.activated[+]'' ''apron'' ''--set''
144144
''ana.path_sens[+]'' ''threadflag'' ''--set'' ''ana.apron.privatization''
145-
''mutex-meet-tid-cluster12'' ''aget_comb.c'' ''--enable'' ''dbg.uncalled''
145+
''mutex-meet-tid-cluster12'' ''aget_comb.c''
146146
''--enable'' ''allglobs'' ''--enable'' ''printstats'' ''--enable'' ''dbg.debug''
147-
''-v'' ''--enable'' ''dbg.print_dead_code'' ''--enable'' ''witness.yaml.enabled''
147+
''-v'' ''--enable'' ''witness.yaml.enabled''
148148
''--set'' ''witness.yaml.path'' ''./aget_comb_traces_rel.yml'''
149149
task:
150150
input_files:
@@ -175,9 +175,9 @@
175175
''/home/simmo/dev/goblint/sv-comp/analyzer/conf/traces-rel.json'' ''--set''
176176
''dbg.timeout'' ''900'' ''--set'' ''ana.activated[+]'' ''apron'' ''--set''
177177
''ana.path_sens[+]'' ''threadflag'' ''--set'' ''ana.apron.privatization''
178-
''mutex-meet-tid-cluster12'' ''aget_comb.c'' ''--enable'' ''dbg.uncalled''
178+
''mutex-meet-tid-cluster12'' ''aget_comb.c''
179179
''--enable'' ''allglobs'' ''--enable'' ''printstats'' ''--enable'' ''dbg.debug''
180-
''-v'' ''--enable'' ''dbg.print_dead_code'' ''--enable'' ''witness.yaml.enabled''
180+
''-v'' ''--enable'' ''witness.yaml.enabled''
181181
''--set'' ''witness.yaml.path'' ''./aget_comb_traces_rel.yml'''
182182
task:
183183
input_files:
@@ -208,9 +208,9 @@
208208
''/home/simmo/dev/goblint/sv-comp/analyzer/conf/traces-rel.json'' ''--set''
209209
''dbg.timeout'' ''900'' ''--set'' ''ana.activated[+]'' ''apron'' ''--set''
210210
''ana.path_sens[+]'' ''threadflag'' ''--set'' ''ana.apron.privatization''
211-
''mutex-meet-tid-cluster12'' ''aget_comb.c'' ''--enable'' ''dbg.uncalled''
211+
''mutex-meet-tid-cluster12'' ''aget_comb.c''
212212
''--enable'' ''allglobs'' ''--enable'' ''printstats'' ''--enable'' ''dbg.debug''
213-
''-v'' ''--enable'' ''dbg.print_dead_code'' ''--enable'' ''witness.yaml.enabled''
213+
''-v'' ''--enable'' ''witness.yaml.enabled''
214214
''--set'' ''witness.yaml.path'' ''./aget_comb_traces_rel.yml'''
215215
task:
216216
input_files:
@@ -241,9 +241,9 @@
241241
''/home/simmo/dev/goblint/sv-comp/analyzer/conf/traces-rel.json'' ''--set''
242242
''dbg.timeout'' ''900'' ''--set'' ''ana.activated[+]'' ''apron'' ''--set''
243243
''ana.path_sens[+]'' ''threadflag'' ''--set'' ''ana.apron.privatization''
244-
''mutex-meet-tid-cluster12'' ''aget_comb.c'' ''--enable'' ''dbg.uncalled''
244+
''mutex-meet-tid-cluster12'' ''aget_comb.c''
245245
''--enable'' ''allglobs'' ''--enable'' ''printstats'' ''--enable'' ''dbg.debug''
246-
''-v'' ''--enable'' ''dbg.print_dead_code'' ''--enable'' ''witness.yaml.enabled''
246+
''-v'' ''--enable'' ''witness.yaml.enabled''
247247
''--set'' ''witness.yaml.path'' ''./aget_comb_traces_rel.yml'''
248248
task:
249249
input_files:
@@ -274,9 +274,9 @@
274274
''/home/simmo/dev/goblint/sv-comp/analyzer/conf/traces-rel.json'' ''--set''
275275
''dbg.timeout'' ''900'' ''--set'' ''ana.activated[+]'' ''apron'' ''--set''
276276
''ana.path_sens[+]'' ''threadflag'' ''--set'' ''ana.apron.privatization''
277-
''mutex-meet-tid-cluster12'' ''aget_comb.c'' ''--enable'' ''dbg.uncalled''
277+
''mutex-meet-tid-cluster12'' ''aget_comb.c''
278278
''--enable'' ''allglobs'' ''--enable'' ''printstats'' ''--enable'' ''dbg.debug''
279-
''-v'' ''--enable'' ''dbg.print_dead_code'' ''--enable'' ''witness.yaml.enabled''
279+
''-v'' ''--enable'' ''witness.yaml.enabled''
280280
''--set'' ''witness.yaml.path'' ''./aget_comb_traces_rel.yml'''
281281
task:
282282
input_files:
@@ -307,9 +307,9 @@
307307
''/home/simmo/dev/goblint/sv-comp/analyzer/conf/traces-rel.json'' ''--set''
308308
''dbg.timeout'' ''900'' ''--set'' ''ana.activated[+]'' ''apron'' ''--set''
309309
''ana.path_sens[+]'' ''threadflag'' ''--set'' ''ana.apron.privatization''
310-
''mutex-meet-tid-cluster12'' ''aget_comb.c'' ''--enable'' ''dbg.uncalled''
310+
''mutex-meet-tid-cluster12'' ''aget_comb.c''
311311
''--enable'' ''allglobs'' ''--enable'' ''printstats'' ''--enable'' ''dbg.debug''
312-
''-v'' ''--enable'' ''dbg.print_dead_code'' ''--enable'' ''witness.yaml.enabled''
312+
''-v'' ''--enable'' ''witness.yaml.enabled''
313313
''--set'' ''witness.yaml.path'' ''./aget_comb_traces_rel.yml'''
314314
task:
315315
input_files:

0 commit comments

Comments
 (0)