galaaz 0.4.10 → 2.0.0

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 (391) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +26 -0
  3. data/LICENSE +0 -0
  4. data/README.md +3123 -882
  5. data/Rakefile +62 -41
  6. data/bin/galaaz-bootstrap +137 -0
  7. data/bin/galaaz-jruby +14 -0
  8. data/bin/galaaz_jruby_env.inc.sh +6 -0
  9. data/bin/gbookdown +64 -0
  10. data/bin/gknit +223 -6
  11. data/bin/gknit-draft +105 -0
  12. data/bin/gknit-draft.rb +28 -0
  13. data/bin/gknit_Rscript +127 -0
  14. data/bin/grun +27 -1
  15. data/bin/gstudio +49 -4
  16. data/bin/{gstudio.rb → gstudio_irb.rb} +0 -0
  17. data/bin/gstudio_pry.rb +7 -0
  18. data/bin/install-tinytex +6 -0
  19. data/bin/run_all_rspec +43 -0
  20. data/bin/run_example +14 -0
  21. data/bin/run_old_rspec +19 -0
  22. data/bin/run_rspec +23 -0
  23. data/bin/run_rspec_subset +38 -0
  24. data/bin/run_slow_rspec +19 -0
  25. data/blogs/R-on-Rails-Planning-Document.md +940 -0
  26. data/blogs/README.md +100 -0
  27. data/blogs/galaaz_ggplot/galaaz_ggplot.Rmd +38 -66
  28. data/blogs/galaaz_ggplot/galaaz_ggplot.log +754 -0
  29. data/blogs/galaaz_ggplot/galaaz_ggplot.md +364 -0
  30. data/blogs/galaaz_ggplot/galaaz_ggplot.tex +607 -0
  31. data/blogs/galaaz_ggplot/galaaz_ggplot_files/figure-html/midwest_rb.png +0 -0
  32. data/blogs/galaaz_ggplot/galaaz_ggplot_files/figure-html/scatter_plot_rb.png +0 -0
  33. data/blogs/galaaz_ggplot/galaaz_ggplot_files/figure-markdown_github/midwest_rb.png +0 -0
  34. data/blogs/galaaz_ggplot/galaaz_ggplot_files/figure-markdown_github/scatter_plot_rb.png +0 -0
  35. data/blogs/galaaz_ggplot/midwest.Rmd +3 -3
  36. data/blogs/galaaz_ggplot/midwest_external_png +0 -0
  37. data/blogs/gknit/gknit.Rmd +52 -55
  38. data/blogs/gknit/gknit.md +94 -94
  39. data/blogs/gknit/gknit_files/figure-html/bubble-1.png +0 -0
  40. data/blogs/gknit/gknit_files/figure-html/diverging_bar.png +0 -0
  41. data/blogs/gknit/lst.rds +0 -0
  42. data/blogs/gknit/model.rb +1 -1
  43. data/blogs/gknit/stats.bib +0 -0
  44. data/blogs/manual/include_model_local_repro.Rmd +14 -0
  45. data/blogs/manual/include_model_local_repro.md +75 -0
  46. data/blogs/manual/lst.rds +0 -0
  47. data/blogs/manual/manual.Rmd +1582 -196
  48. data/blogs/manual/manual.log +1786 -0
  49. data/blogs/manual/manual.md +3107 -890
  50. data/blogs/manual/manual.tex +3018 -1086
  51. data/blogs/manual/manual_files/figure-html/bubble-1.png +0 -0
  52. data/blogs/manual/manual_files/figure-html/diverging_bar.png +0 -0
  53. data/blogs/manual/manual_files/figure-latex/bubble-1.png +0 -0
  54. data/blogs/manual/model.rb +41 -0
  55. data/blogs/nse_dplyr/nse_dplyr.Rmd +277 -151
  56. data/blogs/nse_dplyr/nse_dplyr.log +928 -0
  57. data/blogs/nse_dplyr/nse_dplyr.md +457 -293
  58. data/blogs/oh_my/not_so.rb +0 -0
  59. data/blogs/oh_my/oh_my.Rmd +1234 -25
  60. data/blogs/oh_my/oh_my.log +804 -0
  61. data/blogs/oh_my/oh_my.md +1808 -228
  62. data/blogs/oh_my/oh_my.tex +821 -0
  63. data/blogs/oh_my/old.Rmd +15 -14
  64. data/blogs/ruby_plot/ruby_plot.Rmd +58 -82
  65. data/blogs/ruby_plot/ruby_plot.log +885 -0
  66. data/blogs/ruby_plot/ruby_plot.md +71 -103
  67. data/blogs/ruby_plot/ruby_plot.tex +940 -0
  68. data/blogs/ruby_plot/ruby_plot_files/figure-html/dose_len.png +0 -0
  69. data/blogs/ruby_plot/ruby_plot_files/figure-html/facet_by_delivery.png +0 -0
  70. data/blogs/ruby_plot/ruby_plot_files/figure-html/facet_by_dose.png +0 -0
  71. data/blogs/ruby_plot/ruby_plot_files/figure-html/facets_by_delivery_color.png +0 -0
  72. data/blogs/ruby_plot/ruby_plot_files/figure-html/facets_by_delivery_color2.png +0 -0
  73. data/blogs/ruby_plot/ruby_plot_files/figure-html/facets_with_decorations.png +0 -0
  74. data/blogs/ruby_plot/ruby_plot_files/figure-html/facets_with_jitter.png +0 -0
  75. data/blogs/ruby_plot/ruby_plot_files/figure-html/facets_with_points.png +0 -0
  76. data/blogs/ruby_plot/ruby_plot_files/figure-html/final_box_plot.png +0 -0
  77. data/blogs/ruby_plot/ruby_plot_files/figure-html/final_violin_plot.png +0 -0
  78. data/blogs/ruby_plot/ruby_plot_files/figure-html/violin_with_jitter.png +0 -0
  79. data/blogs/ruby_plot/ruby_plot_files/figure-latex/dose_len.png +0 -0
  80. data/blogs/ruby_plot/ruby_plot_files/figure-latex/facet_by_delivery.png +0 -0
  81. data/blogs/ruby_plot/ruby_plot_files/figure-latex/facet_by_dose.png +0 -0
  82. data/blogs/ruby_plot/ruby_plot_files/figure-latex/facets_by_delivery_color.png +0 -0
  83. data/blogs/ruby_plot/ruby_plot_files/figure-latex/facets_by_delivery_color2.png +0 -0
  84. data/blogs/ruby_plot/ruby_plot_files/figure-latex/facets_with_decorations.png +0 -0
  85. data/blogs/ruby_plot/ruby_plot_files/figure-latex/facets_with_jitter.png +0 -0
  86. data/blogs/ruby_plot/ruby_plot_files/figure-latex/facets_with_points.png +0 -0
  87. data/blogs/ruby_plot/ruby_plot_files/figure-latex/final_box_plot.png +0 -0
  88. data/blogs/ruby_plot/ruby_plot_files/figure-latex/final_violin_plot.png +0 -0
  89. data/blogs/ruby_plot/ruby_plot_files/figure-latex/violin_with_jitter.png +0 -0
  90. data/blogs/test/test.Rmd +14 -0
  91. data/examples/50Plots_MasterList/Images/midwest-scatterplot.PNG +0 -0
  92. data/examples/50Plots_MasterList/ScatterPlot.rb +0 -0
  93. data/examples/50Plots_MasterList/scatter_plot.rb +0 -0
  94. data/examples/Bibliography/master.bib +50 -0
  95. data/examples/Bibliography/stats.bib +72 -0
  96. data/examples/R/calc.R +0 -0
  97. data/examples/R/java_interop.R +0 -0
  98. data/examples/bioconductor_deseq2_airway/Documentation/DESeq2-airway-walkthrough.md +56 -0
  99. data/examples/bioconductor_deseq2_airway/bench_galaaz_three_same_process.rb +53 -0
  100. data/examples/bioconductor_deseq2_airway/bench_r_three_same_process.R +34 -0
  101. data/examples/bioconductor_deseq2_airway/deseq2_airway_galaaz.rb +33 -0
  102. data/examples/bioconductor_deseq2_airway/deseq2_airway_galaaz_optimized.rb +34 -0
  103. data/examples/bioconductor_deseq2_airway/deseq2_airway_minimal.R +30 -0
  104. data/examples/bioconductor_deseq2_airway/deseq2_airway_pipeline_for_bench.R +36 -0
  105. data/examples/islr/all.rb +13 -0
  106. data/examples/islr/ch2.spec.rb +37 -7
  107. data/examples/islr/ch3.spec.rb +11 -2
  108. data/examples/islr/ch3_boston.rb +27 -0
  109. data/examples/islr/ch3_multiple_regression.rb +0 -0
  110. data/examples/islr/ch6.spec.rb +24 -1
  111. data/examples/islr/x_y_rnorm.jpg +0 -0
  112. data/examples/latex_templates/Test-acm_article/Makefile +16 -0
  113. data/examples/latex_templates/Test-acm_article/Test-acm_article.Rmd +65 -0
  114. data/examples/latex_templates/Test-acm_article/acm_proc_article-sp.cls +1670 -0
  115. data/examples/latex_templates/Test-acm_article/sensys-abstract.cls +703 -0
  116. data/examples/latex_templates/Test-acm_article/sigproc.bib +59 -0
  117. data/examples/latex_templates/Test-acs_article/Test-acs_article.Rmd +260 -0
  118. data/examples/latex_templates/Test-acs_article/acs-Test-acs_article.bib +11 -0
  119. data/examples/latex_templates/Test-acs_article/acs-my_output.bib +11 -0
  120. data/examples/latex_templates/Test-acs_article/acstest.bib +17 -0
  121. data/examples/latex_templates/Test-aea_article/AEA.cls +1414 -0
  122. data/{blogs/gknit/marshal.dump → examples/latex_templates/Test-aea_article/BibFile.bib} +0 -0
  123. data/examples/latex_templates/Test-aea_article/Test-aea_article.Rmd +108 -0
  124. data/examples/latex_templates/Test-aea_article/aea.bst +1269 -0
  125. data/examples/latex_templates/Test-aea_article/multicol.sty +853 -0
  126. data/examples/latex_templates/Test-aea_article/references.bib +0 -0
  127. data/examples/latex_templates/Test-aea_article/setspace.sty +546 -0
  128. data/examples/latex_templates/Test-amq_article/Test-amq_article.Rmd +256 -0
  129. data/examples/latex_templates/Test-amq_article/Test-amq_article.pdfsync +3397 -0
  130. data/examples/latex_templates/Test-ams_article/Test-ams_article.Rmd +215 -0
  131. data/examples/latex_templates/Test-ams_article/amstest.bib +436 -0
  132. data/examples/latex_templates/Test-asa_article/Test-asa_article.Rmd +153 -0
  133. data/examples/latex_templates/Test-asa_article/agsm.bst +1353 -0
  134. data/examples/latex_templates/Test-asa_article/bibliography.bib +233 -0
  135. data/examples/latex_templates/Test-ieee_article/IEEEtran.bst +2409 -0
  136. data/examples/latex_templates/Test-ieee_article/IEEEtran.cls +6346 -0
  137. data/examples/latex_templates/Test-ieee_article/Test-ieee_article.Rmd +175 -0
  138. data/examples/latex_templates/Test-ieee_article/mybibfile.bib +20 -0
  139. data/examples/latex_templates/Test-rjournal_article/RJournal.sty +335 -0
  140. data/examples/latex_templates/Test-rjournal_article/RJreferences.bib +18 -0
  141. data/examples/latex_templates/Test-rjournal_article/Test-rjournal_article.Rmd +52 -0
  142. data/examples/latex_templates/Test-springer_article/Test-springer_article.Rmd +65 -0
  143. data/examples/latex_templates/Test-springer_article/bibliography.bib +26 -0
  144. data/examples/latex_templates/Test-springer_article/spbasic.bst +1658 -0
  145. data/examples/latex_templates/Test-springer_article/spmpsci.bst +1512 -0
  146. data/examples/latex_templates/Test-springer_article/spphys.bst +1443 -0
  147. data/examples/latex_templates/Test-springer_article/svglov3.clo +113 -0
  148. data/examples/latex_templates/Test-springer_article/svjour3.cls +1431 -0
  149. data/examples/misc/baseball.csv +0 -0
  150. data/examples/misc/ggplot.rb +3 -2
  151. data/examples/misc/moneyball.rb +0 -0
  152. data/examples/misc/subsetting.rb +0 -0
  153. data/examples/multithread_shards_to_r/shards_to_r.rb +67 -0
  154. data/examples/rmarkdown/svm-rmarkdown-anon-ms-example/svm-rmarkdown-anon-ms-example.Rmd +73 -0
  155. data/examples/rmarkdown/svm-rmarkdown-article-example/svm-rmarkdown-article-example.Rmd +382 -0
  156. data/examples/rmarkdown/svm-rmarkdown-beamer-example/svm-rmarkdown-beamer-example.Rmd +164 -0
  157. data/examples/rmarkdown/svm-rmarkdown-cv/svm-rmarkdown-cv.Rmd +92 -0
  158. data/examples/rmarkdown/svm-rmarkdown-syllabus-example/attend-grade-relationships.csv +482 -0
  159. data/examples/rmarkdown/svm-rmarkdown-syllabus-example/svm-rmarkdown-syllabus-example.Rmd +280 -0
  160. data/examples/rmarkdown/svm-xaringan-example/svm-xaringan-example.Rmd +386 -0
  161. data/examples/sthda_ggplot/README.md +0 -0
  162. data/examples/sthda_ggplot/RUN.md +41 -0
  163. data/examples/sthda_ggplot/all.rb +0 -0
  164. data/examples/sthda_ggplot/one_variable_continuous/density_gg.rb +0 -0
  165. data/examples/sthda_ggplot/one_variable_continuous/geom_area.rb +0 -0
  166. data/examples/sthda_ggplot/one_variable_continuous/geom_density.rb +2 -0
  167. data/examples/sthda_ggplot/one_variable_continuous/geom_dotplot.rb +0 -0
  168. data/examples/sthda_ggplot/one_variable_continuous/geom_freqpoly.rb +0 -0
  169. data/examples/sthda_ggplot/one_variable_continuous/geom_histogram.rb +0 -0
  170. data/examples/sthda_ggplot/one_variable_continuous/histogram_density.rb +0 -0
  171. data/examples/sthda_ggplot/one_variable_continuous/stat.rb +0 -0
  172. data/examples/sthda_ggplot/one_variable_discrete/bar.rb +0 -0
  173. data/examples/sthda_ggplot/qplots/box_violin_dot.rb +0 -0
  174. data/examples/sthda_ggplot/qplots/scatter_plots.rb +0 -0
  175. data/examples/sthda_ggplot/scatter_gg.rb +0 -0
  176. data/examples/sthda_ggplot/two_variables_cont_bivariate/geom_bin2d.rb +0 -0
  177. data/examples/sthda_ggplot/two_variables_cont_bivariate/geom_density2d.rb +0 -0
  178. data/examples/sthda_ggplot/two_variables_cont_bivariate/geom_hex.rb +0 -0
  179. data/examples/sthda_ggplot/two_variables_cont_cont/geom_point.rb +0 -0
  180. data/examples/sthda_ggplot/two_variables_cont_cont/geom_smooth.rb +0 -0
  181. data/examples/sthda_ggplot/two_variables_cont_cont/misc.rb +0 -0
  182. data/examples/sthda_ggplot/two_variables_cont_function/geom_area.rb +4 -3
  183. data/examples/sthda_ggplot/two_variables_disc_cont/geom_bar.rb +0 -0
  184. data/examples/sthda_ggplot/two_variables_disc_cont/geom_boxplot.rb +0 -0
  185. data/examples/sthda_ggplot/two_variables_disc_cont/geom_dotplot.rb +0 -0
  186. data/examples/sthda_ggplot/two_variables_disc_cont/geom_jitter.rb +0 -0
  187. data/examples/sthda_ggplot/two_variables_disc_cont/geom_line.rb +0 -0
  188. data/examples/sthda_ggplot/two_variables_disc_cont/geom_violin.rb +0 -0
  189. data/examples/sthda_ggplot/two_variables_disc_disc/geom_jitter.rb +0 -0
  190. data/examples/sthda_ggplot/two_variables_error/geom_crossbar.rb +0 -0
  191. data/ext/new_bridge/Makefile +46 -0
  192. data/ext/new_bridge/galaaz_gatekeeper_phase0.cpp +12 -0
  193. data/ext/new_bridge/galaaz_gatekeeper_phase1.cpp +1639 -0
  194. data/lib/R_interface/galaaz_device.R +20 -0
  195. data/lib/R_interface/include_engine.R +109 -0
  196. data/lib/R_interface/new_bridge_adapter.rb +824 -0
  197. data/lib/R_interface/r.rb +177 -25
  198. data/lib/R_interface/r_arrow.rb +113 -0
  199. data/lib/R_interface/r_libs.R +4 -4
  200. data/lib/R_interface/r_methods.rb +13 -116
  201. data/lib/R_interface/r_module_s.rb +0 -0
  202. data/lib/R_interface/rbinary_operators.rb +20 -2
  203. data/lib/R_interface/rclosure.rb +5 -1
  204. data/lib/R_interface/rdata_frame.rb +34 -70
  205. data/lib/R_interface/rdevice.rb +125 -0
  206. data/lib/R_interface/rdevices.R +0 -0
  207. data/lib/R_interface/renvironment.rb +10 -4
  208. data/lib/R_interface/rexpression.rb +5 -1
  209. data/lib/R_interface/rindexed_object.rb +41 -13
  210. data/lib/R_interface/rlanguage.rb +20 -62
  211. data/lib/R_interface/rlist.rb +115 -25
  212. data/lib/R_interface/rlogical_operators.rb +0 -0
  213. data/lib/R_interface/rmatrix.rb +2 -11
  214. data/lib/R_interface/rmd_indexed_object.rb +5 -1
  215. data/lib/R_interface/robject.rb +348 -290
  216. data/lib/R_interface/rpkg.rb +1 -0
  217. data/lib/R_interface/rsupport.rb +610 -331
  218. data/lib/R_interface/rsupport_scope.rb +2 -1
  219. data/lib/R_interface/rsymbol.rb +50 -0
  220. data/lib/R_interface/ruby_callback.rb +2 -3
  221. data/lib/R_interface/ruby_extensions.rb +225 -175
  222. data/lib/R_interface/runary_operators.rb +0 -0
  223. data/lib/R_interface/rvector.rb +147 -31
  224. data/lib/galaaz.rb +0 -0
  225. data/lib/galaaz_jruby.rb +22 -0
  226. data/lib/gknit/diagnostics.rb +50 -0
  227. data/lib/gknit/draft.rb +111 -0
  228. data/lib/gknit/include_engine.rb +15 -7
  229. data/lib/gknit/knitr_engine.rb +223 -107
  230. data/lib/gknit/rb_engine.rb +3 -3
  231. data/lib/gknit/ruby_engine.rb +0 -0
  232. data/lib/gknit.rb +3 -0
  233. data/lib/new_bridge/bootstrap/windows_bootstrap.rb +285 -0
  234. data/lib/new_bridge/envelope.rb +51 -0
  235. data/lib/new_bridge/eval_result.rb +26 -0
  236. data/lib/new_bridge/framing.rb +39 -0
  237. data/lib/new_bridge/instance_pool_client.rb +38 -0
  238. data/lib/new_bridge/r_instance_manager.rb +404 -0
  239. data/lib/new_bridge/session_client.rb +530 -0
  240. data/lib/new_bridge/tcp_framed.rb +44 -0
  241. data/lib/new_bridge.rb +9 -0
  242. data/lib/util/exec_ruby.rb +95 -46
  243. data/lib/util/inline_file.rb +35 -30
  244. data/new_bridge_specs/benchmark_phase5_5_unboxing_spec.rb +96 -0
  245. data/new_bridge_specs/eval_r_async_spec.rb +113 -0
  246. data/new_bridge_specs/integration_phase5_1_concurrent_spec.rb +50 -0
  247. data/new_bridge_specs/integration_phase5_1_eval_spec.rb +16 -0
  248. data/new_bridge_specs/integration_phase5_1_r_api_spec.rb +25 -0
  249. data/new_bridge_specs/integration_phase5_1_smoke_spec.rb +31 -0
  250. data/new_bridge_specs/integration_phase5_2_dataframe_unboxing_spec.rb +19 -0
  251. data/new_bridge_specs/integration_phase5_2_handle_eval_unboxing_spec.rb +25 -0
  252. data/new_bridge_specs/integration_phase5_3_callback_args_spec.rb +28 -0
  253. data/new_bridge_specs/integration_phase5_3_callback_error_spec.rb +22 -0
  254. data/new_bridge_specs/integration_phase5_3_callback_timeout_spec.rb +28 -0
  255. data/new_bridge_specs/integration_phase5_3_callbacks_smoke_spec.rb +22 -0
  256. data/new_bridge_specs/integration_phase5_3_edge_cases_spec.rb +52 -0
  257. data/new_bridge_specs/integration_phase5_3_nested_spec.rb +30 -0
  258. data/new_bridge_specs/integration_phase5_4_concurrent_sessions_spec.rb +53 -0
  259. data/new_bridge_specs/integration_phase5_4_nested_session_callbacks_spec.rb +49 -0
  260. data/new_bridge_specs/integration_phase5_4_session_routing_spec.rb +38 -0
  261. data/new_bridge_specs/integration_phase5_5_stress_concurrency_spec.rb +52 -0
  262. data/new_bridge_specs/integration_phase5_5_unbox_walk_spec.rb +46 -0
  263. data/new_bridge_specs/phase0_protocol_spec.rb +96 -0
  264. data/new_bridge_specs/phase1_req_ret_spec.rb +66 -0
  265. data/new_bridge_specs/phase2_multi_instance_spec.rb +67 -0
  266. data/new_bridge_specs/phase3_callbacks_spec.rb +71 -0
  267. data/new_bridge_specs/phase4_2_hardening_spec.rb +252 -0
  268. data/new_bridge_specs/phase4_3_r_instance_manager_spec.rb +85 -0
  269. data/new_bridge_specs/phase4_nested_callbacks_spec.rb +123 -0
  270. data/r_requires/ggplot.rb +0 -0
  271. data/r_requires/knitr.rb +0 -0
  272. data/specs/all.rb +15 -11
  273. data/specs/arrow_from_ruby_batches_spec.rb +50 -0
  274. data/specs/arrow_semantics_spec.rb +64 -0
  275. data/specs/bridge_concurrent_spec.rb +46 -0
  276. data/specs/bridge_nested_spec.rb +25 -0
  277. data/specs/dataframe_semantics_spec.rb +122 -0
  278. data/specs/dataframe_single_index_logical_filter_spec.rb +21 -0
  279. data/specs/dispatch_probe_cache_spec.rb +38 -0
  280. data/specs/dispatch_probe_error_class_fallback_spec.rb +20 -0
  281. data/specs/dispatch_probe_fallback_spec.rb +18 -0
  282. data/specs/environment_semantics_spec.rb +89 -0
  283. data/specs/field_access_spec.rb +31 -0
  284. data/specs/figures/bg.jpeg +0 -0
  285. data/specs/figures/bg.png +0 -0
  286. data/specs/figures/bg.svg +168 -57
  287. data/specs/figures/dose_len.png +0 -0
  288. data/specs/figures/no_args.jpeg +0 -0
  289. data/specs/figures/no_args.png +0 -0
  290. data/specs/figures/no_args.svg +168 -57
  291. data/specs/figures/width_height.jpeg +0 -0
  292. data/specs/figures/width_height.png +0 -0
  293. data/specs/figures/width_height_units1.jpeg +0 -0
  294. data/specs/figures/width_height_units1.png +0 -0
  295. data/specs/figures/width_height_units2.jpeg +0 -0
  296. data/specs/figures/width_height_units2.png +0 -0
  297. data/specs/formula_semantics_spec.rb +81 -0
  298. data/specs/galaaz_util_exec_ruby_spec.rb +85 -0
  299. data/specs/galaaz_util_inline_file_spec.rb +54 -0
  300. data/specs/gknit_cli_option_permutation_spec.rb +24 -0
  301. data/specs/gknit_include_engine_spec.rb +72 -0
  302. data/specs/gknit_install_timeout_report_spec.rb +69 -0
  303. data/specs/gknit_internal_error_report_spec.rb +57 -0
  304. data/specs/gknit_vector_map_output_spec.rb +59 -0
  305. data/specs/globalenv_guardrail_spec.rb +52 -0
  306. data/specs/language_expression_semantics_spec.rb +145 -0
  307. data/specs/list_semantics_spec.rb +111 -0
  308. data/specs/new_bridge_bulk_dataframe_transfer_spec.rb +44 -0
  309. data/specs/new_bridge_bulk_vector_transfer_spec.rb +73 -0
  310. data/specs/new_bridge_callback_timeout_spec.rb +69 -0
  311. data/specs/new_bridge_eval_r_fallback_spec.rb +55 -0
  312. data/specs/nil_null_spec.rb +42 -0
  313. data/specs/object_build_phase2_spec.rb +53 -0
  314. data/specs/phase1_callback_bridge_spec.rb +84 -0
  315. data/specs/phase2_gknit_generic_rendering_guardrail_spec.rb +46 -0
  316. data/specs/phase2_gknit_no_raw_code_leakage_spec.rb +43 -0
  317. data/specs/phase3_gknit_generic_graphics_capture_spec.rb +71 -0
  318. data/specs/plot_device_semantics_spec.rb +28 -0
  319. data/specs/plot_snapshot_semantics_spec.rb +58 -0
  320. data/specs/protocol_result_spec.rb +236 -0
  321. data/specs/r_batch_fail_fast_spec.rb +47 -0
  322. data/specs/r_bridge_bootstrap_spec.rb +11 -0
  323. data/specs/r_devices.spec.rb +1 -1
  324. data/specs/r_eval.spec.rb +16 -18
  325. data/specs/r_function.spec.rb +1 -1
  326. data/specs/r_instance_manager_spec.rb +285 -0
  327. data/specs/r_list_apply.spec.rb +15 -15
  328. data/specs/r_matrix.spec.rb +0 -0
  329. data/specs/r_nse.spec.rb +5 -5
  330. data/specs/r_object_send_dispatch_spec.rb +13 -0
  331. data/specs/r_vector_comparator_spec.rb +8 -0
  332. data/specs/r_vector_creation.spec.rb +0 -0
  333. data/specs/r_vector_functions.spec.rb +0 -0
  334. data/specs/r_vector_object.spec.rb +0 -0
  335. data/specs/r_vector_operators.spec.rb +0 -0
  336. data/specs/r_vector_structured_scalar_reads_spec.rb +35 -0
  337. data/specs/r_vector_subsetting.spec.rb +0 -0
  338. data/specs/range_helper_spec.rb +21 -0
  339. data/specs/rsupport_scope_spec.rb +28 -0
  340. data/specs/rsupport_var_name_thread_safety_spec.rb +24 -0
  341. data/specs/scalar_character_spec.rb +44 -0
  342. data/specs/scoped_symbol_dsl_refinement_spec.rb +40 -0
  343. data/specs/session_env_bridge_spec.rb +25 -0
  344. data/specs/simplecov_bootstrap_spec.rb +10 -0
  345. data/specs/spec_helper.rb +10 -0
  346. data/specs/tmp.rb +41 -20
  347. data/specs/unboxing_recursion_regression_spec.rb +30 -0
  348. data/specs/unboxing_spec.rb +49 -0
  349. data/specs/verify_callbacks.rb +42 -0
  350. data/sty/galaaz.sty +0 -0
  351. data/version.rb +1 -1
  352. metadata +239 -71
  353. data/blogs/galaaz_ggplot/galaaz_ggplot.aux +0 -41
  354. data/blogs/galaaz_ggplot/galaaz_ggplot.html +0 -705
  355. data/blogs/galaaz_ggplot/galaaz_ggplot.out +0 -10
  356. data/blogs/galaaz_ggplot/galaaz_ggplot.pdf +0 -0
  357. data/blogs/galaaz_ggplot/galaaz_ggplot_files/figure-latex/midwest_rb.pdf +0 -0
  358. data/blogs/galaaz_ggplot/galaaz_ggplot_files/figure-latex/scatter_plot_rb.pdf +0 -0
  359. data/blogs/galaaz_ggplot/midwest.html +0 -188
  360. data/blogs/gknit/gknit.html +0 -2266
  361. data/blogs/gknit/gknit.pdf +0 -0
  362. data/blogs/gknit/gknit.tex +0 -1358
  363. data/blogs/manual/graph.rb +0 -29
  364. data/blogs/manual/manual.html +0 -2995
  365. data/blogs/manual/manual.pdf +0 -0
  366. data/blogs/manual/manual_files/figure-latex/diverging_bar.pdf +0 -0
  367. data/blogs/nse_dplyr/nse_dplyr.html +0 -960
  368. data/blogs/nse_dplyr/nse_dplyr.pdf +0 -0
  369. data/blogs/nse_dplyr/nse_dplyr.tex +0 -1373
  370. data/blogs/oh_my/oh_my.html +0 -680
  371. data/blogs/ruby_plot/ruby_plot.Rmd_external_figs +0 -662
  372. data/blogs/ruby_plot/ruby_plot.html +0 -729
  373. data/blogs/ruby_plot/ruby_plot.pdf +0 -0
  374. data/blogs/ruby_plot/ruby_plot_files/figure-html/dose_len.svg +0 -57
  375. data/blogs/ruby_plot/ruby_plot_files/figure-html/facet_by_delivery.svg +0 -106
  376. data/blogs/ruby_plot/ruby_plot_files/figure-html/facet_by_dose.svg +0 -110
  377. data/blogs/ruby_plot/ruby_plot_files/figure-html/facets_by_delivery_color.svg +0 -174
  378. data/blogs/ruby_plot/ruby_plot_files/figure-html/facets_by_delivery_color2.svg +0 -236
  379. data/blogs/ruby_plot/ruby_plot_files/figure-html/facets_with_jitter.svg +0 -296
  380. data/blogs/ruby_plot/ruby_plot_files/figure-html/facets_with_points.svg +0 -236
  381. data/blogs/ruby_plot/ruby_plot_files/figure-html/final_box_plot.svg +0 -218
  382. data/blogs/ruby_plot/ruby_plot_files/figure-html/final_violin_plot.svg +0 -128
  383. data/blogs/ruby_plot/ruby_plot_files/figure-html/violin_with_jitter.svg +0 -150
  384. data/examples/paper/paper.rb +0 -36
  385. data/specs/r_dataframe.spec.rb +0 -379
  386. data/specs/r_environment.spec.rb +0 -140
  387. data/specs/r_formula.spec.rb +0 -232
  388. data/specs/r_language.spec.rb +0 -112
  389. data/specs/r_list.spec.rb +0 -293
  390. data/specs/r_plots.spec.rb +0 -72
  391. data/specs/ruby_expression.spec.rb +0 -315
