minimap2 0.2.22.0 → 0.2.24.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +60 -76
  3. data/ext/Rakefile +55 -0
  4. data/ext/cmappy/cmappy.c +129 -0
  5. data/ext/cmappy/cmappy.h +44 -0
  6. data/ext/minimap2/FAQ.md +46 -0
  7. data/ext/minimap2/LICENSE.txt +24 -0
  8. data/ext/minimap2/MANIFEST.in +10 -0
  9. data/ext/minimap2/Makefile +132 -0
  10. data/ext/minimap2/Makefile.simde +97 -0
  11. data/ext/minimap2/NEWS.md +821 -0
  12. data/ext/minimap2/README.md +403 -0
  13. data/ext/minimap2/align.c +1020 -0
  14. data/ext/minimap2/bseq.c +169 -0
  15. data/ext/minimap2/bseq.h +64 -0
  16. data/ext/minimap2/code_of_conduct.md +30 -0
  17. data/ext/minimap2/cookbook.md +243 -0
  18. data/ext/minimap2/esterr.c +64 -0
  19. data/ext/minimap2/example.c +63 -0
  20. data/ext/minimap2/format.c +559 -0
  21. data/ext/minimap2/hit.c +466 -0
  22. data/ext/minimap2/index.c +775 -0
  23. data/ext/minimap2/kalloc.c +205 -0
  24. data/ext/minimap2/kalloc.h +76 -0
  25. data/ext/minimap2/kdq.h +132 -0
  26. data/ext/minimap2/ketopt.h +120 -0
  27. data/ext/minimap2/khash.h +615 -0
  28. data/ext/minimap2/krmq.h +474 -0
  29. data/ext/minimap2/kseq.h +256 -0
  30. data/ext/minimap2/ksort.h +153 -0
  31. data/ext/minimap2/ksw2.h +184 -0
  32. data/ext/minimap2/ksw2_dispatch.c +96 -0
  33. data/ext/minimap2/ksw2_extd2_sse.c +402 -0
  34. data/ext/minimap2/ksw2_exts2_sse.c +416 -0
  35. data/ext/minimap2/ksw2_extz2_sse.c +313 -0
  36. data/ext/minimap2/ksw2_ll_sse.c +152 -0
  37. data/ext/minimap2/kthread.c +159 -0
  38. data/ext/minimap2/kthread.h +15 -0
  39. data/ext/minimap2/kvec.h +105 -0
  40. data/ext/minimap2/lchain.c +369 -0
  41. data/ext/minimap2/main.c +459 -0
  42. data/ext/minimap2/map.c +714 -0
  43. data/ext/minimap2/minimap.h +410 -0
  44. data/ext/minimap2/minimap2.1 +725 -0
  45. data/ext/minimap2/misc/README.md +179 -0
  46. data/ext/minimap2/misc/mmphase.js +335 -0
  47. data/ext/minimap2/misc/paftools.js +3149 -0
  48. data/ext/minimap2/misc.c +162 -0
  49. data/ext/minimap2/mmpriv.h +132 -0
  50. data/ext/minimap2/options.c +234 -0
  51. data/ext/minimap2/pe.c +177 -0
  52. data/ext/minimap2/python/README.rst +196 -0
  53. data/ext/minimap2/python/cmappy.h +152 -0
  54. data/ext/minimap2/python/cmappy.pxd +153 -0
  55. data/ext/minimap2/python/mappy.pyx +273 -0
  56. data/ext/minimap2/python/minimap2.py +39 -0
  57. data/ext/minimap2/sdust.c +213 -0
  58. data/ext/minimap2/sdust.h +25 -0
  59. data/ext/minimap2/seed.c +131 -0
  60. data/ext/minimap2/setup.py +55 -0
  61. data/ext/minimap2/sketch.c +143 -0
  62. data/ext/minimap2/splitidx.c +84 -0
  63. data/ext/minimap2/sse2neon/emmintrin.h +1689 -0
  64. data/ext/minimap2/test/MT-human.fa +278 -0
  65. data/ext/minimap2/test/MT-orang.fa +276 -0
  66. data/ext/minimap2/test/q-inv.fa +4 -0
  67. data/ext/minimap2/test/q2.fa +2 -0
  68. data/ext/minimap2/test/t-inv.fa +127 -0
  69. data/ext/minimap2/test/t2.fa +2 -0
  70. data/ext/minimap2/tex/Makefile +21 -0
  71. data/ext/minimap2/tex/bioinfo.cls +930 -0
  72. data/ext/minimap2/tex/blasr-mc.eval +17 -0
  73. data/ext/minimap2/tex/bowtie2-s3.sam.eval +28 -0
  74. data/ext/minimap2/tex/bwa-s3.sam.eval +52 -0
  75. data/ext/minimap2/tex/bwa.eval +55 -0
  76. data/ext/minimap2/tex/eval2roc.pl +33 -0
  77. data/ext/minimap2/tex/graphmap.eval +4 -0
  78. data/ext/minimap2/tex/hs38-simu.sh +10 -0
  79. data/ext/minimap2/tex/minialign.eval +49 -0
  80. data/ext/minimap2/tex/minimap2.bib +460 -0
  81. data/ext/minimap2/tex/minimap2.tex +724 -0
  82. data/ext/minimap2/tex/mm2-s3.sam.eval +62 -0
  83. data/ext/minimap2/tex/mm2-update.tex +240 -0
  84. data/ext/minimap2/tex/mm2.approx.eval +12 -0
  85. data/ext/minimap2/tex/mm2.eval +13 -0
  86. data/ext/minimap2/tex/natbib.bst +1288 -0
  87. data/ext/minimap2/tex/natbib.sty +803 -0
  88. data/ext/minimap2/tex/ngmlr.eval +38 -0
  89. data/ext/minimap2/tex/roc.gp +60 -0
  90. data/ext/minimap2/tex/snap-s3.sam.eval +62 -0
  91. data/ext/minimap2.patch +19 -0
  92. data/lib/minimap2/aligner.rb +4 -4
  93. data/lib/minimap2/alignment.rb +11 -11
  94. data/lib/minimap2/ffi/constants.rb +20 -16
  95. data/lib/minimap2/ffi/functions.rb +5 -0
  96. data/lib/minimap2/ffi.rb +4 -5
  97. data/lib/minimap2/version.rb +2 -2
  98. data/lib/minimap2.rb +51 -15
  99. metadata +97 -79
  100. data/lib/minimap2/ffi_helper.rb +0 -53
  101. data/vendor/libminimap2.so +0 -0
