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