EvoScientist 0.0.1.dev1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. EvoScientist/EvoScientist.py +157 -0
  2. EvoScientist/__init__.py +24 -0
  3. EvoScientist/__main__.py +4 -0
  4. EvoScientist/backends.py +392 -0
  5. EvoScientist/cli.py +1553 -0
  6. EvoScientist/middleware.py +35 -0
  7. EvoScientist/prompts.py +277 -0
  8. EvoScientist/skills/accelerate/SKILL.md +332 -0
  9. EvoScientist/skills/accelerate/references/custom-plugins.md +453 -0
  10. EvoScientist/skills/accelerate/references/megatron-integration.md +489 -0
  11. EvoScientist/skills/accelerate/references/performance.md +525 -0
  12. EvoScientist/skills/bitsandbytes/SKILL.md +411 -0
  13. EvoScientist/skills/bitsandbytes/references/memory-optimization.md +521 -0
  14. EvoScientist/skills/bitsandbytes/references/qlora-training.md +521 -0
  15. EvoScientist/skills/bitsandbytes/references/quantization-formats.md +447 -0
  16. EvoScientist/skills/find-skills/SKILL.md +133 -0
  17. EvoScientist/skills/find-skills/scripts/install_skill.py +211 -0
  18. EvoScientist/skills/flash-attention/SKILL.md +367 -0
  19. EvoScientist/skills/flash-attention/references/benchmarks.md +215 -0
  20. EvoScientist/skills/flash-attention/references/transformers-integration.md +293 -0
  21. EvoScientist/skills/llama-cpp/SKILL.md +258 -0
  22. EvoScientist/skills/llama-cpp/references/optimization.md +89 -0
  23. EvoScientist/skills/llama-cpp/references/quantization.md +213 -0
  24. EvoScientist/skills/llama-cpp/references/server.md +125 -0
  25. EvoScientist/skills/lm-evaluation-harness/SKILL.md +490 -0
  26. EvoScientist/skills/lm-evaluation-harness/references/api-evaluation.md +490 -0
  27. EvoScientist/skills/lm-evaluation-harness/references/benchmark-guide.md +488 -0
  28. EvoScientist/skills/lm-evaluation-harness/references/custom-tasks.md +602 -0
  29. EvoScientist/skills/lm-evaluation-harness/references/distributed-eval.md +519 -0
  30. EvoScientist/skills/ml-paper-writing/SKILL.md +937 -0
  31. EvoScientist/skills/ml-paper-writing/references/checklists.md +361 -0
  32. EvoScientist/skills/ml-paper-writing/references/citation-workflow.md +562 -0
  33. EvoScientist/skills/ml-paper-writing/references/reviewer-guidelines.md +367 -0
  34. EvoScientist/skills/ml-paper-writing/references/sources.md +159 -0
  35. EvoScientist/skills/ml-paper-writing/references/writing-guide.md +476 -0
  36. EvoScientist/skills/ml-paper-writing/templates/README.md +251 -0
  37. EvoScientist/skills/ml-paper-writing/templates/aaai2026/README.md +534 -0
  38. EvoScientist/skills/ml-paper-writing/templates/aaai2026/aaai2026-unified-supp.tex +144 -0
  39. EvoScientist/skills/ml-paper-writing/templates/aaai2026/aaai2026-unified-template.tex +952 -0
  40. EvoScientist/skills/ml-paper-writing/templates/aaai2026/aaai2026.bib +111 -0
  41. EvoScientist/skills/ml-paper-writing/templates/aaai2026/aaai2026.bst +1493 -0
  42. EvoScientist/skills/ml-paper-writing/templates/aaai2026/aaai2026.sty +315 -0
  43. EvoScientist/skills/ml-paper-writing/templates/acl/README.md +50 -0
  44. EvoScientist/skills/ml-paper-writing/templates/acl/acl.sty +312 -0
  45. EvoScientist/skills/ml-paper-writing/templates/acl/acl_latex.tex +377 -0
  46. EvoScientist/skills/ml-paper-writing/templates/acl/acl_lualatex.tex +101 -0
  47. EvoScientist/skills/ml-paper-writing/templates/acl/acl_natbib.bst +1940 -0
  48. EvoScientist/skills/ml-paper-writing/templates/acl/anthology.bib.txt +26 -0
  49. EvoScientist/skills/ml-paper-writing/templates/acl/custom.bib +70 -0
  50. EvoScientist/skills/ml-paper-writing/templates/acl/formatting.md +326 -0
  51. EvoScientist/skills/ml-paper-writing/templates/colm2025/README.md +3 -0
  52. EvoScientist/skills/ml-paper-writing/templates/colm2025/colm2025_conference.bib +11 -0
  53. EvoScientist/skills/ml-paper-writing/templates/colm2025/colm2025_conference.bst +1440 -0
  54. EvoScientist/skills/ml-paper-writing/templates/colm2025/colm2025_conference.pdf +0 -0
  55. EvoScientist/skills/ml-paper-writing/templates/colm2025/colm2025_conference.sty +218 -0
  56. EvoScientist/skills/ml-paper-writing/templates/colm2025/colm2025_conference.tex +305 -0
  57. EvoScientist/skills/ml-paper-writing/templates/colm2025/fancyhdr.sty +485 -0
  58. EvoScientist/skills/ml-paper-writing/templates/colm2025/math_commands.tex +508 -0
  59. EvoScientist/skills/ml-paper-writing/templates/colm2025/natbib.sty +1246 -0
  60. EvoScientist/skills/ml-paper-writing/templates/iclr2026/fancyhdr.sty +485 -0
  61. EvoScientist/skills/ml-paper-writing/templates/iclr2026/iclr2026_conference.bib +24 -0
  62. EvoScientist/skills/ml-paper-writing/templates/iclr2026/iclr2026_conference.bst +1440 -0
  63. EvoScientist/skills/ml-paper-writing/templates/iclr2026/iclr2026_conference.pdf +0 -0
  64. EvoScientist/skills/ml-paper-writing/templates/iclr2026/iclr2026_conference.sty +246 -0
  65. EvoScientist/skills/ml-paper-writing/templates/iclr2026/iclr2026_conference.tex +414 -0
  66. EvoScientist/skills/ml-paper-writing/templates/iclr2026/math_commands.tex +508 -0
  67. EvoScientist/skills/ml-paper-writing/templates/iclr2026/natbib.sty +1246 -0
  68. EvoScientist/skills/ml-paper-writing/templates/icml2026/algorithm.sty +79 -0
  69. EvoScientist/skills/ml-paper-writing/templates/icml2026/algorithmic.sty +201 -0
  70. EvoScientist/skills/ml-paper-writing/templates/icml2026/example_paper.bib +75 -0
  71. EvoScientist/skills/ml-paper-writing/templates/icml2026/example_paper.pdf +0 -0
  72. EvoScientist/skills/ml-paper-writing/templates/icml2026/example_paper.tex +662 -0
  73. EvoScientist/skills/ml-paper-writing/templates/icml2026/fancyhdr.sty +864 -0
  74. EvoScientist/skills/ml-paper-writing/templates/icml2026/icml2026.bst +1443 -0
  75. EvoScientist/skills/ml-paper-writing/templates/icml2026/icml2026.sty +767 -0
  76. EvoScientist/skills/ml-paper-writing/templates/icml2026/icml_numpapers.pdf +0 -0
  77. EvoScientist/skills/ml-paper-writing/templates/neurips2025/Makefile +36 -0
  78. EvoScientist/skills/ml-paper-writing/templates/neurips2025/extra_pkgs.tex +53 -0
  79. EvoScientist/skills/ml-paper-writing/templates/neurips2025/main.tex +38 -0
  80. EvoScientist/skills/ml-paper-writing/templates/neurips2025/neurips.sty +382 -0
  81. EvoScientist/skills/peft/SKILL.md +431 -0
  82. EvoScientist/skills/peft/references/advanced-usage.md +514 -0
  83. EvoScientist/skills/peft/references/troubleshooting.md +480 -0
  84. EvoScientist/skills/ray-data/SKILL.md +326 -0
  85. EvoScientist/skills/ray-data/references/integration.md +82 -0
  86. EvoScientist/skills/ray-data/references/transformations.md +83 -0
  87. EvoScientist/skills/skill-creator/LICENSE.txt +202 -0
  88. EvoScientist/skills/skill-creator/SKILL.md +356 -0
  89. EvoScientist/skills/skill-creator/references/output-patterns.md +82 -0
  90. EvoScientist/skills/skill-creator/references/workflows.md +28 -0
  91. EvoScientist/skills/skill-creator/scripts/init_skill.py +303 -0
  92. EvoScientist/skills/skill-creator/scripts/package_skill.py +110 -0
  93. EvoScientist/skills/skill-creator/scripts/quick_validate.py +95 -0
  94. EvoScientist/stream/__init__.py +53 -0
  95. EvoScientist/stream/emitter.py +94 -0
  96. EvoScientist/stream/formatter.py +168 -0
  97. EvoScientist/stream/tracker.py +115 -0
  98. EvoScientist/stream/utils.py +255 -0
  99. EvoScientist/subagent.yaml +147 -0
  100. EvoScientist/tools.py +135 -0
  101. EvoScientist/utils.py +207 -0
  102. evoscientist-0.0.1.dev1.dist-info/METADATA +222 -0
  103. evoscientist-0.0.1.dev1.dist-info/RECORD +107 -0
  104. evoscientist-0.0.1.dev1.dist-info/WHEEL +5 -0
  105. evoscientist-0.0.1.dev1.dist-info/entry_points.txt +2 -0
  106. evoscientist-0.0.1.dev1.dist-info/licenses/LICENSE +21 -0
  107. evoscientist-0.0.1.dev1.dist-info/top_level.txt +1 -0