@@ -0,0 +1,1658 @@
1
+ %%
2
+ %% This is file `spbasic.bst',
3
+ %% generated with the docstrip utility.
4
+ %%
5
+ %% The original source files were:
6
+ %%
7
+ %% merlin.mbs (with options: `ay,nat,seq-lab,vonx,nm-rvx,ed-rev,jnrlst,dt-beg,yr-par,yrp-x,yrpp-xsp,note-yr,jxper,jttl-rm,thtit-a,pgsep-c,num-xser,ser-vol,jnm-x,btit-rm,bt-rm,pre-pub,doi,edparxc,blk-tit,in-col,fin-bare,pp,ed,abr,mth-bare,ord,jabr,xand,eprint,url,url-blk,em-x,nfss,')
8
+ %% ----------------------------------------
9
+ %%
10
+ %%********************************************************************************%%
11
+ %% %%
12
+ %% For Springer medical, life sciences, chemistry, geology, engineering and %%
13
+ %% computer science publications. %%
14
+ %% For use with the natbib package (see below). Default is author-year citations. %%
15
+ %% When citations are numbered, please use \usepackage[numbers]{natbib}. %%
16
+ %% A lack of punctuation is the key feature. Springer-Verlag 2004/10/15 %%
17
+ %% Report bugs and improvements to: Joylene Vette-Guillaume or Frank Holzwarth %%
18
+ %% %%
19
+ %%********************************************************************************%%
20
+ %%
21
+ %% Copyright 1994-2004 Patrick W Daly
22
+ % ===============================================================
23
+ % IMPORTANT NOTICE:
24
+ % This bibliographic style (bst) file has been generated from one or
25
+ % more master bibliographic style (mbs) files, listed above.
26
+ %
27
+ % This generated file can be redistributed and/or modified under the terms
28
+ % of the LaTeX Project Public License Distributed from CTAN
29
+ % archives in directory macros/latex/base/lppl.txt; either
30
+ % version 1 of the License, or any later version.
31
+ % ===============================================================
32
+ % Name and version information of the main mbs file:
33
+ % \ProvidesFile{merlin.mbs}[2004/02/09 4.13 (PWD, AO, DPC)]
34
+ % For use with BibTeX version 0.99a or later
35
+ %-------------------------------------------------------------------
36
+ % This bibliography style file is intended for texts in ENGLISH
37
+ % This is an author-year citation style bibliography. As such, it is
38
+ % non-standard LaTeX, and requires a special package file to function properly.
39
+ % Such a package is natbib.sty by Patrick W. Daly
40
+ % The form of the \bibitem entries is
41
+ % \bibitem[Jones et al.(1990)]{key}...
42
+ % \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}...
43
+ % The essential feature is that the label (the part in brackets) consists
44
+ % of the author names, as they should appear in the citation, with the year
45
+ % in parentheses following. There must be no space before the opening
46
+ % parenthesis!
47
+ % With natbib v5.3, a full list of authors may also follow the year.
48
+ % In natbib.sty, it is possible to define the type of enclosures that is
49
+ % really wanted (brackets or parentheses), but in either case, there must
50
+ % be parentheses in the label.
51
+ % The \cite command functions as follows:
52
+ % \citet{key} ==>> Jones et al. (1990)
53
+ % \citet*{key} ==>> Jones, Baker, and Smith (1990)
54
+ % \citep{key} ==>> (Jones et al., 1990)
55
+ % \citep*{key} ==>> (Jones, Baker, and Smith, 1990)
56
+ % \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2)
57
+ % \citep[e.g.][]{key} ==>> (e.g. Jones et al., 1990)
58
+ % \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., p. 32)
59
+ % \citeauthor{key} ==>> Jones et al.
60
+ % \citeauthor*{key} ==>> Jones, Baker, and Smith
61
+ % \citeyear{key} ==>> 1990
62
+ %---------------------------------------------------------------------
63
+
64
+ ENTRY
65
+ { address
66
+ archive
67
+ author
68
+ booktitle
69
+ chapter
70
+ doi
71
+ edition
72
+ editor
73
+ eid
74
+ eprint
75
+ howpublished
76
+ institution
77
+ journal
78
+ key
79
+ month
80
+ note
81
+ number
82
+ organization
83
+ pages
84
+ publisher
85
+ school
86
+ series
87
+ title
88
+ type
89
+ url
90
+ volume
91
+ year
92
+ }
93
+ {}
94
+ { label extra.label sort.label short.list }
95
+ INTEGERS { output.state before.all mid.sentence after.sentence after.block }
96
+ FUNCTION {init.state.consts}
97
+ { #0 'before.all :=
98
+ #1 'mid.sentence :=
99
+ #2 'after.sentence :=
100
+ #3 'after.block :=
101
+ }
102
+ STRINGS { s t}
103
+ FUNCTION {output.nonnull}
104
+ { 's :=
105
+ output.state mid.sentence =
106
+ { ", " * write$ }
107
+ { output.state after.block =
108
+ { add.period$ write$
109
+ newline$
110
+ "\newblock " write$
111
+ }
112
+ { output.state before.all =
113
+ 'write$
114
+ { add.period$ " " * write$ }
115
+ if$
116
+ }
117
+ if$
118
+ mid.sentence 'output.state :=
119
+ }
120
+ if$
121
+ s
122
+ }
123
+ FUNCTION {output}
124
+ { duplicate$ empty$
125
+ 'pop$
126
+ 'output.nonnull
127
+ if$
128
+ }
129
+ FUNCTION {output.check}
130
+ { 't :=
131
+ duplicate$ empty$
132
+ { pop$ "empty " t * " in " * cite$ * warning$ }
133
+ 'output.nonnull
134
+ if$
135
+ }
136
+ FUNCTION {fin.entry}
137
+ { duplicate$ empty$
138
+ 'pop$
139
+ 'write$
140
+ if$
141
+ newline$
142
+ }
143
+
144
+ FUNCTION {new.block}
145
+ { output.state before.all =
146
+ 'skip$
147
+ { after.block 'output.state := }
148
+ if$
149
+ }
150
+ FUNCTION {new.sentence}
151
+ { output.state after.block =
152
+ 'skip$
153
+ { output.state before.all =
154
+ 'skip$
155
+ { after.sentence 'output.state := }
156
+ if$
157
+ }
158
+ if$
159
+ }
160
+ FUNCTION {add.blank}
161
+ { " " * before.all 'output.state :=
162
+ }
163
+
164
+ FUNCTION {no.blank.or.punct}
165
+ { "\hspace{0pt}" * before.all 'output.state :=
166
+ }
167
+
168
+ FUNCTION {date.block}
169
+ {
170
+ add.blank
171
+ }
172
+
173
+ FUNCTION {not}
174
+ { { #0 }
175
+ { #1 }
176
+ if$
177
+ }
178
+ FUNCTION {and}
179
+ { 'skip$
180
+ { pop$ #0 }
181
+ if$
182
+ }
183
+ FUNCTION {or}
184
+ { { pop$ #1 }
185
+ 'skip$
186
+ if$
187
+ }
188
+ STRINGS {z}
189
+ FUNCTION {remove.dots}
190
+ { 'z :=
191
+ ""
192
+ { z empty$ not }
193
+ { z #1 #1 substring$
194
+ z #2 global.max$ substring$ 'z :=
195
+ duplicate$ "." = 'pop$
196
+ { * }
197
+ if$
198
+ }
199
+ while$
200
+ }
201
+ FUNCTION {new.block.checkb}
202
+ { empty$
203
+ swap$ empty$
204
+ and
205
+ 'skip$
206
+ 'new.block
207
+ if$
208
+ }
209
+ FUNCTION {field.or.null}
210
+ { duplicate$ empty$
211
+ { pop$ "" }
212
+ 'skip$
213
+ if$
214
+ }
215
+ FUNCTION {emphasize}
216
+ { skip$ }
217
+ FUNCTION {tie.or.space.prefix}
218
+ { duplicate$ text.length$ #3 <
219
+ { "~" }
220
+ { " " }
221
+ if$
222
+ swap$
223
+ }
224
+
225
+ FUNCTION {capitalize}
226
+ { "u" change.case$ "t" change.case$ }
227
+
228
+ FUNCTION {space.word}
229
+ { " " swap$ * " " * }
230
+ % Here are the language-specific definitions for explicit words.
231
+ % Each function has a name bbl.xxx where xxx is the English word.
232
+ % The language selected here is ENGLISH
233
+ FUNCTION {bbl.and}
234
+ { "and"}
235
+
236
+ FUNCTION {bbl.etal}
237
+ { "et~al" }
238
+
239
+ FUNCTION {bbl.editors}
240
+ { "eds" }
241
+
242
+ FUNCTION {bbl.editor}
243
+ { "ed" }
244
+
245
+ FUNCTION {bbl.edby}
246
+ { "edited by" }
247
+
248
+ FUNCTION {bbl.edition}
249
+ { "edn" }
250
+
251
+ FUNCTION {bbl.volume}
252
+ { "vol" }
253
+
254
+ FUNCTION {bbl.of}
255
+ { "of" }
256
+
257
+ FUNCTION {bbl.number}
258
+ { "no." }
259
+
260
+ FUNCTION {bbl.nr}
261
+ { "no." }
262
+
263
+ FUNCTION {bbl.in}
264
+ { "in" }
265
+
266
+ FUNCTION {bbl.pages}
267
+ { "pp" }
268
+
269
+ FUNCTION {bbl.page}
270
+ { "p" }
271
+
272
+ FUNCTION {bbl.chapter}
273
+ { "chap" }
274
+
275
+ FUNCTION {bbl.techrep}
276
+ { "Tech. Rep." }
277
+
278
+ FUNCTION {bbl.mthesis}
279
+ { "Master's thesis" }
280
+
281
+ FUNCTION {bbl.phdthesis}
282
+ { "PhD thesis" }
283
+
284
+ FUNCTION {bbl.first}
285
+ { "1st" }
286
+
287
+ FUNCTION {bbl.second}
288
+ { "2nd" }
289
+
290
+ FUNCTION {bbl.third}
291
+ { "3rd" }
292
+
293
+ FUNCTION {bbl.fourth}
294
+ { "4th" }
295
+
296
+ FUNCTION {bbl.fifth}
297
+ { "5th" }
298
+
299
+ FUNCTION {bbl.st}
300
+ { "st" }
301
+
302
+ FUNCTION {bbl.nd}
303
+ { "nd" }
304
+
305
+ FUNCTION {bbl.rd}
306
+ { "rd" }
307
+
308
+ FUNCTION {bbl.th}
309
+ { "th" }
310
+
311
+ MACRO {jan} {"Jan."}
312
+
313
+ MACRO {feb} {"Feb."}
314
+
315
+ MACRO {mar} {"Mar."}
316
+
317
+ MACRO {apr} {"Apr."}
318
+
319
+ MACRO {may} {"May"}
320
+
321
+ MACRO {jun} {"Jun."}
322
+
323
+ MACRO {jul} {"Jul."}
324
+
325
+ MACRO {aug} {"Aug."}
326
+
327
+ MACRO {sep} {"Sep."}
328
+
329
+ MACRO {oct} {"Oct."}
330
+
331
+ MACRO {nov} {"Nov."}
332
+
333
+ MACRO {dec} {"Dec."}
334
+
335
+ FUNCTION {eng.ord}
336
+ { duplicate$ "1" swap$ *
337
+ #-2 #1 substring$ "1" =
338
+ { bbl.th * }
339
+ { duplicate$ #-1 #1 substring$
340
+ duplicate$ "1" =
341
+ { pop$ bbl.st * }
342
+ { duplicate$ "2" =
343
+ { pop$ bbl.nd * }
344
+ { "3" =
345
+ { bbl.rd * }
346
+ { bbl.th * }
347
+ if$
348
+ }
349
+ if$
350
+ }
351
+ if$
352
+ }
353
+ if$
354
+ }
355
+
356
+ MACRO {acmcs} {"ACM Comput Surv"}
357
+
358
+ MACRO {acta} {"Acta Inf"}
359
+
360
+ MACRO {cacm} {"Commun ACM"}
361
+
362
+ MACRO {ibmjrd} {"IBM~J~Res Dev"}
363
+
364
+ MACRO {ibmsj} {"IBM Syst~J"}
365
+
366
+ MACRO {ieeese} {"IEEE Trans Softw Eng"}
367
+
368
+ MACRO {ieeetc} {"IEEE Trans Comput"}
369
+
370
+ MACRO {ieeetcad}
371
+ {"IEEE Trans Comput Aid Des"}
372
+
373
+ MACRO {ipl} {"Inf Process Lett"}
374
+
375
+ MACRO {jacm} {"J~ACM"}
376
+
377
+ MACRO {jcss} {"J~Comput Syst Sci"}
378
+
379
+ MACRO {scp} {"Sci Comput Program"}
380
+
381
+ MACRO {sicomp} {"SIAM J~Comput"}
382
+
383
+ MACRO {tocs} {"ACM Trans Comput Syst"}
384
+
385
+ MACRO {tods} {"ACM Trans Database Syst"}
386
+
387
+ MACRO {tog} {"ACM Trans Graphic"}
388
+
389
+ MACRO {toms} {"ACM Trans Math Softw"}
390
+
391
+ MACRO {toois} {"ACM Trans Office Inf Syst"}
392
+
393
+ MACRO {toplas} {"ACM Trans Program Lang Syst"}
394
+
395
+ MACRO {tcs} {"Theor Comput Sci"}
396
+
397
+ FUNCTION {bibinfo.check}
398
+ { swap$
399
+ duplicate$ missing$
400
+ {
401
+ pop$ pop$
402
+ ""
403
+ }
404
+ { duplicate$ empty$
405
+ {
406
+ swap$ pop$
407
+ }
408
+ { swap$
409
+ pop$
410
+ }
411
+ if$
412
+ }
413
+ if$
414
+ }
415
+ FUNCTION {bibinfo.warn}
416
+ { swap$
417
+ duplicate$ missing$
418
+ {
419
+ swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
420
+ ""
421
+ }
422
+ { duplicate$ empty$
423
+ {
424
+ swap$ "empty " swap$ * " in " * cite$ * warning$
425
+ }
426
+ { swap$
427
+ pop$
428
+ }
429
+ if$
430
+ }
431
+ if$
432
+ }
433
+ FUNCTION {format.eprint}
434
+ { eprint duplicate$ empty$
435
+ 'skip$
436
+ { "\eprint"
437
+ archive empty$
438
+ 'skip$
439
+ { "[" * archive * "]" * }
440
+ if$
441
+ "{" * swap$ * "}" *
442
+ }
443
+ if$
444
+ }
445
+ FUNCTION {format.url}
446
+ { url empty$
447
+ { "" }
448
+ { "\urlprefix\url{" url * "}" * }
449
+ if$
450
+ }
451
+
452
+ STRINGS { bibinfo}
453
+ INTEGERS { nameptr namesleft numnames }
454
+
455
+ FUNCTION {format.names}
456
+ { 'bibinfo :=
457
+ duplicate$ empty$ 'skip$ {
458
+ 's :=
459
+ "" 't :=
460
+ #1 'nameptr :=
461
+ s num.names$ 'numnames :=
462
+ numnames 'namesleft :=
463
+ { namesleft #0 > }
464
+ { s nameptr
465
+ "{vv~}{ll}{ f{}}{ jj}"
466
+ format.name$
467
+ remove.dots
468
+ bibinfo bibinfo.check
469
+ 't :=
470
+ nameptr #1 >
471
+ {
472
+ namesleft #1 >
473
+ { ", " * t * }
474
+ {
475
+ "," *
476
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
477
+ { 't := }
478
+ { pop$ }
479
+ if$
480
+ t "others" =
481
+ {
482
+ " " * bbl.etal *
483
+ }
484
+ { " " * t * }
485
+ if$
486
+ }
487
+ if$
488
+ }
489
+ 't
490
+ if$
491
+ nameptr #1 + 'nameptr :=
492
+ namesleft #1 - 'namesleft :=
493
+ }
494
+ while$
495
+ } if$
496
+ }
497
+ FUNCTION {format.names.ed}
498
+ {
499
+ format.names
500
+ }
501
+ FUNCTION {format.key}
502
+ { empty$
503
+ { key field.or.null }
504
+ { "" }
505
+ if$
506
+ }
507
+
508
+ FUNCTION {format.authors}
509
+ { author "author" format.names
510
+ }
511
+ FUNCTION {get.bbl.editor}
512
+ { editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }
513
+
514
+ FUNCTION {format.editors}
515
+ { editor "editor" format.names duplicate$ empty$ 'skip$
516
+ {
517
+ " " *
518
+ get.bbl.editor
519
+ "(" swap$ * ")" *
520
+ *
521
+ }
522
+ if$
523
+ }
524
+ FUNCTION {format.doi}
525
+ { doi "doi" bibinfo.check
526
+ duplicate$ empty$ 'skip$
527
+ {
528
+ "\doi{" swap$ * "}" *
529
+ }
530
+ if$
531
+ }
532
+ FUNCTION {format.note}
533
+ {
534
+ note empty$
535
+ { "" }
536
+ { note #1 #1 substring$
537
+ duplicate$ "{" =
538
+ 'skip$
539
+ { output.state mid.sentence =
540
+ { "l" }
541
+ { "u" }
542
+ if$
543
+ change.case$
544
+ }
545
+ if$
546
+ note #2 global.max$ substring$ * "note" bibinfo.check
547
+ }
548
+ if$
549
+ }
550
+
551
+ FUNCTION {format.title}
552
+ { title
553
+ duplicate$ empty$ 'skip$
554
+ { "t" change.case$ }
555
+ if$
556
+ "title" bibinfo.check
557
+ }
558
+ FUNCTION {format.full.names}
559
+ {'s :=
560
+ "" 't :=
561
+ #1 'nameptr :=
562
+ s num.names$ 'numnames :=
563
+ numnames 'namesleft :=
564
+ { namesleft #0 > }
565
+ { s nameptr
566
+ "{vv~}{ll}" format.name$
567
+ 't :=
568
+ nameptr #1 >
569
+ {
570
+ namesleft #1 >
571
+ { ", " * t * }
572
+ {
573
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
574
+ { 't := }
575
+ { pop$ }
576
+ if$
577
+ t "others" =
578
+ {
579
+ " " * bbl.etal *
580
+ }
581
+ {
582
+ numnames #2 >
583
+ { "," * }
584
+ 'skip$
585
+ if$
586
+ bbl.and
587
+ space.word * t *
588
+ }
589
+ if$
590
+ }
591
+ if$
592
+ }
593
+ 't
594
+ if$
595
+ nameptr #1 + 'nameptr :=
596
+ namesleft #1 - 'namesleft :=
597
+ }
598
+ while$
599
+ }
600
+
601
+ FUNCTION {author.editor.key.full}
602
+ { author empty$
603
+ { editor empty$
604
+ { key empty$
605
+ { cite$ #1 #3 substring$ }
606
+ 'key
607
+ if$
608
+ }
609
+ { editor format.full.names }
610
+ if$
611
+ }
612
+ { author format.full.names }
613
+ if$
614
+ }
615
+
616
+ FUNCTION {author.key.full}
617
+ { author empty$
618
+ { key empty$
619
+ { cite$ #1 #3 substring$ }
620
+ 'key
621
+ if$
622
+ }
623
+ { author format.full.names }
624
+ if$
625
+ }
626
+
627
+ FUNCTION {editor.key.full}
628
+ { editor empty$
629
+ { key empty$
630
+ { cite$ #1 #3 substring$ }
631
+ 'key
632
+ if$
633
+ }
634
+ { editor format.full.names }
635
+ if$
636
+ }
637
+
638
+ FUNCTION {make.full.names}
639
+ { type$ "book" =
640
+ type$ "inbook" =
641
+ or
642
+ 'author.editor.key.full
643
+ { type$ "proceedings" =
644
+ 'editor.key.full
645
+ 'author.key.full
646
+ if$
647
+ }
648
+ if$
649
+ }
650
+
651
+ FUNCTION {output.bibitem}
652
+ { newline$
653
+ "\bibitem[{" write$
654
+ label write$
655
+ ")" make.full.names duplicate$ short.list =
656
+ { pop$ }
657
+ { * }
658
+ if$
659
+ "}]{" * write$
660
+ cite$ write$
661
+ "}" write$
662
+ newline$
663
+ ""
664
+ before.all 'output.state :=
665
+ }
666
+
667
+ FUNCTION {add.period}
668
+ { duplicate$ empty$
669
+ 'skip$
670
+ { "." * add.blank }
671
+ if$
672
+ }
673
+
674
+ FUNCTION {if.digit}
675
+ { duplicate$ "0" =
676
+ swap$ duplicate$ "1" =
677
+ swap$ duplicate$ "2" =
678
+ swap$ duplicate$ "3" =
679
+ swap$ duplicate$ "4" =
680
+ swap$ duplicate$ "5" =
681
+ swap$ duplicate$ "6" =
682
+ swap$ duplicate$ "7" =
683
+ swap$ duplicate$ "8" =
684
+ swap$ "9" = or or or or or or or or or
685
+ }
686
+ FUNCTION {n.separate}
687
+ { 't :=
688
+ ""
689
+ #0 'numnames :=
690
+ { t empty$ not }
691
+ { t #-1 #1 substring$ if.digit
692
+ { numnames #1 + 'numnames := }
693
+ { #0 'numnames := }
694
+ if$
695
+ t #-1 #1 substring$ swap$ *
696
+ t #-2 global.max$ substring$ 't :=
697
+ numnames #5 =
698
+ { duplicate$ #1 #2 substring$ swap$
699
+ #3 global.max$ substring$
700
+ "," swap$ * *
701
+ }
702
+ 'skip$
703
+ if$
704
+ }
705
+ while$
706
+ }
707
+ FUNCTION {n.dashify}
708
+ {
709
+ 't :=
710
+ ""
711
+ { t empty$ not }
712
+ { t #1 #1 substring$ "-" =
713
+ { t #1 #2 substring$ "--" = not
714
+ { "--" *
715
+ t #2 global.max$ substring$ 't :=
716
+ }
717
+ { { t #1 #1 substring$ "-" = }
718
+ { "-" *
719
+ t #2 global.max$ substring$ 't :=
720
+ }
721
+ while$
722
+ }
723
+ if$
724
+ }
725
+ { t #1 #1 substring$ *
726
+ t #2 global.max$ substring$ 't :=
727
+ }
728
+ if$
729
+ }
730
+ while$
731
+ }
732
+
733
+ FUNCTION {word.in}
734
+ { bbl.in capitalize
735
+ ":" *
736
+ " " * }
737
+
738
+ FUNCTION {format.date}
739
+ { year "year" bibinfo.check duplicate$ empty$
740
+ {
741
+ "empty year in " cite$ * "; set to ????" * warning$
742
+ pop$ "????"
743
+ }
744
+ 'skip$
745
+ if$
746
+ extra.label *
747
+ before.all 'output.state :=
748
+ " (" swap$ * ")" *
749
+ }
750
+ FUNCTION {format.btitle}
751
+ { title "title" bibinfo.check
752
+ duplicate$ empty$ 'skip$
753
+ {
754
+ }
755
+ if$
756
+ }
757
+ FUNCTION {either.or.check}
758
+ { empty$
759
+ 'pop$
760
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
761
+ if$
762
+ }
763
+ FUNCTION {format.bvolume}
764
+ { volume empty$
765
+ { "" }
766
+ { bbl.volume volume tie.or.space.prefix
767
+ "volume" bibinfo.check * *
768
+ series "series" bibinfo.check
769
+ duplicate$ empty$ 'pop$
770
+ { emphasize ", " * swap$ * }
771
+ if$
772
+ "volume and number" number either.or.check
773
+ }
774
+ if$
775
+ }
776
+ FUNCTION {format.number.series}
777
+ { volume empty$
778
+ { number empty$
779
+ { series field.or.null }
780
+ { series empty$
781
+ { number "number" bibinfo.check }
782
+ { output.state mid.sentence =
783
+ { bbl.number }
784
+ { bbl.number capitalize }
785
+ if$
786
+ number tie.or.space.prefix "number" bibinfo.check * *
787
+ bbl.in space.word *
788
+ series "series" bibinfo.check *
789
+ }
790
+ if$
791
+ }
792
+ if$
793
+ }
794
+ { "" }
795
+ if$
796
+ }
797
+ FUNCTION {is.num}
798
+ { chr.to.int$
799
+ duplicate$ "0" chr.to.int$ < not
800
+ swap$ "9" chr.to.int$ > not and
801
+ }
802
+
803
+ FUNCTION {extract.num}
804
+ { duplicate$ 't :=
805
+ "" 's :=
806
+ { t empty$ not }
807
+ { t #1 #1 substring$
808
+ t #2 global.max$ substring$ 't :=
809
+ duplicate$ is.num
810
+ { s swap$ * 's := }
811
+ { pop$ "" 't := }
812
+ if$
813
+ }
814
+ while$
815
+ s empty$
816
+ 'skip$
817
+ { pop$ s }
818
+ if$
819
+ }
820
+
821
+ FUNCTION {convert.edition}
822
+ { extract.num "l" change.case$ 's :=
823
+ s "first" = s "1" = or
824
+ { bbl.first 't := }
825
+ { s "second" = s "2" = or
826
+ { bbl.second 't := }
827
+ { s "third" = s "3" = or
828
+ { bbl.third 't := }
829
+ { s "fourth" = s "4" = or
830
+ { bbl.fourth 't := }
831
+ { s "fifth" = s "5" = or
832
+ { bbl.fifth 't := }
833
+ { s #1 #1 substring$ is.num
834
+ { s eng.ord 't := }
835
+ { edition 't := }
836
+ if$
837
+ }
838
+ if$
839
+ }
840
+ if$
841
+ }
842
+ if$
843
+ }
844
+ if$
845
+ }
846
+ if$
847
+ t
848
+ }
849
+
850
+ FUNCTION {format.edition}
851
+ { edition duplicate$ empty$ 'skip$
852
+ {
853
+ convert.edition
854
+ output.state mid.sentence =
855
+ { "l" }
856
+ { "t" }
857
+ if$ change.case$
858
+ "edition" bibinfo.check
859
+ " " * bbl.edition *
860
+ }
861
+ if$
862
+ }
863
+ INTEGERS { multiresult }
864
+ FUNCTION {multi.page.check}
865
+ { 't :=
866
+ #0 'multiresult :=
867
+ { multiresult not
868
+ t empty$ not
869
+ and
870
+ }
871
+ { t #1 #1 substring$
872
+ duplicate$ "-" =
873
+ swap$ duplicate$ "," =
874
+ swap$ "+" =
875
+ or or
876
+ { #1 'multiresult := }
877
+ { t #2 global.max$ substring$ 't := }
878
+ if$
879
+ }
880
+ while$
881
+ multiresult
882
+ }
883
+ FUNCTION {format.pages}
884
+ { pages duplicate$ empty$ 'skip$
885
+ { duplicate$ multi.page.check
886
+ {
887
+ bbl.pages swap$
888
+ n.dashify
889
+ }
890
+ {
891
+ bbl.page swap$
892
+ }
893
+ if$
894
+ tie.or.space.prefix
895
+ "pages" bibinfo.check
896
+ * *
897
+ }
898
+ if$
899
+ }
900
+ FUNCTION {format.journal.pages}
901
+ { pages duplicate$ empty$ 'pop$
902
+ { swap$ duplicate$ empty$
903
+ { pop$ pop$ format.pages }
904
+ {
905
+ ":" *
906
+ swap$
907
+ n.dashify
908
+ "pages" bibinfo.check
909
+ *
910
+ }
911
+ if$
912
+ }
913
+ if$
914
+ }
915
+ FUNCTION {format.journal.eid}
916
+ { eid "eid" bibinfo.check
917
+ duplicate$ empty$ 'pop$
918
+ { swap$ duplicate$ empty$ 'skip$
919
+ {
920
+ ":" *
921
+ }
922
+ if$
923
+ swap$ *
924
+ }
925
+ if$
926
+ }
927
+ FUNCTION {format.vol.num.pages}
928
+ { volume field.or.null
929
+ duplicate$ empty$ 'skip$
930
+ {
931
+ "volume" bibinfo.check
932
+ }
933
+ if$
934
+ number "number" bibinfo.check duplicate$ empty$ 'skip$
935
+ {
936
+ swap$ duplicate$ empty$
937
+ { "there's a number but no volume in " cite$ * warning$ }
938
+ 'skip$
939
+ if$
940
+ swap$
941
+ "(" swap$ * ")" *
942
+ }
943
+ if$ *
944
+ eid empty$
945
+ { format.journal.pages }
946
+ { format.journal.eid }
947
+ if$
948
+ }
949
+
950
+ FUNCTION {format.chapter.pages}
951
+ { chapter empty$
952
+ 'format.pages
953
+ { type empty$
954
+ { bbl.chapter }
955
+ { type "l" change.case$
956
+ "type" bibinfo.check
957
+ }
958
+ if$
959
+ chapter tie.or.space.prefix
960
+ "chapter" bibinfo.check
961
+ * *
962
+ pages empty$
963
+ 'skip$
964
+ { ", " * format.pages * }
965
+ if$
966
+ }
967
+ if$
968
+ }
969
+
970
+ FUNCTION {format.booktitle}
971
+ {
972
+ booktitle "booktitle" bibinfo.check
973
+ }
974
+ FUNCTION {format.in.ed.booktitle}
975
+ { format.booktitle duplicate$ empty$ 'skip$
976
+ {
977
+ editor "editor" format.names.ed duplicate$ empty$ 'pop$
978
+ {
979
+ " " *
980
+ get.bbl.editor
981
+ "(" swap$ * ") " *
982
+ * swap$
983
+ * }
984
+ if$
985
+ word.in swap$ *
986
+ }
987
+ if$
988
+ }
989
+ FUNCTION {format.thesis.type}
990
+ { type duplicate$ empty$
991
+ 'pop$
992
+ { swap$ pop$
993
+ "t" change.case$ "type" bibinfo.check
994
+ }
995
+ if$
996
+ }
997
+ FUNCTION {format.tr.number}
998
+ { number "number" bibinfo.check
999
+ type duplicate$ empty$
1000
+ { pop$ bbl.techrep }
1001
+ 'skip$
1002
+ if$
1003
+ "type" bibinfo.check
1004
+ swap$ duplicate$ empty$
1005
+ { pop$ "t" change.case$ }
1006
+ { tie.or.space.prefix * * }
1007
+ if$
1008
+ }
1009
+ FUNCTION {format.article.crossref}
1010
+ {
1011
+ word.in
1012
+ " \cite{" * crossref * "}" *
1013
+ }
1014
+ FUNCTION {format.book.crossref}
1015
+ { volume duplicate$ empty$
1016
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
1017
+ pop$ word.in
1018
+ }
1019
+ { bbl.volume
1020
+ capitalize
1021
+ swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word *
1022
+ }
1023
+ if$
1024
+ " \cite{" * crossref * "}" *
1025
+ }
1026
+ FUNCTION {format.incoll.inproc.crossref}
1027
+ {
1028
+ word.in
1029
+ " \cite{" * crossref * "}" *
1030
+ }
1031
+ FUNCTION {format.org.or.pub}
1032
+ { 't :=
1033
+ ""
1034
+ address empty$ t empty$ and
1035
+ 'skip$
1036
+ {
1037
+ t empty$
1038
+ { address "address" bibinfo.check *
1039
+ }
1040
+ { t *
1041
+ address empty$
1042
+ 'skip$
1043
+ { ", " * address "address" bibinfo.check * }
1044
+ if$
1045
+ }
1046
+ if$
1047
+ }
1048
+ if$
1049
+ }
1050
+ FUNCTION {format.publisher.address}
1051
+ { publisher "publisher" bibinfo.warn format.org.or.pub
1052
+ }
1053
+
1054
+ FUNCTION {format.organization.address}
1055
+ { organization "organization" bibinfo.check format.org.or.pub
1056
+ }
1057
+
1058
+ FUNCTION {article}
1059
+ { output.bibitem
1060
+ format.authors "author" output.check
1061
+ author format.key output
1062
+ format.date "year" output.check
1063
+ date.block
1064
+ format.title "title" output.check
1065
+ new.sentence
1066
+ crossref missing$
1067
+ {
1068
+ journal
1069
+ remove.dots
1070
+ "journal" bibinfo.check
1071
+ "journal" output.check
1072
+ add.blank
1073
+ format.vol.num.pages output
1074
+ }
1075
+ { format.article.crossref output.nonnull
1076
+ format.pages output
1077
+ }
1078
+ if$
1079
+ format.doi output
1080
+ format.url output
1081
+ format.note output
1082
+ format.eprint output
1083
+ fin.entry
1084
+ }
1085
+ FUNCTION {book}
1086
+ { output.bibitem
1087
+ author empty$
1088
+ { format.editors "author and editor" output.check
1089
+ editor format.key output
1090
+ add.blank
1091
+ }
1092
+ { format.authors output.nonnull
1093
+ crossref missing$
1094
+ { "author and editor" editor either.or.check }
1095
+ 'skip$
1096
+ if$
1097
+ }
1098
+ if$
1099
+ format.date "year" output.check
1100
+ date.block
1101
+ format.btitle "title" output.check
1102
+ crossref missing$
1103
+ { format.bvolume output
1104
+ format.edition output
1105
+ new.sentence
1106
+ format.number.series output
1107
+ format.publisher.address output
1108
+ }
1109
+ {
1110
+ new.sentence
1111
+ format.book.crossref output.nonnull
1112
+ }
1113
+ if$
1114
+ format.doi output
1115
+ format.url output
1116
+ format.note output
1117
+ format.eprint output
1118
+ fin.entry
1119
+ }
1120
+ FUNCTION {booklet}
1121
+ { output.bibitem
1122
+ format.authors output
1123
+ author format.key output
1124
+ format.date "year" output.check
1125
+ date.block
1126
+ format.title "title" output.check
1127
+ new.sentence
1128
+ howpublished "howpublished" bibinfo.check output
1129
+ address "address" bibinfo.check output
1130
+ format.doi output
1131
+ format.url output
1132
+ format.note output
1133
+ format.eprint output
1134
+ fin.entry
1135
+ }
1136
+
1137
+ FUNCTION {inbook}
1138
+ { output.bibitem
1139
+ author empty$
1140
+ { format.editors "author and editor" output.check
1141
+ editor format.key output
1142
+ }
1143
+ { format.authors output.nonnull
1144
+ crossref missing$
1145
+ { "author and editor" editor either.or.check }
1146
+ 'skip$
1147
+ if$
1148
+ }
1149
+ if$
1150
+ format.date "year" output.check
1151
+ date.block
1152
+ format.btitle "title" output.check
1153
+ crossref missing$
1154
+ {
1155
+ format.bvolume output
1156
+ format.edition output
1157
+ format.publisher.address output
1158
+ format.chapter.pages "chapter and pages" output.check
1159
+ new.sentence
1160
+ format.number.series output
1161
+ }
1162
+ {
1163
+ format.chapter.pages "chapter and pages" output.check
1164
+ new.sentence
1165
+ format.book.crossref output.nonnull
1166
+ }
1167
+ if$
1168
+ format.doi output
1169
+ format.url output
1170
+ format.note output
1171
+ format.eprint output
1172
+ fin.entry
1173
+ }
1174
+
1175
+ FUNCTION {incollection}
1176
+ { output.bibitem
1177
+ format.authors "author" output.check
1178
+ author format.key output
1179
+ format.date "year" output.check
1180
+ date.block
1181
+ format.title "title" output.check
1182
+ new.sentence
1183
+ crossref missing$
1184
+ { format.in.ed.booktitle "booktitle" output.check
1185
+ format.bvolume output
1186
+ format.edition output
1187
+ format.number.series output
1188
+ format.publisher.address output
1189
+ format.chapter.pages output
1190
+ }
1191
+ { format.incoll.inproc.crossref output.nonnull
1192
+ format.chapter.pages output
1193
+ }
1194
+ if$
1195
+ format.doi output
1196
+ format.url output
1197
+ format.note output
1198
+ format.eprint output
1199
+ fin.entry
1200
+ }
1201
+ FUNCTION {inproceedings}
1202
+ { output.bibitem
1203
+ format.authors "author" output.check
1204
+ author format.key output
1205
+ format.date "year" output.check
1206
+ date.block
1207
+ format.title "title" output.check
1208
+ new.sentence
1209
+ crossref missing$
1210
+ { format.in.ed.booktitle "booktitle" output.check
1211
+ publisher empty$
1212
+ { format.organization.address output }
1213
+ { organization "organization" bibinfo.check output
1214
+ format.publisher.address output
1215
+ }
1216
+ if$
1217
+ format.bvolume output
1218
+ format.number.series output
1219
+ format.pages output
1220
+ }
1221
+ { format.incoll.inproc.crossref output.nonnull
1222
+ format.pages output
1223
+ }
1224
+ if$
1225
+ format.doi output
1226
+ format.url output
1227
+ format.note output
1228
+ format.eprint output
1229
+ fin.entry
1230
+ }
1231
+ FUNCTION {conference} { inproceedings }
1232
+ FUNCTION {manual}
1233
+ { output.bibitem
1234
+ format.authors output
1235
+ author format.key output
1236
+ format.date "year" output.check
1237
+ date.block
1238
+ format.btitle "title" output.check
1239
+ new.sentence
1240
+ organization "organization" bibinfo.check output
1241
+ address "address" bibinfo.check output
1242
+ format.edition output
1243
+ format.doi output
1244
+ format.url output
1245
+ format.note output
1246
+ format.eprint output
1247
+ fin.entry
1248
+ }
1249
+
1250
+ FUNCTION {mastersthesis}
1251
+ { output.bibitem
1252
+ format.authors "author" output.check
1253
+ author format.key output
1254
+ format.date "year" output.check
1255
+ date.block
1256
+ format.title
1257
+ "title" output.check
1258
+ new.sentence
1259
+ bbl.mthesis format.thesis.type output.nonnull
1260
+ school "school" bibinfo.warn output
1261
+ address "address" bibinfo.check output
1262
+ format.doi output
1263
+ format.url output
1264
+ format.note output
1265
+ format.eprint output
1266
+ fin.entry
1267
+ }
1268
+
1269
+ FUNCTION {misc}
1270
+ { output.bibitem
1271
+ format.authors output
1272
+ author format.key output
1273
+ format.date "year" output.check
1274
+ date.block
1275
+ format.title output
1276
+ new.sentence
1277
+ howpublished "howpublished" bibinfo.check output
1278
+ format.doi output
1279
+ format.url output
1280
+ format.note output
1281
+ format.eprint output
1282
+ fin.entry
1283
+ }
1284
+ FUNCTION {phdthesis}
1285
+ { output.bibitem
1286
+ format.authors "author" output.check
1287
+ author format.key output
1288
+ format.date "year" output.check
1289
+ date.block
1290
+ format.title
1291
+ "title" output.check
1292
+ new.sentence
1293
+ bbl.phdthesis format.thesis.type output.nonnull
1294
+ school "school" bibinfo.warn output
1295
+ address "address" bibinfo.check output
1296
+ format.doi output
1297
+ format.url output
1298
+ format.note output
1299
+ format.eprint output
1300
+ fin.entry
1301
+ }
1302
+
1303
+ FUNCTION {proceedings}
1304
+ { output.bibitem
1305
+ format.editors output
1306
+ editor format.key output
1307
+ format.date "year" output.check
1308
+ date.block
1309
+ format.btitle "title" output.check
1310
+ format.bvolume output
1311
+ format.number.series output
1312
+ publisher empty$
1313
+ { format.organization.address output }
1314
+ { organization "organization" bibinfo.check output
1315
+ format.publisher.address output
1316
+ }
1317
+ if$
1318
+ format.doi output
1319
+ format.url output
1320
+ format.note output
1321
+ format.eprint output
1322
+ fin.entry
1323
+ }
1324
+
1325
+ FUNCTION {techreport}
1326
+ { output.bibitem
1327
+ format.authors "author" output.check
1328
+ author format.key output
1329
+ format.date "year" output.check
1330
+ date.block
1331
+ format.title
1332
+ "title" output.check
1333
+ new.sentence
1334
+ format.tr.number output.nonnull
1335
+ institution "institution" bibinfo.warn output
1336
+ address "address" bibinfo.check output
1337
+ format.doi output
1338
+ format.url output
1339
+ format.note output
1340
+ format.eprint output
1341
+ fin.entry
1342
+ }
1343
+
1344
+ FUNCTION {unpublished}
1345
+ { output.bibitem
1346
+ format.authors "author" output.check
1347
+ author format.key output
1348
+ format.date "year" output.check
1349
+ date.block
1350
+ format.title "title" output.check
1351
+ format.doi output
1352
+ format.url output
1353
+ format.note "note" output.check
1354
+ format.eprint output
1355
+ fin.entry
1356
+ }
1357
+
1358
+ FUNCTION {default.type} { misc }
1359
+ READ
1360
+ FUNCTION {sortify}
1361
+ { purify$
1362
+ "l" change.case$
1363
+ }
1364
+ INTEGERS { len }
1365
+ FUNCTION {chop.word}
1366
+ { 's :=
1367
+ 'len :=
1368
+ s #1 len substring$ =
1369
+ { s len #1 + global.max$ substring$ }
1370
+ 's
1371
+ if$
1372
+ }
1373
+ FUNCTION {format.lab.names}
1374
+ { 's :=
1375
+ "" 't :=
1376
+ s #1 "{vv~}{ll}" format.name$
1377
+ s num.names$ duplicate$
1378
+ #2 >
1379
+ { pop$
1380
+ " " * bbl.etal *
1381
+ }
1382
+ { #2 <
1383
+ 'skip$
1384
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
1385
+ {
1386
+ " " * bbl.etal *
1387
+ }
1388
+ { bbl.and space.word * s #2 "{vv~}{ll}" format.name$
1389
+ * }
1390
+ if$
1391
+ }
1392
+ if$
1393
+ }
1394
+ if$
1395
+ }
1396
+
1397
+ FUNCTION {author.key.label}
1398
+ { author empty$
1399
+ { key empty$
1400
+ { cite$ #1 #3 substring$ }
1401
+ 'key
1402
+ if$
1403
+ }
1404
+ { author format.lab.names }
1405
+ if$
1406
+ }
1407
+
1408
+ FUNCTION {author.editor.key.label}
1409
+ { author empty$
1410
+ { editor empty$
1411
+ { key empty$
1412
+ { cite$ #1 #3 substring$ }
1413
+ 'key
1414
+ if$
1415
+ }
1416
+ { editor format.lab.names }
1417
+ if$
1418
+ }
1419
+ { author format.lab.names }
1420
+ if$
1421
+ }
1422
+
1423
+ FUNCTION {editor.key.label}
1424
+ { editor empty$
1425
+ { key empty$
1426
+ { cite$ #1 #3 substring$ }
1427
+ 'key
1428
+ if$
1429
+ }
1430
+ { editor format.lab.names }
1431
+ if$
1432
+ }
1433
+
1434
+ FUNCTION {calc.short.authors}
1435
+ { type$ "book" =
1436
+ type$ "inbook" =
1437
+ or
1438
+ 'author.editor.key.label
1439
+ { type$ "proceedings" =
1440
+ 'editor.key.label
1441
+ 'author.key.label
1442
+ if$
1443
+ }
1444
+ if$
1445
+ 'short.list :=
1446
+ }
1447
+
1448
+ FUNCTION {calc.label}
1449
+ { calc.short.authors
1450
+ short.list
1451
+ "("
1452
+ *
1453
+ year duplicate$ empty$
1454
+ { pop$ "????" }
1455
+ 'skip$
1456
+ if$
1457
+ *
1458
+ 'label :=
1459
+ }
1460
+
1461
+ FUNCTION {sort.format.names}
1462
+ { 's :=
1463
+ #1 'nameptr :=
1464
+ ""
1465
+ s num.names$ 'numnames :=
1466
+ numnames 'namesleft :=
1467
+ { namesleft #0 > }
1468
+ { s nameptr
1469
+ "{ll{ }}{ f{ }}{ jj{ }}"
1470
+ format.name$ 't :=
1471
+ nameptr #1 >
1472
+ {
1473
+ " " *
1474
+ namesleft #1 = t "others" = and
1475
+ { "zzzzz" * }
1476
+ { numnames #2 > nameptr #2 = and
1477
+ { "zz" * year field.or.null * " " * }
1478
+ 'skip$
1479
+ if$
1480
+ t sortify *
1481
+ }
1482
+ if$
1483
+ }
1484
+ { t sortify * }
1485
+ if$
1486
+ nameptr #1 + 'nameptr :=
1487
+ namesleft #1 - 'namesleft :=
1488
+ }
1489
+ while$
1490
+ }
1491
+
1492
+ FUNCTION {sort.format.title}
1493
+ { 't :=
1494
+ "A " #2
1495
+ "An " #3
1496
+ "The " #4 t chop.word
1497
+ chop.word
1498
+ chop.word
1499
+ sortify
1500
+ #1 global.max$ substring$
1501
+ }
1502
+ FUNCTION {author.sort}
1503
+ { author empty$
1504
+ { key empty$
1505
+ { "to sort, need author or key in " cite$ * warning$
1506
+ ""
1507
+ }
1508
+ { key sortify }
1509
+ if$
1510
+ }
1511
+ { author sort.format.names }
1512
+ if$
1513
+ }
1514
+ FUNCTION {author.editor.sort}
1515
+ { author empty$
1516
+ { editor empty$
1517
+ { key empty$
1518
+ { "to sort, need author, editor, or key in " cite$ * warning$
1519
+ ""
1520
+ }
1521
+ { key sortify }
1522
+ if$
1523
+ }
1524
+ { editor sort.format.names }
1525
+ if$
1526
+ }
1527
+ { author sort.format.names }
1528
+ if$
1529
+ }
1530
+ FUNCTION {editor.sort}
1531
+ { editor empty$
1532
+ { key empty$
1533
+ { "to sort, need editor or key in " cite$ * warning$
1534
+ ""
1535
+ }
1536
+ { key sortify }
1537
+ if$
1538
+ }
1539
+ { editor sort.format.names }
1540
+ if$
1541
+ }
1542
+ FUNCTION {presort}
1543
+ { calc.label
1544
+ label sortify
1545
+ " "
1546
+ *
1547
+ type$ "book" =
1548
+ type$ "inbook" =
1549
+ or
1550
+ 'author.editor.sort
1551
+ { type$ "proceedings" =
1552
+ 'editor.sort
1553
+ 'author.sort
1554
+ if$
1555
+ }
1556
+ if$
1557
+ #1 entry.max$ substring$
1558
+ 'sort.label :=
1559
+ sort.label
1560
+ *
1561
+ " "
1562
+ *
1563
+ title field.or.null
1564
+ sort.format.title
1565
+ *
1566
+ #1 entry.max$ substring$
1567
+ 'sort.key$ :=
1568
+ }
1569
+
1570
+ ITERATE {presort}
1571
+ SORT
1572
+ STRINGS { last.label next.extra }
1573
+ INTEGERS { last.extra.num number.label }
1574
+ FUNCTION {initialize.extra.label.stuff}
1575
+ { #0 int.to.chr$ 'last.label :=
1576
+ "" 'next.extra :=
1577
+ #0 'last.extra.num :=
1578
+ #0 'number.label :=
1579
+ }
1580
+ FUNCTION {forward.pass}
1581
+ { last.label label =
1582
+ { last.extra.num #1 + 'last.extra.num :=
1583
+ last.extra.num int.to.chr$ 'extra.label :=
1584
+ }
1585
+ { "a" chr.to.int$ 'last.extra.num :=
1586
+ "" 'extra.label :=
1587
+ label 'last.label :=
1588
+ }
1589
+ if$
1590
+ number.label #1 + 'number.label :=
1591
+ }
1592
+ FUNCTION {reverse.pass}
1593
+ { next.extra "b" =
1594
+ { "a" 'extra.label := }
1595
+ 'skip$
1596
+ if$
1597
+ extra.label 'next.extra :=
1598
+ extra.label
1599
+ duplicate$ empty$
1600
+ 'skip$
1601
+ { "{\natexlab{" swap$ * "}}" * }
1602
+ if$
1603
+ 'extra.label :=
1604
+ label extra.label * 'label :=
1605
+ }
1606
+ EXECUTE {initialize.extra.label.stuff}
1607
+ ITERATE {forward.pass}
1608
+ REVERSE {reverse.pass}
1609
+ FUNCTION {bib.sort.order}
1610
+ { sort.label
1611
+ " "
1612
+ *
1613
+ year field.or.null sortify
1614
+ *
1615
+ " "
1616
+ *
1617
+ title field.or.null
1618
+ sort.format.title
1619
+ *
1620
+ #1 entry.max$ substring$
1621
+ 'sort.key$ :=
1622
+ }
1623
+ ITERATE {bib.sort.order}
1624
+ SORT
1625
+ FUNCTION {begin.bib}
1626
+ { preamble$ empty$
1627
+ 'skip$
1628
+ { preamble$ write$ newline$ }
1629
+ if$
1630
+ "\begin{thebibliography}{" number.label int.to.str$ * "}" *
1631
+ write$ newline$
1632
+ "\providecommand{\natexlab}[1]{#1}"
1633
+ write$ newline$
1634
+ "\providecommand{\url}[1]{{#1}}"
1635
+ write$ newline$
1636
+ "\providecommand{\urlprefix}{URL }"
1637
+ write$ newline$
1638
+ "\expandafter\ifx\csname urlstyle\endcsname\relax"
1639
+ write$ newline$
1640
+ " \providecommand{\doi}[1]{DOI~\discretionary{}{}{}#1}\else"
1641
+ write$ newline$
1642
+ " \providecommand{\doi}{DOI~\discretionary{}{}{}\begingroup \urlstyle{rm}\Url}\fi"
1643
+ write$ newline$
1644
+ "\providecommand{\eprint}[2][]{\url{#2}}"
1645
+ write$ newline$
1646
+ }
1647
+ EXECUTE {begin.bib}
1648
+ EXECUTE {init.state.consts}
1649
+ ITERATE {call.type$}
1650
+ FUNCTION {end.bib}
1651
+ { newline$
1652
+ "\end{thebibliography}" write$ newline$
1653
+ }
1654
+ EXECUTE {end.bib}
1655
+ %% End of customized bst file
1656
+ %%
1657
+ %% End of file `spbasic.bst'.
1658
+