@@ -0,0 +1,1288 @@
1
+ %%
2
+ %% This is file `natbib.bst', generated
3
+ %% on <1994/9/16> with the docstrip utility (2.2h).
4
+ %%
5
+ %% The original source files were:
6
+ %%
7
+ %% genbst.mbs (with options: `ay,nat,seq-lab,nm-rev,dt-beg,yr-par,vol-bf,
8
+ %% volp-com,etal-it')
9
+ %% ----------------------------------------
10
+ %% *** Personal bib style, PWD ***
11
+ %%
12
+ %% (Here are the specifications of the source file)
13
+ %% \ProvidesFile{genbst.mbs}[1994/09/16 1.5 (PWD)]
14
+ %% For use with BibTeX version 0.99a or later
15
+ %% and with LaTeX 2.09 or 2e
16
+ %%-------------------------------------------------------------------
17
+ %% NOTICE:
18
+ %% This file may be used for non-profit purposes.
19
+ %% It may not be distributed in exchange for money,
20
+ %% other than distribution costs.
21
+ %%
22
+ %% The author provides it `as is' and does not guarantee it in any way.
23
+ %%
24
+ %% Copyright (C) 1994 Patrick W. Daly
25
+ %% Max-Planck-Institut f\"ur Aeronomie
26
+ %% Postfach 20
27
+ %% D-37189 Katlenburg-Lindau
28
+ %% Germany
29
+ %%
30
+ %% E-mail:
31
+ %% SPAN-- nsp::linmpi::daly (note nsp also known as ecd1)
32
+ %% Internet-- daly@linmpi.dnet.gwdg.de
33
+ %%-----------------------------------------------------------
34
+ %% \CharacterTable
35
+ %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
36
+ %% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
37
+ %% Digits \0\1\2\3\4\5\6\7\8\9
38
+ %% Exclamation \! Double quote \" Hash (number) \#
39
+ %% Dollar \$ Percent \% Ampersand \&
40
+ %% Acute accent \' Left paren \( Right paren \)
41
+ %% Asterisk \* Plus \+ Comma \,
42
+ %% Minus \- Point \. Solidus \/
43
+ %% Colon \: Semicolon \; Less than \<
44
+ %% Equals \= Greater than \> Question mark \?
45
+ %% Commercial at \@ Left bracket \[ Backslash \\
46
+ %% Right bracket \] Circumflex \^ Underscore \_
47
+ %% Grave accent \` Left brace \{ Vertical bar \|
48
+ %% Right brace \} Tilde \~}
49
+ %%---------------------------------------------------------------------
50
+ % This is an author-year citation style bibliography. As such, it is
51
+ % non-standard LaTeX, and requires a special package file to function properly.
52
+ % Such a package is natbib.sty by Patrick W. Daly
53
+ % The form of the \bibitem entries is
54
+ % \bibitem[Jones et al.(1990)]{key}...
55
+ % \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}...
56
+ % The essential feature is that the label (the part in brackets) consists
57
+ % of the author names, as they should appear in the citation, with the year
58
+ % in parentheses following. There must be no space before the opening
59
+ % parenthesis!
60
+ % With natbib v5.3, a full list of authors may also follow the year.
61
+ % In natbib.sty, it is possible to define the type of enclosures that is
62
+ % really wanted (brackets or parentheses), but in either case, there must
63
+ % be parentheses in the label.
64
+ % The \cite command functions as follows:
65
+ % \cite{key} ==>> Jones et al. (1990)
66
+ % \cite[]{key} ==>> (Jones et al., 1990)
67
+ % \cite[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2)
68
+ % \cite[e.g.][]{key} ==>> (e.g. Jones et al., 1990)
69
+ % \cite[e.g.][p. 32]{key} ==>> (e.g. Jones et al., p. 32)
70
+ % \citeauthor{key} Jones et al.
71
+ % \citefullauthor{key} Jones, Baker, and Smith
72
+ % \citeyear{key} 1990
73
+ %%---------------------------------------------------------------------
74
+
75
+ ENTRY
76
+ { address
77
+ author
78
+ booktitle
79
+ chapter
80
+ edition
81
+ editor
82
+ howpublished
83
+ institution
84
+ journal
85
+ key
86
+ month
87
+ note
88
+ number
89
+ organization
90
+ pages
91
+ publisher
92
+ school
93
+ series
94
+ title
95
+ type
96
+ volume
97
+ year
98
+ }
99
+ {}
100
+ { label extra.label sort.label }
101
+
102
+ INTEGERS { output.state before.all mid.sentence after.sentence after.block }
103
+
104
+ FUNCTION {init.state.consts}
105
+ { #0 'before.all :=
106
+ #1 'mid.sentence :=
107
+ #2 'after.sentence :=
108
+ #3 'after.block :=
109
+ }
110
+
111
+ STRINGS { s t }
112
+
113
+ FUNCTION {output.nonnull}
114
+ { 's :=
115
+ output.state mid.sentence =
116
+ { ", " * write$ }
117
+ { output.state after.block =
118
+ { add.period$ write$
119
+ newline$
120
+ "\newblock " write$
121
+ }
122
+ { output.state before.all =
123
+ 'write$
124
+ { add.period$ " " * write$ }
125
+ if$
126
+ }
127
+ if$
128
+ mid.sentence 'output.state :=
129
+ }
130
+ if$
131
+ s
132
+ }
133
+
134
+ FUNCTION {output}
135
+ { duplicate$ empty$
136
+ 'pop$
137
+ 'output.nonnull
138
+ if$
139
+ }
140
+
141
+ FUNCTION {output.check}
142
+ { 't :=
143
+ duplicate$ empty$
144
+ { pop$ "empty " t * " in " * cite$ * warning$ }
145
+ 'output.nonnull
146
+ if$
147
+ }
148
+
149
+ FUNCTION {fin.entry}
150
+ { add.period$
151
+ write$
152
+ newline$
153
+ }
154
+
155
+ FUNCTION {new.block}
156
+ { output.state before.all =
157
+ 'skip$
158
+ { after.block 'output.state := }
159
+ if$
160
+ }
161
+
162
+ FUNCTION {new.sentence}
163
+ { output.state after.block =
164
+ 'skip$
165
+ { output.state before.all =
166
+ 'skip$
167
+ { after.sentence 'output.state := }
168
+ if$
169
+ }
170
+ if$
171
+ }
172
+
173
+ FUNCTION {not}
174
+ { { #0 }
175
+ { #1 }
176
+ if$
177
+ }
178
+
179
+ FUNCTION {and}
180
+ { 'skip$
181
+ { pop$ #0 }
182
+ if$
183
+ }
184
+
185
+ FUNCTION {or}
186
+ { { pop$ #1 }
187
+ 'skip$
188
+ if$
189
+ }
190
+
191
+ FUNCTION {non.stop}
192
+ { duplicate$
193
+ "}" * add.period$
194
+ #-1 #1 substring$ "." =
195
+ }
196
+
197
+ FUNCTION {new.block.checkb}
198
+ { empty$
199
+ swap$ empty$
200
+ and
201
+ 'skip$
202
+ 'new.block
203
+ if$
204
+ }
205
+
206
+ FUNCTION {field.or.null}
207
+ { duplicate$ empty$
208
+ { pop$ "" }
209
+ 'skip$
210
+ if$
211
+ }
212
+
213
+ FUNCTION {emphasize}
214
+ { duplicate$ empty$
215
+ { pop$ "" }
216
+ { "{\em " swap$ * non.stop
217
+ { "\/}" * }
218
+ { "}" * }
219
+ if$
220
+ }
221
+ if$
222
+ }
223
+
224
+ FUNCTION {bolden}
225
+ { duplicate$ empty$
226
+ { pop$ "" }
227
+ { "{\bf " swap$ * "}" * }
228
+ if$
229
+ }
230
+
231
+ INTEGERS { nameptr namesleft numnames }
232
+
233
+ FUNCTION {format.names}
234
+ { 's :=
235
+ #1 'nameptr :=
236
+ s num.names$ 'numnames :=
237
+ numnames 'namesleft :=
238
+ { namesleft #0 > }
239
+ { s nameptr
240
+ "{vv~}{ll}{, jj}{, f.}" format.name$ 't :=
241
+ nameptr #1 >
242
+ {
243
+ namesleft #1 >
244
+ { ", " * t * }
245
+ {
246
+ numnames #2 >
247
+ { "," * }
248
+ 'skip$
249
+ if$
250
+ t "others" =
251
+ { " " * "et~al." emphasize * }
252
+ { " and " * t * }
253
+ if$
254
+ }
255
+ if$
256
+ }
257
+ 't
258
+ if$
259
+ nameptr #1 + 'nameptr :=
260
+ namesleft #1 - 'namesleft :=
261
+ }
262
+ while$
263
+ }
264
+
265
+ FUNCTION {format.names.ed}
266
+ { 's :=
267
+ #1 'nameptr :=
268
+ s num.names$ 'numnames :=
269
+ numnames 'namesleft :=
270
+ { namesleft #0 > }
271
+ { s nameptr
272
+ "{f.~}{vv~}{ll}{, jj}"
273
+ format.name$ 't :=
274
+ nameptr #1 >
275
+ {
276
+ namesleft #1 >
277
+ { ", " * t * }
278
+ {
279
+ numnames #2 >
280
+ { "," * }
281
+ 'skip$
282
+ if$
283
+ t "others" =
284
+ { " " * "et~al." emphasize * }
285
+ { " and " * t * }
286
+ if$
287
+ }
288
+ if$
289
+ }
290
+ 't
291
+ if$
292
+ nameptr #1 + 'nameptr :=
293
+ namesleft #1 - 'namesleft :=
294
+ }
295
+ while$
296
+ }
297
+
298
+ FUNCTION {format.key}
299
+ { empty$
300
+ { key field.or.null }
301
+ { "" }
302
+ if$
303
+ }
304
+
305
+ FUNCTION {format.authors}
306
+ { author empty$
307
+ { "" }
308
+ { author format.names }
309
+ if$
310
+ }
311
+
312
+ FUNCTION {format.editors}
313
+ { editor empty$
314
+ { "" }
315
+ { editor format.names
316
+ editor num.names$ #1 >
317
+ { ", editors" * }
318
+ { ", editor" * }
319
+ if$
320
+ }
321
+ if$
322
+ }
323
+
324
+ FUNCTION {format.in.editors}
325
+ { editor empty$
326
+ { "" }
327
+ { editor format.names.ed
328
+ editor num.names$ #1 >
329
+ { ", editors" * }
330
+ { ", editor" * }
331
+ if$
332
+ }
333
+ if$
334
+ }
335
+
336
+ FUNCTION {format.title}
337
+ { title empty$
338
+ { "" }
339
+ { title "t" change.case$
340
+ }
341
+ if$
342
+ }
343
+
344
+ FUNCTION {format.full.names}
345
+ {'s :=
346
+ #1 'nameptr :=
347
+ s num.names$ 'numnames :=
348
+ numnames 'namesleft :=
349
+ { namesleft #0 > }
350
+ { s nameptr
351
+ "{vv~}{ll}" format.name$ 't :=
352
+ nameptr #1 >
353
+ {
354
+ namesleft #1 >
355
+ { ", " * t * }
356
+ {
357
+ numnames #2 >
358
+ { "," * }
359
+ 'skip$
360
+ if$
361
+ t "others" =
362
+ { " " * "et~al." emphasize * }
363
+ { " and " * t * }
364
+ if$
365
+ }
366
+ if$
367
+ }
368
+ 't
369
+ if$
370
+ nameptr #1 + 'nameptr :=
371
+ namesleft #1 - 'namesleft :=
372
+ }
373
+ while$
374
+ }
375
+
376
+ FUNCTION {author.editor.key.full}
377
+ { author empty$
378
+ { editor empty$
379
+ { key empty$
380
+ { cite$ #1 #3 substring$ }
381
+ 'key
382
+ if$
383
+ }
384
+ { editor format.full.names }
385
+ if$
386
+ }
387
+ { author format.full.names }
388
+ if$
389
+ }
390
+
391
+ FUNCTION {author.key.full}
392
+ { author empty$
393
+ { key empty$
394
+ { cite$ #1 #3 substring$ }
395
+ 'key
396
+ if$
397
+ }
398
+ { author format.full.names }
399
+ if$
400
+ }
401
+
402
+ FUNCTION {editor.key.full}
403
+ { editor empty$
404
+ { key empty$
405
+ { cite$ #1 #3 substring$ }
406
+ 'key
407
+ if$
408
+ }
409
+ { editor format.full.names }
410
+ if$
411
+ }
412
+
413
+ FUNCTION {make.full.names}
414
+ { type$ "book" =
415
+ type$ "inbook" =
416
+ or
417
+ 'author.editor.key.full
418
+ { type$ "proceedings" =
419
+ 'editor.key.full
420
+ 'author.key.full
421
+ if$
422
+ }
423
+ if$
424
+ }
425
+
426
+ FUNCTION {output.bibitem}
427
+ { newline$
428
+ "\bibitem[" write$
429
+ label write$
430
+ ")" make.full.names * "]{" * write$
431
+ cite$ write$
432
+ "}" write$
433
+ newline$
434
+ ""
435
+ before.all 'output.state :=
436
+ }
437
+
438
+ FUNCTION {n.dashify}
439
+ { 't :=
440
+ ""
441
+ { t empty$ not }
442
+ { t #1 #1 substring$ "-" =
443
+ { t #1 #2 substring$ "--" = not
444
+ { "--" *
445
+ t #2 global.max$ substring$ 't :=
446
+ }
447
+ { { t #1 #1 substring$ "-" = }
448
+ { "-" *
449
+ t #2 global.max$ substring$ 't :=
450
+ }
451
+ while$
452
+ }
453
+ if$
454
+ }
455
+ { t #1 #1 substring$ *
456
+ t #2 global.max$ substring$ 't :=
457
+ }
458
+ if$
459
+ }
460
+ while$
461
+ }
462
+
463
+ FUNCTION {word.in}
464
+ { "In " }
465
+
466
+ FUNCTION {format.date}
467
+ { year duplicate$ empty$
468
+ { "empty year in " cite$ * "; set to ????" * warning$
469
+ pop$ "????" }
470
+ 'skip$
471
+ if$
472
+ before.all 'output.state :=
473
+ " (" swap$ * extra.label * ")" *
474
+ }
475
+
476
+ FUNCTION {format.btitle}
477
+ { title emphasize
478
+ }
479
+
480
+ FUNCTION {tie.or.space.connect}
481
+ { duplicate$ text.length$ #3 <
482
+ { "~" }
483
+ { " " }
484
+ if$
485
+ swap$ * *
486
+ }
487
+
488
+ FUNCTION {either.or.check}
489
+ { empty$
490
+ 'pop$
491
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
492
+ if$
493
+ }
494
+
495
+ FUNCTION {format.bvolume}
496
+ { volume empty$
497
+ { "" }
498
+ { "volume" volume tie.or.space.connect
499
+ series empty$
500
+ 'skip$
501
+ { " of " * series emphasize * }
502
+ if$
503
+ "volume and number" number either.or.check
504
+ }
505
+ if$
506
+ }
507
+
508
+ FUNCTION {format.number.series}
509
+ { volume empty$
510
+ { number empty$
511
+ { series field.or.null }
512
+ { output.state mid.sentence =
513
+ { "number" }
514
+ { "Number" }
515
+ if$
516
+ number tie.or.space.connect
517
+ series empty$
518
+ { "there's a number but no series in " cite$ * warning$ }
519
+ { " in " * series * }
520
+ if$
521
+ }
522
+ if$
523
+ }
524
+ { "" }
525
+ if$
526
+ }
527
+
528
+ FUNCTION {format.edition}
529
+ { edition empty$
530
+ { "" }
531
+ { output.state mid.sentence =
532
+ { edition "l" change.case$ " edition" * }
533
+ { edition "t" change.case$ " edition" * }
534
+ if$
535
+ }
536
+ if$
537
+ }
538
+
539
+ INTEGERS { multiresult }
540
+
541
+ FUNCTION {multi.page.check}
542
+ { 't :=
543
+ #0 'multiresult :=
544
+ { multiresult not
545
+ t empty$ not
546
+ and
547
+ }
548
+ { t #1 #1 substring$
549
+ duplicate$ "-" =
550
+ swap$ duplicate$ "," =
551
+ swap$ "+" =
552
+ or or
553
+ { #1 'multiresult := }
554
+ { t #2 global.max$ substring$ 't := }
555
+ if$
556
+ }
557
+ while$
558
+ multiresult
559
+ }
560
+
561
+ FUNCTION {format.pages}
562
+ { pages empty$
563
+ { "" }
564
+ { pages multi.page.check
565
+ { "pages" pages n.dashify tie.or.space.connect }
566
+ { "page" pages tie.or.space.connect }
567
+ if$
568
+ }
569
+ if$
570
+ }
571
+
572
+ FUNCTION {format.vol.num.pages}
573
+ { volume field.or.null
574
+ bolden
575
+ number empty$
576
+ 'skip$
577
+ { "(" number * ")" * *
578
+ volume empty$
579
+ { "there's a number but no volume in " cite$ * warning$ }
580
+ 'skip$
581
+ if$
582
+ }
583
+ if$
584
+ pages empty$
585
+ 'skip$
586
+ { duplicate$ empty$
587
+ { pop$ format.pages }
588
+ { ", " * pages n.dashify * }
589
+ if$
590
+ }
591
+ if$
592
+ }
593
+
594
+ FUNCTION {format.chapter.pages}
595
+ { chapter empty$
596
+ 'format.pages
597
+ { type empty$
598
+ { "chapter" }
599
+ { type "l" change.case$ }
600
+ if$
601
+ chapter tie.or.space.connect
602
+ pages empty$
603
+ 'skip$
604
+ { ", " * format.pages * }
605
+ if$
606
+ }
607
+ if$
608
+ }
609
+
610
+ FUNCTION {format.in.ed.booktitle}
611
+ { booktitle empty$
612
+ { "" }
613
+ { editor empty$
614
+ { word.in booktitle emphasize * }
615
+ { word.in format.in.editors * ", " * booktitle emphasize * }
616
+ if$
617
+ }
618
+ if$
619
+ }
620
+
621
+ FUNCTION {format.thesis.type}
622
+ { type empty$
623
+ 'skip$
624
+ { pop$
625
+ type "t" change.case$
626
+ }
627
+ if$
628
+ }
629
+
630
+ FUNCTION {format.tr.number}
631
+ { type empty$
632
+ { "Technical Report" }
633
+ 'type
634
+ if$
635
+ number empty$
636
+ { "t" change.case$ }
637
+ { number tie.or.space.connect }
638
+ if$
639
+ }
640
+
641
+ FUNCTION {format.article.crossref}
642
+ {
643
+ word.in
644
+ "\cite{" * crossref * "}" *
645
+ }
646
+
647
+ FUNCTION {format.book.crossref}
648
+ { volume empty$
649
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
650
+ word.in
651
+ }
652
+ { "Volume" volume tie.or.space.connect
653
+ " of " *
654
+ }
655
+ if$
656
+ "\cite{" * crossref * "}" *
657
+ }
658
+
659
+ FUNCTION {format.incoll.inproc.crossref}
660
+ {
661
+ word.in
662
+ "\cite{" * crossref * "}" *
663
+ }
664
+
665
+ FUNCTION {article}
666
+ { output.bibitem
667
+ format.authors "author" output.check
668
+ author format.key output
669
+ format.date "year" output.check
670
+ new.block
671
+ format.title "title" output.check
672
+ new.block
673
+ crossref missing$
674
+ { journal emphasize "journal" output.check
675
+ format.vol.num.pages output
676
+ }
677
+ { format.article.crossref output.nonnull
678
+ format.pages output
679
+ }
680
+ if$
681
+ new.block
682
+ note output
683
+ fin.entry
684
+ }
685
+
686
+ FUNCTION {book}
687
+ { output.bibitem
688
+ author empty$
689
+ { format.editors "author and editor" output.check
690
+ editor format.key output
691
+ }
692
+ { format.authors output.nonnull
693
+ crossref missing$
694
+ { "author and editor" editor either.or.check }
695
+ 'skip$
696
+ if$
697
+ }
698
+ if$
699
+ format.date "year" output.check
700
+ new.block
701
+ format.btitle "title" output.check
702
+ crossref missing$
703
+ { format.bvolume output
704
+ new.block
705
+ format.number.series output
706
+ new.sentence
707
+ publisher "publisher" output.check
708
+ address output
709
+ }
710
+ {
711
+ new.block
712
+ format.book.crossref output.nonnull
713
+ }
714
+ if$
715
+ format.edition output
716
+ new.block
717
+ note output
718
+ fin.entry
719
+ }
720
+
721
+ FUNCTION {booklet}
722
+ { output.bibitem
723
+ format.authors output
724
+ author format.key output
725
+ format.date "year" output.check
726
+ new.block
727
+ format.title "title" output.check
728
+ new.block
729
+ howpublished output
730
+ address output
731
+ new.block
732
+ note output
733
+ fin.entry
734
+ }
735
+
736
+ FUNCTION {inbook}
737
+ { output.bibitem
738
+ author empty$
739
+ { format.editors "author and editor" output.check
740
+ editor format.key output
741
+ }
742
+ { format.authors output.nonnull
743
+ crossref missing$
744
+ { "author and editor" editor either.or.check }
745
+ 'skip$
746
+ if$
747
+ }
748
+ if$
749
+ format.date "year" output.check
750
+ new.block
751
+ format.btitle "title" output.check
752
+ crossref missing$
753
+ { format.bvolume output
754
+ format.chapter.pages "chapter and pages" output.check
755
+ new.block
756
+ format.number.series output
757
+ new.sentence
758
+ publisher "publisher" output.check
759
+ address output
760
+ }
761
+ { format.chapter.pages "chapter and pages" output.check
762
+ new.block
763
+ format.book.crossref output.nonnull
764
+ }
765
+ if$
766
+ format.edition output
767
+ new.block
768
+ note output
769
+ fin.entry
770
+ }
771
+
772
+ FUNCTION {incollection}
773
+ { output.bibitem
774
+ format.authors "author" output.check
775
+ author format.key output
776
+ format.date "year" output.check
777
+ new.block
778
+ format.title "title" output.check
779
+ new.block
780
+ crossref missing$
781
+ { format.in.ed.booktitle "booktitle" output.check
782
+ format.bvolume output
783
+ format.number.series output
784
+ format.chapter.pages output
785
+ new.sentence
786
+ publisher "publisher" output.check
787
+ address output
788
+ format.edition output
789
+ }
790
+ { format.incoll.inproc.crossref output.nonnull
791
+ format.chapter.pages output
792
+ }
793
+ if$
794
+ new.block
795
+ note output
796
+ fin.entry
797
+ }
798
+
799
+ FUNCTION {inproceedings}
800
+ { output.bibitem
801
+ format.authors "author" output.check
802
+ author format.key output
803
+ format.date "year" output.check
804
+ new.block
805
+ format.title "title" output.check
806
+ new.block
807
+ crossref missing$
808
+ { format.in.ed.booktitle "booktitle" output.check
809
+ format.bvolume output
810
+ format.number.series output
811
+ format.pages output
812
+ address output
813
+ new.sentence
814
+ organization output
815
+ publisher output
816
+ }
817
+ { format.incoll.inproc.crossref output.nonnull
818
+ format.pages output
819
+ }
820
+ if$
821
+ new.block
822
+ note output
823
+ fin.entry
824
+ }
825
+
826
+ FUNCTION {conference} { inproceedings }
827
+
828
+ FUNCTION {manual}
829
+ { output.bibitem
830
+ format.authors output
831
+ author format.key output
832
+ format.date "year" output.check
833
+ new.block
834
+ format.btitle "title" output.check
835
+ organization address new.block.checkb
836
+ organization output
837
+ address output
838
+ format.edition output
839
+ new.block
840
+ note output
841
+ fin.entry
842
+ }
843
+
844
+ FUNCTION {mastersthesis}
845
+ { output.bibitem
846
+ format.authors "author" output.check
847
+ author format.key output
848
+ format.date "year" output.check
849
+ new.block
850
+ format.btitle "title" output.check
851
+ new.block
852
+ "Master's thesis" format.thesis.type output.nonnull
853
+ school "school" output.check
854
+ address output
855
+ new.block
856
+ note output
857
+ fin.entry
858
+ }
859
+
860
+ FUNCTION {misc}
861
+ { output.bibitem
862
+ format.authors output
863
+ author format.key output
864
+ format.date "year" output.check
865
+ new.block
866
+ format.title output
867
+ new.block
868
+ howpublished output
869
+ new.block
870
+ note output
871
+ fin.entry
872
+ }
873
+
874
+ FUNCTION {phdthesis}
875
+ { output.bibitem
876
+ format.authors "author" output.check
877
+ author format.key output
878
+ format.date "year" output.check
879
+ new.block
880
+ format.btitle "title" output.check
881
+ new.block
882
+ "Ph.D. thesis" format.thesis.type output.nonnull
883
+ school "school" output.check
884
+ address output
885
+ new.block
886
+ note output
887
+ fin.entry
888
+ }
889
+
890
+ FUNCTION {proceedings}
891
+ { output.bibitem
892
+ format.editors output
893
+ editor format.key output
894
+ format.date "year" output.check
895
+ new.block
896
+ format.btitle "title" output.check
897
+ format.bvolume output
898
+ format.number.series output
899
+ address output
900
+ new.sentence
901
+ organization output
902
+ publisher output
903
+ new.block
904
+ note output
905
+ fin.entry
906
+ }
907
+
908
+ FUNCTION {techreport}
909
+ { output.bibitem
910
+ format.authors "author" output.check
911
+ author format.key output
912
+ format.date "year" output.check
913
+ new.block
914
+ format.title "title" output.check
915
+ new.block
916
+ format.tr.number output.nonnull
917
+ institution "institution" output.check
918
+ address output
919
+ new.block
920
+ note output
921
+ fin.entry
922
+ }
923
+
924
+ FUNCTION {unpublished}
925
+ { output.bibitem
926
+ format.authors "author" output.check
927
+ author format.key output
928
+ format.date "year" output.check
929
+ new.block
930
+ format.title "title" output.check
931
+ new.block
932
+ note "note" output.check
933
+ fin.entry
934
+ }
935
+
936
+ FUNCTION {default.type} { misc }
937
+
938
+ MACRO {jan} {"January"}
939
+
940
+ MACRO {feb} {"February"}
941
+
942
+ MACRO {mar} {"March"}
943
+
944
+ MACRO {apr} {"April"}
945
+
946
+ MACRO {may} {"May"}
947
+
948
+ MACRO {jun} {"June"}
949
+
950
+ MACRO {jul} {"July"}
951
+
952
+ MACRO {aug} {"August"}
953
+
954
+ MACRO {sep} {"September"}
955
+
956
+ MACRO {oct} {"October"}
957
+
958
+ MACRO {nov} {"November"}
959
+
960
+ MACRO {dec} {"December"}
961
+
962
+ MACRO {acmcs} {"ACM Computing Surveys"}
963
+
964
+ MACRO {acta} {"Acta Informatica"}
965
+
966
+ MACRO {cacm} {"Communications of the ACM"}
967
+
968
+ MACRO {ibmjrd} {"IBM Journal of Research and Development"}
969
+
970
+ MACRO {ibmsj} {"IBM Systems Journal"}
971
+
972
+ MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
973
+
974
+ MACRO {ieeetc} {"IEEE Transactions on Computers"}
975
+
976
+ MACRO {ieeetcad}
977
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
978
+
979
+ MACRO {ipl} {"Information Processing Letters"}
980
+
981
+ MACRO {jacm} {"Journal of the ACM"}
982
+
983
+ MACRO {jcss} {"Journal of Computer and System Sciences"}
984
+
985
+ MACRO {scp} {"Science of Computer Programming"}
986
+
987
+ MACRO {sicomp} {"SIAM Journal on Computing"}
988
+
989
+ MACRO {tocs} {"ACM Transactions on Computer Systems"}
990
+
991
+ MACRO {tods} {"ACM Transactions on Database Systems"}
992
+
993
+ MACRO {tog} {"ACM Transactions on Graphics"}
994
+
995
+ MACRO {toms} {"ACM Transactions on Mathematical Software"}
996
+
997
+ MACRO {toois} {"ACM Transactions on Office Information Systems"}
998
+
999
+ MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
1000
+
1001
+ MACRO {tcs} {"Theoretical Computer Science"}
1002
+
1003
+ READ
1004
+
1005
+ FUNCTION {sortify}
1006
+ { purify$
1007
+ "l" change.case$
1008
+ }
1009
+
1010
+ INTEGERS { len }
1011
+
1012
+ FUNCTION {chop.word}
1013
+ { 's :=
1014
+ 'len :=
1015
+ s #1 len substring$ =
1016
+ { s len #1 + global.max$ substring$ }
1017
+ 's
1018
+ if$
1019
+ }
1020
+
1021
+ FUNCTION {format.lab.names}
1022
+ { 's :=
1023
+ s #1 "{vv~}{ll}" format.name$
1024
+ s num.names$ duplicate$
1025
+ #2 >
1026
+ { pop$ " " * "et~al." emphasize * }
1027
+ { #2 <
1028
+ 'skip$
1029
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
1030
+ { " " * "et~al." emphasize * }
1031
+ { " and " * s #2 "{vv~}{ll}" format.name$ * }
1032
+ if$
1033
+ }
1034
+ if$
1035
+ }
1036
+ if$
1037
+ }
1038
+
1039
+ FUNCTION {author.key.label}
1040
+ { author empty$
1041
+ { key empty$
1042
+ { cite$ #1 #3 substring$ }
1043
+ 'key
1044
+ if$
1045
+ }
1046
+ { author format.lab.names }
1047
+ if$
1048
+ }
1049
+
1050
+ FUNCTION {author.editor.key.label}
1051
+ { author empty$
1052
+ { editor empty$
1053
+ { key empty$
1054
+ { cite$ #1 #3 substring$ }
1055
+ 'key
1056
+ if$
1057
+ }
1058
+ { editor format.lab.names }
1059
+ if$
1060
+ }
1061
+ { author format.lab.names }
1062
+ if$
1063
+ }
1064
+
1065
+ FUNCTION {editor.key.label}
1066
+ { editor empty$
1067
+ { key empty$
1068
+ { cite$ #1 #3 substring$ }
1069
+ 'key
1070
+ if$
1071
+ }
1072
+ { editor format.lab.names }
1073
+ if$
1074
+ }
1075
+
1076
+ FUNCTION {calc.label}
1077
+ { type$ "book" =
1078
+ type$ "inbook" =
1079
+ or
1080
+ 'author.editor.key.label
1081
+ { type$ "proceedings" =
1082
+ 'editor.key.label
1083
+ 'author.key.label
1084
+ if$
1085
+ }
1086
+ if$
1087
+ "("
1088
+ *
1089
+ year duplicate$ empty$
1090
+ { pop$ "????" }
1091
+ { purify$ #-1 #4 substring$ }
1092
+ if$
1093
+ *
1094
+ 'label :=
1095
+ }
1096
+
1097
+ FUNCTION {sort.format.names}
1098
+ { 's :=
1099
+ #1 'nameptr :=
1100
+ ""
1101
+ s num.names$ 'numnames :=
1102
+ numnames 'namesleft :=
1103
+ { namesleft #0 > }
1104
+ { nameptr #1 >
1105
+ { " " * }
1106
+ 'skip$
1107
+ if$
1108
+ s nameptr
1109
+ "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}"
1110
+ format.name$ 't :=
1111
+ nameptr numnames = t "others" = and
1112
+ { "et al" * }
1113
+ { numnames #2 > nameptr #2 = and
1114
+ { "zzzzzz" * #1 'namesleft := }
1115
+ { t sortify * }
1116
+ if$
1117
+ }
1118
+ if$
1119
+ nameptr #1 + 'nameptr :=
1120
+ namesleft #1 - 'namesleft :=
1121
+ }
1122
+ while$
1123
+ }
1124
+
1125
+ FUNCTION {sort.format.title}
1126
+ { 't :=
1127
+ "A " #2
1128
+ "An " #3
1129
+ "The " #4 t chop.word
1130
+ chop.word
1131
+ chop.word
1132
+ sortify
1133
+ #1 global.max$ substring$
1134
+ }
1135
+
1136
+ FUNCTION {author.sort}
1137
+ { author empty$
1138
+ { key empty$
1139
+ { "to sort, need author or key in " cite$ * warning$
1140
+ ""
1141
+ }
1142
+ { key sortify }
1143
+ if$
1144
+ }
1145
+ { author sort.format.names }
1146
+ if$
1147
+ }
1148
+
1149
+ FUNCTION {author.editor.sort}
1150
+ { author empty$
1151
+ { editor empty$
1152
+ { key empty$
1153
+ { "to sort, need author, editor, or key in " cite$ * warning$
1154
+ ""
1155
+ }
1156
+ { key sortify }
1157
+ if$
1158
+ }
1159
+ { editor sort.format.names }
1160
+ if$
1161
+ }
1162
+ { author sort.format.names }
1163
+ if$
1164
+ }
1165
+
1166
+ FUNCTION {editor.sort}
1167
+ { editor empty$
1168
+ { key empty$
1169
+ { "to sort, need editor or key in " cite$ * warning$
1170
+ ""
1171
+ }
1172
+ { key sortify }
1173
+ if$
1174
+ }
1175
+ { editor sort.format.names }
1176
+ if$
1177
+ }
1178
+
1179
+ FUNCTION {presort}
1180
+ { calc.label
1181
+ label sortify
1182
+ " "
1183
+ *
1184
+ type$ "book" =
1185
+ type$ "inbook" =
1186
+ or
1187
+ 'author.editor.sort
1188
+ { type$ "proceedings" =
1189
+ 'editor.sort
1190
+ 'author.sort
1191
+ if$
1192
+ }
1193
+ if$
1194
+ #1 entry.max$ substring$
1195
+ 'sort.label :=
1196
+ sort.label
1197
+ *
1198
+ " "
1199
+ *
1200
+ title field.or.null
1201
+ sort.format.title
1202
+ *
1203
+ #1 entry.max$ substring$
1204
+ 'sort.key$ :=
1205
+ }
1206
+
1207
+ ITERATE {presort}
1208
+
1209
+ SORT
1210
+
1211
+ STRINGS { last.label next.extra }
1212
+
1213
+ INTEGERS { last.extra.num }
1214
+
1215
+ FUNCTION {initialize.extra.label.stuff}
1216
+ { #0 int.to.chr$ 'last.label :=
1217
+ "" 'next.extra :=
1218
+ #0 'last.extra.num :=
1219
+ }
1220
+
1221
+ FUNCTION {forward.pass}
1222
+ { last.label label =
1223
+ { last.extra.num #1 + 'last.extra.num :=
1224
+ last.extra.num int.to.chr$ 'extra.label :=
1225
+ }
1226
+ { "a" chr.to.int$ 'last.extra.num :=
1227
+ "" 'extra.label :=
1228
+ label 'last.label :=
1229
+ }
1230
+ if$
1231
+ }
1232
+
1233
+ FUNCTION {reverse.pass}
1234
+ { next.extra "b" =
1235
+ { "a" 'extra.label := }
1236
+ 'skip$
1237
+ if$
1238
+ extra.label 'next.extra :=
1239
+ label extra.label * 'label :=
1240
+ }
1241
+
1242
+ EXECUTE {initialize.extra.label.stuff}
1243
+
1244
+ ITERATE {forward.pass}
1245
+
1246
+ REVERSE {reverse.pass}
1247
+
1248
+ FUNCTION {bib.sort.order}
1249
+ { sort.label
1250
+ " "
1251
+ *
1252
+ year field.or.null sortify
1253
+ *
1254
+ " "
1255
+ *
1256
+ title field.or.null
1257
+ sort.format.title
1258
+ *
1259
+ #1 entry.max$ substring$
1260
+ 'sort.key$ :=
1261
+ }
1262
+
1263
+ ITERATE {bib.sort.order}
1264
+
1265
+ SORT
1266
+
1267
+ FUNCTION {begin.bib}
1268
+ { preamble$ empty$
1269
+ 'skip$
1270
+ { preamble$ write$ newline$ }
1271
+ if$
1272
+ "\begin{thebibliography}{}" write$ newline$
1273
+ }
1274
+
1275
+ EXECUTE {begin.bib}
1276
+
1277
+ EXECUTE {init.state.consts}
1278
+
1279
+ ITERATE {call.type$}
1280
+
1281
+ FUNCTION {end.bib}
1282
+ { newline$
1283
+ "\end{thebibliography}" write$ newline$
1284
+ }
1285
+
1286
+ EXECUTE {end.bib}
1287
+ %% End of customized bst file
1288
+