@@ -0,0 +1,1493 @@
1
+ %%
2
+ %% This is file `aaai2026.bst',
3
+ %% generated with the docstrip utility.
4
+ %%
5
+ %% The original source files were:
6
+ %%
7
+ %% merlin.mbs (with options: `head,ay,nat,ed-au,nm-rev,ed-rev,jnrlst,aunm-semi,mcite,mct-1,mct-x3,keyxyr,dt-beg,yr-per,yrp-per,note-yr,atit-u,volp-sp,num-xser,bkpg-x,add-pub,isbn,ppx,ed,xedn,and-com,and-com-ed,etal-xc,nfss,,{}')
8
+ %% merlin.mbs (with options: `tail,ay,nat,ed-au,nm-rev,ed-rev,jnrlst,aunm-semi,mcite,mct-1,mct-x3,keyxyr,dt-beg,yr-per,yrp-per,note-yr,atit-u,volp-sp,num-xser,bkpg-x,add-pub,isbn,ppx,ed,xedn,and-com,and-com-ed,etal-xc,nfss,,{}')
9
+ %% ----------------------------------------
10
+ %% *** Natbib-compatible implementation of 'aaai' bib style ***
11
+ %%
12
+ % ===============================================================
13
+ % IMPORTANT NOTICE:
14
+ % This bibliographic style (bst) file has been generated from one or
15
+ % more master bibliographic style (mbs) files, listed above.
16
+ %
17
+ % This generated file can be redistributed and/or modified under the terms
18
+ % of the LaTeX Project Public License Distributed from CTAN
19
+ % archives in directory macros/latex/base/lppl.txt; either
20
+ % version 1 of the License, or any later version.
21
+ % ===============================================================
22
+ % Name and version information of the main mbs file:
23
+ % \ProvidesFile{merlin.mbs}[2011/11/18 4.33 (PWD, AO, DPC)]
24
+ % For use with BibTeX version 0.99a or later
25
+ %-------------------------------------------------------------------
26
+ % This bibliography style file is intended for texts in ENGLISH
27
+ % This is an author-year citation style bibliography. As such, it is
28
+ % non-standard LaTeX, and requires a special package file to function properly.
29
+ % Such a package is natbib.sty by Patrick W. Daly
30
+ % The form of the \bibitem entries is
31
+ % \bibitem[Jones et al.(1990)]{key}...
32
+ % \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}...
33
+ % The essential feature is that the label (the part in brackets) consists
34
+ % of the author names, as they should appear in the citation, with the year
35
+ % in parentheses following. There must be no space before the opening
36
+ % parenthesis!
37
+ % With natbib v5.3, a full list of authors may also follow the year.
38
+ % In natbib.sty, it is possible to define the type of enclosures that is
39
+ % really wanted (brackets or parentheses), but in either case, there must
40
+ % be parentheses in the label.
41
+ % The \cite command functions as follows:
42
+ % \citet{key} ==>> Jones et al. (1990)
43
+ % \citet*{key} ==>> Jones, Baker, and Smith (1990)
44
+ % \citep{key} ==>> (Jones et al., 1990)
45
+ % \citep*{key} ==>> (Jones, Baker, and Smith, 1990)
46
+ % \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2)
47
+ % \citep[e.g.][]{key} ==>> (e.g. Jones et al., 1990)
48
+ % \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., 1990, p. 32)
49
+ % \citeauthor{key} ==>> Jones et al.
50
+ % \citeauthor*{key} ==>> Jones, Baker, and Smith
51
+ % \citeyear{key} ==>> 1990
52
+ %---------------------------------------------------------------------
53
+
54
+ ENTRY
55
+ { address
56
+ archivePrefix
57
+ author
58
+ booktitle
59
+ chapter
60
+ edition
61
+ editor
62
+ eid
63
+ eprint
64
+ howpublished
65
+ institution
66
+ isbn
67
+ journal
68
+ key
69
+ month
70
+ note
71
+ number
72
+ organization
73
+ pages
74
+ publisher
75
+ school
76
+ series
77
+ title
78
+ type
79
+ volume
80
+ year
81
+ }
82
+ {}
83
+ { label extra.label sort.label short.list }
84
+ INTEGERS { output.state before.all mid.sentence after.sentence after.block }
85
+ FUNCTION {init.state.consts}
86
+ { #0 'before.all :=
87
+ #1 'mid.sentence :=
88
+ #2 'after.sentence :=
89
+ #3 'after.block :=
90
+ }
91
+ STRINGS { s t}
92
+ FUNCTION {output.nonnull}
93
+ { 's :=
94
+ output.state mid.sentence =
95
+ { ", " * write$ }
96
+ { output.state after.block =
97
+ { add.period$ write$
98
+ newline$
99
+ "\newblock " write$
100
+ }
101
+ { output.state before.all =
102
+ 'write$
103
+ { add.period$ " " * write$ }
104
+ if$
105
+ }
106
+ if$
107
+ mid.sentence 'output.state :=
108
+ }
109
+ if$
110
+ s
111
+ }
112
+ FUNCTION {output}
113
+ { duplicate$ empty$
114
+ 'pop$
115
+ 'output.nonnull
116
+ if$
117
+ }
118
+ FUNCTION {output.check}
119
+ { 't :=
120
+ duplicate$ empty$
121
+ { pop$ "empty " t * " in " * cite$ * warning$ }
122
+ 'output.nonnull
123
+ if$
124
+ }
125
+ FUNCTION {fin.entry}
126
+ { add.period$
127
+ write$
128
+ newline$
129
+ }
130
+
131
+ FUNCTION {new.block}
132
+ { output.state before.all =
133
+ 'skip$
134
+ { after.block 'output.state := }
135
+ if$
136
+ }
137
+ FUNCTION {new.sentence}
138
+ { output.state after.block =
139
+ 'skip$
140
+ { output.state before.all =
141
+ 'skip$
142
+ { after.sentence 'output.state := }
143
+ if$
144
+ }
145
+ if$
146
+ }
147
+ FUNCTION {add.blank}
148
+ { " " * before.all 'output.state :=
149
+ }
150
+
151
+ FUNCTION {date.block}
152
+ {
153
+ new.block
154
+ }
155
+
156
+ FUNCTION {not}
157
+ { { #0 }
158
+ { #1 }
159
+ if$
160
+ }
161
+ FUNCTION {and}
162
+ { 'skip$
163
+ { pop$ #0 }
164
+ if$
165
+ }
166
+ FUNCTION {or}
167
+ { { pop$ #1 }
168
+ 'skip$
169
+ if$
170
+ }
171
+ FUNCTION {new.block.checkb}
172
+ { empty$
173
+ swap$ empty$
174
+ and
175
+ 'skip$
176
+ 'new.block
177
+ if$
178
+ }
179
+ FUNCTION {field.or.null}
180
+ { duplicate$ empty$
181
+ { pop$ "" }
182
+ 'skip$
183
+ if$
184
+ }
185
+ FUNCTION {emphasize}
186
+ { duplicate$ empty$
187
+ { pop$ "" }
188
+ { "\emph{" swap$ * "}" * }
189
+ if$
190
+ }
191
+ FUNCTION {tie.or.space.prefix}
192
+ { duplicate$ text.length$ #3 <
193
+ { "~" }
194
+ { " " }
195
+ if$
196
+ swap$
197
+ }
198
+
199
+ FUNCTION {capitalize}
200
+ { "u" change.case$ "t" change.case$ }
201
+
202
+ FUNCTION {space.word}
203
+ { " " swap$ * " " * }
204
+ % Here are the language-specific definitions for explicit words.
205
+ % Each function has a name bbl.xxx where xxx is the English word.
206
+ % The language selected here is ENGLISH
207
+ FUNCTION {bbl.and}
208
+ { "and"}
209
+
210
+ FUNCTION {bbl.etal}
211
+ { "et~al." }
212
+
213
+ FUNCTION {bbl.editors}
214
+ { "eds." }
215
+
216
+ FUNCTION {bbl.editor}
217
+ { "ed." }
218
+
219
+ FUNCTION {bbl.edby}
220
+ { "edited by" }
221
+
222
+ FUNCTION {bbl.edition}
223
+ { "edition" }
224
+
225
+ FUNCTION {bbl.volume}
226
+ { "volume" }
227
+
228
+ FUNCTION {bbl.of}
229
+ { "of" }
230
+
231
+ FUNCTION {bbl.number}
232
+ { "number" }
233
+
234
+ FUNCTION {bbl.nr}
235
+ { "no." }
236
+
237
+ FUNCTION {bbl.in}
238
+ { "in" }
239
+
240
+ FUNCTION {bbl.pages}
241
+ { "" }
242
+
243
+ FUNCTION {bbl.page}
244
+ { "" }
245
+
246
+ FUNCTION {bbl.chapter}
247
+ { "chapter" }
248
+
249
+ FUNCTION {bbl.techrep}
250
+ { "Technical Report" }
251
+
252
+ FUNCTION {bbl.mthesis}
253
+ { "Master's thesis" }
254
+
255
+ FUNCTION {bbl.phdthesis}
256
+ { "Ph.D. thesis" }
257
+
258
+ MACRO {jan} {"January"}
259
+
260
+ MACRO {feb} {"February"}
261
+
262
+ MACRO {mar} {"March"}
263
+
264
+ MACRO {apr} {"April"}
265
+
266
+ MACRO {may} {"May"}
267
+
268
+ MACRO {jun} {"June"}
269
+
270
+ MACRO {jul} {"July"}
271
+
272
+ MACRO {aug} {"August"}
273
+
274
+ MACRO {sep} {"September"}
275
+
276
+ MACRO {oct} {"October"}
277
+
278
+ MACRO {nov} {"November"}
279
+
280
+ MACRO {dec} {"December"}
281
+
282
+ MACRO {acmcs} {"ACM Computing Surveys"}
283
+
284
+ MACRO {acta} {"Acta Informatica"}
285
+
286
+ MACRO {cacm} {"Communications of the ACM"}
287
+
288
+ MACRO {ibmjrd} {"IBM Journal of Research and Development"}
289
+
290
+ MACRO {ibmsj} {"IBM Systems Journal"}
291
+
292
+ MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
293
+
294
+ MACRO {ieeetc} {"IEEE Transactions on Computers"}
295
+
296
+ MACRO {ieeetcad}
297
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
298
+
299
+ MACRO {ipl} {"Information Processing Letters"}
300
+
301
+ MACRO {jacm} {"Journal of the ACM"}
302
+
303
+ MACRO {jcss} {"Journal of Computer and System Sciences"}
304
+
305
+ MACRO {scp} {"Science of Computer Programming"}
306
+
307
+ MACRO {sicomp} {"SIAM Journal on Computing"}
308
+
309
+ MACRO {tocs} {"ACM Transactions on Computer Systems"}
310
+
311
+ MACRO {tods} {"ACM Transactions on Database Systems"}
312
+
313
+ MACRO {tog} {"ACM Transactions on Graphics"}
314
+
315
+ MACRO {toms} {"ACM Transactions on Mathematical Software"}
316
+
317
+ MACRO {toois} {"ACM Transactions on Office Information Systems"}
318
+
319
+ MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
320
+
321
+ MACRO {tcs} {"Theoretical Computer Science"}
322
+ FUNCTION {bibinfo.check}
323
+ { swap$
324
+ duplicate$ missing$
325
+ {
326
+ pop$ pop$
327
+ ""
328
+ }
329
+ { duplicate$ empty$
330
+ {
331
+ swap$ pop$
332
+ }
333
+ { swap$
334
+ pop$
335
+ }
336
+ if$
337
+ }
338
+ if$
339
+ }
340
+ FUNCTION {bibinfo.warn}
341
+ { swap$
342
+ duplicate$ missing$
343
+ {
344
+ swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
345
+ ""
346
+ }
347
+ { duplicate$ empty$
348
+ {
349
+ swap$ "empty " swap$ * " in " * cite$ * warning$
350
+ }
351
+ { swap$
352
+ pop$
353
+ }
354
+ if$
355
+ }
356
+ if$
357
+ }
358
+ FUNCTION {format.eprint}
359
+ { eprint duplicate$ empty$
360
+ 'skip$
361
+ { archivePrefix duplicate$ empty$
362
+ 'skip$
363
+ { ":" * swap$ }
364
+ if$
365
+ * "." *
366
+ }
367
+ if$
368
+ }
369
+ INTEGERS { nameptr namesleft numnames }
370
+
371
+
372
+ STRINGS { bibinfo}
373
+
374
+ FUNCTION {format.names}
375
+ { 'bibinfo :=
376
+ duplicate$ empty$ 'skip$ {
377
+ 's :=
378
+ "" 't :=
379
+ #1 'nameptr :=
380
+ s num.names$ 'numnames :=
381
+ numnames 'namesleft :=
382
+ { namesleft #0 > }
383
+ { s nameptr
384
+ "{vv~}{ll}{, f.}{, jj}"
385
+ format.name$
386
+ bibinfo bibinfo.check
387
+ 't :=
388
+ nameptr #1 >
389
+ {
390
+ namesleft #1 >
391
+ { "; " * t * }
392
+ {
393
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
394
+ { 't := }
395
+ { pop$ }
396
+ if$
397
+ ";" *
398
+ t "others" =
399
+ {
400
+ " " * bbl.etal *
401
+ }
402
+ {
403
+ bbl.and
404
+ space.word * t *
405
+ }
406
+ if$
407
+ }
408
+ if$
409
+ }
410
+ 't
411
+ if$
412
+ nameptr #1 + 'nameptr :=
413
+ namesleft #1 - 'namesleft :=
414
+ }
415
+ while$
416
+ } if$
417
+ }
418
+ FUNCTION {format.names.ed}
419
+ {
420
+ format.names
421
+ }
422
+ FUNCTION {format.key}
423
+ { empty$
424
+ { key field.or.null }
425
+ { "" }
426
+ if$
427
+ }
428
+
429
+ FUNCTION {format.authors}
430
+ { author "author" format.names
431
+ }
432
+ FUNCTION {get.bbl.editor}
433
+ { editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }
434
+
435
+ FUNCTION {format.editors}
436
+ { editor "editor" format.names duplicate$ empty$ 'skip$
437
+ {
438
+ "," *
439
+ " " *
440
+ get.bbl.editor
441
+ *
442
+ }
443
+ if$
444
+ }
445
+ FUNCTION {format.isbn}
446
+ { isbn "isbn" bibinfo.check
447
+ duplicate$ empty$ 'skip$
448
+ {
449
+ new.block
450
+ "ISBN " swap$ *
451
+ }
452
+ if$
453
+ }
454
+
455
+ FUNCTION {format.note}
456
+ {
457
+ note empty$
458
+ { "" }
459
+ { note #1 #1 substring$
460
+ duplicate$ "{" =
461
+ 'skip$
462
+ { output.state mid.sentence =
463
+ { "l" }
464
+ { "u" }
465
+ if$
466
+ change.case$
467
+ }
468
+ if$
469
+ note #2 global.max$ substring$ * "note" bibinfo.check
470
+ }
471
+ if$
472
+ }
473
+
474
+ FUNCTION {format.title}
475
+ { title
476
+ "title" bibinfo.check
477
+ }
478
+ FUNCTION {format.full.names}
479
+ {'s :=
480
+ "" 't :=
481
+ #1 'nameptr :=
482
+ s num.names$ 'numnames :=
483
+ numnames 'namesleft :=
484
+ { namesleft #0 > }
485
+ { s nameptr
486
+ "{vv~}{ll}" format.name$
487
+ 't :=
488
+ nameptr #1 >
489
+ {
490
+ namesleft #1 >
491
+ { ", " * t * }
492
+ {
493
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
494
+ { 't := }
495
+ { pop$ }
496
+ if$
497
+ t "others" =
498
+ {
499
+ " " * bbl.etal *
500
+ }
501
+ {
502
+ numnames #2 >
503
+ { "," * }
504
+ 'skip$
505
+ if$
506
+ bbl.and
507
+ space.word * t *
508
+ }
509
+ if$
510
+ }
511
+ if$
512
+ }
513
+ 't
514
+ if$
515
+ nameptr #1 + 'nameptr :=
516
+ namesleft #1 - 'namesleft :=
517
+ }
518
+ while$
519
+ }
520
+
521
+ FUNCTION {author.editor.key.full}
522
+ { author empty$
523
+ { editor empty$
524
+ { key empty$
525
+ { cite$ #1 #3 substring$ }
526
+ 'key
527
+ if$
528
+ }
529
+ { editor format.full.names }
530
+ if$
531
+ }
532
+ { author format.full.names }
533
+ if$
534
+ }
535
+
536
+ FUNCTION {author.key.full}
537
+ { author empty$
538
+ { key empty$
539
+ { cite$ #1 #3 substring$ }
540
+ 'key
541
+ if$
542
+ }
543
+ { author format.full.names }
544
+ if$
545
+ }
546
+
547
+ FUNCTION {editor.key.full}
548
+ { editor empty$
549
+ { key empty$
550
+ { cite$ #1 #3 substring$ }
551
+ 'key
552
+ if$
553
+ }
554
+ { editor format.full.names }
555
+ if$
556
+ }
557
+
558
+ FUNCTION {make.full.names}
559
+ { type$ "book" =
560
+ type$ "inbook" =
561
+ or
562
+ 'author.editor.key.full
563
+ { type$ "proceedings" =
564
+ 'editor.key.full
565
+ 'author.key.full
566
+ if$
567
+ }
568
+ if$
569
+ }
570
+
571
+ FUNCTION {output.bibitem}
572
+ { newline$
573
+ "\bibitem[{" write$
574
+ label write$
575
+ ")" make.full.names duplicate$ short.list =
576
+ { pop$ }
577
+ { * }
578
+ if$
579
+ "}]{" * write$
580
+ cite$ write$
581
+ "}" write$
582
+ newline$
583
+ ""
584
+ before.all 'output.state :=
585
+ }
586
+
587
+ FUNCTION {n.dashify}
588
+ {
589
+ 't :=
590
+ ""
591
+ { t empty$ not }
592
+ { t #1 #1 substring$ "-" =
593
+ { t #1 #2 substring$ "--" = not
594
+ { "--" *
595
+ t #2 global.max$ substring$ 't :=
596
+ }
597
+ { { t #1 #1 substring$ "-" = }
598
+ { "-" *
599
+ t #2 global.max$ substring$ 't :=
600
+ }
601
+ while$
602
+ }
603
+ if$
604
+ }
605
+ { t #1 #1 substring$ *
606
+ t #2 global.max$ substring$ 't :=
607
+ }
608
+ if$
609
+ }
610
+ while$
611
+ }
612
+
613
+ FUNCTION {word.in}
614
+ { bbl.in capitalize
615
+ " " * }
616
+
617
+ FUNCTION {format.date}
618
+ { year "year" bibinfo.check duplicate$ empty$
619
+ {
620
+ "empty year in " cite$ * "; set to ????" * warning$
621
+ pop$ "????"
622
+ }
623
+ 'skip$
624
+ if$
625
+ extra.label *
626
+ before.all 'output.state :=
627
+ after.sentence 'output.state :=
628
+ }
629
+ FUNCTION {format.btitle}
630
+ { title "title" bibinfo.check
631
+ duplicate$ empty$ 'skip$
632
+ {
633
+ emphasize
634
+ }
635
+ if$
636
+ }
637
+ FUNCTION {either.or.check}
638
+ { empty$
639
+ 'pop$
640
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
641
+ if$
642
+ }
643
+ FUNCTION {format.bvolume}
644
+ { volume empty$
645
+ { "" }
646
+ { bbl.volume volume tie.or.space.prefix
647
+ "volume" bibinfo.check * *
648
+ series "series" bibinfo.check
649
+ duplicate$ empty$ 'pop$
650
+ { swap$ bbl.of space.word * swap$
651
+ emphasize * }
652
+ if$
653
+ "volume and number" number either.or.check
654
+ }
655
+ if$
656
+ }
657
+ FUNCTION {format.number.series}
658
+ { volume empty$
659
+ { number empty$
660
+ { series field.or.null }
661
+ { series empty$
662
+ { number "number" bibinfo.check }
663
+ { output.state mid.sentence =
664
+ { bbl.number }
665
+ { bbl.number capitalize }
666
+ if$
667
+ number tie.or.space.prefix "number" bibinfo.check * *
668
+ bbl.in space.word *
669
+ series "series" bibinfo.check *
670
+ }
671
+ if$
672
+ }
673
+ if$
674
+ }
675
+ { "" }
676
+ if$
677
+ }
678
+
679
+ FUNCTION {format.edition}
680
+ { edition duplicate$ empty$ 'skip$
681
+ {
682
+ output.state mid.sentence =
683
+ { "l" }
684
+ { "t" }
685
+ if$ change.case$
686
+ "edition" bibinfo.check
687
+ " " * bbl.edition *
688
+ }
689
+ if$
690
+ }
691
+ INTEGERS { multiresult }
692
+ FUNCTION {multi.page.check}
693
+ { 't :=
694
+ #0 'multiresult :=
695
+ { multiresult not
696
+ t empty$ not
697
+ and
698
+ }
699
+ { t #1 #1 substring$
700
+ duplicate$ "-" =
701
+ swap$ duplicate$ "," =
702
+ swap$ "+" =
703
+ or or
704
+ { #1 'multiresult := }
705
+ { t #2 global.max$ substring$ 't := }
706
+ if$
707
+ }
708
+ while$
709
+ multiresult
710
+ }
711
+ FUNCTION {format.pages}
712
+ { pages duplicate$ empty$ 'skip$
713
+ { duplicate$ multi.page.check
714
+ {
715
+ n.dashify
716
+ }
717
+ {
718
+ }
719
+ if$
720
+ "pages" bibinfo.check
721
+ }
722
+ if$
723
+ }
724
+ FUNCTION {format.journal.pages}
725
+ { pages duplicate$ empty$ 'pop$
726
+ { swap$ duplicate$ empty$
727
+ { pop$ pop$ format.pages }
728
+ {
729
+ ": " *
730
+ swap$
731
+ n.dashify
732
+ "pages" bibinfo.check
733
+ *
734
+ }
735
+ if$
736
+ }
737
+ if$
738
+ }
739
+ FUNCTION {format.journal.eid}
740
+ { eid "eid" bibinfo.check
741
+ duplicate$ empty$ 'pop$
742
+ { swap$ duplicate$ empty$ 'skip$
743
+ {
744
+ ": " *
745
+ }
746
+ if$
747
+ swap$ *
748
+ }
749
+ if$
750
+ }
751
+ FUNCTION {format.vol.num.pages}
752
+ { volume field.or.null
753
+ duplicate$ empty$ 'skip$
754
+ {
755
+ "volume" bibinfo.check
756
+ }
757
+ if$
758
+ number "number" bibinfo.check duplicate$ empty$ 'skip$
759
+ {
760
+ swap$ duplicate$ empty$
761
+ { "there's a number but no volume in " cite$ * warning$ }
762
+ 'skip$
763
+ if$
764
+ swap$
765
+ "(" swap$ * ")" *
766
+ }
767
+ if$ *
768
+ eid empty$
769
+ { format.journal.pages }
770
+ { format.journal.eid }
771
+ if$
772
+ }
773
+
774
+ FUNCTION {format.chapter.pages}
775
+ { chapter empty$
776
+ 'format.pages
777
+ { type empty$
778
+ { bbl.chapter }
779
+ { type "l" change.case$
780
+ "type" bibinfo.check
781
+ }
782
+ if$
783
+ chapter tie.or.space.prefix
784
+ "chapter" bibinfo.check
785
+ * *
786
+ pages empty$
787
+ 'skip$
788
+ { ", " * format.pages * }
789
+ if$
790
+ }
791
+ if$
792
+ }
793
+
794
+ FUNCTION {format.booktitle}
795
+ {
796
+ booktitle "booktitle" bibinfo.check
797
+ emphasize
798
+ }
799
+ FUNCTION {format.in.ed.booktitle}
800
+ { format.booktitle duplicate$ empty$ 'skip$
801
+ {
802
+ editor "editor" format.names.ed duplicate$ empty$ 'pop$
803
+ {
804
+ "," *
805
+ " " *
806
+ get.bbl.editor
807
+ ", " *
808
+ * swap$
809
+ * }
810
+ if$
811
+ word.in swap$ *
812
+ }
813
+ if$
814
+ }
815
+ FUNCTION {format.thesis.type}
816
+ { type duplicate$ empty$
817
+ 'pop$
818
+ { swap$ pop$
819
+ "t" change.case$ "type" bibinfo.check
820
+ }
821
+ if$
822
+ }
823
+ FUNCTION {format.tr.number}
824
+ { number "number" bibinfo.check
825
+ type duplicate$ empty$
826
+ { pop$ bbl.techrep }
827
+ 'skip$
828
+ if$
829
+ "type" bibinfo.check
830
+ swap$ duplicate$ empty$
831
+ { pop$ "t" change.case$ }
832
+ { tie.or.space.prefix * * }
833
+ if$
834
+ }
835
+ FUNCTION {format.article.crossref}
836
+ {
837
+ word.in
838
+ " \cite{" * crossref * "}" *
839
+ }
840
+ FUNCTION {format.book.crossref}
841
+ { volume duplicate$ empty$
842
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
843
+ pop$ word.in
844
+ }
845
+ { bbl.volume
846
+ capitalize
847
+ swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word *
848
+ }
849
+ if$
850
+ " \cite{" * crossref * "}" *
851
+ }
852
+ FUNCTION {format.incoll.inproc.crossref}
853
+ {
854
+ word.in
855
+ " \cite{" * crossref * "}" *
856
+ }
857
+ FUNCTION {format.org.or.pub}
858
+ { 't :=
859
+ ""
860
+ address empty$ t empty$ and
861
+ 'skip$
862
+ {
863
+ address "address" bibinfo.check *
864
+ t empty$
865
+ 'skip$
866
+ { address empty$
867
+ 'skip$
868
+ { ": " * }
869
+ if$
870
+ t *
871
+ }
872
+ if$
873
+ }
874
+ if$
875
+ }
876
+ FUNCTION {format.publisher.address}
877
+ { publisher "publisher" bibinfo.warn format.org.or.pub
878
+ }
879
+
880
+ FUNCTION {format.organization.address}
881
+ { organization "organization" bibinfo.check format.org.or.pub
882
+ }
883
+
884
+ FUNCTION {article}
885
+ { output.bibitem
886
+ format.authors "author" output.check
887
+ author format.key output
888
+ format.date "year" output.check
889
+ date.block
890
+ format.title "title" output.check
891
+ new.block
892
+ crossref missing$
893
+ {
894
+ journal
895
+ "journal" bibinfo.check
896
+ emphasize
897
+ "journal" output.check
898
+ format.vol.num.pages output
899
+ }
900
+ { format.article.crossref output.nonnull
901
+ format.pages output
902
+ }
903
+ if$
904
+ new.block
905
+ format.note output
906
+ fin.entry
907
+ }
908
+ FUNCTION {book}
909
+ { output.bibitem
910
+ author empty$
911
+ { format.editors "author and editor" output.check
912
+ editor format.key output
913
+ }
914
+ { format.authors output.nonnull
915
+ crossref missing$
916
+ { "author and editor" editor either.or.check }
917
+ 'skip$
918
+ if$
919
+ }
920
+ if$
921
+ format.date "year" output.check
922
+ date.block
923
+ format.btitle "title" output.check
924
+ crossref missing$
925
+ { format.bvolume output
926
+ new.block
927
+ format.number.series output
928
+ new.sentence
929
+ format.publisher.address output
930
+ }
931
+ {
932
+ new.block
933
+ format.book.crossref output.nonnull
934
+ }
935
+ if$
936
+ format.edition output
937
+ format.isbn output
938
+ new.block
939
+ format.note output
940
+ fin.entry
941
+ }
942
+ FUNCTION {booklet}
943
+ { output.bibitem
944
+ format.authors output
945
+ author format.key output
946
+ format.date "year" output.check
947
+ date.block
948
+ format.title "title" output.check
949
+ new.block
950
+ howpublished "howpublished" bibinfo.check output
951
+ address "address" bibinfo.check output
952
+ format.isbn output
953
+ new.block
954
+ format.note output
955
+ fin.entry
956
+ }
957
+
958
+ FUNCTION {inbook}
959
+ { output.bibitem
960
+ author empty$
961
+ { format.editors "author and editor" output.check
962
+ editor format.key output
963
+ }
964
+ { format.authors output.nonnull
965
+ crossref missing$
966
+ { "author and editor" editor either.or.check }
967
+ 'skip$
968
+ if$
969
+ }
970
+ if$
971
+ format.date "year" output.check
972
+ date.block
973
+ format.btitle "title" output.check
974
+ crossref missing$
975
+ {
976
+ format.bvolume output
977
+ format.chapter.pages "chapter and pages" output.check
978
+ new.block
979
+ format.number.series output
980
+ new.sentence
981
+ format.publisher.address output
982
+ }
983
+ {
984
+ format.chapter.pages "chapter and pages" output.check
985
+ new.block
986
+ format.book.crossref output.nonnull
987
+ }
988
+ if$
989
+ format.edition output
990
+ crossref missing$
991
+ { format.isbn output }
992
+ 'skip$
993
+ if$
994
+ new.block
995
+ format.note output
996
+ fin.entry
997
+ }
998
+
999
+ FUNCTION {incollection}
1000
+ { output.bibitem
1001
+ format.authors "author" output.check
1002
+ author format.key output
1003
+ format.date "year" output.check
1004
+ date.block
1005
+ format.title "title" output.check
1006
+ new.block
1007
+ crossref missing$
1008
+ { format.in.ed.booktitle "booktitle" output.check
1009
+ format.bvolume output
1010
+ format.number.series output
1011
+ format.chapter.pages output
1012
+ new.sentence
1013
+ format.publisher.address output
1014
+ format.edition output
1015
+ format.isbn output
1016
+ }
1017
+ { format.incoll.inproc.crossref output.nonnull
1018
+ format.chapter.pages output
1019
+ }
1020
+ if$
1021
+ new.block
1022
+ format.note output
1023
+ fin.entry
1024
+ }
1025
+ FUNCTION {inproceedings}
1026
+ { output.bibitem
1027
+ format.authors "author" output.check
1028
+ author format.key output
1029
+ format.date "year" output.check
1030
+ date.block
1031
+ format.title "title" output.check
1032
+ new.block
1033
+ crossref missing$
1034
+ { format.in.ed.booktitle "booktitle" output.check
1035
+ format.bvolume output
1036
+ format.number.series output
1037
+ format.pages output
1038
+ new.sentence
1039
+ publisher empty$
1040
+ { format.organization.address output }
1041
+ { organization "organization" bibinfo.check output
1042
+ format.publisher.address output
1043
+ }
1044
+ if$
1045
+ format.isbn output
1046
+ }
1047
+ { format.incoll.inproc.crossref output.nonnull
1048
+ format.pages output
1049
+ }
1050
+ if$
1051
+ new.block
1052
+ format.note output
1053
+ fin.entry
1054
+ }
1055
+ FUNCTION {conference} { inproceedings }
1056
+ FUNCTION {manual}
1057
+ { output.bibitem
1058
+ format.authors output
1059
+ author format.key output
1060
+ format.date "year" output.check
1061
+ date.block
1062
+ format.btitle "title" output.check
1063
+ organization address new.block.checkb
1064
+ organization "organization" bibinfo.check output
1065
+ address "address" bibinfo.check output
1066
+ format.edition output
1067
+ new.block
1068
+ format.note output
1069
+ fin.entry
1070
+ }
1071
+
1072
+ FUNCTION {mastersthesis}
1073
+ { output.bibitem
1074
+ format.authors "author" output.check
1075
+ author format.key output
1076
+ format.date "year" output.check
1077
+ date.block
1078
+ format.btitle
1079
+ "title" output.check
1080
+ new.block
1081
+ bbl.mthesis format.thesis.type output.nonnull
1082
+ school "school" bibinfo.warn output
1083
+ address "address" bibinfo.check output
1084
+ new.block
1085
+ format.note output
1086
+ fin.entry
1087
+ }
1088
+
1089
+ FUNCTION {misc}
1090
+ { output.bibitem
1091
+ format.authors output
1092
+ author format.key output
1093
+ format.date "year" output.check
1094
+ date.block
1095
+ format.title output
1096
+ new.block
1097
+ howpublished "howpublished" bibinfo.check output
1098
+ new.block
1099
+ format.note output
1100
+ format.eprint output
1101
+ fin.entry
1102
+ }
1103
+ FUNCTION {phdthesis}
1104
+ { output.bibitem
1105
+ format.authors "author" output.check
1106
+ author format.key output
1107
+ format.date "year" output.check
1108
+ date.block
1109
+ format.btitle
1110
+ "title" output.check
1111
+ new.block
1112
+ bbl.phdthesis format.thesis.type output.nonnull
1113
+ school "school" bibinfo.warn output
1114
+ address "address" bibinfo.check output
1115
+ new.block
1116
+ format.note output
1117
+ fin.entry
1118
+ }
1119
+
1120
+ FUNCTION {proceedings}
1121
+ { output.bibitem
1122
+ format.editors output
1123
+ editor format.key output
1124
+ format.date "year" output.check
1125
+ date.block
1126
+ format.btitle "title" output.check
1127
+ format.bvolume output
1128
+ format.number.series output
1129
+ new.sentence
1130
+ publisher empty$
1131
+ { format.organization.address output }
1132
+ { organization "organization" bibinfo.check output
1133
+ format.publisher.address output
1134
+ }
1135
+ if$
1136
+ format.isbn output
1137
+ new.block
1138
+ format.note output
1139
+ fin.entry
1140
+ }
1141
+
1142
+ FUNCTION {techreport}
1143
+ { output.bibitem
1144
+ format.authors "author" output.check
1145
+ author format.key output
1146
+ format.date "year" output.check
1147
+ date.block
1148
+ format.title
1149
+ "title" output.check
1150
+ new.block
1151
+ format.tr.number output.nonnull
1152
+ institution "institution" bibinfo.warn output
1153
+ address "address" bibinfo.check output
1154
+ new.block
1155
+ format.note output
1156
+ fin.entry
1157
+ }
1158
+
1159
+ FUNCTION {unpublished}
1160
+ { output.bibitem
1161
+ format.authors "author" output.check
1162
+ author format.key output
1163
+ format.date "year" output.check
1164
+ date.block
1165
+ format.title "title" output.check
1166
+ new.block
1167
+ format.note "note" output.check
1168
+ fin.entry
1169
+ }
1170
+
1171
+ FUNCTION {default.type} { misc }
1172
+ READ
1173
+ FUNCTION {sortify}
1174
+ { purify$
1175
+ "l" change.case$
1176
+ }
1177
+ INTEGERS { len }
1178
+ FUNCTION {chop.word}
1179
+ { 's :=
1180
+ 'len :=
1181
+ s #1 len substring$ =
1182
+ { s len #1 + global.max$ substring$ }
1183
+ 's
1184
+ if$
1185
+ }
1186
+ FUNCTION {format.lab.names}
1187
+ {'s :=
1188
+ "" 't :=
1189
+ #1 'nameptr :=
1190
+ s num.names$ 'numnames :=
1191
+ numnames 'namesleft :=
1192
+ { namesleft #0 > }
1193
+ { s nameptr
1194
+ "{vv~}{ll}" format.name$
1195
+ 't :=
1196
+ nameptr #1 >
1197
+ {
1198
+ nameptr #2 =
1199
+ numnames #3 > and
1200
+ { "others" 't :=
1201
+ #1 'namesleft := }
1202
+ 'skip$
1203
+ if$
1204
+ namesleft #1 >
1205
+ { ", " * t * }
1206
+ {
1207
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
1208
+ { 't := }
1209
+ { pop$ }
1210
+ if$
1211
+ t "others" =
1212
+ {
1213
+ " " * bbl.etal *
1214
+ }
1215
+ {
1216
+ numnames #2 >
1217
+ { "," * }
1218
+ 'skip$
1219
+ if$
1220
+ bbl.and
1221
+ space.word * t *
1222
+ }
1223
+ if$
1224
+ }
1225
+ if$
1226
+ }
1227
+ 't
1228
+ if$
1229
+ nameptr #1 + 'nameptr :=
1230
+ namesleft #1 - 'namesleft :=
1231
+ }
1232
+ while$
1233
+ }
1234
+
1235
+ FUNCTION {author.key.label}
1236
+ { author empty$
1237
+ { key empty$
1238
+ { cite$ #1 #3 substring$ }
1239
+ 'key
1240
+ if$
1241
+ }
1242
+ { author format.lab.names }
1243
+ if$
1244
+ }
1245
+
1246
+ FUNCTION {author.editor.key.label}
1247
+ { author empty$
1248
+ { editor empty$
1249
+ { key empty$
1250
+ { cite$ #1 #3 substring$ }
1251
+ 'key
1252
+ if$
1253
+ }
1254
+ { editor format.lab.names }
1255
+ if$
1256
+ }
1257
+ { author format.lab.names }
1258
+ if$
1259
+ }
1260
+
1261
+ FUNCTION {editor.key.label}
1262
+ { editor empty$
1263
+ { key empty$
1264
+ { cite$ #1 #3 substring$ }
1265
+ 'key
1266
+ if$
1267
+ }
1268
+ { editor format.lab.names }
1269
+ if$
1270
+ }
1271
+
1272
+ FUNCTION {calc.short.authors}
1273
+ { type$ "book" =
1274
+ type$ "inbook" =
1275
+ or
1276
+ 'author.editor.key.label
1277
+ { type$ "proceedings" =
1278
+ 'editor.key.label
1279
+ 'author.key.label
1280
+ if$
1281
+ }
1282
+ if$
1283
+ 'short.list :=
1284
+ }
1285
+
1286
+ FUNCTION {calc.label}
1287
+ { calc.short.authors
1288
+ short.list
1289
+ "("
1290
+ *
1291
+ year duplicate$ empty$
1292
+ short.list key field.or.null = or
1293
+ { pop$ "" }
1294
+ 'skip$
1295
+ if$
1296
+ *
1297
+ 'label :=
1298
+ }
1299
+
1300
+ FUNCTION {sort.format.names}
1301
+ { 's :=
1302
+ #1 'nameptr :=
1303
+ ""
1304
+ s num.names$ 'numnames :=
1305
+ numnames 'namesleft :=
1306
+ { namesleft #0 > }
1307
+ { s nameptr
1308
+ "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}"
1309
+ format.name$ 't :=
1310
+ nameptr #1 >
1311
+ {
1312
+ " " *
1313
+ namesleft #1 = t "others" = and
1314
+ { "zzzzz" 't := }
1315
+ 'skip$
1316
+ if$
1317
+ t sortify *
1318
+ }
1319
+ { t sortify * }
1320
+ if$
1321
+ nameptr #1 + 'nameptr :=
1322
+ namesleft #1 - 'namesleft :=
1323
+ }
1324
+ while$
1325
+ }
1326
+
1327
+ FUNCTION {sort.format.title}
1328
+ { 't :=
1329
+ "A " #2
1330
+ "An " #3
1331
+ "The " #4 t chop.word
1332
+ chop.word
1333
+ chop.word
1334
+ sortify
1335
+ #1 global.max$ substring$
1336
+ }
1337
+ FUNCTION {author.sort}
1338
+ { author empty$
1339
+ { key empty$
1340
+ { "to sort, need author or key in " cite$ * warning$
1341
+ ""
1342
+ }
1343
+ { key sortify }
1344
+ if$
1345
+ }
1346
+ { author sort.format.names }
1347
+ if$
1348
+ }
1349
+ FUNCTION {author.editor.sort}
1350
+ { author empty$
1351
+ { editor empty$
1352
+ { key empty$
1353
+ { "to sort, need author, editor, or key in " cite$ * warning$
1354
+ ""
1355
+ }
1356
+ { key sortify }
1357
+ if$
1358
+ }
1359
+ { editor sort.format.names }
1360
+ if$
1361
+ }
1362
+ { author sort.format.names }
1363
+ if$
1364
+ }
1365
+ FUNCTION {editor.sort}
1366
+ { editor empty$
1367
+ { key empty$
1368
+ { "to sort, need editor or key in " cite$ * warning$
1369
+ ""
1370
+ }
1371
+ { key sortify }
1372
+ if$
1373
+ }
1374
+ { editor sort.format.names }
1375
+ if$
1376
+ }
1377
+ FUNCTION {presort}
1378
+ { calc.label
1379
+ label sortify
1380
+ " "
1381
+ *
1382
+ type$ "book" =
1383
+ type$ "inbook" =
1384
+ or
1385
+ 'author.editor.sort
1386
+ { type$ "proceedings" =
1387
+ 'editor.sort
1388
+ 'author.sort
1389
+ if$
1390
+ }
1391
+ if$
1392
+ #1 entry.max$ substring$
1393
+ 'sort.label :=
1394
+ sort.label
1395
+ *
1396
+ " "
1397
+ *
1398
+ title field.or.null
1399
+ sort.format.title
1400
+ *
1401
+ #1 entry.max$ substring$
1402
+ 'sort.key$ :=
1403
+ }
1404
+
1405
+ ITERATE {presort}
1406
+ SORT
1407
+ STRINGS { last.label next.extra }
1408
+ INTEGERS { last.extra.num last.extra.num.extended last.extra.num.blank number.label }
1409
+ FUNCTION {initialize.extra.label.stuff}
1410
+ { #0 int.to.chr$ 'last.label :=
1411
+ "" 'next.extra :=
1412
+ #0 'last.extra.num :=
1413
+ "a" chr.to.int$ #1 - 'last.extra.num.blank :=
1414
+ last.extra.num.blank 'last.extra.num.extended :=
1415
+ #0 'number.label :=
1416
+ }
1417
+ FUNCTION {forward.pass}
1418
+ { last.label label =
1419
+ { last.extra.num #1 + 'last.extra.num :=
1420
+ last.extra.num "z" chr.to.int$ >
1421
+ { "a" chr.to.int$ 'last.extra.num :=
1422
+ last.extra.num.extended #1 + 'last.extra.num.extended :=
1423
+ }
1424
+ 'skip$
1425
+ if$
1426
+ last.extra.num.extended last.extra.num.blank >
1427
+ { last.extra.num.extended int.to.chr$
1428
+ last.extra.num int.to.chr$
1429
+ * 'extra.label := }
1430
+ { last.extra.num int.to.chr$ 'extra.label := }
1431
+ if$
1432
+ }
1433
+ { "a" chr.to.int$ 'last.extra.num :=
1434
+ "" 'extra.label :=
1435
+ label 'last.label :=
1436
+ }
1437
+ if$
1438
+ number.label #1 + 'number.label :=
1439
+ }
1440
+ FUNCTION {reverse.pass}
1441
+ { next.extra "b" =
1442
+ { "a" 'extra.label := }
1443
+ 'skip$
1444
+ if$
1445
+ extra.label 'next.extra :=
1446
+ extra.label
1447
+ duplicate$ empty$
1448
+ 'skip$
1449
+ { "{\natexlab{" swap$ * "}}" * }
1450
+ if$
1451
+ 'extra.label :=
1452
+ label extra.label * 'label :=
1453
+ }
1454
+ EXECUTE {initialize.extra.label.stuff}
1455
+ ITERATE {forward.pass}
1456
+ REVERSE {reverse.pass}
1457
+ FUNCTION {bib.sort.order}
1458
+ { sort.label
1459
+ " "
1460
+ *
1461
+ year field.or.null sortify
1462
+ *
1463
+ " "
1464
+ *
1465
+ title field.or.null
1466
+ sort.format.title
1467
+ *
1468
+ #1 entry.max$ substring$
1469
+ 'sort.key$ :=
1470
+ }
1471
+ ITERATE {bib.sort.order}
1472
+ SORT
1473
+ FUNCTION {begin.bib}
1474
+ { preamble$ empty$
1475
+ 'skip$
1476
+ { preamble$ write$ newline$ }
1477
+ if$
1478
+ "\begin{thebibliography}{" number.label int.to.str$ * "}" *
1479
+ write$ newline$
1480
+ "\providecommand{\natexlab}[1]{#1}"
1481
+ write$ newline$
1482
+ }
1483
+ EXECUTE {begin.bib}
1484
+ EXECUTE {init.state.consts}
1485
+ ITERATE {call.type$}
1486
+ FUNCTION {end.bib}
1487
+ { newline$
1488
+ "\end{thebibliography}" write$ newline$
1489
+ }
1490
+ EXECUTE {end.bib}
1491
+ %% End of customized bst file
1492
+ %%
1493
+ %% End of file `aaai2026.bst'.